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 AMS_ABILITY_VISIBALE_TEST_DATA 17 #define AMS_ABILITY_VISIBALE_TEST_DATA 18 #include "stpageabilityevent.h" 19 #include <string> 20 #include <thread> 21 #include <map> 22 #include "ability_connect_callback_stub.h" 23 #include "ability_connect_callback_proxy.h" 24 #include "abs_shared_result_set.h" 25 #include "ability_loader.h" 26 #include "data_ability_predicates.h" 27 #include "values_bucket.h" 28 #include "common_event.h" 29 #include "common_event_manager.h" 30 31 namespace OHOS { 32 namespace AppExecFwk { 33 34 class AmsAbilityVisibleTestData : public Ability { 35 public: 36 ~AmsAbilityVisibleTestData(); 37 38 protected: 39 virtual void OnStart(const Want &want) override; 40 virtual int Insert(const Uri &uri, const NativeRdb::ValuesBucket &value) override; 41 virtual int Delete(const Uri &uri, const NativeRdb::DataAbilityPredicates &predicates) override; 42 virtual int Update(const Uri &uri, const NativeRdb::ValuesBucket &value, 43 const NativeRdb::DataAbilityPredicates &predicates) override; 44 virtual std::shared_ptr<NativeRdb::AbsSharedResultSet> Query(const Uri &uri, 45 const std::vector<std::string> &columns, const NativeRdb::DataAbilityPredicates &predicates) override; 46 virtual std::vector<std::string> GetFileTypes(const Uri &uri, const std::string &mimeTypeFilter) override; 47 virtual int OpenFile(const Uri &uri, const std::string &mode) override; 48 49 private: 50 STPageAbilityEvent pageAbilityEvent; 51 }; 52 } // namespace AppExecFwk 53 } // namespace OHOS 54 #endif // AMS_ABILITY_VISIBALE_TEST_DATA