diff -r 40261b775718 -r efebd1779a59 mmlibs/mmfw/inc/mmf/PLUGIN/mmfmediaclientextdisplayinterface.h --- a/mmlibs/mmfw/inc/mmf/PLUGIN/mmfmediaclientextdisplayinterface.h Tue Feb 02 01:56:55 2010 +0200 +++ b/mmlibs/mmfw/inc/mmf/PLUGIN/mmfmediaclientextdisplayinterface.h Fri Apr 16 16:34:49 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -22,23 +22,23 @@ #define MMFMEDIACLIENTEXTDISPLAYINTERFACE_H_ #include -#include + +#define MMF_MEDIA_CLIENT_EXT_DISPLAY_INTERFACE_V2 /** -Mixin class capable of handling events and requests from provider +Mixin class capable of handling events from provider */ class MExtDisplayConnectionProviderCallback { public: - virtual void MedcpcExtDisplayCalculateExtentAndViewportL(TRect& aExtent, TRect& aViewport, TRect& aExternalDisplayRect) = 0; virtual void MedcpcExtDisplayNotifyConnected(TBool aExtDisplayConnected) = 0; }; /** -Base class for external display connection provider plugins. +Mixin class for external display connection provider plugins. */ class CExtDisplayConnectionProviderInterface : public CBase @@ -46,70 +46,56 @@ public: /** - Determines if external displays are supported by checking if any implementations for - supporting external displays are available. + Allocates and constructs a new provider plugin. - @return ETrue if supported otherwise EFalse + Uses ECOM to instantiate a new provider plugin. Can leave with any of the system-wide error codes. + + @leave KErrNotSupported There is no support for external displays. + @return A pointer to the new provider plugin. */ - static TBool ExternalDisplaySupportedL(); - - /** - Allocates and constructs a new provider plugin. - - Uses ECOM to instantiate a new provider plugin. Can leave with any of the system-wide error codes. + static CExtDisplayConnectionProviderInterface* NewL(); - @param aCallback - A reference to an object that can be used by the provider to send - events back to the client and make request on the client. - @param aSurfaceId - The surfaceId. - @leave KErrNotSupported There is no support for external displays. - @return A pointer to the new provider plugin. - - */ - static CExtDisplayConnectionProviderInterface* NewL(MExtDisplayConnectionProviderCallback& aCallback, TSurfaceId& aSurfaceId); - + /** + Function to be implemented by connection provider that allows the callback to be set. + + @param aCallback + A reference to an object that can be used by the provider to send events back to the client. + */ + virtual void SetExtDisplayConnectionProviderCallback(MExtDisplayConnectionProviderCallback& aCallback) = 0; + /** Function to be implemented by connection provider that indicates whether an external display is connected. - @return ETrue if external display is connectde otherwise EFalse. + @return ETrue if external display is connected otherwise EFalse. */ - virtual TBool ExtDisplayConnectedL() = 0; - - /** - Default destructor. - */ - IMPORT_C virtual ~CExtDisplayConnectionProviderInterface(); - -protected: - /** - Constructor. - */ - IMPORT_C CExtDisplayConnectionProviderInterface(); - + virtual TBool ExtDisplayConnected() = 0; + + /** + Function to be implemented by connection provider that indicates the display id that should + be used for the external display port. + + @return TInt the display id for the external display port + */ + virtual TInt ExtDisplayId() = 0; + /** - The callback handler for the provider plugin. - */ - MExtDisplayConnectionProviderCallback* iCallback; // not owned + Default destructor. + */ + IMPORT_C virtual ~CExtDisplayConnectionProviderInterface(); - /** - The surface Id. - */ - TSurfaceId iSurfaceId; // not owned - +protected: + /** + Constructor. + */ + IMPORT_C CExtDisplayConnectionProviderInterface(); + private: - /** - This is internal and not intended for use. - */ - void ConstructL(MExtDisplayConnectionProviderCallback& aCallback, TSurfaceId& aSurfaceId); - -private: - /** - Required by ECOM. - */ - TUid iInstanceKey; + /** + Required by ECOM. + */ + TUid iInstanceKey; }; #endif /* MMFMEDIACLIENTEXTDISPLAYINTERFACE_H_ */