class ContentInfo;
class _ContentManagerImpl;
-class _IContentScanListener;
+class IContentScanListener;
+class IContentUpdateEventListener;
/**
* @class ContentManager
* 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
* @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
* @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
* @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".
* 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
* 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
* 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
*/
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:
/**