From 6da69f35dbefaee681aa4f8c14875bba4ab1d8dc Mon Sep 17 00:00:00 2001 From: wangfeifan Date: Sun, 25 Jun 2023 15:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangfeifan --- README.md | 37 +++++++++++++++++++ .../include/print_callback_stub.h | 2 +- .../include/print_extension_info.h | 1 - .../innerkitsimpl/src/print_callback_stub.cpp | 1 - .../src/print_extension_info.cpp | 1 - .../innerkitsimpl/src/printer_capability.cpp | 1 - .../kits/extension/src/js_print_extension.cpp | 1 - .../kits/napi/include/napi_inner_print.h | 1 - .../kits/napi/include/napi_print_task.h | 2 +- .../kits/napi/include/print_async_call.h | 1 - interfaces/kits/napi/src/napi_inner_print.cpp | 1 - interfaces/kits/napi/src/napi_print_task.cpp | 5 +-- interfaces/kits/napi/src/print_task.cpp | 1 - services/include/print_bms_helper.h | 1 - services/src/print_bms_helper.cpp | 1 - services/src/print_callback_proxy.cpp | 1 - .../fwk_inner_napi_test/printer_info_test.cpp | 2 +- utils/include/print_constant.h | 1 - 18 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d10a156 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Print Framework + + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/frameworks/innerkitsimpl/include/print_callback_stub.h b/frameworks/innerkitsimpl/include/print_callback_stub.h index 0535ca9..4613b40 100644 --- a/frameworks/innerkitsimpl/include/print_callback_stub.h +++ b/frameworks/innerkitsimpl/include/print_callback_stub.h @@ -17,9 +17,9 @@ #define PRINT_CALLBACK_STUB_H #define TDD_ENABLE 1 +#include #include "iprint_callback.h" #include "iremote_stub.h" -#include namespace OHOS::Print { class PrintCallbackStub : public IRemoteStub { diff --git a/frameworks/innerkitsimpl/include/print_extension_info.h b/frameworks/innerkitsimpl/include/print_extension_info.h index 5f417ad..3623b0e 100644 --- a/frameworks/innerkitsimpl/include/print_extension_info.h +++ b/frameworks/innerkitsimpl/include/print_extension_info.h @@ -21,7 +21,6 @@ #include "parcel.h" namespace OHOS::Print { - class PrintExtensionInfo final : public Parcelable { public: explicit PrintExtensionInfo(); diff --git a/frameworks/innerkitsimpl/src/print_callback_stub.cpp b/frameworks/innerkitsimpl/src/print_callback_stub.cpp index b5ad5ce..85aa4a0 100644 --- a/frameworks/innerkitsimpl/src/print_callback_stub.cpp +++ b/frameworks/innerkitsimpl/src/print_callback_stub.cpp @@ -87,5 +87,4 @@ bool PrintCallbackStub::HandleExtEvent(MessageParcel &data, MessageParcel &reply reply.WriteBool(result); return true; } - } // namespace OHOS::Print diff --git a/frameworks/innerkitsimpl/src/print_extension_info.cpp b/frameworks/innerkitsimpl/src/print_extension_info.cpp index 545bac0..40d5f36 100644 --- a/frameworks/innerkitsimpl/src/print_extension_info.cpp +++ b/frameworks/innerkitsimpl/src/print_extension_info.cpp @@ -18,7 +18,6 @@ #include "print_log.h" namespace OHOS::Print { - static constexpr const char *PARAM_EXTINFO_EXTENSION_ID = "extensionId"; static constexpr const char *PARAM_EXTINFO_VENDOR_ID = "vendorId"; static constexpr const char *PARAM_EXTINFO_VENDOR_NAME = "vendorName"; diff --git a/frameworks/innerkitsimpl/src/printer_capability.cpp b/frameworks/innerkitsimpl/src/printer_capability.cpp index d18b3df..a570727 100644 --- a/frameworks/innerkitsimpl/src/printer_capability.cpp +++ b/frameworks/innerkitsimpl/src/printer_capability.cpp @@ -18,7 +18,6 @@ #include "print_log.h" namespace OHOS::Print { - static constexpr const char *PARAM_CAPABILITY_COLORMODE = "colorMode"; static constexpr const char *PARAM_CAPABILITY_DUPLEXMODE = "duplexMode"; static constexpr const char *PARAM_CAPABILITY_PAGESIZE = "pageSize"; diff --git a/frameworks/kits/extension/src/js_print_extension.cpp b/frameworks/kits/extension/src/js_print_extension.cpp index 71e13da..9ed04b4 100644 --- a/frameworks/kits/extension/src/js_print_extension.cpp +++ b/frameworks/kits/extension/src/js_print_extension.cpp @@ -33,7 +33,6 @@ namespace OHOS { namespace AbilityRuntime { - JsPrintExtension *JsPrintExtension::jsExtension_ = nullptr; using namespace OHOS::AppExecFwk; using namespace OHOS::Print; diff --git a/interfaces/kits/napi/include/napi_inner_print.h b/interfaces/kits/napi/include/napi_inner_print.h index e012e9a..a10915c 100644 --- a/interfaces/kits/napi/include/napi_inner_print.h +++ b/interfaces/kits/napi/include/napi_inner_print.h @@ -29,7 +29,6 @@ #include "printer_info.h" namespace OHOS::Print { - class NapiInnerPrint { public: static napi_value QueryExtensionInfo(napi_env env, napi_callback_info info); diff --git a/interfaces/kits/napi/include/napi_print_task.h b/interfaces/kits/napi/include/napi_print_task.h index c344171..4ca2b64 100644 --- a/interfaces/kits/napi/include/napi_print_task.h +++ b/interfaces/kits/napi/include/napi_print_task.h @@ -17,9 +17,9 @@ #define NAPI_PRINT_TASK_H #define TDD_ENABLE 1 +#include #include "napi/native_api.h" #include "napi/native_common.h" -#include namespace OHOS::Print { class NapiPrintTask { diff --git a/interfaces/kits/napi/include/print_async_call.h b/interfaces/kits/napi/include/print_async_call.h index 59afa58..f4cafec 100644 --- a/interfaces/kits/napi/include/print_async_call.h +++ b/interfaces/kits/napi/include/print_async_call.h @@ -25,7 +25,6 @@ #define TDD_ENABLE 1 namespace OHOS::Print { - class PrintAsyncCall final { public: class Context { diff --git a/interfaces/kits/napi/src/napi_inner_print.cpp b/interfaces/kits/napi/src/napi_inner_print.cpp index d192e57..6d18982 100644 --- a/interfaces/kits/napi/src/napi_inner_print.cpp +++ b/interfaces/kits/napi/src/napi_inner_print.cpp @@ -22,7 +22,6 @@ #include "print_task.h" namespace OHOS::Print { - const std::string PRINTER_EVENT_TYPE = "printerStateChange"; const std::string PRINTJOB_EVENT_TYPE = "jobStateChange"; const std::string EXTINFO_EVENT_TYPE = "extInfoChange"; diff --git a/interfaces/kits/napi/src/napi_print_task.cpp b/interfaces/kits/napi/src/napi_print_task.cpp index db919fe..dd96921 100644 --- a/interfaces/kits/napi/src/napi_print_task.cpp +++ b/interfaces/kits/napi/src/napi_print_task.cpp @@ -13,14 +13,13 @@ * limitations under the License. */ -#include "napi_print_task.h" - +#include #include "napi_print_utils.h" #include "print_async_call.h" #include "print_log.h" #include "print_manager_client.h" #include "print_task.h" -#include +#include "napi_print_task.h" static constexpr const char *FUNCTION_ON = "on"; static constexpr const char *FUNCTION_OFF = "off"; diff --git a/interfaces/kits/napi/src/print_task.cpp b/interfaces/kits/napi/src/print_task.cpp index c303bb5..72929fe 100644 --- a/interfaces/kits/napi/src/print_task.cpp +++ b/interfaces/kits/napi/src/print_task.cpp @@ -21,7 +21,6 @@ #include "print_manager_client.h" namespace OHOS::Print { - const std::string EVENT_BLOCK = "blocked"; const std::string EVENT_SUCCESS = "success"; const std::string EVENT_FAIL = "failed"; diff --git a/services/include/print_bms_helper.h b/services/include/print_bms_helper.h index 0935e39..f420978 100644 --- a/services/include/print_bms_helper.h +++ b/services/include/print_bms_helper.h @@ -28,7 +28,6 @@ #include "want.h" namespace OHOS::Print { - class PrintBMSHelper : public DelayedSingleton { public: using IBundleMgr = OHOS::AppExecFwk::IBundleMgr; diff --git a/services/src/print_bms_helper.cpp b/services/src/print_bms_helper.cpp index c3ac214..f070bfc 100644 --- a/services/src/print_bms_helper.cpp +++ b/services/src/print_bms_helper.cpp @@ -25,7 +25,6 @@ #include "system_ability_definition.h" namespace OHOS::Print { - using namespace OHOS::AppExecFwk::Constants; PrintBMSHelper::PrintBMSHelper() : sptrBundleMgr_(nullptr), printBMSDeath_(nullptr) diff --git a/services/src/print_callback_proxy.cpp b/services/src/print_callback_proxy.cpp index a4c6b2c..748da16 100644 --- a/services/src/print_callback_proxy.cpp +++ b/services/src/print_callback_proxy.cpp @@ -114,5 +114,4 @@ bool PrintCallbackProxy::OnCallback(const std::string &extensionId, const std::s PRINT_HILOGD("PrintCallbackProxy::OnCallback End"); return true; } - } // namespace OHOS::Print diff --git a/test/unittest/fwk_inner_napi_test/printer_info_test.cpp b/test/unittest/fwk_inner_napi_test/printer_info_test.cpp index ab3548b..9a5f1d3 100644 --- a/test/unittest/fwk_inner_napi_test/printer_info_test.cpp +++ b/test/unittest/fwk_inner_napi_test/printer_info_test.cpp @@ -13,9 +13,9 @@ * limitations under the License. */ +#include #include "napi/native_api.h" #include "printer_info.h" -#include using namespace testing::ext; diff --git a/utils/include/print_constant.h b/utils/include/print_constant.h index 985098f..2aaf9a8 100644 --- a/utils/include/print_constant.h +++ b/utils/include/print_constant.h @@ -19,7 +19,6 @@ #include namespace OHOS::Print { - #define PRINT_RET_NONE #define PRINT_MAX_PRINT_COUNT 1000