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 INTENTION_STATIONARY_CLIENT_H
17#define INTENTION_STATIONARY_CLIENT_H
18
19#include <map>
20
21#include "nocopyable.h"
22
23#include "i_tunnel_client.h"
24#include "stationary_callback.h"
25
26namespace OHOS {
27namespace Msdp {
28namespace DeviceStatus {
29class StationaryClient final {
30public:
31    StationaryClient() = default;
32    ~StationaryClient() = default;
33    DISALLOW_COPY_AND_MOVE(StationaryClient);
34
35    int32_t SubscribeCallback(ITunnelClient &tunnel, Type type, ActivityEvent event,
36        ReportLatencyNs latency, sptr<IRemoteDevStaCallback> callback);
37    int32_t UnsubscribeCallback(ITunnelClient &tunnel, Type type, ActivityEvent event,
38        sptr<IRemoteDevStaCallback> callback);
39    Data GetDeviceStatusData(ITunnelClient &tunnel, Type type);
40
41private:
42    std::mutex mtx_;
43    std::map<Type, int32_t> typeMap_;
44};
45} // namespace DeviceStatus
46} // namespace Msdp
47} // namespace OHOS
48#endif // INTENTION_STATIONARY_CLIENT_H
49