1
/* Mission Control plugin API - Account storage hook.
3
* Copyright © 2010 Nokia Corporation
4
* Copyright © 2010 Collabora Ltd.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef MCP_ACCOUNT_STORAGE_H
22
#define MCP_ACCOUNT_STORAGE_H
24
#ifndef _MCP_IN_MISSION_CONTROL_PLUGINS_H
25
#error Use <mission-control-plugins/mission-control-plugins.h> instead
30
#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_READONLY -1
31
#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_DEFAULT 0
32
#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_NORMAL 100
33
#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING 10000
35
/* API for plugins to implement */
36
typedef struct _McpAccountStorage McpAccountStorage;
37
typedef struct _McpAccountStorageIface McpAccountStorageIface;
39
#define MCP_TYPE_ACCOUNT_STORAGE (mcp_account_storage_get_type ())
41
#define MCP_ACCOUNT_STORAGE(o) \
42
(G_TYPE_CHECK_INSTANCE_CAST ((o), MCP_TYPE_ACCOUNT_STORAGE, \
45
#define MCP_IS_ACCOUNT_STORAGE(o) \
46
(G_TYPE_CHECK_INSTANCE_TYPE ((o), MCP_TYPE_ACCOUNT_STORAGE))
48
#define MCP_ACCOUNT_STORAGE_GET_IFACE(o) \
49
(G_TYPE_INSTANCE_GET_INTERFACE ((o), MCP_TYPE_ACCOUNT_STORAGE, \
50
McpAccountStorageIface))
52
GType mcp_account_storage_get_type (void) G_GNUC_CONST;
56
mcp_account_storage_iface_set_priority (McpAccountStorageIface *iface,
59
void mcp_account_storage_iface_set_name (McpAccountStorageIface *iface,
62
void mcp_account_storage_iface_set_desc (McpAccountStorageIface *iface,
65
void mcp_account_storage_iface_implement_get (McpAccountStorageIface *iface,
67
const McpAccountStorage *,
68
const McpAccountManager *,
72
void mcp_account_storage_iface_implement_set (McpAccountStorageIface *iface,
74
const McpAccountStorage *,
75
const McpAccountManager *,
80
void mcp_account_storage_iface_implement_delete (McpAccountStorageIface *iface,
82
const McpAccountStorage *,
83
const McpAccountManager *,
87
void mcp_account_storage_iface_implement_list (McpAccountStorageIface *iface,
89
const McpAccountStorage *,
90
const McpAccountManager *));
93
mcp_account_storage_iface_implement_commit (McpAccountStorageIface *iface,
94
gboolean (*method) (const McpAccountStorage *, const McpAccountManager *am));
97
mcp_account_storage_iface_implement_ready (McpAccountStorageIface *iface,
99
const McpAccountStorage *storage,
100
const McpAccountManager *am));
102
gint mcp_account_storage_priority (const McpAccountStorage *storage);
104
gboolean mcp_account_storage_get (const McpAccountStorage *storage,
105
McpAccountManager *am,
109
gboolean mcp_account_storage_set (const McpAccountStorage *storage,
110
const McpAccountManager *am,
115
gboolean mcp_account_storage_delete (const McpAccountStorage *storage,
116
const McpAccountManager *am,
120
void mcp_account_storage_ready (const McpAccountStorage *storage,
121
const McpAccountManager *am);
124
mcp_account_storage_commit (const McpAccountStorage *storage,
125
const McpAccountManager *am);
127
GList *mcp_account_storage_list (const McpAccountStorage *storage,
128
const McpAccountManager *am);
130
const gchar *mcp_account_storage_name (const McpAccountStorage *storage);
132
const gchar *mcp_account_storage_description (const McpAccountStorage *storage);