annotate plugins/mono/loader/blist-glue.c @ 14039:5e6d4c36630a

[gaim-migrate @ 16643] Return g_string_free(str, FALSE) directly instead of assigning str->str to a temporary directory and returning that. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Aug 2006 09:17:09 +0000
parents 8edb08af68c7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 #include <string.h>
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 #include "blist.h"
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 #include "mono-helper.h"
12442
8edb08af68c7 [gaim-migrate @ 14749]
Stu Tomlinson <stu@nosnilmot.com>
parents: 11996
diff changeset
4 #include "mono-glue.h"
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 MonoObject* gaim_blist_get_handle_glue(void)
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 void *handle = gaim_blist_get_handle();
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9
11980
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
10 return mono_value_box(ml_get_domain(), mono_get_intptr_class(), &handle);
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 }
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 MonoObject* gaim_blist_build_buddy_object(void* data)
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 MonoObject *obj = NULL;
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 GaimBuddy *buddy = (GaimBuddy*)data;
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18
11996
ecd33ffb0b0a [gaim-migrate @ 14289]
Gary Kramlich <grim@reaperworld.com>
parents: 11980
diff changeset
19 obj = ml_create_api_object("Buddy");
ecd33ffb0b0a [gaim-migrate @ 14289]
Gary Kramlich <grim@reaperworld.com>
parents: 11980
diff changeset
20 g_return_val_if_fail(obj != NULL, NULL);
ecd33ffb0b0a [gaim-migrate @ 14289]
Gary Kramlich <grim@reaperworld.com>
parents: 11980
diff changeset
21
11980
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
22 ml_set_prop_string(obj, "Name", (char*)gaim_buddy_get_name(buddy));
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
23 ml_set_prop_string(obj, "Alias", (char*)gaim_buddy_get_alias(buddy));
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 return obj;
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 }