1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
3 * Authors: Michel Zucchi <notzed@ximian.com>
5 * Copyright 2004 Novell, Inc. (www.novell.com)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
23 #ifndef __EM_CONFIG_H__
24 #define __EM_CONFIG_H__
26 #include <glib-object.h>
28 #include "e-util/e-config.h"
33 #endif /* __cplusplus */
37 typedef struct _EMConfig EMConfig
;
38 typedef struct _EMConfigClass EMConfigClass
;
40 /* Current target description */
41 /* Types of popup tagets */
42 enum _em_config_target_t
{
43 EM_CONFIG_TARGET_FOLDER
,
44 EM_CONFIG_TARGET_PREFS
,
45 EM_CONFIG_TARGET_ACCOUNT
,
48 typedef struct _EMConfigTargetFolder EMConfigTargetFolder
;
49 typedef struct _EMConfigTargetPrefs EMConfigTargetPrefs
;
50 typedef struct _EMConfigTargetAccount EMConfigTargetAccount
;
52 struct _EMConfigTargetFolder
{
55 struct _CamelFolder
*folder
;
59 struct _EMConfigTargetPrefs
{
62 /* preferences are global from gconf */
63 struct _GConfClient
*gconf
;
66 struct _EMConfigTargetAccount
{
69 struct _EAccount
*account
;
70 /* Need also: working account, not just real account, so changes can be propagated around
71 And some mechamism for controlling the gui if we're running inside a druid, e.g. enabling 'next' */
74 typedef struct _EConfigItem EMConfigItem
;
80 struct _EMConfigPrivate
*priv
;
83 struct _EMConfigClass
{
84 EConfigClass config_class
;
87 GType
em_config_get_type(void);
89 EMConfig
*em_config_new(int type
, const char *menuid
);
91 EMConfigTargetFolder
*em_config_target_new_folder(EMConfig
*emp
, struct _CamelFolder
*folder
, const char *uri
);
92 EMConfigTargetPrefs
*em_config_target_new_prefs(EMConfig
*emp
, struct _GConfClient
*gconf
);
93 EMConfigTargetAccount
*em_config_target_new_account(EMConfig
*emp
, struct _EAccount
*account
);
95 /* ********************************************************************** */
97 typedef struct _EMConfigHook EMConfigHook
;
98 typedef struct _EMConfigHookClass EMConfigHookClass
;
100 struct _EMConfigHook
{
104 struct _EMConfigHookClass
{
105 EConfigHookClass hook_class
;
108 GType
em_config_hook_get_type(void);
112 #endif /* __cplusplus */
114 #endif /* __EM_CONFIG_H__ */