d5b0d2bcc91110603eb4563aed8efbebf6a841ae
[staging/basesystem.git] / video_in_hal / nsframework / backup_manager / client / include / bkup_api.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef BACKUP_MANAGER_CLIENT_INCLUDE_BKUP_API_H_
18 #define BACKUP_MANAGER_CLIENT_INCLUDE_BKUP_API_H_
19
20 #define BACKUP_CID 0xBACC1D00
21
22 #define BKUP_MAX_ITEM_NAME 64
23
24 /**
25  * media
26  */
27 #include <nv_hal.h>
28
29 /**
30  * command
31  */
32 typedef enum {
33   BKUP_CMD_READ = 0,
34   BKUP_CMD_WRITE,
35   BKUP_CMD_FILL,
36   BKUP_CMD_SIZE,
37   BKUP_CMD_READ_NUM,
38   BKUP_CMD_SIZE_NUM,
39   BKUP_CMD_CHECK,
40   BKUP_CMD_DELETE,
41   BKUP_CMD_COPY_INNER,
42   BKUP_CMD_MAX,
43 } bkup_protocol_command_t;
44
45 /**
46  * api/process protocol
47  */
48 typedef struct {
49   bkup_protocol_command_t command;
50   char item_name[64];
51   uint32_t num_id;
52   uint32_t offset;
53   uint32_t size;
54   char fill_patern;
55   enum NvHalMedia src_media;
56 } bkup_protocol_header_t;
57
58 #define SERVICE_BACKUP_MANAGER_MSG_HANDLE_THREAD "bkupmanagerthr"
59
60 #endif  // BACKUP_MANAGER_CLIENT_INCLUDE_BKUP_API_H_