telephonyserverplugins/common_tsy/commontsy/inc/mmutility/CMmTsyBase.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
child 69 b982c3e940f3
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 _CMMTSYBASE_H
       
    21 #define _CMMTSYBASE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CMmSubTsyBase.h"
       
    25 #include "MmTsy_timeoutdefs.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30  *  CMmTsyBase contains functionality common to all TSY objects.
       
    31  *  It also provides default implementations to some of the virtual 
       
    32  *  functions.
       
    33  */
       
    34 NONSHARABLE_CLASS( CMmTsyBase ) : public CSubSessionExtBase
       
    35     {
       
    36     public: // Constructors and destructor
       
    37 
       
    38         /**
       
    39          * Constructor
       
    40          */
       
    41         CMmTsyBase();
       
    42     
       
    43         /**
       
    44          * Destructor
       
    45          */
       
    46         virtual ~CMmTsyBase();
       
    47         
       
    48         // New functions
       
    49 
       
    50         /**
       
    51          * Initialisation method
       
    52          */
       
    53         virtual void Init();
       
    54 
       
    55         /**
       
    56          * New instances are created by given name. By default: not supported  
       
    57          * and should never be called. Leaves.
       
    58          *          
       
    59          * 
       
    60          * @param  aName a name
       
    61          * @return CTelObject 
       
    62          */
       
    63         virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); 
       
    64     
       
    65         /**
       
    66          * New instances are created by given name. By default: not supported  
       
    67          * and should never be called. Leaves.
       
    68          *          
       
    69          * 
       
    70          * @param aNewName a name
       
    71          * @return CTelObject
       
    72          */
       
    73         virtual CTelObject* OpenNewObjectL(TDes& aNewName); 
       
    74     
       
    75         /**
       
    76          * Returns request mode for given IPC number.
       
    77          *          
       
    78          * 
       
    79          * @param anIpc an interprocess communication command identifier
       
    80          * @return TInt the ReqMode corresponding to given IPC
       
    81          */
       
    82         virtual CTelObject::TReqMode ReqModeL( const TInt anIpc );
       
    83     
       
    84         /**
       
    85          * Returns number of slots to be used for given IPC.
       
    86          *          
       
    87          * 
       
    88          * @param  anIpc an interprocess communication command identifier
       
    89          * @return TInt the number of slots reserved for a given IPC
       
    90          */
       
    91         virtual TInt NumberOfSlotsL( const TInt anIpc );
       
    92 
       
    93         /**
       
    94          * Cancels request of which IPC number and request handle are given in 
       
    95          * parameters.
       
    96          *          
       
    97          * 
       
    98          * @param anIpc an interprocess communication command identifier
       
    99          * @param aTsyReqHandle Request handle
       
   100          * @return TInt KErrGeneral if unknown IPC
       
   101          */
       
   102         virtual TInt CancelService(const TInt anIpc,
       
   103                                    const TTsyReqHandle aTsyReqHandle );
       
   104     
       
   105         /**
       
   106          * Register given notification.
       
   107          *          
       
   108          * 
       
   109          * @param anIpc: an interprocess communication command identifier
       
   110          * @return TInt KErrNotSupported
       
   111          */
       
   112         virtual TInt RegisterNotification( const TInt anIpc );
       
   113     
       
   114         /**
       
   115          * Deregister given notification.
       
   116          *          
       
   117          * 
       
   118          * @param anIpc: an interprocess communication command identifier
       
   119          * @return TInt KErrNotSupported
       
   120          */
       
   121         virtual TInt DeregisterNotification( const TInt anIpc );
       
   122     
       
   123         /**
       
   124          * Gives pointer to the array of TSY's subsystems.
       
   125          *          
       
   126          * 
       
   127          * @return CMmSubTsyBase** Array of pointers to CMmSubTsyBase classes
       
   128          */
       
   129         virtual CMmSubTsyBase** GetSubsystemArrayPtr() = 0;
       
   130     
       
   131         /**
       
   132          * Gives the maximun number of TSY's subsystems.
       
   133          * 
       
   134          * @return TInt number of subsystems
       
   135          */
       
   136         virtual TInt GetMaxNumberOfSubsystems() = 0;
       
   137 
       
   138 #ifdef REQHANDLE_TIMER
       
   139 
       
   140         /**
       
   141          * Calls the needed complete method due timer expiration
       
   142          *          
       
   143          * 
       
   144          * @param aReqHandleType req handle type.
       
   145          * @param aError error value
       
   146          * @param aIPC IPC value
       
   147          */
       
   148         virtual void Complete( TInt aReqHandleType, TInt aError, TInt aIPC);
       
   149 
       
   150 #endif //REQHANDLE_TIMER 
       
   151 
       
   152         /**
       
   153          * Handles extended client requests. Uses TRAP to ensure functioning  
       
   154          * on memory allocation failure.
       
   155          *          
       
   156          * 
       
   157          * @param aTsyReqHandle Request handle
       
   158          * @param aPackage reference to a data package
       
   159          * @return KErrNone if request accepted, else several possibilities
       
   160          *         depending on IPC
       
   161          */
       
   162         virtual TInt DoBaseExtFuncL(const TTsyReqHandle aTsyReqHandle,
       
   163                                     const TInt anIpc,
       
   164                                     const TDataPackage& aPackage);
       
   165 
       
   166     };
       
   167 
       
   168 #endif // CMMTSYBASE_H
       
   169 
       
   170 //  End of file