/* * Copyright (C) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef GNSS_ABILITY_PROXY_H #define GNSS_ABILITY_PROXY_H #ifdef FEATURE_GNSS_SUPPORT #include #include "iremote_object.h" #include "iremote_proxy.h" #include "constant_definition.h" #include "gnss_ability_skeleton.h" namespace OHOS { namespace Location { class GnssAbilityProxy : public IRemoteProxy { public: explicit GnssAbilityProxy(const sptr &impl); ~GnssAbilityProxy() = default; LocationErrCode SendLocationRequest(WorkRecord &workrecord) override; LocationErrCode SetEnable(bool state) override; LocationErrCode RefrashRequirements() override; LocationErrCode RegisterGnssStatusCallback(const sptr& callback, pid_t uid) override; LocationErrCode UnregisterGnssStatusCallback(const sptr& callback) override; LocationErrCode RegisterNmeaMessageCallback(const sptr& callback, pid_t uid) override; LocationErrCode UnregisterNmeaMessageCallback(const sptr& callback) override; LocationErrCode RegisterCachedCallback(const std::unique_ptr& request, const sptr& callback) override; LocationErrCode UnregisterCachedCallback(const sptr& callback) override; LocationErrCode GetCachedGnssLocationsSize(int &size) override; LocationErrCode FlushCachedGnssLocations() override; LocationErrCode SendCommand(std::unique_ptr& commands) override; LocationErrCode AddFence(std::unique_ptr& request) override; LocationErrCode RemoveFence(std::unique_ptr& request) override; LocationErrCode EnableMock() override; LocationErrCode DisableMock() override; LocationErrCode SetMocked(const int timeInterval, const std::vector> &location) override; private: static inline BrokerDelegator delegator_; }; } // namespace Location } // namespace OHOS #endif // FEATURE_GNSS_SUPPORT #endif // GNSS_ABILITY_PROXY_H