• 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 AUDIO_ABILITY_H_
17 #define AUDIO_ABILITY_H_
18 
19 #include <map>
20 #include <string>
21 #include "system_ability.h"
22 #include "test_audio_ability_stub.h"
23 
24 namespace OHOS {
25 class TestAudioAbility : public SystemAbility, public TestAudioAbilityStub {
26     DECLARE_SYSTEM_ABILITY(TestAudioAbility);
27 
28 public:
29     TestAudioAbility(int32_t saId, bool runOnCreate);
30     ~TestAudioAbility();
31 
32     int AddVolume(int volume) override;
33     int32_t ReduceVolume(int volume) override;
34     int32_t TestRpcInt32(int32_t value) override;
35     uint32_t TestRpcUInt32(uint32_t value) override;
36     int64_t TestRpcInt64(int64_t value) override;
37     uint64_t TestRpcUInt64(uint64_t value) override;
38     float TestRpcFloat(float value) override;
39     double TestRpcDouble(double value) override;
40     const std::u16string TestRpcString16(const std::u16string& name) override;
41     sptr<IRemoteObject> GetBaseSystemAbility(int32_t systemAbilityId);
42 
43 protected:
44     void OnStart() override;
45     void OnStop() override;
46 };
47 }
48 
49 #endif // !defined(AUDIO_ABILITY_H_)
50