コード例 #1
0
// -----------------------------------------------------------------------------
// RPhCltCallNotify::Open
// -----------------------------------------------------------------------------
//
TInt RPhCltCallNotify::Open( RPhCltServer& aServer )
    {
    return CreateSubSession( 
        aServer,
        EPhoneServerNotifySubSessionOpen,
        TIpcArgs() );
    }
コード例 #2
0
// -----------------------------------------------------------------------------
// RMcnSubSession::Open
// Creates a MCN subsession to CbsServer.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt RMcnSubSession::Open( 
    RCbsMcnSession& aMcnSession )
    {
    CBSLOGSTRING("CBSMCNCLIENT: >>> RMcnSubSession::Open()");

    if ( !iConnected )
        {
        const TIpcArgs args( TIpcArgs::ENothing );
        TInt result( CreateSubSession( aMcnSession, EMcnCreateSubsession, args ) );

        if ( result == KErrNone )
            {            
            CBSLOGSTRING2("CBSMCNCLIENT: RMcnSubSession::Open(): Subsession created, result: %d", result );
            iConnected = ETrue;
            } 
        else
            {
            iConnected = EFalse;
            }
        CBSLOGSTRING2("CBSMCNCLIENT: RMcnSubSession::Open(), returning %d.", result );        
        return result;
        }
    CBSLOGSTRING("CBSMCNCLIENT: <<< RMcnSubSession::Open(), returning KErrGeneral.");    
    return KErrGeneral;       
    }
コード例 #3
0
ファイル: uscl_qos.cpp プロジェクト: cdaffara/symbiandump-os2
EXPORT_C TInt RPacketQoS::OpenExistingQoS(RPacketContext& aPacketContext,
										  TDesC& aProfileName)
    {
    // TAny *p[KMaxMessageArguments];
	// p[0] = (TAny*) &aProfileName;
	// p[1] = (TAny*) EUmtsSimServOpenExistingPacketQoS;
	// p[2] = (TAny*) &aPacketContext.iData->GetName();
    // TInt err = CreateSubSession(*aPacketContext.iData->GetServer(),
	// 							EUmtsSimServCreatePacketQoSSubSession,
	//							&p[0]);
	// Changed because of migration to Client/Server V2 API
    TIpcArgs args( &aProfileName, 
                   EUmtsSimServOpenExistingPacketQoS, 
                   &aPacketContext.iData->GetName() );
    TInt err = CreateSubSession(*aPacketContext.iData->GetServer(),
								EUmtsSimServCreatePacketQoSSubSession,
								args);
	if(err != KErrNone) return err;

	if(!iData)
        {
		TRAPD(r,iData = CPacketQoSInternalData::NewL());
		if(r != KErrNone)
            {
			iData = NULL;
			return r;
            }
        }
	return KErrNone;
    }
コード例 #4
0
// -----------------------------------------------------------------------------
// RPhCltUssd::Open
// Open USSD subsession to the Phone Server.
//
// -----------------------------------------------------------------------------
//
TInt RPhCltUssd::Open( RPhCltServer& aServer )
{
    return CreateSubSession(
               aServer,
               EPhoneServerUSSDSubSessionOpen,
               TIpcArgs() );
}
コード例 #5
0
/**
Reopens contacts view (used when cnt server was terminated)
@capability ReadUserData
@param aDb Reference to contact database used to create views 
*/
void RContactRemoteView::ReOpenL(const CContactDatabase& aDb)
    {
    TIpcArgs args(iViewParams->Length());
    args.Set(KSlot1,iViewParams);
    TInt err;
    if (iViewName != NULL)
        {
        args.Set(KSlot2,iViewName);
        err = CreateSubSession(*aDb.iCntSvr, ECntCreateNamedView, args);
        }
    else
        {
        err = CreateSubSession(*aDb.iCntSvr, ECntCreateView, args);
        }
    User::LeaveIfError(err);
    }
