mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbartist.h
changeset 25 3ec52facab4d
parent 22 ecf06a08d4d9
child 51 560ce2306a17
equal deleted inserted replaced
22:ecf06a08d4d9 25:3ec52facab4d
    60 
    60 
    61         /**
    61         /**
    62         * Destructor
    62         * Destructor
    63         */
    63         */
    64         virtual ~CMPXDbArtist();
    64         virtual ~CMPXDbArtist();
    65        
    65 
    66     public:
    66     public:
    67         /**
    67         /**
    68         * Add a category item. If the record already exists, its counter will
    68         * Add a category item. If the record already exists, its counter will
    69         * be incremented.
    69         * be incremented.
    70         * @param aName: This is the name to be entered into the row
    70         * @param aName: This is the name to be entered into the row
    75         *        into consideration when generating the unique row id
    75         *        into consideration when generating the unique row id
    76         * @return The unique id of the row added.
    76         * @return The unique id of the row added.
    77         */
    77         */
    78         TUint32 AddItemL(const TDesC& aName, const TDesC& aArt, TInt aDriveId, TBool& aNewRecord,
    78         TUint32 AddItemL(const TDesC& aName, const TDesC& aArt, TInt aDriveId, TBool& aNewRecord,
    79             TBool aCaseSensitive = ETrue);
    79             TBool aCaseSensitive = ETrue);
    80         
    80 
    81         /**
    81         /**
    82         * Gets the details for all category items.
    82         * Gets the details for all category items.
    83         * @param aAttrs attributes to be returned
    83         * @param aAttrs attributes to be returned
    84         * @param aMediaArray returns the requested attributes for all items
    84         * @param aMediaArray returns the requested attributes for all items
    85         */
    85         */
    86         void GetAllCategoryItemsL(const TArray<TMPXAttribute>& aAttrs,
    86         void GetAllCategoryItemsL(const TArray<TMPXAttribute>& aAttrs,
    87             CMPXMediaArray& aMediaArray);
    87             CMPXMediaArray& aMediaArray);
    88         
    88 
    89         /**
    89         /**
    90         * Update a category item. 
    90         * Update a category item.
    91         * @param aId: The ID of the category to update
    91         * @param aId: The ID of the category to update
    92         * @param aMedia: The media data
    92         * @param aMedia: The media data
    93         * @param aDriveId: The Drive Id the name (category) belongs
    93         * @param aDriveId: The Drive Id the name (category) belongs
    94         * @param aItemChangedMessages: if valid on return contains a updated message if the
    94         * @param aItemChangedMessages: if valid on return contains a updated message if the
    95         *        category was updated
    95         *        category was updated
    96         */
    96         */
    97         void UpdateItemL(TUint32 aId, const CMPXMedia& aMedia, TInt aDriveId, CMPXMessageArray* aItemChangedMessages);
    97         void UpdateItemL(TUint32 aId, const CMPXMedia& aMedia, TInt aDriveId, CMPXMessageArray* aItemChangedMessages);
    98         
    98 
    99         /*
    99         /*
   100         * Checks if the specified artist item is unknown
   100         * Checks if the specified artist item is unknown
   101         * @param aId identifies the artist item
   101         * @param aId identifies the artist item
   102         * @return ETrue if it is unknown, EFalse otherwise
   102         * @return ETrue if it is unknown, EFalse otherwise
   103         */        
   103         */
   104         TBool IsUnknownArtistL(TUint32 aId);
   104         TBool IsUnknownArtistL(TUint32 aId);
   105         
   105 
   106     private:
   106     private:
   107 
   107 
   108         /**
   108         /**
   109         * Updates the media with information from the table
   109         * Updates the media with information from the table
   110         * @param aRecord record containing the source fields
   110         * @param aRecord record containing the source fields
   119         * @param aMedia media data
   119         * @param aMedia media data
   120         * @param aFields fields of Artist table
   120         * @param aFields fields of Artist table
   121         * @param aValues values of each field of Artist table
   121         * @param aValues values of each field of Artist table
   122         * @return a string containing the selection criteria. The ownership is passed to the caller.
   122         * @return a string containing the selection criteria. The ownership is passed to the caller.
   123         */
   123         */
   124         void GenerateArtistFieldsValuesL(const CMPXMedia& aMedia, 
   124         void GenerateArtistFieldsValuesL(const CMPXMedia& aMedia,
   125             CDesCArray& aFields, CDesCArray& aValues);
   125             CDesCArray& aFields, CDesCArray& aValues);
   126        
   126 
   127         /**
   127         /**
   128         * Gets the Album counts for a Artist item
   128         * Gets the Album counts for a Artist item
   129         * @param aId identifies the Artist item
   129         * @param aId identifies the Artist item
   130         * @return value of the Album counts
   130         * @return value of the Album counts
   131         */
   131         */
   140 
   140 
   141         /**
   141         /**
   142         * @see MMPXTable
   142         * @see MMPXTable
   143         */
   143         */
   144         virtual TBool CheckTableL(RSqlDatabase& aDatabase);
   144         virtual TBool CheckTableL(RSqlDatabase& aDatabase);
   145         
   145 
   146     private:
   146     private:
   147 
   147 
   148         /**
   148         /**
   149         * C++ constructor.
   149         * C++ constructor.
   150         * @param aDbManager database manager to use for database interactions
   150         * @param aDbManager database manager to use for database interactions