sl@0: // Copyright (c) 2007-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: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef MSYNCCISUPPORT_H sl@0: #define MSYNCCISUPPORT_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: const TUid KUidExtensionInferface = { 0x1028348B }; sl@0: sl@0: /** sl@0: * An interface to get notifications from Custom Interface state change. sl@0: */ sl@0: class MCustomInterfaceSupportObserver sl@0: { sl@0: public: sl@0: /* * sl@0: * Called to state that CI is being removed use depends on which type of CI is involved. sl@0: * @param aUid the Uid of the CI. sl@0: * sl@0: * @param aPtr on returns contains a pointer to the CI. sl@0: */ sl@0: virtual void CustomInterfaceRemoval(TUid aInterfaceUid, TAny* aPtr) = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * An interface to get Custom Interface. sl@0: */ sl@0: class MCustomInterfaceSupport sl@0: { sl@0: public: sl@0: /** sl@0: * Request custom interface associated with aUid. sl@0: * Whether multiple calls returns the same pointer and/or sl@0: * ownership is transferred depends on the specific uid. sl@0: * sl@0: * @param aUid the Uid of the CI . sl@0: * @param aPtr on returns contains a pointer to the CI. sl@0: */ sl@0: virtual TInt RequestCustomInterface(TUid aUid, TAny*& aPtr) = 0; sl@0: sl@0: /** sl@0: * Registers an interface support observer. sl@0: * sl@0: * The observer will be notified when the custom interface has been removed . sl@0: * sl@0: * @param aObserver the observer reference to register. sl@0: * @return An error code. KErrNone on success, otherwise one of the system wide error codes. sl@0: */ sl@0: virtual TInt RegisterObserver(MCustomInterfaceSupportObserver& aObserver) = 0; sl@0: sl@0: /** sl@0: * Unregisters an interface support observer. sl@0: * sl@0: * @param aObserver the observer reference to unregister. sl@0: * @return An error code. KErrNone on success, otherwise one of the system wide error codes. sl@0: */ sl@0: virtual void UnRegisterObserver(MCustomInterfaceSupportObserver& aObserver) = 0; sl@0: }; sl@0: sl@0: #endif // MSYNCCISUPPORT_H