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 #include "nmmessage.h"
25 NMConference
*conference
;
34 nm_create_message(const char *text
)
36 NMMessage
*msg
= g_new0(NMMessage
, 1);
39 msg
->text
= g_strdup(text
);
46 nm_message_add_ref(NMMessage
* msg
)
53 nm_release_message(NMMessage
* msg
)
55 if (msg
&& (--(msg
->ref_count
) == 0)) {
59 nm_release_conference(msg
->conference
);
66 nm_message_get_text(NMMessage
* msg
)
75 nm_message_set_conference(NMMessage
* msg
, NMConference
* conf
)
77 if (msg
== NULL
|| conf
== NULL
)
80 /* Need to ref the conference first so that it doesn't
81 * get released out from under us
83 nm_conference_add_ref(conf
);
85 msg
->conference
= conf
;
89 nm_message_get_conference(NMMessage
* msg
)
94 return msg
->conference
;