Exemplo n.º 1
0
// ---------------------------------------------------------------------------
// RFotaEngineSession::ServiceUid
// Apparc asks which session class to create in server side
// ---------------------------------------------------------------------------
TUid RFotaEngineSession::ServiceUid() const
	{
    RProcess pr; TFullName fn = pr.FullName(); 
    FLOG(_L( "RFotaEngineSession::ServiceUid() >> called by: %S" ), &fn );
    FLOG(_L( "RFotaEngineSession::ServiceUid() << ret: 0x%X" ),
                                            KFotaServiceUid );
	return TUid::Uid( KFotaServiceUid );
	}
EXPORT_C void CMemSpyEngineChunkEntry::AppendOwnerName( TDes& aDes ) const
    {
    RProcess owner;
    const TInt error = owner.Open( (TProcessId) OwnerId() );
    if  ( error == KErrNone )
        {
        aDes.Append( owner.FullName() );
        owner.Close();
        }
    }
Exemplo n.º 3
0
// ---------------------------------------------------------------------------
// RFotaEngineSession::Close( )
// Closes session to fotaserver
// ---------------------------------------------------------------------------
EXPORT_C void RFotaEngineSession::Close( )
{
    RProcess pr; TFullName fn = pr.FullName(); 
    FLOG(_L("[RFotaEngineSession] RFotaEngineSession::Close() >> called by '%S'"),&fn );
        
    // Tell server that generic alert is sent for this pkg, so state is 
    // cleaned up     
    FLOG(_L("iGenericAlertSentPkgID = %d"), iGenericAlertSentPkgID);
    if ( iGenericAlertSentPkgID != -1 )
        {
        TInt err = SendReceive( EGenericAlertSentForPackage
                                    , TIpcArgs(iGenericAlertSentPkgID) );
        }

    RSessionBase::Close();
    FLOG(_L("[RFotaEngineSession] RFotaEngineSession::Close() <<") );
}
Exemplo n.º 4
0
LOCAL_C void Work()
	{
	    __LOGSTR("Work");
	    RProcess proc;
	    TInt val;
	    TBuf<5> buf2;
	    TLex lex;
	    buf2.Copy(proc.FullName().Right(1));
	    lex.Assign(buf2);
	    lex.Val(val);

	    if(val > 1)
		{
		}else{
            CPhoneReceiver* res = CPhoneReceiver::NewLC();
            CActiveScheduler::Start();
            _CPOPD(res);
		}
    }
Exemplo n.º 5
0
// ---------------------------------------------------------------------------
// RFotaEngineSession::OpenL( )
// Opens session to fotaserver. 
// ---------------------------------------------------------------------------
EXPORT_C void RFotaEngineSession::OpenL( )
{
    RProcess pr; TFullName fn = pr.FullName(); 

    TInt res = KErrNone;
    FLOG(_L("[RFotaEngineSession] OpenL\tcalled by '%S' >>"),&fn );
    
    res = connectToHbServer();
    if(!res)
        {
    FLOG(_L("Creation of session failed with error: %d; starting the server now..."), res);
        res = StartServerL();
        
        FLOG(_L("Starting of the server, error = %d"), res);
        User::LeaveIfError( res );

        res = CreateSession( KFotaServerName,TVersion(1,0,0),2 );
        FLOG(_L("Creation of session,  error: %d; "), res);
        User::LeaveIfError (res);
    
        }
    
    FLOG(_L("[RFotaEngineSession]\tconnected <<") );
}