multimediacommsengine/mmcesrv/mmceserver/inc/mcecsserveritc.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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 
       
    21 #ifndef CMCECSSERVERITC_H
       
    22 #define CMCECSSERVERITC_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <bamdesca.h>
       
    27 #include "mceclientserver.h"
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  ITC helper class for MCE server.
       
    33 *
       
    34 *  @lib 
       
    35 *  @since
       
    36 */
       
    37 class CMceCsServerITC : public CBase
       
    38 	{
       
    39 	public: // Constructors and destructor
       
    40     
       
    41 		/**
       
    42 		* Two-phased constructor.
       
    43 		*/
       
    44 		static CMceCsServerITC* NewL();
       
    45 
       
    46 		/**
       
    47 		* Two-phased constructor.
       
    48 		*/
       
    49 		static CMceCsServerITC* NewLC();
       
    50 
       
    51 		/**
       
    52 		* Destructor.
       
    53 		*/
       
    54 		~CMceCsServerITC ();
       
    55         
       
    56 	public: // New
       
    57 
       
    58 		/**
       
    59 		* Writes desctructor to client.
       
    60 		* @param aMessage, message of the client.
       
    61 		* @param aDes, descriptor to be written.
       
    62 		* @param aItcArgIndex, index of ITC argument.
       
    63 		*/
       
    64 		void WriteL (const RMessage2& aMessage,
       
    65 					 const TDesC8& aDes,
       
    66 					 TMceItcArguments aItcArgIndex) const;
       
    67 
       
    68 		/**
       
    69 		* Writes ids to client.
       
    70 		* @param aMessage, message of the client.
       
    71 		* @param aIds, ids to be written.
       
    72 		*/
       
    73 		void WriteL (const RMessage2& aMessage,
       
    74 					 const TMceIds& aIds) const;
       
    75 
       
    76 		/**
       
    77 		* Writes sizes to client.
       
    78 		* @param aMessage, message of the client.
       
    79 		* @param aSizes, sizes to be written.
       
    80 		*/
       
    81 		void WriteL (const RMessage2& aMessage,
       
    82                      const TMceMessageBufSizes aSizes) const;
       
    83 		    
       
    84 		/**
       
    85 		* Reads ids from the client.
       
    86 		* @param aMessage, message of the client.
       
    87 		* @return ids from the client.
       
    88 		*/
       
    89 		TMceIds ReadMCEIdsL (const RMessage2& aMessage) const;
       
    90 
       
    91 		/**
       
    92 		* Reads TUint32 from the client.
       
    93 		* @param aMessage, message of the client.
       
    94 		* @param aItcArgIndex, index of ITC argument.
       
    95 		* @return value from the client.
       
    96 		*/
       
    97 		TUint32 ReadTUint32L (const RMessage2& aMessage,
       
    98 					   TMceItcArguments aItcArgIndex) const;
       
    99 
       
   100 		/**
       
   101 		* Reads Tint from the client.
       
   102 		* @param aMessage, message of the client.
       
   103 		* @param aItcArgIndex, index of ITC argument.
       
   104 		* @return value from the client.
       
   105 		*/
       
   106 		TInt ReadIntL (const RMessage2& aMessage,
       
   107 					   TMceItcArguments aItcArgIndex) const;
       
   108                    
       
   109 		/**
       
   110 		* Reads descriptor from the client.
       
   111 		* @param aMessage, message of the client.
       
   112 		* @param aItcArgIndex, index of ITC argument.
       
   113 		* @return value from the client.
       
   114 		*/
       
   115 		HBufC8* ReadLC (const RMessage2&  aMessage,
       
   116 						TMceItcArguments aItcArgIndex) const;
       
   117 
       
   118 		/**
       
   119 		* Reads function of the message.
       
   120 		* @param aMessage, message of the client.
       
   121 		* @return function value from the message.
       
   122 		*/
       
   123 		TInt Function (const RMessage2& aMessage) const;
       
   124 
       
   125 		/**
       
   126 		* Completes the message.
       
   127 		* @param aMessage, message of the client.
       
   128 		* @param aCompletionCode, code used for completing.
       
   129 		*/
       
   130 		void Complete (const RMessage2& aMessage,
       
   131                        TInt aCompletionCode) const;
       
   132 
       
   133 		/**
       
   134 		* Panics the client.
       
   135 		* @param aMessage, message of the client.
       
   136 		* @param aPanic, pacic code used.
       
   137 		*/
       
   138 		void PanicClient(const RMessage2& aMessage, TInt aPanic) const;
       
   139 
       
   140 	private:
       
   141 
       
   142 		CMceCsServerITC ();
       
   143 
       
   144 		const TAny* ITCArgPtr (TMceItcArguments aItcArgIndex,
       
   145 							   const RMessage2&  aMessage) const;
       
   146 
       
   147 		TInt ITCArgInt (TMceItcArguments aItcArgIndex,
       
   148 						const RMessage2&  aMessage) const;
       
   149 
       
   150 		void WriteL (TMceItcArguments aItcArgIndex,
       
   151 					 const RMessage2&  aMessage,
       
   152 					 const TDesC8&    aDes) const;
       
   153 
       
   154 		HBufC8* ReadL (const RMessage2&  aMessage,
       
   155 					   TMceItcArguments aItcArgIndex) const;
       
   156 
       
   157 	};
       
   158 
       
   159 #endif 
       
   160 
       
   161 // End of File