4 * Copyright (c) 2004 Novell, Inc. All Rights Reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
21 #ifndef PURPLE_NOVELL_NMMESSAGE_H
22 #define PURPLE_NOVELL_NMMESSAGE_H
24 typedef struct _NMMessage NMMessage
;
26 #include "nmconference.h"
29 * Creates a new message.
31 * The returned message should be released by calling
34 * @param text The message text
35 * @return A newly allocated message
37 NMMessage
*nm_create_message(const char *text
);
40 * Increment the reference count for the message object.
42 * @param msg The message
44 void nm_message_add_ref(NMMessage
* msg
);
49 * @param msg The message
51 void nm_release_message(NMMessage
* msg
);
54 * Returns the message text
56 * @param msg The message
57 * @return The message text
59 const char *nm_message_get_text(NMMessage
* msg
);
62 * Sets the conference object for a message
64 * @param msg The message
65 * @param conf The conference to associate with the message
66 * @return RVALUE_OK on success
68 void nm_message_set_conference(NMMessage
* msg
, NMConference
* conf
);
71 * Returns the conference object associated with the message
73 * Note: this does not increment the reference count for the
74 * conference and the conference should NOT be released with
75 * nm_release_conference. If the reference needs to be kept
76 * around nm_conference_add_ref should be called.
78 * @param msg The message
79 * @return The conference associated with this message
81 NMConference
*nm_message_get_conference(NMMessage
* msg
);
83 #endif /* PURPLE_NOVELL_NMMESSAGE_H */