diff --git a/adapter/cloud_adapter_example/include/dk_container.h b/adapter/cloud_adapter_example/include/dk_container.h index db03af05f7dd209e2037faf4e1bb34552e71a65e..2f4d0d86ba06c892cb76e930cda1e280e3e30e20 100644 --- a/adapter/cloud_adapter_example/include/dk_container.h +++ b/adapter/cloud_adapter_example/include/dk_container.h @@ -16,13 +16,14 @@ #ifndef DRIVE_KIT_CONTAINER_H #define DRIVE_KIT_CONTAINER_H +#include +#include + #include "dk_cloud_callback.h" #include "dk_context.h" #include "dk_database.h" #include "dk_error.h" #include "dk_result.h" -#include -#include namespace DriveKit { using DKSubscriptionId = std::string; diff --git a/adapter/cloud_adapter_example/include/dk_database.h b/adapter/cloud_adapter_example/include/dk_database.h index 79ab1b418d9c455e161f4ad907118c4bba0f0405..91e9e4a08f72bbefb83913e4a94bedfc7731ef8d 100644 --- a/adapter/cloud_adapter_example/include/dk_database.h +++ b/adapter/cloud_adapter_example/include/dk_database.h @@ -221,9 +221,9 @@ public: NewAssetReadSession(DKRecordType recordType, DKRecordId recordId, DKFieldKey assetKey, DKAssetPath assetPath); protected: - void Init(); + void Init(); private: DKContainerName containerName_; }; } // namespace DriveKit -#endif +#endif \ No newline at end of file diff --git a/adapter/cloud_adapter_example/include/dk_record_field.h b/adapter/cloud_adapter_example/include/dk_record_field.h index 13aa883a37677934ac542ff0f0f62bccef802683..bb245f81d4f054de501271df33a8f058a404e53d 100644 --- a/adapter/cloud_adapter_example/include/dk_record_field.h +++ b/adapter/cloud_adapter_example/include/dk_record_field.h @@ -15,14 +15,15 @@ #ifndef DRIVE_KIT_RECORD_FIELD_H #define DRIVE_KIT_RECORD_FIELD_H -#include "dk_asset.h" -#include "dk_error.h" -#include "dk_reference.h" #include #include #include #include +#include "dk_asset.h" +#include "dk_error.h" +#include "dk_reference.h" + namespace DriveKit { enum class DKRecordFieldType { FIELD_TYPE_NULL = 0, diff --git a/adapter/cloud_adapter_example/include/drive_kit.h b/adapter/cloud_adapter_example/include/drive_kit.h index ba3538623ae20a7bdcc3ab7d978312c52ced5bf4..65b87522aa48d4d64d5e62045654aa78a36770a1 100644 --- a/adapter/cloud_adapter_example/include/drive_kit.h +++ b/adapter/cloud_adapter_example/include/drive_kit.h @@ -15,16 +15,17 @@ #ifndef DRIVE_KIT_H #define DRIVE_KIT_H -#include "dk_cloud_callback.h" -#include "dk_container.h" -#include "dk_error.h" -#include "dk_record.h" #include #include #include #include #include +#include "dk_cloud_callback.h" +#include "dk_container.h" +#include "dk_error.h" +#include "dk_record.h" + namespace DriveKit { using DKAppId = std::string; using DKDatabaseName = std::string; diff --git a/adapter/cloud_adapter_example/src/dk_container.cpp b/adapter/cloud_adapter_example/src/dk_container.cpp index 7327c277c7dcb07bae54c75a763a92f5f8d55319..b6f2e32e8f5ae35339085cda6d1b64947ead1a13 100644 --- a/adapter/cloud_adapter_example/src/dk_container.cpp +++ b/adapter/cloud_adapter_example/src/dk_container.cpp @@ -13,11 +13,11 @@ * limitations under the License. */ +#include "dk_container.h" + #include #include -#include "dk_container.h" - namespace DriveKit { std::shared_ptr DKContainer::GetPrivateDatabase() diff --git a/adapter/cloud_adapter_example/src/dk_database.cpp b/adapter/cloud_adapter_example/src/dk_database.cpp index 4c3c96be48197b0dfef519344ea366d1020d3f13..c1e77dca1f4ff6b4116f28c30d875c4ec30213ab 100644 --- a/adapter/cloud_adapter_example/src/dk_database.cpp +++ b/adapter/cloud_adapter_example/src/dk_database.cpp @@ -12,13 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include "dk_database.h" #include #include #include #include "dk_context.h" -#include "dk_database.h" namespace DriveKit { DKLocalErrorCode DKDatabase::SaveRecords(std::shared_ptr context, diff --git a/adapter/cloud_adapter_example/src/drive_kit.cpp b/adapter/cloud_adapter_example/src/drive_kit.cpp index c4a4bd37d901143aa02c40f74c9c761b90746a17..ad0bd65e9354d26538c8f39b3d06f65038e33391 100644 --- a/adapter/cloud_adapter_example/src/drive_kit.cpp +++ b/adapter/cloud_adapter_example/src/drive_kit.cpp @@ -77,7 +77,7 @@ DKError DriveKitNative::GetCloudUserInfo(DKUserInfo &userInfo) } DKError DriveKitNative::GetCloudAppInfo(const std::vector &bundleNames, - std::map &appInfos) + std::map &appInfos) { DKAppInfo appInfo; appInfo.defaultContainer.containerName = "defaultContainer"; @@ -88,7 +88,7 @@ DKError DriveKitNative::GetCloudAppInfo(const std::vector &bund } DKError DriveKitNative::GetCloudAppSwitches(const std::vector &bundleNames, - std::map &appSwitchs) + std::map &appSwitchs) { return DKError(); } diff --git a/frameworks/native/cloudsync_kit_inner/include/cloud_sync_manager_impl.h b/frameworks/native/cloudsync_kit_inner/include/cloud_sync_manager_impl.h index 71e701751eca416986f40e102ab77c90c10a20ed..efc267275bc6e7fdc96d7e614548c0dddbe2cadc 100644 --- a/frameworks/native/cloudsync_kit_inner/include/cloud_sync_manager_impl.h +++ b/frameworks/native/cloudsync_kit_inner/include/cloud_sync_manager_impl.h @@ -18,9 +18,9 @@ #include +#include "cloud_sync_callback_client.h" #include "cloud_sync_manager.h" #include "svc_death_recipient.h" -#include "cloud_sync_callback_client.h" namespace OHOS::FileManagement::CloudSync { class CloudSyncManagerImpl final : public CloudSyncManager { diff --git a/frameworks/native/cloudsync_kit_inner/include/cloud_sync_service_proxy.h b/frameworks/native/cloudsync_kit_inner/include/cloud_sync_service_proxy.h index 4efc464789360f3b0a129e1b1724d55e853ad8e9..90a19c95d7933d738cfab6ced460f3c8b62cf5bf 100644 --- a/frameworks/native/cloudsync_kit_inner/include/cloud_sync_service_proxy.h +++ b/frameworks/native/cloudsync_kit_inner/include/cloud_sync_service_proxy.h @@ -16,10 +16,11 @@ #ifndef OHOS_FILEMGMT_CLOUD_SYNC_SERVICE_PROXY_H #define OHOS_FILEMGMT_CLOUD_SYNC_SERVICE_PROXY_H -#include "i_cloud_sync_service.h" #include "iremote_proxy.h" #include "system_ability_load_callback_stub.h" +#include "i_cloud_sync_service.h" + namespace OHOS::FileManagement::CloudSync { class CloudSyncServiceProxy : public IRemoteProxy { public: diff --git a/interfaces/inner_api/native/cloudsync_kit_inner/i_cloud_sync_callback.h b/interfaces/inner_api/native/cloudsync_kit_inner/i_cloud_sync_callback.h index b6d987366f99f55428035b5b9f921cf945068926..27078e30ca33103414c29a555504be429b94c362 100644 --- a/interfaces/inner_api/native/cloudsync_kit_inner/i_cloud_sync_callback.h +++ b/interfaces/inner_api/native/cloudsync_kit_inner/i_cloud_sync_callback.h @@ -16,9 +16,10 @@ #ifndef OHOS_FILEMGMT_I_CLOUD_SYNC_CALLBACK_H #define OHOS_FILEMGMT_I_CLOUD_SYNC_CALLBACK_H -#include "cloud_sync_callback.h" #include "iremote_broker.h" +#include "cloud_sync_callback.h" + namespace OHOS::FileManagement::CloudSync { class ICloudSyncCallback : public CloudSyncCallback, public IRemoteBroker { public: diff --git a/services/cloudfiledaemon/include/ipc/cloud_daemon.h b/services/cloudfiledaemon/include/ipc/cloud_daemon.h index c470cbc09c9637cec600ef1318f965cd5cd4e8f9..e07dabd86856738c03c23da88b832a2ede04db1d 100644 --- a/services/cloudfiledaemon/include/ipc/cloud_daemon.h +++ b/services/cloudfiledaemon/include/ipc/cloud_daemon.h @@ -20,13 +20,14 @@ #include #include -#include "cloud_daemon_stub.h" -#include "i_cloud_daemon.h" #include "iremote_stub.h" #include "nocopyable.h" #include "refbase.h" #include "system_ability.h" +#include "cloud_daemon_stub.h" +#include "i_cloud_daemon.h" + namespace OHOS { namespace FileManagement { namespace CloudFile { diff --git a/services/cloudfiledaemon/src/fuse_manager/fuse_manager.cpp b/services/cloudfiledaemon/src/fuse_manager/fuse_manager.cpp index 3ade1be178c3050188ee4916f4e3df1d6f897f4d..e968dea9b54eb6e6d8d83805f53936e5b82edb27 100644 --- a/services/cloudfiledaemon/src/fuse_manager/fuse_manager.cpp +++ b/services/cloudfiledaemon/src/fuse_manager/fuse_manager.cpp @@ -17,27 +17,26 @@ #include "fuse_manager/fuse_manager.h" -#include -#include -#include /* for fuse_cmdline_opts */ - -#include -#include +#include #include +#include #include -#include -#include -#include - -#include -#include #include #include #include -#include +#include +#include +#include #include #include -#include +#include +#include +#include +#include + +#include +#include +#include /* for fuse_cmdline_opts */ #include "utils_log.h" namespace OHOS { diff --git a/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp b/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp index a8edaa1e0491f4f6352f8202a312089bf822e78c..f48f07224e5cdfc0a5642761730e7f1df480dd3f 100644 --- a/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp +++ b/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp @@ -21,8 +21,9 @@ #include "iremote_object.h" #include "system_ability_definition.h" -#include "fuse_manager/fuse_manager.h" + #include "dfs_error.h" +#include "fuse_manager/fuse_manager.h" #include "utils_log.h" namespace OHOS { @@ -80,7 +81,7 @@ int32_t CloudDaemon::StartFuse(int32_t devFd, const string &path) std::thread([fusePtr{fuseMgr}, dev{devFd}, mnt{path}]() { int32_t ret = fusePtr->StartFuse(dev, mnt); LOGI("start fuse result %d", ret); - }).detach(); + }).detach(); return E_OK; } } // namespace CloudFile diff --git a/services/cloudsyncservice/include/data_sync/data_syncer.h b/services/cloudsyncservice/include/data_sync/data_syncer.h index 2190e406795eb0c2be074328c6e007c19e3cd99a..10f95c7cc71bc6c99f1aaceb3e84ee35ae6608db 100644 --- a/services/cloudsyncservice/include/data_sync/data_syncer.h +++ b/services/cloudsyncservice/include/data_sync/data_syncer.h @@ -16,17 +16,17 @@ #ifndef OHOS_CLOUD_SYNC_SERVICE_DATA_SYNCER_H #define OHOS_CLOUD_SYNC_SERVICE_DATA_SYNCER_H -#include -#include #include #include +#include +#include -#include "sdk_helper.h" -#include "data_handler.h" -#include "task.h" +#include "cloud_pref_impl.h" #include "cloud_sync_constants.h" +#include "data_handler.h" #include "data_sync/sync_state_manager.h" -#include "cloud_pref_impl.h" +#include "sdk_helper.h" +#include "task.h" namespace OHOS { namespace FileManagement { diff --git a/services/cloudsyncservice/include/data_sync/gallery_data_sync/album_data_handler.h b/services/cloudsyncservice/include/data_sync/gallery_data_sync/album_data_handler.h index 15a08f48b50572a82cf69f2bfe8e8a8c48ade75c..4a2ae37fad353e23b05e9e200710578ec0e04d5e 100644 --- a/services/cloudsyncservice/include/data_sync/gallery_data_sync/album_data_handler.h +++ b/services/cloudsyncservice/include/data_sync/gallery_data_sync/album_data_handler.h @@ -16,8 +16,8 @@ #ifndef OHOS_CLOUD_SYNC_SERVICE_ALBUM_DATA_HANDLER_H #define OHOS_CLOUD_SYNC_SERVICE_ALBUM_DATA_HANDLER_H -#include "rdb_data_handler.h" #include "data_convertor.h" +#include "rdb_data_handler.h" namespace OHOS { namespace FileManagement { diff --git a/services/cloudsyncservice/include/data_sync/gallery_data_sync/file_data_handler.h b/services/cloudsyncservice/include/data_sync/gallery_data_sync/file_data_handler.h index fc75327feff69ec49ad3f0b252ad5042ffd07584..a2c16439eb7c9500a9001b0477303250607c5db0 100644 --- a/services/cloudsyncservice/include/data_sync/gallery_data_sync/file_data_handler.h +++ b/services/cloudsyncservice/include/data_sync/gallery_data_sync/file_data_handler.h @@ -16,8 +16,8 @@ #ifndef OHOS_CLOUD_SYNC_SERVICE_FILE_DATA_HANDLER_H #define OHOS_CLOUD_SYNC_SERVICE_FILE_DATA_HANDLER_H -#include "rdb_data_handler.h" #include "data_convertor.h" +#include "rdb_data_handler.h" namespace OHOS { namespace FileManagement { diff --git a/services/cloudsyncservice/include/data_sync/gallery_data_sync/gallery_data_syncer.h b/services/cloudsyncservice/include/data_sync/gallery_data_sync/gallery_data_syncer.h index 9d0ed715c5f145f6db2ffd2811ee91f1233c35ad..d87fed75207f4733102755ea96ec75d36e712f92 100644 --- a/services/cloudsyncservice/include/data_sync/gallery_data_sync/gallery_data_syncer.h +++ b/services/cloudsyncservice/include/data_sync/gallery_data_sync/gallery_data_syncer.h @@ -16,10 +16,9 @@ #ifndef GALLERY_DATA_SYNCER_H #define GALLERY_DATA_SYNCER_H -#include "data_syncer.h" - #include "functional" +#include "data_syncer.h" #include "file_data_handler.h" namespace OHOS { diff --git a/services/cloudsyncservice/include/data_sync/rdb_data_handler.h b/services/cloudsyncservice/include/data_sync/rdb_data_handler.h index 721e9b39a30babc5a39b577fd71b8924a421345f..28bfed34896464fdbdd2e093e0332ac4c69afe57 100644 --- a/services/cloudsyncservice/include/data_sync/rdb_data_handler.h +++ b/services/cloudsyncservice/include/data_sync/rdb_data_handler.h @@ -18,8 +18,8 @@ #include "abs_rdb_predicates.h" #include "rdb_helper.h" -#include "values_bucket.h" #include "result_set.h" +#include "values_bucket.h" #include "data_handler.h" @@ -41,8 +41,8 @@ protected: const std::vector &whereArgs = std::vector()); virtual int32_t Delete(int &deletedRows, const std::string &whereClause = "", const std::vector &whereArgs = std::vector()); - virtual std::unique_ptr Query( - const NativeRdb::AbsRdbPredicates &predicates, const std::vector &columns); + virtual std::unique_ptr Query(const NativeRdb::AbsRdbPredicates &predicates, + const std::vector &columns); private: std::shared_ptr rdb_; diff --git a/services/cloudsyncservice/include/data_sync/sdk_helper.h b/services/cloudsyncservice/include/data_sync/sdk_helper.h index 70ed15c1f65d42e1acd0a207da8e50233917918b..8513add6dd15c2a028e487c7c3d25a822935ac36 100644 --- a/services/cloudsyncservice/include/data_sync/sdk_helper.h +++ b/services/cloudsyncservice/include/data_sync/sdk_helper.h @@ -16,11 +16,11 @@ #ifndef OHOS_CLOUD_SYNC_SERVICE_SDK_HELPER_H #define OHOS_CLOUD_SYNC_SERVICE_SDK_HELPER_H -#include #include +#include -#include "drive_kit.h" #include "dk_database.h" +#include "drive_kit.h" namespace OHOS { namespace FileManagement { diff --git a/services/cloudsyncservice/include/data_sync/task.h b/services/cloudsyncservice/include/data_sync/task.h index 1c3eedf7293c0a67b2279a10cbfdd4c68d622c8b..7ca66c5cf3f66f3490bee4974c6aa64b3e86e003 100644 --- a/services/cloudsyncservice/include/data_sync/task.h +++ b/services/cloudsyncservice/include/data_sync/task.h @@ -16,24 +16,23 @@ #ifndef OHOS_CLOUD_SYNC_SERVICE_TASK_H #define OHOS_CLOUD_SYNC_SERVICE_TASK_H -#include +#include #include #include #include -#include +#include #include "thread_pool.h" -#include "sdk_helper.h" #include "data_handler.h" +#include "sdk_helper.h" namespace OHOS { namespace FileManagement { namespace CloudSync { class TaskContext : public DriveKit::DKContext { public: - TaskContext(std::shared_ptr handler) : handler_(handler) - {} + TaskContext(std::shared_ptr handler) : handler_(handler) {} std::shared_ptr GetHandler() { diff --git a/services/cloudsyncservice/include/ipc/cloud_sync_callback_manager.h b/services/cloudsyncservice/include/ipc/cloud_sync_callback_manager.h index d9f9e59098fb4e492dfeb35368f065882ffe4b7c..db103085e42aeba410efecd4d0a44df98d05335b 100644 --- a/services/cloudsyncservice/include/ipc/cloud_sync_callback_manager.h +++ b/services/cloudsyncservice/include/ipc/cloud_sync_callback_manager.h @@ -16,8 +16,9 @@ #ifndef OHOS_FILEMGMT_CLOUD_SYNC_CALLBACK_MANAGER_H #define OHOS_FILEMGMT_CLOUD_SYNC_CALLBACK_MANAGER_H -#include "i_cloud_sync_callback.h" #include "safe_map.h" + +#include "i_cloud_sync_callback.h" #include "svc_death_recipient.h" namespace OHOS::FileManagement::CloudSync { diff --git a/services/cloudsyncservice/include/ipc/cloud_sync_callback_proxy.h b/services/cloudsyncservice/include/ipc/cloud_sync_callback_proxy.h index a60e251c53d9f12fb566d35bf2f58a99377d8e23..716f0a3e10df08858e9488f5ffe02db28889d39e 100644 --- a/services/cloudsyncservice/include/ipc/cloud_sync_callback_proxy.h +++ b/services/cloudsyncservice/include/ipc/cloud_sync_callback_proxy.h @@ -16,10 +16,10 @@ #ifndef OHOS_FILEMGMT_CLOUD_SYNC_CALLBACK_PROXY_H #define OHOS_FILEMGMT_CLOUD_SYNC_CALLBACK_PROXY_H -#include "i_cloud_sync_callback.h" - #include "iremote_proxy.h" +#include "i_cloud_sync_callback.h" + namespace OHOS::FileManagement::CloudSync { class CloudSyncCallbackProxy : public IRemoteProxy { public: diff --git a/services/cloudsyncservice/include/ipc/cloud_sync_service.h b/services/cloudsyncservice/include/ipc/cloud_sync_service.h index 4b5140a292db8b82c8fd25b2e5d3f62ddfb90f46..2bfdd3c673728939cce36b33d78f668b5b91047b 100644 --- a/services/cloudsyncservice/include/ipc/cloud_sync_service.h +++ b/services/cloudsyncservice/include/ipc/cloud_sync_service.h @@ -17,10 +17,12 @@ #define OHOS_FILEMGMT_CLOUD_SYNC_SERVICE_H #include -#include "cloud_sync_service_stub.h" -#include "i_cloud_sync_callback.h" + #include "nocopyable.h" #include "system_ability.h" + +#include "cloud_sync_service_stub.h" +#include "i_cloud_sync_callback.h" #include "sync_rule/battery_status_listener.h" namespace OHOS::FileManagement::CloudSync { diff --git a/services/cloudsyncservice/include/ipc/cloud_sync_service_stub.h b/services/cloudsyncservice/include/ipc/cloud_sync_service_stub.h index 426552421c0f29c01cd5f1b9673183a382bb1ab4..7090bdcde23afd6fe9ae51416616e62230ca8536 100644 --- a/services/cloudsyncservice/include/ipc/cloud_sync_service_stub.h +++ b/services/cloudsyncservice/include/ipc/cloud_sync_service_stub.h @@ -17,9 +17,8 @@ #define OHOS_FILEMGMT_CLOUD_SYNC_SERVICE_STUB_H #include - -#include "i_cloud_sync_service.h" #include "iremote_stub.h" +#include "i_cloud_sync_service.h" namespace OHOS::FileManagement::CloudSync { class CloudSyncServiceStub : public IRemoteStub { diff --git a/services/cloudsyncservice/src/data_sync/data_syncer.cpp b/services/cloudsyncservice/src/data_sync/data_syncer.cpp index 832ec70b8e3800378e6291366ad8a3d76126125b..48fd512443fe8ed7802e6d3bf723ded73079bbb2 100644 --- a/services/cloudsyncservice/src/data_sync/data_syncer.cpp +++ b/services/cloudsyncservice/src/data_sync/data_syncer.cpp @@ -18,10 +18,10 @@ #include #include "dfs_error.h" -#include "utils_log.h" -#include "sdk_helper.h" #include "ipc/cloud_sync_callback_manager.h" +#include "sdk_helper.h" #include "sync_rule/battery_status.h" +#include "utils_log.h" namespace OHOS { namespace FileManagement { diff --git a/services/cloudsyncservice/src/data_sync/sdk_helper.cpp b/services/cloudsyncservice/src/data_sync/sdk_helper.cpp index 397e87dde13817817cc6877bac1fe60f7dcfad76..32922b9419297ec71781a5870c604763e002473b 100644 --- a/services/cloudsyncservice/src/data_sync/sdk_helper.cpp +++ b/services/cloudsyncservice/src/data_sync/sdk_helper.cpp @@ -98,7 +98,8 @@ int32_t SdkHelper::CreateRecords(shared_ptr context, std::shared_ptr>, const DriveKit::DKError &)> callback) { - auto err = database_->SaveRecords(context, std::move(records), DriveKit::DKSavePolicy::DK_SAVE_IF_UNCHANGED, callback); + auto err = database_->SaveRecords(context, std::move(records), + DriveKit::DKSavePolicy::DK_SAVE_IF_UNCHANGED, callback); if (err != DriveKit::DKLocalErrorCode::NO_ERROR) { LOGE("drivekit save records err %{public}d", err); return E_CLOUD_SDK; diff --git a/services/cloudsyncservice/src/data_sync/sync_state_manager.cpp b/services/cloudsyncservice/src/data_sync/sync_state_manager.cpp index 3354348691b08c1f835d0e6f7eda3cde4d85ccb3..af1548b176ac23d14539c824f0046a2fd18468db 100644 --- a/services/cloudsyncservice/src/data_sync/sync_state_manager.cpp +++ b/services/cloudsyncservice/src/data_sync/sync_state_manager.cpp @@ -14,9 +14,11 @@ */ #include "data_sync/sync_state_manager.h" -#include "utils_log.h" + #include +#include "utils_log.h" + namespace OHOS::FileManagement::CloudSync { using namespace std; diff --git a/services/cloudsyncservice/src/data_sync/task.cpp b/services/cloudsyncservice/src/data_sync/task.cpp index f544239e8535b0051ce5c931855b88697098547d..5ed9963217bc92719949a41667c5ea3a66d1909e 100644 --- a/services/cloudsyncservice/src/data_sync/task.cpp +++ b/services/cloudsyncservice/src/data_sync/task.cpp @@ -15,12 +15,12 @@ #include "task.h" -#include #include +#include #include "dfs_error.h" -#include "utils_log.h" #include "sdk_helper.h" +#include "utils_log.h" namespace OHOS { namespace FileManagement { diff --git a/services/cloudsyncservice/src/ipc/cloud_sync_service.cpp b/services/cloudsyncservice/src/ipc/cloud_sync_service.cpp index 83a79026aa7f403395dc9d23fe5af1ab5162e72b..ec3e5dbb8621d58d6983582bf944e490b5949689 100644 --- a/services/cloudsyncservice/src/ipc/cloud_sync_service.cpp +++ b/services/cloudsyncservice/src/ipc/cloud_sync_service.cpp @@ -16,13 +16,14 @@ #include +#include "system_ability_definition.h" + #include "dfs_error.h" #include "dfsu_access_token_helper.h" #include "ipc/cloud_sync_callback_manager.h" #include "sync_rule/battery_status.h" #include "sync_rule/net_conn_callback_observer.h" #include "sync_rule/network_status.h" -#include "system_ability_definition.h" #include "utils_log.h" namespace OHOS::FileManagement::CloudSync { diff --git a/services/cloudsyncservice/src/sync_rule/battery_status.cpp b/services/cloudsyncservice/src/sync_rule/battery_status.cpp index 667f3275d5399e4e3aca9cada732e732c360b432..116ecb3b6f767c27185c86ba85eab52a88f19a54 100644 --- a/services/cloudsyncservice/src/sync_rule/battery_status.cpp +++ b/services/cloudsyncservice/src/sync_rule/battery_status.cpp @@ -20,7 +20,6 @@ constexpr int32_t PAUSE_CAPACITY_LIMIT = 15; constexpr int32_t STOP_CAPACITY_LIMIT = 10; constexpr int32_t DEFAULT_BATTERY_CAPCITY = 100; - void BatteryStatus::SetChargingStatus(bool status) { isCharging_ = status; diff --git a/services/cloudsyncservice/src/sync_rule/network_status.cpp b/services/cloudsyncservice/src/sync_rule/network_status.cpp index 803241afa8f111d03a6bcb9fe759913dfd68b504..d93f5badacfe73371da960c8320e2aa65f7e3f4f 100644 --- a/services/cloudsyncservice/src/sync_rule/network_status.cpp +++ b/services/cloudsyncservice/src/sync_rule/network_status.cpp @@ -14,11 +14,14 @@ */ #include "sync_rule/network_status.h" + #include #include -#include "dfs_error.h" + #include "net_conn_client.h" #include "parameter.h" + +#include "dfs_error.h" #include "sync_rule/net_conn_callback_observer.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/include/device/device_manager_agent.h b/services/distributedfiledaemon/include/device/device_manager_agent.h index 50a82e8d7eaa5c2852a3fa8ae03d36d2c384a8d3..358951b155eede2b82ffa4640156a9b5fa8b5b5b 100644 --- a/services/distributedfiledaemon/include/device/device_manager_agent.h +++ b/services/distributedfiledaemon/include/device/device_manager_agent.h @@ -22,14 +22,15 @@ #include #include "device_auth.h" -#include "device_info.h" #include "device_manager.h" +#include "nlohmann/json.hpp" + +#include "device_info.h" #include "dfsu_actor.h" #include "dfsu_singleton.h" #include "dfsu_startable.h" #include "mountpoint/mount_point.h" #include "network/network_agent_template.h" -#include "nlohmann/json.hpp" namespace OHOS { namespace Storage { diff --git a/services/distributedfiledaemon/include/ipc/daemon.h b/services/distributedfiledaemon/include/ipc/daemon.h index c2983f7b4277d96a2491f892c14c194a3f113866..12334b0f384fa7f34db79a0cb786f14f1ccd5f89 100644 --- a/services/distributedfiledaemon/include/ipc/daemon.h +++ b/services/distributedfiledaemon/include/ipc/daemon.h @@ -20,14 +20,15 @@ #include #include -#include "daemon_stub.h" -#include "i_daemon.h" #include "iremote_stub.h" -#include "multiuser/os_account_observer.h" #include "nocopyable.h" #include "refbase.h" #include "system_ability.h" +#include "daemon_stub.h" +#include "i_daemon.h" +#include "multiuser/os_account_observer.h" + namespace OHOS { namespace Storage { namespace DistributedFile { diff --git a/services/distributedfiledaemon/include/ipc/daemon_stub.h b/services/distributedfiledaemon/include/ipc/daemon_stub.h index dbade18c1f3e41bb106cc83ebcb26edff2fa28c8..e376f407820ee7c14dada176e6a3ac523a2571c3 100644 --- a/services/distributedfiledaemon/include/ipc/daemon_stub.h +++ b/services/distributedfiledaemon/include/ipc/daemon_stub.h @@ -17,12 +17,13 @@ #include -#include "i_daemon.h" #include "iremote_stub.h" #include "message_option.h" #include "message_parcel.h" #include "refbase.h" +#include "i_daemon.h" + namespace OHOS { namespace Storage { namespace DistributedFile { diff --git a/services/distributedfiledaemon/include/mountpoint/mount_point.h b/services/distributedfiledaemon/include/mountpoint/mount_point.h index c2a274b88af6e0bbe9bf936a01f5f890ac40406e..bfd8e3cedc17732977f856c75a58ca51dbf17073 100644 --- a/services/distributedfiledaemon/include/mountpoint/mount_point.h +++ b/services/distributedfiledaemon/include/mountpoint/mount_point.h @@ -19,9 +19,10 @@ #include #include -#include "dfsu_mount_argument_descriptors.h" #include "nocopyable.h" +#include "dfsu_mount_argument_descriptors.h" + namespace OHOS { namespace Storage { namespace DistributedFile { diff --git a/services/distributedfiledaemon/include/network/devsl_dispatcher.h b/services/distributedfiledaemon/include/network/devsl_dispatcher.h index a789517382396258bdf6165b10a2be8dafdabcab..f2856dfb7be900f433310afafaa11e51648c4251 100644 --- a/services/distributedfiledaemon/include/network/devsl_dispatcher.h +++ b/services/distributedfiledaemon/include/network/devsl_dispatcher.h @@ -21,6 +21,7 @@ #include #include #include + #include "dev_slinfo_mgr.h" #include "device/device_manager_agent.h" diff --git a/services/distributedfiledaemon/include/network/softbus/softbus_agent.h b/services/distributedfiledaemon/include/network/softbus/softbus_agent.h index 03c7f14ffd45a43fb7ad20d5575bd3e2205f376c..fc4a600b95588dae460d379c1f71fe01c4602cca 100644 --- a/services/distributedfiledaemon/include/network/softbus/softbus_agent.h +++ b/services/distributedfiledaemon/include/network/softbus/softbus_agent.h @@ -17,6 +17,7 @@ #define SOFTBUS_AGENT_H #include + #include "network/network_agent_template.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/device/device_manager_agent.cpp b/services/distributedfiledaemon/src/device/device_manager_agent.cpp index 2947a60ae21f62240175dc242eca7424437a9402..d74dfe3f287de4f80fa0f0f537c68d83127faff9 100644 --- a/services/distributedfiledaemon/src/device/device_manager_agent.cpp +++ b/services/distributedfiledaemon/src/device/device_manager_agent.cpp @@ -20,13 +20,14 @@ #include #include "device_auth.h" +#include "parameters.h" +#include "softbus_bus_center.h" + #include "dfsu_exception.h" #include "ipc/i_daemon.h" #include "mountpoint/mount_manager.h" #include "network/devsl_dispatcher.h" #include "network/softbus/softbus_agent.h" -#include "parameters.h" -#include "softbus_bus_center.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/ipc/daemon.cpp b/services/distributedfiledaemon/src/ipc/daemon.cpp index 29b7db6d49e806694d5f5787845293acb67ecea1..7b0653a6e790a0e8941ebe5fdbbbab596a668450 100644 --- a/services/distributedfiledaemon/src/ipc/daemon.cpp +++ b/services/distributedfiledaemon/src/ipc/daemon.cpp @@ -21,8 +21,8 @@ #include "common_event_manager.h" #include "common_event_support.h" #include "iremote_object.h" -#include "mountpoint/mount_manager.h" #include "system_ability_definition.h" +#include "mountpoint/mount_manager.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/multiuser/os_account_observer.cpp b/services/distributedfiledaemon/src/multiuser/os_account_observer.cpp index 198d1cd833a9d65d8140693bd4907e251328f8f7..71063b17b84f17d3feb4c460205d31336e57573e 100644 --- a/services/distributedfiledaemon/src/multiuser/os_account_observer.cpp +++ b/services/distributedfiledaemon/src/multiuser/os_account_observer.cpp @@ -17,6 +17,7 @@ #include "common_event_manager.h" #include "common_event_support.h" + #include "device/device_manager_agent.h" #include "dfsu_mount_argument_descriptors.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/src/network/devsl_dispatcher.cpp b/services/distributedfiledaemon/src/network/devsl_dispatcher.cpp index 4e9f1cd26b4c2f1fe352da5af61a388dc17a5da3..0d38c12fdc498cf03cca9f39cb332940a4f2a23f 100644 --- a/services/distributedfiledaemon/src/network/devsl_dispatcher.cpp +++ b/services/distributedfiledaemon/src/network/devsl_dispatcher.cpp @@ -16,8 +16,9 @@ #include "network/devsl_dispatcher.h" #include "device_manager.h" -#include "ipc/i_daemon.h" #include "securec.h" + +#include "ipc/i_daemon.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/network/kernel_talker.cpp b/services/distributedfiledaemon/src/network/kernel_talker.cpp index 6228e23c8fb2280311aa40051d7302ad4eaa32a5..251dee09a782952f6eaa34da31b47638769eb1c2 100644 --- a/services/distributedfiledaemon/src/network/kernel_talker.cpp +++ b/services/distributedfiledaemon/src/network/kernel_talker.cpp @@ -14,9 +14,11 @@ */ #include "network/kernel_talker.h" + +#include "securec.h" + #include "device/device_manager_agent.h" #include "network/devsl_dispatcher.h" -#include "securec.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/network/softbus/softbus_agent.cpp b/services/distributedfiledaemon/src/network/softbus/softbus_agent.cpp index efd334bfb47d619ddcead5c88811a7bc0c596c29..b82a6093d1bc057a73e92010d764bbedd4905700 100644 --- a/services/distributedfiledaemon/src/network/softbus/softbus_agent.cpp +++ b/services/distributedfiledaemon/src/network/softbus/softbus_agent.cpp @@ -17,13 +17,14 @@ #include +#include "ipc_skeleton.h" +#include "session.h" + #include "dfsu_exception.h" #include "ipc/i_daemon.h" -#include "ipc_skeleton.h" #include "network/softbus/softbus_session.h" #include "network/softbus/softbus_session_dispatcher.h" #include "network/softbus/softbus_session_name.h" -#include "session.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/network/softbus/softbus_session.cpp b/services/distributedfiledaemon/src/network/softbus/softbus_session.cpp index 3b786bf287901504a9903e81107b430b1fdab0af..c2cd3adf2c691e7311f518da1ed42e7f444241da 100644 --- a/services/distributedfiledaemon/src/network/softbus/softbus_session.cpp +++ b/services/distributedfiledaemon/src/network/softbus/softbus_session.cpp @@ -17,6 +17,7 @@ #include "dfs_session.h" #include "session.h" + #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp b/services/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp index c83ce588b654a7b9d09c942089e99787010000f3..f463eeda706bab2f192a342e0a1a158b76b342ad 100644 --- a/services/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp +++ b/services/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp @@ -17,8 +17,9 @@ #include -#include "network/softbus/softbus_agent.h" #include "session.h" + +#include "network/softbus/softbus_agent.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/test/unittest/device/device_manager_agent_test.cpp b/services/distributedfiledaemon/test/unittest/device/device_manager_agent_test.cpp index ec17c0e9fdb02954b7b4927d5109236d7e852c38..61851b6bdd7472ca3b057413a49e20f68a6a5e84 100644 --- a/services/distributedfiledaemon/test/unittest/device/device_manager_agent_test.cpp +++ b/services/distributedfiledaemon/test/unittest/device/device_manager_agent_test.cpp @@ -18,6 +18,7 @@ #include #include "gtest/gtest.h" + #include "device/device_manager_agent.h" #include "mountpoint/mount_point.h" diff --git a/services/distributedfiledaemon/test/unittest/multiuser/os_account_observer_test.cpp b/services/distributedfiledaemon/test/unittest/multiuser/os_account_observer_test.cpp index 16612ea682ba4370847732e4f5dd236ce1f27975..f22141ad24a211b22e6db7e10feb2df82e592e41 100644 --- a/services/distributedfiledaemon/test/unittest/multiuser/os_account_observer_test.cpp +++ b/services/distributedfiledaemon/test/unittest/multiuser/os_account_observer_test.cpp @@ -16,9 +16,10 @@ #include #include -#include "gtest/gtest.h" #include "common_event_manager.h" #include "common_event_support.h" +#include "gtest/gtest.h" + #include "multiuser/os_account_observer.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/test/unittest/network/devsl_dispatcher_test.cpp b/services/distributedfiledaemon/test/unittest/network/devsl_dispatcher_test.cpp index 7327508ebb0bd0dad226b2647aedbea1cee67d84..4209dffb63895152682507d1f569b5a250814051 100644 --- a/services/distributedfiledaemon/test/unittest/network/devsl_dispatcher_test.cpp +++ b/services/distributedfiledaemon/test/unittest/network/devsl_dispatcher_test.cpp @@ -17,6 +17,7 @@ #include #include "gtest/gtest.h" + #include "network/devsl_dispatcher.h" #include "network/kernel_talker.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/test/unittest/network/kernel_talker_test.cpp b/services/distributedfiledaemon/test/unittest/network/kernel_talker_test.cpp index a8672b16a60bf9b9cf458adc347f74029ca9510b..d7622eb9d57bde24f7c9753abe2ea49477c3f54b 100644 --- a/services/distributedfiledaemon/test/unittest/network/kernel_talker_test.cpp +++ b/services/distributedfiledaemon/test/unittest/network/kernel_talker_test.cpp @@ -17,6 +17,7 @@ #include #include "gtest/gtest.h" + #include "network/kernel_talker.h" #include "network/softbus/softbus_session.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/test/unittest/network/session_pool_test.cpp b/services/distributedfiledaemon/test/unittest/network/session_pool_test.cpp index 5fea3436e4da7660741f29cf36a9e451a45e994b..ef016e265b402192533470c3bfa432106e43134c 100644 --- a/services/distributedfiledaemon/test/unittest/network/session_pool_test.cpp +++ b/services/distributedfiledaemon/test/unittest/network/session_pool_test.cpp @@ -17,9 +17,10 @@ #include #include "gtest/gtest.h" + +#include "network/kernel_talker.h" #include "network/session_pool.h" #include "network/softbus/softbus_session.h" -#include "network/kernel_talker.h" #include "utils_log.h" namespace OHOS { diff --git a/services/distributedfiledaemon/test/unittest/network/softbus_agent_test.cpp b/services/distributedfiledaemon/test/unittest/network/softbus_agent_test.cpp index bc5996b26daf37fd013d00bffcb28dccbfb922cc..15bd9379b46f71432ad7d39ebebe70d2cde490f5 100644 --- a/services/distributedfiledaemon/test/unittest/network/softbus_agent_test.cpp +++ b/services/distributedfiledaemon/test/unittest/network/softbus_agent_test.cpp @@ -17,6 +17,7 @@ #include #include "gtest/gtest.h" + #include "network/softbus/softbus_agent.h" #include "network/softbus/softbus_session.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/test/unittest/network/softbus_session_dispatcher_test.cpp b/services/distributedfiledaemon/test/unittest/network/softbus_session_dispatcher_test.cpp index f5af2a6286915a1c9eb9af03611d6600d49eef4b..29f0e2406a2b34f20852f0f20c4dae322151110e 100644 --- a/services/distributedfiledaemon/test/unittest/network/softbus_session_dispatcher_test.cpp +++ b/services/distributedfiledaemon/test/unittest/network/softbus_session_dispatcher_test.cpp @@ -17,6 +17,7 @@ #include #include "gtest/gtest.h" + #include "network/softbus/softbus_agent.h" #include "network/softbus/softbus_session_dispatcher.h" #include "utils_log.h" diff --git a/services/distributedfiledaemon/test/unittest/network/softbus_session_test.cpp b/services/distributedfiledaemon/test/unittest/network/softbus_session_test.cpp index 7cd2509bfc614932fde82a45a6fadbe9c651b418..706886f5f5f1ce9c9b1f9c6eca6d4e600e24fd74 100644 --- a/services/distributedfiledaemon/test/unittest/network/softbus_session_test.cpp +++ b/services/distributedfiledaemon/test/unittest/network/softbus_session_test.cpp @@ -17,6 +17,7 @@ #include #include "gtest/gtest.h" + #include "network/softbus/softbus_session.h" #include "utils_log.h" diff --git a/test/mock/ipc/cloud_sync_service_proxy_mock.cpp b/test/mock/ipc/cloud_sync_service_proxy_mock.cpp index b2279975a5d4571c5b0e4f1537484ba38de6da47..681ba231132b56b7a7280cd36cd580286e709fec 100644 --- a/test/mock/ipc/cloud_sync_service_proxy_mock.cpp +++ b/test/mock/ipc/cloud_sync_service_proxy_mock.cpp @@ -16,10 +16,11 @@ #include -#include "dfs_error.h" #include "iservice_registry.h" -#include "i_cloud_sync_service_mock.h" #include "system_ability_definition.h" + +#include "dfs_error.h" +#include "i_cloud_sync_service_mock.h" #include "utils_log.h" namespace OHOS::FileManagement::CloudSync { diff --git a/test/moduletest/src/distributedfiledaemon_service_test.cpp b/test/moduletest/src/distributedfiledaemon_service_test.cpp index 820ecc3d2fe5b93ba4b8c49d4a951a34315b2ca7..4e0521743e4eb468c009de31884d3b7e7954e886 100644 --- a/test/moduletest/src/distributedfiledaemon_service_test.cpp +++ b/test/moduletest/src/distributedfiledaemon_service_test.cpp @@ -12,9 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#include -#include #include #include #include @@ -22,13 +19,17 @@ #include #include +#include "securec.h" +#include +#include + #include "device/device_info.h" #include "device/device_manager_agent.h" #include "mountpoint/mount_point.h" #include "network/kernel_talker.h" #include "network/session_pool.h" #include "network/softbus/softbus_session.h" -#include "securec.h" + #include "utils_directory.h" #include "utils_log.h" @@ -88,7 +89,6 @@ void DistributedFileDaemonServiceTest::TearDown(void) // input testcase teardown step,teardown invoked after each testcases } - /** * @tc.name: mount_test_001 * @tc.desc: Verify the mount/umount function. diff --git a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_client_test.cpp b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_client_test.cpp index 5d70bef98331d0e432260f6133f601dad9af1c75..325fa81c8089c0fde48e97c110f5448928fa6b03 100644 --- a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_client_test.cpp +++ b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_client_test.cpp @@ -13,11 +13,11 @@ * limitations under the License. */ -#include #include +#include -#include "dfs_error.h" #include "cloud_sync_callback_client.h" +#include "dfs_error.h" #include "service_callback_mock.h" namespace OHOS { @@ -90,5 +90,5 @@ HWTEST_F(CloudSyncCallbackTest, OnSyncStateChangedTest, TestSize.Level1) } } // namespace Test -} // namespace FileManagement::CloudSync { +} // namespace FileManagement::CloudSync } // namespace OHOS diff --git a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_stub_test.cpp b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_stub_test.cpp index 053f413203aaf1002a6ccc5856bff50f1c33b7fb..3115d2cca7a00e14a4960f6466c0161674b88109 100644 --- a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_stub_test.cpp +++ b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_callback_stub_test.cpp @@ -13,13 +13,13 @@ * limitations under the License. */ -#include #include +#include #include "cloud_sync_callback_stub.h" -#include "service_callback_mock.h" -#include "i_cloud_sync_callback.h" #include "dfs_error.h" +#include "i_cloud_sync_callback.h" +#include "service_callback_mock.h" namespace OHOS { namespace FileManagement::CloudSync { @@ -93,5 +93,5 @@ HWTEST_F(CloudSyncCallbackStubTest, HandleOnSyncStateChangedTest, TestSize.Level } } // namespace Test -} // namespace FileManagement::CloudSync { +} // namespace FileManagement::CloudSync } // namespace OHOS diff --git a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_manager_impl_test.cpp b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_manager_impl_test.cpp index 281f937f08c1f068486bf47828e4ae30ea8a57e0..7427052cab897c4505b3ff3a40a305097c6bae40 100644 --- a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_manager_impl_test.cpp +++ b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_manager_impl_test.cpp @@ -13,14 +13,15 @@ * limitations under the License. */ -#include #include #include "iservice_registry.h" +#include + #include "cloud_sync_manager_impl.h" +#include "dfs_error.h" #include "i_cloud_sync_service_mock.h" #include "service_callback_mock.h" -#include "dfs_error.h" namespace OHOS { namespace FileManagement::CloudSync { @@ -39,7 +40,7 @@ public: void TearDown(); }; -class CloudSyncCallbackDerived : public CloudSyncCallback { +class CloudSyncCallbackDerived : public CloudSyncCallback { public: void OnSyncStateChanged(SyncType type, SyncPromptState state) { @@ -95,14 +96,14 @@ HWTEST_F(CloudSyncManagerTest, StartSyncTest, TestSize.Level1) forceFlag = false; res = g_managePtr_->StartSync(forceFlag, nullptr); EXPECT_NE(res, E_OK); - } catch(...) { + } catch (...) { EXPECT_TRUE(false); GTEST_LOG_(INFO) << " AddCallbackTest FAILED"; } GTEST_LOG_(INFO) << "AddCallbackTest End"; } - - /* + +/* * @tc.name: StopSyncTest * @tc.desc: Verify the StopSync function. * @tc.type: FUNC @@ -114,7 +115,7 @@ HWTEST_F(CloudSyncManagerTest, StopSyncTest, TestSize.Level1) try { int res = g_managePtr_->StopSync(); EXPECT_EQ(res, E_OK); - } catch(...) { + } catch (...) { EXPECT_TRUE(false); GTEST_LOG_(INFO) << " GetCallbackProxy FAILED"; } @@ -122,5 +123,5 @@ HWTEST_F(CloudSyncManagerTest, StopSyncTest, TestSize.Level1) } } // namespace Test -} // namespace FileManagement::CloudSync { +} // namespace FileManagement::CloudSync } // namespace OHOS diff --git a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_service_proxy_test.cpp b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_service_proxy_test.cpp index be549e257a8e818ab4801dba61beb978e26eac93..6a35b0844bd2b34a92c2b0ff7a7b8f69c2793ad3 100644 --- a/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_service_proxy_test.cpp +++ b/test/unittests/cloudsync_api/cloudsync_impl/cloud_sync_service_proxy_test.cpp @@ -13,9 +13,10 @@ * limitations under the License. */ -#include #include +#include + #include "cloud_sync_service_proxy.h" #include "service_callback_mock.h" #include "i_cloud_sync_service_mock.h" diff --git a/test/unittests/cloudsync_api/cloudsync_impl/include/i_cloud_sync_service_mock.h b/test/unittests/cloudsync_api/cloudsync_impl/include/i_cloud_sync_service_mock.h index b08259b02565a7930d947eaef493109d59b6c160..c1c31068d0eb00172757fead0679de252e4a013b 100644 --- a/test/unittests/cloudsync_api/cloudsync_impl/include/i_cloud_sync_service_mock.h +++ b/test/unittests/cloudsync_api/cloudsync_impl/include/i_cloud_sync_service_mock.h @@ -16,14 +16,13 @@ #ifndef MOCK_I_CLOUD_SYNC_SERVICE_H #define MOCK_I_CLOUD_SYNC_SERVICE_H -#include "i_cloud_sync_service.h" - +#include "iremote_broker.h" #include #include -#include "iremote_broker.h" #include "cloud_sync_constants.h" #include "dfs_error.h" +#include "i_cloud_sync_service.h" namespace OHOS::FileManagement::CloudSync { class CloudSyncServiceMock : public IRemoteStub { @@ -31,9 +30,9 @@ public: int code_; CloudSyncServiceMock() : code_(0) {} virtual ~CloudSyncServiceMock() {} - + MOCK_METHOD4(SendRequest, int(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)); - + int32_t InvokeSendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) { code_ = code; @@ -50,7 +49,7 @@ public: { return E_OK; } - + int32_t StopSyncInner() override { return E_OK; diff --git a/test/unittests/cloudsync_api/cloudsync_impl/include/service_callback_mock.h b/test/unittests/cloudsync_api/cloudsync_impl/include/service_callback_mock.h index 33653dca66ced722c09378ff701589547ed88d83..4e208380ec0add732f23f6bbcce6058d6bd24fb6 100644 --- a/test/unittests/cloudsync_api/cloudsync_impl/include/service_callback_mock.h +++ b/test/unittests/cloudsync_api/cloudsync_impl/include/service_callback_mock.h @@ -1,27 +1,26 @@ /* -* Copyright (c) 2023 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. -*/ + * Copyright (c) 2023 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 MOCK_I_CLOUD_SYNC_CALLBACK_H #define MOCK_I_CLOUD_SYNC_CALLBACK_H - +#include "iremote_stub.h" #include -#include "i_cloud_sync_callback.h" -#include "iremote_stub.h" #include "dfs_error.h" +#include "i_cloud_sync_callback.h" namespace OHOS::FileManagement::CloudSync { diff --git a/test/unittests/cloudsync_sa/ipc/cloudsync_callback_manager_test.cpp b/test/unittests/cloudsync_sa/ipc/cloudsync_callback_manager_test.cpp index 8d1606b2531dd5202bad24d73561d311a9c7b56c..68daf96fc0d182b26502754d7940180783787a31 100644 --- a/test/unittests/cloudsync_sa/ipc/cloudsync_callback_manager_test.cpp +++ b/test/unittests/cloudsync_sa/ipc/cloudsync_callback_manager_test.cpp @@ -13,14 +13,14 @@ * limitations under the License. */ -#include #include +#include "iservice_registry.h" +#include + #include "cloud_sync_callback_manager.h" #include "cloud_sync_callback_proxy.h" - #include "dfs_error.h" -#include "iservice_registry.h" #include "service_callback_mock.h" namespace OHOS { diff --git a/test/unittests/cloudsync_sa/ipc/cloudsync_callback_proxy_test.cpp b/test/unittests/cloudsync_sa/ipc/cloudsync_callback_proxy_test.cpp index 2f2ecad87de7bc92ab3131718462e41dc23b41f5..416c8b361c22de26199680665bf2ce822dbd2d02 100644 --- a/test/unittests/cloudsync_sa/ipc/cloudsync_callback_proxy_test.cpp +++ b/test/unittests/cloudsync_sa/ipc/cloudsync_callback_proxy_test.cpp @@ -13,9 +13,10 @@ * limitations under the License. */ -#include #include +#include + #include "cloud_sync_callback_proxy.h" #include "dfs_error.h" #include "service_callback_mock.h" diff --git a/utils/dentry/src/meta_file.cpp b/utils/dentry/src/meta_file.cpp index 49e38bfe41623730c263832f54fd85583fff09d5..88509a97bea590240f41b2765d3968d12886be00 100644 --- a/utils/dentry/src/meta_file.cpp +++ b/utils/dentry/src/meta_file.cpp @@ -18,13 +18,14 @@ #include #include #include +#include -#include "dfs_error.h" #include "directory_ex.h" -#include "file_utils.h" #include "securec.h" #include "string_ex.h" -#include "sys/xattr.h" + +#include "dfs_error.h" +#include "file_utils.h" #include "utils_log.h" namespace OHOS { diff --git a/utils/preference/src/cloud_pref_impl.cpp b/utils/preference/src/cloud_pref_impl.cpp index eaf1ee22c9f94a09220840d0109e77c781a69a5a..6e415dc174bf3f74860faec281c33002a153ff67 100644 --- a/utils/preference/src/cloud_pref_impl.cpp +++ b/utils/preference/src/cloud_pref_impl.cpp @@ -14,8 +14,10 @@ */ #include "cloud_pref_impl.h" + #include #include + #include "utils_log.h" namespace OHOS::FileManagement::CloudSync { diff --git a/utils/system/include/dfsu_singleton.h b/utils/system/include/dfsu_singleton.h index eea5a43c26d3f839e06770f7f92d93fe31845ca0..f2fa494568fadee6bb2d86d9a43c4212cf1aa250 100644 --- a/utils/system/include/dfsu_singleton.h +++ b/utils/system/include/dfsu_singleton.h @@ -19,6 +19,7 @@ #include #include #include + #include "nocopyable.h" namespace OHOS { diff --git a/utils/system/include/dfsu_thread.h b/utils/system/include/dfsu_thread.h index a59e49245564d3d3f780ef7279999ff710eb5de8..31f55bda1c3c8dd9bfd73d53f9b862d9628982cf 100644 --- a/utils/system/include/dfsu_thread.h +++ b/utils/system/include/dfsu_thread.h @@ -20,6 +20,7 @@ #include #include #include + #include "utils_log.h" namespace OHOS { diff --git a/utils/system/include/utils_directory.h b/utils/system/include/utils_directory.h index cdd354af43f705c823f800cfeb3613d1d44dc875..f4b06b56f97429e29b5f9bc1b308f8ff4feb850b 100644 --- a/utils/system/include/utils_directory.h +++ b/utils/system/include/utils_directory.h @@ -16,8 +16,8 @@ #ifndef UTILS_DIRECTORY_H #define UTILS_DIRECTORY_H -#include #include +#include namespace OHOS { namespace Storage { diff --git a/utils/system/src/dfsu_access_token_helper.cpp b/utils/system/src/dfsu_access_token_helper.cpp index 0c1fb9a962478686fdfab9a92098d72ff4eaa0fe..861cbe59ae1c6b88a81c36848ee102c7dd3d8649 100644 --- a/utils/system/src/dfsu_access_token_helper.cpp +++ b/utils/system/src/dfsu_access_token_helper.cpp @@ -14,11 +14,13 @@ */ #include "dfsu_access_token_helper.h" -#include "accesstoken_kit.h" + #include "ipc_skeleton.h" #include "tokenid_kit.h" -#include "utils_log.h" + +#include "accesstoken_kit.h" #include "dfs_error.h" +#include "utils_log.h" namespace OHOS::FileManagement { using namespace std; diff --git a/utils/system/src/utils_directory.cpp b/utils/system/src/utils_directory.cpp index 463f1339705f89fd44283f7b215dcab28969a697..aad4b95a40907eed4800dc7a300d040d5d99a430 100644 --- a/utils/system/src/utils_directory.cpp +++ b/utils/system/src/utils_directory.cpp @@ -16,8 +16,8 @@ #include "utils_directory.h" #include -#include #include +#include #include "directory_ex.h"