videocollection/videocollectionwrapper/inc/videocollectionclient.h
changeset 36 8aed59de29f9
parent 35 3738fe97f027
child 50 21fe8338c6bf
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    18 #define __VIDEOCOLLECTIONCLIENT_H
    18 #define __VIDEOCOLLECTIONCLIENT_H
    19 
    19 
    20 #include <vcxmyvideosdefs.h>
    20 #include <vcxmyvideosdefs.h>
    21 #include <QList>
    21 #include <QList>
    22 #include "videocollectioncommon.h"
    22 #include "videocollectioncommon.h"
       
    23 
    23 // FORWARD DECLARATIONS
    24 // FORWARD DECLARATIONS
    24 
    25 
    25 class MMPXCollectionUtility;
    26 class MMPXCollectionUtility;
    26 class VideoDataSignalReceiver;
    27 class VideoDataSignalReceiver;
    27 class VideoCollectionListener;
    28 class VideoCollectionListener;
    28 
       
    29 
    29 
    30 // CLASS DECLARATION
    30 // CLASS DECLARATION
    31 
    31 
    32 /**
    32 /**
    33  * Client class for My Videos MPX Collection.
    33  * Client class for My Videos MPX Collection.
    34  *
    34  *
    35  * @lib videocollectionwrapper.dll
    35  * @lib videocollectionwrapper.dll
    36  */
    36  */
    37 class VideoCollectionClient 
    37 class VideoCollectionClient 
    38 {
    38 {
    39         
    39 
    40 public: 
    40 public: 
    41     
    41     
    42     /**
    42     /**
    43      * Constructor
    43      * Constructor
    44      */
    44      */
    57      * @return 0 if ok, < 0 in case of error
    57      * @return 0 if ok, < 0 in case of error
    58      */
    58      */
    59     int initialize(VideoDataSignalReceiver *signalReceiver);
    59     int initialize(VideoDataSignalReceiver *signalReceiver);
    60 
    60 
    61 public:
    61 public:
    62    
       
    63         
    62         
    64     /**
    63     /**
    65      * Collection opening status
    64      * Collection opening status
    66      */
    65      */
    67     enum TCollectionOpenStatus
    66     enum TCollectionOpenStatus
    68     {        
    67     {        
    69         ECollectionNotOpen = 0,
    68         ECollectionNotOpen = 0,
    70         ECollectionOpening,
    69         ECollectionOpening,
    71         ECollectionOpened            
    70         ECollectionOpened            
    72     };  
    71     };  
    73         
       
    74 
       
    75 
    72 
    76     /**
    73     /**
    77      * Connects videodata signals to provided object
    74      * Connects videodata signals to provided object
    78      * If method fails, client should deallocate it's 
    75      * If method fails, client should deallocate it's 
    79      * VideoDataSignalReceiver object to make sure thee are
    76      * VideoDataSignalReceiver object to make sure thee are
   110     /**
   107     /**
   111      * Sets open status, if given status is ECollectionOpened calls 
   108      * Sets open status, if given status is ECollectionOpened calls 
   112      * startOpenCurrentState to start collection into current state. 
   109      * startOpenCurrentState to start collection into current state. 
   113      * 
   110      * 
   114      */
   111      */
   115     void setOpenStatus(int status);
   112     void setOpenStatus(int status,  bool startOpening = true);
   116         
   113         
   117     /**
   114     /**
   118      * Starts opening of collection to the all videos category
   115      * Starts opening of collection to the all videos category
   119      * 
   116      * 
   120      * @return 0 startup ok
   117      * @return 0 startup ok
   203      * @param albumId, Album from where to remove items.
   200      * @param albumId, Album from where to remove items.
   204      * @param mediaIds, Items which to remove.
   201      * @param mediaIds, Items which to remove.
   205      * @return 0 if no errors.
   202      * @return 0 if no errors.
   206      */
   203      */
   207     int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds);
   204     int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds);
       
   205     
       
   206     /**
       
   207      * Renames an album.
       
   208      * 
       
   209      * @param albumId, Album to be renamed.
       
   210      * @param newTitle, New title for the album.
       
   211      * @return 0 if no errors.
       
   212      */
       
   213     int renameAlbum(const TMPXItemId &albumId, const QString &newTitle);
   208 
   214 
   209 private:
   215 private:
   210     
   216     
   211     /**
   217     /**
   212      * Private implementation to handle leaving code of collection opening.
   218      * Private implementation to handle leaving code of collection opening.
   288      * @param mediaIds, Items to remove from album.
   294      * @param mediaIds, Items to remove from album.
   289      * @return None.
   295      * @return None.
   290      */
   296      */
   291     void removeItemsFromAlbumL(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds);
   297     void removeItemsFromAlbumL(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds);
   292     
   298     
       
   299     /**
       
   300      * Renames an album.
       
   301      * 
       
   302      * @param albumId, Album to be renamed.
       
   303      * @param newTitle, New title for the album.
       
   304      * @return None.
       
   305      */
       
   306     void renameAlbumL(const TMPXItemId &albumId, const QString newTitle);
       
   307     
   293 private:
   308 private:
   294     
       
   295 
   309 
   296     /**
   310     /**
   297      * Pointer to MPX Collection utility.
   311      * Pointer to MPX Collection utility.
   298      * Own.
   312      * Own.
   299      */
   313      */