root / src / mgutils.h @ 1546
History | View | Annotate | Download (2 kB)
| 1 | 1 | hiro | /*
|
|---|---|---|---|
| 2 | 1 | hiro | * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client |
| 3 | 1 | hiro | * Copyright (C) 2001 Match Grun |
| 4 | 1 | hiro | * |
| 5 | 1 | hiro | * This program is free software; you can redistribute it and/or modify |
| 6 | 1 | hiro | * it under the terms of the GNU General Public License as published by |
| 7 | 1 | hiro | * the Free Software Foundation; either version 2 of the License, or |
| 8 | 1 | hiro | * (at your option) any later version. |
| 9 | 1 | hiro | * |
| 10 | 1 | hiro | * This program is distributed in the hope that it will be useful, |
| 11 | 1 | hiro | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | 1 | hiro | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | 1 | hiro | * GNU General Public License for more details. |
| 14 | 1 | hiro | * |
| 15 | 1 | hiro | * You should have received a copy of the GNU General Public License |
| 16 | 1 | hiro | * along with this program; if not, write to the Free Software |
| 17 | 1 | hiro | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | 1 | hiro | */ |
| 19 | 1 | hiro | |
| 20 | 1 | hiro | /*
|
| 21 | 1 | hiro | * General definitions for common address book entries. |
| 22 | 1 | hiro | */ |
| 23 | 1 | hiro | |
| 24 | 1 | hiro | #ifndef __MGUTILS_H__
|
| 25 | 1 | hiro | #define __MGUTILS_H__
|
| 26 | 1 | hiro | |
| 27 | 1 | hiro | #include <stdio.h> |
| 28 | 1 | hiro | #include <glib.h> |
| 29 | 1 | hiro | |
| 30 | 1 | hiro | /* Error codes */
|
| 31 | 1 | hiro | #define MGU_SUCCESS 0 |
| 32 | 1 | hiro | #define MGU_BAD_ARGS -1 |
| 33 | 1 | hiro | #define MGU_NO_FILE -2 |
| 34 | 1 | hiro | #define MGU_OPEN_FILE -3 |
| 35 | 1 | hiro | #define MGU_ERROR_READ -4 |
| 36 | 1 | hiro | #define MGU_EOF -5 |
| 37 | 1 | hiro | #define MGU_OO_MEMORY -6 |
| 38 | 1 | hiro | #define MGU_BAD_FORMAT -7 |
| 39 | 1 | hiro | #define MGU_LDAP_CONNECT -8 |
| 40 | 1 | hiro | #define MGU_LDAP_INIT -9 |
| 41 | 1 | hiro | #define MGU_LDAP_BIND -10 |
| 42 | 1 | hiro | #define MGU_LDAP_SEARCH -11 |
| 43 | 1 | hiro | #define MGU_LDAP_TIMEOUT -12 |
| 44 | 1 | hiro | #define MGU_LDAP_CRITERIA -13 |
| 45 | 1 | hiro | #define MGU_LDAP_NOENTRIES -14 |
| 46 | 1 | hiro | #define MGU_ERROR_WRITE -15 |
| 47 | 1 | hiro | #define MGU_OPEN_DIRECTORY -16 |
| 48 | 1 | hiro | #define MGU_NO_PATH -17 |
| 49 | 1 | hiro | |
| 50 | 1 | hiro | /* Function prototypes */
|
| 51 | 1 | hiro | void mgu_print_list ( GSList *list, FILE *stream );
|
| 52 | 1 | hiro | void mgu_print_dlist ( GList *list, FILE *stream );
|
| 53 | 1 | hiro | void mgu_free_list ( GSList *list );
|
| 54 | 1 | hiro | void mgu_free_dlist ( GList *list );
|
| 55 | 1 | hiro | gchar *mgu_list_coalesce ( GSList *list ); |
| 56 | 1 | hiro | gchar *mgu_error2string ( gint err ); |
| 57 | 1 | hiro | gchar *mgu_replace_string ( gchar *str, const gchar *value );
|
| 58 | 1 | hiro | void mgu_clear_slist ( GSList *list );
|
| 59 | 1 | hiro | void mgu_clear_list ( GList *list );
|
| 60 | 1 | hiro | gchar *mgu_email_check_empty ( gchar *address ); |
| 61 | 1 | hiro | |
| 62 | 1 | hiro | #endif /* __MGUTILS_H__ */ |