Home
last modified time | relevance | path

Searched refs:propertyList (Results 1 - 25 of 28) sorted by relevance

12

/base/print/print_fwk/frameworks/helper/scan_helper/src/
H A Dscan_parameters_helper.cpp70 std::map<std::string, ScanParamStatus> propertyList = { in ValidateProperty() local
81 if (propertyList.find(name) == propertyList.end()) { in ValidateProperty()
85 propertyList[name] = SCAN_PARAM_SET; in ValidateProperty()
87 bool hasFormat = propertyList[PARAM_SCAN_PARA_FORMAT] == SCAN_PARAM_SET; in ValidateProperty()
88 bool hasFrame = propertyList[PARAM_SCAN_PARA_LAST_FRAME] == SCAN_PARAM_SET; in ValidateProperty()
89 bool hasBytes = propertyList[PARAM_SCAN_PARA_BYTES] == SCAN_PARAM_SET; in ValidateProperty()
90 bool hasPixels = propertyList[PARAM_SCAN_PARA_PIXELS] == SCAN_PARAM_SET; in ValidateProperty()
91 bool hasLines = propertyList[PARAM_SCAN_PARA_LINES] == SCAN_PARAM_SET; in ValidateProperty()
92 bool hasDepth = propertyList[PARAM_SCAN_PARA_DEPT in ValidateProperty()
[all...]
H A Dscan_range_helper.cpp68 std::map<std::string, ScanParamStatus> propertyList = { in ValidateProperty() local
76 if (propertyList.find(name) == propertyList.end()) { in ValidateProperty()
80 propertyList[name] = SCAN_PARAM_SET; in ValidateProperty()
82 bool hasMinValue = propertyList[PARAM_RANGE_MINVALUE] == SCAN_PARAM_SET; in ValidateProperty()
83 bool hasMaxValue = propertyList[PARAM_RANGE_MAXVALUE] == SCAN_PARAM_SET; in ValidateProperty()
84 bool hasQuantValue = propertyList[PARAM_RANGE_QUANTVALUE] == SCAN_PARAM_SET; in ValidateProperty()
H A Dscan_option_value_helper.cpp111 std::map<std::string, ScanParamStatus> propertyList = { in ValidateProperty() local
121 if (propertyList.find(name) == propertyList.end()) { in ValidateProperty()
125 propertyList[name] = SCAN_PARAM_SET; in ValidateProperty()
127 bool hasValueType = propertyList[PARAM_SCAN_OPTION_VALUE_TYPE] == SCAN_PARAM_SET; in ValidateProperty()
128 bool hasValueSize = propertyList[PARAM_SCAN_OPTION_VALUE_SIZE] == SCAN_PARAM_SET; in ValidateProperty()
/base/print/print_fwk/frameworks/helper/print_helper/src/
H A Dprint_range_helper.cpp106 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
114 if (propertyList.find(name) == propertyList.end()) { in ValidateProperty()
118 propertyList[name] = PRINT_PARAM_SET; in ValidateProperty()
120 bool hasStartPage = propertyList[PARAM_RANGE_STARTPAGE] == PRINT_PARAM_SET; in ValidateProperty()
121 bool hasEndPage = propertyList[PARAM_RANGE_ENDPAGE] == PRINT_PARAM_SET; in ValidateProperty()
122 bool hasPages = propertyList[PARAM_RANGE_PAGES] == PRINT_PARAM_SET; in ValidateProperty()
H A Dprint_margin_helper.cpp83 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
92 if (propertyList.find(name) == propertyList.end()) { in ValidateProperty()
96 propertyList[name] = PRINT_PARAM_SET; in ValidateProperty()
H A Dprint_preview_attribute_helper.cpp70 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
76 return NapiPrintUtils::VerifyProperty(names, propertyList); in ValidateProperty()
H A Dprint_page_size_helper.cpp67 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
75 return NapiPrintUtils::VerifyProperty(names, propertyList); in ValidateProperty()
H A Dprint_resolution_helper.cpp59 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
66 return NapiPrintUtils::VerifyProperty(names, propertyList); in ValidateProperty()
H A Dnapi_print_utils.cpp329 std::vector<std::string> &names, std::map<std::string, PrintParamStatus> &propertyList) in VerifyProperty()
332 if (propertyList.find(name) == propertyList.end()) { in VerifyProperty()
336 propertyList[name] = PRINT_PARAM_SET; in VerifyProperty()
339 for (const auto& propertyItem : propertyList) { in VerifyProperty()
328 VerifyProperty( std::vector<std::string> &names, std::map<std::string, PrintParamStatus> &propertyList) VerifyProperty() argument
H A Dprinter_info_helper.cpp143 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
157 return NapiPrintUtils::VerifyProperty(names, propertyList); in ValidateProperty()
H A Dprint_attributes_helper.cpp191 std::map<std::string, PrintParamStatus> propertyList = { in ValidateProperty() local
205 return NapiPrintUtils::VerifyProperty(names, propertyList); in ValidateProperty()
/base/print/print_fwk/test/unittest/fwk_vendor_manager_test/
H A Dvendor_bsuni_driver_test.cpp233 Print_PropertyList propertyList = { 0 }; in HWTEST_F() local
234 propertyList.count = static_cast<uint32_t>(propertyKeys.size()); in HWTEST_F()
235 propertyList.list = new (std::nothrow) Print_Property[propertyList.count]; in HWTEST_F()
236 ASSERT_NE(propertyList.list, nullptr); in HWTEST_F()
237 for (uint32_t i = 0; i < propertyList.count; ++i) { in HWTEST_F()
238 propertyList.list[i].key = const_cast<char *>(propertyKeys[i].c_str()); in HWTEST_F()
239 propertyList.list[i].value = "test data"; in HWTEST_F()
243 EXPECT_EQ(vendorDriver.OnPrinterPropertiesQueried(printerId, &propertyList), EXTENSION_ERROR_NONE); in HWTEST_F()
244 propertyList in HWTEST_F()
[all...]
H A Dvendor_helper_test.cpp237 Print_PropertyList propertyList = {0}; in HWTEST_F() local
239 LogProperties(&propertyList); in HWTEST_F()
240 EXPECT_EQ(propertyList.list, nullptr); in HWTEST_F()
/base/print/print_fwk/frameworks/ohprint/src/
H A Dprint_capi.cpp313 const char *printerId, const Print_StringList *propertyKeyList, Print_PropertyList *propertyList) in OH_Print_QueryPrinterProperties()
316 propertyList == nullptr) { in OH_Print_QueryPrinterProperties()
342 return ConvertStringVectorToPropertyList(valueList, propertyList); in OH_Print_QueryPrinterProperties()
345 void OH_Print_ReleasePrinterProperties(Print_PropertyList *propertyList) in OH_Print_ReleasePrinterProperties() argument
347 if (propertyList == nullptr) { in OH_Print_ReleasePrinterProperties()
348 PRINT_HILOGW("propertyList is null"); in OH_Print_ReleasePrinterProperties()
351 if (propertyList->list != nullptr) { in OH_Print_ReleasePrinterProperties()
352 for (uint32_t i = 0; i < propertyList->count; ++i) { in OH_Print_ReleasePrinterProperties()
353 SAFE_DELETE_ARRAY(propertyList->list[i].key); in OH_Print_ReleasePrinterProperties()
354 SAFE_DELETE_ARRAY(propertyList in OH_Print_ReleasePrinterProperties()
312 OH_Print_QueryPrinterProperties( const char *printerId, const Print_StringList *propertyKeyList, Print_PropertyList *propertyList) OH_Print_QueryPrinterProperties() argument
361 OH_Print_UpdatePrinterProperties(const char *printerId, const Print_PropertyList *propertyList) OH_Print_UpdatePrinterProperties() argument
[all...]
H A Dprint_helper.cpp663 Print_PropertyList *propertyList) in ConvertStringVectorToPropertyList()
669 propertyList->list = new (std::nothrow) Print_Property[valueList.size()]; in ConvertStringVectorToPropertyList()
670 if (propertyList->list == nullptr) { in ConvertStringVectorToPropertyList()
671 PRINT_HILOGW("propertyList->list is null"); in ConvertStringVectorToPropertyList()
674 if (memset_s(propertyList->list, valueList.size() * sizeof(Print_Property), 0, in ConvertStringVectorToPropertyList()
677 delete[] propertyList->list; in ConvertStringVectorToPropertyList()
678 propertyList->list = nullptr; in ConvertStringVectorToPropertyList()
688 propertyList->list[count].key = CopyString(keyVal.substr(0, index)); in ConvertStringVectorToPropertyList()
689 propertyList->list[count].value = CopyString(keyVal.substr(index + 1)); in ConvertStringVectorToPropertyList()
692 propertyList in ConvertStringVectorToPropertyList()
662 ConvertStringVectorToPropertyList(const std::vector<std::string> &valueList, Print_PropertyList *propertyList) ConvertStringVectorToPropertyList() argument
[all...]
/base/print/print_fwk/services/print_service/src/
H A Dvendor_helper.cpp331 void LogProperties(const Print_PropertyList *propertyList) in LogProperties() argument
333 if (propertyList == nullptr) { in LogProperties()
334 PRINT_HILOGW("propertyList is null"); in LogProperties()
337 if (propertyList->count == 0 || propertyList->list == nullptr) { in LogProperties()
338 PRINT_HILOGW("propertyList empty"); in LogProperties()
341 for (uint32_t i = 0; i < propertyList->count; ++i) { in LogProperties()
342 if (propertyList->list[i].key == nullptr) { in LogProperties()
343 PRINT_HILOGW("propertyList item empty: %{public}u", i); in LogProperties()
346 PRINT_HILOGD("LogProperties key: %{public}s", propertyList in LogProperties()
355 FindPropertyFromPropertyList(const Print_PropertyList *propertyList, const std::string &keyName) FindPropertyFromPropertyList() argument
[all...]
H A Dvendor_bsuni_driver.cpp180 int32_t VendorBsuniDriver::OnPropertiesQueried(const char *printerId, const Print_PropertyList *propertyList) in OnPropertiesQueried() argument
187 LogProperties(propertyList); in OnPropertiesQueried()
194 return g_driverWrapper->OnPrinterPropertiesQueried(vendorPrinterId, propertyList); in OnPropertiesQueried()
366 const Print_PropertyList *propertyList) in OnPrinterPropertiesQueried()
374 std::string ppdData = FindPropertyFromPropertyList(propertyList, key); in OnPrinterPropertiesQueried()
385 std::string suppliesData = FindPropertyFromPropertyList(propertyList, key); in OnPrinterPropertiesQueried()
392 std::string stateData = FindPropertyFromPropertyList(propertyList, key); in OnPrinterPropertiesQueried()
365 OnPrinterPropertiesQueried(const std::string &printerId, const Print_PropertyList *propertyList) OnPrinterPropertiesQueried() argument
/base/account/os_account/interfaces/kits/napi/appaccount/src/
H A Dnapi_app_account.cpp307 std::vector<PropertyType> propertyList = { PropertyType::NAME }; in RemoveAccountInternal() local
309 if ((!ParseContextForAppAccount(env, cbInfo, asyncContext.get(), propertyList, &result)) && isThrowable) { in RemoveAccountInternal()
340 std::vector<PropertyType> propertyList = {PropertyType::NAME, PropertyType::BUNDLE_NAME}; in DisableAppAccess() local
342 ParseContextForAppAccount(env, cbInfo, asyncContext.get(), propertyList, &result); in DisableAppAccess()
369 std::vector<PropertyType> propertyList = {PropertyType::NAME, PropertyType::BUNDLE_NAME}; in EnableAppAccess() local
371 ParseContextForAppAccount(env, cbInfo, asyncContext.get(), propertyList, &result); in EnableAppAccess()
399 std::vector<PropertyType> propertyList = { in SetAppAccess() local
402 if (!ParseContextForAppAccount(env, cbInfo, context.get(), propertyList, &result)) { in SetAppAccess()
439 std::vector<PropertyType> propertyList = { PropertyType::NAME }; in CheckDataSyncEnabledInternal() local
441 if ((!ParseContextForAppAccount(env, cbInfo, asyncContext.get(), propertyList, in CheckDataSyncEnabledInternal()
486 std::vector<PropertyType> propertyList = { SetCredentialInternal() local
522 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::EXTRA_INFO }; SetAccountExtraInfo() local
558 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::IS_ENABLE }; SetDataSyncEnabledInternal() local
604 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::KEY, PropertyType::VALUE }; SetCustomDataInternal() local
765 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::CREDENTIAL_TYPE }; GetCredentialInternal() local
799 std::vector<PropertyType> propertyList = { PropertyType::NAME }; GetAccountExtraInfo() local
842 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::KEY }; GetCustomDataInternal() local
974 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::OWNER, PropertyType::AUTH_TYPE }; GetAuthTokenInternal() local
1023 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::AUTH_TYPE, PropertyType::TOKEN }; SetAuthTokenInternal() local
1068 std::vector<PropertyType> propertyList = { DeleteAuthTokenInternal() local
1115 std::vector<PropertyType> propertyList = { SetAuthTokenVisibilityInternal() local
1188 std::vector<PropertyType> propertyList = { CheckAuthTokenVisibilityInternal() local
1218 std::vector<PropertyType> propertyList = { PropertyType::OWNER }; QueryAuthenticatorInfoInternal() local
1266 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::OWNER }; GetAllAuthTokensInternal() local
1314 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::AUTH_TYPE }; GetAuthListInternal() local
1365 std::vector<PropertyType> propertyList = { PropertyType::SESSION_ID }; GetAuthCallbackInternal() local
1402 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::BUNDLE_NAME }; CheckAppAccess() local
1446 std::vector<PropertyType> propertyList = { PropertyType::NAME, PropertyType::CREDENTIAL_TYPE }; DeleteCredentialInternal() local
[all...]
H A Dnapi_app_account_common.cpp669 OAuthAsyncContext *asyncContext, const std::vector<PropertyType> &propertyList, napi_value *result) in ParseContextForOAuth()
672 size_t argcSize = propertyList.size() + 1; in ParseContextForOAuth()
684 for (uint32_t i = 0; i < propertyList.size(); i++) { in ParseContextForOAuth()
685 if (!ParseContextOAuthProperty(env, argv[i], propertyList[i], asyncContext)) { in ParseContextForOAuth()
738 AppAccountAsyncContext *context, const std::vector<PropertyType> &propertyList, napi_value *result) in ParseContextForAppAccount()
740 size_t argcSize = propertyList.size() + 1; in ParseContextForAppAccount()
753 for (size_t i = 0; i < propertyList.size(); i++) { in ParseContextForAppAccount()
754 if (!ParseAppAccountProperty(env, argv[i], propertyList[i], context)) { in ParseContextForAppAccount()
755 context->errMsg = ErrMsgList[propertyList[i]]; in ParseContextForAppAccount()
668 ParseContextForOAuth(napi_env env, napi_callback_info cbInfo, OAuthAsyncContext *asyncContext, const std::vector<PropertyType> &propertyList, napi_value *result) ParseContextForOAuth() argument
737 ParseContextForAppAccount(napi_env env, napi_callback_info cbInfo, AppAccountAsyncContext *context, const std::vector<PropertyType> &propertyList, napi_value *result) ParseContextForAppAccount() argument
/base/print/print_fwk/services/print_service/include/
H A Dvendor_bsuni_driver.h34 static int32_t OnPropertiesQueried(const char *printerId, const Print_PropertyList *propertyList);
50 int32_t OnPrinterPropertiesQueried(const std::string &printerId, const Print_PropertyList *propertyList);
H A Dvendor_helper.h35 void LogProperties(const Print_PropertyList *propertyList);
44 std::string FindPropertyFromPropertyList(const Print_PropertyList *propertyList, const std::string &keyName);
/base/print/print_fwk/frameworks/ohprint/include/
H A Dprint_helper.h30 Print_PropertyList *propertyList);
H A Dohprint.h727 * @param propertyList The list of printer property values queried.
737 Print_PropertyList *propertyList);
742 * @param propertyList The pointer of the queried printer property values to be released.
746 void OH_Print_ReleasePrinterProperties(Print_PropertyList *propertyList);
753 * @param propertyList The list of printer property values to be set.
760 Print_ErrorCode OH_Print_UpdatePrinterProperties(const char *printerId, const Print_PropertyList *propertyList);
H A Dvendor_extension.h93 int32_t (*onPropertiesQueried)(const char *printerId, const Print_PropertyList *propertyList);
/base/print/print_fwk/frameworks/helper/print_helper/include/
H A Dnapi_print_utils.h80 static bool VerifyProperty(std::vector<std::string> &names, std::map<std::string, PrintParamStatus> &propertyList);

Completed in 15 milliseconds

12