本文整理汇总了C++中CArrayPtrFlat类的典型用法代码示例。如果您正苦于以下问题:C++ CArrayPtrFlat类的具体用法?C++ CArrayPtrFlat怎么用?C++ CArrayPtrFlat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CArrayPtrFlat类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new
void CClearConfig::ClearL(RULogger& loggerSession)
{
loggerSession.Stop();//C.A. previously:loggerSession.StopOutputting();
loggerSession.DeActivateInputPlugin();
CArrayPtrFlat<HBufC8> *allplugins = new (ELeave)CArrayPtrFlat<HBufC8>(1);
loggerSession.GetInstalledOutputPlugins(*allplugins);//C.A. previously:loggerSession.InstalledOutputPlugins(*allplugins);
for(TInt i=0;i<(allplugins->Count());i++)
if(allplugins->Count())
{
TBuf8<50> dataBuf;
dataBuf.Copy(allplugins->At(i)->Des());
loggerSession.RemovePluginConfigurations(dataBuf);
}
CArrayFixFlat<TUint8> *getfilter = new (ELeave)CArrayFixFlat<TUint8>(1);
loggerSession.GetPrimaryFiltersEnabled(*getfilter);//C.A. previously:loggerSession.GetEnabledClassifications(*getfilter);
TInt Result=loggerSession.SetPrimaryFiltersEnabled(*getfilter,EFalse);//C.A. previously:TInt Result=loggerSession.DisableClassifications(*getfilter);
RArray<TUint32> get2filter;
loggerSession.GetSecondaryFiltersEnabled(get2filter);//C.A. previously:loggerSession.GetEnabledModuleUids(get2filter);
loggerSession.SetSecondaryFiltersEnabled(get2filter,EFalse);//C.A. previously:loggerSession.DisableModuleUids(get2filter);
//C.A. previously:loggerSession.EnableClassificationFiltering();
loggerSession.SetSecondaryFilteringEnabled(ETrue);//C.A. previously:loggerSession.EnableModuleUidFiltering();
loggerSession.SetBufferSize(1024);
loggerSession.SetNotificationSize(512);
loggerSession.SetBufferMode(1);//C.A. previously:loggerSession.SetBufferMode(EStraight);
}
示例2: CLOG_ENTERFN
// ---------------------------------------------------------
// CDownloadMgrSession::InitializeL
// ---------------------------------------------------------
//
void CDownloadMgrSession::InitializeL()
{
CLOG_ENTERFN( "CDownloadMgrSession::DownloadMgrAttachCountL" )
iIsMaster = (TBool)CurrentMessage().Int2();
TUid uid;
TPckg<TUid> uidPckg( uid );
Read( 0, uidPckg );
CreateClientAppInstanceL( uidPckg().iUid );
// Check how many download we have and return it to the client
CLOG_WRITE_FORMAT( "CDownloadMgrSession::InitializeL iClientAppInstance %d", iClientAppInstance );
CArrayPtrFlat<CHttpDownload>* currentDownloads = iClientAppInstance->DownloadsL();
TPckg<TInt> countPckg( currentDownloads->Count() );
TPckg<TInt> sessionId( iSessionId );
Write( 1, CurrentMessage(), countPckg );
Write( 3, CurrentMessage(), sessionId );
CLOG_NAME_2( _L("Session_%x_%x"), uidPckg().iUid, iSessionId );
currentDownloads->Reset();
delete currentDownloads;
}
示例3:
void CX509CertExtension::ConstructL(const TDesC8& aBinaryData, TInt& aPos)
{
TASN1DecSequence encSeq;
CArrayPtrFlat<TASN1DecGeneric>* seq = encSeq.DecodeDERLC(aBinaryData, aPos, 2, KMaxTInt);
TASN1DecObjectIdentifier encOID;
iId = encOID.DecodeDERL(*(seq->At(0)));
//second is either critical flag, or the ext
TASN1DecGeneric* second = seq->At(1);
if (second->Tag() != EASN1Boolean)
{
iData = second->Encoding().AllocL();
aPos += second->LengthDER();
}
else
{
TASN1DecBoolean encBool;
iCritical = encBool.DecodeDERL(*second);
if (seq->Count() != 3)
{
User::Leave(KErrArgument);
}
TASN1DecGeneric* third = seq->At(2);
iData = third->Encoding().AllocL();
}
CleanupStack::PopAndDestroy();//seq
}
示例4: UpdateIapId
// -----------------------------------------------------------------------------
// CHttpConnHandler::Connected
// ?implementation_description
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CHttpConnHandler::Connected()
{
if( iNewConnection )
{
iNewConnection = EFalse;
if( iStatus.Int() == KErrNone )
{
if( !iIapId )
{
UpdateIapId();
}
TRAP_IGNORE( SetConnectionInfoL() );
}
}
__ASSERT_DEBUG( iClientApp, DMPanic( KErrCorrupt ) );
CArrayPtrFlat<CHttpDownload>* downloads =
iClientApp->Downloads();
for( TInt i = 0; i < downloads->Count(); ++i )
{
if( (*downloads)[i]->ConnHandler() == this )
{
iShutDown->Cancel();
(*downloads)[i]->Connected();
}
}
}
示例5: CLOG_NAME
// -----------------------------------------------------------------------------
// CHttpDownloadManagerServerEngine::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CHttpDownloadManagerServerEngine::ConstructL()
{
CLOG_NAME( _L("Engine") );
LOGGER_ENTERFN( "ConstructL()" );
User::LeaveIfError( iRfs.Connect() );
User::LeaveIfError(iRfs.ShareProtected());
iDocHandler = CDocumentHandler::NewL();
iFeatProgressiveDownload = FeatureManager::FeatureSupported( KFeatureIdBrowserProgressiveDownload );
iProperty = new (ELeave) RProperty;
CLOG_ATTACH( iProperty, this );
iProperty->Attach( KPSUidUikon,KUikMMCInserted );
iMMCNotifier = new (ELeave) CMMCNotifier( iProperty );
CLOG_ATTACH( iMMCNotifier, this );
iMMCNotifier->StartObserving( this );
QueryMMCUniqueId();
QueryDriveListL();
iClientApps = new (ELeave) CArrayPtrFlat<CHttpClientApp>(2);
// make directory for the server
// No problem if it already exists
TInt error = iRfs.MkDirAll( KDmDefaultDir );
if( error != KErrNone && error != KErrAlreadyExists )
// leave if makedir failed in some way
// don't leave if already exists
{
CLOG_WRITE8_1( "MkDirAll: %d", error );
User::Leave( error );
}
LoadClientsL();
// This code generates a unique id for the next download
// client will create. It is always the the highest unique
// id of all downloads + 1.
iNextDownloadId = 1;
for( TInt apps = 0; apps < iClientApps->Count(); ++apps )
{
CArrayPtrFlat<CHttpDownload>* allDownloads = (*iClientApps)[apps]->Downloads();
for( TInt i = 0; i < allDownloads->Count(); ++i )
{
if( iNextDownloadId <= (*allDownloads)[i]->Id() )
{
iNextDownloadId = (*allDownloads)[i]->Id() + 1;
}
}
}
error = iSocketServ.Connect();
User::LeaveIfError(error);
}
示例6: LOGGER_ENTERFN
// -----------------------------------------------------------------------------
// CHttpDownloadManagerServerEngine::AllDownloadsSizeInDriveL
// ?implementation_description
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt CHttpDownloadManagerServerEngine::AllDownloadsSizeInDriveL(const CHttpDownload *aDownload, TInt aDriveId) const
{
LOGGER_ENTERFN( "AllDownloadsSizeInDriveL" );
TInt allDownloadsSize( 0 );
TInt numClientApps = iClientApps->Count();
for( TInt apps = 0; apps < numClientApps; ++apps )
{
CArrayPtrFlat<CHttpDownload>* dlArray = (*iClientApps)[apps]->Downloads();
TInt numDownloads = dlArray->Count();
for( TInt dl = 0; dl < numDownloads; ++dl )
{
if( ( aDownload != (*dlArray)[dl]) && (*dlArray)[dl]->State() != EHttpDlMultipleMOCompleted
&& aDriveId == (*dlArray)[dl]->GetDestinationDriveID())
{
TInt32 totalSize(0);
TInt32 downloadedSize(0);
(*dlArray)[dl]->GetIntAttributeL(EDlAttrMultipleMOLength, totalSize);
(*dlArray)[dl]->GetIntAttributeL(EDlAttrMultipleMODownloadedSize, downloadedSize);
//Do not conside the downloads with unknown size
if(KDefaultContentLength != totalSize)
allDownloadsSize += (totalSize - downloadedSize);
}
}
}
return allDownloadsSize;
}
示例7: JELOG2
// -----------------------------------------------------------------------------
// CPIMEventPropertyConverter::ConvertExceptionDatesL
// Inserts exceptiondates to a parser.
// -----------------------------------------------------------------------------
//
void CPIMEventPropertyConverter::ConvertExceptionDatesL(const CArrayFix<
TPIMDate>& aDates, CParserVCalEntity& aParser)
{
JELOG2(EPim);
TInt exDateCount = aDates.Count();
if (exDateCount > 0)
{
CArrayPtrFlat<TVersitDateTime>* versitExDates =
new(ELeave) CArrayPtrFlat<TVersitDateTime> (exDateCount);
CleanupStack::PushL(versitExDates);
CleanupResetAndDestroyPushL(*versitExDates);
for (TInt i = 0; i < exDateCount; i++)
{
TVersitDateTime
* versitDateTime =
new(ELeave) TVersitDateTime(aDates.At(i).DateTime(), TVersitDateTime::EIsUTC);
CleanupDeletePushL(versitDateTime);
versitExDates->AppendL(versitDateTime);
CleanupStack::Pop(versitDateTime); // versitDateTime
}
CParserPropertyValue* propertyValue =
new(ELeave) CParserPropertyValueMultiDateTime(versitExDates);
CleanupStack::Pop(2); // versitExDates is now owned by propertyValue
AddPropertyToParserL(propertyValue, KVersitTokenEXDATE(), aParser);
// Needed cleanup stack items are popped out in the AddPropretyToParserL
}
}
示例8: new
EXPORT_C void CX509Certificate::InternalizeL(RReadStream& aStream)
{
if (iIssuerName != NULL) //just to check cert is uninitialised
{
User::Leave(KErrArgument);
}
iKeyFactory = new(ELeave) TX509KeyFactory;
TInt len = aStream.ReadInt32L(); //Read the length of the streamed encoding
HBufC8* temp= HBufC8::NewLC(len);
TPtr8 ptr=temp->Des();
aStream.ReadL(ptr,len);
iEncoding=temp->AllocL();
CleanupStack::PopAndDestroy(); // temp
TASN1DecSequence encSeq;
TInt pos = 0;
CArrayPtrFlat<TASN1DecGeneric>* seq = encSeq.DecodeDERLC(*iEncoding, pos, 3, 3);
TASN1DecGeneric* encSigAlg = seq->At(1);
iSigningAlgorithm = CX509SigningAlgorithmIdentifier::NewL(encSigAlg->Encoding());
TASN1DecBitString encBS;
iSignature = encBS.ExtractOctetStringL(*(seq->At(2)));
CleanupStack::PopAndDestroy();//seq
CSHA1* hash = CSHA1::NewL();
CleanupStack::PushL(hash);
iFingerprint = hash->Final(Encoding()).AllocL();
CleanupStack::PopAndDestroy();//hash
ConstructCertL();
}
示例9: new
// -----------------------------------------------------------------------------
// CCMSAuthenticatedData::DecodeAttributesL
// Decodes an array of attributes
// -----------------------------------------------------------------------------
CArrayPtrFlat< CCMSAttribute >* CCMSAuthenticatedData::DecodeAttributesL(
TASN1DecGeneric* aAttributesDec ) // generic decoder for the sequence
{
TASN1DecSequence sequenceDecoder;
CArrayPtr< TASN1DecGeneric >* attributes =
sequenceDecoder.DecodeDERLC( *aAttributesDec );
TInt attributeCount = attributes->Count();
if( attributeCount < 1 )
{
User::Leave( KErrArgument );
}
CArrayPtrFlat< CCMSAttribute >* retVal =
new( ELeave ) CArrayPtrFlat< CCMSAttribute >( attributeCount );
CleanupStack::PushL( retVal );
for( TInt i = 0; i < attributeCount; i++ )
{
CCMSAttribute* attribute = CCMSAttribute::NewLC();
attribute->DecodeL( attributes->At( i )->Encoding() );
retVal->AppendL( attribute );
// attribute is left in cleanup stack, as retVal has not been pushed
// with ResetAndDestroyPushL
}
CleanupStack::Pop( attributeCount ); // all attributes
CleanupStack::Pop( retVal );
CleanupStack::PopAndDestroy( attributes );
return retVal;
}
示例10:
void CWapDgrmTestStep::_Parse2L(CArrayPtrFlat<CSmsMessage>& aSmsArray,
CWapReassemblyStore* aWapStore)
/**
* This method tests mainly CWapDatagram::DecodeConcatenatedMessagesL
*/
{
TInt Count = aSmsArray.Count();
// In reverse order
// Note ! You can test additional features by changing value of
// i or a global variable (insertSms). For example:
// incrementing i by 1: a duplicate test
// decrementing i by 1: not all datagrams are pushed to the store
// ncreasing insertSms causes datagrams to be appended to the reserve array
// Remember to set flush the reserve array on a later phase
// by setting iIsFlushReserveArray true
for (TInt i=Count-1;i>=iInsertSms;i--)
{
CWapDatagram* Wap=CWapDatagram::NewL(*(aSmsArray.At(i)));
if (!Wap->IsComplete())
{
TInt Index = 0;
TBool IsComplete = EFalse;
IsComplete = aWapStore->AddMessageL(Index,*Wap);
if (IsComplete)
{
aWapStore->GetDatagramL(Index,*Wap);
aWapStore->BeginTransactionLC();
aWapStore->DeleteEntryL(Index);
aWapStore->CommitTransactionL();
_Print(*Wap);
}
}
else
_Print(*Wap);
delete Wap;
}
// append rest of the datagrams to the ReserveArray
if (iInsertSms>0 && Count>1)
{
// reserve order here too
for (TInt i=iInsertSms-1;i>=0;i--)
{
CWapDatagram* Wap=CWapDatagram::NewL(*(aSmsArray.At(i)));
iReserveArray->AppendL(Wap);
}
}
if (iIsFlushReserveArray)
{
_FlushReserveArrayL(aWapStore);
iInsertSms = 0;
iIsFlushReserveArray = EFalse;
}
}
示例11: CleanupArray
void CleanupArray(TAny* aArray)
{
CArrayPtrFlat<MEikSrvNotifierBase2>* subjects =
static_cast<CArrayPtrFlat<MEikSrvNotifierBase2>*>(aArray);
subjects->ResetAndDestroy();
delete subjects;
}
示例12: __GSLOGSTRING
// -----------------------------------------------------------------------------
// CSIPSettListSIPProfSetTypeListItem::ResetAndDestroy
// For deleting array in case of leave
// -----------------------------------------------------------------------------
//
void CSIPSettListSIPProfSetTypeListItem::ResetAndDestroy( TAny* aPointerArray )
{
__GSLOGSTRING("CSIPSettListSIPProfSetTypeListItem::ResetAndDestroy" )
CArrayPtrFlat<CAknEnumeratedText>* array =
static_cast<CArrayPtrFlat<CAknEnumeratedText>*>( aPointerArray );
array->ResetAndDestroy();
delete array;
}
示例13: NotifierArray
EXPORT_C CArrayPtr<MNotifierBase2>* NotifierArray()
{
CArrayPtrFlat<MNotifierBase2>* subjects = new (ELeave) CArrayPtrFlat<MNotifierBase2>( 2 );
CIPSecDialogNotifier* notifier = new (ELeave) CIPSecDialogNotifier();
CleanupStack::PushL( notifier );
subjects->AppendL( notifier );
CleanupStack::Pop( notifier );
return subjects;
}
示例14: NotifierArray
// Entry point for Notifiers
EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
{
//The notifierArray function CAN leave, despite no trailing L
CArrayPtrFlat<MEikSrvNotifierBase2>* subjects = new (ELeave) CArrayPtrFlat<MEikSrvNotifierBase2>( 1 );
CleanupStack::PushL(subjects);
CCTSecurityDialogNotifier* notifier = CCTSecurityDialogNotifier::NewL();
CleanupStack::PushL( notifier );
subjects->AppendL( notifier );
CleanupStack::Pop( 2,subjects); //notifier, subjects
return subjects;
}
示例15: __ASSERT_DEBUG
// -----------------------------------------------------------------------------
// CHttpConnHandler::ConnectionError
// ?implementation_description
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CHttpConnHandler::ConnectionError( TInt aError )
{
__ASSERT_DEBUG( iClientApp, DMPanic( KErrCorrupt ) );
CArrayPtrFlat<CHttpDownload>* downloads =
iClientApp->Downloads();
for( TInt i = 0; i < downloads->Count(); ++i )
{
if( (*downloads)[i]->ConnHandler() == this )
{
(*downloads)[i]->ConnectionFailed( aError );
}
}
}