22 #include <boost/thread.hpp>
24 #include "soss_svccli.h"
37 static const size_t MAX_KEY_LENGTH =
sizeof(((SOSS_OBJKEY*)0)->obj_id) +
sizeof(((SOSS_OBJKEY*)0)->ext_obj_id);
69 SossKey(
const std::vector<uint8_t> &bytes,
const uint32_t
app_id);
75 SossKey(
const std::string &key);
81 SossKey(
const std::wstring &key);
85 SossKey(
const std::vector<uint8_t> &bytes);
156 SOSS_OBJKEY
obj_key()
const {
return obj_key_;}
160 uint32_t
app_id()
const {
return obj_key_.app_id;}
175 if (((obj_key_.flags & SOSSKEY_FLAG_HAS_KEYSTRING) != 0) && !original_string_key_.empty())
188 return original_string_key_;
197 original_string_key_.assign(string_key_data.begin(), string_key_data.end());
204 void init(
const std::vector<uint8_t> &bytes,
const uint32_t
app_id,
const std::wstring &original_string_key,
const bool has_app_id);
205 void init_string_key(
const std::string &key,
const uint32_t
app_id,
const bool has_app_id);
206 void init_wstring_key(
const std::wstring &key,
const uint32_t
app_id,
const bool has_app_id);
208 void hash_string(
const std::wstring &key, std::vector<uint8_t> *bytes);
210 SOSS_OBJKEY obj_key_;
211 std::wstring original_string_key_;