--- a/mmlibs/mmfw/inc/mmf/PLUGIN/mmfmediaclientextdisplayinterface.h Sat Feb 20 00:20:15 2010 +0200
+++ b/mmlibs/mmfw/inc/mmf/PLUGIN/mmfmediaclientextdisplayinterface.h Fri Mar 12 15:50:33 2010 +0200
@@ -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 <e32base.h>
-#include <graphics/surface.h>
+
+#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_ */