// -----------------------------------------------------------------------------
// Tests CAiwDialDataExt setting and getting values.
// -----------------------------------------------------------------------------
//
TInt CAiwDialDataTests::ExtSetAndGetTestL( TTestResult& /*aResult*/ )
    {
    _LIT( KPhoneNumber, "1234567890");
    _LIT8( KContactLink, "ContactLink");
    _LIT( KName, "Mr Smith" );
    
    CAiwDialDataExt* dialData = CAiwDialDataExt::NewLC();
    
    dialData->SetPhoneNumberL( KPhoneNumber );
    dialData->SetCallType( CAiwDialData::EAIWVideo );
    dialData->SetWindowGroup( 1 );
    dialData->SetInitiateCall( ETrue );
    dialData->SetNameL( KName );
    
    dialData->SetRedial( AIWDialDataExt::KAIWRedialOff );
    dialData->SetShowNumber( EFalse );
    dialData->SetContactLinkL( KContactLink );
    
    TL(  dialData->PhoneNumber() == KPhoneNumber() );
    T1L( dialData->CallType(), CAiwDialData::EAIWVideo );
    T1L( dialData->WindowGroup(), 1 );
    TL( dialData->InitiateCall() );
    TL( dialData->Name() == KName() );
    T1L( dialData->Redial(), AIWDialDataExt::KAIWRedialOff );
    TL( !dialData->ShowNumber() );        
    TL( dialData->ContactLink() == KContactLink() );
    
    
    CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
    dialData->FillInParamListL( *list );
    
    CleanupStack::PopAndDestroy( 2, dialData );

    return KErrNone;
    }
Esempio n. 2
0
// Called by ECMT to initialize the plugin
void CEcmtSdkPlugin::BindMessagingL(MEcmtMessaging* /*aMessaging*/)
{
    // Create the thread waiting on the native Win32 event
    _LIT(KName,"EcmtSdkPluginWaitThread");
    User::LeaveIfError(iWaitThread.Create(KName(), WaitThread,
        KDefaultStackSize, NULL, this));
    iFlags |= EWaitThreadCreated;
    iWaitThread.Logon(iWaitThreadStatus);
    iWaitThread.Resume();

    // Create the thread that runs the work items
    _LIT(KName2,"EcmtSdkPluginWorkThread");
    User::LeaveIfError(iWorkThread.Create(KName2(), WorkThread,
        KDefaultStackSize, NULL, this));
    iFlags |= EWorkThreadCreated;
    iWorkThread.Resume();

    TRACE1("[%08X] initialized",this);
    ASSERT(!gEcmtSdkPlugin);
    gEcmtSdkPlugin = this;

    DuplicateHandle(GetCurrentProcess(),GetCurrentThread(),
                    GetCurrentProcess(),&gEcmtSdkPluginThread,
                    0, FALSE, DUPLICATE_SAME_ACCESS);
}
Esempio n. 3
0
HBufC8* CPolicyPatcher::CreatePatchDataL(const CPolicyPatchInfo* aPatchInfo)
    {
    TInt patchDataLength = 0;

    TBuf8<20> keyBuf;

    const TDesC8& certSubjectName = aPatchInfo->CertSubjectName();

    if (0 == aPatchInfo->UserCertKeyLen())
        {
        // CA cert patch
        patchDataLength = KName().Length() + KNewLine().Length() +
                          KDataField().Length() + KSpace().Length() +
                          certSubjectName.Length();
        }
    else
        {
        // user cert patch
        keyBuf.Num(aPatchInfo->UserCertKeyLen());
        patchDataLength = KDNField().Length() + certSubjectName.Length() +
                          KNewLine().Length() + KKeyLenField().Length() +
                          keyBuf.Length();
        }

    HBufC8* patchData = HBufC8::NewL(patchDataLength);
    CleanupStack::PushL(patchData);

    TPtr8 ptrPatchData(patchData->Des());

    if (0 == aPatchInfo->UserCertKeyLen())
        {
        // CA cert patch
        ptrPatchData.Append(KName);
        ptrPatchData.Append(KNewLine);
        ptrPatchData.Append(KDataField);
        ptrPatchData.Append(KSpace);
        ptrPatchData.Append(certSubjectName);
        }
    else
        {
        // User cert patch
        ptrPatchData.Append(KKeyLenField);
        ptrPatchData.Append(keyBuf);
        ptrPatchData.Append(KNewLine);
        ptrPatchData.Append(KDNField);
        ptrPatchData.Append(certSubjectName);
        iUserCertPatched = ETrue;
        }

    CleanupStack::Pop(); // patchData

    return patchData;
    }
CActiveSocketConnect::CActiveSocketConnect(RSocket& aSocket, MActiveCallback& aCallback, TInt aPriority)
:	CActiveSocket( KName(), aSocket, aCallback, aPriority )
,	iConnectDataOut(NULL)
	{
	}
        rep->Get( KWidgetInstallerStrictMode, nokiaOnly );
        delete rep; );

    // initialize the parser and check compiled code matches lib version

#if 0
// xmllib has a memory leak, so in order to detect mem leaks outside
// of the xmllib, this code fills in the values that the parse step
// would and returns.  you have to fill in the values for the specific
// Info.plist you are installing

    _LIT( KIdentifier, "com.aws.widget.beta1" );
    _LIT( KName, "WeatherBug" );
    _LIT( KHtml, "index.html" );
    *(aPropertyValues[EBundleIdentifier]) = KIdentifier;
    *(aPropertyValues[EBundleDisplayName]) = KName();
    *(aPropertyValues[EMainHTML]) = KHtml;
    *(aPropertyValues[EAllowNetworkAccess]) = 1;
    *(aPropertyValues[ENokiaWidget]) = 0;

    // TODO: We decided to drop BundleName and just use
    // DisplayName but the registry code has errors in it and uses
    // BundleName when it should use DisplayName so as a workaround,
    // set BundleName to DisplayName.  Should eventually remove
    // BundleName from set of registry values.
    const TDesC& name = *(aPropertyValues[EBundleDisplayName]);
    *(aPropertyValues[EBundleName]) = name;

#else
    LIBXML_TEST_VERSION
CActiveSocketRead::CActiveSocketRead(RSocket& aSocket, MActiveCallback& aCallback, TInt aPriority)
:	CActiveSocket( KName(), aSocket, aCallback, aPriority )
	{
	}
CActiveSocketShutdown::CActiveSocketShutdown(RSocket& aSocket, MActiveCallback& aCallback, TInt aPriority)
:	CActiveSocket( KName(), aSocket, aCallback, aPriority )
,	iDisconnectDataOut(NULL)
	{
	}