Home
last modified time | relevance | path

Searched refs:pairs (Results 1 - 8 of 8) sorted by relevance

/foundation/distributeddatamgr/preferences/frameworks/ndk/src/
H A Doh_preferences_value.cpp37 const char *OH_PreferencesPair_GetKey(const OH_PreferencesPair *pairs, uint32_t index) in OH_PreferencesPair_GetKey() argument
39 if (pairs == nullptr || index >= pairs[0].maxIndex) { in OH_PreferencesPair_GetKey()
40 LOG_ERROR("failed to get key from pair, pairs is null or index over limit"); in OH_PreferencesPair_GetKey()
45 pairs[index].cid, PreferencesNdkStructId::PREFERENCES_OH_PAIR_CID)) { in OH_PreferencesPair_GetKey()
46 LOG_ERROR("cid error when get key from pair, cid: %{public}ld", static_cast<long>(pairs[index].cid)); in OH_PreferencesPair_GetKey()
49 return pairs[index].key; in OH_PreferencesPair_GetKey()
52 const OH_PreferencesValue *OH_PreferencesPair_GetPreferencesValue(const OH_PreferencesPair *pairs, uint32_t index) in OH_PreferencesPair_GetPreferencesValue() argument
54 if (pairs == nullptr || index >= pairs[ in OH_PreferencesPair_GetPreferencesValue()
[all...]
H A Doh_preferences.cpp417 inline void FreePairValue(OH_PreferencesPair *pairs, size_t count) in FreePairValue() argument
420 delete pairs[i].value; in FreePairValue()
434 OH_PreferencesPair *pairs = new (std::nothrow) OH_PreferencesPair[count]; in OnChange() local
435 if (pairs == nullptr) { in OnChange()
436 LOG_ERROR("malloc pairs failed when on change, count: %{public}d, errno:%{public}d", static_cast<int>(count), in OnChange()
445 FreePairValue(pairs, i); in OnChange()
446 delete []pairs; in OnChange()
450 pairs[i++] = OH_PreferencesPair { PreferencesNdkStructId::PREFERENCES_OH_PAIR_CID, key.c_str(), in OnChange()
453 (dataObserver_)(context_, pairs, count); in OnChange()
454 FreePairValue(pairs, coun in OnChange()
[all...]
/foundation/distributeddatamgr/preferences/interfaces/ndk/include/
H A Doh_preferences_value.h20 * @brief Provides APIs for processing data in the form of key-value (KV) pairs.
21 * You can use the APIs provided by the Preferences module to query, modify, and persist KV pairs.
94 * @param pairs Pointer to the target {@Link OH_PreferencesPair} instance.
95 * @param index Represents a target index of the pairs
101 const char *OH_PreferencesPair_GetKey(const OH_PreferencesPair *pairs, uint32_t index);
106 * @param pairs Pointer to the target {@Link OH_PreferencesPair} instance.
113 const OH_PreferencesValue *OH_PreferencesPair_GetPreferencesValue(const OH_PreferencesPair *pairs, uint32_t index);
H A Doh_preferences.h20 * @brief Provides APIs for processing data in the form of key-value (KV) pairs.
21 * You can use the APIs provided by the Preferences module to query, modify, and persist KV pairs.
60 * @brief Call to return the change in KV pairs.
63 * @param pairs Pointer to the KV pairs to be observed.
64 * @param count Number of KV pairs to be observed.
68 typedef void (*OH_PreferencesDataObserver)(void *context, const OH_PreferencesPair *pairs, uint32_t count);
/foundation/communication/bluetooth_service/services/bluetooth/service/src/gatt/
H A Dgatt_server_profile.cpp113 void AssembleAttFindInforRspSvcPackage(AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len);
115 AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len);
117 AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len);
118 void AssembleAttFindInforRspDescPackage(AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len);
1440 * @param pairs Indicates AttHandleUuid pairs.
1446 AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len) in AssembleAttFindInforRspSvcPackage()
1452 pairs[num].attHandle = db_.GetService(attHandle)->handle_; in AssembleAttFindInforRspSvcPackage()
1454 pairs[num].uuid.uuid16 = UUID_PRIMARY_SERVICE; in AssembleAttFindInforRspSvcPackage()
1456 pairs[nu in AssembleAttFindInforRspSvcPackage()
1445 AssembleAttFindInforRspSvcPackage( AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len) AssembleAttFindInforRspSvcPackage() argument
1469 AssembleAttFindInforRspCharacteristicPackage( AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len) AssembleAttFindInforRspCharacteristicPackage() argument
1487 AssembleAttFindInforRspCharacteristicValPackage( AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len) AssembleAttFindInforRspCharacteristicValPackage() argument
1512 AssembleAttFindInforRspDescPackage( AttHandleUuid *pairs, uint16_t attHandle, uint8_t num, uint16_t *len) AssembleAttFindInforRspDescPackage() argument
[all...]
/foundation/distributeddatamgr/preferences/test/ndk/unittest/
H A Dpreferences_ndk_test.cpp105 void DataChangeObserverCallback(void *context, const OH_PreferencesPair *pairs, uint32_t count) in DataChangeObserverCallback() argument
108 const OH_PreferencesValue *pValue = OH_PreferencesPair_GetPreferencesValue(pairs, i); in DataChangeObserverCallback()
110 const char *pKey = OH_PreferencesPair_GetKey(pairs, i); in DataChangeObserverCallback()
683 void NullTestCallback(void *context, const OH_PreferencesPair *pairs, uint32_t count) in NullTestCallback() argument
687 EXPECT_EQ(OH_PreferencesPair_GetPreferencesValue(pairs, INVALID_INDEX), nullptr); in NullTestCallback()
692 EXPECT_EQ(OH_PreferencesPair_GetKey(pairs, INVALID_INDEX), nullptr); in NullTestCallback()
694 const OH_PreferencesValue *pValue = OH_PreferencesPair_GetPreferencesValue(pairs, i); in NullTestCallback()
696 const char *pKey = OH_PreferencesPair_GetKey(pairs, i); in NullTestCallback()
/foundation/multimedia/media_library/frameworks/services/media_backup_extension/include/
H A Dbackup_database_utils.h100 static std::pair<std::vector<int32_t>, std::vector<int32_t>> UnzipFileIdPairs(const std::vector<FileIdPair>& pairs);
/foundation/multimedia/media_library/frameworks/services/media_backup_extension/src/
H A Dbackup_database_utils.cpp686 const std::vector<FileIdPair>& pairs) in UnzipFileIdPairs()
691 for (const auto& pair : pairs) { in UnzipFileIdPairs()
685 UnzipFileIdPairs( const std::vector<FileIdPair>& pairs) UnzipFileIdPairs() argument

Completed in 11 milliseconds