1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gmyth-upnp/src/gmyth_upnp.h Wed Jan 10 20:35:17 2007 +0000
1.3 @@ -0,0 +1,96 @@
1.4 +/**
1.5 + * GMyth Library
1.6 + *
1.7 + * @file gmyth/gmyth_upnp.h
1.8 + *
1.9 + * @brief <p> GMythUPnP allows that a MythTV frontend discovers a
1.10 + * MythTV backend, using the UPnP architecture.
1.11 + *
1.12 + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
1.13 + * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
1.14 + *
1.15 + *//*
1.16 + *
1.17 + * This program is free software; you can redistribute it and/or modify
1.18 + * it under the terms of the GNU Lesser General Public License as published by
1.19 + * the Free Software Foundation; either version 2 of the License, or
1.20 + * (at your option) any later version.
1.21 + *
1.22 + * This program is distributed in the hope that it will be useful,
1.23 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.24 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.25 + * GNU General Public License for more details.
1.26 + *
1.27 + * You should have received a copy of the GNU Lesser General Public License
1.28 + * along with this program; if not, write to the Free Software
1.29 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1.30 + *
1.31 + */
1.32 +
1.33 +#ifndef _GMYTH_UPNP_H_
1.34 +#define _GMYTH_UPNP_H_
1.35 +
1.36 +#include <glib.h>
1.37 +#include <glib-object.h>
1.38 +
1.39 +#include <stdlib.h>
1.40 +#include <stdio.h>
1.41 +#include <string.h>
1.42 +
1.43 +#include <cybergarage/upnp/cupnp.h>
1.44 +#include "gmyth_backendinfo.h"
1.45 +
1.46 +G_BEGIN_DECLS
1.47 +
1.48 +#define GMYTH_UPNP_TYPE (gmyth_upnp_get_type ())
1.49 +#define GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
1.50 +#define GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
1.51 +#define IS_GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
1.52 +#define IS_GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
1.53 +#define GMYTH_UPNP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
1.54 +
1.55 +typedef struct _GMythUPnP GMythUPnP;
1.56 +typedef struct _GMythUPnPClass GMythUPnPClass;
1.57 +
1.58 +/****************************************
1.59 +* Data Type
1.60 +****************************************/
1.61 +
1.62 +struct _GMythUPnPClass
1.63 +{
1.64 + GObjectClass parent_class;
1.65 +
1.66 + /* callbacks */
1.67 + /* no one for now */
1.68 +};
1.69 +
1.70 +struct _GMythUPnP {
1.71 +
1.72 + GObject parent;
1.73 +
1.74 + gchar *uri;
1.75 + gchar *host;
1.76 + gint port;
1.77 + gchar *protocol;
1.78 +
1.79 + CgUpnpControlPoint* control_point;
1.80 +
1.81 + gchar *udn;
1.82 +
1.83 + GMythBackendInfo *gmyth_backend_info;
1.84 +
1.85 + GList* mythtv_servers;
1.86 +
1.87 + gboolean upnp_dev_found;
1.88 +
1.89 +};
1.90 +
1.91 +GType gmyth_upnp_get_type (void);
1.92 +GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info );
1.93 +gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
1.94 +gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
1.95 +GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
1.96 +
1.97 +G_END_DECLS
1.98 +
1.99 +#endif /* _GMYTH_UPNP_H_ */