mmshplugins/mmshaoplugin/inc/musaoplugin.h
changeset 15 ccd8e69b5392
parent 2 b31261fd4e04
child 20 e8be2c2e049d
child 22 496ad160a278
equal deleted inserted replaced
2:b31261fd4e04 15:ccd8e69b5392
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Main plugin class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MUSAOPLUGIN_H
       
    20 #define MUSAOPLUGIN_H
       
    21 
       
    22 
       
    23 #include <e32base.h>    
       
    24 #include <AlwaysOnlineEComInterface.h>
       
    25 #include <ecom/implementationproxy.h>
       
    26 #include <etel.h>    
       
    27 #include <etelmm.h>  
       
    28 #include <e32property.h>
       
    29 
       
    30 #include "musunittesting.h"
       
    31 
       
    32 // Enable the below line if Kodiak Ptt has to be monitered
       
    33 //class CMusPttCallMonitor;
       
    34 class CMusPropertyMonitor;
       
    35 class CMusTsyPropertyMonitor;
       
    36 
       
    37 IMPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount );
       
    38 
       
    39 /**
       
    40  * Main plugin class
       
    41  *
       
    42  * @lib musaoplugin.dll
       
    43  */
       
    44 class CMusAoPlugin : public CAlwaysOnlineEComInterface                      
       
    45     {
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Two-phased constructor
       
    50      *
       
    51      * @since S60 v3.2
       
    52      * @return New CMusAoPlugin instance
       
    53      */
       
    54     static CMusAoPlugin* NewL();
       
    55 
       
    56     /**
       
    57      * C++ destructor.
       
    58      */
       
    59     virtual ~CMusAoPlugin();
       
    60     
       
    61     
       
    62 public: // new API
       
    63 
       
    64     /**
       
    65      * Define start up resource properties
       
    66      *
       
    67      * @since S60 v3.2
       
    68      */
       
    69     void DefinePropertiesL();
       
    70 
       
    71     /**
       
    72      * Delete when AO end
       
    73      *
       
    74      * @since S60 v3.2
       
    75      */
       
    76 
       
    77     void DeleteProperties();
       
    78 
       
    79 private: // constructors
       
    80 
       
    81     /**
       
    82      * C++ constructor.
       
    83      */
       
    84     CMusAoPlugin();
       
    85 
       
    86     /**
       
    87      * Symbian second-phase constructor.
       
    88      */
       
    89     void ConstructL();
       
    90     
       
    91     /**
       
    92      * Utility function to define and set keys.
       
    93      */
       
    94 	void DefinePropertyL(TInt aKey,RProperty::TType aType,TInt aVal);
       
    95 
       
    96     /**
       
    97      * Utility function to define and set keys.
       
    98      */
       
    99 	void DefinePropertyL(TInt aKey,RProperty::TType aType,const TDesC& aVal);
       
   100 
       
   101     /**
       
   102      * Utility function to delete keys.
       
   103      */
       
   104 	void DeleteProperty(TInt aKey);
       
   105 	
       
   106 public: // from base class CAlwaysOnlineEComInterface
       
   107 
       
   108     /**
       
   109      *  Commands from alwaysonlinemanager to plugin
       
   110      *
       
   111      * @since S60 v3.2
       
   112      * @param aCommand, command Id
       
   113      * @param aParameters, parameter pack
       
   114      * @return return value
       
   115      */
       
   116     virtual TAny* HandleServerCommandL( TInt aCommand,
       
   117                                         TDesC8* aParameters );	
       
   118 
       
   119 private: // data
       
   120    
       
   121     /* Property Monitor  */
       
   122     CMusPropertyMonitor*      iPropertyMonitor;
       
   123 
       
   124     /** 
       
   125      *  Telephony Property Key monitor.
       
   126      *  Monitors the call connect/disconnect events.
       
   127      */
       
   128     CMusTsyPropertyMonitor*   iTsyPropertyMonitor;
       
   129 
       
   130     /* Ptt Call Monitor  */
       
   131     // Enable the below line if Kodiak Ptt has to be monitered
       
   132     // CMusPttCallMonitor*       iPttCallMonitor;
       
   133 
       
   134     /**
       
   135      * RTelServer handle
       
   136      */
       
   137     RTelServer iServer;
       
   138 
       
   139     /**
       
   140      * RMobilePhone handle
       
   141      */
       
   142     RMobilePhone iPhone;    
       
   143 
       
   144     /** 
       
   145      *  Error status.
       
   146      */
       
   147     TInt iError;
       
   148    
       
   149     MUS_UNITTEST( UT_CMusAoPlugin )
       
   150 
       
   151     };
       
   152 
       
   153 #endif // MUSAOPLUGIN_H