photos_plat/controllers_collection_api/inc/glxcollectioninfo.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Collection info class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __C_GLXCOLLECTIONINFO_H__
       
    22 #define __C_GLXCOLLECTIONINFO_H__
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 /**
       
    28  * Collection info 
       
    29  * This is intended to be an external API only
       
    30  */
       
    31 NONSHARABLE_CLASS( CGlxCollectionInfo )
       
    32 	: public CBase 
       
    33     {
       
    34 public:
       
    35     /**
       
    36      * Two-phase constructor.
       
    37      * @param aCollectionId MDS ID of collection (album).
       
    38      */
       
    39     IMPORT_C static CGlxCollectionInfo* NewL(TUint32 aCollectionId);
       
    40 
       
    41     /**
       
    42      * Destructor.
       
    43      */
       
    44     IMPORT_C ~CGlxCollectionInfo();
       
    45 
       
    46     /**
       
    47      * Get the ID of the collection.
       
    48      * @return ID of the collection.
       
    49      */
       
    50     IMPORT_C TUint32 Id() const;
       
    51 
       
    52     /**
       
    53      * Determine if the collectino exists.
       
    54      * @return ETrue if collection exists, EFalse if does not.
       
    55      */
       
    56     IMPORT_C TBool Exists() const;
       
    57 
       
    58     /**
       
    59      * Get the title of the collection.
       
    60      * @return Title (name) of the album.
       
    61      */
       
    62     IMPORT_C const TDesC& Title() const;
       
    63 
       
    64 // Management functions
       
    65 
       
    66     /**
       
    67      * Set if collection exists.
       
    68      * @param aExists ETrue if collection exists else EFalse.
       
    69      */
       
    70     void SetExists(TBool aExists);
       
    71 
       
    72     /**
       
    73      * Set title.
       
    74      * @param aTitle Title to set.
       
    75      */
       
    76     void SetTitleL(const TDesC& aTitle);
       
    77     
       
    78 private:
       
    79     /**
       
    80      * Constructor
       
    81      * @param aCollectionId MDS ID of collection (album)
       
    82      */
       
    83     CGlxCollectionInfo(TInt aCollectionId);
       
    84 
       
    85     /**
       
    86      * Second-phase constructor
       
    87      */
       
    88     void ConstructL();
       
    89 
       
    90 private:
       
    91     /**
       
    92      * Container id in MDS. 
       
    93      */
       
    94     TUint32 iItemId;
       
    95 
       
    96     /**
       
    97      * ETrue if the item exists in MDS. Only populated after the data has been retrieved.
       
    98      */
       
    99     TBool iExists;
       
   100 
       
   101     /**
       
   102      * Title (name) of the container. Empty object until the data has been retrieved. (Owned)
       
   103      */
       
   104     HBufC* iTitle;
       
   105     };
       
   106 
       
   107 #endif // __C_GLXCOLLECTIONINFO_H__