~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to src/common/pwstorage/pwstorage.h

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-04-14 23:42:12 UTC
  • Revision ID: james.westby@ubuntu.com-20110414234212-kuffcz5wiu18v6ra
Tags: upstream-0.8
ImportĀ upstreamĀ versionĀ 0.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#ifndef __PWSTORAGE_H__
 
18
#define __PWSTORAGE_H__
 
19
 
 
20
#include "common/darktable.h"
 
21
 
 
22
typedef enum pw_storage_backend_t
 
23
{
 
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;
 
29
 
 
30
/** pwstorage context */
 
31
typedef struct dt_pwstorage_t
 
32
{
 
33
  pw_storage_backend_t pw_storage_backend;
 
34
  void* backend_context;
 
35
}
 
36
dt_pwstorage_t;
 
37
 
 
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);
 
46
 
 
47
#endif