author | Samuel Tesla <stesla@engineyard.com> |
Mon, 09 Mar 2009 18:05:59 -0500 | |
changeset 593 | 2c04915af500 |
parent 529 | 6bb284696153 |
child 607 | e2bd14357c9a |
permissions | -rw-r--r-- |
516
4dd3aa6b83e5
Change the tab width to 4 steps in the emacs headers
Mikael Hallendal <micke@imendio.com>
parents:
515
diff
changeset
|
1 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
1 | 2 |
/* |
99
81e9d035de02
2004-10-05 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
91
diff
changeset
|
3 |
* Copyright (C) 2003 Imendio AB |
1 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU Lesser General Public License as |
|
7 |
* published by the Free Software Foundation; either version 2 of the |
|
8 |
* License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 |
* Lesser General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU Lesser General Public |
|
16 |
* License along with this program; if not, write to the |
|
17 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
18 |
* Boston, MA 02111-1307, USA. |
|
19 |
*/ |
|
20 |
||
21 |
#ifndef __LM_CONNECTION_H__ |
|
22 |
#define __LM_CONNECTION_H__ |
|
23 |
||
24 |
#if !defined (LM_INSIDE_LOUDMOUTH_H) && !defined (LM_COMPILATION) |
|
188
a99cacb7a907
2006-11-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
101
diff
changeset
|
25 |
#error "Only <loudmouth/loudmouth.h> can be included directly, this file may disappear or change contents." |
1 | 26 |
#endif |
27 |
||
68
28203e15de0e
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
66
diff
changeset
|
28 |
#include <loudmouth/lm-message.h> |
66
577d5059b718
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
62
diff
changeset
|
29 |
#include <loudmouth/lm-proxy.h> |
68
28203e15de0e
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
66
diff
changeset
|
30 |
#include <loudmouth/lm-ssl.h> |
1 | 31 |
|
101
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
32 |
G_BEGIN_DECLS |
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
33 |
|
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
34 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
35 |
* LM_CONNECTION: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
36 |
* @o: pointer to cast |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
37 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
38 |
* Convenience macro used to cast a pointer to a #LmConnection. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
39 |
*/ |
1 | 40 |
#define LM_CONNECTION(o) (LmConnection *) o; |
41 |
||
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
42 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
43 |
* LM_CONNECTION_DEFAULT_PORT: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
44 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
45 |
* Default jabber client port. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
46 |
*/ |
1 | 47 |
#define LM_CONNECTION_DEFAULT_PORT 5222 |
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
48 |
|
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
49 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
50 |
* LM_CONNECTION_DEFAULT_PORT_SSL: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
51 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
52 |
* Default jabber client port when using SSL encryption. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
53 |
*/ |
1 | 54 |
#define LM_CONNECTION_DEFAULT_PORT_SSL 5223 |
55 |
||
56 |
typedef struct _LmConnection LmConnection; |
|
57 |
||
58 |
typedef struct LmMessageHandler LmMessageHandler; |
|
59 |
||
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
60 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
61 |
* LmHandlerResult: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
62 |
* @LM_HANDLER_RESULT_REMOVE_MESSAGE: Stop calling message handlers. The message handler returning this declares the message has been handled and should be removed. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
63 |
* @LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS: Return to continue the calling handlers from the handler list. This declares that another handlers should handle the message. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
64 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
65 |
* The return type of an LmMessageHandler. This determines whether more message handlers should be called. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
66 |
*/ |
1 | 67 |
typedef enum { |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
68 |
LM_HANDLER_RESULT_REMOVE_MESSAGE, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
69 |
LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS |
1 | 70 |
} LmHandlerResult; |
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
71 |
|
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
72 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
73 |
* LmHandlerPriority: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
74 |
* @LM_HANDLER_PRIORITY_LAST: Call the handler after all handlers with #NORMAL and #FIRST priority. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
75 |
* @LM_HANDLER_PRIORITY_NORMAL: Called before handlers with priority #LAST and after those with #FIRST. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
76 |
* @LM_HANDLER_PRIORITY_FIRST: These are called before all other handlers. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
77 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
78 |
* Since the handlers decide whether to stop the calling chain with there return values it's sometimes decirable to be able to set priority. For example a handler that only logs all incoming messages and then pass the message on to another handler wants to have priority %LM_HANDLER_PRIORITY_FIRST. An handler that should take all messages that wasn't handled by anything else would want to have priority %LM_HANDLER_PRIORITY_LAST. If several handlers have the same priority nothing can be said about the order the handlers will be called in. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
79 |
*/ |
1 | 80 |
typedef enum { |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
81 |
LM_HANDLER_PRIORITY_LAST = 1, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
82 |
LM_HANDLER_PRIORITY_NORMAL = 2, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
83 |
LM_HANDLER_PRIORITY_FIRST = 3 |
1 | 84 |
} LmHandlerPriority; |
85 |
||
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
86 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
87 |
* LmDisconnectReason: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
88 |
* @LM_DISCONNECT_REASON_OK: * @LM_DISCONNECT_REASON_PING_TIME_OUT: Connection to the server timed out. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
89 |
* @LM_DISCONNECT_REASON_HUP: The socket emitted that the connection was hung up. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
90 |
* @LM_DISCONNECT_REASON_ERROR: A generic error somewhere in the transport layer. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
91 |
* @LM_DISCONNECT_REASON_RESOURCE_CONFLICT: * @LM_DISCONNECT_REASON_INVALID_XML: * @LM_DISCONNECT_REASON_UNKNOWN: An unknown error. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
92 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
93 |
* Sent with #LmDisconnectFunction to describe why a connection was closed. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
94 |
*/ |
1 | 95 |
typedef enum { |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
96 |
LM_DISCONNECT_REASON_OK, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
97 |
LM_DISCONNECT_REASON_PING_TIME_OUT, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
98 |
LM_DISCONNECT_REASON_HUP, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
99 |
LM_DISCONNECT_REASON_ERROR, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
100 |
LM_DISCONNECT_REASON_RESOURCE_CONFLICT, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
101 |
LM_DISCONNECT_REASON_INVALID_XML, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
102 |
LM_DISCONNECT_REASON_UNKNOWN |
1 | 103 |
} LmDisconnectReason; |
104 |
||
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
105 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
106 |
* LmConnectionState: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
107 |
* @LM_CONNECTION_STATE_CLOSED: The connection is closed. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
108 |
* @LM_CONNECTION_STATE_OPENING: The connection is in the process of opening. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
109 |
* @LM_CONNECTION_STATE_OPEN: The connection is open. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
110 |
* @LM_CONNECTION_STATE_AUTHENTICATING: The connection is in the process of authenticating. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
111 |
* @LM_CONNECTION_STATE_AUTHENTICATED: The connection is authenticated and is ready to start sending/receiving messages. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
112 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
113 |
* Describes the current state of an #LmConnection. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
114 |
*/ |
57
6b168a8917f7
2003-12-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
15
diff
changeset
|
115 |
typedef enum { |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
116 |
LM_CONNECTION_STATE_CLOSED, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
117 |
LM_CONNECTION_STATE_OPENING, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
118 |
LM_CONNECTION_STATE_OPEN, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
119 |
LM_CONNECTION_STATE_AUTHENTICATING, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
120 |
LM_CONNECTION_STATE_AUTHENTICATED |
59
ef952e8c114d
2003-12-19 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
57
diff
changeset
|
121 |
} LmConnectionState; |
ef952e8c114d
2003-12-19 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
57
diff
changeset
|
122 |
|
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
123 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
124 |
* LmResultFunction: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
125 |
* @connection: an #LmConnection |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
126 |
* @success: the result, %TRUE if operation succeeded, otherwise %FALSE |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
127 |
* @user_data: User data passed when function being called. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
128 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
129 |
* Callback for informing if an asynchronous operation was successful. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
130 |
*/ |
57
6b168a8917f7
2003-12-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
15
diff
changeset
|
131 |
typedef void (* LmResultFunction) (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
132 |
gboolean success, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
133 |
gpointer user_data); |
57
6b168a8917f7
2003-12-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
15
diff
changeset
|
134 |
|
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
135 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
136 |
* LmDisconnectFunction: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
137 |
* @connection: an #LmConnection |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
138 |
* @reason: the reason the connection was closed. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
139 |
* @user_data: User data passed when function being called. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
140 |
* |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
141 |
* Callback called when a connection is closed. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
415
diff
changeset
|
142 |
*/ |
529 | 143 |
typedef void (* LmDisconnectFunction) (LmConnection *connection, |
144 |
LmDisconnectReason reason, |
|
145 |
gpointer user_data); |
|
57
6b168a8917f7
2003-12-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
15
diff
changeset
|
146 |
|
1 | 147 |
LmConnection *lm_connection_new (const gchar *server); |
82
a32b54e654e2
2004-03-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
70
diff
changeset
|
148 |
LmConnection *lm_connection_new_with_context (const gchar *server, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
149 |
GMainContext *context); |
1 | 150 |
gboolean lm_connection_open (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
151 |
LmResultFunction function, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
152 |
gpointer user_data, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
153 |
GDestroyNotify notify, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
154 |
GError **error); |
57
6b168a8917f7
2003-12-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
15
diff
changeset
|
155 |
|
1 | 156 |
gboolean lm_connection_open_and_block (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
157 |
GError **error); |
1 | 158 |
|
90
3f4b38614416
2004-08-25 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
89
diff
changeset
|
159 |
void lm_connection_cancel_open (LmConnection *connection); |
1 | 160 |
gboolean lm_connection_close (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
161 |
GError **error); |
1 | 162 |
gboolean lm_connection_authenticate (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
163 |
const gchar *username, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
164 |
const gchar *password, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
165 |
const gchar *resource, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
166 |
LmResultFunction function, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
167 |
gpointer user_data, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
168 |
GDestroyNotify notify, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
169 |
GError **error); |
1 | 170 |
gboolean |
171 |
lm_connection_authenticate_and_block (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
172 |
const gchar *username, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
173 |
const gchar *password, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
174 |
const gchar *resource, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
175 |
GError **error); |
394
03933ba2fb40
Added lm_connection_get_keep_alive.
Mikael Hallendal <micke@imendio.com>
parents:
332
diff
changeset
|
176 |
guint lm_connection_get_keep_alive_rate (LmConnection *connection); |
90
3f4b38614416
2004-08-25 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
89
diff
changeset
|
177 |
void lm_connection_set_keep_alive_rate (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
178 |
guint rate); |
90
3f4b38614416
2004-08-25 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
89
diff
changeset
|
179 |
|
1 | 180 |
gboolean lm_connection_is_open (LmConnection *connection); |
181 |
gboolean lm_connection_is_authenticated (LmConnection *connection); |
|
182 |
||
183 |
const gchar * lm_connection_get_server (LmConnection *connection); |
|
184 |
void lm_connection_set_server (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
185 |
const gchar *server); |
89
e756a937e540
2004-08-09 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
87
diff
changeset
|
186 |
void lm_connection_set_jid (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
187 |
const gchar *jid); |
89
e756a937e540
2004-08-09 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
87
diff
changeset
|
188 |
const gchar * lm_connection_get_jid (LmConnection *connection); |
307
f169e9281745
Rename lm_conn_get_effective_jid() to lm_conn_get_full_jid() to
Senko Rasic <senko.rasic@collabora.co.uk>
parents:
306
diff
changeset
|
189 |
gchar * lm_connection_get_full_jid (LmConnection *connection); |
1 | 190 |
|
191 |
guint lm_connection_get_port (LmConnection *connection); |
|
192 |
void lm_connection_set_port (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
193 |
guint port); |
57
6b168a8917f7
2003-12-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
15
diff
changeset
|
194 |
|
68
28203e15de0e
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
66
diff
changeset
|
195 |
LmSSL * lm_connection_get_ssl (LmConnection *connection); |
28203e15de0e
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
66
diff
changeset
|
196 |
void lm_connection_set_ssl (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
197 |
LmSSL *ssl); |
66
577d5059b718
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
62
diff
changeset
|
198 |
LmProxy * lm_connection_get_proxy (LmConnection *connection); |
577d5059b718
2004-01-15 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
62
diff
changeset
|
199 |
void lm_connection_set_proxy (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
200 |
LmProxy *proxy); |
1 | 201 |
gboolean lm_connection_send (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
202 |
LmMessage *message, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
203 |
GError **error); |
1 | 204 |
gboolean lm_connection_send_with_reply (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
205 |
LmMessage *message, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
206 |
LmMessageHandler *handler, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
207 |
GError **error); |
1 | 208 |
LmMessage * |
209 |
lm_connection_send_with_reply_and_block (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
210 |
LmMessage *message, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
211 |
GError **error); |
1 | 212 |
void |
213 |
lm_connection_register_message_handler (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
214 |
LmMessageHandler *handler, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
215 |
LmMessageType type, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
216 |
LmHandlerPriority priority); |
1 | 217 |
void |
218 |
lm_connection_unregister_message_handler (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
219 |
LmMessageHandler *handler, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
220 |
LmMessageType type); |
1 | 221 |
void |
222 |
lm_connection_set_disconnect_function (LmConnection *connection, |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
223 |
LmDisconnectFunction function, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
224 |
gpointer user_data, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
225 |
GDestroyNotify notify); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
226 |
|
1 | 227 |
gboolean lm_connection_send_raw (LmConnection *connection, |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
228 |
const gchar *str, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
229 |
GError **error); |
59
ef952e8c114d
2003-12-19 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
57
diff
changeset
|
230 |
LmConnectionState lm_connection_get_state (LmConnection *connection); |
308
7e2050a6df75
Added lm_connection_get_client_host (forward-port from LM1.2).
Senko Rasic <senko.rasic@collabora.co.uk>
parents:
307
diff
changeset
|
231 |
gchar * lm_connection_get_local_host (LmConnection *connection); |
1 | 232 |
LmConnection* lm_connection_ref (LmConnection *connection); |
233 |
void lm_connection_unref (LmConnection *connection); |
|
234 |
||
101
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
235 |
G_END_DECLS |
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
236 |
|
1 | 237 |
#endif /* __LM_CONNECTION_H__ */ |