126
* mcd_storage_set_strv:
127
* @storage: An object implementing the #McdStorage interface
128
* @account: the unique name of an account
129
* @key: the key (name) of the parameter or setting
130
* @strv: the string vector to be stored (where %NULL is treated as equivalent
131
* to an empty vector)
132
* @secret: whether the value is confidential (might get stored in the
133
* keyring, for example)
135
* Copies and stores the supplied string vector to the internal cache.
137
* Returns: a #gboolean indicating whether the cache actually required an
138
* update (so that the caller can decide whether to request a commit to
139
* long term storage or not). %TRUE indicates the cache was updated and
140
* may not be in sync with the store any longer, %FALSE indicates we already
141
* held the value supplied.
144
mcd_storage_set_strv (McdStorage *storage,
145
const gchar *account,
147
const gchar * const *strv,
150
McdStorageIface *iface = MCD_STORAGE_GET_IFACE (storage);
152
static const gchar * const *empty = { NULL };
155
g_assert (iface != NULL);
156
g_return_val_if_fail (account != NULL, FALSE);
157
g_return_val_if_fail (key != NULL, FALSE);
158
g_return_val_if_fail (iface->set_value != NULL, FALSE);
160
g_value_init (&v, G_TYPE_STRV);
161
g_value_set_static_boxed (&v, strv == NULL ? empty : strv);
162
ret = iface->set_value (storage, account, key, &v, secret);
126
168
* mcd_storage_commit:
127
169
* @storage: An object implementing the #McdStorage interface
128
170
* @account: the unique name of an account