コード例 #6
0
// -----------------------------------------------------------------------------
// RPhCltMessenger::Open
// 
// Open subsession to Phone Server.
// -----------------------------------------------------------------------------
//
TInt RPhCltMessenger::Open(
    RPhCltServer& aServer,
    const TUid& aCategoryUid,
    const TInt& aDefaultMessageSize )
    {
    __ASSERT_ALWAYS( aServer.Handle(), User::Panic( 
            KPhClientPanicCategory, 
            EPhCltClientSidePanicNullHandle ) );

    TInt err = CreateSubSession( 
        aServer, 
        EPhoneServerMessengerSubSessionOpen, 
        TIpcArgs() );


    // If subsession was created successfully, construct it properly.
    if ( !err )
        {
        // Set the needed variables to be transferred to PhoneServer side.
        iMessengerParameters.iCategoryUid = aCategoryUid;
        iMessengerParameters.iDefaultMessageSize = aDefaultMessageSize;

        err = SendReceive( 
            EPhoneServerMessengerSubSessionConstruct, 
            TIpcArgs( &iMesParPckg ) );

        // If memory reservations failed, close subsession.
        if ( err )
            {
            Close();
            }
        }
    
    return err;
    }
コード例 #7
0
EXPORT_C TInt RUpsTestSession::Open(RUpsTestServ& aServ)
/**
 * @param aServ - Reference to the root server session
 * @return Standard error codes
 * Synchronously open a server test step session
 */
 	{
	return CreateSubSession(aServ,EUpsTest_OpenSession);
	}  
コード例 #8
0
/**
This function opens a RMobileSmartCardEap sub-session from RMobilePhone
that will refer to the application referenced by aAID.  It will be
assumed that the application exists and contains a DF_EAP for the
aEapType specified.  The client must call
RMobileSmartCardEap::InitialiseEapMethod() to ensure correct
functionality of this sub-session.

@param aPhone The RMobilePhone sub-session relative to which this
              sub-session will open.
@param aAId The UICC Application ID, which should be of one that has
            EAP support.
@param aEapType The EAP method type that this sub-session will use
                under the aAID application.

@return KErrNone if successful, otherwise a system-wide error code.
@see RMobileSmartCardEap::InitialiseEapMethod()

@capability None

@publishedPartner
@released
*/
EXPORT_C TInt RMobileSmartCardEap::Open(RMobilePhone& aPhone, const RMobilePhone::TAID& aAID, const TEapType& aEapType)
	{
	RSessionBase* session = &aPhone.SessionHandle();
	__ASSERT_ALWAYS(session != NULL, PanicClient(EEtelPanicNullHandle));
	TInt subSessionHandle = aPhone.SubSessionHandle();
	__ASSERT_ALWAYS(subSessionHandle != NULL, PanicClient(EEtelPanicNullHandle));

	TRAPD(ret, ConstructL());
	if (ret != KErrNone)
		{
		Destruct();
		return ret;
		}

	// Appending the application ID and Eap Type to the name of the
	// subsession; plus two one-byte delimeters indicating lengths.
	// See var appIdbuf for why KAIDSize is multiplied by 2.
	TBufC<SCEAP_SSN_LENGTH + RMobilePhone::KAIDSize*2 +
	      KEapTypeSize + 2> nameBuf(KETelSmartCardEapSession); // 2 for delimeters
	TPtr name(nameBuf.Des());

	// the length of the AID as a Sept ASCII character
	TChar lengthAIDChar = SeptChar(aAID.Length());

	// the value of the AID
	// converted to a 16-bit string representation.  Multiply by 2,
	// since each AID byte is represented as two sem-octects.
	TBufC<2*RMobilePhone::KAIDSize> appIdbuf;
	TPtr appIdPtr(appIdbuf.Des());
	ConvertBinToText(aAID, appIdPtr);

	// the length of the EapType
	TInt lengthEapType = aEapType.Length();
	TChar charEapType = SeptChar(lengthEapType);

	// the value of the EapType (converted to 16-bit)
	TBufC<KEapTypeSize> eapTypeBuf;
	TPtr eapTypePtr(eapTypeBuf.Des());
	eapTypePtr.Copy(aEapType);

	// appending...
	name.Append(lengthAIDChar);
	name.Append(appIdPtr);
	name.Append(charEapType);
	name.Append(eapTypePtr);

	TIpcArgs args(&name, TIpcArgs::ENothing, subSessionHandle);
	SetSessionHandle(*session);
	ret = CreateSubSession(*session, EEtelOpenFromSubSession, args);

	if (ret != KErrNone)
		{
		Destruct();
		}

	return ret;
	}
