11980
|
1 #include "status.h"
|
|
2 #include "mono-helper.h"
|
|
3
|
|
4 MonoObject* gaim_status_build_status_object(void* data)
|
|
5 {
|
|
6 MonoObject *obj = NULL;
|
|
7 MonoClass *klass = NULL;
|
|
8
|
|
9 GaimStatus *status = (GaimStatus*)data;
|
|
10
|
|
11 klass = mono_class_from_name(ml_get_api_image(), "Gaim", "Status");
|
|
12 if (!klass) {
|
|
13 gaim_debug(GAIM_DEBUG_FATAL, "mono", "couldn't build the class!\n");
|
|
14 }
|
|
15
|
|
16 obj = mono_object_new(ml_get_domain(), klass);
|
|
17 if (!obj) {
|
|
18 gaim_debug(GAIM_DEBUG_FATAL, "mono", "couldn't create the object!\n");
|
|
19 }
|
|
20
|
|
21 mono_runtime_object_init(obj);
|
|
22
|
|
23 ml_set_prop_string(obj, "Id", (char*)gaim_status_get_id(status));
|
|
24
|
|
25 return obj;
|
|
26 }
|