30 #ifndef GOOGLE_GAMES_API_ROOM_PARTICIPANT_H_ 31 #define GOOGLE_GAMES_API_ROOM_PARTICIPANT_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/games_api/anonymous_player.h" 39 #include "google/games_api/player.h" 40 #include "google/games_api/room_client_address.h" 88 return StringPiece(
"google_games_api::RoomParticipant");
97 return Storage().isMember(
"autoMatched");
104 MutableStorage()->removeMember(
"autoMatched");
112 const Json::Value& storage = Storage(
"autoMatched");
113 return client::JsonValueToCppValueHelper<bool >(storage);
124 client::SetJsonValueFromCppValueHelper<bool >(
125 value, MutableStorage(
"autoMatched"));
134 return Storage().isMember(
"autoMatchedPlayer");
141 MutableStorage()->removeMember(
"autoMatchedPlayer");
168 return Storage().isMember(
"capabilities");
175 MutableStorage()->removeMember(
"capabilities");
183 const Json::Value& storage = Storage(
"capabilities");
184 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
197 Json::Value* storage = MutableStorage(
"capabilities");
198 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
207 return Storage().isMember(
"clientAddress");
214 MutableStorage()->removeMember(
"clientAddress");
239 return Storage().isMember(
"connected");
246 MutableStorage()->removeMember(
"connected");
254 const Json::Value& storage = Storage(
"connected");
255 return client::JsonValueToCppValueHelper<bool >(storage);
267 client::SetJsonValueFromCppValueHelper<bool >(
268 value, MutableStorage(
"connected"));
277 return Storage().isMember(
"id");
284 MutableStorage()->removeMember(
"id");
292 const Json::Value& v = Storage(
"id");
293 if (v == Json::Value::null)
return StringPiece(
"");
294 return StringPiece(v.asCString());
306 *MutableStorage(
"id") = value.data();
315 return Storage().isMember(
"kind");
322 MutableStorage()->removeMember(
"kind");
330 const Json::Value& v = Storage(
"kind");
331 if (v == Json::Value::null)
return StringPiece(
"");
332 return StringPiece(v.asCString());
344 *MutableStorage(
"kind") = value.data();
353 return Storage().isMember(
"leaveReason");
360 MutableStorage()->removeMember(
"leaveReason");
368 const Json::Value& v = Storage(
"leaveReason");
369 if (v == Json::Value::null)
return StringPiece(
"");
370 return StringPiece(v.asCString());
402 *MutableStorage(
"leaveReason") = value.data();
411 return Storage().isMember(
"player");
418 MutableStorage()->removeMember(
"player");
425 const Player get_player()
const;
444 return Storage().isMember(
"status");
451 MutableStorage()->removeMember(
"status");
459 const Json::Value& v = Storage(
"status");
460 if (v == Json::Value::null)
return StringPiece(
"");
461 return StringPiece(v.asCString());
486 *MutableStorage(
"status") = value.data();
493 #endif // GOOGLE_GAMES_API_ROOM_PARTICIPANT_H_ bool has_client_address() const
Definition: room_participant.h:206
Definition: anonymous_player.h:50
Definition: room_participant.h:54
bool has_kind() const
Definition: room_participant.h:314
const StringPiece get_kind() const
Definition: room_participant.h:329
Definition: room_client_address.h:50
bool has_id() const
Definition: room_participant.h:276
bool has_player() const
Definition: room_participant.h:410
bool has_connected() const
Definition: room_participant.h:238
void set_kind(const StringPiece &value)
Definition: room_participant.h:343
const StringPiece GetTypeName() const
Definition: room_participant.h:87
void clear_leave_reason()
Definition: room_participant.h:359
void clear_connected()
Definition: room_participant.h:245
bool has_capabilities() const
Definition: room_participant.h:167
void clear_id()
Definition: room_participant.h:283
const StringPiece get_status() const
Definition: room_participant.h:458
void set_id(const StringPiece &value)
Definition: room_participant.h:305
bool has_auto_matched_player() const
Definition: room_participant.h:133
const StringPiece get_id() const
Definition: room_participant.h:291
bool has_status() const
Definition: room_participant.h:443
void clear_auto_matched_player()
Definition: room_participant.h:140
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void clear_status()
Definition: room_participant.h:450
bool get_connected() const
Definition: room_participant.h:253
void clear_kind()
Definition: room_participant.h:321
void set_leave_reason(const StringPiece &value)
Definition: room_participant.h:401
bool has_auto_matched() const
Definition: room_participant.h:96
void set_auto_matched(bool value)
Definition: room_participant.h:123
const StringPiece get_leave_reason() const
Definition: room_participant.h:367
void clear_capabilities()
Definition: room_participant.h:174
void clear_player()
Definition: room_participant.h:417
client::JsonCppArray< string > mutable_capabilities()
Definition: room_participant.h:196
const client::JsonCppArray< string > get_capabilities() const
Definition: room_participant.h:182
void clear_auto_matched()
Definition: room_participant.h:103
void set_status(const StringPiece &value)
Definition: room_participant.h:485
bool get_auto_matched() const
Definition: room_participant.h:111
bool has_leave_reason() const
Definition: room_participant.h:352
void set_connected(bool value)
Definition: room_participant.h:266
void clear_client_address()
Definition: room_participant.h:213