CSCPParamDB* CSCPParamDB :: NewLC() { _SCPDB_LOG(_L("[CSCPParamDB]-> >>> NewLC()")); CSCPParamDB* self = NewL(); CleanupStack :: PushL(self); _SCPDB_LOG(_L("[CSCPParamDB]-> <<< NewLC()")); return self; }
CDnsSocketWriter *CDnsSocketWriter::NewTcpListenL(CDnsSocket &aMaster, TInt aTTL) { CDnsSocketWriter *const writer = NewL(aMaster, aTTL); writer->iTCP = 1; writer->iListen = 1; return writer; }
void CMceSrvStream::DecodeVideoL( RPointerArray<CMceSrvStream>& aStreams, CMceComVideoStream& aVideo, CMceMediaManager& aManager ) { MCEMM_DEBUG("CMceSrvStream::DecodeVideoL(), Entry "); for( TInt codecNdx = 0;codecNdx < aVideo.CodecCount();codecNdx++ ) { aVideo.CodecL( codecNdx )->SetEnabled( codecNdx == 0 || IS_RECEIVESTREAM( &aVideo ) ); for( TInt sinkNdx = 0 ; sinkNdx < aVideo.Sinks().Count() ; sinkNdx++ ) { CMceSrvStream* srvStream = NewL( aManager, aVideo, *aVideo.Source(), *aVideo.Sinks()[ sinkNdx ], *aVideo.CodecL( codecNdx ) ); CleanupStack::PushL( srvStream ); MCEMM_DEBUG_STREAM( "CMceSrvStream::DecodeVideoL(): decoded video", *srvStream ); aStreams.AppendL( srvStream ); CleanupStack::Pop( srvStream ); } } if ( aVideo.BoundStream() && aVideo.Binder() ) { DecodeL( aStreams, aVideo.BoundStreamL(), aManager ); } MCEMM_DEBUG("CMceSrvStream::DecodeVideoL(), Exit "); }
// --------------------------------------------------------------------------- // CAknMemorySelectionDialogMultiDrive::NewL // --------------------------------------------------------------------------- // EXPORT_C CAknMemorySelectionDialogMultiDrive* CAknMemorySelectionDialogMultiDrive::NewL( TCommonDialogType aDialogType, TBool aShowUnavailableDrives ) { return NewL( aDialogType, 0, aShowUnavailableDrives ); }
CCndFeature* CCndFeature::NewL(const TConditionCheckType aConditionCheckType, const TInt aFeatureId) { const TUint nullFeatureData = 0; //Passing the condition value as 0 as it is only required while checking the feature data. return NewL(aConditionCheckType, aFeatureId, nullFeatureData); }
CSimple* CSimple::NewLC(TInt aVal) { // NewLC is enriched with a push to the cleanup stack CSimple* self=NewL(aVal); CleanupStack::PushL(self); return self; }
EXPORT_C CDHPrivateKey* CDHPrivateKey::NewLC(RInteger& aN, RInteger& aG, RInteger& ax) { CDHPrivateKey* self = NewL(aN, aG, ax); CleanupStack::PushL(self); return self; }
EXPORT_C CDHPublicKey* CDHPublicKey::NewLC(RInteger& aN, RInteger& aG, RInteger& aX) { CDHPublicKey* self = NewL(aN, aG, aX); CleanupStack::PushL(self); return self; }
/* static */ XPath_Node * XPath_Node::MakeL (XMLTreeAccessor *tree, XMLTreeAccessor::Node *treenode) { XPath_Node *node = NewL (0, tree, treenode, TRUE); node->temporary = FALSE; return node; }
/* static */ XPath_Node * XPath_Node::NewL (XPath_Context *context, XMLTreeAccessor *tree, XMLTreeAccessor::Node *treenode, BOOL independent) { XPath_Node *node = NewL (context, independent); node->Set (tree, treenode); return node; }
CDnsSocketWriter *CDnsSocketWriter::NewTcpL(CDnsSocket &aMaster, const TInetAddr &aServer, TInt aTTL) { CDnsSocketWriter *const writer = NewL(aMaster, aTTL); // Note: with TCP iTo is dummy! writer->iTo = aServer; writer->iTCP = 1; return writer; }
EXPORT_C CHandleItem* CHandleItem::CHandleItemL(TSdpServRecordHandle aHandleID, CSdpServRecord* aRecord) { CHandleItem* self = NewL(); self->iHandleID = aHandleID; self->iRecord = aRecord; self->iRecordSize = 0; return self; }
// ----------------------------------------------------------------------------- // CSdpRepeatField::CloneL // Creates an exact copy of the repeat field // ----------------------------------------------------------------------------- // EXPORT_C CSdpRepeatField* CSdpRepeatField::CloneL() const { __TEST_INVARIANT; CSdpRepeatField* obj = NewL(iRepeatInterval, iActiveDuration, iTimeOffsets); __ASSERT_DEBUG(*this == *obj, User::Panic(KSdpCodecPanicCat, KSdpCodecPanicInternal)); return obj; }
EXPORT_C CVtConsoleInputController* CVtConsoleInputController::New(MConsoleInput& aConsoleInput, LtkUtils::CIniFile& aIniFile) { CVtConsoleInputController* self = NULL; TRAPD(err, self = NewL(aConsoleInput, aIniFile)); if (err == KErrNone) { return self; } return NULL; }
EXPORT_C CSubConnectionProtocolParameterSet* CSubConnectionProtocolParameterSet::NewL( RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType) { CSubConnectionProtocolParameterSet* obj = NewL(); CleanupStack::PushL(obj); aFamily.AddParameterSetL(obj, aType); CleanupStack::Pop(obj); return obj; }
EXPORT_C CFlowRequestParameters* CFlowRequestParameters::NewL( CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) { CFlowRequestParameters* obj = NewL(); CleanupStack::PushL(obj); aFamily.SetGenericSetL(*obj, aType); CleanupStack::Pop(obj); return obj; }
/** Public, non-leaving, static constructor */ CT_LbsAGPSAssDataStep* CT_LbsAGPSAssDataStep::New(CT_LbsAGPSHAIServerRoot& aParent) { TESTLOG(ELogP1, ">> CT_LbsAGPSAssDataStep::New()"); CT_LbsAGPSAssDataStep* self = NULL; // Note the lack of ELeave. // This means that having insufficient memory will return NULL; TRAP_IGNORE(self = NewL(aParent)); TESTLOG(ELogP1, "<< CT_LbsAGPSAssDataStep::New()"); return self; }
// ----------------------------------------------------------------------------- // CNATFWUNSAFRealmAttribute::DecodeAttributeL // ----------------------------------------------------------------------------- // CNATFWUNSAFAttribute* CNATFWUNSAFRealmAttribute::DecodeAttributeL(const TDesC8& aByteStream) { TUint16 valueLength = ParseLengthL(aByteStream); //Stream has to have enough data for the whole value element __ASSERT_ALWAYS(aByteStream.Length() >= EValueOffset + valueLength, User::Leave(KErrArgument)); return NewL(aByteStream.Mid(EValueOffset, valueLength)); }
// ----------------------------------------------------------------------------- // CCMSOriginatorPublicKey::NewL // Two-phased constructor. // ----------------------------------------------------------------------------- // EXPORT_C CCMSOriginatorPublicKey* CCMSOriginatorPublicKey::NewL() { // creating with empty/default values CCMSX509AlgorithmIdentifier* algorithm = CCMSX509AlgorithmIdentifier::NewL( ); CleanupStack::PushL( algorithm ); CCMSOriginatorPublicKey* self = NewL( *algorithm, KNullDesC8() ); CleanupStack::PopAndDestroy( algorithm ); return self; }
/** Creates a new frame object with a specified bitmap and (optionally) a mask. The object takes ownership of the specified bitmap and mask. @param aBitmap A pointer to the bitmap to use in the new frame @param aMask If non-NULL, a pointer to the mask to use in the new frame @return New CBitmapFrameData object */ EXPORT_C CBitmapFrameData* CBitmapFrameData::NewL(CFbsBitmap* aBitmap,CFbsBitmap* aMask) { __ASSERT_DEBUG(aBitmap, Panic(EAnimationClientPanicNullPointer)); CBitmapFrameData* self = NewL(); CleanupStack::PushL(self); // self->SetBitmap(aBitmap); self->SetMask(aMask); CleanupStack::Pop(); // self return self; }
// ----------------------------------------------------------------------------- // CNATFWUNSAFChangeRequestAttribute::DecodeAttributeL // ----------------------------------------------------------------------------- // CNATFWUNSAFAttribute* CNATFWUNSAFChangeRequestAttribute::DecodeAttributeL(const TDesC8& aByteStream) { TUint16 valueLength = ParseLengthL(aByteStream); __ASSERT_ALWAYS(valueLength == EAttributeValueSize, User::Leave(KErrCorrupt)); __ASSERT_ALWAYS(aByteStream.Length() >= EValueOffset + valueLength, User::Leave(KErrArgument)); TUint32 value = BigEndian::Get32(aByteStream.Mid(EValueOffset).Ptr()); return NewL((value & EChangeIPMask) > 0, (value & EChangePortMask) > 0); }
/** Creates a new frame object. It takes ownership of the specified bitmap and mask (if specified), and is assigned the frame duration and position. @param aBitmap A pointer to the bitmap to use in the frame. @param aMask If non-NULL, a pointer to the mask to use in the frame. @param aIntervalInMilliSeconds The frame's duration in milliseconds. @param aPosition The frame's position relative to the animation window. @return New CBitmapFrameData object */ EXPORT_C CBitmapFrameData* CBitmapFrameData::NewL(CFbsBitmap* aBitmap,CFbsBitmap* aMask, TInt aIntervalInMilliSeconds, TPoint aPosition) { __ASSERT_DEBUG(aBitmap, Panic(EAnimationClientPanicNullPointer)); CBitmapFrameData* self = NewL(); CleanupStack::PushL(self); // self->SetBitmap(aBitmap); self->SetMask(aMask); self->SetPosition(aPosition); self->SetInterval(aIntervalInMilliSeconds); CleanupStack::Pop(); // self return self; }
// ----------------------------------------------------------------------------- // CNATFWUNSAFTimerValAttribute::DecodeAttributeL // ----------------------------------------------------------------------------- // CNATFWUNSAFAttribute* CNATFWUNSAFTimerValAttribute::DecodeAttributeL(const TDesC8& aByteStream) { TUint16 valueLength = ParseLengthL(aByteStream); //Stream has to have enough data for the whole value element __ASSERT_ALWAYS(valueLength == EAttributeValueSize, User::Leave(KErrCorrupt)); __ASSERT_ALWAYS(aByteStream.Length() >= EValueOffset + valueLength, User::Leave(KErrArgument)); TUint32 value = BigEndian::Get32(aByteStream.Mid(EValueOffset).Ptr()); return NewL(value); }
// ----------------------------------------------------------------------------- // CCFContains::ParseL // Construction with parsing from a DOM node. // ----------------------------------------------------------------------------- // CCFContains* CCFContains::ParseL( MCFOperationServices& aServices, CCFOperationNode* aParent, CMDXMLNode& aNode ) { FUNC_LOG; if ( aNode.NodeName().CompareF( KScriptContainsName ) != 0 ) { return NULL; // Cannot create contains operation from the given node. } TPtrC contextSource; TPtrC contextType; TCmpType cmpType( CCFContextOperation::EInvalidCmpType ); TPtrC cmpValue; TInt contextLevelDelay( 0 ); TBool argsOK = CFContextOperationUtils::ParseTwoComparisonArgs( aNode, contextSource, contextType, cmpType, cmpValue, contextLevelDelay ); if ( cmpType != CCFContextOperation::EStringCmp ) { argsOK = EFalse; } CCFContains* self = NULL; if ( argsOK ) { self = NewL( aServices, aParent, contextType, contextSource, cmpValue ); if ( contextLevelDelay ) { self->iContextLevelDelay = contextLevelDelay; } } else { INFO( "CCFContains::ParseL - Unsupported arguments" ); } CREATE_DOM_INFO( self, aNode ); return self; }
EXPORT_C CMMFVideoDecodeHwDevice* CMMFVideoDecodeHwDevice::NewPuAdapterL(const CImplementationInformation& aInfo, MMMFDevVideoPlayProxy& aProxy) { CMMFVideoDecodeHwDevice* hwdevice = NewL(TUid::Uid(KUidMDFVideoDecoderHwDeviceAdapter), aProxy); CleanupStack::PushL(hwdevice); MDevVideoHwDeviceAdapterSetup* setup = static_cast<MDevVideoHwDeviceAdapterSetup*>( hwdevice->CustomInterface(TUid::Uid(KUidDevVideoHwDeviceAdapterSetup))); if (setup!=NULL) { setup->LoadProcessingUnitL(aInfo); } CleanupStack::Pop(hwdevice); return hwdevice; }
// ----------------------------------------------------------------------------- // CNATFWUNSAFIceControllingAttribute::DecodeAttributeL // ----------------------------------------------------------------------------- // CNATFWUNSAFAttribute* CNATFWUNSAFIceControllingAttribute::DecodeAttributeL(const TDesC8& aByteStream) { TUint16 valueLength = ParseLengthL(aByteStream); //Stream has to have enough data for the whole value element __ASSERT_ALWAYS(valueLength == EAttributeValueSize, User::Leave(KErrCorrupt)); __ASSERT_ALWAYS(aByteStream.Length() >= EValueOffset + valueLength, User::Leave(KErrArgument)); TUint64 value = NATFWUNSAFUtils::GetQuadWordL( aByteStream.Mid(EValueOffset).Ptr()); return NewL(value); }
// ============================================================================ // CWidgetEntry::NewL() // two-phase constructor // // @since 5.0 // ============================================================================ // CWidgetEntry* CWidgetEntry::NewL( RPointerArray<CWidgetPropertyValue>** aProps ) { CWidgetEntry* tmp = NewL(); for ( TInt i = 0; i < (*aProps)->Count(); i++ ) { CWidgetPropertyValue* value = CWidgetPropertyValue::NewL(); tmp->iPropertyValues.AppendL( value ); (*tmp)[i].iType = (**aProps)[i]->iType; (*tmp)[i].iValue = (**aProps)[i]->iValue; // shallow copy of strings (**aProps)[i]->iType = EWidgetPropTypeUnknown; delete (**aProps)[i]; } (*aProps)->Close(); delete *aProps; *aProps = NULL; return tmp; }
// ----------------------------------------------------------------------------- // CNATFWUNSAFRequestedTransportAttribute::DecodeAttributeL // ----------------------------------------------------------------------------- // CNATFWUNSAFAttribute* CNATFWUNSAFRequestedTransportAttribute::DecodeAttributeL( const TDesC8& aByteStream) { TUint16 valueLength = ParseLengthL(aByteStream); //Stream has to have enough data for the whole value element __ASSERT_ALWAYS(valueLength == EAttributeValueSize, User::Leave(KErrCorrupt)); __ASSERT_ALWAYS(aByteStream.Length() >= EValueOffset + valueLength, User::Leave(KErrArgument)); TUint32 value = BigEndian::Get32(aByteStream.Mid(EValueOffset).Ptr()); __ASSERT_ALWAYS(EProtocolUdp == value || EProtocolTcp == value, User::Leave(KErrArgument)); return NewL(static_cast<TTransportProtocol>(value)); }
/* static */ XPath_Node * XPath_Node::MakeL (XPath_Context *context, XPath_Node *node, BOOL independent) { if (node->temporary || !independent != !node->independent) { XPath_Node *copy = NewL (context, node->tree, node->treenode, independent); if (node->type == XP_NODE_ATTRIBUTE || node->type == XP_NODE_NAMESPACE) { copy->type = node->type; copy->name.SetL (node->name); } copy->temporary = FALSE; return copy; } else return IncRef (node); }
// ----------------------------------------------------------------------------- // CNATFWUNSAFErrorCodeAttribute::DecodeAttributeL // ----------------------------------------------------------------------------- // CNATFWUNSAFAttribute* CNATFWUNSAFErrorCodeAttribute::DecodeAttributeL(const TDesC8& aByteStream) { TUint16 valueLength = ParseLengthL(aByteStream); //Stream has to have enough data for the whole value element __ASSERT_ALWAYS(aByteStream.Length() >= EValueOffset + valueLength, User::Leave(KErrArgument)); //Check that the length of the whole attribute is DWORD aligned //Attribute value length (prior to padding) found in header no longer needs //to be aligned CheckLengthL(aByteStream.Length()); //Check the value length is valid for this attribute __ASSERT_ALWAYS(valueLength >= EReasonPhraseOffset, User::Leave(KErrCorrupt)); TInt reasonPhraseLength = valueLength - EReasonPhraseOffset; TPtrC8 attrValue = aByteStream.Mid(EValueOffset); TInt classValue = attrValue[EClassOffset] & EClassMask; __ASSERT_ALWAYS(classValue >= KMinResponseClass && classValue <= KMaxResponseClass, User::Leave(KErrArgument)); TInt numberValue = attrValue[ENumberOffset]; __ASSERT_ALWAYS(numberValue >= 0 && numberValue < E100, User::Leave(KErrArgument)); HBufC8* reasonPhrase = attrValue.Mid(EReasonPhraseOffset, reasonPhraseLength).AllocLC(); reasonPhrase->Des().Trim(); CNATFWUNSAFAttribute* attr = NewL(classValue*E100 + numberValue, *reasonPhrase); CleanupStack::PopAndDestroy(reasonPhrase); return attr; }