Fix : Remove exception handling codes at the sample code
[platform/framework/native/content.git] / inc / FCntDownloadRequest.h
index a31c3b4..958b68b 100644 (file)
@@ -31,64 +31,64 @@ namespace Tizen { namespace Content
 {
 
 /**
-* @class    DownloadRequest
-* @brief    This class provides information of a download request.
-*
-* @since 2.0
-*
-* @final       This class is not intended for extension.
-*
-* The %DownloadRequest class provides information of a download request. It provides the URL of a download request, which is mandatory information. It also provides the destination directory path and the file name. The destination directory path and file name can be set by the SetDirectoryPath() and SetFileName() methods. @n
-* If the download path is not specified, the data will be downloaded to the default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
-*
-*/
+ * @class    DownloadRequest
+ * @brief    This class provides information of a download request.
+ *
+ * @since 2.0
+ *
+ * @final      This class is not intended for extension.
+ *
+ * The %DownloadRequest class provides information of a download request. It provides the URL of a download request, which is the mandatory information. It also provides the destination directory path and the file name. The destination directory path and file name can be set by the SetDirectoryPath() and SetFileName() methods. @n
+ * If the download path is not specified, the data is downloaded to the default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
+ *
+ */
 
 class _OSP_EXPORT_ DownloadRequest
        : public Tizen::Base::Object
 {
 public:
        /**
-       * Initializes this instance of %DownloadRequest with the specified URL. @n
-       * The downloaded path is set to a default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
-       *
-       * @since 2.0
-       *
-       * @param[in]  url               The URL of the download request
-       */
+        * Initializes this instance of %DownloadRequest with the specified URL. @n
+        * The downloaded path is set to a default download directory returned by Tizen::System::Environment::GetDefaultDownloadPath().
+        *
+        * @since 2.0
+        *
+        * @param[in]  url              The URL of the download request
+        */
        DownloadRequest(const Tizen::Base::String& url);
 
        /**
-       * Initializes this instance of %DownloadRequest with the specified URL and directory path.
-       *
-       * @since 2.0
-       *
-       * @param[in]  url               The URL of the download request
-       * @param[in]  dirPath   The directory path of the data that will be downloaded
-       */
+        * Initializes this instance of %DownloadRequest with the specified URL and directory path.
+        *
+        * @since 2.0
+        *
+        * @param[in]  url              The URL of the download request
+        * @param[in]  dirPath  The directory path of the data that is downloaded
+        */
        DownloadRequest(const Tizen::Base::String& url, const Tizen::Base::String& dirPath);
 
        /**
-       * Copying of objects using this copy constructor is allowed.
-       *
-       * @since 2.0
-       *
-       * @param[in]  rhs               An instance of %DownloadRequest to copy
-       */
+        * Copying of objects using this copy constructor is allowed.
+        *
+        * @since 2.0
+        *
+        * @param[in]  rhs              An instance of %DownloadRequest to copy
+        */
        DownloadRequest(const DownloadRequest& rhs);
 
        /**
-       * This destructor overrides Tizen::Base::Object::~Object().
-       *
-       * @since 2.0
-       */
+        * This destructor overrides Tizen::Base::Object::~Object().
+        *
+        * @since 2.0
+        */
        virtual ~DownloadRequest(void);
 
        /**
-       * Copying of objects using this copy assignment operator is allowed.
-       *
-       * @return               A reference to this instance
-       * @param[in]    rhs             An instance of %DownloadRequest
-       */
+        * Copying of objects using this copy assignment operator is allowed.
+        *
+        * @return              A reference to this instance
+        * @param[in]   rhs             An instance of %DownloadRequest to copy
+        */
        DownloadRequest& operator =(const DownloadRequest& rhs);
 
        /**
@@ -112,170 +112,170 @@ public:
        virtual int GetHashCode(void) const;
 
        /**
-       * Sets the directory path of the data that will be downloaded.
-       *
-       * @since 2.0
-       *
-       * @param[in]  dirPath   The directory path
-       */
+        * Sets the directory path of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @param[in]  dirPath  The directory path
+        */
        void SetDirectoryPath(const Tizen::Base::String& dirPath); 
 
        /**
-       * Sets the file name of the data to be downloaded.
-       *
-       * @since 2.0
-       *
-       * @param[in]  fileName  The file name
-       */
+        * Sets the file name of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @param[in]  fileName The file name
+        */
        void SetFileName(const Tizen::Base::String& fileName); 
 
        /**
-       * Gets the URL of a download request.
-       *
-       * @since 2.0
-       *
-       * @return               The URL of this download request
-       */
+        * Gets the URL of the download request.
+        *
+        * @since 2.0
+        *
+        * @return              The URL of this download request
+        */
        Tizen::Base::String GetUrl(void) const;
 
        /**
-       * Gets the directory path of the data that will be downloaded.
-       *
-       * @since 2.0
-       *
-       * @return               The directory path
-       */
+        * Gets the directory path of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @return              The directory path
+        */
        Tizen::Base::String GetDirectoryPath(void) const;
 
        /**
-       * Gets the file name of the data to be downloaded.
-       *
-       * @since 2.0
-       *
-       * @return               The file name
-       */
+        * Gets the file name of the data that is downloaded.
+        *
+        * @since 2.0
+        *
+        * @return              The file name
+        */
        Tizen::Base::String GetFileName(void) const;
 
        /**
-       * Determines whether the system should show the download notification or not. @n
-       * If @c true, the system posts notifications about this download request through the Tizen::Shell::NotificationManager. @n
-       * By default, this value sets to @c true.
-       *
-       * @since 2.1
-       *
-       * @param[in] enable Set to @c true if the system shows a notification for this download request, @n
-                                             else @c false
-       */
+        * Determines whether the system should show the download notification or not. @n
+        * If @c true, the system posts notifications about this download request through the Tizen::Shell::NotificationManager. @n
+        * By default, this value is set to @c true.
+        *
+        * @since 2.1
+        *
+        * @param[in] enable Set to @c true if the system shows a notification for this download request, @n
+        *                                      else @c false
+        */
        void SetNotification(bool enable);
 
        /**
-       * Sets extra data that is delivered to the application when the notification message is selected. @n
-       * The extra data will be passed to the application through the
-       * Tizen::App::IAppControlProviderEventListener::OnAppControlRequestReceived() method.
-       *
-       * @since 2.1
-       *
-       * @return An error code
-       * @param[in] pExtraData A pointer to an argument map of the Tizen::Base::String key and the Tizen::Base::String value pair
-       * @exception E_SUCCESS The method is successful.
-       * @exception E_INVALID_ARG Either of the following conditions has occurred:
-       * - The argument is @c null.
-       * - The argument is not a map of the Tizen::Base::String key and the Tizen::Base::String value pair.
-       * @see Tizen::Shell::NotificationManager
-       */
+        * Sets extra data that is delivered to the application when the notification message is selected. @n
+        * The extra data is passed to the application through the
+        * Tizen::App::IAppControlProviderEventListener::OnAppControlRequestReceived() method.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] pExtraData    A pointer to the argument map of the Tizen::Base::String key and the %Tizen::Base::String value pair
+        * @exception E_SUCCESS     The method is successful.
+        * @exception E_INVALID_ARG Either of the following conditions has occurred:
+        *                                              - The argument is @c null.
+        *                                              - The argument is not a map of the Tizen::Base::String key and the %Tizen::Base::String value pair.
+        * @see Tizen::Shell::NotificationManager
+        */
        result SetNotificationExtraData(const Tizen::Base::Collection::IMap *pExtraData);
 
        /**
-       * Sets an allowed network type. @n
-       * By default, all network types are allowed.
-       *
-       * @since 2.1
-       *
-       * @param[in] type The download network type
-       */
+        * Sets the allowed network type. @n
+        * By default, all network types are allowed.
+        *
+        * @since 2.1
+        *
+        * @param[in] type The download network type
+        */
        void SetNetworkType(DownloadNetworkType type);
 
        /**
-       * Checks whether the system should show a notification for this download request.
-       *
-       * @since 2.1
-       *
-       * @return @c true if the system should show a notification for this download request, @n
-       * else @c false
-       */
+        * Checks whether the system should show a notification for this download request.
+        *
+        * @since 2.1
+        *
+        * @return @c true if the system should show a notification for this download request, @n
+        *                else @c false
+        */
        bool IsNotificationEnabled(void) const;
 
        /**
-       * Gets extra data that is delivered to the application when the notification message is selected.
-       *
-       * @since 2.1
-       *
-       * @return The extra data map that consists of the Tizen::Base::String key and the Tizen::Base::String value pair
-       */
+        * Gets the extra data that is delivered to the application when the notification message is selected.
+        *
+        * @since 2.1
+        *
+        * @return The extra data map that consists of the Tizen::Base::String key and the %Tizen::Base::String value pair
+        */
        const Tizen::Base::Collection::IMap* GetNotificationExtraData(void) const;
 
        /**
-       * Gets an allowed network type.
-       *
-       * @since 2.1
-       *
-       * @return The network type
-       */
+        * Gets the allowed network type.
+        *
+        * @since 2.1
+        *
+        * @return The network type
+        */
        DownloadNetworkType GetNetworkType(void) const;
 
        /**
-       * Adds an HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return An error code
-       * @param[in] field The HTTP header field
-       * @param[in] value The value of the header field
-       * @exception E_SUCCESS The method is successful.
-       * @exception E_INVALID_ARG Either the field is empty or it already exists.
-       */
+        * Adds the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] field                     The HTTP header field
+        * @param[in] value                     The value of the header field
+        * @exception E_SUCCESS                 The method is successful.
+        * @exception E_INVALID_ARG     Either the field is empty or it already exists.
+        */
        result AddRequestHeader(const Tizen::Base::String& field, const Tizen::Base::String& value);
 
        /**
-       * Sets an HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return An error code
-       * @param[in] field The HTTP header field
-       * @param[in] value The value of the header field
-       * @exception E_SUCCESS The method is successful.
-       * @exception E_INVALID_ARG Either the field is empty or it does not exist.
-       */
+        * Sets the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] field                     The HTTP header field
+        * @param[in] value                     The value of the header field
+        * @exception E_SUCCESS             The method is successful.
+        * @exception E_INVALID_ARG  Either the field is empty or it does not exist.
+        */
        result SetRequestHeader(const Tizen::Base::String& field, const Tizen::Base::String& value);
 
        /**
-       * Removes an HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return An error code
-       * @param[in] field The HTTP header field
-       * @exception E_SUCCESS The method is successful.
-       * @exception E_INVALID_ARG Either the field is empty or it does not exist.
-       */
+        * Removes the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       An error code
+        * @param[in] field                     The HTTP header field
+        * @exception E_SUCCESS                 The method is successful.
+        * @exception E_INVALID_ARG  Either the field is empty or it does not exist.
+        */
        result RemoveRequestHeader(const Tizen::Base::String& field);
 
        /**
-       * Gets the value of an HTTP header field.
-       *
-       * @since 2.1
-       *
-       * @return The value of the HTTP header field if successful, @n
-       * else @c null if there is no HTTP header field
-       * @param[in] field The HTTP header field
-       */
+        * Gets the value of the HTTP header field.
+        *
+        * @since 2.1
+        *
+        * @return       The value of the HTTP header field if successful, @n
+        *                       else @c null if there is no HTTP header field
+        * @param[in] field             The HTTP header field
+        */
        Tizen::Base::String* GetRequestHeaderN(const Tizen::Base::String& field);
 
 private:
-       /**
-       * This default constructor is intentionally declared as private so that only the platform can create an instance.
-       */
+       //
+       // This default constructor is intentionally declared as private so that only the platform can create an instance.
+       //
        DownloadRequest(void);
 
        friend class _DownloadRequestImpl;