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: @prototype sl@0: */ sl@0: sl@0: #ifndef SGIMAGECOLLECTIONADAPTER_H sl@0: #define SGIMAGECOLLECTIONADAPTER_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: @deprecated sl@0: sl@0: This interface must be implemented by all the user-side objects in the adaptation sl@0: layer of the Graphics subsystem which are referenced by instances of RSgImageCollection. sl@0: The interface between the user-side and the kernel-side parts of the adaptation sl@0: layer is outside the scope of the specification of the Graphics Resource API. sl@0: sl@0: @see RSgImageCollection sl@0: */ sl@0: class MSgImageCollectionAdapter: public MSgResourceAdapter sl@0: { sl@0: public: sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: sl@0: Retrieves the surface identifier of the image collection represented by this sl@0: adapter object. sl@0: sl@0: @return The surface identifier of the image collection. sl@0: @see RSgImageCollection::SurfaceId() sl@0: */ sl@0: virtual const TSurfaceId& SurfaceId() const = 0; sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: @deprecated sl@0: sl@0: Retrieves the values of the attributes of the images in the image collection sl@0: represented by this adapter object. sl@0: sl@0: @param aInfo On input, the globally unique identifiers of the user-defined sl@0: attributes to be retrieved from the image collection, if any. On return, sl@0: the values of the attributes of the images in the collection and the sl@0: values of the selected user-defined attributes. sl@0: @pre If aInfo.iUserAttributes is not null then it points to an array of sl@0: aInfo.iUserAttributeCount elements with globally unique identifiers sl@0: corresponding to user-defined attributes attached to the image collection. sl@0: @return KErrNone if successful. sl@0: @return KErrNotFound if any of the user-defined attributes to be retrieved from sl@0: the image collection cannot be found. sl@0: @see RSgImageCollection::GetInfo() sl@0: */ sl@0: virtual TInt GetInfo(TSgImageInfo& aInfo) const = 0; sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: @deprecated sl@0: sl@0: Retrieves the number of images in the image collection represented by this sl@0: adapter object. sl@0: sl@0: @return The number of images in the image collection. sl@0: @see RSgImageCollection::Count() sl@0: */ sl@0: virtual TInt Count() const = 0; sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: @deprecated sl@0: sl@0: Opens a new handle to one of the images in the image collection represented by sl@0: this adapter object. If there are no handles to the image open in the calling sl@0: process then this function creates a new adapter object that represents the image sl@0: in the context of the calling process. Otherwise this function just increments sl@0: the reference count of the existing adapter object that represents the image sl@0: in the context of the calling process. sl@0: sl@0: @param aIndex The index of the image within the image collection. sl@0: @param aResult On return, a pointer to the adapter object that represents the sl@0: specified image in the collection. sl@0: @pre aIndex is greater than or equal to zero and less than the number of images sl@0: in the collection. sl@0: @pre aResult is null. sl@0: @post aResult points to either a newly created or an existing adapter object sl@0: that represents the specified image in the collection. If a new adapter sl@0: object is created then its initial reference count is one and the reference sl@0: count for the image collection is incremented by one. Otherwise only the sl@0: reference count for the adapter object is incremented by one. sl@0: @return KErrNone if successful. sl@0: @return KErrInUse if aResult was not null. sl@0: @return KErrArgument if aIndex is invalid. sl@0: @return KErrNoMemory if there is not enough system memory. sl@0: @see RSgImageCollection::OpenImage() sl@0: */ sl@0: virtual TInt OpenImage(TInt aIndex, MSgDrawableAdapter*& aResult) = 0; sl@0: }; sl@0: sl@0: sl@0: #endif // SGIMAGECOLLECTIONADAPTER_H