Mercurial > pidgin
comparison libpurple/dbus-analyze-functions.py @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | 37c9f6020c35 |
children |
comparison
equal
deleted
inserted
replaced
32671:0e69949b3e61 | 32672:3828a61c44da |
---|---|
27 "purple_conv_placement_set_current_func", | 27 "purple_conv_placement_set_current_func", |
28 | 28 |
29 # Similar to the above: | 29 # Similar to the above: |
30 "purple_account_set_register_callback", | 30 "purple_account_set_register_callback", |
31 "purple_account_unregister", | 31 "purple_account_unregister", |
32 "purple_connection_new_unregister", | 32 |
33 # Similar to the above, again | |
34 "purple_menu_action_new", | |
35 "purple_menu_action_set_callback", | |
36 "purple_menu_action_get_callback", | |
33 | 37 |
34 # These functions are excluded because they involve setting arbitrary | 38 # These functions are excluded because they involve setting arbitrary |
35 # data via pointers for protocols and UIs. This just won't work. | 39 # data via pointers for protocols and UIs. This just won't work. |
36 "purple_blist_get_ui_data", | 40 "purple_blist_get_ui_data", |
37 "purple_blist_set_ui_data", | 41 "purple_blist_set_ui_data", |
489 self.cdecls.append("\t%s *list;" % type[0]); | 493 self.cdecls.append("\t%s *list;" % type[0]); |
490 | 494 |
491 if self.function.name in stringlists: | 495 if self.function.name in stringlists: |
492 self.cdecls.append("\tchar **%s;" % name) | 496 self.cdecls.append("\tchar **%s;" % name) |
493 self.ccode.append("\tlist = %s;" % self.call) | 497 self.ccode.append("\tlist = %s;" % self.call) |
494 self.ccode.append("\t%s = (char **)purple_%s_to_array(list, FALSE, &%s_LEN);" % \ | 498 self.ccode.append("\t%s = (char **)purple_%s_to_array(list, &%s_LEN);" % \ |
495 (name, type[0], name)) | 499 (name, type[0], name)) |
496 self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &%s, %s_LEN" \ | 500 self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &%s, %s_LEN" \ |
497 % (name, name)) | 501 % (name, name)) |
498 if (not (self.function.name in constlists)): | 502 if (not (self.function.name in constlists)): |
499 type_name = type[0].lower()[1:] | 503 type_name = type[0].lower()[1:] |
501 self.ccodeout.append("\tg_%s_free(list);" % type_name) | 505 self.ccodeout.append("\tg_%s_free(list);" % type_name) |
502 self.addouttype("as", name) | 506 self.addouttype("as", name) |
503 else: | 507 else: |
504 self.cdecls.append("\tdbus_int32_t *%s;" % name) | 508 self.cdecls.append("\tdbus_int32_t *%s;" % name) |
505 self.ccode.append("\tlist = %s;" % self.call) | 509 self.ccode.append("\tlist = %s;" % self.call) |
506 self.ccode.append("\t%s = purple_dbusify_%s(list, FALSE, &%s_LEN);" % \ | 510 self.ccode.append("\t%s = purple_dbusify_%s(list, &%s_LEN);" % \ |
507 (name, type[0], name)) | 511 (name, type[0], name)) |
508 if (not (self.function.name in constlists)): | 512 if (not (self.function.name in constlists)): |
509 self.ccode.append("\tg_%s_free(list);" % type[0].lower()[1:]) | 513 self.ccode.append("\tg_%s_free(list);" % type[0].lower()[1:]) |
510 self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, &%s, %s_LEN" \ | 514 self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, &%s, %s_LEN" \ |
511 % (name, name)) | 515 % (name, name)) |