1
// This file is part of darktable
2
// Copyright (c) 2010 Tobias Ellinghaus <houz@gmx.de>.
4
// darktable is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
9
// darktable is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with darktable. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef __PWSTORAGE_H__
18
#define __PWSTORAGE_H__
20
#include "common/darktable.h"
22
typedef enum pw_storage_backend_t
24
PW_STORAGE_BACKEND_NONE = 0,
25
PW_STORAGE_BACKEND_GCONF,
26
PW_STORAGE_BACKEND_KWALLET,
27
PW_STORAGE_BACKEND_GNOME_KEYRING
28
} pw_storage_backend_t;
30
/** pwstorage context */
31
typedef struct dt_pwstorage_t
33
pw_storage_backend_t pw_storage_backend;
34
void* backend_context;
38
/** Initializes a new pwstorage context. */
39
const dt_pwstorage_t* dt_pwstorage_new();
40
/** Cleanup and destroy pwstorage context. \remarks After this point pointer at pwstorage is invalid. */
41
void dt_pwstorage_destroy(const dt_pwstorage_t *pwstorage);
42
/** Store (key,value) pairs. */
43
gboolean dt_pwstorage_set(const gchar* slot, GHashTable* table);
44
/** Load (key,value) pairs. */
45
GHashTable* dt_pwstorage_get(const gchar* slot);