sl@0: // Copyright (c) 2009-2010 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:  @file
sl@0:  @internalTechnology
sl@0: */
sl@0: 
sl@0: #ifndef MMFMEDIACLIENTEXTDISPLAYINTERFACE_H_
sl@0: #define MMFMEDIACLIENTEXTDISPLAYINTERFACE_H_
sl@0: 
sl@0: #include <e32base.h>
sl@0: 
sl@0: #define MMF_MEDIA_CLIENT_EXT_DISPLAY_INTERFACE_V3
sl@0: 
sl@0: /**
sl@0: 
sl@0: Enumeration used to indicate external display current connection status
sl@0: 
sl@0: **/
sl@0: enum TExtDisplayConnectionProviderConnType
sl@0:     {
sl@0:     EExtDisplayConnectionProviderConnTypeDisconnected,
sl@0:     EExtDisplayConnectionProviderConnTypeHdmi,
sl@0:     EExtDisplayConnectionProviderConnTypeAnalog
sl@0:     };
sl@0: 
sl@0: /**
sl@0: 
sl@0: Mixin class capable of handling events from provider
sl@0: 
sl@0: */
sl@0: class MExtDisplayConnectionProviderCallback
sl@0:     {
sl@0: public:
sl@0:     virtual void MedcpcExtDisplayNotifyConnected(TExtDisplayConnectionProviderConnType aExtDisplayConnType) = 0;
sl@0:     };
sl@0: 
sl@0: /**
sl@0: 
sl@0: Mixin class for external display connection provider plugins.
sl@0: 
sl@0: */
sl@0: class CExtDisplayConnectionProviderInterface : public CBase
sl@0: 	{
sl@0: public:
sl@0: 
sl@0:     /**
sl@0:     Allocates and constructs a new provider plugin.
sl@0: 
sl@0:     Uses ECOM to instantiate a new provider plugin. Can leave with any of the system-wide error codes.
sl@0: 
sl@0:     @leave  KErrNotSupported There is no support for external displays.
sl@0:     @return A pointer to the new provider plugin.
sl@0: 
sl@0:     */
sl@0:     static CExtDisplayConnectionProviderInterface* NewL();
sl@0: 
sl@0:     /**
sl@0:     Function to be implemented by connection provider that allows the callback to be set.
sl@0:     
sl@0:     @param  aCallback
sl@0:         A reference to an object that can be used by the provider to send events back to the client.
sl@0:     */
sl@0:     virtual void SetExtDisplayConnectionProviderCallback(MExtDisplayConnectionProviderCallback& aCallback) = 0;
sl@0: 
sl@0:     /**
sl@0:     Function to be implemented by connection provider that indicates the external display connection type 
sl@0:     
sl@0:     @return One of values defined in TExtDisplayConnectionProviderConnType
sl@0:     */
sl@0:     virtual TExtDisplayConnectionProviderConnType ExtDisplayConnType() = 0;
sl@0: 	
sl@0:     /**
sl@0:     Function to be implemented by connection provider that indicates the display id that should
sl@0:     be used for the external display port.
sl@0:     
sl@0:     @return TInt the display id for the external display port
sl@0:     */
sl@0:     virtual TInt ExtDisplayId() = 0;
sl@0: 
sl@0:     /**
sl@0:     Default destructor.
sl@0:     */
sl@0:     IMPORT_C virtual ~CExtDisplayConnectionProviderInterface();
sl@0: 
sl@0: protected:
sl@0:     /**
sl@0:     Constructor.
sl@0:     */
sl@0:     IMPORT_C CExtDisplayConnectionProviderInterface();
sl@0:     
sl@0: private:
sl@0:     /**
sl@0:     Required by ECOM.
sl@0:     */
sl@0:     TUid iInstanceKey;
sl@0: 	};
sl@0: 
sl@0: #endif /* MMFMEDIACLIENTEXTDISPLAYINTERFACE_H_ */