mmserv/tms/inc/tmsclientserver.h
changeset 0 71ca22bcf22a
child 10 3d8c721bf319
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef TMS_CLIENTSERVER_H
       
    19 #define TMS_CLIENTSERVER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <f32file.h> //for RFile
       
    23 #include <glib.h>
       
    24 
       
    25 namespace TMS {
       
    26 
       
    27 // Used for client-server communication
       
    28 enum TMSClientServerRequest
       
    29     {
       
    30     ETMSCallSessionHandle,
       
    31     ETMSGetSupportedDecodersCount,
       
    32     ETMSGetSupportedEncodersCount,
       
    33     ETMSGetSupportedDecoders,
       
    34     ETMSGetSupportedEncoders,
       
    35     ETMSSetOutput,
       
    36     ETMSGetOutput,
       
    37     ETMSGetPreviousOutput,
       
    38     ETMSGetAvailableOutputs,
       
    39     ETMSStartRoutingNotifier,
       
    40     ETMSCancelRoutingNotifier,
       
    41     ETMSSetGlobalVol,
       
    42     ETMSGetGlobalVol,
       
    43     ETMSGetMaxGlobalVol,
       
    44     ETMSSetGlobalGain,
       
    45     ETMSGetGlobalGain,
       
    46     ETMSGetMaxGlobalGain,
       
    47     ETMSStartGlobalEffectNotifier,
       
    48     ETMSCancelGlobalEffectNotifier,
       
    49     ETMSSetMsgQueueHandle,
       
    50     ETMSRingToneInitDefaultProfile,
       
    51     ETMSRingToneInitFile,
       
    52     ETMSRingToneInitMimeContent,
       
    53     ETMSRingToneDeinit,
       
    54     ETMSRingTonePlay,
       
    55     ETMSRingTonePause,
       
    56     ETMSRingToneStop,
       
    57     ETMSStartDTMFNotifier,
       
    58     ETMSCancelDTMFNotifier,
       
    59     ETMSStartDTMF,
       
    60     ETMSStopDTMF
       
    61     };
       
    62 
       
    63 // Ring tone open methods
       
    64 enum TMSToneTypeRequest
       
    65     {
       
    66     EUseProfiles,
       
    67     EFileName,
       
    68     EFileHandle,
       
    69     EDescriptor
       
    70     };
       
    71 
       
    72 // TMSServer Global Effects and Routing Publish & Subscribe property sub-key
       
    73 enum TMSGlobalEffectsPsKey
       
    74     {
       
    75     EGlobalEffectsPsVolume = 10,
       
    76     EGlobalEffectsPsGain,
       
    77     ERoutingPs,
       
    78     EDtmfPs
       
    79     };
       
    80 
       
    81 // TMSServer message queue notifier type keys
       
    82 enum TMSMsgQueueNotifierType
       
    83     {
       
    84     EMsgQueueRingtoneType,
       
    85     EMsgQueueDTMFType,
       
    86     EMsgQueueGlobalRoutingType,
       
    87     EMsgQueueGlobalVolumeType,
       
    88     EMsgQueueGlobalGainType
       
    89     };
       
    90 
       
    91 // CONSTANTS
       
    92 // TMSServer Effects and Routing Publish & Subscribe property category
       
    93 const TUid KTMSPropertyCategory = {0x10207C7C};
       
    94 
       
    95 // server name and UID
       
    96 _LIT(KTMSServerName, "tmsserver");
       
    97 const TUid KTMSServerUid3 = {0x10207C7C};
       
    98 const TUid KUidTMSCallServerUid3 = {0x10207C78};
       
    99 
       
   100 // TMS Server version
       
   101 const guint KTMSServMajorVersionNumber = 1;
       
   102 const guint KTMSServMinorVersionNumber = 0;
       
   103 const guint KTMSServBuildVersionNumber = 0;
       
   104 
       
   105 const guint KTMSMsgQSlots = 8;
       
   106 const guint KTonesBufferSize = KMaxFileName;
       
   107 
       
   108 /**
       
   109  * TmsMsgBuf
       
   110  * Used to pass async requests from the TMS client to the server and
       
   111  * callback messages from the server back to the client via MsgQueues.
       
   112  *
       
   113  * Note: RMsgQueue will raise KERN-EXEC 48 if sizeof(TmsMsgBuf):
       
   114  *       1. is not a multiple of 4 bytes
       
   115  *       2. is greater than KMaxLength (256 bytes)
       
   116  */
       
   117 struct TmsMsgBuf //max 240
       
   118     {
       
   119     gint iRequest;
       
   120     gint iStatus;
       
   121     gboolean iBool;
       
   122     gint iInt;
       
   123     gint64 iInt64;
       
   124     guint iUint;
       
   125     guint32 iUint32;
       
   126     };
       
   127 typedef TPckgBuf<TmsMsgBuf> TmsMsgBufPckg;
       
   128 
       
   129 /*
       
   130  * TRoutingMsgBuf
       
   131  */
       
   132 struct TRoutingMsgBuf
       
   133     {
       
   134     gint iOutput;
       
   135     gint iEvent;
       
   136     };
       
   137 typedef TPckgBuf<TRoutingMsgBuf> TRoutingMsgBufPckg;
       
   138 
       
   139 } //namespace TMS
       
   140 
       
   141 #endif //TMS_CLIENTSERVER_H
       
   142 
       
   143 // End of file