mmresourcemgmt/mmresctrl/inc/mmrcclient.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 //mmrcclient.h
       
     2 
       
     3 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 // All rights reserved.
       
     5 // This component and the accompanying materials are made available
       
     6 // under the terms of "Eclipse Public License v1.0"
       
     7 // which accompanies this distribution, and is available
       
     8 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 //
       
    10 // Initial Contributors:
       
    11 // Nokia Corporation - initial contribution.
       
    12 //
       
    13 // Contributors:
       
    14 //
       
    15 // Description:
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalTechnology
       
    23 */
       
    24 
       
    25 #ifndef RMMRCCLIENT_H
       
    26 #define RMMRCCLIENT_H
       
    27 
       
    28 // INCLUDES
       
    29 #include <e32std.h>
       
    30 #include <e32base.h>
       
    31 #include <a3f/a3fbase.h>
       
    32 #include "maudiostreamadaptationobserver.h"
       
    33 
       
    34 class MAudioContext;
       
    35 class MLogicalChain;
       
    36 class MMultimediaResourceControlObserver;
       
    37 class CMMRCServer;
       
    38 class CMMRCServerSession;
       
    39 class CMMRCClientImplementation;
       
    40 class CAudioContext;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 //
       
    44 // This class opens connection and provides functions to MMRC server.
       
    45 //
       
    46 // @lib mmrcclient.lib
       
    47 //
       
    48 class RMMRCClient
       
    49 	{
       
    50 public:
       
    51 	IMPORT_C RMMRCClient();
       
    52 
       
    53 	IMPORT_C virtual ~RMMRCClient();
       
    54 
       
    55     //
       
    56      // Open connection to server.
       
    57      //
       
    58      // @param aConnection Interface to server, must not be connected.
       
    59      // @param aCallback Callback interface.
       
    60      // @return an error code. KErrNone if successful, otherwise one of the system wide error codes.
       
    61      //
       
    62 	IMPORT_C TInt Open(MMultimediaResourceControlObserver& aCallback);
       
    63 
       
    64     //
       
    65      // Zero is invalid Context id and indicates error.
       
    66      // @param aProcessId Process Id.
       
    67      // @return TUint32 Context Id.
       
    68      //
       
    69 	IMPORT_C TUint64 LogOn(TProcessId aProcessId);
       
    70 
       
    71     //
       
    72      // Asynchronous return to ReceiveResourceResponse.
       
    73      //
       
    74      // @param aMessage Message to be sent.
       
    75      // @return an error code. KErrNone if successful, otherwise one of the system wide error codes.
       
    76      //
       
    77 	IMPORT_C TInt SendResourceRequest(MLogicalChain* aCurrent, MLogicalChain* aDesired, CAudioContext* aContext);
       
    78 
       
    79     //
       
    80      // Synchronous.
       
    81      //
       
    82      // @return an error code. KErrNone if successful, otherwise one of the system wide error codes.
       
    83      //
       
    84 	IMPORT_C TInt SendResourceConfirmation();
       
    85 
       
    86     //
       
    87      // Synchronous.
       
    88      //
       
    89      // @return an error code. KErrNone if successful, otherwise one of the system wide error codes.
       
    90      //
       
    91 	IMPORT_C TInt SendResourceUpdateResult();
       
    92 
       
    93     //
       
    94      // Synchronous.
       
    95      //
       
    96      // @return an error code. KErrNone if successful, otherwise one of the system wide error codes.
       
    97      //
       
    98 	IMPORT_C TInt SendResourceErrorNotification();
       
    99 
       
   100 	//
       
   101      // Close connection to server.
       
   102 	 //
       
   103 	IMPORT_C void Close();
       
   104 	//
       
   105      // Register a client for notification.
       
   106 	 //
       
   107 	IMPORT_C TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData);
       
   108 	
       
   109 	//
       
   110      // Cancel the register of a client for notification.
       
   111 	 //
       
   112 	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
       
   113 	//
       
   114      // 
       
   115 	 //
       
   116 	IMPORT_C TInt WillResumePlay();
       
   117 
       
   118 	IMPORT_C void ResetMessages();
       
   119 	
       
   120 private:
       
   121 	CMMRCClientImplementation* iImplementation;
       
   122 	};
       
   123 
       
   124 #endif  // RMMRCCLIENT_H