| 219 g_return_val_if_fail(primitive != GAIM_STATUS_UNSET, NULL); |
220 g_return_val_if_fail(primitive != GAIM_STATUS_UNSET, NULL); |
| 220 g_return_val_if_fail(id != NULL, NULL); |
221 g_return_val_if_fail(id != NULL, NULL); |
| 221 g_return_val_if_fail(name != NULL, NULL); |
222 g_return_val_if_fail(name != NULL, NULL); |
| 222 |
223 |
| 223 status_type = g_new0(GaimStatusType, 1); |
224 status_type = g_new0(GaimStatusType, 1); |
| |
225 GAIM_DBUS_REGISTER_POINTER(status_type, GaimStatusType); |
| 224 |
226 |
| 225 status_type->primitive = primitive; |
227 status_type->primitive = primitive; |
| 226 status_type->id = g_strdup(id); |
228 status_type->id = g_strdup(id); |
| 227 status_type->name = g_strdup(name); |
229 status_type->name = g_strdup(name); |
| 228 status_type->saveable = saveable; |
230 status_type->saveable = saveable; |
| 502 g_return_val_if_fail(id != NULL, NULL); |
505 g_return_val_if_fail(id != NULL, NULL); |
| 503 g_return_val_if_fail(name != NULL, NULL); |
506 g_return_val_if_fail(name != NULL, NULL); |
| 504 g_return_val_if_fail(value_type != NULL, NULL); |
507 g_return_val_if_fail(value_type != NULL, NULL); |
| 505 |
508 |
| 506 attr = g_new0(GaimStatusAttr, 1); |
509 attr = g_new0(GaimStatusAttr, 1); |
| |
510 GAIM_DBUS_REGISTER_POINTER(attr, GaimStatusAttr); |
| 507 |
511 |
| 508 attr->id = g_strdup(id); |
512 attr->id = g_strdup(id); |
| 509 attr->name = g_strdup(name); |
513 attr->name = g_strdup(name); |
| 510 attr->value_type = value_type; |
514 attr->value_type = value_type; |
| 511 |
515 |
| 561 |
566 |
| 562 g_return_val_if_fail(status_type != NULL, NULL); |
567 g_return_val_if_fail(status_type != NULL, NULL); |
| 563 g_return_val_if_fail(presence != NULL, NULL); |
568 g_return_val_if_fail(presence != NULL, NULL); |
| 564 |
569 |
| 565 status = g_new0(GaimStatus, 1); |
570 status = g_new0(GaimStatus, 1); |
| |
571 GAIM_DBUS_REGISTER_POINTER(status, GaimStatus); |
| 566 |
572 |
| 567 status->type = status_type; |
573 status->type = status_type; |
| 568 status->presence = presence; |
574 status->presence = presence; |
| 569 |
575 |
| 570 status->attr_values = |
576 status->attr_values = |
| 597 /* TODO: Don't do this is if the status is exclusive */ |
603 /* TODO: Don't do this is if the status is exclusive */ |
| 598 gaim_status_set_active(status, FALSE); |
604 gaim_status_set_active(status, FALSE); |
| 599 |
605 |
| 600 g_hash_table_destroy(status->attr_values); |
606 g_hash_table_destroy(status->attr_values); |
| 601 |
607 |
| |
608 GAIM_DBUS_UNREGISTER_POINTER(status); |
| 602 g_free(status); |
609 g_free(status); |
| 603 } |
610 } |
| 604 |
611 |
| 605 static void |
612 static void |
| 606 notify_buddy_status_update(GaimBuddy *buddy, GaimPresence *presence, |
613 notify_buddy_status_update(GaimBuddy *buddy, GaimPresence *presence, |
| 1064 GaimPresence *presence; |
1071 GaimPresence *presence; |
| 1065 |
1072 |
| 1066 g_return_val_if_fail(context != GAIM_PRESENCE_CONTEXT_UNSET, NULL); |
1073 g_return_val_if_fail(context != GAIM_PRESENCE_CONTEXT_UNSET, NULL); |
| 1067 |
1074 |
| 1068 presence = g_new0(GaimPresence, 1); |
1075 presence = g_new0(GaimPresence, 1); |
| |
1076 GAIM_DBUS_REGISTER_POINTER(presence, GaimPresence); |
| 1069 |
1077 |
| 1070 presence->context = context; |
1078 presence->context = context; |
| 1071 |
1079 |
| 1072 presence->status_table = |
1080 presence->status_table = |
| 1073 g_hash_table_new_full(g_str_hash, g_str_equal, |
1081 g_hash_table_new_full(g_str_hash, g_str_equal, |