static void dpap_share_class_init (DPAPShareClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class); object_class->get_property = dpap_share_get_property; object_class->set_property = dpap_share_set_property; object_class->dispose = dpap_share_dispose; parent_class->get_desired_port = dpap_share_get_desired_port; parent_class->get_type_of_service = dpap_share_get_type_of_service; parent_class->message_add_standard_headers = dpap_share_message_add_standard_headers; parent_class->get_meta_data_map = get_meta_data_map; parent_class->add_entry_to_mlcl = add_entry_to_mlcl; parent_class->databases_browse_xxx = databases_browse_xxx; parent_class->databases_items_xxx = databases_items_xxx; parent_class->server_info = dpap_share_server_info; g_type_class_add_private (klass, sizeof (DPAPSharePrivate)); }
static void dacp_share_class_init (DACPShareClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); DMAPShareClass *dmap_class = DMAP_SHARE_CLASS (object_class); object_class->get_property = dacp_share_get_property; object_class->set_property = dacp_share_set_property; object_class->dispose = dacp_share_dispose; dmap_class->get_type_of_service = dacp_share_get_type_of_service; dmap_class->ctrl_int = dacp_share_ctrl_int; dmap_class->login = dacp_share_login; g_object_class_install_property (object_class, PROP_LIBRARY_NAME, g_param_spec_string ("library-name", "Library Name", "Library name as will be shown in the Remote", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_PLAYER, g_param_spec_object ("player", "Player", "Player", G_TYPE_OBJECT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * DACPShare::remote-found * @share: the #DACPShare that received the signal. * @service_name: the remote identifier. * @remote_name: the remote friendly name. * * Signal emited when a remote is found in the local network. */ signals[REMOTE_FOUND] = g_signal_new ("remote-found", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DACPShareClass, remote_found), NULL, NULL, dmap_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); /** * DACPShare::remote-lost * @share: the #DACPShare that received the signal * @service_name: the remote identifier. * * Signal emited when a remote is lost in the local network. */ signals[REMOTE_LOST] = g_signal_new ("remote-lost", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DACPShareClass, remote_lost), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); /** * DACPShare::remote-paired * @share: the #DACPShare that received the signal * @service_name: the remote identifier. * @connected: indicates if the connection was succesfull or not. * * Signal emited when a remote is paired. */ signals[REMOTE_PAIRED] = g_signal_new ("remote-paired", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DACPShareClass, remote_paired), NULL, NULL, dmap_marshal_VOID__STRING_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * DACPShare::lookup-guid * @share: the #DACPShare that received the signal * @guid: a string containing the guid to be validated. * * Signal emited when the remote has logged in before and wants to be * validated. An implementation must implement this signal to lookup * for guids saved by ::add-guid */ signals[LOOKUP_GUID] = g_signal_new ("lookup-guid", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DACPShareClass, lookup_guid), NULL, NULL, dmap_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING); /** * DACPShare::add-guid * @share: the #DACPShare that received the signal * @guid: a string containing the guid to be saved. * * Signal emited when the remote wants to log in and save a special guid * which will be used later when it wants to reconnect. With this guid, * we know that this remote has connected before, thus this signal must * save somewhere all guids that connected before, so that ::lookup-guid * will find this remote. The user interface probably wants to include * a button to forget previously connected remotes, so that the user may * disconnect all previously connected remotes. */ signals[ADD_GUID] = g_signal_new ("add-guid", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DACPShareClass, add_guid), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); g_type_class_add_private (klass, sizeof (DACPSharePrivate)); }