D-Bus  1.6.18
dbus-auth.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-auth.h Authentication
3  *
4  * Copyright (C) 2002 Red Hat Inc.
5  *
6  * Licensed under the Academic Free License version 2.1
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 #ifndef DBUS_AUTH_H
24 #define DBUS_AUTH_H
25 
26 #include <dbus/dbus-macros.h>
27 #include <dbus/dbus-errors.h>
28 #include <dbus/dbus-string.h>
29 #include <dbus/dbus-sysdeps.h>
30 
32 
33 typedef struct DBusAuth DBusAuth;
34 
35 typedef enum
36 {
37  DBUS_AUTH_STATE_WAITING_FOR_INPUT,
38  DBUS_AUTH_STATE_WAITING_FOR_MEMORY,
39  DBUS_AUTH_STATE_HAVE_BYTES_TO_SEND,
40  DBUS_AUTH_STATE_NEED_DISCONNECT,
41  DBUS_AUTH_STATE_AUTHENTICATED
42 } DBusAuthState;
43 
47 void _dbus_auth_unref (DBusAuth *auth);
49  const char **mechanisms);
50 DBusAuthState _dbus_auth_do_work (DBusAuth *auth);
52  const DBusString **str);
54  int bytes_sent);
56  DBusString **buffer);
58  DBusString *buffer,
59  int bytes_read);
61  const DBusString **str);
65  const DBusString *plaintext,
66  DBusString *encoded);
69  const DBusString *encoded,
70  DBusString *plaintext);
75  const DBusString *context);
76 const char* _dbus_auth_get_guid_from_server(DBusAuth *auth);
77 
80 
82 
83 #endif /* DBUS_AUTH_H */