videocollection/videocollectionwrapper/inc/videocollectionwrapper.h
changeset 62 0e1e938beb1a
parent 46 adbe7d5ba2f5
equal deleted inserted replaced
59:a76e86df7ccd 62:0e1e938beb1a
    25 #include "videocollectioncommon.h"
    25 #include "videocollectioncommon.h"
    26 #include "videocollectionexport.h"
    26 #include "videocollectionexport.h"
    27 
    27 
    28 // FORWARD DECLARATIONS
    28 // FORWARD DECLARATIONS
    29 class VideoCollectionWrapperPrivate;
    29 class VideoCollectionWrapperPrivate;
    30 class VideoSortFilterProxyModel;
    30 class VideoProxyModelGeneric;
    31 
    31 
    32 
    32 
    33 /**
    33 /**
    34  * Class is used as an interface of the video collection QT wrapper.
    34  * Class is used as an interface of the video collection QT wrapper.
    35  * 
    35  * 
    37  * 
    37  * 
    38  * * Usage:
    38  * * Usage:
    39  *  @code
    39  *  @code
    40  *  #include "videocollectioncommon.h"
    40  *  #include "videocollectioncommon.h"
    41  *  #include "videocollectionwrapper.h"
    41  *  #include "videocollectionwrapper.h"
    42  *  #include "videosortfilterproxymodel.h"
    42  *  #include "videoproxymodelgeneric.h"
    43  *  
    43  *  
    44  *  ...
    44  *  ...
    45  *  ////
    45  *  ////
    46  *  // Getting the instances
    46  *  // Getting the instances
    47  *  ////
    47  *  ////
    48  *  VideoCollectionWrapper &wrapper = VideoCollectionWrapper::instance();
    48  *  VideoCollectionWrapper &wrapper = VideoCollectionWrapper::instance();
    49  *  // getting all videos model
    49  *  // getting all videos model
    50  *  VideoSortFilterProxyModel *model = wrapper.getModel(VideoCollectionCommon::EModelTypeAllVideos);
    50  *  VideoProxyModelGeneric *model = wrapper.getAllVideosModel();
    51  *  ...
    51  *  ...
    52  *  ////
    52  *  ////
    53  *  // Opening collection and start fetching video item data
    53  *  // Opening collection and start fetching video item data
    54  *  ////
    54  *  ////
    55  *  if(model)
    55  *  if(model)
    78      * @return The singleton instance.
    78      * @return The singleton instance.
    79      */
    79      */
    80     static VideoCollectionWrapper &instance();  
    80     static VideoCollectionWrapper &instance();  
    81     
    81     
    82 	/**
    82 	/**
    83      * Returns pointer to model. Null if creation fails or if
    83      * Returns pointer to generic video model. Null if creation fails or if
    84      * application is closing.
    84      * application is closing.
    85      * 
       
    86      * @param type of the model
       
    87      * 
    85      * 
    88      * @return address to model or NULL if fails or if application is closing.
    86      * @return address to model or NULL if fails or if application is closing.
    89      */    
    87      */    
    90     VideoSortFilterProxyModel* getModel(VideoCollectionCommon::TModelType type);
    88     VideoProxyModelGeneric* getGenericModel();
    91 
    89 
       
    90     /**
       
    91      * Returns pointer to all videos model. Null if creation fails or if
       
    92      * application is closing.
       
    93      * 
       
    94      * @return address to model or NULL if fails or if application is closing.
       
    95      */    
       
    96     VideoProxyModelGeneric* getAllVideosModel();
       
    97 
       
    98     /**
       
    99      * Returns pointer to collections model. Null if creation fails or if
       
   100      * application is closing.
       
   101      * 
       
   102      * @return address to model or NULL if fails or if application is closing.
       
   103      */    
       
   104     VideoProxyModelGeneric* getCollectionsModel();
       
   105     
       
   106     /**
       
   107      * Returns pointer to collection content model. Null if creation fails or if
       
   108      * application is closing.
       
   109      * 
       
   110      * @return address to model or NULL if fails or if application is closing.
       
   111      */    
       
   112     VideoProxyModelGeneric* getCollectionContentModel();
       
   113     
    92     /**
   114     /**
    93      * Method can be used by client to emit status signal
   115      * Method can be used by client to emit status signal
    94      * containing status code from particular async status.
   116      * containing status code from particular async status.
    95      * 
   117      * 
    96      * @param statusCode code of status
   118      * @param statusCode code of status