From: Alexander\ Kovalenko Date: Thu, 26 Oct 2017 11:10:06 +0000 (+0300) Subject: TizenRefApp-9685 [Gallery] Add doxygen documentation to Model private classes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf62a495fd7520be00b05e703acfbfe44a2324f2;p=profile%2Fwearable%2Fapps%2Fnative%2Fgallery.git TizenRefApp-9685 [Gallery] Add doxygen documentation to Model private classes Change-Id: I028e192ac21decf6290a8ae53af0b5b39445de58 --- diff --git a/gallery/model/impl/BaseJob.h b/gallery/model/impl/BaseJob.h index 42c6374..de8aaa3 100644 --- a/gallery/model/impl/BaseJob.h +++ b/gallery/model/impl/BaseJob.h @@ -25,23 +25,61 @@ namespace gallery { + /** + * @brief Base job class + */ class BaseJob : public IJob { public: // IJob // + /** + * @brief Gets result + * @return Result. @see ucl::Result + */ virtual ucl::Result getResult() const final override; + + /** + * @brief Check if job can be canceled + * @return true if cancelable + */ virtual bool isCancelable() const final override; + + /** + * @brief Cancels job + * @return Result. @see ucl::Result + */ virtual ucl::Result cancel() final override; protected: + /** + * @brief Constructor + * @param[in] onComplete Completion handler + * @param[in] isCancelable Cancelable flag + */ BaseJob(const NotiHandler &onComplete, bool isCancelable); + + /** + * @brief Destructor + */ virtual ~BaseJob(); + /** + * @brief Prepares job data + * @return RES_OK on success, otherwise an error code on failure + */ ucl::Result prepare(); + /** + * @brief Checks if job is canceled + * @return true if canceled, false if not + */ bool isCancelled() const; + /** +* * @brief Sends execute signal + * @return RES_OK on success, otherwise an error code on failure + */ virtual ucl::Result execute() = 0; private: diff --git a/gallery/model/impl/GalleryAlbum.h b/gallery/model/impl/GalleryAlbum.h index cc37f73..0f25162 100644 --- a/gallery/model/impl/GalleryAlbum.h +++ b/gallery/model/impl/GalleryAlbum.h @@ -29,20 +29,50 @@ namespace gallery { UCL_DECLARE_REF_ALIASES(GalleryAlbum); + /** + * @brief Gallery album + */ class GalleryAlbum final : public IMediaAlbum { public: + /** + * @brief Creates new GalleryAlbum instance + * @return Shared reference to GalleryAlbum object + */ static GalleryAlbumSRef newInstance(); public: // IMediaAlbum // + /** + * @brief Adds change handler + * @param[in] handler Change handler + */ virtual void addChangeHandler(NotiHandler handler) final override; + + /** + * @brief Removes change handler + * @param[in] handler Change handler + */ virtual void delChangeHandler( NotiHandler::CDRef handler) final override; + /** + * @brief Runs function for each MediaAlbum entry + * @param[in] cb Callback function + * @return RES_OK on success, otherwise an error code on failure + */ virtual ucl::Result forEachMedia(EachCb cb) const final override; + + /** + * @brief Gets number of items in album + * @param[out] count Media count + * @return RES_OK on success, otherwise an error code on failure + */ virtual ucl::Result getMediaCount(int &count) const final override; + /** + * @brief Defragments media album contents + */ virtual void defragment() final override; private: diff --git a/gallery/model/impl/helpers.h b/gallery/model/impl/helpers.h index acb6f24..e8f7fba 100644 --- a/gallery/model/impl/helpers.h +++ b/gallery/model/impl/helpers.h @@ -25,13 +25,42 @@ namespace gallery { + /** + * @brief Converts platform media content type to MediaType + * @param[in] contentType Content type + * @return Media type + */ MediaType toMediaType(media_content_type_e contentType); + /** + * @breif Gets mutex + * @return Mutex. @see ucl::Mutex + */ ucl::Mutex &getMediaMutex(); + /** + * @brief Gets internal storage ID + * @param[out] result Storage ID + * @return RES_OK on success, otherwise an error code on failure + */ ucl::Result getInternalStorageId(int &result); + /** + * @brief Connects to database + * @details Creates connection to media database. In case of existing + * connection registers additional virtual connection(increases + * connection count by one) + * @return RES_OK on success, otherwise an error code on failure + */ ucl::Result acquireMediaDbConnection(); + + /** + * @brief Disconnects from database + * @details Destroys connection to media database. While there is more + * than one connection, erase one virtual connection(decrease + * connection count by one) + * @return RES_OK on success, otherwise an error code on failure + */ void releaseMediaDbConnection(); }