⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mguardpimmgrtest.cpp,v

📁 symbian s60手机上的短信拦截源代码。
💻 CPP,V
字号:
head     1.1;branch   1.1.1;access   ;symbols 	arelease:1.1.1.1	avendor:1.1.1;locks    ; strict;comment  @// @;1.1date     2007.07.24.10.59.30;  author administrator;  state Exp;branches 1.1.1.1;next     ;deltatype   text;permissions	644;1.1.1.1date     2007.07.24.10.59.30;  author administrator;  state Exp;branches ;next     ;permissions	644;desc@@1.1log@Initial revision@text@/*-----------------------------------------------------------------------------    MGuardPIMMgrTest.cpp - test application source-----------------------------------------------------------------------------*///  Include Files#include "MGuardPIMMgrTest.h"#include <MGuardPIMMgr.h>   // CMGuardPIMMgr#include <uikon.hrh>            // command codes#include <eikenv.h>             // CEikonEnv//  Constantsconst TUid KUidMGuardPIMMgrTestApp = { 0x04438435 };    // random temporary UID//  Member FunctionsCApaDocument* CMGuardPIMMgrTestApplication::CreateDocumentL()    {    return new (ELeave) CMGuardPIMMgrTestDocument(*this);    }TUid CMGuardPIMMgrTestApplication::AppDllUid() const    {    return KUidMGuardPIMMgrTestApp;    }CMGuardPIMMgrTestDocument::CMGuardPIMMgrTestDocument(CEikApplication& aApp) : CEikDocument(aApp)    {    }CEikAppUi* CMGuardPIMMgrTestDocument::CreateAppUiL()    {    return new (ELeave) CMGuardPIMMgrTestAppUi;    }void CMGuardPIMMgrTestAppUi::ConstructL(void)    {    BaseConstructL();    // Create new instance of CMGuardPIMMgr object to test mguardpimmgr.dll    iMGuardPIMMgrObject = CMGuardPIMMgr::NewL();    }CMGuardPIMMgrTestAppUi::~CMGuardPIMMgrTestAppUi()    {    delete iMGuardPIMMgrObject;    }void CMGuardPIMMgrTestAppUi::ShowInfoL(const TDesC& aDes1, const TDesC& aDes2)    {    TBuf<256> buffer;    const TInt KHalfSecond = 500000;    buffer.Copy(aDes1);    buffer.Append(aDes2);    iEikonEnv->InfoMsg(buffer);    User::After(KHalfSecond);    }void CMGuardPIMMgrTestAppUi::HandleCommandL(TInt aCommand)    {    _LIT(KTest1, "Test1: ");    _LIT(KTest2, "Test2: ");    TInt ch;    switch (aCommand)        {        case EEikCmdFileOpen:           // Test 1            ShowInfoL(KTest1, iMGuardPIMMgrObject->ExampleFuncString());            for(ch = 'A'; ch <= 'O'; ch++)                {                iMGuardPIMMgrObject->ExampleFuncAddCharL(ch);                ShowInfoL(KTest1, iMGuardPIMMgrObject->ExampleFuncString());                }            ShowInfoL(KTest1, iMGuardPIMMgrObject->ExampleFuncString());            break;        case EEikCmdFileOpenAnother:    // Test 2            ShowInfoL(KTest2, iMGuardPIMMgrObject->ExampleFuncString());            for(ch = 1; ch <= 20; ch++)                {                iMGuardPIMMgrObject->ExampleFuncRemoveLast();                ShowInfoL(KTest2, iMGuardPIMMgrObject->ExampleFuncString());                }            ShowInfoL(KTest2, iMGuardPIMMgrObject->ExampleFuncString());            break;        case EEikCmdExit:            Exit();            break;        default:            break;        }    }//  Global Functions#ifdef __WINS__GLDEF_C TInt E32Dll(TDllReason /*aReason*/)    {    return KErrNone;    }#endif//  Exported FunctionsEXPORT_C CApaApplication* NewApplication()    {    return new CMGuardPIMMgrTestApplication;    }// End of file@1.1.1.1log@no message@text@@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -