1/* MiniDLNA project 2 * http://minidlna.sourceforge.net/ 3 * 4 * MiniDLNA media server 5 * Copyright (C) 2008-2009 Justin Maggard 6 * 7 * This file is part of MiniDLNA. 8 * 9 * MiniDLNA is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License version 2 as 11 * published by the Free Software Foundation. 12 * 13 * MiniDLNA is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>. 20 * 21 * Portions of the code from the MiniUPnP project: 22 * 23 * Copyright (c) 2006-2007, Thomas Bernard 24 * All rights reserved. 25 * 26 * Redistribution and use in source and binary forms, with or without 27 * modification, are permitted provided that the following conditions are met: 28 * * Redistributions of source code must retain the above copyright 29 * notice, this list of conditions and the following disclaimer. 30 * * Redistributions in binary form must reproduce the above copyright 31 * notice, this list of conditions and the following disclaimer in the 32 * documentation and/or other materials provided with the distribution. 33 * * The name of the author may not be used to endorse or promote products 34 * derived from this software without specific prior written permission. 35 * 36 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 37 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 39 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 40 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 41 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 42 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 43 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 44 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 46 * POSSIBILITY OF SUCH DAMAGE. 47 */ 48#ifndef __UPNPEVENTS_H__ 49#define __UPNPEVENTS_H__ 50enum subscriber_service_enum { 51 EContentDirectory = 1, 52 EConnectionManager, 53 EMSMediaReceiverRegistrar 54}; 55 56void 57upnp_event_var_change_notify(enum subscriber_service_enum service); 58 59const char * 60upnpevents_addSubscriber(const char * eventurl, 61 const char * callback, int callbacklen, 62 int timeout); 63 64int upnpevents_removeSubscriber(const char * sid, int sidlen); 65void upnpevents_removeSubscribers(void); 66 67int renewSubscription(const char * sid, int sidlen, int timeout); 68 69void upnpevents_selectfds(fd_set *readset, fd_set *writeset, int * max_fd); 70void upnpevents_processfds(fd_set *readset, fd_set *writeset); 71 72#ifdef USE_MINIUPNPDCTL 73void write_events_details(int s); 74#endif 75 76#endif 77