Initialize Tizen 2.3
[framework/system/oma-dm-agent.git] / include / dm-engine / fumo / fumo_engine_internal.h
1 /*
2  * oma-dm-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef FUMO_ENGINE_INTERNAL_H_
19 #define FUMO_ENGINE_INTERNAL_H_
20
21  /*
22   *   1. DevInfo
23   *  - DevID                    : device id
24   *  - Man                      : manufacture
25   *  - Mod                      : model id or model number
26   *  - DmV                      : OMA DM client version
27   *  - Lang                     : current setting language
28   *  - Bearer           : bearer
29   *
30   *  2. DevDetail
31   *  - KernelV          : kernel version
32   *  - SwV                      : software version
33   *  - HwV                      : hardware version
34   *  - FwV                      : firmware version
35   *  - ModemV           : modem version
36   *  - PDAV                     : PDA version
37   *  - OEM                      : original equipment manufacturer
38   *  - DevType          : device type
39   *  - Bearer           : bearer
40   *  - FOTADownDir: firmware download directory
41   *  - FOTASaveDir:     firmware save directory
42   */
43 /*
44 sync_agent_dev_return_e sync_agent_get_devinfo(const char *platform, char *info_name, char **value);
45
46 sync_agent_dev_return_e sync_agent_execute_dev_function(2, "fota_flag", 1, memory_type);
47 sync_agent_dev_return_e sync_agent_execute_dev_function(2, "fota_result", 1, (int *)error);
48 */
49
50 #define MAX_DELTA_FILE_SIZE                                             "/usr/share/oma-dm-cfg/delta_size/max_size.txt"
51
52 typedef enum {
53         UNKNOWN = 0,
54         IDLE_START = 10,        /*No pending operation */
55         DOWNLOAD_FAILED = 20,   /*Download failed */
56         DOWNLOAD_PROGRESSING = 30,      /*Download has stared */
57         DOWNLOAD_COMPLETE = 40, /*Download has been completed successfully */
58         READY_TO_UPDATE = 50,   /*Have data and awaiting command to start update */
59         UPDATE_PROGRESSING = 60,        /*Update has stared */
60         UPDATE_FAILED_HAVE_DATA = 70,   /*Update failed but have update package */
61         UPDATE_FAILED_NO_DATA = 80,     /*Update failed and no update package available */
62         UPDATE_SUCCESSFUL_HAVE_DATA = 90,       /*Update complete and data still available */
63         UPDATE_SUCCESSFUL_NO_DATA = 100 /*Data deleted or removed after a successful Update */
64 } FUMO_State;
65
66 typedef enum {
67         FUMO_SUCCESS = 200,
68         /* 250~299 VENDOR */
69         FUMO_MANAGEMENT_CLIENT_ERROR = 400,
70         FUMO_USER_CANCELLED = 401,
71         FUMO_CORRUPTED_FIRMWARE_UPDATE = 402,
72         DEVICE_MISMATCH = 403,
73         FUMO_FAILED_VALIDATION = 404,
74         FUMO_NOT_ACCEPTABLE = 405,
75         FUMO_ALTERNATED_DOWNLOAD_AUTHENTICATION_FAILED = 406,
76         FUMO_ALTERANTED_DOWNLOAD_REQUEST_TIME_OUT = 407,
77         FUMO_NOT_IMPLEMENTED = 408,
78         FUMO_UNDEFINED_ERROR = 409,
79         FUMO_UPDATE_FAILED = 410,
80         FUMO_MALFORMED_OR_BAD_URL = 411,
81         FUMO_ALTERNATED_DOWNLOAD_SERVER_UNABAILABLE = 412,
82         /* 450~499 VENDOR */
83         FUMO_ALTERNATE_DOWNLOAD_SERVER_ERROR = 500,
84         FUMO_DOWNLOAD_FAILS_DUE_TO_DEVICE_OUT_OF_MEMORY = 501,
85         FUMO_UPDATE_FAILS_DUE_TO_DEVICE_OUT_OF_MEMORY = 502,
86         FUMO_DOWNLOAD_FAILS_DUE_TO_NETWORK_ISSUES = 503,
87         /*550~599 */
88
89 } FUMO_Error;
90
91 #endif                          /* FUMO_ENGINE_INTERNAL_H_ */