author | Frank Zschockelt <lm@freakysoft.de> |
Sat, 11 May 2019 22:25:49 +0200 | |
changeset 738 | 264fece7ff0d |
parent 690 | 7ccf2113ec5f |
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:
84
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 |
|
690
7ccf2113ec5f
Update the postal address of the FSF
Frank Zschockelt <lm@freakysoft.de>
parents:
607
diff
changeset
|
16 |
* License along with this program; if not, see <https://www.gnu.org/licenses> |
1 | 17 |
*/ |
18 |
||
19 |
#ifndef __LM_MESSAGE_HANDLER_H__ |
|
20 |
#define __LM_MESSAGE_HANDLER_H__ |
|
21 |
||
22 |
#if !defined (LM_INSIDE_LOUDMOUTH_H) && !defined (LM_COMPILATION) |
|
23 |
#error "Only <loudmouth/loudmouth.h> can be included directly, this file may disappear or change contents." |
|
24 |
#endif |
|
25 |
||
26 |
#include <loudmouth/lm-connection.h> |
|
27 |
||
101
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
28 |
G_BEGIN_DECLS |
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
29 |
|
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
30 |
/** |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
31 |
* LmHandleMessageFunction: |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
32 |
* @handler: an #LmMessageHandler |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
33 |
* @connection: an #LmConnection |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
34 |
* @message: an #LmMessage |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
35 |
* @user_data: user data set when creating the handler |
607 | 36 |
* |
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
37 |
* The actual callback function in an #LmMessageHandler. This function is called when an incoming message arrives that haven't been handled by an handler with higher priority. |
607 | 38 |
* |
417
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
39 |
* Returns: #LM_HANDLER_RESULT_REMOVE_MESSAGE to indicate that message has been handled, otherwise #LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS. |
364c17252e5f
Added inlined documentation from generated through the Gtk-doc migration script.
Mikael Hallendal <micke@imendio.com>
parents:
101
diff
changeset
|
40 |
*/ |
1 | 41 |
typedef LmHandlerResult (* LmHandleMessageFunction) (LmMessageHandler *handler, |
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
|
42 |
LmConnection *connection, |
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
|
43 |
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
|
44 |
gpointer user_data); |
1 | 45 |
|
46 |
LmMessageHandler *lm_message_handler_new (LmHandleMessageFunction function, |
|
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
|
47 |
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
|
48 |
GDestroyNotify notify); |
19
bb3195f74ac7
2003-07-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
7
diff
changeset
|
49 |
void lm_message_handler_invalidate (LmMessageHandler *handler); |
bb3195f74ac7
2003-07-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
7
diff
changeset
|
50 |
gboolean lm_message_handler_is_valid (LmMessageHandler *handler); |
1 | 51 |
LmMessageHandler *lm_message_handler_ref (LmMessageHandler *handler); |
52 |
void lm_message_handler_unref (LmMessageHandler *handler); |
|
53 |
||
101
a8abfbc8c005
2004-10-22 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents:
99
diff
changeset
|
54 |
G_END_DECLS |
1 | 55 |
|
56 |
#endif /* __LM_MESSAGE_HANDLER_H__ */ |
|
57 |