Example #1
0
void CTelServer::ConstructL()
	{
	//iPhoneManager=CPhoneManager::NewL();
	iSch=CTelSchedulerStop::NewL();
	iPriorityClientSession=NULL;
	StartL(ETEL_SERVER_NAME);
	}
Example #2
0
// ---------------------------------------------------------------------------
// Second phase construction.
// ---------------------------------------------------------------------------
//
void CKmdServer::ConstructL()
    {
    iDebugLogger = CKmdDebugLogger::NewL();
    
#ifdef _DEBUG
    iDebugLogger->LogWrite(_L("------------------------------------------------------"));
    iDebugLogger->LogWrite(_L("Starting KMD server."));
    iDebugLogger->LogWrite(_L("------------------------------------------------------"));
#endif    

    User::LeaveIfError( iIpsecPolicyServ.Connect() );        
    iEventLogger = CKmdEventLogger::NewL( *iDebugLogger );
    iSecpolReader = CSecpolReader::NewL( *iEventLogger,
                                         *iDebugLogger );
    iIkePluginHandlers[KIkeV1PluginHandlerIndex] = CIkePluginHandler::NewL( KIkeV1,
                                                                            *iEventLogger,
                                                                            *iDebugLogger );
    iIkePluginHandlers[KIkeV2PluginHandlerIndex] = CIkePluginHandler::NewL( KIkeV2,
                                                                            *iEventLogger,
                                                                            *iDebugLogger );
    
    StartL( KKmdServerName );
    
#ifdef _DEBUG
    iDebugLogger->LogWrite(_L("KMD server started."));
#endif        
    }
Example #3
0
double
XPath_ConversionExpressionHelper::GetNumberL (XPath_Context *context, BOOL initial)
{
  OP_ASSERT (!numberexpression);

  StartL (context, initial);

  TempBuffer buffer; ANCHOR (TempBuffer, buffer);
  if (GetStringValueL (context, initial, buffer))
    return XPath_Value::AsNumber (buffer.GetStorage ());
  else if (booleanexpression)
    return booleanexpression->EvaluateToBooleanL (context, initial) ? 1. : 0.;
  else if (stringexpression)
    return XPath_Value::AsNumber (stringexpression->EvaluateToStringL (context, initial, buffer));

#ifdef XPATH_EXTENSION_SUPPORT
  OP_ASSERT (unknown);
  XPath_Value *value = unknown->EvaluateL (context, initial);
  double number = value->AsNumberL ();
  XPath_Value::DecRef (context, value);
  return number;
#else // XPATH_EXTENSION_SUPPORT
  OP_ASSERT (FALSE);
  return op_nan (0);
#endif // XPATH_EXTENSION_SUPPORT
}
// ---------------------------------------------------------
// CCookieManagerServer::ConstructL
// ---------------------------------------------------------
//
void CCookieManagerServer::ConstructL()
    {
    CLOG( ( EServer, 0, _L( "-> CCookieManagerServer::ConstructL" ) ) );

    iCloseTimer = CCookieTimer::NewL( /*ETrue*/ );
	iCloseTimer->After( KCookieInitCloseTime );

    iStringPool.OpenL();

    //iCookiePacker = new (ELeave) TCookiePacker( iStringPool );
    iCookieGroupDataArray = CCookieGroupDataArray::NewL();
    iGroupIdArray = CGroupIdArray::NewL();

    RFs iFs;
    if ( iFs.Connect() == KErrNone )  // we could connect to the file server
        {
         TBuf<60> groupfilePath(KNullDesC);
         groupfilePath.Copy( KDefaultCookieXmlFolder );
         groupfilePath.AppendNum( RProcess().SecureId(), EHex );
         groupfilePath.Append( KDefaultCookieGroupFile );
         if ( BaflUtils::FileExists( iFs, groupfilePath ) )
            {
             TRAPD(ret, LoadGroupDataFromFileL(iFs) );
             if( ret != KErrNone )
                 {
                 CLOG( ( EServer, 0, _L( "CCookieManagerServer::ConstructL: Loading Group data Failed" ) ) );
                 //Do Nothing
                 }
            }
         iFs.Close();
        }
	StartL( KCookieServerName );

    CLOG( ( EServer, 0, _L( "<- CCookieManagerServer::ConstructL" ) ) );
    }
