libpurple/protocols.c

branch
soc.2013.gobjectification.plugins
changeset 36631
972b9fbb3690
parent 36629
b3db84cfb283
child 36637
9b0109ae118d
equal deleted inserted replaced
36630:ff356949df25 36631:972b9fbb3690
750 g_return_val_if_fail(protocol_type != G_TYPE_INVALID && 750 g_return_val_if_fail(protocol_type != G_TYPE_INVALID &&
751 protocol_type != G_TYPE_NONE, NULL); 751 protocol_type != G_TYPE_NONE, NULL);
752 752
753 protocol = g_object_new(protocol_type, NULL); 753 protocol = g_object_new(protocol_type, NULL);
754 754
755 if (!PURPLE_IS_PROTOCOL(protocol)) {
756 g_set_error(error, PURPLE_PROTOCOLS_DOMAIN, 0,
757 _("Protocol type does not inherit PurpleProtocol"));
758
759 g_object_unref(protocol);
760 return NULL;
761 }
762
763 if (!PURPLE_IS_PROTOCOL_INTERFACE(protocol)) {
764 g_set_error(error, PURPLE_PROTOCOLS_DOMAIN, 0,
765 _("Protocol does not implement PurpleProtocolInterface"));
766
767 g_object_unref(protocol);
768 return NULL;
769 }
770
755 if (!purple_protocol_get_id(protocol)) { 771 if (!purple_protocol_get_id(protocol)) {
756 g_set_error(error, PURPLE_PROTOCOLS_DOMAIN, 0, 772 g_set_error(error, PURPLE_PROTOCOLS_DOMAIN, 0,
757 _("Protocol does not provide an ID")); 773 _("Protocol does not provide an ID"));
758 774
759 g_object_unref(protocol); 775 g_object_unref(protocol);

mercurial