author | hallski <hallski> |
Mon, 26 May 2003 01:32:16 +0000 | |
changeset 4 | 52f92481d8de |
parent 3 | 5c632650c603 |
child 7 | d8eae83450ac |
permissions | -rw-r--r-- |
1 | 1 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
2 |
/* |
|
4
52f92481d8de
2003-04-26 Mikael Hallendal <micke@codefactory.se>
hallski <hallski>
parents:
3
diff
changeset
|
3 |
* Copyright (C) 2003 Mikael Hallendal <micke@codefactory.se> |
1 | 4 |
* Copyright (C) 2003 CodeFactory AB. |
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU Lesser General Public License as |
|
8 |
* published by the Free Software Foundation; either version 2 of the |
|
9 |
* License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program 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 program; if not, write to the |
|
18 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
19 |
* Boston, MA 02111-1307, USA. |
|
20 |
*/ |
|
21 |
||
22 |
#ifndef __LM_MESSAGE_H__ |
|
23 |
#define __LM_MESSAGE_H__ |
|
24 |
||
25 |
#if !defined (LM_INSIDE_LOUDMOUTH_H) && !defined (LM_COMPILATION) |
|
26 |
#error "Only <loudmouth/loudmouth.h> can be included directly, this file may disappear or change contents." |
|
27 |
#endif |
|
28 |
||
29 |
#include <loudmouth/lm-message-node.h> |
|
30 |
||
31 |
typedef struct LmMessagePriv LmMessagePriv; |
|
32 |
||
33 |
typedef struct { |
|
34 |
LmMessageNode *node; |
|
35 |
||
36 |
LmMessagePriv *priv; |
|
37 |
} LmMessage; |
|
38 |
||
39 |
typedef enum { |
|
40 |
LM_MESSAGE_TYPE_MESSAGE, |
|
41 |
LM_MESSAGE_TYPE_PRESENCE, |
|
42 |
LM_MESSAGE_TYPE_IQ, |
|
43 |
LM_MESSAGE_TYPE_STREAM, |
|
44 |
LM_MESSAGE_TYPE_STREAM_ERROR, |
|
45 |
LM_MESSAGE_TYPE_UNKNOWN |
|
46 |
} LmMessageType; |
|
47 |
||
48 |
typedef enum { |
|
49 |
LM_MESSAGE_SUB_TYPE_NOT_SET = -10, |
|
50 |
LM_MESSAGE_SUB_TYPE_NORMAL = -2, |
|
51 |
LM_MESSAGE_SUB_TYPE_AVAILABLE = -1, |
|
52 |
LM_MESSAGE_SUB_TYPE_CHAT = 0, |
|
53 |
LM_MESSAGE_SUB_TYPE_GROUPCHAT, |
|
54 |
LM_MESSAGE_SUB_TYPE_HEADLINE, |
|
55 |
LM_MESSAGE_SUB_TYPE_UNAVAILABLE, |
|
56 |
LM_MESSAGE_SUB_TYPE_PROBE, |
|
57 |
LM_MESSAGE_SUB_TYPE_SUBSCRIBE, |
|
58 |
LM_MESSAGE_SUB_TYPE_UNSUBSCRIBE, |
|
59 |
LM_MESSAGE_SUB_TYPE_SUBSCRIBED, |
|
60 |
LM_MESSAGE_SUB_TYPE_UNSUBSCRIBED, |
|
61 |
LM_MESSAGE_SUB_TYPE_GET, |
|
62 |
LM_MESSAGE_SUB_TYPE_SET, |
|
63 |
LM_MESSAGE_SUB_TYPE_RESULT, |
|
64 |
LM_MESSAGE_SUB_TYPE_ERROR |
|
65 |
} LmMessageSubType; |
|
66 |
||
67 |
LmMessage * lm_message_new (const gchar *to, |
|
68 |
LmMessageType type); |
|
69 |
LmMessage * lm_message_new_with_sub_type (const gchar *to, |
|
70 |
LmMessageType type, |
|
71 |
LmMessageSubType sub_type); |
|
72 |
LmMessageType lm_message_get_type (LmMessage *message); |
|
73 |
LmMessageType lm_message_get_sub_type (LmMessage *message); |
|
74 |
LmMessageNode * lm_message_get_node (LmMessage *message); |
|
75 |
LmMessage * lm_message_ref (LmMessage *message); |
|
76 |
void lm_message_unref (LmMessage *message); |
|
77 |
||
78 |
#endif /* __LM_MESSAGE_H__ */ |