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