// -------------------------------------------------------------------------- // CUPnPAudioPolicy::InitializeComplete // from MDevSoundObserver // -------------------------------------------------------------------------- // void CUPnPAudioPolicy::InitializeComplete( TInt aError ) { __LOG1( "CUPnPAudioPolicy::InitializeComplete(%d)", aError ); __LOG1( "CUPnPAudioPolicy::InitializeCompl in state(%d)", TInt(iAudioPolicyState) ); if( aError == KErrNone && iAudioPolicyState != EStatePlaying ) { __LOG( "CUPnPAudioPolicy: priority settings" ); TMMFPrioritySettings mmfPrioSettings; mmfPrioSettings.iPriority = KAudioPriorityUPnPRemotePlayback; mmfPrioSettings.iPref = (TMdaPriorityPreference)KAudioPrefUPnPPlayback; mmfPrioSettings.iState = EMMFStatePlaying; iDevSound->SetPrioritySettings(mmfPrioSettings); __LOG( "CUPnPAudioPolicy::InitializeComple calling PlayInitL.." ); TRAPD( err, iDevSound->PlayInitL() ); if( err == KErrNone ) { iAudioPolicyState = EStatePlaying; } else { __LOG1( "CUPnPAudioPolicy: PlayInitL err:(%d)", err ); } __LOG( "CUPnPAudioPolicy::InitializeComplete - end" ); } }
// --------------------------------------------------------------------------- // CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL() // // // --------------------------------------------------------------------------- void CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL( TBool /*aPartial*/ ) { __LOG1("CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL() - START - iCurrentJavaState: %d", iCurrentJavaState ); switch( iCurrentJavaState ) { case EJavaStateIdle: __LOG("CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL() - EJavaStateIdle"); RestoreMidletL(); break; case EJavaStateMidlet: __LOG("CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL() - EJavaStateMidlet"); RestoreMidletDataL(); break; case EJavaStateMidletData: __LOG("CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL() - EJavaStateMidletData"); iCurrentJavaState = EJavaStateIdle; CompleteSelf(); break; default: break; } __LOG2("CMMCScBkupStateArchiveOpJavaData::PerformAsynchronousStateStepRestoreL() - END - iCurrentJavaState: %d, IsActive: %d", iCurrentJavaState, IsActive() ); }
// -------------------------------------------------------------------------- // CUPnPXMLParserLite::ParseResultDataL // See upnpxmlparser.h // -------------------------------------------------------------------------- EXPORT_C void CUPnPXMLParserLite::ParseResultDataL( RPointerArray<CUpnpObjectLite>& aResultArray, const TDesC8& aData, const TDesC& aFormatString ) { __LOG( "CUPnPXMLParserLite::ParseResultDataL, begin" ); delete iFormatString; iFormatString = NULL; if( aFormatString != KNullDesC ) { iFormatString = aFormatString.AllocL(); } if ( !aData.Length() ) { User::Leave( KErrArgument ); } iResultRoot = &aResultArray; // Create parser CMatchData* matchData = CMatchData::NewLC(); matchData->SetMimeTypeL( KXmlMimeType ); matchData->SetVariantL( KLIB2XML ); CParser* parser = CParser::NewLC( *matchData, *this ); parser->EnableFeature( Xml::EReportNamespaceMapping ); Xml::ParseL( *parser, aData ); CleanupStack::PopAndDestroy( parser ); CleanupStack::PopAndDestroy( matchData ); iResultRoot = NULL; __LOG( "CUPnPXMLParserLite::ParseResultDataL, end" ); }
// -------------------------------------------------------------------------- // CUPnPLocalPlayer::~CUPnPLocalPlayer // Destructor. // -------------------------------------------------------------------------- // CUPnPLocalPlayer::~CUPnPLocalPlayer() { __LOG( "CUPnPLocalPlayer::~CUPnPLocalPlayer" ); // If download session is running, stop it if( iAVController && iDownloadSession ) { iAVController->StopDownloadSession( *iDownloadSession ); } delete iDocumentHandler; delete iWaitNoteDialog; delete iItem; if( iFilePath ) { iFs.Delete( *iFilePath ); delete iFilePath; } iFs.Close(); __LOG( "CUPnPLocalPlayer::~CUPnPLocalPlayer-END" ); }
void TickerTask::delay(uint32_t delay){ __LOG("delay task "); __LOG(name); __LOG(" for "); __LOGLN(delay); long unow = TickerSchedlr::getTickTime(); _last_time = unow; _next_time = unow + delay; _updated = true; // indicate we already updated the scheduling properties };
// -------------------------------------------------------------------------- // CUPnPXMLParserLite::OnContentL // See upnpxmlparser.h // -------------------------------------------------------------------------- void CUPnPXMLParserLite::OnContentL( const TDesC8& aBytes, TInt aErrorCode ) { __LOG( "CUPnPXMLParserLite::OnContentL(), begin" ); if ( !iStack->Count() || aErrorCode != KErrNone ) { return; } if( iTitle || iObjectClass ) // We are only interested in title or // object class! { if( !iElementValue ) //if 1st time { iElementValue = HBufC8::NewL(aBytes.Length()); iElementValue->Des().Copy(aBytes); } else { HBufC8* previousValue = iElementValue; iElementValue = HBufC8::NewL( previousValue->Des().Length() + aBytes.Length() ); iElementValue->Des().Append( *previousValue ); iElementValue->Des().Append( aBytes ); delete previousValue; } } __LOG( "CUPnPXMLParserLite::OnContentL(), end" ); }
// -------------------------------------------------------------------------- // CUPnPXMLParserLite::SetAttributesL // See upnpxmlparser.h // -------------------------------------------------------------------------- void CUPnPXMLParserLite::SetAttributesL( CUpnpObjectLite& aObject, const RAttributeArray& aAttributes ) { __LOG( "CUPnPXMLParserLite::SetAttributesL" ); if ( iStack->Count() ) { // Object has a parent. // Should not really happen __LOG( "Object has a parent!" ); __PANICD(__FILE__, __LINE__); } RAttribute attribute; TInt count = aAttributes.Count(); for ( TInt i = 0 ; i < count; i++ ) // Read attributes. { attribute = aAttributes[ i ]; const TDesC8& name = attribute.Attribute().LocalName().DesC(); if( !name.CompareF( KId ) ) { aObject.SetObjectIdL( attribute.Value().DesC() ); } } __LOG( "CUPnPXMLParserLite::SetAttributesL - End" ); }
void CWspCOTransaction::MethodInvokeDataCnf() { __ASSERT_DEBUG( iMethodState == ERequesting, Panic(KWspPanicBadMethodState) ); __LOG1(_L("Trans %d - Received S-MethodInvokeData.cnf"), Transaction().Id()); __LOG1(_L("---More Data flag : %d."), iMoreRequestData); // Inform the Tx data object that cnf has been received. STATIC_CAST(CWspCOTxData*, iTxData)->ReceivedCnf(); // Is the requst complete? Stay in requesting if not. if( !iMoreRequestData ) { // The request is complete - all the request body data has been received // and, as iMoreRequestData is cleared, all the headers and body data // have been sent. Can delete the Tx data object. ResetTxData(); // WSP method transaction is waiting - update state iMethodState = EWaiting; __LOG(_L("---Method in Waiting state")); } #if defined (_DEBUG) && defined (_LOGGING) else __LOG(_L("---Method in Requesting state")); #endif }
static void flash_op_complete(flash_op_type_t type, void* p_context) { bl_cmd_t end_cmd; switch (type) { case FLASH_OP_TYPE_WRITE: end_cmd.type = BL_CMD_TYPE_FLASH_WRITE_COMPLETE; end_cmd.params.flash.write.p_data = p_context; __LOG("Write complete (0x%x)\n", p_context); break; case FLASH_OP_TYPE_ERASE: end_cmd.type = BL_CMD_TYPE_FLASH_ERASE_COMPLETE; end_cmd.params.flash.erase.p_dest = p_context; __LOG("Erase complete (0x%x)\n", p_context); break; case FLASH_OP_TYPE_ALL: end_cmd.type = BL_CMD_TYPE_FLASH_ALL_COMPLETE; __LOG("Flash idle.\n"); break; default: APP_ERROR_CHECK(NRF_ERROR_INVALID_PARAM); } dfu_cmd_send(&end_cmd); /* don't care about the return code */ }
int main(void) { gpio_init(); uart_init(); timers_init(); __LOG("Timers initialized."); ble_stack_init(); //device_manager_init(erase_bonds); gap_params_init(); services_init(); advertising_init(); __LOG("Radio initialized."); conn_params_init(); storage_init(); contacts_init(); __LOG("Application modules initialized"); // Start execution. timers_start(); advertising_start(); __LOG("ADV Started"); scan_start(); __LOG("Scan Started"); // Enter main loop. for (;;) { power_manage(); } }
// -------------------------------------------------------------------------- // CUPnPFileTransferSessionBase::Complete // See upnpdownloadsession.h // -------------------------------------------------------------------------- void CUPnPFileTransferSessionBase::Complete( const TUpnpFileTransferEvent& aEvent ) { __LOG( "CUPnPFileTransferSessionBase::Complete" ); if( iEventMsg ) { __LOG( "Complete" ); __LOG1( "iEvent = %d", aEvent.iEvent ); __LOG1( "iKey = %d", aEvent.iKey ); __LOG1( "iStatus = %d", aEvent.iStatus ); TPckg<TUpnpFileTransferEvent> resp1( aEvent ); iEventMsg->Write( 1, resp1 ); // Write response using slot 1 iEventMsg->Complete( KErrNone ); delete iEventMsg; iEventMsg = NULL; } else { __LOG( "Complete - Add to queu" ); __LOG1( "iEvent = %d", aEvent.iEvent ); __LOG1( "iKey = %d", aEvent.iKey ); __LOG1( "iStatus = %d", aEvent.iStatus ); iEventQueu.AppendL( aEvent ); } }
void bootloader_enable(void) { #ifdef RBC_MESH_SERIAL mesh_aci_start(); #endif bl_cmd_t enable_cmd; enable_cmd.type = BL_CMD_TYPE_ENABLE; bl_cmd_handler(&enable_cmd); transport_start(); /* Recover from broken state */ if (dfu_mesh_app_is_valid()) { set_timeout(TIMER_YIELD_TIMEOUT, TIMEOUT_ACTION_GO_TO_APP); } else { #ifdef RTT_LOG __LOG(RTT_CTRL_TEXT_RED "APP is invalid.\n"); bl_info_flags_t* p_flags = &bootloader_info_entry_get(BL_INFO_TYPE_FLAGS)->flags; bl_info_segment_t* p_seg = &bootloader_info_entry_get(BL_INFO_TYPE_SEGMENT_APP)->segment; __LOG("\tINTACT: SD: %d APP: %d BL: %d\n", p_flags->sd_intact, p_flags->app_intact, p_flags->bl_intact); if (*((uint32_t*) p_seg->start) == 0xFFFFFFFF) { __LOG("\tNo application at 0x%x\n", p_seg->start); } #endif /* update the bootloader if a bank is available */ if (dfu_bank_flash(DFU_TYPE_BOOTLOADER) == NRF_SUCCESS) { return; } dfu_type_t missing = dfu_mesh_missing_type_get(); if (missing != DFU_TYPE_NONE && dfu_bank_flash(missing) == NRF_ERROR_NOT_FOUND) { fwid_union_t req_fwid; bl_info_entry_t* p_fwid_entry = bootloader_info_entry_get(BL_INFO_TYPE_VERSION); APP_ERROR_CHECK_BOOL(p_fwid_entry != NULL); switch (missing) { case DFU_TYPE_SD: req_fwid.sd = p_fwid_entry->version.sd; break; case DFU_TYPE_APP: req_fwid.app = p_fwid_entry->version.app; break; default: APP_ERROR_CHECK(NRF_ERROR_INVALID_DATA); } dfu_mesh_req(missing, &req_fwid, (uint32_t*) 0xFFFFFFFF); } } }
void CWspCOTransaction::MethodResultInd( TInt aStatus, const TDesC8& aResponseHeaders, MHTTPDataSupplier& aResponseBody, TBool aMoreData ) { __ASSERT_DEBUG( iMethodState == EWaiting, Panic(KWspPanicBadMethodState) ); __LOG1(_L("Trans %d - Received S-MethodResult.ind"), Transaction().Id()); __LOG1(_L("---More Data flag : %d."), aMoreData); // Are there more S-MethodResultData primitives to follow? if( aMoreData ) { // WSP method transaction is in Waiting2 state - update state iMethodState = EWaiting2; __LOG(_L("---Method in Waiting2 state")); } else { // WSP method transaction is in Completing state - update state iMethodState = ECompleting; __LOG(_L("---Method in Completing state")); } // Decode response status code from WSP binary representation TInt httpStatus = 0; if ((aStatus >= 0x10) && (aStatus <= 0x65)) { // Calculate this status code in decimal httpStatus = 100*(aStatus/0x10); if (httpStatus == 500) httpStatus = 416; if (httpStatus == 600) httpStatus = 500; httpStatus += aStatus & 0xf; } // Set the response status iTrans.Response().SetStatusCode(httpStatus); // Process the response header and body data. TRAPD(error, ProcessResponseDataL(aResponseHeaders, aResponseBody, aMoreData)); // Check everything went ok if( error != KErrNone ) { // Ok the S-MethodResult primitive was not dealt with correctly - abort // the method iPrimitiveSender->InitiateSend(ESMethodAbort); __LOG1(_L("---Could not deal with S-MethodResult.ind primitive. Error : %d"), error); __LOG( _L("---Aborting the method.")); } }
// --------------------------------------------------------------------------- // ImplementationGroupProxy // // Gate/factory function // --------------------------------------------------------------------------- // EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) { __LOG( "CUPnPGSPluginView::ImplementationGroupProxy" ); aTableCount = sizeof( KUPnPGSPluginImplementationTable ) / sizeof( TImplementationProxy ); __LOG( "CUPnPGSPluginView::ImplementationGroupProxy-end" ); return KUPnPGSPluginImplementationTable; }
void TickerTask::replaceDelayed(task_fp f, void *t_arg, uint32_t delay){ __LOG("replace task "); __LOG(name); __LOG(" and delay for "); __LOGLN(delay); // continue next time with new callback function uint32_t unow = TickerSchedlr::getTickTime() + delay; _last_time = unow; _next_time = unow + delay; Callback = f; task_arg = t_arg; this->_updated = true; // indicate we already updated the scheduling properties };
// -------------------------------------------------------------------------- // CUPnPLocalPlayer::ConstructL // Symbian 2nd phase constructor can leave. // -------------------------------------------------------------------------- // void CUPnPLocalPlayer::ConstructL() { __LOG( "CUPnPLocalPlayer::ConstructL" ); iDocumentHandler = CDocumentHandler::NewL(); iDocumentHandler->SetExitObserver( this ); User::LeaveIfError( iFs.Connect() ); iDownloadSession = &iAVController->StartDownloadSessionL( iBrowseSession->Device() ); __LOG( "CUPnPLocalPlayer::ConstructL-END" ); }
// -------------------------------------------------------------------------- // CUPnPLocalPlayer::CUPnPLocalPlayer // C++ default constructor can NOT contain any code, that // might leave. // -------------------------------------------------------------------------- // CUPnPLocalPlayer::CUPnPLocalPlayer( MUPnPAVController& aAVController, MUPnPAVBrowsingSession& aBrowseSession, CUPnPCommonUI& aCommonUI ): iCommonUI(aCommonUI) { __LOG( "CUPnPLocalPlayer::CUPnPLocalPlayer" ); iAVController = &aAVController; iExitReason = KErrNone; iBrowseSession = &aBrowseSession; __LOG( "CUPnPLocalPlayer::CUPnPLocalPlayer-END" ); }
// --------------------------------------------------------------------------- // CMMCScBkupReadDataTransferRequestBase::ReadChunkL() // // // --------------------------------------------------------------------------- void CMMCScBkupReadDataTransferRequestBase::ReadChunkL( TDes8& aSink, TInt aLength ) { const TInt endOffset = CurrentReadInfo().EndOffset(); __LOG4("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - START - aLength: %d, endOffset: %d, iCurrentOffset: %d, sinkLength: %d", aLength, endOffset, iCurrentOffset, aSink.Length()); // if ( iCurrentOffset >= 0 && iCurrentOffset <= endOffset ) { if ( aLength > 0 ) { MMMCScBkupArchiveDataInterface& archiveDataInterface = Driver().DrvADI(); // We read based upon the current offset and the specified length TPtr8 sink( iTemporaryTransferSink->Des() ); const TMMCScBkupArchiveVector readRequest( iCurrentOffset, aLength ); const TMMCScBkupArchiveVector& readResult = archiveDataInterface.ADIReadL( sink, readRequest ); __LOG2("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - read result - offset: %d, length: %d", readResult.Offset(), readResult.Length()); // Update offset iCurrentOffset += readResult.Length(); aSink.Append( sink ); __LOG2("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - new offset (iCurrentOffset): %d, sink Length: %d", iCurrentOffset, aSink.Length()); #ifdef DEBUGGING_DATA_TRANSFER TRAP_IGNORE( DumpTransferDataL( archiveDataInterface.ADIFsSession(), sink) ); #endif if ( iCurrentOffset > CurrentReadInfo().EndOffset() ) { __LOG("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - Fatal Error - read went beyond archive entry boundary!"); ASSERT( EFalse ); User::Leave( KErrCorrupt ); } else { __LOG("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - read was okay - updating stats & reporting progress..."); // We managed to read the data okay, so let's update our stats DataTransferred( readResult.Length() ); // ... and also update progress Driver().DrvProgressHandler().MMCScBkupHandleProgress( readResult.Length() ); } } } else { __LOG("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - Fatal Error - current offset out of bounds!"); ASSERT( EFalse ); User::Leave( KErrCorrupt ); } __LOG("CMMCScBkupReadDataTransferRequestBase::ReadChunkL() - END"); }
// -------------------------------------------------------------------------- // CUPnPAppFileSharingList::EditItemL // Called when setting list item is modified // -------------------------------------------------------------------------- // void CUPnPAppFileSharingList::EditItemL (TInt aIndex, TBool /*aCalledFromMenu*/) { __LOG("CUPnPAppFileSharingList::EditItemL"); LoadDataFromEngineL(); switch ( aIndex ) { case ESharingUiSettingItemVisibility: { if ( !iVisibility ) { if ( iIapId != KErrNotFound ) { ShowWaitNoteL(); } else { iWizardRun = ETrue; MUPnPFileSharingEngineObserver* observer = iFileSharingEngine->Observer(); delete iWizard; iWizard = NULL; iWizard = CUPnPAppWizard::NewL( KNullDesC, iFileSharingEngine ); iWizard->StartL(); iFileSharingEngine->SetObserver(observer); iFileSharingEngine->RequestSharingProgressL(); LoadDataFromEngineL(); } } else { ShowWaitNoteL(); } } break; default: { __LOG("CUPnPAppFileSharingList::EditItemL No such item!"); } } //load settings to screen CAknSettingItemList::LoadSettingsL(); }
// -------------------------------------------------------------------------- // CUPnPVideoPlayerDlg::ConstructL // Symbian 2nd phase constructor can leave. // -------------------------------------------------------------------------- // void CUPnPVideoPlayerDlg::ConstructL( ) { __LOG( "CUPnPVideoPlayerDlg::ConstructL" ); iAdjustingVolume = EFalse; // Resolve the target device capabilities ResolveTargetDeviceCapabilitiesL(); iMinSecFormatString = iEikonEnv->AllocReadResourceL( R_QTN_TIME_DURAT_MIN_SEC ); iHourMinSecFormatString = iEikonEnv->AllocReadResourceL( R_QTN_TIME_DURAT_LONG ); iNaviPane = static_cast<CAknNavigationControlContainer*>( CEikStatusPaneBase::Current()-> ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); iNaviPane->Pop(); iOriginalTitleText = HBufC16::NewL( KMaxFileName ); iTimer = CUPnPPeriodic::NewL( CActive::EPriorityStandard ); iCurrentVolume = KMiniumVolume; //0 //create a vertical volume controller iVolumePopup = CAknVolumePopup::NewL( NULL, ETrue ); //iVolumePopup->SetObserver( this ); //set value to the volume popup iVolumePopup->SetRange( KMiniumVolume , KMaxVolume ); iVolumePopup->SetStepSize( KVolumeStep ); iVolumePopup->SetDefaultValue( KMiniumVolume ); // Remote control server command repeat timer. iVolumeTimer = CUPnPPeriodic::NewL( EPriorityNormal ); // Open a connection to receive Volume Key events. iInterfaceSelector = CRemConInterfaceSelector::NewL(); // owned by CRemConInterfaceSelector instance iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector,*this ); TRAPD( err, iInterfaceSelector->OpenTargetL() ); if( err != KErrNone ) { __LOG1("Leave occured in OpenTargetL %d", err); } __LOG( "CUPnPVideoPlayerDlg::ConstructL End" ); }
// -------------------------------------------------------------------------- // CUPnPAVRenderingSessionImpl::ResetL // See upnpavrenderingsessionimpl.h // -------------------------------------------------------------------------- void CUPnPAVRenderingSessionImpl::ResetL() { __LOG( "CUPnPAVRenderingSessionImpl::ResetL" ); if( !iAlive ) { __LOG( "ResetL - disconnected, leave " ); User::Leave( KErrDisconnected ); } delete iBuffer; iBuffer = NULL; }
void bootloader_abort(dfu_end_t end_reason) { __LOG("ABORT...\n"); bl_info_entry_t* p_segment_entry = bootloader_info_entry_get(BL_INFO_TYPE_SEGMENT_APP); switch (end_reason) { case DFU_END_SUCCESS: case DFU_END_ERROR_TIMEOUT: case DFU_END_FWID_VALID: case DFU_END_ERROR_MBR_CALL_FAILED: if (p_segment_entry && dfu_mesh_app_is_valid()) { if (fifo_is_empty(&m_flash_fifo)) { interrupts_disable(); sd_mbr_command_t com = {SD_MBR_COMMAND_INIT_SD, }; uint32_t err_code = sd_mbr_command(&com); APP_ERROR_CHECK(err_code); err_code = sd_softdevice_vector_table_base_set(p_segment_entry->segment.start); APP_ERROR_CHECK(err_code); #ifdef DEBUG_LEDS NRF_GPIO->OUTSET = (1 << 21) | (1 << 22) | (1 << 23) | (1 << 24); #endif bootloader_util_app_start(p_segment_entry->segment.start); } else { __LOG("->Will go to app once flash is finished.\n"); m_go_to_app = true; } } else if (p_segment_entry) { __LOG("->App not valid.\n"); } else { __LOG("->No segment entry found\n"); } break; case DFU_END_ERROR_INVALID_PERSISTENT_STORAGE: APP_ERROR_CHECK_BOOL(false); default: __LOG(RTT_CTRL_TEXT_RED "SYSTEM RESET (reason 0x%x)\n", end_reason); __disable_irq(); while(1); //NVIC_SystemReset(); } }
TickerTask * TickerTask::createPeriodic(task_fp f, uint32_t period){ __LOGLN("Create PERIODIC task"); __LOG("PERIODIC "); __LOGLN(PERIODIC); TickerTask * ptr = new TickerTask(f, 0, period, PERIODIC); __LOG("task type "); __LOGLN(ptr->tasktype); __LOG("task ID "); __LOGLN(ptr->ID); if (ptr->ID < 0) { delete (ptr); return 0; } else return ptr; };
TickerTask * TickerTask::createIdle(task_fp f){ __LOGLN("Create IDLE task"); __LOG("IDLE "); __LOGLN(IDLE); TickerTask * ptr = new TickerTask(f, 0, 0, IDLE); __LOG("task type "); __LOGLN(ptr->tasktype); __LOG("task ID "); __LOGLN(ptr->ID); if (ptr->ID < 0) { delete (ptr); return 0; } else return ptr; };
void CWspCOTransaction::MethodInvokeData() { __ASSERT_DEBUG( iNegotiatedCapInfo.GetProtocolOptions() & ELargeDataTransfer, Panic(KWspPanicLDTNotSuppoted) ); __ASSERT_DEBUG( iMethodState == ERequesting, Panic(KWspPanicNotExpectingMoreRequestData) ); __LOG1(_L("Trans %d - Sending S-MethodInvokeData.req"), Transaction().Id()); // Down-cast to derived CTxData object CWspCOTxData* txData = STATIC_CAST(CWspCOTxData*, iTxData); // Get the request body data supplier MHTTPDataSupplier& dataSupplier = txData->RequestBodyData(); TPtrC8 bodyData; iMoreRequestData = !dataSupplier.GetNextDataPart(bodyData); // Send the S-MethodInvoke.req primitive iMethodInvoker.MethodInvokeDataReq( *this, bodyData, txData->RequestHeadersData(), iMoreRequestData ); __LOG(_L("---Method in Requesting state")); // WSP method transaction remains in requesting state - do nothing. // Release request body data dataSupplier.ReleaseData(); }
void CWspCOTransaction::MethodInvoke() { __ASSERT_DEBUG( iMethodState == ENullMethod, Panic(KWspPanicMethodAlreadyActive) ); __LOG1(_L("Trans %d - Sending S-MethodInvoke.req"), Transaction().Id()); // Down-cast to derived CTxData object CWspCOTxData* txData = STATIC_CAST(CWspCOTxData*, iTxData); // Get the request body data supplier MHTTPDataSupplier& dataSupplier = txData->RequestBodyData(); TPtrC8 bodyData; iMoreRequestData = !dataSupplier.GetNextDataPart(bodyData); // Send the S-MethodInvoke.req primitive RHTTPRequest request = iTrans.Request(); iMethodInvoker.MethodInvokeReq( *this, request.Method(), request.URI(), txData->RequestHeadersData(), bodyData, iMoreRequestData ); // WSP method transaction is requesting - update state iMethodState = ERequesting; __LOG(_L("---Method in Requesting state")); // Release request body data dataSupplier.ReleaseData(); }
// -------------------------------------------------------------------------- // CUPnPVideoPlayerDlg::CUPnPVideoPlayerDlg // C++ default constructor can NOT contain any code, that // might leave. // -------------------------------------------------------------------------- // CUPnPVideoPlayerDlg::CUPnPVideoPlayerDlg( MUPnPAVRenderingSession& aRenderingSession, const CUpnpObject& aObject, CUPnPCommonUI& aCommonUI ): iRendSession(aRenderingSession), iCommonUI(aCommonUI) { __LOG( "CUPnPVideoPlayerDlg::CUPnPVideoPlayerDlg" ); iTargetDevice = &( iRendSession.Device() ); iItem = &aObject; iAction = CUPnPCommonUI::EUPnPNone; __LOG( "CUPnPVideoPlayerDlg::CUPnPVideoPlayerDlg End" ); }
// -------------------------------------------------------------------------- // CUPnPFileTransferSessionBase::CUPnPFileTransferSessionBase // See upnpdownloadsession.h // -------------------------------------------------------------------------- CUPnPFileTransferSessionBase::CUPnPFileTransferSessionBase( CUpnpAVControllerServer& aServer, TInt aSessionId ) : iServer( aServer ), iSessionId( aSessionId ) { __LOG( "CUPnPFileTransferSessionBase::CUPnPFileTransferSessionBase" ); }
void CABDataOwnerCallbackImplementation::InitialiseRestoreBaseDataL(TDriveNumber aDrive) { __LOG("CABDataOwnerCallbackImplementation::InitialiseRestoreBaseDataL()"); // WaitForMillisecondsL(KABInitTime); iData = CABData::NewL(aDrive); }
// -------------------------------------------------------------------------- // CUPnPPlayListFiller::~CUPnPPlayListFiller // Destructor. // -------------------------------------------------------------------------- // EXPORT_C CUPnPPlayListFiller::~CUPnPPlayListFiller() { __LOG( "CUPnPPlayListFiller::~CUPnPPlayListFiller" ); iItemList.Reset(); delete iDeviceUid; }