• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup Bluetooth
18  * @{
19  *
20  * @brief Defines map client service request types object.
21  *
22  */
23 
24 /**
25  * @file map_mce_types.h
26  *
27  * @brief map client service types header file .
28  *
29  */
30 
31 #ifndef MAP_MCE_TYPES_H
32 #define MAP_MCE_TYPES_H
33 
34 #include <cstdint>
35 
36 namespace OHOS {
37 namespace bluetooth {
38 enum MceEnumType {
39     MCE_MAX_OF_CONNECTED_DEVICES = 4,
40     MCE_MAX_OF_CONNECTED_INSTANCES = 12,
41     // max of message for get unread message
42     MAP_MAX_LIST_COUNT_FOR_GET_UNREAD_MESSAGE = 100,
43     MCE_INSTANCE_CLIENT_OBEX_MTU = 1024,
44     MAX_OF_MASCLIENT_OBEX_UUID_TBL = 16,
45     MCE_8BIT = 8,
46     MCE_16BIT = 16,
47     MCE_16BIT_MASK_LEFT_HIGH = 0xff00,
48     MCE_16BIT_MASK_LEFT_LOW = 0x00ff,
49     MCE_MAX_LENGTH_OF_RESPONSE_BUFFER = 2001
50 };
51 enum MceRequestType {
52     MCE_REQUEST_TYPE_IDLE = 0,
53     MCE_REQUEST_TYPE_GET_FOLDERLISTING,
54     MCE_REQUEST_TYPE_SET_NOTIFICATION_FILTER,
55     MCE_REQUEST_TYPE_SET_NOTIFICATION_REGIST,
56     MCE_REQUEST_TYPE_SET_PATH,
57     MCE_REQUEST_TYPE_GET_MESSAGE,
58     MCE_REQUEST_TYPE_GET_MESSAGELISTING,
59     MCE_REQUEST_TYPE_SEND_MESSAGE,
60     MCE_REQUEST_TYPE_SET_MESSAGE_STATUS,
61     MCE_REQUEST_TYPE_GET_UNREAD_MESSAGES,
62     // MCE_REQUEST_TYPE_GET_SURPORTFEATURES,
63     MCE_REQUEST_TYPE_GET_MASINSTANCE,
64     MCE_REQUEST_TYPE_UPDATE_INBOX,
65     MCE_REQUEST_TYPE_SET_OWNER_STATUS,
66     MCE_REQUEST_TYPE_GET_OWNER_STATUS,
67     MCE_REQUEST_TYPE_GET_CONVERSATION_LISTING,
68     MCE_REQUEST_TYPE_ALL,
69 };
70 /**
71  * @brief config data
72  */
73 struct MasInstanceConfig {
74     // max of connected mce device list
75     uint32_t maxOfDevice = MCE_MAX_OF_CONNECTED_DEVICES;
76     // max of unread message list number
77     uint32_t maxOfGetUnread = MAP_MAX_LIST_COUNT_FOR_GET_UNREAD_MESSAGE;
78     // max of mtu
79     uint32_t l2capMtu = MCE_INSTANCE_CLIENT_OBEX_MTU;
80     uint32_t rfcommMtu = MCE_INSTANCE_CLIENT_OBEX_MTU;
81     // mns connected id
82     uint32_t deviceId = 0;
83     // if support srm
84     bool isSupportSrm = true;
85     // instance mode
86     bool singleInstMode = false;
87     // instance save
88     int singleInstanceId = 0;
89 };
90 }  // namespace bluetooth
91 }  // namespace OHOS
92 #endif  // MAP_MCE_TYPES_H
93