contentstorage/cautils/inc/cainnerentry.h
changeset 66 32469d7d46ff
parent 61 8e5041d13c84
child 98 d2f833ab7940
equal deleted inserted replaced
61:8e5041d13c84 66:32469d7d46ff
    19 #define __CAINNERENTRY_H__
    19 #define __CAINNERENTRY_H__
    20 
    20 
    21 #include <e32base.h>
    21 #include <e32base.h>
    22 
    22 
    23 #include "caentryattribute.h"
    23 #include "caentryattribute.h"
       
    24 #include "cainnericondescription.h"
    24 
    25 
    25 /**
    26 /**
    26  * Class represents Content Arsenal entry
    27  * Class represents Content Arsenal entry
    27  */
    28  */
    28 NONSHARABLE_CLASS( CCaInnerEntry ): public CBase
    29 NONSHARABLE_CLASS( CCaInnerEntry ): public CBase
    29     {
    30     {
    30 public:
    31 public:
    31     /*
       
    32      * Struct containing icon attributes
       
    33      */
       
    34     struct TIconAttributes
       
    35         {
       
    36         //TODO: maybe it should be C class with RBuf instead of TFileName
       
    37         TInt iId;
       
    38         TFileName iFileName;
       
    39         TBuf<KMaxFileName> iSkinId;        
       
    40         TBuf<KMaxUidName> iApplicationId;
       
    41         };
       
    42 
       
    43 public:
       
    44 
    32 
    45     /**
    33     /**
    46      * Destructor.
    34      * Destructor.
    47      */
    35      */
    48     virtual ~CCaInnerEntry();
    36     virtual ~CCaInnerEntry();
    75     /**
    63     /**
    76      * Gets entry description.
    64      * Gets entry description.
    77      * @return Entry description.
    65      * @return Entry description.
    78      */
    66      */
    79     IMPORT_C const RBuf& GetDescription() const;
    67     IMPORT_C const RBuf& GetDescription() const;
    80     
    68 
    81     /**
    69     /**
    82      * Gets entry typename.
    70      * Gets entry typename.
    83      * @return Entry typename.
    71      * @return Entry typename.
    84      */
    72      */
    85     IMPORT_C const RBuf& GetEntryTypeName() const;
    73     IMPORT_C const RBuf& GetEntryTypeName() const;
    86 
    74 
    87     /**
    75     /**
    88      * Gets icon attributes.
    76      * Gets icon description.
    89      * @return Icon atrributes.
    77      * @return Icon description.
    90      */
    78      */
    91     IMPORT_C const CCaInnerEntry::TIconAttributes& GetIcon() const;
    79     IMPORT_C const CCaInnerIconDescription* Icon() const;
    92 
    80 
    93     /**
    81     /**
    94      * Gets entry flags.
    82      * Gets entry flags.
    95      * @return Entry flags.
    83      * @return Entry flags.
    96      */
    84      */
   136     /**
   124     /**
   137      * Sets the entry description.
   125      * Sets the entry description.
   138      * @param aText Entry description.
   126      * @param aText Entry description.
   139      */
   127      */
   140     IMPORT_C void SetDescriptionL( const TDesC& aText );
   128     IMPORT_C void SetDescriptionL( const TDesC& aText );
   141     
   129 
   142     /**
   130     /**
   143      * Sets the entry typename.
   131      * Sets the entry typename.
   144      * @param aTypeName Entry typename.
   132      * @param aTypeName Entry typename.
   145      */
   133      */
   146     IMPORT_C void SetEntryTypeNameL( const TDesC& aTypeName );
   134     IMPORT_C void SetEntryTypeNameL( const TDesC& aTypeName );
   149      * Sets icon data.
   137      * Sets icon data.
   150      * @param aFilename Filename.
   138      * @param aFilename Filename.
   151      * @param aSkinId Skin id.
   139      * @param aSkinId Skin id.
   152      * @param aApplicationId application id.
   140      * @param aApplicationId application id.
   153      */
   141      */
   154     IMPORT_C void SetIconDataL(             
   142     IMPORT_C void SetIconDataL(
   155             const TDesC& aFilename, const TDesC& aSkinId, const TDesC& aApplicationId );
   143         const TDesC& aFilename, const TDesC& aSkinId, const TDesC& aApplicationId );
   156 
   144 
   157     /**
   145     /**
   158      * Adds attribute to entry.
   146      * Adds attribute to entry.
   159      * @param aKey Attribute key.
   147      * @param aKey Attribute key.
   160      * @param aValue Attribute value.
   148      * @param aValue Attribute value.
   184      * @param aKey Attribute key.
   172      * @param aKey Attribute key.
   185      * @param aAttrVal Attribute value.
   173      * @param aAttrVal Attribute value.
   186      * @return ETrue if attribute exists.
   174      * @return ETrue if attribute exists.
   187      */
   175      */
   188     IMPORT_C TBool FindAttribute( const TDesC& aKey, TDes& aAttrVal );
   176     IMPORT_C TBool FindAttribute( const TDesC& aKey, TDes& aAttrVal );
   189     
   177 
       
   178     /**
       
   179      * Verifies if attribute exists, and returns its value for the given key.
       
   180      * @param aKey Attribute key.
       
   181      * @param aAttrVal Attribute value.
       
   182      * @return ETrue if attribute exists.
       
   183      */
       
   184     IMPORT_C TBool FindAttribute( const TDesC& aKey, TPtrC& aAttrVal );
       
   185 
   190     /**
   186     /**
   191      * Sets the entry uid.
   187      * Sets the entry uid.
   192      * @param aUid Entry uid.
   188      * @param aUid Entry uid.
   193      */
   189      */
   194     IMPORT_C void SetUid( TInt32 aUid );
   190     IMPORT_C void SetUid( TInt32 aUid );
   240     /*
   236     /*
   241      * Description.
   237      * Description.
   242      * Own.
   238      * Own.
   243      */
   239      */
   244     RBuf iDescription;
   240     RBuf iDescription;
   245     
   241 
   246     /*
   242     /*
   247      * Entry type.
   243      * Entry type.
   248      * Own.
   244      * Own.
   249      */
   245      */
   250     RBuf iEntryTypeName;
   246     RBuf iEntryTypeName;
   251 
   247 
   252     /*
   248     /*
   253      * Own.
   249      * Icon.
   254      */
   250      * Own.
   255     TIconAttributes iIcon;
   251      */
       
   252     CCaInnerIconDescription* iIcon;
   256 
   253 
   257     /*
   254     /*
   258      * Flags.
   255      * Flags.
   259      */
   256      */
   260     TUint iFlags;
   257     TUint iFlags;