Skip to content

Commit dd5c3fb

Browse files
authored
Merge pull request #2222 from dr-venkman/fix_formatting_native_download
[download] Minor corrections to native guide
2 parents 1702b42 + 8a6f18a commit dd5c3fb

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/application/native/guides/connectivity/download.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
# Download
22

33

4-
You can create and manage 1 or more download requests at a time. Each download process goes through a [set of states](#state), and you can manage the process though the states with specific functions.
4+
You can create and manage 1 or more download requests at a time. Each download process goes through a [set of states](#download-states), and you can manage the process though the states with specific functions.
55

66
This feature is optional.
77

88
The following figure illustrates the user scenario for the download:
99

10-
1. When the user wants to download a file, you can [create a new download process](#download), configure the download URL or destination, and launch the process.
10+
1. When the user wants to download a file, you can [create a new download process](#downloading-content-from-a-url), configure the download URL or destination, and launch the process.
1111
2. During the download, you can pause, resume, or stop the process programmatically, or as a response to user requests. In addition, you can monitor the progress of the download process.
1212

1313
**Figure: User scenario**
1414

1515
![User scenario](./media/user_scenario.png)
1616

17-
<a name="state"></a>
1817
## Download States
1918

20-
The following figure illustrates the various download states (such as READY and DOWNLOADING), and the functions (such as `download_start()`) that cause transitions between the states. The download states are defined in the download_state_e [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#gae9d05ac4ab7a2ba2fe6b3c329d273810).
19+
The following figure illustrates the various download states (such as READY and DOWNLOADING), and the functions (such as `download_start()`) that cause transitions between the states. The download states are defined in the `download_state_e` [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#gae9d05ac4ab7a2ba2fe6b3c329d273810).
2120

2221
Each function can only be called when the download process is in a specific state. To avoid undefined behavior in the application, make sure that you handle every possible scenario in the code.
2322

@@ -40,7 +39,6 @@ To use the functions and data types of the [Download API](../../api/common/lates
4039

4140
The downloading library needs no initialization prior to the API usage.
4241

43-
<a name="download"></a>
4442
## Downloading Content from a URL
4543

4644
To download content:
@@ -77,7 +75,7 @@ To download content:
7775
Before the download can be started, set the URL source path for the download:
7876

7977
```
80-
error = download_set_url(download_id, "http://tizen.org";
78+
error = download_set_url(download_id, "http://tizen.org");
8179
```
8280

8381
You can also set the destination path and file name. If the values are not given, the default storage and an auto-generated file name are used.
@@ -104,7 +102,7 @@ To download content:
104102
105103
- Network type
106104
107-
To set the desired network type, use the `download_set_network_type()` function. The download_network_type_e [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#gadf73239ac2efa6d4214a03751c76c9b8) defines the network types available for downloading. If no type is set, the `DOWNLOAD_NETWORK_ALL` default value is used.
105+
To set the desired network type, use the `download_set_network_type()` function. The `download_network_type_e` [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#gadf73239ac2efa6d4214a03751c76c9b8) defines the network types available for downloading. If no type is set, the `DOWNLOAD_NETWORK_ALL` default value is used.
108106
109107
```
110108
download_network_type_e value = 0;
@@ -115,7 +113,7 @@ To download content:
115113
116114
- Notifications
117115
118-
To set notifications with a service action, use the `download_set_notification_type()` function. The download_notification_type_e [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#gab2ec29afc07197987eb2b88614fac67f) defines the available download notification types. If no type is set, the `DOWNLOAD_NOTIFICATION_TYPE_NONE` default value is used.
116+
To set notifications with a service action, use the `download_set_notification_type()` function. The `download_notification_type_e` [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#gab2ec29afc07197987eb2b88614fac67f) defines the available download notification types. If no type is set, the `DOWNLOAD_NOTIFICATION_TYPE_NONE` default value is used.
119117
120118
To change the title or description of the notification item, use the `download_set_notification_title()` or `download_set_notification_description()` function. To change the action when the notification item is clicked, use the `download_set_notification_service_handle()` function. If the service action is not set, the default operation is the following:
121119
@@ -144,7 +142,7 @@ To download content:
144142
145143
5. Control the download process.
146144
147-
Downloading can be started, paused, or canceled using the `download_start()`, `download_pause()`, and `download_cancel()` functions. The download ID handle is used as a parameter for all these functions.
145+
Downloading can be started, paused, or canceled using the `download_start()`, `download_pause()`, and `download_cancel()` functions respectively. The download ID handle is used as a parameter for all these functions.
148146
149147
```
150148
error = download_start(download_id);
@@ -202,7 +200,7 @@ To download content:
202200
error = download_get_error(download_id, &error_val);
203201
```
204202
205-
The download_error_e [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#ga2d9ccc088c02cf1ab70879f1beda1cd1) defines the available error types.
203+
The `download_error_e` [enumerator](../../api/common/latest/group__CAPI__WEB__DOWNLOAD__MODULE.html#ga2d9ccc088c02cf1ab70879f1beda1cd1) defines the available error types.
206204
207205
8. Clean up.
208206

0 commit comments

Comments
 (0)