Example #5
0
const uni_char *
XPath_ConversionExpressionHelper::GetStringL (XPath_Context *context, BOOL initial, TempBuffer &buffer)
{
  OP_ASSERT (!stringexpression);

  StartL (context, initial);

  if (GetStringValueL (context, initial, buffer))
    return buffer.GetStorage () ? buffer.GetStorage () : UNI_L ("");
  else if (numberexpression)
    return XPath_Value::AsStringL (numberexpression->EvaluateToNumberL (context, initial), buffer);
  else if (booleanexpression)
    return XPath_Value::AsString (booleanexpression->EvaluateToBooleanL (context, initial));

#ifdef XPATH_EXTENSION_SUPPORT
  OP_ASSERT (unknown);
  XPath_Value *value = unknown->EvaluateL (context, initial);
  const uni_char *string = value->AsStringL (buffer);
  XPath_Value::DecRef (context, value);
  return string;
#else // XPATH_EXTENSION_SUPPORT
  OP_ASSERT (FALSE);
  return op_nan (0);
#endif // XPATH_EXTENSION_SUPPORT
}
Example #6
0
// ----------------------------------------------------------------------------------------
// CFMSServer::ConstructL
// ----------------------------------------------------------------------------------------
void CFMSServer::ConstructL()
	{
	FLOG(_L("CFMSServer::ConstructL- begin"));
	StartL(KFMSServerName);		
	User::LeaveIfError( iFs.Connect() );
	TInt err;
	err = iFs.CreatePrivatePath(EDriveC);
	if ( err != KErrNone && err != KErrAlreadyExists )
		{ User::Leave (err); }
	User::LeaveIfError( iFs.SetSessionToPrivate( EDriveC ) );
	err = iFile.Create(iFs,KFotaInterruptFileName,EFileWrite);
	if(err == KErrNone)//means file created now and opened
		{
		FLOG(_L("CFMSServer::ConstructL- file closed"));
		iFile.Close();
		}
	else if( err != KErrAlreadyExists )
		{
		FLOG(_L("CFMSServer::ConstructL- leaving with err as %d"),err);
		User::Leave(err);
		}
	FindVariation();
	iFMSInterruptAob.ConstructL();
	iFMSInterruptAob.iServer = this;  
	FLOG(_L("CFMSServer::ConstructL- end"));
	}
Example #7
0
void CCallObserver::RunL()
{
    // Check the state of the phone instead of the event.
    switch( iSysAgent.GetState( KUidCurrentCall ) )
    {
    case ESACallNone:
// ESACallDisconnecting does not exist in series 60 v1
#ifndef NAV2_CLIENT_SERIES60_V1
    case ESACallDisconnecting:
#endif
        iAppUi->HandlePhoneCallL( EFalse );
        break;
    case ESACallVoice:
    case ESACallRinging:
    case ESACallAlerting:
    case ESACallFax:
        iAppUi->HandlePhoneCallL( ETrue );
        break;
    case ESACallData:
        break;
    case ESACallAlternating:
        break;
    }
    StartL();
}
Example #8
0
TInt E32Main()
	{
	test.SetLogged(EFalse);
	test.Title();

// For some reason, you have to do the following to
// ensure that the file server behaves properly.
	RFs fs;
	fs.Connect();
	fs.Close();

	LoadLDD_PDD();

	__UHEAP_MARK;
	CTrapCleanup* cleanupStack=CTrapCleanup::New();	// Get CleanupStack

	CActiveScheduler* activescheduler=new CActiveScheduler;
	CActiveScheduler::Install(activescheduler);

	TRAPD(err, StartL());
	if (err)
		{
		test.Printf(_L("StartL failed with error: %d!\n"), err);
		}
		
	delete activescheduler;
	delete cleanupStack;

	__UHEAP_MARKEND;

	return 0; // and return
	}
// ---------------------------------------------------------------------------
// Something has been written to EP0 
// ---------------------------------------------------------------------------
//
void CStateMachine::WroteEP0L(const TRequestStatus& aStatus)
    {
    
    FTRACE(FPrint(
            _L("[USBDEVCON]\tCStateMachine::WroteEP0: iStatus = %d" ), aStatus.Int()));

    // all errors while writing data lead to idle state (ESetupStage in our case)
    if(KErrNone != aStatus.Int())
        {
        // restart
        StartL();
        }
        
    switch(iState)
        {
        case EStatusStage:
            {
            
            FLOG( _L( "[USBDEVCON]\tCStateMachine::WroteEP0 EStatusStage -> ESetupStage" ) );
            
            // successfully wrote data to EP0
            // go to idle
            iState = ESetupStage;
            iEP0Reader->ReadSetupPacketL();
            
            break;
            }
        default:
            {
            FLOG( _L( "[USBDEVCON]\tCStateMachine::WroteEP0 ***ENoneState***" ) );
            }
        }
    }
