[content] Fix description in DownloadManager
[platform/framework/native/content.git] / inc / FCntContentManager.h
old mode 100755 (executable)
new mode 100644 (file)
index 22831e2..ef31aa5
@@ -37,7 +37,8 @@ namespace Tizen { namespace Content
 
 class ContentInfo;
 class _ContentManagerImpl;
-class _IContentScanListener;
+class IContentScanListener;
+class IContentUpdateEventListener;
 
 /**
  * @class      ContentManager
@@ -162,7 +163,8 @@ public:
         * Creates the content information.
         *
         * @since                       2.0
-        * @privilege           %http://tizen.org/privilege/content.write
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
         *
         * @return                      The content ID
         * @param[in]   contentInfo                                             An instance of ContentInfo
@@ -192,7 +194,8 @@ public:
         * @compatibility This method has compatibility issues with OSP compatible applications. @n
         *                       For more information, see @ref CompContentManagerCreateContentPage "here".
         * @endif
-        * @privilege           %http://tizen.org/privilege/content.write
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
         *
         * @return                      The content ID
         * @param[in]   byteBuffer                                              The @c byteBuffer of the content to create
@@ -229,7 +232,8 @@ public:
         * @compatibility This method has compatibility issues with OSP compatible applications. @n
         *                       For more information, see @ref CompContentManagerCreateContentPage "here".
         * @endif
-        * @privilege           %http://tizen.org/privilege/content.write
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
         *
         * @return                      The content ID
         * @param[in]   sourcePath                                              The source file path
@@ -253,7 +257,7 @@ public:
         * @exception   E_SYSTEM                                                A system error has occurred.
         * @exception   E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
         * @exception   E_SERVICE_BUSY                  The database is busy.
-        * @remarks             The source path should start with the directory path returned by either Tizen::System::Environment::GetAppRootPath() or Tizen::System::Environment::GetExternalStoragePath(). @n
+        * @remarks             The source path should start with the directory path returned by either Tizen::App::App::GetAppRootPath() or Tizen::System::Environment::GetExternalStoragePath(). @n
         *                     The destination path should start with the directory path returned by either Tizen::System::Environment::GetMediaPath() or Tizen::System::Environment::GetExternalStoragePath(). @n
         *                     The specific error code can be accessed using the GetLastResult() method. @n
         *                     For using CreateContent(), check @ref CreateContentUsage "here".
@@ -369,7 +373,8 @@ public:
         * Gets the content information.
         *
         * @since                       2.0
-        * @privilege           %http://tizen.org/privilege/content.read
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.read
         *
         * @return                      A pointer to ContentInfo
         * @param[in]   contentId                                               The content ID
@@ -389,7 +394,8 @@ public:
         * Updates the content information with the specified instance of ContentInfo.
         *
         * @since                       2.0
-        * @privilege           %http://tizen.org/privilege/content.write
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
         *
         * @return                      An error code
         * @param[in]   contentInfo                                             An instance of ContentInfo
@@ -407,7 +413,8 @@ public:
         * Deletes the content information with the specified content ID.
         *
         * @since                       2.0
-        * @privilege           %http://tizen.org/privilege/content.write
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
         *
         * @return                      An error code
         * @param[in]   contentId                                               The content ID
@@ -424,15 +431,71 @@ public:
         */
        result DeleteContent(const ContentId& contentId);
 
-       /*
-        * Requests to scan a file(for internal use)
+       /**
+        * Adds a listener to receive the database change notification
+        *
+        * @since                       2.1
+        *
+        * @return                      An error code
+        * @param[in]           listener                                The event listener
+        * @exception           E_SUCCESS                               The method is successful.
+        * @exception           E_OBJ_ALREADY_EXIST     The listener has already been added.
+        * @exception           E_SYSTEM                                The method cannot proceed due to a severe system error.
+        */
+       result AddContentUpdateEventListener(IContentUpdateEventListener& listener);
+
+       /**
+        * Removes a listener
+        *
+        * @since           2.1
+        *
+        * @return                      An error code
+        * @param[in]           listener                        The event listener
+        * @exception           E_SUCCESS                       The method is successful.
+        * @exception           E_OBJ_NOT_FOUND The listener is not found.
+        * @exception           E_SYSTEM                        The method cannot proceed due to a severe system error.
+        */
+       result RemoveContentUpdateEventListener(IContentUpdateEventListener& listener);
+
+
+       /**
+        * Requests to scan a file
+        *
+        * @since                       2.1
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
+        *
+        * @return              An error code
+        * @param[in]   contentPath                     The content path
+        * @exception   E_SUCCESS                               The method is successful.
+        * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
+        * @exception   E_SERVICE_BUSY          The database is busy.
+        * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+        * @exception   E_SYSTEM                                The method cannot proceed due to a severe system error.
         */
-       result ScanFile(const Tizen::Base::String& contentPath);
+       static result ScanFile(const Tizen::Base::String& contentPath);
 
-       /*
-        * Requests to scan directories(for internal use)
+       /**
+        * Requests to scan a directory
+        *
+        * @since                       2.1
+        * @privlevel           public
+        * @privilege           http://tizen.org/privilege/content.write
+        *
+        * @return                      An error code
+        * @param[in]           directoryPath                   The directory path
+        * @param[in]           recursive                               Set to @c true in order to scan recursively sub directories, @n
+        *                                       else @c false
+        * @param[in]           pListener                               The scan event listener
+        * @param[out]  reqId                                   The request ID
+        * @exception           E_SUCCESS                               The method is successful.
+        * @exception           E_INVALID_ARG                   The specified input parameter is invalid.
+        * @exception           E_SERVICE_BUSY          The database is busy.
+        * @exception           E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+        * @exception           E_SYSTEM                                The method cannot proceed due to a severe system error.
+        * @remark                      Platform does not have the ownership of the listener.
         */
-       result ScanDirectory(const Tizen::Base::String& directoryPath, bool recursive, _IContentScanListener& listener);
+       static result ScanDirectory(const Tizen::Base::String& directoryPath, bool recursive, IContentScanListener* pListener, RequestId& reqId);
 
 private:
        /**