~ubuntu-branches/ubuntu/trusty/telepathy-idle/trusty

« back to all changes in this revision

Viewing changes to src/server-tls-manager.h

  • Committer: Package Import Robot
  • Author(s): Simon McVittie
  • Date: 2013-05-01 15:52:26 UTC
  • mfrom: (1.3.6)
  • Revision ID: package-import@ubuntu.com-20130501155226-ttpmql3jetet34iu
Tags: 0.1.16-1
* New upstream release
  - adds support for interactive TLS certificate verification
    (Closes: #706270)
* Add a patch to avoid use of a telepathy-glib 0.20 header, to make
  this easy to backport to wheezy

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * server-tls-manager.h - Header for IdleServerTLSManager
 
3
 * Copyright (C) 2010 Collabora Ltd.
 
4
 * @author Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 */
 
20
 
 
21
#ifndef __IDLE_SERVER_TLS_MANAGER_H__
 
22
#define __IDLE_SERVER_TLS_MANAGER_H__
 
23
 
 
24
#include <glib-object.h>
 
25
#include <telepathy-glib/telepathy-glib.h>
 
26
 
 
27
#include "extensions/extensions.h"
 
28
 
 
29
G_BEGIN_DECLS
 
30
 
 
31
typedef struct _IdleServerTLSManager IdleServerTLSManager;
 
32
typedef struct _IdleServerTLSManagerClass IdleServerTLSManagerClass;
 
33
typedef struct _IdleServerTLSManagerPrivate IdleServerTLSManagerPrivate;
 
34
 
 
35
struct _IdleServerTLSManagerClass {
 
36
  GObjectClass parent_class;
 
37
};
 
38
 
 
39
struct _IdleServerTLSManager {
 
40
  GObject parent;
 
41
  IdleServerTLSManagerPrivate *priv;
 
42
};
 
43
 
 
44
GType idle_server_tls_manager_get_type (void);
 
45
 
 
46
#define IDLE_TYPE_SERVER_TLS_MANAGER \
 
47
  (idle_server_tls_manager_get_type ())
 
48
#define IDLE_SERVER_TLS_MANAGER(obj) \
 
49
  (G_TYPE_CHECK_INSTANCE_CAST((obj), IDLE_TYPE_SERVER_TLS_MANAGER, \
 
50
      IdleServerTLSManager))
 
51
#define IDLE_SERVER_TLS_MANAGER_CLASS(klass) \
 
52
  (G_TYPE_CHECK_CLASS_CAST((klass), IDLE_TYPE_SERVER_TLS_MANAGER, \
 
53
      IdleServerTLSManagerClass))
 
54
#define IDLE_IS_SERVER_TLS_MANAGER(obj) \
 
55
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), IDLE_TYPE_SERVER_TLS_MANAGER))
 
56
#define IDLE_IS_SERVER_TLS_MANAGER_CLASS(klass) \
 
57
  (G_TYPE_CHECK_CLASS_TYPE((klass), IDLE_TYPE_SERVER_TLS_MANAGER))
 
58
#define IDLE_SERVER_TLS_MANAGER_GET_CLASS(obj) \
 
59
  (G_TYPE_INSTANCE_GET_CLASS ((obj), IDLE_TYPE_SERVER_TLS_MANAGER, \
 
60
      IdleServerTLSManagerClass))
 
61
 
 
62
#define IDLE_SERVER_TLS_ERROR idle_server_tls_error_quark ()
 
63
GQuark idle_server_tls_error_quark (void);
 
64
 
 
65
void idle_server_tls_manager_get_rejection_details (
 
66
    IdleServerTLSManager *self,
 
67
    gchar **dbus_error,
 
68
    GHashTable **details,
 
69
    TpConnectionStatusReason *reason);
 
70
 
 
71
void idle_server_tls_manager_verify_async (IdleServerTLSManager *self,
 
72
    GTlsCertificate *certificate,
 
73
    const gchar *peername,
 
74
    GAsyncReadyCallback callback,
 
75
    gpointer user_data);
 
76
 
 
77
gboolean idle_server_tls_manager_verify_finish (IdleServerTLSManager *self,
 
78
    GAsyncResult *result,
 
79
    GError **error);
 
80
 
 
81
G_END_DECLS
 
82
 
 
83
#endif /* #ifndef __IDLE_SERVER_TLS_MANAGER_H__ */