videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/inc/videolistdatamodel_p.h
changeset 50 21fe8338c6bf
parent 38 ff53afa8ad05
equal deleted inserted replaced
49:824471cb468a 50:21fe8338c6bf
   112      * return video id of the item at given index
   112      * return video id of the item at given index
   113      * 
   113      * 
   114      * @param index
   114      * @param index
   115      * @return int
   115      * @return int
   116      */
   116      */
   117     TMPXItemId getMediaIdFromIndex(int index) const;
   117     TMPXItemId& getMediaIdFromIndex(const int &index) const;
   118     
   118     
   119     /**
   119     /**
   120     * return video path of the item with given media id
   120     * return video path of the item with given media id
   121     * 
   121     * 
   122     * @param mediaId
   122     * @param mediaId
   123     * @return int
   123     * @return int
   124     */
   124     */
   125     const QString getFilePathForId(TMPXItemId mediaId) const;
   125     const QString getFilePathForId(const TMPXItemId &mediaId) const;
   126            
   126            
   127     /**
   127     /**
   128      * return name of the item at given index
   128      * return name of the item at given index
   129      * 
   129      * 
   130      * @param index
   130      * @param index
   131      * @return QString
   131      * @return QString
   132      */
   132      */
   133     const QString getVideoNameFromIndex( int index )  const;
   133     const QString getVideoNameFromIndex(const int &index )  const;
   134    
   134    
   135     /**
   135     /**
   136      * return default tn always
   136      * return default tn always
   137      * 
   137      * 
   138      * @param index
   138      * @param index
   139      * @return QIcon
   139      * @return QIcon
   140      */
   140      */
   141     const QIcon* getVideoThumbnailFromIndex( int index ) const;
   141     const QIcon* getVideoThumbnailFromIndex(const int &index ) const;
   142    
   142    
   143     /**
   143     /**
   144      * return video count of the item at given index
   144      * return video count of the item at given index
   145      * 
   145      * 
   146      * @param index
   146      * @param index
   147      * @return quint32
   147      * @return quint32
   148      */
   148      */
   149     quint32 VideoListDataModelPrivate::getCategoryVideoCountFromIndex( int index ) const;
   149     quint32 getCategoryVideoCountFromIndex(const int &index ) const;
   150     
   150     
   151     /**
   151     /**
   152      * return video size of the item at given index
   152      * return video size of the item at given index
   153      * 
   153      * 
   154      * @param index
   154      * @param index
   155      * @return quint32
   155      * @return quint32
   156      */
   156      */
   157     quint32 getVideoSizeFromIndex( int index ) const;
   157     quint32 getVideoSizeFromIndex(const int &index ) const;
   158    
   158    
   159     /**
   159     /**
   160      * return video age profile of the item at given index
   160      * return video age profile of the item at given index
   161      * 
   161      * 
   162      * @param index
   162      * @param index
   163      * @return quint32
   163      * @return quint32
   164      */
   164      */
   165     quint32 getVideoAgeProfileFromIndex( int index ) const;
   165     quint32 getVideoAgeProfileFromIndex(const int &index ) const;
   166    
   166    
   167     /**
   167     /**
   168      * return video duration of the item at given index
   168      * return video duration of the item at given index
   169      * 
   169      * 
   170      * @param index
   170      * @param index
   171      * @return quint32
   171      * @return quint32
   172      */
   172      */
   173     quint32 getVideodurationFromIndex( int index ) const;
   173     quint32 getVideodurationFromIndex(const int &index ) const;
   174    
   174    
   175     /**
   175     /**
   176      * return video creation datetime of the item at given index
   176      * return video creation datetime of the item at given index
   177      * 
   177      * 
   178      * @param index
   178      * @param index
   179      * @return QDateTime
   179      * @return QDateTime
   180      */
   180      */
   181     QDateTime getVideoDateFromIndex( int index ) const;
   181     QDateTime getVideoDateFromIndex(const int &index ) const;
   182    
   182    
   183     /**
   183     /**
   184      * Returns video status
   184      * Returns video status
   185      * 
   185      * 
   186      * @param index: item position where client wants the date from.
   186      * @param index: item position where client wants the date from.
   187      * 
   187      * 
   188      * @return int status code
   188      * @return int status code
   189      */
   189      */
   190     int getVideoStatusFromIndex(int index) const;
   190     int getVideoStatusFromIndex(const int &index) const;
   191     
   191     
   192     /**
   192     /**
   193      * marks videos to be removed: it's id and index are saved to 
   193      * marks videos to be removed: it's id and index are saved to 
   194      * remove buffer in data container
   194      * remove buffer in data container
   195      * 
   195      * 
   209 	/**
   209 	/**
   210      * Returns the file path of the video.
   210      * Returns the file path of the video.
   211      * 
   211      * 
   212      * @param index: item position where client wants the file path from.
   212      * @param index: item position where client wants the file path from.
   213      */
   213      */
   214     const QString getFilePathFromIndex(int index) const;
   214     const QString getFilePathFromIndex(const int &index) const;
   215     
   215     
   216     /**
   216     /**
   217      * returns mBelongsToAlbum;
   217      * returns mBelongsToAlbum;
   218      */
   218      */
   219     bool belongsToAlbum(TMPXItemId itemId, TMPXItemId albumId);
   219     bool belongsToAlbum(const TMPXItemId &itemId, TMPXItemId albumId);
   220     
   220     
   221     /**
   221     /**
   222      * returns mBelongsToAlbum;
   222      * returns mBelongsToAlbum;
   223      */
   223      */
   224     void setAlbumInUse(TMPXItemId albumId);
   224     void setAlbumInUse(const TMPXItemId &albumId);
   225     
   225     
   226     /**
   226     /**
   227      * returns mRemoveFrAlbumReturn
   227      * returns mRemoveFrAlbumReturn
   228      */
   228      */
   229     int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &ids);
   229     int removeItemsFromAlbum(const TMPXItemId &albumId, const QList<TMPXItemId> &ids);
   230     
   230     
   231     
   231     
   232 private: // private methods
   232 private: // private methods
   233     
   233     
   234     /**
   234     /**
   243      * return item from given index of given item
   243      * return item from given index of given item
   244      * 
   244      * 
   245      * @param index
   245      * @param index
   246      * @return CMPXMedia
   246      * @return CMPXMedia
   247      */
   247      */
   248     CMPXMedia* getMediaFromIndex( int index ) const;
   248     CMPXMedia* getMediaFromIndex(const int &index) const;
   249  
   249  
   250     /**
   250     /**
   251      * return index of item of given id
   251      * return index of item of given id
   252      * 
   252      * 
   253      * @param mediaId
   253      * @param mediaId
   254      * @return int
   254      * @return int
   255      */
   255      */
   256     int indexOfMediaId(TMPXItemId mediaId) const;
   256     int indexOfMediaId(const TMPXItemId &mediaId) const;
   257     
   257     
   258       
   258       
   259 public slots: 
   259 public slots: 
   260     
   260     
   261     /**
   261     /**
   275     /**
   275     /**
   276      * not used in stub
   276      * not used in stub
   277      * 
   277      * 
   278      */
   278      */
   279     void newVideoAvailableSlot(CMPXMedia* aVideo);
   279     void newVideoAvailableSlot(CMPXMedia* aVideo);
   280 
   280           
   281     /**
       
   282      * not used in stub
       
   283      * 
       
   284      */
       
   285     void videoDeletedSlot(TMPXItemId videoId);
       
   286            
       
   287     /**
   281     /**
   288      * used to clear mItemsUnderDeletion for this stub
   282      * used to clear mItemsUnderDeletion for this stub
   289      * 
   283      * 
   290      */
   284      */
   291     void videoDeleteCompletedSlot(int overallCount,QList<TMPXItemId> *failedMediaIds);
   285     void videoDeleteCompletedSlot(int overallCount,QList<TMPXItemId> *failedMediaIds);
   297     void videoDetailsCompletedSlot(CMPXMedia* media);
   291     void videoDetailsCompletedSlot(CMPXMedia* media);
   298     
   292     
   299     /**
   293     /**
   300      * not used in stub
   294      * not used in stub
   301      */
   295      */
   302     void albumListAvailableSlot(TMPXItemId albumId, CMPXMediaArray *albumItems);
   296     void albumListAvailableSlot(TMPXItemId &albumId, CMPXMediaArray *albumItems);
   303     
   297     
   304     /**
   298     /**
   305      * not used in stub
   299      * not used in stub
   306      */
   300      */
   307     void itemModifiedSlot(const TMPXItemId &itemId);    
   301     void itemModifiedSlot(const TMPXItemId &itemId);    
   312     void albumRemoveFailureSlot(QList<TMPXItemId> *items);
   306     void albumRemoveFailureSlot(QList<TMPXItemId> *items);
   313 
   307 
   314     /**
   308     /**
   315      * not used in stub
   309      * not used in stub
   316      */
   310      */
   317     void itemDeletedSlot(TMPXItemId id);
   311     void itemDeletedSlot(TMPXItemId &id);
   318     
   312     
   319     /**
   313     /**
   320      * not used in stub
   314      * not used in stub
   321      */
   315      */
   322     void listCompleteSlot();
   316     void videoListCompleteSlot();
       
   317     
       
   318     /**
       
   319      * not used in stub
       
   320      */
       
   321     void albumListCompleteSlot();
   323     
   322     
   324 public:    
   323 public:    
   325     
   324     
   326     /**
   325     /**
   327     * Pointer to the public class
   326     * Pointer to the public class
   406     
   405     
   407     /**
   406     /**
   408      * value returned from removeItemsFromAlbum
   407      * value returned from removeItemsFromAlbum
   409      */
   408      */
   410     static int mRemoveFrAlbumReturn;
   409     static int mRemoveFrAlbumReturn;
       
   410     
       
   411     /**
       
   412      * value returned from getMediaIdFromIndex
       
   413      */
       
   414     static TMPXItemId mItemIdToReturn;
   411     
   415     
   412 };
   416 };
   413 
   417 
   414 /**
   418 /**
   415  * dummy data wrapper class
   419  * dummy data wrapper class
   425             return -1;
   429             return -1;
   426         }
   430         }
   427 
   431 
   428         for(int i = 0; i < mObj->getVideoCount(); ++i)
   432         for(int i = 0; i < mObj->getVideoCount(); ++i)
   429         {
   433         {
   430             if(id == mObj->getMediaIdFromIndex(i))
   434             if(id == mObj->getMediaId(mObj->getMediaFromIndex(i)))
   431             {
   435             {
   432                 return i;
   436                 return i;
   433             }
   437             }
   434         }
   438         }
   435         return -1;
   439         return -1;