sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file
|
sl@0
|
20 |
@internalTechnology
|
sl@0
|
21 |
*/
|
sl@0
|
22 |
|
sl@0
|
23 |
#ifndef MMRCCLIENTSERVER_H
|
sl@0
|
24 |
#define MMRCCLIENTSERVER_H
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <e32base.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
enum TReason
|
sl@0
|
29 |
{
|
sl@0
|
30 |
EUninitialize,
|
sl@0
|
31 |
EInitialize,
|
sl@0
|
32 |
EUnload,
|
sl@0
|
33 |
ELoad,
|
sl@0
|
34 |
EStop,
|
sl@0
|
35 |
EPrimeReason,
|
sl@0
|
36 |
EActivate,
|
sl@0
|
37 |
EReasonError
|
sl@0
|
38 |
};
|
sl@0
|
39 |
|
sl@0
|
40 |
// Function opcodes for client to server messaging
|
sl@0
|
41 |
enum TMMRCClientToServerMessages
|
sl@0
|
42 |
{
|
sl@0
|
43 |
EMMRCClientToServerSetClientThreadId = 0,
|
sl@0
|
44 |
EMMRCClientToServerSetMsgQueueHandle,
|
sl@0
|
45 |
EMMRCClientToServerSetAdaptationProxy,
|
sl@0
|
46 |
EMMRCClientToServerSetCallback,
|
sl@0
|
47 |
EMMRCClientToServerRequestContextId,
|
sl@0
|
48 |
EMMRCClientToServerCloseSession,
|
sl@0
|
49 |
EMMRCClientToServerRequestResource,
|
sl@0
|
50 |
EMMRCClientToServerRegisterAsClient,
|
sl@0
|
51 |
EMMRCClientToServerCancelRegisterAsClient,
|
sl@0
|
52 |
EMMRCClientToServerWillResumePlay
|
sl@0
|
53 |
};
|
sl@0
|
54 |
|
sl@0
|
55 |
// Function opcodes for server to client messaging
|
sl@0
|
56 |
enum TMMRCServerToClientMessageCallTypes
|
sl@0
|
57 |
{
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
// Function opcodes for server to client messaging
|
sl@0
|
61 |
enum TMMRCServerToClientMessageResults
|
sl@0
|
62 |
{
|
sl@0
|
63 |
EMMRCServerToClientResourceAgreed = 0,
|
sl@0
|
64 |
EMMRCServerToClientResourcePreempt,
|
sl@0
|
65 |
EMMRCServerToClientResourceDenied,
|
sl@0
|
66 |
EMMRCServerToClientCommitUpdate,
|
sl@0
|
67 |
EMMRCServerToClientRequestError
|
sl@0
|
68 |
};
|
sl@0
|
69 |
|
sl@0
|
70 |
// Function opcodes for server to client messaging
|
sl@0
|
71 |
enum TMMRCAdaptationToServerRequestResults
|
sl@0
|
72 |
{
|
sl@0
|
73 |
EMMRCAdaptationToServerResourceComplete = 0,
|
sl@0
|
74 |
EMMRCAdaptationToServerResourceIncomplete,
|
sl@0
|
75 |
EMMRCAdaptationToServerResourceTimeout,
|
sl@0
|
76 |
EMMRCAdaptationToServerShutdown
|
sl@0
|
77 |
};
|
sl@0
|
78 |
|
sl@0
|
79 |
enum TMMRCServerState
|
sl@0
|
80 |
{
|
sl@0
|
81 |
EMMRCServerStateIdle = 0,
|
sl@0
|
82 |
EMMRCServerStateWaitResourceResponseFromAdaptation,
|
sl@0
|
83 |
EMMRCServerStateWaitPreemptionResponse
|
sl@0
|
84 |
};
|
sl@0
|
85 |
|
sl@0
|
86 |
enum TMMRCRule
|
sl@0
|
87 |
{
|
sl@0
|
88 |
EAlwaysProcess = 0,
|
sl@0
|
89 |
EProcessOnIdle
|
sl@0
|
90 |
};
|
sl@0
|
91 |
|
sl@0
|
92 |
|
sl@0
|
93 |
|
sl@0
|
94 |
enum TMMRCRequestType
|
sl@0
|
95 |
{
|
sl@0
|
96 |
EMMRCRequestCommitUpdate = 0,
|
sl@0
|
97 |
EMMRCRequestCommitResponse,
|
sl@0
|
98 |
EMMRCRequestResourceUnallocated
|
sl@0
|
99 |
};
|
sl@0
|
100 |
|
sl@0
|
101 |
|
sl@0
|
102 |
class MLogicalChain;
|
sl@0
|
103 |
|
sl@0
|
104 |
class TMMRCQueueItem
|
sl@0
|
105 |
{
|
sl@0
|
106 |
public:
|
sl@0
|
107 |
MLogicalChain* iData;
|
sl@0
|
108 |
TMMRCRequestType iRequestType;
|
sl@0
|
109 |
TMMRCServerToClientMessageResults iResult;
|
sl@0
|
110 |
TInt iErrorCode;
|
sl@0
|
111 |
TUint iMessageSize;
|
sl@0
|
112 |
};
|
sl@0
|
113 |
|
sl@0
|
114 |
IMPORT_C TInt StartMMRCServer(RThread& aServerThread);
|
sl@0
|
115 |
|
sl@0
|
116 |
#endif //__MMRCCLIENTSERVER_H
|
sl@0
|
117 |
|