Revert manifest to default one
[profile/ivi/download-provider.git] / include / download-provider-config.h
1 #ifndef DOWNLOAD_PROVIDER_CONFIG_H
2 #define DOWNLOAD_PROVIDER_CONFIG_H
3
4 #include <app_ui_notification.h>
5 #include <app_service.h>
6
7 #include <download-provider.h>
8
9 #define DOWNLOAD_PROVIDER_IPC "/tmp/download-provider"
10 #define DOWNLOAD_PROVIDER_LOCK_PID "/tmp/download-provider.lock"
11
12 #define DOWNLOAD_PROVIDER_CARE_CLIENT_MIN_INTERVAL 5
13 #define DOWNLOAD_PROVIDER_CARE_CLIENT_MAX_INTERVAL 3600
14
15 #define DOWNLOAD_PROVIDER_DOWNLOADING_DB_NAME DATABASE_DIR"/"DATABASE_NAME
16
17 #define MAX_CLIENT 64           // Backgound Daemon should has the limitation of resource.
18
19 #define DOWNLOAD_PROVIDER_REQUESTID_LEN 20
20
21 #define DOWNLOAD_PROVIDER_HISTORY_DB_LIMIT_ROWS 1000
22
23 typedef struct {
24         pid_t pid;
25         uid_t uid;
26         gid_t gid;
27 } download_client_credential;
28
29 typedef struct {
30         pthread_t thread_pid;
31         pthread_mutex_t client_mutex;
32         int clientfd;           // socket for client
33         download_client_credential credentials;
34         ui_notification_h ui_notification_handle;       // notification bar
35         service_h service_handle;       // launch the special app from notification bar
36         int req_id;
37         download_request_info *requestinfo;
38         downloading_state_info *downloadinginfo;
39         download_content_info *downloadinfo;
40         char *tmp_saved_path;
41         download_states state;
42         download_error err;
43 } download_clientinfo;
44
45 typedef struct {
46         download_clientinfo *clientinfo;
47 } download_clientinfo_slot;
48 #endif