~cairo-dock-team/cairo-dock-plug-ins/experimental

« back to all changes in this revision

Viewing changes to mail/src/mailwatch-utils.h

  • Committer: tofe
  • Date: 2008-03-15 10:37:45 UTC
  • Revision ID: svn-v4:620951bb-bb42-0410-82c3-830e739ed170:trunk/plug-ins:644
nouvelle applet mail, basée sur le plugin xfce mailwatch. Pour l'instant, ne gère pas la suppresion de compte mail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  xfce4-mailwatch-plugin - a mail notification applet for the xfce4 panel
 
3
 *  Copyright (c) 2005 Brian Tarricone <bjt23@cornell.edu>
 
4
 *
 
5
 *  This program is free software; you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation; either version 2 of the License ONLY.
 
8
 *
 
9
 *  This program 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 Library General Public License for more details.
 
13
 *
 
14
 *  You should have received a copy of the GNU General Public License
 
15
 *  along with this program; if not, write to the Free Software
 
16
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#ifndef __MAILWATCH_UTILS_H__
 
20
#define __MAILWATCH_UTILS_H__
 
21
 
 
22
#ifdef HAVE_CONFIG_H
 
23
#include <config.h>
 
24
#endif
 
25
 
 
26
#ifdef HAVE_SYS_TYPES_H
 
27
#include <sys/types.h>
 
28
#endif
 
29
 
 
30
#ifdef HAVE_SYS_SOCKET_H
 
31
#include <sys/socket.h>
 
32
#endif
 
33
 
 
34
#ifdef HAVE_NETDB_H
 
35
#include <netdb.h>
 
36
#endif
 
37
 
 
38
#ifdef HAVE_NETINET_IN_H
 
39
#include <netinet/in.h>
 
40
#endif
 
41
 
 
42
#include <gtk/gtk.h>
 
43
 
 
44
#ifdef HAVE_SSL_SUPPORT
 
45
#include <gnutls/gnutls.h>
 
46
#endif
 
47
 
 
48
#define TRACE cd_message
 
49
#define DBG   cd_debug
 
50
 
 
51
G_BEGIN_DECLS
 
52
 
 
53
typedef enum
 
54
{
 
55
    AUTH_NONE = 0,
 
56
    AUTH_SSL_PORT,
 
57
    AUTH_STARTTLS
 
58
} XfceMailwatchAuthType;
 
59
 
 
60
typedef struct
 
61
{
 
62
    gboolean using_tls;
 
63
    gboolean gnutls_inited;
 
64
#ifdef HAVE_SSL_SUPPORT
 
65
    gnutls_session_t gt_session;
 
66
    gnutls_certificate_credentials_t gt_creds;
 
67
#endif
 
68
} XfceMailwatchSecurityInfo;
 
69
 
 
70
gboolean xfce_mailwatch_net_get_sockaddr(const gchar *host, const gchar *service, struct addrinfo *hints, struct sockaddr_in *addr, GError **error);
 
71
gboolean xfce_mailwatch_net_negotiate_tls(gint sockfd, XfceMailwatchSecurityInfo *security_info, const gchar *host, GError **error);
 
72
gssize xfce_mailwatch_net_send(gint sockfd, XfceMailwatchSecurityInfo *security_info, const gchar *buf, GError **error);
 
73
gssize xfce_mailwatch_net_recv(gint sockfd, XfceMailwatchSecurityInfo *security_info, gchar *buf, gsize len, GError **error);
 
74
void xfce_mailwatch_net_tls_teardown(XfceMailwatchSecurityInfo *security_info);
 
75
 
 
76
GtkWidget *xfce_mailwatch_custom_button_new(const gchar *text, const gchar *icon);
 
77
GtkWidget *xfce_mailwatch_create_framebox(const gchar *title, GtkWidget **frame_bin);
 
78
 
 
79
void xfce_textdomain (const gchar *package, const gchar *localedir, const gchar *encoding);
 
80
 
 
81
gint xfce_mailwatch_base64_encode(const guint8 *data, gint size, gchar **str);
 
82
 
 
83
G_END_DECLS
 
84
 
 
85
#endif