// --------------------------------------------------------- // CPhoneStateHandle::LoadLibraryHandleL // --------------------------------------------------------- void CPhoneStateHandle::LoadLibraryHandleL( const TDesC& aFileName, const TUid aFactoryUid ) { TBool factoryFound = EFalse; TParse fullentry; fullentry.Set( aFileName, NULL, NULL ); if ( iFactoryLibrary.Load( fullentry.Name(), fullentry.DriveAndPath() ) == KErrNone ) { if ( iFactoryLibrary.Type()[1] == aFactoryUid ) { factoryFound = ETrue; } else { iFactoryLibrary.Close(); } } // If Factory not found: if ( !factoryFound ) { Panic( EPhoneCtrlFactoryLibraryNotFound ); } // Look for the 1st exported function iEntry = iFactoryLibrary.Lookup( KPhoneUiStateMachineOrdinal ); // Create the state machine factory iStateMachineFactory = (CPhoneUIStateMachineFactoryBase*) iEntry(); // Create the state machine iPhoneStateMachine = iStateMachineFactory->CreatePhoneStateMachineL( iViewCommandHandle ); // Create the phone resource resolver iPhoneResourceResolver = iStateMachineFactory->CreatePhoneResourceResolverL(); // Create the phone error messages handler iPhoneErrorMessagesHandler = iStateMachineFactory->CreatePhoneErrorMessagesHandlerL( iViewCommandHandle, iPhoneStateMachine ); }
void CSEIConnector::ConnectSocketL(void) { if (iStatus.Int() != KErrNone ) { iDriver->Log(_L("Resolver error")); return; } DEBUG("Get address"); iAddress = iEntry().iAddr; iAddress.SetPort(iPort); delete[] iHost; DEBUG("Open socket"); iHandler = CTcpServerHandler::NewL(iDriver); iHandler->InitSocketL(iSocketServer); iHandler->Socket()->Open(iSocketServer, KAfInet, KSockStream, KProtocolInetTcp); iDriver->Log(_L("Opening outgoing connection..")); iState = ESocketConnect; iStatus = KRequestPending; iHandler->Socket()->Connect(iAddress, iStatus); SetActive(); }