void CMscFileSession::DispatchMessageL( const RMessage2& aMessage )
    {
    switch (aMessage.Function())
        {
        case EMscFileSetupLu:
            SetupLogicalUnitL( aMessage );
            break;
            
        case EMscFileStart:
            StartL( aMessage );
            break;
            
        case EMscFileStop:
            LEAVE_IF_ERROR( Stop() );
            break;
            
        case EMscFileShutdown:
            LEAVE_IF_ERROR( Shutdown() );
            break;

        default:
            aMessage.Panic( KUsbMsCliPncCat, EUsbMsPanicIllegalIPC );
            break;
        }

    }
Example #11
0
void CSignalServer::ConstructL()
	{
	StartL(KServerName);
	iShutDown = CSigShutDown::NewL();
	RPipe::Init();
	iShutDown->Start();
	}
Example #12
0
void CMyLEDAgendaNotifierSubject::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
	{
	RDebug::Print(_L("Plugin: LED Agenda notifier started (asynch. call) \n"));
	StartL(aBuffer);
	TRAPD(err,aMessage.WriteL(aReplySlot,KStartAgendaLEDResponse));
	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KStartAgendaLEDResponse)"),err));
//	aMessage.Complete(EEikNotExtRequestCompleted);
	}
void CTestUtilServer::ConstructL()
	{
	StartL(KTestUtilServerName);
	User::LeaveIfError(iFs.Connect());
	iFs.ShareProtected();
	iFileMan = CFileMan::NewL(iFs);
	iTestUtilSessionCommon = new (ELeave) CTestUtilSessionCommon();
	}
// ==========================================================================
// FUNCTION: RestartL
// ==========================================================================
void CContainerStoreSearchHandler::RestartL( TMsgStoreSearchCmdParams& aCmdParam, 
                                             RArray<TContainerId>&     aFolderIds, 
                                             RPointerArray<HBufC8>&    aPropertyNames )
    {
    InitializeL( aCmdParam, aFolderIds, aPropertyNames );
    iIsNewSearch = EFalse;
    StartL();
    }
void CAlmSettingsServer::ConstructL(void)
{
  iBackupSession=CBaBackupSessionWrapper::NewL();
  iBackupSession->RegisterBackupOperationObserverL(*this);
  User::LeaveIfError(iSession.Connect());
  DbOpenL();
  StartL(KSettingsServerName);
}
void CMMFAudioPolicyServer::ConstructL()
	{
	// Create AudioPolicy singleton
	iAudioPolicy = CAudioPolicy::NewL(this);
	TCallBack callBack(SendNotification,this);
	iNotificationTimer = CNotificationTimer::NewL(callBack);
	// Call base class to Start server
	StartL(KNullDesC);
	}
//*************************************************************************************
void CConsoleAlarmAlertServer::ConstructL()
	{
	StartL(KAlarmAlertServerName);
	__FLOG_CONNECT;
	__FLOG_CREATE(KLogFile, RFileFlogger::ELogModeOverWrite);
	_LIT(KStartMsg, "Console Alarm Alert Server started");
	__FLOG_INFO1(KStartMsg);
	__FLOG_CLOSE;
	}
Example #18
0
// -----------------------------------------------------------------------------
// CGbaServer::ConstructL()
// -----------------------------------------------------------------------------
//
void CGbaServer::ConstructL()
{
    StartL( KGbaServerName ) ;
    iShutdown.ConstructL();
    if(!iShutdown.IsActive())
    {
        iShutdown.Start();
    }
}
Example #19
0
GLDEF_C TInt E32Main()
	{       
	__UHEAP_MARK;
	CTrapCleanup* theCleanup=CTrapCleanup::New();
	TRAPD(ret,StartL());          
	delete theCleanup;      
	__UHEAP_MARKEND;
	return(KErrNone);
	}
Example #20
0
void CMyLEDPhoneNotifierSubject::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
	{
	RDebug::Print(_L("Plugin: Phone notifier started \n"));
	TPtrC8 boolDes(_L8("LED Channel: PhoneAsynch"));
	TRAPD(err,aMessage.WriteL(aReplySlot,boolDes));
	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,boolDes)"),err));
	StartL(aBuffer);
	aMessage.Complete(EEikNotExtRequestCompleted); //don't have to complete straight away
	}
void CScsTestServer::ConstructL(TInt aShutdownPeriodUs)
/**
	Secondary initialization initializes the base class and
	starts the server.
 */
	{
	CScsServer::ConstructL(aShutdownPeriodUs);
	StartL(ScsTestImpl::KServerName);
	}
// 2nd phase construction - ensure the timer and server objects are running
void CCentRepToolServer::ConstructL()
	{
	StartL(KCentRepToolServerName);
	
	iContainerIndex = CObjectConIx::NewL();
	
	iShutdown.ConstructL();
	// ensure that the server still exits even if the 1st client fails to connect
	iShutdown.Start();
	}
