|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Defines constants, structs and enumerated list of opcodes |
|
15 * used for message passing between the client and the server. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __VOIPAUDIOCLIENTSERVER_H |
|
20 #define __VOIPAUDIOCLIENTSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> //for RFile |
|
24 #include <voipaudiocommon.h> |
|
25 |
|
26 // Used for client-server communication |
|
27 enum TVoIPAudioClientServerRequest |
|
28 { |
|
29 EVoIPSetDecoderPriority, |
|
30 EVoIPSetEncoderPriority, |
|
31 EVoIPGetSupportedDecoders, |
|
32 EVoIPGetSupportedEncoders, |
|
33 EVoIPGetSupportedDecodersCount, |
|
34 EVoIPGetSupportedEncodersCount, |
|
35 EVoIPSetDecoder, |
|
36 EVoIPSetEncoder, |
|
37 EVoIPOpenDownlink, |
|
38 EVoIPOpenUplink, |
|
39 EVoIPStartDownlink, |
|
40 EVoIPStartUplink, |
|
41 EVoIPStopDownlink, |
|
42 EVoIPStopUplink, |
|
43 EVoIPCloseDownlink, |
|
44 EVoIPCloseUplink, |
|
45 EVoIPGetMaxVolume, |
|
46 EVoIPGetVolume, |
|
47 EVoIPSetVolume, |
|
48 EVoIPGetMaxGain, |
|
49 EVoIPSetGain, |
|
50 EVoIPGetGain, |
|
51 EVoIPSetAudioDevice, |
|
52 EVoIPGetAudioDevice, |
|
53 EVoIPBufferFilled, |
|
54 EVoIPBufferEmptied, |
|
55 |
|
56 //added for CI support |
|
57 EVoIPSetIlbcCodecMode, |
|
58 EVoIPGetIlbcCodecMode, |
|
59 EVoIPSetG711CodecMode, |
|
60 EVoIPGetG711CodecMode, |
|
61 EVoIPGetSupportedBitratesCount, |
|
62 EVoIPGetSupportedBitrates, |
|
63 EVoIPSetBitrate, |
|
64 EVoIPGetBitrate, |
|
65 EVoIPFrameModeRqrdForEC, |
|
66 EVoIPSetFrameMode, |
|
67 EVoIPGetFrameMode, |
|
68 EVoIPConcealErrForNextBuf, |
|
69 EVoIPSetVad, |
|
70 EVoIPGetVad, |
|
71 EVoIPSetCng, |
|
72 EVoIPGetCng, |
|
73 EVoIPSetPlc, |
|
74 EVoIPGetPlc, |
|
75 EVoIPBadLsfNextBuffer, |
|
76 EVoIPOpenDTMFTonePlayer, |
|
77 EVoIPPlayDTMFTone, |
|
78 EVoIPStopDTMFTone, |
|
79 EVoIPCloseDTMFTonePlayer, |
|
80 EVoIPOpenRingTonePlayerFromFile, |
|
81 EVoIPOpenRingTonePlayerFromRFile, |
|
82 EVoIPOpenRingTonePlayerFromProfile, |
|
83 EVoIPOpenRingTonePlayerFromDes, |
|
84 EVoIPPlayRingTone, |
|
85 EVoIPPauseRingTone, |
|
86 EVoIPResumeRingTone, |
|
87 EVoIPStopRingTone, |
|
88 EVoIPCloseRingTonePlayer, |
|
89 EVoIPConfigJitterBuffer, |
|
90 EVoIPResetJitterBuffer, |
|
91 EVoIPJBDelayDown, |
|
92 EVoIPJBDelayUp, |
|
93 |
|
94 EVoIPSessionClose |
|
95 }; |
|
96 |
|
97 // Ring tone open methods |
|
98 enum TVoIPToneTypeRequest |
|
99 { |
|
100 EUseProfiles, |
|
101 EFileName, |
|
102 EFileHandle, |
|
103 EDescriptor |
|
104 }; |
|
105 |
|
106 // CONSTANTS |
|
107 _LIT(KDnLinkQueue, "VoIPDnLinkQueue"); |
|
108 _LIT(KUpLinkQueue, "VoIPUpLinkQueue"); |
|
109 _LIT(KDnLinkComQueue, "VoIPDnLinkComQueue"); //ITC to dnlink client API |
|
110 _LIT(KUpLinkComQueue, "VoIPUpLinkComQueue"); //ITC to uplink client API |
|
111 _LIT(KDnLinkThreadComQueue, "VoIPDnLinkThreadComQueue"); //ITC to dnlink thread |
|
112 _LIT(KUpLinkThreadComQueue, "VoIPUpLinkThreadComQueue"); //ITC to uplink thread |
|
113 _LIT(KRingToneComQueue, "VoIPRingToneComQueue"); |
|
114 _LIT(KDTMFToneComQueueUPL, "VoIPDTMFToneComQueueUPL"); |
|
115 _LIT(KDTMFToneComQueueDNL, "VoIPDTMFToneComQueueDNL"); |
|
116 _LIT(KChunkDNL, "VoIP_DNL"); |
|
117 _LIT(KChunkUPL, "VoIP_UPL"); |
|
118 |
|
119 // server name and UID |
|
120 _LIT(KVoIPServerName,"VoIPAudioServer"); |
|
121 const TUid KVoIPServerUid3 = {0x10207B9E}; |
|
122 |
|
123 // VoIP Server version |
|
124 const TUint KVoIPServMajorVersionNumber = 1; |
|
125 const TUint KVoIPServMinorVersionNumber = 0; |
|
126 const TUint KVoIPServBuildVersionNumber = 0; |
|
127 |
|
128 const TUint KVoIPMsgQSlots = 1; |
|
129 const TUint KVoIPMsgComQSlots = 4; |
|
130 |
|
131 const TUint KTonesBufferSize = KMaxFileName; |
|
132 |
|
133 /** |
|
134 * TVoIPMsgBuf |
|
135 * Used to pass async requests from the voip client to the server and |
|
136 * callback messages from the server back to the client via MsgQueues. |
|
137 * |
|
138 * Note: RMsgQueue will raise KERN-EXEC 48 if sizeof(TVoIPMsgBuf): |
|
139 * 1. is not a multiple of 4 bytes |
|
140 * 2. is greater than KMaxLength (256 bytes) |
|
141 */ |
|
142 struct TVoIPMsgBuf //max 240 |
|
143 { |
|
144 TInt iRequest; |
|
145 TInt iStatus; |
|
146 TBool iBool; |
|
147 TInt iInt; //bufferSize |
|
148 TInt64 iInt64; //time stamp |
|
149 TUint iUint; |
|
150 TUint32 iUint32; |
|
151 }; |
|
152 |
|
153 typedef TPckgBuf<TVoIPMsgBuf> TVoIPMsgBufPckg; |
|
154 |
|
155 /** |
|
156 * TTonesMsgBuf |
|
157 * Used to pass tone data from the voip client to the server. |
|
158 * Callback messages from the server back to the client go through |
|
159 * MsgQueue using TVoIPMsgBuf. |
|
160 */ |
|
161 struct TTonesMsgBuf |
|
162 { |
|
163 TInt iRequest; |
|
164 TInt iStatus; |
|
165 TInt64 iDuration; |
|
166 RFile iFileHandle; |
|
167 TBuf<KTonesBufferSize> iFileName; |
|
168 }; |
|
169 |
|
170 typedef TPckgBuf<TTonesMsgBuf> TTonesMsgBufPckg; |
|
171 |
|
172 #endif //__VOIPAUDIOCLIENTSERVER_H |
|
173 |
|
174 // End of file |