telephonyserverplugins/licenseetsystub/licensee_tsy_stub/inc/cmmmessagerouter.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 
       
    14 #ifndef CMMMESSAGEROUTER_H
       
    15 #define CMMMESSAGEROUTER_H
       
    16 
       
    17 //  INCLUDES
       
    18 #include <ctsy/mltsyfactory.h>
       
    19 #include <ctsy/pluginapi/mmessagerouter.h>
       
    20 #include <ctsy/pluginapi/mmmessagemanagercallback.h>
       
    21 #include <ctsy/serviceapi/ctsysatmessagingbase.h>
       
    22 #include "cmmmockmesshandler.h"
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CMmMockMessHandler;
       
    26 class CTsySatMessaging;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31  * Routes between Tsy objects and Message Handler objects
       
    32  *
       
    33  */
       
    34 class CMmMessageRouter: public CBase, 
       
    35 	public MLtsyFactoryV1, public MMessageRouter
       
    36     {        
       
    37     public:    // Constructors and destructor
       
    38         
       
    39         /**
       
    40          * Two-phased constructor.
       
    41          * @param aMessageManager
       
    42          */      
       
    43         static CMmMessageRouter* NewL();
       
    44 
       
    45         /**
       
    46          * Destructor
       
    47          */
       
    48         virtual ~CMmMessageRouter();
       
    49 
       
    50         // New functions
       
    51     
       
    52         /**
       
    53          * Returns pointer to the message handler for this 
       
    54          * request, based on IPC number
       
    55          *          
       
    56          * @param aIpc IPC number of request
       
    57          * @return Pointer to the message handler
       
    58          */
       
    59         virtual MMmMessHandlerBase* RouteRequest( TInt aIpc );   
       
    60 
       
    61         /**
       
    62          * Returns pointer to message manager callback
       
    63          *          
       
    64          * @return Pointer to the message manager callback
       
    65          */
       
    66         MmMessageManagerCallback* MessageManager();
       
    67         
       
    68         /**
       
    69          * From MLtsyFactoryV1
       
    70          * Returns pointer to message router interface
       
    71          *          
       
    72          * @param aMessageManager Message manager callback
       
    73          * @return Pointer to the message router
       
    74          */
       
    75         MMessageRouter* GetMessageRouter( 
       
    76             MmMessageManagerCallback& aMessageManager );
       
    77 
       
    78 
       
    79         /**
       
    80          * Returns pointer to SAT messaging base
       
    81          *          
       
    82          * @return Pointer to the SAT messaging service
       
    83          */
       
    84         CTsySatMessagingBase* GetSatMessagingService();  
       
    85 
       
    86         /**
       
    87          * From MLtsyFactoryV1
       
    88          * Returns pointer to SAT messaging base
       
    89          *          
       
    90          * @param aSatMessagingService SAT service
       
    91          * @return Pointer to the SAT messaging service
       
    92          */        
       
    93         CTsySatMessagingBase* GetSatMessagingService(MCtsySatService &aSatMessagingService);  
       
    94         
       
    95         /**
       
    96          * From MLtsyFactoryBase
       
    97          * Returns interface version used by the LTSY 
       
    98          *          
       
    99          * @return Interface version
       
   100          */
       
   101         MLtsyFactoryBase::TCtsyInterfaceVersion Version();
       
   102         
       
   103         /**
       
   104          * From MLtsyFactoryBase
       
   105          * Release the created LTSY object(s)
       
   106          *          
       
   107          */
       
   108         void Release(); 
       
   109         
       
   110         /**
       
   111          * From MMessageRouter
       
   112          * Directs requests to LTSY
       
   113          * 
       
   114          * @param aIpc ipc number of request
       
   115          * @param aDataPackage data to LTSY
       
   116          * @return error value
       
   117          */
       
   118         TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage );
       
   119         
       
   120     private:
       
   121         
       
   122         /**
       
   123          * C++ default constructor
       
   124          */
       
   125         CMmMessageRouter();
       
   126         
       
   127         /**
       
   128          * By default Symbian 2nd phase constructor is private.
       
   129          */
       
   130         void ConstructL();
       
   131 
       
   132         /**
       
   133          * Initialises needed store(s) and timer(s).
       
   134          *          
       
   135          */
       
   136         void InitL();
       
   137 
       
   138         /**
       
   139          * Initialises messagehandlers modules.
       
   140          *          
       
   141          */
       
   142         void InitModulesL();
       
   143 
       
   144     protected:// Data
       
   145         
       
   146         /**
       
   147          * Pointer to mock message handler
       
   148          * Own.         
       
   149          */ 
       
   150         CMmMockMessHandler* iMmMockMessHandler;
       
   151         
       
   152     private:    // Data
       
   153 
       
   154         /**
       
   155          * Pointer to Call Message manager
       
   156          * Own.         
       
   157          */         
       
   158         MmMessageManagerCallback* iMessageManager;
       
   159         
       
   160         /**
       
   161          * Pointer to SAT service provider
       
   162          * Own.         
       
   163          */
       
   164         CTsySatMessagingBase* iSatService;
       
   165 
       
   166     };
       
   167 
       
   168 
       
   169 #endif // CMMMESSAGEROUTER_H
       
   170 
       
   171 //  End of File