void CSCPClientTestServer_AL::ConstructL()
	{
	RDEBUG("CSCPClientTestServer_AL::ConstructL start");
	
	StartL(KDMSSServerName);
	iShutdown.ConstructL();
	iShutdown.Start();	
	
	RDEBUG("CSCPClientTestServer_AL::ConstructL end");
	}
// -----------------------------------------------------------------------------
// CUsbPnServer::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CUsbPnServer::ConstructL()
    {
    OstTrace0( TRACE_NORMAL, CUSBPNSERVER_CONSTRUCTL_ENTRY, "CUsbPnServer::ConstructL" );
    C_TRACE( ( _T( "CUsbPnServer::ConstructL()" ) ) );

    StartL( KUsbPnServerName );
    iInterface = CUsbPnInterface::NewL();

    OstTrace0( TRACE_NORMAL, CUSBPNSERVER_CONSTRUCTL_EXIT, "CUsbPnServer::ConstructL - return void" );
    C_TRACE( ( _T( "CUsbPnServer::ConstructL() - return void" ) ) );
    }
/**
 *
 * Test Framework server second-phase constructor
 * Starts the server; does not initialise the log
 * (this must be done independently with a call to OpenLogL)
 *
 * @xxxx
 *
 */
void CTestFrameworkServer::ConstructL()
{
    StartL(KTestFrameworkServerName);
    //Ensure that the server will exit even if the first client fails to connect
    iShutdown.ConstructL();
    iShutdown.Start();

    iLogMode = 0;	// initial value : not running any log
    iConsole = NULL;
    iFileLogger = NULL;
}
Example #26
0
void CDeviceEventQueue::PushL(const TDeviceEvent& aEvent)
    {
    OstTraceFunctionEntry0( CDEVICEEVENTQUEUE_PUSHL_ENTRY );

    // Perform optimization for remove device event
    AppendAndOptimizeL(aEvent);
    
    // Start handling first event in queue
    StartL();
    OstTraceFunctionExit0( CDEVICEEVENTQUEUE_PUSHL_EXIT );
    }
// ----------------------------------------------------------------------------------------
// CTerminalControlServer::ConstructL
// 2nd phase construction - ensure the timer and server objects are running
// ----------------------------------------------------------------------------------------
void CTerminalControlServer::ConstructL()
{
    RDEBUG("CTerminalControlServer::ConstructL");

    StartL(KTerminalControlServerName);
    iContainerIndex = CObjectConIx::NewL();
    iProcessInfoArray = new (ELeave) CArrayFix<TTcProcessInfo>((TBufRep)CBufFlat::NewL, 10);
    RDEBUG_2("CTerminalControlServer::iProcessInfoArray ALLOC %x", (TAny*)iProcessInfoArray);

    User::LeaveIfError( iSCPClient.Connect() );
}
// ---------------------------------------------------------------------------
// CDevTokenServer::ConstructL()
// 2nd phase construction - ensure the timer and server objects are running.
// ---------------------------------------------------------------------------
//
void CDevTokenServer::ConstructL()
    {
    TRACE_PRINT(" CDevTokenServer::ConstructL -->");
    TRACE_PRINT(" CDevTokenServer::ConstructL 1");
    DevTokenDialog::InitialiseL();
    StartL( KDevTokenServerName );
    TRACE_PRINT(" CDevTokenServer::ConstructL 2");
    // Ensure that the server still exits even if the 1st client fails to connect
    iShutdown.ConstructL();
    iShutdown.Start();
    }
Example #29
0
//
// 2nd phase construction - ensure the timer and server objects are running
//
void CCdlServer::ConstructL()
	{
	StartL(KCdlServerName);
	iShutdown.ConstructL();
	// ensure that the server still exits even if the 1st client fails to connect
	iShutdown.Start();
	User::LeaveIfError(iFs.Connect());
	iEngRef = CdlServerEngine::CreateCdlEngineL();
	iState = CCdlRefs::NewL();
	iAllRefs = CCdlRefs::NewL();
	CCdlDllsWatcherBase::NewL(iDllWatcher, iFs, this);
	}
Example #30
0
//*************************************************************************************
void CASSrvServer::ConstructL()
	{
	// We "start" the server here (i.e before completing construction) since
	// if two sessions attempt to connect at the same time, we will end up
	// setting up an alarm alert notification with a server instance which is
	// about to be destroyed. Calling StartL here won't actually allow any connections
	// to be created until the active scheduler has a chance to run. However, the 
	// call below will leave should there already be a started alarm server instance.
	//
	StartL(ASSrvStaticUtils::ASName());
	iServerWideData = CASSrvServerWideData::NewL();
	}