修改代码规范问题

Signed-off-by: wangfeifan <wangfeifan2@huawei.com>
This commit is contained in:
wangfeifan 2023-06-25 15:02:08 +08:00
parent 237326d578
commit 6da69f35db
18 changed files with 42 additions and 19 deletions

37
README.md Normal file
View File

@ -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/)

View File

@ -17,9 +17,9 @@
#define PRINT_CALLBACK_STUB_H #define PRINT_CALLBACK_STUB_H
#define TDD_ENABLE 1 #define TDD_ENABLE 1
#include <map>
#include "iprint_callback.h" #include "iprint_callback.h"
#include "iremote_stub.h" #include "iremote_stub.h"
#include <map>
namespace OHOS::Print { namespace OHOS::Print {
class PrintCallbackStub : public IRemoteStub<IPrintCallback> { class PrintCallbackStub : public IRemoteStub<IPrintCallback> {

View File

@ -21,7 +21,6 @@
#include "parcel.h" #include "parcel.h"
namespace OHOS::Print { namespace OHOS::Print {
class PrintExtensionInfo final : public Parcelable { class PrintExtensionInfo final : public Parcelable {
public: public:
explicit PrintExtensionInfo(); explicit PrintExtensionInfo();

View File

@ -87,5 +87,4 @@ bool PrintCallbackStub::HandleExtEvent(MessageParcel &data, MessageParcel &reply
reply.WriteBool(result); reply.WriteBool(result);
return true; return true;
} }
} // namespace OHOS::Print } // namespace OHOS::Print

View File

@ -18,7 +18,6 @@
#include "print_log.h" #include "print_log.h"
namespace OHOS::Print { namespace OHOS::Print {
static constexpr const char *PARAM_EXTINFO_EXTENSION_ID = "extensionId"; 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_ID = "vendorId";
static constexpr const char *PARAM_EXTINFO_VENDOR_NAME = "vendorName"; static constexpr const char *PARAM_EXTINFO_VENDOR_NAME = "vendorName";

View File

@ -18,7 +18,6 @@
#include "print_log.h" #include "print_log.h"
namespace OHOS::Print { namespace OHOS::Print {
static constexpr const char *PARAM_CAPABILITY_COLORMODE = "colorMode"; static constexpr const char *PARAM_CAPABILITY_COLORMODE = "colorMode";
static constexpr const char *PARAM_CAPABILITY_DUPLEXMODE = "duplexMode"; static constexpr const char *PARAM_CAPABILITY_DUPLEXMODE = "duplexMode";
static constexpr const char *PARAM_CAPABILITY_PAGESIZE = "pageSize"; static constexpr const char *PARAM_CAPABILITY_PAGESIZE = "pageSize";

View File

@ -33,7 +33,6 @@
namespace OHOS { namespace OHOS {
namespace AbilityRuntime { namespace AbilityRuntime {
JsPrintExtension *JsPrintExtension::jsExtension_ = nullptr; JsPrintExtension *JsPrintExtension::jsExtension_ = nullptr;
using namespace OHOS::AppExecFwk; using namespace OHOS::AppExecFwk;
using namespace OHOS::Print; using namespace OHOS::Print;

View File

@ -29,7 +29,6 @@
#include "printer_info.h" #include "printer_info.h"
namespace OHOS::Print { namespace OHOS::Print {
class NapiInnerPrint { class NapiInnerPrint {
public: public:
static napi_value QueryExtensionInfo(napi_env env, napi_callback_info info); static napi_value QueryExtensionInfo(napi_env env, napi_callback_info info);

View File

@ -17,9 +17,9 @@
#define NAPI_PRINT_TASK_H #define NAPI_PRINT_TASK_H
#define TDD_ENABLE 1 #define TDD_ENABLE 1
#include <string>
#include "napi/native_api.h" #include "napi/native_api.h"
#include "napi/native_common.h" #include "napi/native_common.h"
#include <string>
namespace OHOS::Print { namespace OHOS::Print {
class NapiPrintTask { class NapiPrintTask {

View File

@ -25,7 +25,6 @@
#define TDD_ENABLE 1 #define TDD_ENABLE 1
namespace OHOS::Print { namespace OHOS::Print {
class PrintAsyncCall final { class PrintAsyncCall final {
public: public:
class Context { class Context {

View File

@ -22,7 +22,6 @@
#include "print_task.h" #include "print_task.h"
namespace OHOS::Print { namespace OHOS::Print {
const std::string PRINTER_EVENT_TYPE = "printerStateChange"; const std::string PRINTER_EVENT_TYPE = "printerStateChange";
const std::string PRINTJOB_EVENT_TYPE = "jobStateChange"; const std::string PRINTJOB_EVENT_TYPE = "jobStateChange";
const std::string EXTINFO_EVENT_TYPE = "extInfoChange"; const std::string EXTINFO_EVENT_TYPE = "extInfoChange";

View File

@ -13,14 +13,13 @@
* limitations under the License. * limitations under the License.
*/ */
#include "napi_print_task.h" #include <mutex>
#include "napi_print_utils.h" #include "napi_print_utils.h"
#include "print_async_call.h" #include "print_async_call.h"
#include "print_log.h" #include "print_log.h"
#include "print_manager_client.h" #include "print_manager_client.h"
#include "print_task.h" #include "print_task.h"
#include <mutex> #include "napi_print_task.h"
static constexpr const char *FUNCTION_ON = "on"; static constexpr const char *FUNCTION_ON = "on";
static constexpr const char *FUNCTION_OFF = "off"; static constexpr const char *FUNCTION_OFF = "off";

View File

@ -21,7 +21,6 @@
#include "print_manager_client.h" #include "print_manager_client.h"
namespace OHOS::Print { namespace OHOS::Print {
const std::string EVENT_BLOCK = "blocked"; const std::string EVENT_BLOCK = "blocked";
const std::string EVENT_SUCCESS = "success"; const std::string EVENT_SUCCESS = "success";
const std::string EVENT_FAIL = "failed"; const std::string EVENT_FAIL = "failed";

View File

@ -28,7 +28,6 @@
#include "want.h" #include "want.h"
namespace OHOS::Print { namespace OHOS::Print {
class PrintBMSHelper : public DelayedSingleton<PrintBMSHelper> { class PrintBMSHelper : public DelayedSingleton<PrintBMSHelper> {
public: public:
using IBundleMgr = OHOS::AppExecFwk::IBundleMgr; using IBundleMgr = OHOS::AppExecFwk::IBundleMgr;

View File

@ -25,7 +25,6 @@
#include "system_ability_definition.h" #include "system_ability_definition.h"
namespace OHOS::Print { namespace OHOS::Print {
using namespace OHOS::AppExecFwk::Constants; using namespace OHOS::AppExecFwk::Constants;
PrintBMSHelper::PrintBMSHelper() : sptrBundleMgr_(nullptr), printBMSDeath_(nullptr) PrintBMSHelper::PrintBMSHelper() : sptrBundleMgr_(nullptr), printBMSDeath_(nullptr)

View File

@ -114,5 +114,4 @@ bool PrintCallbackProxy::OnCallback(const std::string &extensionId, const std::s
PRINT_HILOGD("PrintCallbackProxy::OnCallback End"); PRINT_HILOGD("PrintCallbackProxy::OnCallback End");
return true; return true;
} }
} // namespace OHOS::Print } // namespace OHOS::Print

View File

@ -13,9 +13,9 @@
* limitations under the License. * limitations under the License.
*/ */
#include <gtest/gtest.h>
#include "napi/native_api.h" #include "napi/native_api.h"
#include "printer_info.h" #include "printer_info.h"
#include <gtest/gtest.h>
using namespace testing::ext; using namespace testing::ext;

View File

@ -19,7 +19,6 @@
#include <string> #include <string>
namespace OHOS::Print { namespace OHOS::Print {
#define PRINT_RET_NONE #define PRINT_RET_NONE
#define PRINT_MAX_PRINT_COUNT 1000 #define PRINT_MAX_PRINT_COUNT 1000