/* * ushare.h : GeeXboX uShare UPnP Media Server header. * Originally developped for the GeeXboX project. * Parts of the code are originated from GMediaServer from Oskar Liljeblad. * Copyright (C) 2005-2007 Benjamin Zores * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _USHARE_H_ #define _USHARE_H_ #include #include #include #include #ifdef HAVE_DLNA #include #endif /* HAVE_DLNA */ #include "content.h" #include "buffer.h" #include "redblack.h" #define VIRTUAL_DIR "/web" #define XBOX_MODEL_NAME "Windows Media Connect Compatible" #define DEFAULT_UUID "898f9738-d930-4db4-a3cf" #define UPNP_MAX_CONTENT_LENGTH 4096 #define STARTING_ENTRY_ID_DEFAULT 0 #define STARTING_ENTRY_ID_XBOX360 100000 #define UPNP_DESCRIPTION \ "" \ "" \ " " \ " 1" \ " 0" \ " " \ " " \ " urn:schemas-upnp-org:device:MediaServer:1" \ " %s: 1" \ " GeeXboX Team" \ " http://ushare.geexbox.org/" \ " GeeXboX uShare : UPnP Media Server" \ " %s" \ " 001" \ " http://ushare.geexbox.org/" \ " GEEXBOX-USHARE-01" \ " uuid:%s" \ " " \ " " \ " urn:schemas-upnp-org:service:ConnectionManager:1" \ " urn:upnp-org:serviceId:ConnectionManager" \ " /web/cms.xml" \ " /web/cms_control" \ " /web/cms_event" \ " " \ " " \ " urn:schemas-upnp-org:service:ContentDirectory:1" \ " urn:upnp-org:serviceId:ContentDirectory" \ " /web/cds.xml" \ " /web/cds_control" \ " /web/cds_event" \ " " \ " " \ " urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1\n" \ " urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar\n" \ " /web/msr.xml" \ " /web/msr_control" \ " /web/msr_event" \ " \n" \ " " \ " /web/ushare.html" \ " " \ "" struct ushare_t { char *name; char *interface; char *model_name; content_list *contentlist; struct rbtree *rb; struct upnp_entry_t *root_entry; int nr_entries; int starting_id; int init; UpnpDevice_Handle dev; char *udn; char *ip; unsigned short port; unsigned short telnet_port; struct buffer_t *presentation; bool use_presentation; bool use_telnet; #ifdef HAVE_DLNA bool dlna_enabled; dlna_t *dlna; dlna_org_flags_t dlna_flags; #endif /* HAVE_DLNA */ bool xbox360; bool verbose; bool daemon; bool override_iconv_err; char *cfg_file; pthread_mutex_t termination_mutex; pthread_cond_t termination_cond; }; struct action_event_t { struct Upnp_Action_Request *request; bool status; struct service_t *service; }; void display_headers (void); #endif /* _USHARE_H_ */