コード例 #9
0
// -----------------------------------------------------------------------------
// RPhCltExtCall::Open
//
// Creates a subsession, as part of the given session.
// -----------------------------------------------------------------------------
//
TInt RPhCltExtCall::Open( RPhCltServer& aServer )
{
    __ASSERT_ALWAYS( aServer.Handle(), User::Panic(
                         KPhClientPanicCategory,
                         EPhCltClientSidePanicNullHandle ) );

    return CreateSubSession(
               aServer,
               EPhoneServerExtCallSubSessionOpen,
               TIpcArgs() );
}
コード例 #10
0
EXPORT_C TInt RLbsLocMonitorAreaPositioner::OpenL(RLbsLocMonitorSession& aLocMonSession)
	{	

	TInt testcase, propRead;
	propRead = iTestLKPAreaKey.Get(KLocSrvTestSuite, KLbsLocMonitorTestLKPAreaKey,testcase);
	
	if (propRead==KErrNone)
		{
		switch(testcase)
			{
			case EGetLKPAreaLocMonitorOpenSubsessionFail:
				return KErrCouldNotConnect;
				break;
			default:
				break;
			}
		}
	
	
	propRead = iTestLKPosKey.Get(KLocSrvTestSuite, KLbsLocMonitorTestLKPosKey,testcase);
	if (propRead==KErrNone)
		{
		switch(testcase)
			{
			case EGetLKPosLocMonitorOpenSubsessionFail:
				return KErrCouldNotConnect;
			default:
				break;
			}
		}
	
	// Create the timer active object to delay the response to the 
	// location server
	TRAPD(ret1, CreateLKPATimerL());
	if (ret1!=KErrNone)
		{
		return ret1;
		}
	
	
	// Create the timer active object to delay the response to the 
	// location server
	TRAPD(ret2, CreateLKPosTimerL());

	if (ret2==KErrNone)
		{
			ret2 = CreateSubSession(aLocMonSession, EOpenPositioner, TIpcArgs());
		}
	return ret2;
	
	}
コード例 #11
0
TInt RFsNotify::Open(RFs& aFs, CFsNotificationList* aBuffer, TRequestStatus& aBufferStatus)
	{
	if(aBuffer == NULL || aBuffer->iBuf == NULL || &aFs == NULL || &aBufferStatus==NULL)
		return KErrArgument;
	
	TInt err = CreateSubSession(aFs,EFsNotificationOpen);
	if (err == KErrNone)
		{
		aBufferStatus = KRequestPending;
		//memclr((TUint8*)aBuffer->iBuf->Ptr(),aBuffer->iBuf->Des().MaxSize());
		SendReceive(EFsNotificationBuffer, TIpcArgs(&aBuffer->iBufferPtr,aBuffer->iBuf->Des().MaxSize()), aBufferStatus);
		}
	return err;
	}
コード例 #12
0
/**
@capability ReadUserData
*/
void RContactRemoteView::OpenL(const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName) 
    {
    delete iViewParams;
    iViewParams = NULL;
    delete iViewName;
    iViewName = NULL;

    iViewParams = PackageSortOrderAndPluginDetailsLC(aSortOrder,aContactTypes,aSortPluginImplUid,aSortPluginName);
    CleanupStack::Pop(iViewParams);
    TIpcArgs args(iViewParams->Length());
    args.Set(KSlot1,iViewParams);
    TInt err = CreateSubSession(*aDb.iCntSvr, ECntCreateView, args );
    User::LeaveIfError(err);
    
    // keep info needed to reopen the view if cnt server dies
    iRCntModel = aDb.iCntSvr;
    }
コード例 #13
0
// -----------------------------------------------------------------------------
// RSatRefresh::OpenL
// Connects a sub-session to SatServer.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
EXPORT_C void RSatRefresh::OpenL( const RSatSession& aSession )
    {
    LOG( SIMPLE, "SATCLIENT: RSatRefresh::OpenL calling" )
    
    #ifdef ENABLE_SAT_LOGGING
    RProcess test;
    LOG2( SIMPLE, 
    "SATCLIENT: RSatRefresh::OpenL UID of calling process: 0x%x",
    test.SecureId().iId )
    test.Close();
    #endif

    TIpcArgs arguments( 0, 0, 0, 0 );
    User::LeaveIfError(
        CreateSubSession( aSession, ESatSOpenRefreshSubSession, arguments ) );

    LOG( SIMPLE, "SATCLIENT: RSatRefresh::OpenL exiting" )
    }
