The Logger would benifit if TpMessage class had support for delivery report. Currently it's quite hard to access the 'delivery-echo' inside a TpMessage.
Agreed. Especially, I'd really like to have: TpMessage * tp_message_report_get_echo (TpMessage *msg);
I think combined with the already existing _is_delivery_report() this is the only other function we need.
http://telepathy.freedesktop.org/spec/Channel_Interface_Messages.html#Simple-Type:Delivery_Report_Header_Key What do you think about this API: I think it's good to have a common tp_message_delivery_report_* prefix for these functions. TpDeliveryStatus tp_message_delivery_report_get_status (TpMessage *self, GError **error); The error will be constructed using tp_proxy_dbus_error_to_gerror() with the "delivery-dbus-error" and "delivery-error-message" keys. I'm sure if this should be part of get_status() or not. const gchar * tp_message_delivery_report_get_token (TpMessage *self); TpChannelTextSendError tp_message_delivery_report_get_send_error ( TpMessage *self); TpMessage * tp_message_delivery_report_dup_echo (TpMessage *self); It's a _dup and not a _get as it will have to create a new object. TpContact * tp_message_delivery_report_get_sender (TpMessage *self); I find 'sender' a bit confusing but that's what's used in the spec...
(In reply to comment #2) > I think combined with the already existing _is_delivery_report() this is the > only other function we need. Sorry I posted before seeing your message. Don't you think these other functions can be usefull as well? I do need them in Empathy.
Right, I've replied a little too quickly. (In reply to comment #3) > http://telepathy.freedesktop.org/spec/Channel_Interface_Messages.html#Simple-Type:Delivery_Report_Header_Key > > What do you think about this API: > > I think it's good to have a common tp_message_delivery_report_* prefix for > these functions. > > TpDeliveryStatus tp_message_delivery_report_get_status (TpMessage *self, > GError **error); > > The error will be constructed using tp_proxy_dbus_error_to_gerror() with > the "delivery-dbus-error" and "delivery-error-message" keys. > I'm sure if this should be part of get_status() or not. Maybe the gerror should be retrieved along with the send error instead ? > > const gchar * tp_message_delivery_report_get_token (TpMessage *self); This one we need for sure. > TpChannelTextSendError tp_message_delivery_report_get_send_error ( > TpMessage *self); It's a little weird to have this one separated from the GError. Thinking of it, 'm wondering if the GError is not more related to the send error then it is from the status ? > > TpMessage * tp_message_delivery_report_dup_echo (TpMessage *self); > > It's a _dup and not a _get as it will have to create a new object. Not sure this one will be used in the logger, but I guess it could be handy at some point. > > > TpContact * tp_message_delivery_report_get_sender (TpMessage *self); > I find 'sender' a bit confusing but that's what's used in the spec... Yes it is, maybe we could find something better.
(In reply to comment #5) > > TpContact * tp_message_delivery_report_get_sender (TpMessage *self); > > I find 'sender' a bit confusing but that's what's used in the spec... The parameter should be documented to have to be a TpSignalledMessage (because you can't make a TpContact from any other sort). Would this just be a wrapper for tp_signalled_message_get_sender()? It seems reasonable to have a wrapper in the delivery-report namespace to clarify what it means in the context of a delivery report. I'm not sure what the least confusing naming is, though. original_recipient?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/60.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.