libUPnP
1.6.17
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
upnp
src
inc
miniserver.h
Go to the documentation of this file.
1
#ifndef MINISERVER_H
2
#define MINISERVER_H
3
4
/**************************************************************************
5
*
6
* Copyright (c) 2000-2003 Intel Corporation
7
* All rights reserved.
8
*
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions are met:
11
*
12
* - Redistributions of source code must retain the above copyright notice,
13
* this list of conditions and the following disclaimer.
14
* - Redistributions in binary form must reproduce the above copyright notice,
15
* this list of conditions and the following disclaimer in the documentation
16
* and/or other materials provided with the distribution.
17
* - Neither name of Intel Corporation nor the names of its contributors
18
* may be used to endorse or promote products derived from this software
19
* without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
25
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
*
33
**************************************************************************/
34
39
#include "
sock.h
"
40
#include "
httpparser.h
"
41
#include "UpnpStdInt.h"
42
43
extern
SOCKET
gMiniServerStopSock;
44
45
typedef
struct
MServerSockArray
{
47
SOCKET
miniServerSock4
;
49
SOCKET
miniServerSock6
;
51
SOCKET
miniServerStopSock
;
53
SOCKET
ssdpSock4
;
55
SOCKET
ssdpSock6
;
57
SOCKET
ssdpSock6UlaGua
;
58
/* ! . */
59
uint16_t stopPort;
60
/* ! . */
61
uint16_t miniServerPort4;
62
/* ! . */
63
uint16_t miniServerPort6;
64
#ifdef INCLUDE_CLIENT_APIS
65
67
SOCKET
ssdpReqSock4
;
70
SOCKET
ssdpReqSock6
;
71
#endif
/* INCLUDE_CLIENT_APIS */
72
}
MiniServerSockArray
;
73
75
typedef
void (*
MiniServerCallback
) (
76
/* ! . */
77
IN
http_parser_t
* parser,
78
/* ! . */
79
IN
http_message_t
* request,
80
/* ! . */
81
IN
SOCKINFO
* info);
82
83
#ifdef __cplusplus
84
extern
"C"
{
85
#endif
86
90
void
SetHTTPGetCallback
(
92
MiniServerCallback
callback);
93
97
#ifdef INCLUDE_DEVICE_APIS
98
void
SetSoapCallback
(
100
MiniServerCallback
callback);
101
#else
/* INCLUDE_DEVICE_APIS */
102
static
UPNP_INLINE
void
SetSoapCallback
(
MiniServerCallback
callback) {}
103
#endif
/* INCLUDE_DEVICE_APIS */
104
107
void
SetGenaCallback
(
109
MiniServerCallback
callback);
110
126
int
StartMiniServer
(
129
uint16_t *listen_port4,
132
uint16_t *listen_port6);
133
139
int
StopMiniServer
();
140
141
#ifdef __cplusplus
142
}
/* extern C */
143
#endif
144
145
#endif
/* MINISERVER_H */
Generated on Fri Dec 16 2016 20:21:17 for libUPnP by
1.8.1.2