X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgmemorysettingsbackend.c;h=b0d58b5681886f0d3aadea18643c597630b669d5;hb=f2786908a8858ec9d063e8fae7e4b2d8d612b682;hp=6b60058e83daca950d14efb5a38097aedc83ee40;hpb=73ca8b47540d005d5227c03aac143d6780da654c;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gmemorysettingsbackend.c b/gio/gmemorysettingsbackend.c index 6b60058..b0d58b5 100644 --- a/gio/gmemorysettingsbackend.c +++ b/gio/gmemorysettingsbackend.c @@ -12,18 +12,15 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library; if not, see . * * Author: Ryan Lortie */ #include "config.h" -#include "gmemorysettingsbackend.h" #include "gsimplepermission.h" -#include "gsettingsbackend.h" +#include "gsettingsbackendinternal.h" #include "giomodule.h" @@ -174,3 +171,22 @@ g_memory_settings_backend_class_init (GMemorySettingsBackendClass *class) backend_class->get_permission = g_memory_settings_backend_get_permission; object_class->finalize = g_memory_settings_backend_finalize; } + +/** + * g_memory_settings_backend_new: + * + * Creates a memory-backed #GSettingsBackend. + * + * This backend allows changes to settings, but does not write them + * to any backing storage, so the next time you run your application, + * the memory backend will start out with the default values again. + * + * Returns: (transfer full): a newly created #GSettingsBackend + * + * Since: 2.28 + */ +GSettingsBackend * +g_memory_settings_backend_new (void) +{ + return g_object_new (G_TYPE_MEMORY_SETTINGS_BACKEND, NULL); +}