1 #ifndef DOWNLOAD_PROVIDER_CONFIG_H
2 #define DOWNLOAD_PROVIDER_CONFIG_H
4 #include <app_ui_notification.h>
5 #include <app_service.h>
7 #include <download-provider.h>
9 #define DOWNLOAD_PROVIDER_IPC "/tmp/download-provider"
10 #define DOWNLOAD_PROVIDER_LOCK_PID "/tmp/download-provider.lock"
12 #define DOWNLOAD_PROVIDER_CARE_CLIENT_MIN_INTERVAL 5
13 #define DOWNLOAD_PROVIDER_CARE_CLIENT_MAX_INTERVAL 3600
15 #define DOWNLOAD_PROVIDER_DOWNLOADING_DB_NAME DATABASE_DIR"/"DATABASE_NAME
17 #define MAX_CLIENT 64 // Backgound Daemon should has the limitation of resource.
19 #define DOWNLOAD_PROVIDER_REQUESTID_LEN 20
21 #define DOWNLOAD_PROVIDER_HISTORY_DB_LIMIT_ROWS 1000
27 } download_client_credential;
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
37 download_request_info *requestinfo;
38 downloading_state_info *downloadinginfo;
39 download_content_info *downloadinfo;
41 download_states state;
43 } download_clientinfo;
46 download_clientinfo *clientinfo;
47 } download_clientinfo_slot;