vlc_services_discovery.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_services_discovery.h : Services Discover functions
00003  *****************************************************************************
00004  * Copyright (C) 1999-2004 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef VLC_SERVICES_DISCOVERY_H_
00025 #define VLC_SERVICES_DISCOVERY_H_
00026 
00027 # ifdef __cplusplus
00028 extern "C" {
00029 # endif
00030 
00031 /*
00032  * @{
00033  */
00034 
00035 #include <vlc_input.h>
00036 #include <vlc_events.h>
00037 
00038 struct services_discovery_t
00039 {
00040     VLC_COMMON_MEMBERS
00041     char *              psz_module;
00042     module_t *          p_module;
00043 
00044     char *              psz_localized_name; /* Accessed through Setters for non class function */
00045     vlc_event_manager_t event_manager;      /* Accessed through Setters for non class function */
00046 
00047     services_discovery_sys_t *p_sys;
00048     void (*pf_run) ( services_discovery_t *);
00049 };
00050 
00051 
00052 /***********************************************************************
00053  * Service Discovery
00054  ***********************************************************************/
00055 
00056 /* Get the services discovery modules names to use in Create(), in a null
00057  * terminated string array. Array and string must be freed after use. */
00058 VLC_EXPORT( char **, __services_discovery_GetServicesNames, ( vlc_object_t * p_super, char ***pppsz_longnames ) );
00059 #define services_discovery_GetServicesNames(a,b) \
00060         __services_discovery_GetServicesNames(VLC_OBJECT(a),b)
00061 
00062 /* Creation of a service_discovery object */
00063 VLC_EXPORT( services_discovery_t *, services_discovery_Create, ( vlc_object_t * p_super, const char * psz_service_name ) );
00064 VLC_EXPORT( void,                   services_discovery_Destroy, ( services_discovery_t * p_this ) );
00065 VLC_EXPORT( int,                    services_discovery_Start, ( services_discovery_t * p_this ) );
00066 VLC_EXPORT( void,                   services_discovery_Stop, ( services_discovery_t * p_this ) );
00067 
00068 /* Read info from discovery object */
00069 VLC_EXPORT( char *,                 services_discovery_GetLocalizedName, ( services_discovery_t * p_this ) );
00070 
00071 /* Receive event notification (preferred way to get new items) */
00072 VLC_EXPORT( vlc_event_manager_t *,  services_discovery_EventManager, ( services_discovery_t * p_this ) );
00073 
00074 /* Used by services_discovery to post update about their items */
00075 VLC_EXPORT( void,                   services_discovery_SetLocalizedName, ( services_discovery_t * p_this, const char * ) );
00076     /* About the psz_category, it is a legacy way to add info to the item,
00077      * for more options, directly set the (meta) data on the input item */
00078 VLC_EXPORT( void,                   services_discovery_AddItem, ( services_discovery_t * p_this, input_item_t * p_item, const char * psz_category ) );
00079 VLC_EXPORT( void,                   services_discovery_RemoveItem, ( services_discovery_t * p_this, input_item_t * p_item ) );
00080 
00081 /** @} */
00082 # ifdef __cplusplus
00083 }
00084 # endif
00085 
00086 #endif

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1