sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef MMRCCLIENTSERVER_H sl@0: #define MMRCCLIENTSERVER_H sl@0: sl@0: #include sl@0: sl@0: enum TReason sl@0: { sl@0: EUninitialize, sl@0: EInitialize, sl@0: EUnload, sl@0: ELoad, sl@0: EStop, sl@0: EPrimeReason, sl@0: EActivate, sl@0: EReasonError sl@0: }; sl@0: sl@0: // Function opcodes for client to server messaging sl@0: enum TMMRCClientToServerMessages sl@0: { sl@0: EMMRCClientToServerSetClientThreadId = 0, sl@0: EMMRCClientToServerSetMsgQueueHandle, sl@0: EMMRCClientToServerSetAdaptationProxy, sl@0: EMMRCClientToServerSetCallback, sl@0: EMMRCClientToServerRequestContextId, sl@0: EMMRCClientToServerCloseSession, sl@0: EMMRCClientToServerRequestResource, sl@0: EMMRCClientToServerRegisterAsClient, sl@0: EMMRCClientToServerCancelRegisterAsClient, sl@0: EMMRCClientToServerWillResumePlay sl@0: }; sl@0: sl@0: // Function opcodes for server to client messaging sl@0: enum TMMRCServerToClientMessageCallTypes sl@0: { sl@0: }; sl@0: sl@0: // Function opcodes for server to client messaging sl@0: enum TMMRCServerToClientMessageResults sl@0: { sl@0: EMMRCServerToClientResourceAgreed = 0, sl@0: EMMRCServerToClientResourcePreempt, sl@0: EMMRCServerToClientResourceDenied, sl@0: EMMRCServerToClientCommitUpdate, sl@0: EMMRCServerToClientRequestError sl@0: }; sl@0: sl@0: // Function opcodes for server to client messaging sl@0: enum TMMRCAdaptationToServerRequestResults sl@0: { sl@0: EMMRCAdaptationToServerResourceComplete = 0, sl@0: EMMRCAdaptationToServerResourceIncomplete, sl@0: EMMRCAdaptationToServerResourceTimeout, sl@0: EMMRCAdaptationToServerShutdown sl@0: }; sl@0: sl@0: enum TMMRCServerState sl@0: { sl@0: EMMRCServerStateIdle = 0, sl@0: EMMRCServerStateWaitResourceResponseFromAdaptation, sl@0: EMMRCServerStateWaitPreemptionResponse sl@0: }; sl@0: sl@0: enum TMMRCRule sl@0: { sl@0: EAlwaysProcess = 0, sl@0: EProcessOnIdle sl@0: }; sl@0: sl@0: sl@0: sl@0: enum TMMRCRequestType sl@0: { sl@0: EMMRCRequestCommitUpdate = 0, sl@0: EMMRCRequestCommitResponse, sl@0: EMMRCRequestResourceUnallocated sl@0: }; sl@0: sl@0: sl@0: class MLogicalChain; sl@0: sl@0: class TMMRCQueueItem sl@0: { sl@0: public: sl@0: MLogicalChain* iData; sl@0: TMMRCRequestType iRequestType; sl@0: TMMRCServerToClientMessageResults iResult; sl@0: TInt iErrorCode; sl@0: TUint iMessageSize; sl@0: }; sl@0: sl@0: IMPORT_C TInt StartMMRCServer(RThread& aServerThread); sl@0: sl@0: #endif //__MMRCCLIENTSERVER_H sl@0: