30 #ifndef GOOGLE_ANDROIDENTERPRISE_API_APP_STATE_H_ 31 #define GOOGLE_ANDROIDENTERPRISE_API_APP_STATE_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/androidenterprise_api/keyed_app_state.h" 66 explicit AppState(
const Json::Value& storage);
73 explicit AppState(Json::Value* storage);
86 return StringPiece(
"google_androidenterprise_api::AppState");
95 return Storage().isMember(
"keyedAppState");
102 MutableStorage()->removeMember(
"keyedAppState");
109 const client::JsonCppArray<KeyedAppState > get_keyed_app_state()
const;
119 client::JsonCppArray<KeyedAppState > mutable_keyedAppState();
127 return Storage().isMember(
"packageName");
134 MutableStorage()->removeMember(
"packageName");
142 const Json::Value& v = Storage(
"packageName");
143 if (v == Json::Value::null)
return StringPiece(
"");
144 return StringPiece(v.asCString());
155 *MutableStorage(
"packageName") = value.data();
162 #endif // GOOGLE_ANDROIDENTERPRISE_API_APP_STATE_H_ void set_package_name(const StringPiece &value)
Definition: app_state.h:154
Definition: app_state.h:52
const StringPiece get_package_name() const
Definition: app_state.h:141
const StringPiece GetTypeName() const
Definition: app_state.h:85
void clear_keyed_app_state()
Definition: app_state.h:101
void clear_package_name()
Definition: app_state.h:133
bool has_package_name() const
Definition: app_state.h:126
Definition: administrator.h:38
Definition: administrator.cc:40
bool has_keyed_app_state() const
Definition: app_state.h:94