8675
|
1 /*
|
|
2 * nmmessage.h
|
|
3 *
|
|
4 * Copyright © 2004 Unpublished Work of Novell, Inc. All Rights Reserved.
|
|
5 *
|
|
6 * THIS WORK IS AN UNPUBLISHED WORK OF NOVELL, INC. NO PART OF THIS WORK MAY BE
|
|
7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED,
|
|
8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED,
|
|
9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL,
|
|
10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT
|
|
11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
|
|
12 *
|
|
13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH
|
|
14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND
|
|
15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY
|
|
16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES
|
|
17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF
|
|
18 * ANYTHING IN THIS NOTICE CONFLICTS WITH THE TERMS OF THE GPL, SUCH TERMS
|
|
19 * PREVAIL.
|
|
20 *
|
|
21 */
|
|
22
|
|
23 #ifndef __NM_MESSAGE_H__
|
|
24 #define __NM_MESSAGE_H__
|
|
25
|
|
26 typedef struct _NMMessage NMMessage;
|
|
27
|
|
28 #include "nmconference.h"
|
|
29
|
|
30 /**
|
|
31 * Creates a new message.
|
|
32 *
|
|
33 * The returned message should be released by calling
|
|
34 * nm_release_message
|
|
35 *
|
|
36 * @param text The message text
|
|
37 * @return A newly allocated message
|
|
38 */
|
|
39 NMMessage *nm_create_message(const char *text);
|
|
40
|
|
41 /**
|
|
42 * Releases a message.
|
|
43 *
|
|
44 * @param msg The message
|
|
45 */
|
|
46 void nm_release_message(NMMessage * msg);
|
|
47
|
|
48 /**
|
|
49 * Returns the message text
|
|
50 *
|
|
51 * @param msg The message
|
|
52 * @return The message text
|
|
53 */
|
|
54 const char *nm_message_get_text(NMMessage * msg);
|
|
55
|
|
56 /**
|
|
57 * Sets the conference object for a message
|
|
58 *
|
|
59 * @param msg The message
|
|
60 * @param conf The conference to associate with the message
|
|
61 * @return RVALUE_OK on success
|
|
62 */
|
|
63 void nm_message_set_conference(NMMessage * msg, NMConference * conf);
|
|
64
|
|
65 /**
|
|
66 * Returns the conference object associated with the message
|
|
67 *
|
|
68 * Note: this does not increment the reference count for the
|
|
69 * conference and the conference should NOT be released with
|
|
70 * nm_release_conference. If the reference needs to be kept
|
|
71 * around nm_conference_add_ref should be called.
|
|
72 *
|
|
73 * @param msg The message
|
|
74 * @return The conference associated with this message
|
|
75 */
|
|
76 NMConference *nm_message_get_conference(NMMessage * msg);
|
|
77
|
|
78 #endif
|