1 /*
2  * Copyright (C) 2022 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 #ifndef FRAMEWORKS_SERVICES_MEDIA_MTP_SERVICE_INCLUDE_MEDIA_MTP_UTILS_H_
17 #define FRAMEWORKS_SERVICES_MEDIA_MTP_SERVICE_INCLUDE_MEDIA_MTP_UTILS_H_
18 #include <stdint.h>
19 #include <string>
20 #include "medialibrary_errno.h"
21 
22 namespace OHOS {
23 namespace Media {
24 const uint16_t UNDEFINED_CONTAINER_TYPE = 0;
25 const uint16_t COMMAND_CONTAINER_TYPE = 1;
26 const uint16_t DATA_CONTAINER_TYPE = 2;
27 const uint16_t RESPONSE_CONTAINER_TYPE = 3;
28 const uint16_t EVENT_CONTAINER_TYPE = 4;
29 
30 const uint32_t PACKET_HEADER_LENGETH = 12;
31 const uint32_t READ_DATA_BUFFER_MAX_SIZE = 16384;
32 const uint32_t READ_BUFFER_MAX_SIZE = 512;
33 constexpr uint32_t COMMON_PHOTOS_OFFSET = 100000000;
34 constexpr uint32_t EDITED_PHOTOS_OFFSET = 200000000;
35 constexpr uint32_t COMMON_MOVING_OFFSET = 300000000;
36 constexpr uint32_t EDITED_MOVING_OFFSET = 400000000;
37 const std::string DEFAULT_PRODUCT_NAME = "OpenHarmony Device";
38 const std::string DEFAULT_PRODUCT_MODEL = "ohos";
39 const std::string DEFAULT_PRODUCT_MANUFACTURER = "default";
40 const std::string DEFAULT_PRODUCT_HARDWARE_VERSION = "default";
41 const std::string DEFAULT_PRODUCT_SOFTWARE_VERSION = "OpenHarmony 3.2";
42 } // namespace Media
43 } // namespace OHOS
44 #endif  // FRAMEWORKS_SERVICES_MEDIA_MTP_SERVICE_INCLUDE_MEDIA_MTP_UTILS_H_
45