• 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 FRAMEWORKS_ANIMATION_SERVER_EXPORT_IANIMATION_SERVICE_H
17 #define FRAMEWORKS_ANIMATION_SERVER_EXPORT_IANIMATION_SERVICE_H
18 
19 #include <iremote_broker.h>
20 #include <graphic_common.h>
21 
22 namespace OHOS {
23 class IAnimationService : public IRemoteBroker {
24 public:
25     static GSError Init(bool reinit = false);
26     static sptr<IAnimationService> Get();
27 
28     virtual GSError StartRotationAnimation(int32_t did, int32_t degree) = 0;
29     virtual GSError SplitModeCreateBackground() = 0;
30     virtual GSError SplitModeCreateMiddleLine() = 0;
31     virtual GSError CreateLaunchPage(const std::string &filename) = 0;
32     virtual GSError CancelLaunchPage() = 0;
33 
34     DECLARE_INTERFACE_DESCRIPTOR(u"IAnimationService");
35 
36 protected:
37     enum {
38         START_ROTATION_ANIMATION = 0,
39         SPLIT_MODE_CREATE_BACKGOUND = 1,
40         SPLIT_MODE_CREATE_MIDDLE_LINE = 2,
41         CREATE_LAUNCH_PAGE = 3,
42         DESTROY_LAUNCH_PAGE = 4,
43     };
44 
45 private:
46     static inline sptr<IAnimationService> animationService = nullptr;
47 };
48 } // namespace OHOS
49 
50 #endif // FRAMEWORKS_ANIMATION_SERVER_EXPORT_IANIMATION_SERVICE_H
51