mirror of
https://gitee.com/openharmony/print_print_fwk
synced 2024-11-26 18:40:40 +00:00
告警修改 Signed-off-by:baozewei@huawei.com
Signed-off-by: b30052170 <baozewei@huawei.com>
This commit is contained in:
parent
86876759b5
commit
f9378d286e
@ -157,8 +157,10 @@ void ScanAsyncCall::OnComplete(napi_env env, napi_status status, void *data)
|
||||
uint32_t errorIndex = E_SCAN_NONE;
|
||||
if (context->paramStatus != napi_ok) {
|
||||
errorIndex = E_SCAN_INVALID_PARAMETER;
|
||||
} else {
|
||||
} else if (context->ctx != nullptr){
|
||||
errorIndex = context->ctx->GetErrorIndex();
|
||||
} else {
|
||||
errorIndex = E_SCAN_GENERIC_FAILURE;
|
||||
}
|
||||
SCAN_HILOGE("ErrorMessage: [%{public}s], ErrorIndex:[%{public}d]",
|
||||
GetErrorText(errorIndex).c_str(), errorIndex);
|
||||
|
@ -54,8 +54,6 @@ using namespace std;
|
||||
using namespace OHOS::HiviewDFX;
|
||||
using namespace Security::AccessToken;
|
||||
using json = nlohmann::json;
|
||||
const std::string PRINTER_SERVICE_FILE_PATH = "/data/service/el2/public/print_service";
|
||||
const std::string PRINTER_PREFERENCE_FILE = "printer_preference.json";
|
||||
|
||||
const uint32_t MAX_JOBQUEUE_NUM = 512;
|
||||
const uint32_t ASYNC_CMD_DELAY = 10;
|
||||
@ -111,6 +109,8 @@ static const std::string NOTIFY_INFO_SPOOLER_CLOSED_FOR_STARTED = "spooler_close
|
||||
static const std::string PRINTER_ID_DELIMITER = ":";
|
||||
static const std::string USB_PRINTER = "usb";
|
||||
|
||||
const std::string PRINTER_PREFERENCE_FILE = "printer_preference.json";
|
||||
|
||||
static bool g_publishState = false;
|
||||
|
||||
REGISTER_SYSTEM_ABILITY_BY_ID(PrintServiceAbility, PRINT_SERVICE_ID, true);
|
||||
|
@ -23,14 +23,6 @@
|
||||
#include "print_util.h"
|
||||
#include "print_constant.h"
|
||||
|
||||
namespace {
|
||||
const std::string PRINTER_SERVICE_FILE_PATH = "/data/service/el2/public/print_service";
|
||||
const std::string PRINTER_LIST_FILE = "printer_list.json";
|
||||
const std::string PRINTER_LIST_VERSION = "v1";
|
||||
const std::string PRINT_USER_DATA_FILE = "print_user_data.json";
|
||||
const std::string PRINT_USER_DATA_VERSION = "v1";
|
||||
} // namespace
|
||||
|
||||
namespace OHOS {
|
||||
namespace Print {
|
||||
|
||||
|
@ -29,10 +29,6 @@ namespace Print {
|
||||
|
||||
using namespace std;
|
||||
|
||||
const std::string PRINTER_SERVICE_FILE_PATH = "/data/service/el2/public/print_service";
|
||||
const std::string PRINT_USER_DATA_FILE = "print_user_data.json";
|
||||
const std::string PRINT_USER_DATA_VERSION = "v1";
|
||||
|
||||
void PrintUserData::RegisterPrinterCallback(const std::string &type, const sptr<IPrintCallback> &listener)
|
||||
{
|
||||
registeredListeners_[type] = listener;
|
||||
|
@ -232,5 +232,10 @@ const std::string PRINTER_DISCOVER_EVENT_TYPE = "printerDiscover";
|
||||
const std::string PRINTER_CHANGE_EVENT_TYPE = "printerChange";
|
||||
static const std::string PERMISSION_NAME_PRINT = "ohos.permission.PRINT";
|
||||
static const std::string PERMISSION_NAME_PRINT_JOB = "ohos.permission.MANAGE_PRINT_JOB";
|
||||
const std::string PRINTER_SERVICE_FILE_PATH = "/data/service/el2/public/print_service";
|
||||
const std::string PRINTER_LIST_FILE = "printer_list.json";
|
||||
const std::string PRINTER_LIST_VERSION = "v1";
|
||||
const std::string PRINT_USER_DATA_FILE = "print_user_data.json";
|
||||
const std::string PRINT_USER_DATA_VERSION = "v1";
|
||||
} // namespace OHOS::Print
|
||||
#endif // PRINT_CONSTANT_H
|
||||
|
@ -103,7 +103,7 @@ inline void PrintIppOverUsbUtil::MakeHeader(size_t startLine, size_t endline, co
|
||||
{
|
||||
// 提取key和value
|
||||
size_t theSplitIndex = startLine; // ":" 所在的位置
|
||||
while (data[theSplitIndex] != CODE_SPLIT_VALUE_COLON && theSplitIndex < endline) {
|
||||
while (theSplitIndex < endline && data[theSplitIndex] != CODE_SPLIT_VALUE_COLON) {
|
||||
theSplitIndex++;
|
||||
}
|
||||
std::string keyString;
|
||||
|
Loading…
Reference in New Issue
Block a user