1 // This file is part of darktable
2 // Copyright (c) 2010 Tobias Ellinghaus <houz@gmx.de>.
3 
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.
8 //
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.
13 //
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/>.
16 
17 #pragma once
18 
19 #include "pwstorage.h"
20 #include <glib.h>
21 
22 /** kwallet backend context */
23 typedef struct backend_kwallet_context_t
24 {
25   // Connection to the DBus session bus.
26   //   DBusGConnection* connection;
27   GDBusConnection *connection;
28 
29   // Proxy to the kwallet DBus service.
30   GDBusProxy *proxy;
31 
32   // The name of the wallet we've opened. Set during init_kwallet().
33   gchar *wallet_name;
34 } backend_kwallet_context_t;
35 
36 /** Initializes a new kwallet backend context. */
37 const backend_kwallet_context_t *dt_pwstorage_kwallet_new();
38 /** Cleanup and destroy kwallet backend context. */
39 void dt_pwstorage_kwallet_destroy(const backend_kwallet_context_t *context);
40 /** Store (key,value) pairs. */
41 gboolean dt_pwstorage_kwallet_set(const backend_kwallet_context_t *context, const gchar *slot,
42                                   GHashTable *table);
43 /** Load (key,value) pairs. */
44 GHashTable *dt_pwstorage_kwallet_get(const backend_kwallet_context_t *context, const gchar *slot);
45 
46 // modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
47 // vim: shiftwidth=2 expandtab tabstop=2 cindent
48 // kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
49