Statistics
| Revision:

root / libsylph / account.h @ 2106

History | View | Annotate | Download (2.3 kB)

1 1 hiro
/*
2 578 hiro
 * LibSylph -- E-Mail client library
3 942 hiro
 * Copyright (C) 1999-2006 Hiroyuki Yamamoto
4 1 hiro
 *
5 578 hiro
 * This library is free software; you can redistribute it and/or
6 578 hiro
 * modify it under the terms of the GNU Lesser General Public
7 578 hiro
 * License as published by the Free Software Foundation; either
8 578 hiro
 * version 2.1 of the License, or (at your option) any later version.
9 1 hiro
 *
10 578 hiro
 * This library is distributed in the hope that it will be useful,
11 1 hiro
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 578 hiro
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 578 hiro
 * Lesser General Public License for more details.
14 1 hiro
 *
15 578 hiro
 * You should have received a copy of the GNU Lesser General Public
16 578 hiro
 * License along with this library; if not, write to the Free Software
17 578 hiro
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 1 hiro
 */
19 1 hiro
20 1 hiro
#ifndef __ACCOUNT_H__
21 1 hiro
#define __ACCOUNT_H__
22 1 hiro
23 1 hiro
#include <glib.h>
24 1 hiro
25 1 hiro
#include "prefs.h"
26 1 hiro
#include "prefs_account.h"
27 1 hiro
#include "folder.h"
28 1 hiro
#include "procmsg.h"
29 1 hiro
30 1 hiro
typedef gint        (*AccountFunc)        (PrefsAccount        *ac_prefs,
31 1 hiro
                                 gpointer         user_data);
32 1 hiro
33 1 hiro
extern PrefsAccount *cur_account;
34 1 hiro
35 1 hiro
void              account_read_config_all        (void);
36 1 hiro
void              account_write_config_all        (void);
37 1 hiro
38 1325 hiro
PrefsAccount *account_get_current_account        (void);
39 1325 hiro
40 1 hiro
PrefsAccount *account_find_from_smtp_server        (const gchar        *address,
41 1 hiro
                                                 const gchar        *smtp_server);
42 1 hiro
PrefsAccount *account_find_from_address                (const gchar        *address);
43 1 hiro
PrefsAccount *account_find_from_id                (gint                 id);
44 1 hiro
PrefsAccount *account_find_from_item                (FolderItem        *item);
45 942 hiro
PrefsAccount *account_find_from_item_property        (FolderItem        *item);
46 1 hiro
PrefsAccount *account_find_from_message_file        (const gchar        *file);
47 1 hiro
PrefsAccount *account_find_from_msginfo                (MsgInfo        *msginfo);
48 1 hiro
49 845 hiro
gboolean      account_address_exist        (const gchar        *address);
50 845 hiro
51 1 hiro
void              account_foreach                (AccountFunc         func,
52 1 hiro
                                         gpointer         user_data);
53 1 hiro
GList             *account_get_list                (void);
54 537 hiro
void              account_list_free                (void);
55 537 hiro
void              account_append                (PrefsAccount        *ac_prefs);
56 1 hiro
57 1 hiro
void              account_set_as_default        (PrefsAccount        *ac_prefs);
58 1 hiro
PrefsAccount *account_get_default        (void);
59 1 hiro
60 537 hiro
//void              account_set_missing_folder(void);
61 1 hiro
FolderItem   *account_get_special_folder(PrefsAccount                *ac_prefs,
62 1 hiro
                                         SpecialFolderItemType         type);
63 1 hiro
64 1 hiro
void              account_destroy                (PrefsAccount        *ac_prefs);
65 1 hiro
66 845 hiro
void              account_updated                (void);
67 845 hiro
68 1 hiro
#endif /* __ACCOUNT_H__ */