1 /*
2  * Copyright (c) 2024 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 UPDATE_SESSION_TYPE_H
17 #define UPDATE_SESSION_TYPE_H
18 
19 #include <cstdint>
20 
21 namespace OHOS::UpdateEngine::SessionType {
22 constexpr uint32_t SESSION_CHECK_VERSION = 0;
23 constexpr uint32_t SESSION_DOWNLOAD = 1;
24 constexpr uint32_t SESSION_PAUSE_DOWNLOAD = 2;
25 constexpr uint32_t SESSION_RESUME_DOWNLOAD = 3;
26 constexpr uint32_t SESSION_UPGRADE = 4;
27 constexpr uint32_t SESSION_SET_POLICY = 5;
28 constexpr uint32_t SESSION_GET_POLICY = 6;
29 constexpr uint32_t SESSION_CLEAR_ERROR = 7;
30 constexpr uint32_t SESSION_TERMINATE_UPGRADE = 8;
31 constexpr uint32_t SESSION_GET_NEW_VERSION = 9;
32 constexpr uint32_t SESSION_GET_NEW_VERSION_DESCRIPTION = 10;
33 constexpr uint32_t SESSION_SUBSCRIBE = 11;
34 constexpr uint32_t SESSION_UNSUBSCRIBE = 12;
35 constexpr uint32_t SESSION_GET_UPDATER = 13;
36 constexpr uint32_t SESSION_APPLY_NEW_VERSION = 14;
37 constexpr uint32_t SESSION_FACTORY_RESET = 15;
38 constexpr uint32_t SESSION_VERIFY_PACKAGE = 16;
39 constexpr uint32_t SESSION_CANCEL_UPGRADE = 17;
40 constexpr uint32_t SESSION_GET_CUR_VERSION = 18;
41 constexpr uint32_t SESSION_GET_CUR_VERSION_DESCRIPTION = 19;
42 constexpr uint32_t SESSION_GET_TASK_INFO = 20;
43 constexpr uint32_t SESSION_REPLY_PARAM_ERROR = 21;
44 constexpr uint32_t SESSION_MAX = UINT32_MAX;
45 } // namespace OHOS::UpdateEngine::SessionType
46 #endif // UPDATE_SESSION_TYPE_H
47