コード例 #14
0
//EIsaDes16Des16Null	
TInt RReplaySubSession::Open(CRecordMessage::TIpc aIpc, TDes16& aArg0, TDes16& aArg1, TIpcArgs::TNothing /*aArg2*/)
	{
	TIpcArgs args(&aArg0,&aArg1);
	return CreateSubSession(iSession,aIpc,args);
	}
コード例 #15
0
TInt RWin32Socket::Open(RWin32Factory& aFactory, TType aType)
	{
	WSP_LOG(WspLog::Printf(_L("RWin32Socket::Open: aType: %d, this: 0x%x"), aType, this));
	TPckgC<TType> typePckg(aType);
	return CreateSubSession(aFactory, CWin32Factory::ENewSocket, typePckg);
	}
コード例 #16
0
// -----------------------------------------------------------------------------
// RCbsTopicMessages::Open
// Creates a subsession to the server.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//  
TInt RCbsTopicMessages::Open( 
    RCbs& aServer )
    {
    const TIpcArgs args( TIpcArgs::ENothing );
    return CreateSubSession( aServer, ECbsCreateTopicMessagesSubsession, args );
    }
コード例 #17
0
TInt RSearchServerSubSession::Open(RSearchServerSession& aSession)
	{
	return CreateSubSession(aSession, ESearchServerCreateSubSession);
	}
コード例 #18
0
TInt RDosEventRcv::Open(RDosServer& aServer)
{
	return CreateSubSession(aServer,EDosCreateEventRcvSubSession, TIpcArgs(TIpcArgs::ENothing, TIpcArgs::ENothing, KAutoComplete));
}
コード例 #19
0
TInt RDosLights::Open(RDosServer& aSession)
{
  const TAny* p[KMaxMessageArguments];
  p[2]=(TAny*)1;
  return CreateSubSession(aSession,0x68,p);
}
コード例 #20
0
//
// Opens client-side sub-session for a registered script. The script session is modelled as a
// client side sub-session with a peer server side sub-session.
// 
TInt RSecMgrSubSession::Open(const RSessionBase& aSession,
		CScript& aScriptInfo, TPolicyID aPolicyID, const TDesC& aHashValue)
	{
	TIpcArgs args(aScriptInfo.ScriptID (), aPolicyID);

	TInt errCode(KErrNone);
	errCode = iFs.Connect();
	if(errCode == KErrNone)
    	{
    	if ( KAnonymousScript==aScriptInfo.ScriptID ())
    		errCode = CreateSubSession (aSession, EGetTrustedUnRegScriptSession,
    				args);
    	else
    		errCode = CreateSubSession (aSession, EGetScriptSession, args);
    
    	if ( errCode==KErrNone)
    		{
    		// Retrieve the RFs and RFile handles from the server
    		TPckgBuf<TInt> fh; // sub-session (RFile) handle
    		TIpcArgs args(&fh);
    
    		RFile file;
    		CleanupClosePushL(file);
    
    		if ( KErrNone==errCode)
    			{
    			iFs.ShareProtected ();
    
    			TFileName tempDirPath;
    			TFileName tempPath;
    
    			iFs.PrivatePath (tempDirPath);
    			BaflUtils::EnsurePathExistsL (iFs, tempDirPath);
    
    			errCode = file.Temp (iFs, tempDirPath, tempPath, EFileWrite);
    
    			if ( KErrNone==errCode)
    				{
    				file.TransferToServer (args, EMsgArgOne, EMsgArgTwo);
    				errCode = SendReceive (EGetScriptFile, args);
    
    				if ( KErrNone==errCode)
    					{
    					RFileReadStream rfs(file);
    					CleanupClosePushL(rfs);
    					aScriptInfo.InternalizeL (rfs);
    					TBufC<KMaxPath> hashValue(aScriptInfo.Hash());
    					if(0 != hashValue.Compare(KNullDesC))
    						{
    						if(!aScriptInfo.HashMatch(aHashValue))
    							{
    							//hash check failed
    							errCode = KErrNotFound;
    							}						
    						}
    					
    					CleanupStack::PopAndDestroy(&rfs);
    					}
    				}
    			iFs.Delete (tempPath);
    			}
    
    		CleanupStack::PopAndDestroy(&file);
    		}
    	}
	return errCode;
	}