telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmmessagemanagerbase.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2006-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 
       
    20 #ifndef CMMMESSAGEMANAGERBASE_H
       
    21 #define CMMMESSAGEMANAGERBASE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <ctsy/serviceapi/mmtsy_ipcdefs.h>
       
    26 #include <ctsy/pluginapi/cmmdatapackage.h>
       
    27 #include "cmmmessagerouterproxy.h"
       
    28 #include <ctsy/pluginapi/mmessagerouter.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CMmPhoneTsy;
       
    32 class CTsyDelegates;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  *  Forwards Tsy requests from Symbian OS to Domestic OS
       
    38  */
       
    39 class CMmMessageManagerBase : public CBase
       
    40     {
       
    41     public:
       
    42         
       
    43         /** TTsyObjects */
       
    44        enum TTsyObjects
       
    45             {
       
    46             EPhoneTsy,
       
    47             ELineTsy,
       
    48             ECallTsy,
       
    49             EFaxTsy,
       
    50             ESmsMessagingTsy,
       
    51             EBroadcastMessagingTsy,
       
    52             EUssdMessagingTsy,
       
    53             EPhoneStoreTsy,
       
    54             ESmsStoreTsy,
       
    55             ENamStoreTsy,
       
    56             EONStoreTsy,
       
    57             EENStoreTsy,
       
    58             EPhoneBookStoreTsy,
       
    59             EConferenceCallTsy,
       
    60             EPacketDataTsy,
       
    61             ESatTsy,
       
    62             ECustomTsy,
       
    63             EDtmfTsy,
       
    64             ESecurityTsy,
       
    65             //ECustomExtTsy
       
    66 
       
    67             EMaxNumOfTsyObjects
       
    68             };
       
    69             
       
    70     public:  // Constructors and destructor
       
    71         
       
    72         /**
       
    73          * Creates a new CMmMessageManagerBase object
       
    74          *
       
    75          *
       
    76          * @return reference to created CMmMessageManagerBase type of object
       
    77          */
       
    78         IMPORT_C static CMmMessageManagerBase* NewL();
       
    79 
       
    80         /**
       
    81          * Destructor
       
    82          */
       
    83         virtual ~CMmMessageManagerBase();
       
    84 
       
    85         /**
       
    86          * Creates and initialises class attributes
       
    87          */
       
    88         void ConstructL();
       
    89         
       
    90         /**
       
    91          * Stores Phonetsy pointer
       
    92          *          
       
    93          *
       
    94          * @param aMmPhone pointer to Phonetsy
       
    95          */
       
    96         IMPORT_C void SetPhoneTsy( CMmPhoneTsy* aMmPhone );
       
    97         
       
    98         /**
       
    99          * Returns pointer to messagemanagercallback
       
   100          *
       
   101          *
       
   102          * @return pointer to messagemanagercallback object 
       
   103          */
       
   104         IMPORT_C MmMessageManagerCallback* GetMessageManagerCallback();
       
   105 
       
   106     public:  // New functions
       
   107     
       
   108         /**
       
   109          * Forwards a request to DOS layer, request doesn't contain data
       
   110          *          
       
   111          *
       
   112          * @param aIpc
       
   113          * @return error value
       
   114          */
       
   115         virtual TInt HandleRequestL( 
       
   116             const TInt aIpc );
       
   117 
       
   118         /**
       
   119          * Forwards a request to DOS layer, request contains 
       
   120          * packaged data by Common TSY
       
   121          *          
       
   122          *
       
   123          * @param aIpc
       
   124          * @param aDataPackage
       
   125          * @return error value
       
   126          */
       
   127         virtual TInt HandleRequestL( 
       
   128             const TInt aIpc,
       
   129             const CMmDataPackage* aDataPackage );
       
   130 
       
   131         /**
       
   132          * Forwards a request to DOS layer, request contains 
       
   133          * packaged data by Etel Server.
       
   134          *          
       
   135          *
       
   136          * @param aIpc
       
   137          * @param aDataPackage
       
   138          * @return error value
       
   139          */
       
   140         virtual TInt HandleRequestL(    
       
   141             const TInt aIpc,
       
   142             const TDataPackage* aDataPackage );
       
   143 
       
   144         /**
       
   145          * Registers a Tsy object for request and notification completions
       
   146          *          
       
   147          *
       
   148          * @param aTsyObjectType
       
   149          * @param aTsyObject
       
   150          */
       
   151         virtual void RegisterTsyObject( TTsyObjects aTsyObjectType, 
       
   152             CBase* aTsyObject );
       
   153 
       
   154         /**
       
   155          * Deregisters a Tsy object for request and notification completions
       
   156          *          
       
   157          *
       
   158          * @param aTsyObject
       
   159          */
       
   160         virtual void DeregisterTsyObject( CBase* aTsyObject );
       
   161 
       
   162         /** 
       
   163          * Sets the message router object
       
   164          *              
       
   165          *
       
   166          * @param aMessageRouter
       
   167          */
       
   168         IMPORT_C void SetMessageRouter( MMessageRouter* aMessageRouter );
       
   169         
       
   170     private:
       
   171 
       
   172         /**
       
   173          * C++ default constructor.
       
   174          */
       
   175         CMmMessageManagerBase();
       
   176 
       
   177     protected:  // Data
       
   178 
       
   179         /**
       
   180          * writing package for Handlers 
       
   181          */              
       
   182         CMmDataPackage iDataPackage;
       
   183         
       
   184         /** 
       
   185          * Pointer to Messagerouter
       
   186          * own
       
   187          */         
       
   188         CMmMessageRouterProxy* iMessageRouterProxy;
       
   189         
       
   190         /**
       
   191          * Pointer to tsydelegates
       
   192          * own
       
   193          */
       
   194          CTsyDelegates* iTsyDelgates;
       
   195          
       
   196         /**
       
   197          * Pointer to phonetsy
       
   198          * not own
       
   199          */
       
   200          CMmPhoneTsy* iMmPhone;
       
   201          
       
   202         /**
       
   203          * Pointer to messagerouter
       
   204          */
       
   205          MMessageRouter* iMessageRouter;
       
   206          
       
   207     };
       
   208     
       
   209 #endif // CMMMESSAGEMANAGERBASE_H
       
   210 
       
   211 //  End of file