TizenRefApp-9685 [Gallery] Add doxygen documentation to Model private classes 34/157834/5
authorAlexander\ Kovalenko <al.kovalenko@samsung.com>
Thu, 26 Oct 2017 11:10:06 +0000 (14:10 +0300)
committerAlexander\ Kovalenko <al.kovalenko@samsung.com>
Tue, 7 Nov 2017 08:04:02 +0000 (10:04 +0200)
Change-Id: I028e192ac21decf6290a8ae53af0b5b39445de58

gallery/model/impl/BaseJob.h
gallery/model/impl/GalleryAlbum.h
gallery/model/impl/helpers.h

index 42c637433c5224dcb7a9c8782a6b1fdd253d8f1e..de8aaa32c7ebb9313c507896e9aef0ad823c6057 100644 (file)
 
 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:
index cc37f734e27268de1265a9b14f5718cfe15b7db9..0f25162bbf957d45402d19baf53de83fff3f7b71 100644 (file)
@@ -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:
index acb6f24ba6cb792c5885cbc8680b20bd9328d9a5..e8f7fba4a8ead81b5a7c55a68b63fde5ae694a97 100644 (file)
 
 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();
 }