Summary: | Debug output should include user-readable enum names | ||
---|---|---|---|
Product: | Telepathy | Reporter: | David Laban <david.laban> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED MOVED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | david.laban |
Version: | git master | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.collabora.com/git/user/alsuren/telepathy-glib.git/log/?h=human-readable-enums | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
David Laban
2011-05-31 18:11:21 UTC
I still think generating GEnum from the spec is a bad idea, because: * expected behaviour for using ((MyThreeItemEnum) 4) is a crash, but we shouldn't be remotely-crashable, and we can receive any out-of-range value from D-Bus * dbus-glib doesn't deal with GEnum, only guint, so you still have to use an unexpected G_TYPE_UINT Generating "stringify" functions (tp_foo_to_string()?) would be fine, though. > Generating "stringify" functions (tp_foo_to_string()?) would be fine, though.
Okay... How should I deal with out of range values? Keep a cache of the form {53: "Unknown Value: 53"} or just blindly return "Unknown Value" for everything and make the person doing the debugging always include both the number and the string in their printf formats?
It would be quite important to return a const gchar * unless you know of a printf function that can be told to free strings that it's passed with capital %S or something (That would be quite awesome actually. Maybe I should write it)
==== Scope Summary ==== I decided not to try converting the error code from GErrors into strings, because that would require excessive magic. I think the following pattern is as good as you can get for formatting a GError. telepathy-glib/account.c:339: s = g_strdup_printf ("TpAccount was invalidated: %s #%u: %s", telepathy-glib/account.c-340- g_quark_to_string (domain), code, message); There were a few things that would be pointless to change because it would always print "Unrecognised Value". This included pretty much anything in a "default:" block, like: examples/cm/callable/media-channel.c:610: "Stream direction %u is not valid", stream_direction); there are a few things that I didn't change because it would require making _tp_enum_to_nick public (I've listed them here in case you want me to make it public): examples/client/extended-client.c:195: g_message ("Connection status changed to %u because %u", status, reason); examples/client/inspect-channel.c:48: printf ("Handle: of type %u, #%u\n", handle_type, handle); examples/client/inspect-connection.c:39: printf ("\tHandle: type %u, #%u\n", There are a few places where bools are formatted as %u that annoyed me (should really be %s and bool ? "true": "false") but I didn't change them: telepathy-glib/base-connection.c:870: "handle=%u, suppress_handler=%u", request, request->channel_type, telepathy-glib/base-connection.c:977: "handle_type=%u, handle=%u, suppress_handler=%u", ==== Buildsystem Problems ==== I get a lot of noise from g-ir-scanner, but I think that all it is is noise. If someone with g-ir knowledge could confirm this, that would be quite useful: /usr/bin/g-ir-scanner -v \ --namespace TelepathyGLib \ --nsversion=0.12 \ --identifier-prefix=Tp \ -I.. \ -I.. \ --include=GLib-2.0 \ --include=Gio-2.0 \ --libtool="../libtool" \ --library=libtelepathy-glib.la \ --pkg gio-2.0 \ --pkg dbus-glib-1 \ --pkg-export telepathy-glib \ --c-include="telepathy-glib/telepathy-glib.h" \ --warn-all \ --output _gen/TelepathyGLib-0.12.gir.tmp \ ./proxy.c _gen/proxy-introspectable.h ./account.c ./account.h ./account-channel-request.c ./account-channel-request.h ./account-manager.c ./account-manager.h ./automatic-proxy-factory.c ./automatic-proxy-factory.h ./basic-proxy-factory.c ./basic-proxy-factory.h ./client-channel-factory.c ./client-channel-factory.h ./connection.c ./connection.h ./connection-handles.c ./connection-contact-info.c ./protocol.c ./protocol.h ./connection-manager.c ./connection-manager.h ./channel.c ./channel.h ./handle.c ./handle.h ./handle-channels-context.c ./handle-channels-context.h ./dbus-daemon.c ./dbus-daemon.h ./interfaces.c ./intset.c ./intset.h ./dbus.c ./dbus.h ./capabilities.c ./capabilities.h ./contact.c ./contact.h ./contact-search.c ./contact-search.h ./contact-search-result.c ./contact-search-result.h ./defs.h ./debug.c ./debug.h ./base-client.c ./base-client.h ./simple-approver.c ./simple-approver.h ./simple-handler.c ./simple-handler.h ./simple-observer.c ./simple-observer.h ./dbus-properties-mixin.c ./dbus-properties-mixin.h ./contacts-mixin.c ./contacts-mixin.h ./group-mixin.c ./group-mixin.h ./presence-mixin.c ./presence-mixin.h ./channel-dispatch-operation.c ./channel-dispatch-operation.h ./channel-request.c ./channel-request.h ./observe-channels-context.c ./observe-channels-context.h ./add-dispatch-operation-context.c ./add-dispatch-operation-context.h ./protocol.c ./protocol.h ./base-connection.c ./base-connection.h ./handle-repo.c ./handle-repo.h ./handle-set.c ./stream-tube-channel.c ./stream-tube-channel.h ./stream-tube-connection.c ./stream-tube-connection.h ./text-channel.c ./text-channel.h ./client-message.c ./client-message.h ./message.c ./message.h ./signalled-message.c ./signalled-message.h ./errors.c ./errors.h _gen/telepathy-enums.h _gen/telepathy-interfaces.h _gen/proxy-introspectable.h:56: Warning: TelepathyGLib: symbol='NUM_TP_DBUS_ERRORS': Unknown namespace for symbol 'NUM_TP_DBUS_ERRORS' account-manager.h:100: Warning: TelepathyGLib: symbol='MC5_BUS_NAME': Unknown namespace for symbol 'MC5_BUS_NAME' protocol.h:1227: Warning: TelepathyGLib: symbol='PROTOCOL_PREFIX_LEN': Unknown namespace for symbol 'PROTOCOL_PREFIX_LEN' protocol.h:1227: Warning: TelepathyGLib: symbol='PROTOCOL_PREFIX_LEN': Unknown namespace for symbol 'PROTOCOL_PREFIX_LEN' _gen/telepathy-enums.h:28: Warning: TelepathyGLib: symbol='NUM_TP_HANDLE_TYPES': Unknown namespace for symbol 'NUM_TP_HANDLE_TYPES' _gen/telepathy-enums.h:35: Warning: TelepathyGLib: symbol='NUM_TP_CONNECTION_STATUSES': Unknown namespace for symbol 'NUM_TP_CONNECTION_STATUSES' _gen/telepathy-enums.h:56: Warning: TelepathyGLib: symbol='NUM_TP_CONNECTION_STATUS_REASONS': Unknown namespace for symbol 'NUM_TP_CONNECTION_STATUS_REASONS' _gen/telepathy-enums.h:93: Warning: TelepathyGLib: symbol='NUM_TP_CONTACT_LIST_STATES': Unknown namespace for symbol 'NUM_TP_CONTACT_LIST_STATES' _gen/telepathy-enums.h:102: Warning: TelepathyGLib: symbol='NUM_TP_SUBSCRIPTION_STATES': Unknown namespace for symbol 'NUM_TP_SUBSCRIPTION_STATES' _gen/telepathy-enums.h:110: Warning: TelepathyGLib: symbol='NUM_TP_CONTACT_METADATA_STORAGE_TYPES': Unknown namespace for symbol 'NUM_TP_CONTACT_METADATA_STORAGE_TYPES' _gen/telepathy-enums.h:123: Warning: TelepathyGLib: symbol='NUM_TP_CONNECTION_PRESENCE_TYPES': Unknown namespace for symbol 'NUM_TP_CONNECTION_PRESENCE_TYPES' _gen/telepathy-enums.h:134: Warning: TelepathyGLib: symbol='NUM_TP_ACCESS_CONTROL_TYPES': Unknown namespace for symbol 'NUM_TP_ACCESS_CONTROL_TYPES' _gen/telepathy-enums.h:142: Warning: TelepathyGLib: symbol='NUM_TP_RICH_PRESENCE_ACCESS_CONTROL_TYPES': Unknown namespace for symbol 'NUM_TP_RICH_PRESENCE_ACCESS_CONTROL_TYPES' _gen/telepathy-enums.h:153: Warning: TelepathyGLib: symbol='NUM_TP_SERVICE_POINT_TYPES': Unknown namespace for symbol 'NUM_TP_SERVICE_POINT_TYPES' _gen/telepathy-enums.h:168: Warning: TelepathyGLib: symbol='NUM_TP_HTTP_METHODS': Unknown namespace for symbol 'NUM_TP_HTTP_METHODS' _gen/telepathy-enums.h:177: Warning: TelepathyGLib: symbol='NUM_TP_CHANNEL_CONTACT_SEARCH_STATES': Unknown namespace for symbol 'NUM_TP_CHANNEL_CONTACT_SEARCH_STATES' _gen/telepathy-enums.h:187: Warning: TelepathyGLib: symbol='NUM_TP_FILE_TRANSFER_STATES': Unknown namespace for symbol 'NUM_TP_FILE_TRANSFER_STATES' _gen/telepathy-enums.h:197: Warning: TelepathyGLib: symbol='NUM_TP_FILE_TRANSFER_STATE_CHANGE_REASONS': Unknown namespace for symbol 'NUM_TP_FILE_TRANSFER_STATE_CHANGE_REASONS' _gen/telepathy-enums.h:205: Warning: TelepathyGLib: symbol='NUM_TP_FILE_HASH_TYPES': Unknown namespace for symbol 'NUM_TP_FILE_HASH_TYPES' _gen/telepathy-enums.h:211: Warning: TelepathyGLib: symbol='NUM_TP_MEDIA_STREAM_TYPES': Unknown namespace for symbol 'NUM_TP_MEDIA_STREAM_TYPES' _gen/telepathy-enums.h:218: Warning: TelepathyGLib: symbol='NUM_TP_MEDIA_STREAM_STATES': Unknown namespace for symbol 'NUM_TP_MEDIA_STREAM_STATES' _gen/telepathy-enums.h:226: Warning: TelepathyGLib: symbol='NUM_TP_MEDIA_STREAM_DIRECTIONS': Unknown namespace for symbol 'NUM_TP_MEDIA_STREAM_DIRECTIONS' _gen/telepathy-enums.h:250: Warning: TelepathyGLib: symbol='NUM_TP_CHANNEL_TEXT_SEND_ERRORS': Unknown namespace for symbol 'NUM_TP_CHANNEL_TEXT_SEND_ERRORS' _gen/telepathy-enums.h:259: Warning: TelepathyGLib: symbol='NUM_TP_CHANNEL_TEXT_MESSAGE_TYPES': Unknown namespace for symbol 'NUM_TP_CHANNEL_TEXT_MESSAGE_TYPES' _gen/telepathy-enums.h:272: Warning: TelepathyGLib: symbol='NUM_TP_TUBE_TYPES': Unknown namespace for symbol 'NUM_TP_TUBE_TYPES' _gen/telepathy-enums.h:279: Warning: TelepathyGLib: symbol='NUM_TP_TUBE_STATES': Unknown namespace for symbol 'NUM_TP_TUBE_STATES' _gen/telepathy-enums.h:297: Warning: TelepathyGLib: symbol='NUM_TP_CHANNEL_CHAT_STATES': Unknown namespace for symbol 'NUM_TP_CHANNEL_CHAT_STATES' _gen/telepathy-enums.h:317: Warning: TelepathyGLib: symbol='NUM_TP_DTMF_EVENTS': Unknown namespace for symbol 'NUM_TP_DTMF_EVENTS' _gen/telepathy-enums.h:350: Warning: TelepathyGLib: symbol='NUM_TP_CHANNEL_GROUP_CHANGE_REASONS': Unknown namespace for symbol 'NUM_TP_CHANNEL_GROUP_CHANGE_REASONS' _gen/telepathy-enums.h:358: Warning: TelepathyGLib: symbol='NUM_TP_LOCAL_HOLD_STATES': Unknown namespace for symbol 'NUM_TP_LOCAL_HOLD_STATES' _gen/telepathy-enums.h:365: Warning: TelepathyGLib: symbol='NUM_TP_LOCAL_HOLD_STATE_REASONS': Unknown namespace for symbol 'NUM_TP_LOCAL_HOLD_STATE_REASONS' _gen/telepathy-enums.h:387: Warning: TelepathyGLib: symbol='NUM_TP_DELIVERY_STATUSES': Unknown namespace for symbol 'NUM_TP_DELIVERY_STATUSES' _gen/telepathy-enums.h:404: Warning: TelepathyGLib: symbol='NUM_TP_SASL_ABORT_REASONS': Unknown namespace for symbol 'NUM_TP_SASL_ABORT_REASONS' _gen/telepathy-enums.h:415: Warning: TelepathyGLib: symbol='NUM_TP_SASL_STATUSES': Unknown namespace for symbol 'NUM_TP_SASL_STATUSES' _gen/telepathy-enums.h:423: Warning: TelepathyGLib: symbol='NUM_TP_TUBE_CHANNEL_STATES': Unknown namespace for symbol 'NUM_TP_TUBE_CHANNEL_STATES' _gen/telepathy-enums.h:431: Warning: TelepathyGLib: symbol='NUM_TP_SOCKET_ADDRESS_TYPES': Unknown namespace for symbol 'NUM_TP_SOCKET_ADDRESS_TYPES' _gen/telepathy-enums.h:439: Warning: TelepathyGLib: symbol='NUM_TP_SOCKET_ACCESS_CONTROLS': Unknown namespace for symbol 'NUM_TP_SOCKET_ACCESS_CONTROLS' _gen/telepathy-enums.h:451: Warning: TelepathyGLib: symbol='NUM_TP_MEDIA_STREAM_ERRORS': Unknown namespace for symbol 'NUM_TP_MEDIA_STREAM_ERRORS' _gen/telepathy-enums.h:457: Warning: TelepathyGLib: symbol='NUM_TP_MEDIA_STREAM_BASE_PROTOS': Unknown namespace for symbol 'NUM_TP_MEDIA_STREAM_BASE_PROTOS' _gen/telepathy-enums.h:464: Warning: TelepathyGLib: symbol='NUM_TP_MEDIA_STREAM_TRANSPORT_TYPES': Unknown namespace for symbol 'NUM_TP_MEDIA_STREAM_TRANSPORT_TYPES' _gen/telepathy-enums.h:486: Warning: TelepathyGLib: symbol='NUM_TP_DEBUG_LEVELS': Unknown namespace for symbol 'NUM_TP_DEBUG_LEVELS' _gen/telepathy-enums.h:493: Warning: TelepathyGLib: symbol='NUM_TP_TLS_CERTIFICATE_STATES': Unknown namespace for symbol 'NUM_TP_TLS_CERTIFICATE_STATES' _gen/telepathy-interfaces.h:507: Warning: TelepathyGLib: symbol='NUM_TP_TLS_CERTIFICATE_REJECT_REASONS': Unknown namespace for symbol 'NUM_TP_TLS_CERTIFICATE_REJECT_REASONS' I also get the following about my unused types: make check-local make[3]: Entering directory `/home/alsuren/src/telepathy-glib/docs/reference' 0 symbols incomplete. 0 not documented. TP_TYPE_ACCESS_CONTROL_TYPE TP_TYPE_ANONYMITY_MODE_FLAGS TP_TYPE_CHANNEL_CALL_STATE_FLAGS TP_TYPE_CHANNEL_CHAT_STATE TP_TYPE_CHANNEL_CONTACT_SEARCH_STATE TP_TYPE_CHANNEL_GROUP_CHANGE_REASON TP_TYPE_CHANNEL_GROUP_FLAGS TP_TYPE_CHANNEL_MEDIA_CAPABILITIES TP_TYPE_CHANNEL_PASSWORD_FLAGS TP_TYPE_CHANNEL_TEXT_MESSAGE_FLAGS TP_TYPE_CHANNEL_TEXT_MESSAGE_TYPE TP_TYPE_CHANNEL_TEXT_SEND_ERROR TP_TYPE_CONNECTION_ALIAS_FLAGS TP_TYPE_CONNECTION_CAPABILITY_FLAGS TP_TYPE_CONNECTION_PRESENCE_TYPE TP_TYPE_CONNECTION_STATUS TP_TYPE_CONNECTION_STATUS_REASON TP_TYPE_CONN_MGR_PARAM_FLAGS TP_TYPE_CONTACT_BLOCKING_CAPABILITIES TP_TYPE_CONTACT_INFO_FIELD_FLAGS TP_TYPE_CONTACT_INFO_FLAGS TP_TYPE_CONTACT_LIST_STATE TP_TYPE_CONTACT_METADATA_STORAGE_TYPE TP_TYPE_DEBUG_LEVEL TP_TYPE_DELIVERY_REPORTING_SUPPORT_FLAGS TP_TYPE_DELIVERY_STATUS TP_TYPE_DTMF_EVENT TP_TYPE_FILE_HASH_TYPE TP_TYPE_FILE_TRANSFER_STATE TP_TYPE_FILE_TRANSFER_STATE_CHANGE_REASON TP_TYPE_HANDLE_TYPE TP_TYPE_HTTP_METHOD TP_TYPE_LOCAL_HOLD_STATE TP_TYPE_LOCAL_HOLD_STATE_REASON TP_TYPE_LOCATION_FEATURES TP_TYPE_MAIL_NOTIFICATION_FLAGS TP_TYPE_MEDIA_STREAM_BASE_PROTO TP_TYPE_MEDIA_STREAM_DIRECTION TP_TYPE_MEDIA_STREAM_ERROR TP_TYPE_MEDIA_STREAM_PENDING_SEND TP_TYPE_MEDIA_STREAM_STATE TP_TYPE_MEDIA_STREAM_TRANSPORT_TYPE TP_TYPE_MEDIA_STREAM_TYPE TP_TYPE_MESSAGE_PART_SUPPORT_FLAGS TP_TYPE_MESSAGE_SENDING_FLAGS TP_TYPE_PROPERTY_FLAGS TP_TYPE_RICH_PRESENCE_ACCESS_CONTROL_TYPE TP_TYPE_SASL_ABORT_REASON TP_TYPE_SASL_STATUS TP_TYPE_SERVICE_POINT_TYPE TP_TYPE_SOCKET_ACCESS_CONTROL TP_TYPE_SOCKET_ADDRESS_TYPE TP_TYPE_STORAGE_RESTRICTION_FLAGS TP_TYPE_SUBSCRIPTION_STATE TP_TYPE_TLS_CERTIFICATE_REJECT_REASON TP_TYPE_TLS_CERTIFICATE_STATE TP_TYPE_TUBE_CHANNEL_STATE TP_TYPE_TUBE_STATE TP_TYPE_TUBE_TYPE tp_access_control_type_get_type tp_anonymity_mode_flags_get_type tp_channel_call_state_flags_get_type tp_channel_chat_state_get_type tp_channel_contact_search_state_get_type tp_channel_group_change_reason_get_type tp_channel_group_flags_get_type tp_channel_media_capabilities_get_type tp_channel_password_flags_get_type tp_channel_text_message_flags_get_type tp_channel_text_message_type_get_type tp_channel_text_send_error_get_type tp_conn_mgr_param_flags_get_type tp_connection_alias_flags_get_type tp_connection_capability_flags_get_type tp_connection_presence_type_get_type tp_connection_status_get_type tp_connection_status_reason_get_type tp_contact_blocking_capabilities_get_type tp_contact_info_field_flags_get_type tp_contact_info_flags_get_type tp_contact_list_state_get_type tp_contact_metadata_storage_type_get_type tp_debug_level_get_type tp_delivery_reporting_support_flags_get_type tp_delivery_status_get_type tp_dtmf_event_get_type tp_file_hash_type_get_type tp_file_transfer_state_change_reason_get_type tp_file_transfer_state_get_type tp_handle_type_get_type tp_http_method_get_type tp_local_hold_state_get_type tp_local_hold_state_reason_get_type tp_location_features_get_type tp_mail_notification_flags_get_type tp_media_stream_base_proto_get_type tp_media_stream_direction_get_type tp_media_stream_error_get_type tp_media_stream_pending_send_get_type tp_media_stream_state_get_type tp_media_stream_transport_type_get_type tp_media_stream_type_get_type tp_message_part_support_flags_get_type tp_message_sending_flags_get_type tp_property_flags_get_type tp_rich_presence_access_control_type_get_type tp_sasl_abort_reason_get_type tp_sasl_status_get_type tp_service_point_type_get_type tp_socket_access_control_get_type tp_socket_address_type_get_type tp_storage_restriction_flags_get_type tp_subscription_state_get_type tp_tls_certificate_reject_reason_get_type tp_tls_certificate_state_get_type tp_tube_channel_state_get_type tp_tube_state_get_type tp_tube_type_get_type ^^^ Unused symbols Documentation check failed make[3]: *** [check-local] Error 1 Do I need to add these to a .abi file somewhere? (note that I currently only use TP_TYPE_CONNECTION_STATUS, TP_TYPE_CONNECTION_STATUS_REASON and TP_TYPE_HANDLE_TYPE) (In reply to comment #3) > _gen/telepathy-enums.h:28: Warning: TelepathyGLib: > symbol='NUM_TP_HANDLE_TYPES': Unknown namespace for symbol > 'NUM_TP_HANDLE_TYPES' These aren't new. It's because g-i doesn't understand that NUM_TP_DBUS_ERRORS is in the TP_ namespace (which is reasonable); it'd prefer them to be TP_NUM_DBUS_ERRORS. > I also get the following about my unused types: > > TP_TYPE_ACCESS_CONTROL_TYPE > TP_TYPE_ANONYMITY_MODE_FLAGS > TP_TYPE_CHANNEL_CALL_STATE_FLAGS > TP_TYPE_CHANNEL_CHAT_STATE > TP_TYPE_CHANNEL_CONTACT_SEARCH_STATE > TP_TYPE_CHANNEL_GROUP_CHANGE_REASON > TP_TYPE_CHANNEL_GROUP_FLAGS > TP_TYPE_CHANNEL_MEDIA_CAPABILITIES > TP_TYPE_CHANNEL_PASSWORD_FLAGS > TP_TYPE_CHANNEL_TEXT_MESSAGE_FLAGS > TP_TYPE_CHANNEL_TEXT_MESSAGE_TYPE > TP_TYPE_CHANNEL_TEXT_SEND_ERROR > TP_TYPE_CONNECTION_ALIAS_FLAGS > TP_TYPE_CONNECTION_CAPABILITY_FLAGS > TP_TYPE_CONNECTION_PRESENCE_TYPE > TP_TYPE_CONNECTION_STATUS > TP_TYPE_CONNECTION_STATUS_REASON > TP_TYPE_CONN_MGR_PARAM_FLAGS > TP_TYPE_CONTACT_BLOCKING_CAPABILITIES > TP_TYPE_CONTACT_INFO_FIELD_FLAGS > TP_TYPE_CONTACT_INFO_FLAGS > TP_TYPE_CONTACT_LIST_STATE > TP_TYPE_CONTACT_METADATA_STORAGE_TYPE > TP_TYPE_DEBUG_LEVEL > TP_TYPE_DELIVERY_REPORTING_SUPPORT_FLAGS > TP_TYPE_DELIVERY_STATUS > TP_TYPE_DTMF_EVENT > TP_TYPE_FILE_HASH_TYPE > TP_TYPE_FILE_TRANSFER_STATE > TP_TYPE_FILE_TRANSFER_STATE_CHANGE_REASON > TP_TYPE_HANDLE_TYPE > TP_TYPE_HTTP_METHOD > TP_TYPE_LOCAL_HOLD_STATE > TP_TYPE_LOCAL_HOLD_STATE_REASON > TP_TYPE_LOCATION_FEATURES > TP_TYPE_MAIL_NOTIFICATION_FLAGS > TP_TYPE_MEDIA_STREAM_BASE_PROTO > TP_TYPE_MEDIA_STREAM_DIRECTION > TP_TYPE_MEDIA_STREAM_ERROR > TP_TYPE_MEDIA_STREAM_PENDING_SEND > TP_TYPE_MEDIA_STREAM_STATE > TP_TYPE_MEDIA_STREAM_TRANSPORT_TYPE > TP_TYPE_MEDIA_STREAM_TYPE > TP_TYPE_MESSAGE_PART_SUPPORT_FLAGS > TP_TYPE_MESSAGE_SENDING_FLAGS > TP_TYPE_PROPERTY_FLAGS > TP_TYPE_RICH_PRESENCE_ACCESS_CONTROL_TYPE > TP_TYPE_SASL_ABORT_REASON > TP_TYPE_SASL_STATUS > TP_TYPE_SERVICE_POINT_TYPE > TP_TYPE_SOCKET_ACCESS_CONTROL > TP_TYPE_SOCKET_ADDRESS_TYPE > TP_TYPE_STORAGE_RESTRICTION_FLAGS > TP_TYPE_SUBSCRIPTION_STATE > TP_TYPE_TLS_CERTIFICATE_REJECT_REASON > TP_TYPE_TLS_CERTIFICATE_STATE > TP_TYPE_TUBE_CHANNEL_STATE > TP_TYPE_TUBE_STATE > TP_TYPE_TUBE_TYPE > tp_access_control_type_get_type > tp_anonymity_mode_flags_get_type > tp_channel_call_state_flags_get_type > tp_channel_chat_state_get_type > tp_channel_contact_search_state_get_type > tp_channel_group_change_reason_get_type > tp_channel_group_flags_get_type > tp_channel_media_capabilities_get_type > tp_channel_password_flags_get_type > tp_channel_text_message_flags_get_type > tp_channel_text_message_type_get_type > tp_channel_text_send_error_get_type > tp_conn_mgr_param_flags_get_type > tp_connection_alias_flags_get_type > tp_connection_capability_flags_get_type > tp_connection_presence_type_get_type > tp_connection_status_get_type > tp_connection_status_reason_get_type > tp_contact_blocking_capabilities_get_type > tp_contact_info_field_flags_get_type > tp_contact_info_flags_get_type > tp_contact_list_state_get_type > tp_contact_metadata_storage_type_get_type > tp_debug_level_get_type > tp_delivery_reporting_support_flags_get_type > tp_delivery_status_get_type > tp_dtmf_event_get_type > tp_file_hash_type_get_type > tp_file_transfer_state_change_reason_get_type > tp_file_transfer_state_get_type > tp_handle_type_get_type > tp_http_method_get_type > tp_local_hold_state_get_type > tp_local_hold_state_reason_get_type > tp_location_features_get_type > tp_mail_notification_flags_get_type > tp_media_stream_base_proto_get_type > tp_media_stream_direction_get_type > tp_media_stream_error_get_type > tp_media_stream_pending_send_get_type > tp_media_stream_state_get_type > tp_media_stream_transport_type_get_type > tp_media_stream_type_get_type > tp_message_part_support_flags_get_type > tp_message_sending_flags_get_type > tp_property_flags_get_type > tp_rich_presence_access_control_type_get_type > tp_sasl_abort_reason_get_type > tp_sasl_status_get_type > tp_service_point_type_get_type > tp_socket_access_control_get_type > tp_socket_address_type_get_type > tp_storage_restriction_flags_get_type > tp_subscription_state_get_type > tp_tls_certificate_reject_reason_get_type > tp_tls_certificate_state_get_type > tp_tube_channel_state_get_type > tp_tube_state_get_type > tp_tube_type_get_type > ^^^ Unused symbols > Documentation check failed > make[3]: *** [check-local] Error 1 > > Do I need to add these to a .abi file somewhere? Not until it's released. .abi files are for libtool; these warnings are from gtk-doc. But if they're in public headers, they need to go into docs/reference/telepathy-glib-sections.txt — probably all into a <SUBSECTION Standard> for the section which defines the corresponding C enum. + +/** + * _tp_enum_to_nick: Don't use double-stars for internal functions. + self.caps_header = '__%s_H__' % output_base.upper().replace('-', '_')\ + .replace('/', '_') Strictly speaking __ is reserved for the toolchain, so header guards like __TP_FOO_H__ should be TP_FOO_H. I am in a minority in caring about this. - DEBUG("emitting status-changed to %u, for reason %u", status, reason); + DEBUG("emitting status-changed to %s (%d), for reason %s (%d)", + _tp_enum_to_nick (TP_TYPE_CONNECTION_STATUS, status), status, + _tp_enum_to_nick (TP_TYPE_CONNECTION_STATUS_REASON, reason), reason); tp_svc_connection_emit_status_changed (self, status, reason); You'll want to special case calls to _tp_enum_to_nick (TP_TYPE_CONNECTION_STATUS, x) in base-connection: there's a special internal-only value. See also bug 35736 which tries to make these more beautiful. if (handle_repo == NULL) { - DEBUG ("unimplemented handle type %u", handle_type); + DEBUG ("unimplemented handle type %s (%d)", + _tp_enum_to_nick (TP_TYPE_HANDLE_TYPE, handle_type), handle_type); error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, - "unimplemented handle type %u", handle_type); + "unimplemented handle type: %s (%d)", + _tp_enum_to_nick (TP_TYPE_HANDLE_TYPE, handle_type), handle_type); goto out; } This could DEBUG the message from the GError rather than building it twice? Ideally this should be public; reading telepathy-farstream logs ("Endpoint state for component 2 changed to 0 (fs: 2)") is a pain as well. About g-i problem in comment #3, AFAIK I fixed scanner to respect the (skip) annotation. Should be fine now. -- 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/66. |
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.