shill: Implement CreateProfile, PushProfile, PopProfile
Collateral fixes: Profiles now create a header at the beginning
of the file, and this feature is plumbed down through key_file_store
and glib. InitStorage can be configured to fail if the profile
already exists/doesn't yet exist.
BUG=chromium-os:22221
TEST=New unit tests
Change-Id: Ie7c2d0dee97891b7850cec75b74052fce77eee8f
Reviewed-on: https://gerrit.chromium.org/gerrit/10884
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/glib.cc b/glib.cc
index 2b64ed3..b06cfb5 100644
--- a/glib.cc
+++ b/glib.cc
@@ -132,6 +132,14 @@
g_key_file_set_boolean(key_file, group_name, key, value);
}
+gboolean GLib::KeyFileSetComment(GKeyFile *key_file,
+ const gchar *group_name,
+ const gchar *key,
+ const gchar *comment,
+ GError **error) {
+ return g_key_file_set_comment(key_file, group_name, key, comment, error);
+}
+
void GLib::KeyFileSetInteger(GKeyFile *key_file,
const gchar *group_name,
const gchar *key,