• 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 #ifndef OHOS_ABILITY_RUNTIME_IABILITY_CALLBACK_H
17 #define OHOS_ABILITY_RUNTIME_IABILITY_CALLBACK_H
18 
19 #ifdef SUPPORT_GRAPHICS
20 #include "pixel_map.h"
21 #endif
22 
23 namespace OHOS {
24 namespace AppExecFwk {
25 class IAbilityCallback {
26 public:
27     IAbilityCallback() = default;
28     virtual ~IAbilityCallback() = default;
29 #ifdef SUPPORT_GRAPHICS
30     /**
31      * @brief Called back at ability context.
32      *
33      * @return current window mode of the ability.
34      */
35     virtual int GetCurrentWindowMode() = 0;
36 
37     /**
38      * @brief Set mission label of this ability.
39      *
40      * @param label the label of this ability.
41      * @return Returns ERR_OK if success.
42      */
43     virtual ErrCode SetMissionLabel(const std::string &label) = 0;
44 
45     /**
46      * @brief Set mission icon of this ability.
47      *
48      * @param icon the icon of this ability.
49      * @return Returns ERR_OK if success.
50      */
51     virtual ErrCode SetMissionIcon(const std::shared_ptr<OHOS::Media::PixelMap> &icon) = 0;
52 #endif
53 };
54 }  // namespace AppExecFwk
55 }  // namespace OHOS
56 #endif  // OHOS_ABILITY_RUNTIME_IABILITY_CALLBACK_H
57