本文整理汇总了C++中TPckgBuf类的典型用法代码示例。如果您正苦于以下问题:C++ TPckgBuf类的具体用法?C++ TPckgBuf怎么用?C++ TPckgBuf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TPckgBuf类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: DBG_PRINT
// ---------------------------------------------------------------------------
// CNATFWTraversalAdapter::SaveL
//
// ---------------------------------------------------------------------------
//
void CNATFWTraversalAdapter::SaveL( TInt aIndex )
{
DBG_PRINT( "CNATFWTraversalAdapter::SaveL - begin" );
CWPNATFWItem* cNATFWItem = iDatas[aIndex];
const TInt iapItemCount( iDatas[aIndex]->IAPItems().Count() );
for ( TInt counter = 0; counter < iapItemCount; counter++ )
{
// Set access point ID to current IAP item (access point is always
// stored before NAT/FW settings).
CNATFWIAPSpecificItem* cIapItem = iDatas[aIndex]->IAPItems()[counter];
if ( cIapItem->NapDef() )
{
// Get WAP ID.
TPckgBuf<TUint32> uid;
uid.Copy( cIapItem->NapDef()->Data( 0 ) );
TUint32 wapId( uid() );
// Get corresponding IAP ID.
TUint32 iapId = IapIdFromWapIdL( wapId );
cIapItem->SetIAPId( iapId );
}// if
cIapItem = NULL;
}
cNATFWItem->StoreL();
cNATFWItem = NULL;
DBG_PRINT( "CNATFWTraversalAdapter::SaveL - end" );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:32,代码来源:natfwtraversaladapter.cpp
示例2: __ASSERT_ALWAYS
// -----------------------------------------------------------------------------
// CMceComAvSink::SetParameterL
// -----------------------------------------------------------------------------
//
TBool CMceComAvSink::SetParameterL(
const CMceComEndpoint& aClient,
TUint32 aParam,
const TDesC8& aValue )
{
// At the moment, only supported parameter is volume for speaker
//
if ( aClient.iType != KMceSpeakerSink || aParam != KMccSpeakerVolume )
{
return KMceSrvStreamDefaultSequence;
}
__ASSERT_ALWAYS( ServesProxyClient( aClient ), User::Leave( KErrNotFound ) );
__ASSERT_ALWAYS( aClient.MediaStream() && aClient.MediaStream()->Session(),
User::Leave( KErrNotFound ) );
CMceMediaManager& manager =
aClient.MediaStream()->Session()->SdpSession().Manager();
TPckgBuf<TInt> volBuf;
volBuf.Copy( aValue );
iVolume = volBuf();
if ( aClient.IsEnabled() )
{
manager.SetMccParameterL(
static_cast<const CMceComMediaSink&>( aClient ), aParam, aValue );
}
return KMceSrvStreamAlternativeSequence;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:37,代码来源:mcecomavsink.cpp
示例3: TestDeleteStoreOperationL
LOCAL_C void TestDeleteStoreOperationL()
{
CMsgsTestUtils::SetDriveL(EDriveC);
CSessionObserver* ob = new(ELeave)CSessionObserver;
CleanupStack::PushL(ob);
// Set session in observer
CMsvSession* session = CMsvSession::OpenAsyncL(*ob);
ob->iSession = session;
CleanupStack::PushL(session);
CActiveScheduler::Start();
test(ob->iType==MMsvSessionObserver::EMsvServerReady);
CTestActive* active = new(ELeave)CTestActive;
CleanupStack::PushL(active);
// Test Delete MailStore
active->StartL();
CMsvOperation* operation = NULL;
TDriveUnit unit =(EDriveD);
operation = session->DeleteStoreL(unit, active->iStatus);
test(operation->Mtm() == KUidMsvServerMtm);
CleanupStack::PushL(operation);
CActiveScheduler::Start();
//Retrieve progress
TPckgBuf<TMsvCopyProgress> package;
package.Copy(operation->ProgressL());
test((package().iError == KErrNone) || (package().iError == KErrPathNotFound)) ;
CleanupStack::PopAndDestroy(4);
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:35,代码来源:T_MAILSTORE.CPP
示例4: HandleRequestForEventL
// -----------------------------------------------------------------------------
// CPosLmEventHandler::HandleRequestForEventL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CPosLmEventHandler::HandleRequestForEventL(
const RMessagePtr2& aMessage)
{
TPckgBuf<TPosLmEvent> event;
TInt desMaxLength = aMessage.GetDesMaxLength(KPosLmServerEventArg);
if (desMaxLength != event.Length())
{
PanicClient(aMessage, EPosUnableToReadOrWriteDataToClient);
return;
}
if (iEventQueue.Count() > 0)
{
// Send the first event in the queue to the client.
WriteEventAndComplete(aMessage, iEventQueue[0]);
iEventQueue.Remove(0);
}
else
{
// No events in queue. Put the message on hold.
if (!iHoldingMessage.IsNull())
{
PanicClient(aMessage,
EPosEventNotifierAlreadyHasOutstandingRequest);
}
else
{
iHoldingMessage = aMessage;
}
}
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:37,代码来源:EPos_CPosLmEventHandler.cpp
示例5: HandleRequestForEventL
// -----------------------------------------------------------------------------
// CPosLmDbManEventHandler::HandleRequestForEventL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CPosLmDbManEventHandler::HandleRequestForEventL(
const RMessagePtr2& aMessage)
{
// check that descriptor parameters are OK so that server
// won't panic when trying to write.
TPckgBuf<TPosLmDatabaseEvent> event;
TPckgBuf<TInt> length;
TInt eventMaxLength = aMessage.GetDesMaxLength(KPosLmServerDbManEventArg);
TInt lengthMaxLength = aMessage.GetDesMaxLength(KPosLmServerUriLengthArg);
if (eventMaxLength != event.Length() ||
lengthMaxLength != length.Length())
{
PanicClient(aMessage, EPosUnableToReadOrWriteDataToClient);
return;
}
if (iEventQueue.Count() > 0)
{
// Send the first event in the queue to the client.
WriteEventAndComplete(aMessage);
}
else
{
// No events in queue. Put the message on hold.
if (!iHoldingMessage.IsNull())
{
PanicClient(aMessage,
EPosEventNotifierAlreadyHasOutstandingRequest);
}
else
{
iHoldingMessage = aMessage;
}
}
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:41,代码来源:EPos_CPosLmDbManEventHandler.cpp
示例6: HandleGetArtistResponse
/**
Extracts the artist from the 'get artist' response data and calls
the relevant mixin function on the observer.
@param The data passed with the response.
*/
void CRemConTrackInfoController::HandleGetArtistResponse(TInt aError, const TDesC8& aData)
{
LOG_FUNC
TPckgBuf<TName> buf;
buf.Copy((aData.Mid(KRemConExtApi1ResultDataLength)));
iObserver.MrcticoGetArtistResponse(aError, buf());
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:14,代码来源:trackinfocontroller.cpp
示例7: _DBG_FILE
// -----------------------------------------------------------------------------
// CNSmlDsProvisioningAdapter::DeleteL
// -----------------------------------------------------------------------------
void CNSmlDsProvisioningAdapter::DeleteL( const TDesC8& aSaveData)
{
_DBG_FILE("CNSmlDsProvisioningAdapter::DeleteL(): begin");
TPckgBuf<TInt> uid;
uid.Copy( aSaveData );
iSession.DeleteProfileL( uid() );
_DBG_FILE("CNSmlDsProvisioningAdapter::DeleteL(): end");
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:11,代码来源:NSmlDsProvisioningAdapter.cpp
示例8: __ASSERT_DEBUG
CMsvOperation* CTextMtmClient::ForwardL(TMsvId aForwardEntryId, TMsvPartList aPartList,
TRequestStatus& aCompletionStatus)
// Create forwarded message
// Destination folder is aForwardEntryL
//
{
__ASSERT_DEBUG(iMsvEntry!=NULL,gPanic(ETxtcNoCMsvEntrySet));
__ASSERT_DEBUG(iMsvEntry->Entry().iType.iUid == KUidMsvMessageEntryValue, gPanic(ETxtcEntryTypeNotSupported));
__ASSERT_DEBUG(iMsvEntry->Entry().iServiceId == KMsvLocalServiceIndexEntryId, gPanic(ETxtcInvalidServiceId));
// Create the forwarded index entry
TMsvEntry forwardEntry;
forwardEntry.iMtm = KUidMsgTypeText;
forwardEntry.iServiceId = Entry().Entry().iServiceId;
forwardEntry.iType = KUidMsvMessageEntry;
forwardEntry.iDetails.Set(iMsvEntry->Entry().iDetails);
forwardEntry.iSize = iMsvEntry->Entry().iSize;
if(aPartList&KMsvMessagePartDate)
forwardEntry.iDate.HomeTime();
if(aPartList&KMsvMessagePartDescription)
forwardEntry.iDescription.Set(iMsvEntry->Entry().iDescription);
// Get CMsvEntry for destination (parent)
CMsvEntry* cEntry = CMsvEntry::NewL(Session(), aForwardEntryId, TMsvSelectionOrdering());
CleanupStack::PushL(cEntry);
// Synchronously create new child
CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC();
CMsvOperation* opert = cEntry->CreateL(forwardEntry, wait->iStatus);
CleanupStack::PushL(opert);
wait->Start();
User::LeaveIfError(opert->iStatus.Int());
// Check result
TPckgBuf<TMsvLocalOperationProgress> progressPack;
progressPack.Copy(opert->ProgressL());
TMsvLocalOperationProgress progress = progressPack();
User::LeaveIfError(progress.iError);
CleanupStack::PopAndDestroy(2); // opert, wait
// Get CMsvEntry for new entry
TMsvId forwardId=progress.iId;
cEntry->SetEntryL(forwardId);
// Populate new forwarded message with Body text
if(aPartList&KMsvMessagePartBody)
{
CMsvStore* store=cEntry->EditStoreL();
CleanupStack::PushL(store);
StoreBodyL(*store); // Current context is original message
store->CommitL();
CleanupStack::PopAndDestroy(); // store
}
CleanupStack::PopAndDestroy(); // cEntry
// Request was performed synchronously, so return a completed operation object
return CMsvCompletedOperation::NewL(Session(), KUidMsgTypeText, progressPack,
KMsvNullIndexEntryId, aCompletionStatus);
}
开发者ID:huellif,项目名称:symbian-example,代码行数:58,代码来源:TXCLIENT.CPP
示例9: HandleGetTrackDurationResponse
/**
Extracts the track duration from the 'get track duration' response data and calls
the relevant mixin function on the observer.
@param The data passed with the response.
*/
void CRemConTrackInfoController::HandleGetTrackDurationResponse(TInt aError, const TDesC8& aData)
{
LOG_FUNC
TPckgBuf<TInt64> buf;
buf.Copy((aData.Mid(KRemConExtApi1ResultDataLength)));
TTime duration(buf());
iObserver.MrcticoGetTrackDurationResponse(aError, duration);
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:15,代码来源:trackinfocontroller.cpp
示例10: MCC_ENDPOINT_ID
// -----------------------------------------------------------------------------
// CMccFileSource::ConstructSourceL
// -----------------------------------------------------------------------------
//
void CMccFileSource::ConstructSourceL( const TDesC8& aInitData )
{
iSourceImpl = CMccFileSourceImpl::NewL(
MCC_ENDPOINT_ID( static_cast<MDataSource*>( this ) ) );
TPckgBuf<TFileName> initData;
initData.Copy( aInitData );
OpenFileL( initData() );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:14,代码来源:mccfilesource.cpp
示例11: sizeof
void CProtocolExadump::DoOpen(TInt aSnaplen)
/**
* Try opening the dump file.
*
* Opens the dump file and writes the file header to it.
*
* @param aSnaplen The snap length
*/
{
/** @code */
// Just close the previous, if called with open file.
if (iOpen > 0)
{
iDumpFile.Close();
iFS.Close();
}
// Allocate a working buffer for the packet frames
// (include packet header and snaplen).
delete iBuffer;
iBuffer = HBufC8::NewMax(aSnaplen + sizeof(struct pcap_file_header));
if (iBuffer == NULL)
{
iOpen = KErrNoMemory;
return;
}
_LIT(KDumpFile, "exedump.dat"); // the name of the dump file.
iOpen = iFS.Connect();
if (iOpen != KErrNone)
return;
iOpen = iDumpFile.Replace(iFS, KDumpFile, EFileWrite);
if (iOpen != KErrNone)
{
iFS.Close();
return;
}
// Write the header
TPckgBuf<struct pcap_file_header> hdr;
hdr().magic = TCPDUMP_MAGIC;
hdr().version_major = PCAP_VERSION_MAJOR;
hdr().version_minor = PCAP_VERSION_MINOR;
hdr().thiszone = 0;
hdr().snaplen = aSnaplen;
hdr().sigfigs = 0;
hdr().linktype = DLT_RAW;
iDumpFile.Write(hdr, hdr.Length());
iOpen = 1;
return;
/** @endcode */
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:55,代码来源:exadump.cpp
示例12: err
// ---------------------------------------------------------------------------
// CSensorDataCompensatorAxisDataHandler::Update
// ---------------------------------------------------------------------------
//
TInt CSensorDataCompensatorAxisDataHandler::Update()
{
FUNC_LOG;
TInt err( KErrNone );
TInt count = iPlugin.GetCompensationItemCount();
INFO_1( "Axis compensation item count %d", count );
iMatrix.SetIdentity(); // Reset compensation
if ( count >= 0 )
{
// Calculate final compensation angles and create compensation matrix
TPckgBuf<TCompensationTypeAxisData> pckg;
TInt x( 0 );
TInt y( 0 );
TInt z( 0 );
TSensorDataCompensatorMatrix m;
TSensorDataCompensatorMatrix m2;
for ( TInt i( 0 ) ; i < count; i++ )
{
TPtrC8 data( iPlugin.GetCompensationItem( i ) );
if ( data.Size() == pckg.MaxSize() )
{
pckg.Copy( data );
x = pckg().iAxisX;
y = pckg().iAxisY;
z = pckg().iAxisZ;
}
else
{
err = KErrCorrupt;
break;
}
m.SetRotateX( x );
m2.SetRotateY( y );
m *= m2; // xy
m2.SetRotateZ( z );
m *= m2; // xy * z
iMatrix *= m;
}
if ( err != KErrNone )
{
iMatrix.SetIdentity();
}
}
else
{
// Error occured in plugin
err = count;
}
iCompensate = ( count > 0 ) && ( err == KErrNone ); // Ready to compensate
ERROR( err, "Axis update error" );
return err;
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:57,代码来源:sensordatacompensatoraxisdatahandler.cpp
示例13: __ASSERT_DEBUG
void CWin32Socket::Accept(TWin32Message& aMessage)
{
__ASSERT_DEBUG(iAcceptMessage == NULL, Panic(EWinSockPrtCWin32SocketMultipleAcceptRequests));
__ASSERT_DEBUG(iBlankAcceptSocket == NULL, Panic(EWinSockPrtCWin32SocketAcceptBlankSocketNotNull));
iAcceptMessage = &aMessage;
WSP_LOG(WspLog::Printf(_L("CWin32Socket::Accept: this: 0x%x"), this));
if (WSAEventSelect(iSocket, iEvent, FD_ACCEPT) == SOCKET_ERROR)
{
Complete(iAcceptMessage, MapWinSockError(WSAGetLastError()));
}
TPckgBuf<TInt> newSocketHandleBuf;
newSocketHandleBuf.Copy(iAcceptMessage->ReadBuffer());
iBlankAcceptSocket = (CWin32Socket*)newSocketHandleBuf();
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:14,代码来源:wsp_socket.cpp
示例14: queueSizeBuf
void CWin32Socket::Listen(TWin32Message& aMessage)
{
TPckgBuf<TUint> queueSizeBuf;
queueSizeBuf.Copy(aMessage.ReadBuffer());
TUint& queueSize = queueSizeBuf();
if (listen(iSocket, queueSize))
{
aMessage.Complete(MapWinSockError(WSAGetLastError()));
}
else
{
aMessage.Complete(KErrNone);
}
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:14,代码来源:wsp_socket.cpp
示例15: CleanupClosePushL
// -----------------------------------------------------------------------------
// CResultCollector::VisitL
// -----------------------------------------------------------------------------
//
void CResultCollector::VisitL( CNSPTest& aTest )
{
CBufFlat* buffer = CBufFlat::NewL( 300 );
CleanupStack::PushL( buffer );
RBufWriteStream stream;
stream.Open( *buffer );
CleanupClosePushL( stream );
aTest.ExternalizeL( stream );
TPckgBuf<TResult> pkgIn;
pkgIn.Copy( buffer->Ptr(0) );
PrintResult( pkgIn() );
CleanupStack::PopAndDestroy();
CleanupStack::PopAndDestroy( buffer );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:20,代码来源:nspresultcollector.cpp
示例16: paramPack
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
//
TInt CIpsPlgPop3ConnectOp::GetOperationErrorCodeL( )
{
FUNC_LOG;
if ( !iSubOperation )
{
return KErrNotFound;
}
if ( !iSubOperation->IsActive() && iSubOperation->iStatus.Int() != KErrNone )
{
return iSubOperation->iStatus.Int();
}
TPckgBuf<TPop3Progress> paramPack;
paramPack.Copy( iSubOperation->ProgressL() );
const TPop3Progress& progress = paramPack();
return progress.iErrorCode;
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:21,代码来源:ipsplgpop3connectop.cpp
示例17: sizeof
EXPORT_C CMemSpyApiHeap* RMemSpySession::GetHeapL()
{
CMemSpyApiHeap* aHeap;
HBufC8* buffer = HBufC8::NewLC( sizeof(TMemSpyHeapData) );
TPtr8 bufferPtr(buffer->Des());
TIpcArgs args( &bufferPtr );
User::LeaveIfError(SendReceive( EMemSpyClientServerOpGetHeap, args ));
TPckgBuf<TMemSpyHeapData> data;
data.Copy(bufferPtr.Ptr(), sizeof(TMemSpyHeapData));
aHeap = CMemSpyApiHeap::NewL( data() );
CleanupStack::PopAndDestroy(buffer);
return aHeap;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:18,代码来源:memspysession.cpp
示例18: TestStoreExistsL
LOCAL_C void TestStoreExistsL()
{
CMsgsTestUtils::SetDriveL(EDriveC);
//Check that message store exists on the drive at this stage
CSessionObserver* ob = new(ELeave)CSessionObserver;
CleanupStack::PushL(ob);
// Set session in observer
CMsvSession* session = CMsvSession::OpenAsyncL(*ob);
ob->iSession = session;
CleanupStack::PushL(session);
CActiveScheduler::Start();
test(ob->iType==MMsvSessionObserver::EMsvServerReady);
CTestActive* active = new(ELeave)CTestActive;
CleanupStack::PushL(active);
// Test Copy MailStore
active->StartL();
CMsvOperation* operation = NULL;
TDriveUnit unit = EDriveD;
operation = session->CopyStoreL(unit, active->iStatus);
test(operation->Mtm() == KUidMsvServerMtm);
CleanupStack::PushL(operation);
CActiveScheduler::Start();
//Retrieve progress
//Should retrun KErrAlreadyExists
TPckgBuf<TMsvCopyProgress> package;
package.Copy(operation->ProgressL());
test(package().iError == KErrAlreadyExists);
//delete session;
CleanupStack::PopAndDestroy(4, ob);
CMsgsTestUtils::WaitForServerClose();
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:41,代码来源:T_MAILSTORE.CPP
示例19: id
EXPORT_C void RMemSpySession::GetThreadInfoItemsL( RArray<CMemSpyApiThreadInfoItem*> &aInfoItems, TThreadId aId, TMemSpyThreadInfoItemType aType )
{
TPckgBuf<TThreadId> id( aId );
TPckgBuf<TMemSpyThreadInfoItemType> type( aType );
TPckgBuf<TInt> count;
TInt error = SendReceive( EMemSpyClientServerOpGetThreadInfoItemsCount, TIpcArgs( &id, &type, &count ) );
TInt itemCount = count();
if( error == KErrNone )
{
if( itemCount == 0 )
{
aInfoItems.Reset();
}
else
{
HBufC8* buffer = HBufC8::NewLC( itemCount * sizeof(TMemSpyThreadInfoItemData) );
TPtr8 bufferPtr(buffer->Des());
TPckgBuf<TInt> requestedCount( itemCount );
TIpcArgs args( &requestedCount, &id, &type, &bufferPtr );
TInt error = SendReceive( EMemSpyClientServerOpGetThreadInfoItems, args ); // TODO check error
aInfoItems.Reset();
for(TInt i=0, offset = 0; i < itemCount; i++, offset+=sizeof(TMemSpyThreadInfoItemData))
{
TPckgBuf<TMemSpyThreadInfoItemData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyThreadInfoItemData));
aInfoItems.AppendL(CMemSpyApiThreadInfoItem::NewLC(data()));
}
CleanupStack::Pop(aInfoItems.Count());
CleanupStack::PopAndDestroy(buffer);
}
}
User::LeaveIfError(error);
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:41,代码来源:memspysession.cpp
示例20: param
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
//
TInt CIpsSosAOImapPopLogic::QueryMailboxStatus( TDesC8& aParameter )
{
FUNC_LOG;
TPckgBuf<RMessage2> param;
param.Copy( aParameter );
// get ipc message from param
RMessage2 msg = param();
TPckgBuf<TMsvId> mboxBuf;
msg.Read(0, mboxBuf);
TMsvId mbox = mboxBuf();
TInt error = KErrNone;
TInt index = GetMailboxLogicIndex( mbox );
if ( index != KErrNotFound )
{
TInt state = iMailboxLogics[index]->GetCurrentState(); // faulty CS warning
if ( state == CIpsSosAOMBoxLogic::EStateSyncOngoing
|| state == CIpsSosAOMBoxLogic::EStateFetchOngoing )
{
TPckgBuf<TInt> event( EIpsAOPluginStatusSyncStarted );
msg.Write(1, event );
}
else
{
TPckgBuf<TInt> event( EIpsAOPluginStatusSyncCompleted );
msg.Write(1, event );
}
}
else
{
error = KErrNotFound;
}
return error;
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:43,代码来源:IpsSosAOImapPopLogic.cpp
注:本文中的TPckgBuf类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论