libpurple/protocols/myspace/message.c

branch
soc.2007.msimprpl
changeset 17920
a02176571ee6
parent 17918
eadfbe4e1d64
child 17921
4f908b7c9c41
equal deleted inserted replaced
17919:ae521ade39f1 17920:a02176571ee6
629 { 629 {
630 case MSIM_TYPE_INTEGER: 630 case MSIM_TYPE_INTEGER:
631 return GPOINTER_TO_UINT(elem->data); 631 return GPOINTER_TO_UINT(elem->data);
632 632
633 case MSIM_TYPE_STRING: 633 case MSIM_TYPE_STRING:
634 /* TODO: find out if we need larger integers */
634 return (guint)atoi((gchar *)elem->data); 635 return (guint)atoi((gchar *)elem->data);
635 636
636 default: 637 default:
637 return 0; 638 return 0;
638 } 639 }
639 } 640 }
641
642 /** Return the data of an element of a given name, as a binary GString.
643 *
644 * @return GString * of binary data, or NULL.
645 */
646 GString *msim_msg_get_binary(MsimMessage *msg, gchar *name)
647 {
648 switch (elem->type)
649 {
650 case MSIM_TYPE_BINARY:
651 return (GString *)elem->data;
652
653 default:
654 return NULL;
655 }
656 }

mercurial