idlefw/tsrc/mcsplugin/mt_mcsplugin/mt_mcsplugin.h
branchRCL_3
changeset 28 053c6c7c14f3
equal deleted inserted replaced
27:2c7f27287390 28:053c6c7c14f3
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MT_MCSPLUGIN_H__
       
    20 #define __MT_MCSPLUGIN_H__
       
    21 
       
    22 //  EXTERNAL INCLUDES
       
    23 #include <digia/eunit/ceunittestsuiteclass.h>
       
    24 
       
    25 // #include <aiscutdefs.h>
       
    26 #include <hscontentpublisher.h>
       
    27 // #include <aipropertyextension.h>
       
    28 // #include <aieventhandlerextension.h>
       
    29 #include <apgcli.h>
       
    30 #include <aknappui.h>
       
    31 #include <aiutility.h>
       
    32 #include <aknkeylock.h>
       
    33 #include <mcsplugin.h>
       
    34 
       
    35 //  INTERNAL INCLUDES
       
    36 
       
    37 //  FORWARD DECLARATIONS
       
    38 class MAiPluginSettings;
       
    39 class MAiPluginSettingsItem;
       
    40 class CRepository;
       
    41 class CAiContentPublisher;
       
    42 class Observer;
       
    43 // class MAiPropertyExtension;
       
    44 class CAiCallStatusObserver;
       
    45 class CAiFw;
       
    46 class CAiSystemStateManager;
       
    47 class CAiPluginActivityRegistry;
       
    48 class CAiBackupRestoreStatusObserver;
       
    49 class CAiSystemStateManager;
       
    50 
       
    51 typedef RPointerArray<MAiPluginSettings> RAiSettingsItemArray;
       
    52 
       
    53 #include <e32def.h>
       
    54 #include <msvapi.h>
       
    55 
       
    56 #ifndef NONSHARABLE_CLASS
       
    57 #define NONSHARABLE_CLASS(x) class x
       
    58 #endif
       
    59 
       
    60 //  CLASS DEFINITION
       
    61 /**
       
    62  *
       
    63  * EUnitWizard generated test class.
       
    64  *
       
    65  */
       
    66 NONSHARABLE_CLASS( MT_mcsplugin )
       
    67     : public CEUnitTestSuiteClass,
       
    68     public MMsvSessionObserver  //, public CAknAppUi
       
    69 {
       
    70 public:     // Constructors and destructors
       
    71 
       
    72     /**
       
    73      * Two phase construction
       
    74      */
       
    75     /*IMPORT_C*/ static MT_mcsplugin* NewL();
       
    76 
       
    77     /*IMPORT_C*/ static MT_mcsplugin* NewLC();
       
    78 
       
    79     /**
       
    80      * Destructor
       
    81      */
       
    82     ~MT_mcsplugin();
       
    83 
       
    84 private:    // Constructors and destructors
       
    85 
       
    86     MT_mcsplugin();
       
    87 
       
    88     void ConstructL();
       
    89 
       
    90 public:     // From observer interface
       
    91 
       
    92 private:    // New methods
       
    93 
       
    94     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
       
    95 
       
    96     /*################# SetupL ####################
       
    97      Called everytime at first
       
    98      to prepare plugin for test
       
    99      #############################################*/
       
   100     void SetupL();
       
   101 
       
   102     void EmptySetupL();
       
   103 
       
   104     /*############### TeardownL ###################
       
   105      Called everytime to deconstruct the plugin
       
   106      #############################################*/
       
   107     void Teardown();
       
   108 
       
   109     /*############### TestResumeL #################
       
   110      Tests ResumeL from caiscutplugin,
       
   111      ResumeL is called in SetupL but in this
       
   112      function plugin is suspended before
       
   113      #############################################*/
       
   114     void TestResumeL();
       
   115 
       
   116     /*############## TestSuspendL ################
       
   117      Tests if SuspendL pass
       
   118      #############################################*/
       
   119     void TestSuspendL();
       
   120 
       
   121     /*############## TestSubscribeL ###############
       
   122      Tests SubscribeL
       
   123      #############################################*/
       
   124     void TestSubscribeL();
       
   125 
       
   126     /*############# TestGetPropertyL ##############
       
   127      Tests getting property information from plugin
       
   128      #############################################*/
       
   129     void TestGetPropertyL();
       
   130 
       
   131     void TestFreeEngineL();
       
   132 
       
   133     void TestHandleEventErrorHandling();
       
   134 
       
   135 private:    // Data
       
   136 
       
   137     EUNIT_DECLARE_TEST_TABLE;
       
   138 
       
   139     // CAiContentPublisher*                iPlugin;
       
   140     CHsContentPublisher*                iPlugin;
       
   141 
       
   142     Observer*                           iContentObserver;
       
   143 
       
   144     // MAiEventHandlerExtension*           iPluginEventHandler;
       
   145 };
       
   146 
       
   147 #endif      //  __MT_MCSPLUGIN_H__
       
   148 
       
   149 // End of file