Compare commits

...

465 Commits

Author SHA1 Message Date
Marcelo Roberto Jimenez
bc335f5df7 Bug tracker #124 Build fails with --enable-debug
Build environment
Fedora 21
X86-64
gcc 4.9.2

how to repeat
$ ./configure --enable debug
$ make
libtool: compile: gcc -dhave_config_h -i. -i.. -i../upnp/inc -i./inc
-i../threadutil/inc
-i../ixml/inc -i./src/inc -pthread -g -o2 -wall -mt
src/api/libupnp_la-upnpstring.lo
-md -mp -mf src/api/.deps/libupnp_la-upnpstring.tpo -c
src/api/upnpstring.c
-fpic -dpic -o src/api .libs/libupnp_la-upnpstring.o
src/api/UpnpString.c:47:16:
error: expected identifier or '(' before 'extension'
extern char *strndup(const char *string, size_t __n);
^
Makefile:1016: recipe for target 'src/api/libupnp_la-UpnpString.lo'
failed

Reason for failure
Build enables -O2 optimization flags which causes the inclusion of a
macro implementation of strndup from include/bits/string2.h.

Workarounds
Disable optimization when configuring or making:
$ configure CFLAGS='-g -pthread -O0' --enable-debug
$ make
or
$ configure --enable-debug
$ make CFLAGS='-g -pthread -O0' Define NO_STRING_INLINES
$ export CFLAGS="-DNO_STRING_INLINES -O2"
$ ./configure --enagble-debug
$ make

Fix
* Don't declare strndup in src/api/UpnpString.c if it exists
2015-02-04 22:34:08 -02:00
Marcelo Roberto Jimenez
cf31814e55 Looks like I did something wrong two commits ago 2015-02-04 22:25:15 -02:00
Marcelo Roberto Jimenez
3b0fd070fd Update .gitignore 2015-02-04 22:18:23 -02:00
Marcelo Roberto Jimenez
9f69fb1b80 _LARGEFILE_SOURCE definition has changed in the last autotools 2015-02-01 22:31:30 -02:00
Jean-Francois Dockes
c124ae6507 Fix out-of-tree compilation: missing include directive and build
subdirectory

Out-of-tree builds seem to be currently broken, because ixml and
threadutil files need an include path to include UpnpGlobal.h, and
configure tries to copy files into a directory which it does not create.
The patch fixes both issues.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2015-02-01 22:27:39 -02:00
Nick Leverton
51a01cdba1 Adjust NUM_MEDIA_TYPES to allow for the addition of css in commit 72460df7. 2014-10-02 20:34:58 +01:00
Marcelo Jimenez
6905714a7e Update the THANKS file
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-26 13:59:38 -03:00
Dirk
72460df747 #121 Support css files in webserver
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-26 13:49:43 -03:00
Philipp Matthias Hahn
a596abfbe3 Add unit test for parse_uri()
Tested through the public function UpnpResolveURL2().

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:59:04 -03:00
Philipp Matthias Hahn
fbbb24f406 Fix remove_dots()
Rewrite to handle all normal and abnormal examples mentioned in RFC 3986
section 5.4.
The previous implementation failed the following test cases:

'http://www.libupnp.org/path1/path1' | '#frag1' -> 'http://www.libupnp.org/path1/#frag1' != 'http://www.libupnp.org/path1/path1#frag1' (0)
'http://127.0.0.1:6544/getDeviceDesc' | 'CDS_Event' -> 'http://127.0.0.1:6544/CDS_EventDesc' != 'http://127.0.0.1:6544/CDS_Event' (0)
'http://localhost/b/c/d;p?q' | 'g' -> 'http://localhost/b/c/g;p' != 'http://localhost/b/c/g' (0)
'http://localhost/b/c/d;p?q' | 'g/' -> 'http://localhost/b/c/g/p' != 'http://localhost/b/c/g/' (0)
'http://localhost/b/c/d;p?q' | '?y' -> 'http://localhost/b/c/?yp' != 'http://localhost/b/c/d;p?y' (0)
'http://localhost/b/c/d;p?q' | '#s' -> 'http://localhost/b/c/#sp' != 'http://localhost/b/c/d;p?q#s' (0)
'http://localhost/b/c/d;p?q' | ';x' -> 'http://localhost/b/c/;xp' != 'http://localhost/b/c/;x' (0)
'http://localhost/b/c/d;p?q' | '.' -> 'http://localhost/b/c/.;p' != 'http://localhost/b/c/' (0)
'http://localhost/b/c/d;p?q' | './' -> 'http://localhost/b/c/p' != 'http://localhost/b/c/' (0)
'http://localhost/b/c/d;p?q' | '..' -> 'http://localhost/b/c/..p' != 'http://localhost/b/' (0)
'http://localhost/b/c/d;p?q' | '/./g' -> 'http://localhost/./g' != 'http://localhost/g' (0)
'http://localhost/b/c/d;p?q' | '/../g' -> 'http://localhost/../g' != 'http://localhost/g' (0)
'http://localhost/b/c/d;p?q' | 'g.' -> 'http://localhost/b/c/g.p' != 'http://localhost/b/c/g.' (0)
'http://localhost/b/c/d;p?q' | '.g' -> 'http://localhost/b/c/.gp' != 'http://localhost/b/c/.g' (0)

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:59:04 -03:00
Philipp Matthias Hahn
0508fb0d6e Fix resolve_rel_url()
This reworks commit 0edaf3361d, which
broke resolving relative url, where the relative URL is shorter than the
absolute URL:
    "http://127.0.0.1:6544/getDeviceDesc" + "CDS_Event"
    Wrong: "http://127.0.0.1:6544/CDS_EventDesc"
    Right: "http://127.0.0.1:6544/CDS_Event"

While reviewing that commit, improve code by:
1. Move the simple cases to the beginning of the function.
2. Keep track of the remaining target buffer size.
3. Fix URI concatenation with queries.
4. Fix URI concatenation with fragments.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Philipp Matthias Hahn
848d66e69d Fix broken strncat(..., strlen())
commit 0edaf3361d replaced several
malloc()+strcat() sequences with strncat() using strlen() on the
*source* string.
This is still vulnerable to overwrite the *target* buffer.

While reviewing this commit change the code to directly use snprintf()
for concatenating strings and check the length of the target buffer.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Philipp Matthias Hahn
04fb684323 Directly use strdup()
commit 0edaf3361d replaced several
malloc()+strcpy() sequences with memset()+strncpy() using strlen().
This doesn't improve security and introduced a bug URI handling.

While reviewing this commit change the code to directly use strdup()
instead of re-implementing it multiple times, as shortens the code and
thus improves readability.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Fabrice Fontaine
faaef39a3c Fix getaddrinfo() loop
Commit b116d10f did the following change:
    Use switch, int and sa_family_t with AF_INET in uri.c.

This breaks when getaddrinfo() only returns a single record, as in that
case the "break" only exits the switch statement and the loop-step
"res=res->ai_next" is still executed. After that "res == NULL" is
wrongly interpreted as not having found an AF_INET or AF_INET6 address.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Peng
a1193f385e rewrite soap_device.c
1) separate HTTP handling from SOAP handling
2) remove repeated validity check, each check is performed exactly once
3) fix HTTP status code per UPnP spec, SOAP spec and RFC 2774

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-01-17 10:00:00 -02:00
Marcelo Roberto Jimenez
c20f2bd3a1 Homekeeping for the next release. 2013-11-15 14:16:13 -02:00
Marcelo Roberto Jimenez
3fc0f9ad1d Adjust the library numbers for release. 2013-11-15 14:10:05 -02:00
Marcelo Roberto Jimenez
2211cc14e6 Access violation due to changed usage of pthreads-win32
SF Bug Tracker #119, Creator: Klaus Fischer

Dear libupnp developers,

I have experienced a crash (access violation) when using libupnp on
Windows. The crash is actually located in pthreads-win32 and happens
when repeatedly de-/initializing libupnp on Win32 in the same process
and both libupnp and pthreads-win32 are compiled as static libraries.

So I'm doing this:
- UpnpInit()
- UpnpFinish()
- UpnpInit() <- Crash

I am already in touch with Ross Johnson on the pthreads-win32 mailing
list regarding this issue:

http://sourceware.org/ml/pthreads-win32/2013/msg00020.html

He told me the problem is that the functions
pthread_win32_process_attach/detach_np() should no longer be called
directly, but are invoked automatically now since version 2.9.0 of
pthreads-win32, which has been released approx. 1.5 years ago. Please
refer to above link for in-depth information.

So for proper using of latest pthreads-win32 library, those function
calls should vanish inside libupnp. Could you consider adapting libupnp
in that way? I would really like to use both libraries out-of-the-box
without local modifications, and this issue prevents that.

Best regards,
Klaus
2013-11-14 15:06:31 -02:00
Peng
bf60dc06e0 Fix several minor bugs in soap_device.c
1) remove redundant free
2) avoid user-provided ErrStr being overwritten by the default one
3) eliminated memory leak possiblity in handle_query_variable

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2013-11-08 16:03:09 -02:00
Peng
908785fba7 Fix return value check of parse_uri
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2013-11-08 11:07:08 -02:00
Yoichi Nakayama
1a28e8ff51 tv_ctrlpt crashes after detecting a later version of tvcontrol service
SF Bug Tracker #118, Creator: T.Iwamoto

	From:  gon3456@users.sf.net
	Steps to reproduce:
	1. Extracts and build libupnp-1.6.18
	$ tar -xjf /path/to/archive/libupnp-1.6.18.tar.bz2
	$ cd libupnp-1.6.18
	$ ./configure
	$ make
	2. Applies the attached patch and remake.
	$ patch -p1 < /path/to/patch/libupnp-1.6.18.patch
	$ make
	3. Run tv_device.
	$ cd upnp/sample
	$ ./tv_device
	4. Run tv_ctrlpt; the tv_ctrlpt crashes soon.
	$ ./tv_ctrlpt
	Segmentation fault (core dumped)
	This is an issue report about the sample program of control point.
	The tv_ctrlpt crashes after detecting a tvdevice that contains tvcontrol:2 or higher version of tvcontrol service.
	tv_ctrlpt should detect correctly such devices due to forward compatibility of control points with device.
	For more information about the compatibility, please refer the following document:
	DLNA Architectures and Protocols Part 1 2011 December - 7.3.2.1.3 (GUN:GZJXU)
	The attached patch changes the sample programs as below:
	- device: changes version of tvcontrol service from 1 to 2. This change may occur in the future.
	- cp: nothing changed: cp knows version 1 of tvcontrol service only.
	I know many vendors implements their control points based on the tv_ctrlpt, so I hope to fix this issue ASAP.

	==

	From: Yoichi NAKAYAMA
	SEGV is caused by strcpy with NULL argument.
	Attached patch will avoid SEGV in strcpy, but there may be other inconsistencies.

	> I know many vendors implements their control points based on the tv_ctrlpt,

	I don't think so. I think tv_ctrlpt is just a sample to be used with tv_device.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2013-10-29 17:55:23 -02:00
Pino Toscano
89ad5e6779 Fix compilation on GNU/Hurd 2013-10-28 14:01:11 -02:00
Peng
062ac0c926 Fix return value of http_RecvPostMessage and update httpparser.c's comments 2013-10-28 11:35:23 -02:00
Peng
06aa3b17c4 Fix return value of process_request and related subroutines
1) Only HTTP_XXX should be return
2) Make default return value work for process_request
2013-10-28 11:34:58 -02:00
Peng
9f444a680e Fix Content-Range generation bug 2013-10-28 11:34:52 -02:00
zexian chen
8e3a71905b Fix memory leaks when when calling ThreadPoolAdd() or ThreadPoolAddPersistent()
Hi,

I had found some bugs about memory leak on libupnp-1.6.18.

It may lead to memory leak  when calling ThreadPoolAdd() or
ThreadPoolAddPersistent() which does not return 0.

See the attachment for patch.
2013-09-10 17:27:07 -03:00
Peng
72c29ef1f6 Fix return value of config_description_doc.
UPNP_E_XXX should not be used instead of IXML_XXX
2013-09-04 09:57:33 -03:00
Peng
f6a3102b48 Remove faulty free in GetDescDocumentAndURL.
temp_str, which points to part of description, should not be freed.
2013-09-04 09:57:32 -03:00
Peng
9a9c4e829e Avoid malicious client exploit to exhaust the device's memory
Suppose the UPnP device is listening on 192.168.1.102:49152. Use the following to send
garbage bytes to the device:
while true; do echo "\""; done | netcat 192.168.1.102 49152

The device just keeps receiving these bytes and its memory usage keeps growing.
Malicious client may exploit it to exhaust the device's memory.

The attached patch eliminates this possibility.
2013-09-02 14:56:11 -03:00
Peng
7a571f513e Scanner problems
1) restore the scanner's original cursor position in case of
   insufficient input;
2) free the memories allocated for a new header in case of a failure.
2013-09-02 14:38:04 -03:00
Peng
f10730f616 Patch to fix behaviou when char is signed
it seems to me that there is still something wrong:

	1)  the new is_qdtext_char() is incorrect.
	There is a trap if char is implemented as signed char.
	Suppose that c is '\xFF', it will be -1 when converted to an int.
	By definition, c should be qdtext:
	qdtext = <any TEXT except <">>
	TEXT = <any OCTET except CTLs, but including LWS>
	OCTET = <any 8-bit sequence of data>

	2) the character after '\\' could be either part of a quoted-pair
	(together with '\\'), or a normal qdtext, since '\\' itself can
	be treated as a qdtext. This is equivalent to saying that the
	character after '\\' in a quoted string could be ANY octet.

	A patch based on the above two observations is attached.

	Peng
2013-08-16 14:16:47 -03:00
Marcelo Roberto Jimenez
c70f5ce323 Enforce RFC 2616 and accept "0" after a backslash for quoted-strings.
Reported by Peng <howtofly(at)gmail.com>
2013-08-14 09:51:41 -03:00
Peng
a3c540bc9b scanner_get_token: robustness improvement
Patch to make scanner_get_token more robust (avoid over-reading).
2013-08-14 09:22:43 -03:00
Robert Buckley
7b1aa4c9e3 SF ticket #53 Action Error Response not returned
In soap_ctrlpt.c, in function get_response_value:

upnp_error_code is checked to see if it is less than 400 because that
would indicate a SOAP error code.

However it should be checked to see if it is greater than 400.
2013-07-30 17:07:30 -03:00
Zheng Peng
907c7c2621 SF ticket #116 UpnpRemoveVirtualDir wrong linked list operation
What if pVirtualDirList has two nodes and what we want to delete is the
first one. Patch attached.
2013-07-30 16:02:14 -03:00
Sebastian Brandt
25c27b8af7 Fix for crash in webserver.c by Sebastian Brandt
Dear libupnp-devels,
when POST'ing to the simple web server in libupnp, the application crashes.
This is caused by a missing "..." argument in webserver.c:1533.
Seems it has been there for a long time ... 1.6.9 and 1.6.18 have it.

webserver.c:1533 calls http_MakeMessage
/* Send response. */
http_MakeMessage(&headers, 1, 1,
	 "RTLSXcCc",
	 ret, "text/html", X_USER_AGENT);
The format parameter RTLSXcCc needs four arguments -
R - response code - ret,
T- content type - text/html,
L - struct SendInstruction * - NOT PRESENT
X - user agent - X_USER_AGENT

This results in a crash.

Changing to
http_MakeMessage(&headers, 1, 1,
	 "RTLSXcCc",
	 ret, "text/html", &RespInstr, X_USER_AGENT);
solves the situation.

Yours,
Sebastian Brandt
2013-07-30 11:46:46 -03:00
Marcelo Roberto Jimenez
dcbbc30f5c Fix for portability issue with GNU make extension 'sort'
upnp/sample/Makefile.am:67: warning: sort \
upnp/sample/Makefile.am:67:                     $(tv_ctrlpt_SOURCES: non-POSIX variable name
upnp/sample/Makefile.am:67: (probably a GNU make extension)

Reference:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13771#8
2013-07-30 11:26:09 -03:00
Marcelo Roberto Jimenez
3509991872 Fix for warning issue in libtool
Reference:
http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html

Re: automake 1.12 and AM_PROG_AR

From:	 Nick Bowler
Subject:	 Re: automake 1.12 and AM_PROG_AR
Date:	 Thu, 10 May 2012 17:16:04 -0400
User-agent:	 Mutt/1.5.21 (2010-09-15)
On 2012-05-10 12:52 +0200, Simon Josefsson wrote:
> Hi,
>
> I have received patches similar to the one below for several of my
> projects already, and I'm beginning to think there may be something that
> could be improved in automake.  Why does automake 1.12 need something
> that 1.11 doesn't even recognize?  Perhaps a smoother way to introduce
> this behaviour is to let 1.12 automatically enable it?
>
> Alternatively, is there some other way to address the warnings that is
> better?  Does it indicate a real problem in my projects?
>
> http://lists.gnu.org/archive/html/help-libidn/2012-05/msg00000.html
> http://lists.gnu.org/archive/html/help-libidn/2012-05/txtqAGOGgtPqj.txt

FYI, since the patch is so short it would have been helpful to include
it inline in your email.  I've taken the liberty of reproducing it
below:

> --- libidn-1.24.orig/configure.ac
> +++ libidn-1.24/configure.ac
> @@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
>  AC_SUBST(LT_REVISION, 7)
>  AC_SUBST(LT_AGE, 6)
>
> +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
> +m4_pattern_allow([AM_PROG_AR])
> +AM_PROG_AR
> +
>  AC_PROG_CC
>  gl_EARLY
>  lgl_EARLY

First off, this patch seems wrong at a first glance by its use of
m4_pattern_allow: this is saying that "It's ok for AM_PROG_AR to appear
verbatim in the configure script".  This suggests to me that the patch
didn't actually get tested (well) on Automake 1.11, since there will
almost certainly be an error about AM_PROG_AR at configure time.

This one should actually work properly on both old and new Automake
(untested):

  m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

That being said, the new warning is enabled by the -Wextra-portability
option that was added to Automake-1.12.  I'm by no means an export on
this issue, but I think it relates to new support for building with the
Microsoft compiler: in other words, I think that ignoring this warning
will not cause regressions in your package but, instead, your package
will simply not be able to make use of the new feature.

Regardless, I believe that for most packages the new warning is actually
caused by Libtool, and therefore the correct place to add the call to
AM_PROG_AR is in libtool itself, rather than ad-hoc patching of each
package individually.  You can silence the warnings (but not fix them)
by adding -Wno-extra-portability to AM_INIT_AUTOMAKE.

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
2013-07-30 10:39:30 -03:00
Marcelo Roberto Jimenez
6279b7fa5f Homekeeping for the next release. 2013-01-29 12:11:56 -02:00
Marcelo Roberto Jimenez
6cd1f11154 Adjust the library numbers for release. 2013-01-29 12:04:00 -02:00
Marcelo Roberto Jimenez
f015a132e8 Security fix for CERT issue VU#922681
This patch addresses three possible buffer overflows in function
unique_service_name(). The three issues have the folowing CVE
numbers:

CVE-2012-5958 Issue #2: Stack buffer overflow of Tempbuf
CVE-2012-5959 Issue #4: Stack buffer overflow of Event->UDN
CVE-2012-5960 Issue #8: Stack buffer overflow of Event->UDN

Notice that the following issues have already been dealt by previous
work:

CVE-2012-5961 Issue #1: Stack buffer overflow of Evt->UDN
CVE-2012-5962 Issue #3: Stack buffer overflow of Evt->DeviceType
CVE-2012-5963 Issue #5: Stack buffer overflow of Event->UDN
CVE-2012-5964 Issue #6: Stack buffer overflow of Event->DeviceType
CVE-2012-5965 Issue #7: Stack buffer overflow of Event->DeviceType
2012-12-06 15:43:15 -02:00
Marcelo Roberto Jimenez
40e90e89fc Remove an unused variable 2012-06-20 21:34:01 -03:00
Marcelo Roberto Jimenez
40ddff1096 Remove an unused variable ifndef INET_IPV6 2012-06-20 21:26:05 -03:00
Marcelo Roberto Jimenez
692813d03e Remove a pointless way to test a return value 2012-06-20 21:15:01 -03:00
Yoichi NAKAYAMA
d9e90499b7 Fix memory leak and access violation in UpnpSendAction(Ex)Async.
Free buffers after malloc or ixmlPrintNode failure.
Free Param->Header before destructing Param.
2012-06-19 19:13:46 +09:00
Anoop Mohan
6db2271ac3 Fixes a bug in non blocking connect call
This patch fixes a bug in non blocking connect call where the sock
option length for SO_ERROR was passed as 0 instead of sizeof(int).
2012-05-25 11:59:21 -03:00
Yoichi NAKAYAMA
4d21d45da7 Disable SetGenaCallback call if device is disabled.
If device is disabled, SetGenaCallback definition is disabled,
but its call remains. A link error will occur in Win32.
2012-04-25 00:29:42 +09:00
Yoichi NAKAYAMA
708ea30806 Fix condition for allocation failure in get_content_type().
At the end of get_content_type() in webserver.c, it should check
return value of ixmlCloneDOMString().
2012-04-21 21:48:55 +09:00
Yoichi NAKAYAMA
39dfad2cba Fix problems detected as dead assignment warning by clang scan-build.
Wrong assignment by shutdown result hides the real error code
of NewRequestHandler() in ssdp_device.c.
Fix return code description of NewRequestHandler().
Handle return code from ithread_create in sample applications.
Remove unused assignments.
2012-04-21 11:38:20 +09:00
Yoichi NAKAYAMA
3d7c1dbd59 Avoid dereference of null pointer in ixmlNode_setNodeProperties.
The problem can occur if one of the arguments is NULL.
Test argument and fix assertion.
2012-04-21 01:48:47 +09:00
Yoichi NAKAYAMA
e52e7e0bd3 Create intermediate directory per project on vc9.
Sample applications share sample_util.c and collisions of
object file can occur in parallel build. Modify project files to
split intermediate directories against it.
Apply similar changes also to library projects, like vc10 projects.
2012-04-17 20:40:51 +09:00
Thijs Schreijer
d5d680d131 Updated the readme regarding the newer visual studio versions and the 'VC runtime dependency hell'
(cherry picked from commit e570b7943d)
2012-04-11 20:17:37 -03:00
Thijs Schreijer
7ee266076d Added pthreads folder back in, put in on the ignore list this time so it won't be included in the repository 2012-04-11 20:16:37 -03:00
Thijs Schreijer
90fad896c4 - Copied the VC9 build directory and renamed to VC10 to prepare for Visual Studio 2010 update - Upgraded build/VC10 dir from VC9 to VC10 (using wizard) - Updated the Debug build configuration to be functional, including references for pthread.dll and the web example folders. Other build configurations still to be fixed. - Added output directory to GIT-ignore list. - Updated the Win32 build configurations to make them all work. x64 remains to be done. - Updated build process, after build events (copying sample files and pthreadVC2.dll to the target directory)
(cherry picked from commit e385d5a27e)
2012-04-11 20:13:00 -03:00
Marcelo Roberto Jimenez
0ea9c438e5 Update THANKS file 2012-04-11 17:42:22 -03:00
Marcelo Roberto Jimenez
c661180d15 Add errno.h inclusion in unixutil.h only in WIN32 2012-04-11 17:41:51 -03:00
Thijs Schreijer
1a98394781 Fixed warning by adding an explicit cast to long; TimerThread.c ..\..\threadutil\src\TimerThread.c(110): warning C4244: '=' : conversion from 'time_t' to 'long', possible loss of data 2012-04-11 17:39:13 -03:00
Thijs Schreijer
89fe655aee Fixed redefinition warnings for EAFNOSUPPORT and EADDRINUSE, Google turned up that they are newly defined in VS2010
unixutil.h, line 41
upnputil.h, line 125

Had a look here; http://bugs.ruby-lang.org/issues/3092 and added the mentioned fixes as found here; http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/win32.h?r1=27222&r2=27236&pathrev=27258&diff_format=h and here http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/win32.h?r1=27236&r2=27258&pathrev=27258&diff_format=h
2012-04-11 17:39:08 -03:00
Yoichi NAKAYAMA
d72bb5cff5 Avoid access violation after parser_parse_chunky_headers call.
In parser_parse_chunky_headers, parser->msg.msg.buf can be changed
by membuffer_delete call. Therefore if we save the pointer to
parser->msg.entity.buf before calling membuffer_delete, it will
induce access to released memory.
2012-04-12 01:51:12 +09:00
Marcelo Roberto Jimenez
e02753736a Update THANKS file. 2012-04-11 12:00:33 -03:00
Gustavo Zacarias
1c21e6e54f ssdp_device: exclude IPv6 stuff when there's no IPv6
Add an additional INET_IPV6 exclusion around IPV6_MULTICAST_HOPS since
the definition isn't guaranteed to exist when the toolchain lacks IPv6
support.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2012-04-11 11:56:40 -03:00
Yoichi NAKAYAMA
a383cbb8e2 Remove possibility of access violation.
1. Test Instr before dereference it in http_RecvPostMessage.
(Though it never becomes NULL because NULL is not passed to
the static method)
2. Avoid strdup(NULL) in ixmlElement_setAttributeNS.
Those are detected by llvm scan-build.
2012-04-06 23:21:18 +09:00
Yoichi NAKAYAMA
34a77cc095 SF Bug Tracker id 3507819 - Use of thread-unsafe gmtime() in httpreadwrite.c
Define http_gmtime_r and web_server_asctime_r and use it.
Those prefix are added since pthread for Win32 already
has macro gmtime_r and asctime_r.
2012-04-06 03:13:43 +09:00
Yoichi NAKAYAMA
e10bc2ec0c Fix type of local variable stopSock in RunMiniServer()
The variable is declared as SOCKET, but it is used to
store return value of int receive_from_stopSock(...).
The type was changed in the commit
4b47e6a51d by mistake.
2012-04-06 00:07:56 +09:00
Fabrice Fontaine
777c936f4c Compilation optimisation
Do not compile the code related to the webserver in http_SendMessage
when --disable-webserver is set
2012-04-03 16:11:31 +02:00
Marcelo Roberto Jimenez
04c1bf3fb0 White space fix. 2012-04-03 09:59:58 -03:00
Marcelo Roberto Jimenez
ab792e4223 Homekeeping for the next release. 2012-04-03 09:25:36 -03:00
Marcelo Roberto Jimenez
d0b16d056e Adjust the library numbers for release. 2012-04-03 09:19:45 -03:00
Fabrice Fontaine
dc4eda529f Memory leak fix in threadutil
Put thread in a detached state when calling pthread_create otherwise in
some circumstances, thread can end before the call to pthread_detach.
2012-04-02 15:51:46 +02:00
Marcelo Roberto Jimenez
c154c63cdc Update of auto-generated file. 2012-03-30 17:34:48 -03:00
Fabrice Fontaine
49af91fe48 Add --enable-unspecified_server
Add --enable-unspecified_server configure option to set to "Unspecified"
the OS name, OS version, product name and product version normally
contained in the SERVER header as this could be used by an attacker.
2012-03-30 21:57:51 +02:00
Fabrice Fontaine
df27ba505f Removing implicit casts in miniserver.c
Removing implicit integer or enum casts in miniserver.c.
2012-03-29 17:10:07 +02:00
Fabrice Fontaine
9a33782ab5 SF Bug Tracker id 3512833 - Miniserver is wrongly disabled
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-29 07:36:34 PDT

Miniserver is disabled if ECXLUDE_GENA, EXCLUDE_SOAP and
EXCLUDE_WEBSERVER are set.
However, SSDP needs the Miniserver to answer to M-SEARCH requests.
So, MiniServer should not be disabled if EXCLUDE_SSDP is not also set.
2012-03-29 16:40:40 +02:00
Yoichi NAKAYAMA
e0e81e6cd2 SF Bug Tracker id 3510693 - build fail with --disable-device
Use INCLUDE_DEVICE_APIS instead of UPNP_HAVE_DEVICE as in other sources.
Don't use soap_device_callback if INCLUDE_DEVICE_APIS is not set,
otherwise link error occur on Windows.
2012-03-27 00:59:50 +09:00
Fabrice Fontaine
02afbb09c9 SF Bug Tracker id 3511149 - --disable-ssdp has no effect
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-25 18:14:34 PDT

There are typos in upnp/src/inc/config.h "EXCLUDE_SSSDP" (shold be
EXCLUDE_SSDP), therefore EXCLUDE_SSDP is always 0, and --disable-ssdp
has no effect.
2012-03-26 14:07:52 +02:00
Fabrice Fontaine
804088d859 Remove implicit casts
Cast parameters of htonl in uint32_t in IN6_IS_ADDR_GLOBAL and
IN6_IS_ADDR_ULA definitions.
Remove comparison with 0 in while statement of vfmatch,
http_SendMessage and http_MakeMessage.
2012-03-24 22:20:18 +01:00
Yoichi NAKAYAMA
679ebeec48 SF Bug Tracker id 3510693 - build fail with --disable-device
GetDeviceHandleInfo just fail without using undefined member DeviceAf
if UPNP_HAVE_DEVICE is not defined.
Move ContentTypeHeader definition to soap_common.c, since it is
also used in soap_ctrlpt.c.
2012-03-24 13:11:23 +09:00
Marcelo Roberto Jimenez
19ec877b2a Homekeeping for the next release. 2012-03-21 19:58:13 -03:00
Marcelo Roberto Jimenez
01d7c05fb8 Adjust the library numbers for release. 2012-03-21 19:49:49 -03:00
Marcelo Roberto Jimenez
952492b44e Fixes anoying order issue in autoconfig.h
autoconf seems to generate the contents in another order, and it
generates anoying changes to git.
2012-03-21 19:45:07 -03:00
Fabrice Fontaine
a04c36f47e Replace sprintf by snprintf in http_WriteHttpPost
Replace sprintf by snprintf in http_WriteHttpPost to avoid buffer
overflow.
2012-03-18 16:14:41 +01:00
Fabrice Fontaine
e13ffe3bf8 Add infoSize parameter to get_sdk_info
Add infoSize parameter to get_sdk_info function to replace sprintf call
by a snprintf call.
2012-03-18 15:23:59 +01:00
Fabrice Fontaine
d3d17da6e5 Check return code in ixml
Check return code of ixmlDocument_CreateElementEx in
ixmlDocument_CreateElement.
Check return code of ixmlNode_setNodeName and ixmlNode_setNodeValue in
ixmlNode_cloneCDATASect and ixmlNode_cloneTextNode.
2012-03-16 17:30:27 +01:00
Marcelo Roberto Jimenez
e0444b26e6 Don't use // as comments, it breaks some C compilers
Also, really remove the dead code.
2012-03-16 11:51:10 -03:00
Fabrice Fontaine
cb07623dde Add more explicit casts and remove dead code
Comment unused SERVER from DeviceShutdown.
Comment unused max from parse_hostport.
Comment unused nodeptr from ixmlNode_cloneDoc.
Comment unused newNode from Parser_hasDefaultNamespace.
Comment unused Parser_parseReference function
Check return code of shutdown and display an error if needed.
2012-03-16 11:30:42 +01:00
Marcelo Roberto Jimenez
c9f3e26f24 Fix for compiler warning messages
src/genlib/net/http/httpreadwrite.c: In function ‘http_Download’:
src/genlib/net/http/httpreadwrite.c:790:5: warning: format ‘%d’ expects
type ‘int’, but argument 6 has type ‘size_t’
src/genlib/net/http/httpreadwrite.c:790:5: warning: format ‘%d’ expects
type ‘int’, but argument 7 has type ‘size_t’
(cherry picked from commit 5969530dcf)
2012-03-15 11:50:48 -03:00
Fabrice Fontaine
a3d038c885 Fix previous commit
Replace HAVE_UPNP_OPTSSDP by UPNP_HAVE_OPTSSDP in upnpapi.c.
2012-03-15 15:06:51 +01:00
Fabrice Fontaine
731512b0e5 Add --disable-optssdp option
Modify configure.ac to add --disable-optssdp option. This option will
remove OPT, 01-NLS and X_USER_AGENT headers from SSDP messages as those
headers are optional. If --disable-gena and disable-optssdp are both
used, uuid part will not be compiled anymore.
2012-03-15 14:13:27 +01:00
Fabrice Fontaine
76eb3f869b Bug fix in ixmlNode_allowChildren
Commit d48d73720b added a bug in
ixmlNode_allowChildren, this function was returning FALSE instead of
TRUE when newChild->nodeName was eELEMENT_NODE.
2012-03-15 11:07:54 +01:00
Fabrice Fontaine
b116d10f37 Improve upnp/genlib/net
Change ret_code from int to parse_status_t in match.
Set back return code of ReadResponseLineAndHeaders from parse_status_t
to int as this function can return UPNP_E_BAD_HTTPMSG. As a result, do
not cast the result of this function into parse_status_t in
http_OpenHttpGetProxy and http_OpenHttpGetEx.
Use switch with PARSE_OK in parsetools.c.
Add missing explicit casts of integer constants in uri.c and
httpreadwrite.c.
Use switch, int and sa_family_t with AF_INET in uri.c.
Print an error in http_Download if realloc failed.
2012-03-15 09:31:44 +01:00
Fabrice Fontaine
1a083479a9 Use switch instead of if with enums in upnpapi.c
Replace if statements with switch when using HND_DEVICE and HND_CLIENT
enum constants.
Correct also UpnpUnRegisterRootDeviceLowPower and UpnpUnRegisterClient
as those functions were wrongly awaiting an UPNP_E_INVALID_HANDLE
instead of HND_INVALID from GetHandleInfo.
2012-03-14 22:22:43 +01:00
Fabrice Fontaine
850e6b4849 Improve ssdp part
Do not compile CreateClientRequestPacketUlaGua if IPv6 is disable.
Cast DestAddr->sa_family from sa_family_t into int when calling
CreateServicePacket as this function has been set back to accept int in
a692e591de.
Use switch instead of if with AF_INET and AF_INET6.
Add missing casts from AF_INET and AF_INET6 into sa_family_t when using
them to set sin_family and sin6_family.
Add missing explicit casts into size_t or lu when using integer
constants with strlen or unsigned long indexes.
Set SSDP_PAUSE to be unsigned as it is used with usleep.
2012-03-14 21:30:55 +01:00
Fabrice Fontaine
d48d73720b Use switch insted of if with enums in ixml
Replace if statements with switch when using enums in ixml.
Remove uneeded initialization in ixmlAttr_init, Parser_init and
ixmlNode_init which was added by wrongly added in commit
06660b6383.
2012-03-14 20:04:04 +01:00
Fabrice Fontaine
b7f83bb7c6 Use switch insted of if with enums in threadutil
Replace if statements with switch when using enums in threadutil.
2012-03-14 18:52:20 +01:00
Fabrice Fontaine
05fb3f8026 Fix missing break in http_RecvMessage
There was a missing break in PARSE_INCOMPLETE_ENTITY due to commit
2eb3e069ba.
2012-03-14 18:43:14 +01:00
Yoichi NAKAYAMA
7178f300bb Fix parse failure observed with tvdevice sample.
Commit c40d2bc0c9 has a problem
at removing the parentheses in parser_parse_responseline.
Difference of pointers was used with intention, don't cast
them separately.
2012-03-15 01:02:48 +09:00
Yoichi NAKAYAMA
f7a801c3ae Fix compile error on Windows.
Include UpnpStdInt.h for ssize_t.
Define sa_family_t in UpnpInet.h.
2012-03-14 23:40:32 +09:00
Yoichi NAKAYAMA
f299d6597a Avoid ambiguous change of SsdpEvent in unique_service_name.
Handle overflow before changing SsdpEvent.
Because the behavior of "snprintf" is platform dependent in such case.
2012-03-14 23:06:46 +09:00
Yoichi NAKAYAMA
35819a7a44 SF Bug Tracker id 3502958 - The commit 5944960e prevents a pupnp client (amule) from receiving replies from an IGD device.
Previous change broke the feature. The error of unique_service_name
in ssdp_request_type should be ignored.
This reverts commit 5944960e17.
2012-03-14 23:04:51 +09:00
Marcelo Roberto Jimenez
f1c4ffefda Fix for compiler warning
src/genlib/net/sock.c: In function ‘sock_read_write’:
src/genlib/net/sock.c:172:4: warning: conversion to ‘long int’ from
‘size_t’ may change the sign of the result
2012-03-13 14:57:22 -03:00
Marcelo Roberto Jimenez
a692e591de Address family is an int
Reference: "man 2 socket".
2012-03-13 14:32:19 -03:00
Marcelo Roberto Jimenez
ad7272d2b5 SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()
(This is a fix to commit 86bef09787)
2012-03-13 10:55:06 -03:00
Marcelo Roberto Jimenez
86bef09787 SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()
This is a fix to commit 2fb791c9bb.
2012-03-12 11:48:21 -03:00
Fabrice Fontaine
c40d2bc0c9 Remove more implicit casts in upnp part
Remove more "implicit integer or enum conversions" errors as well as
dead code.
2012-03-11 22:45:10 +01:00
Yoichi NAKAYAMA
8e39b2af85 Suppress compiler warning in CreateClientRequestPacketUlaGua.
It is a static function and is called with AF_INET6,
so there is no real problem.
2012-03-11 21:35:03 +09:00
Fabrice Fontaine
2eb3e069ba Remove more implicit casts in upnp part
Remove more "implicit integer or enum conversions" as well as memset
before snprintf.
2012-03-10 22:52:57 +01:00
Yoichi NAKAYAMA
db532afb9b Avoid out of range access in CheckOtherHTTPHeaders.
There was a problem in HDR_ACCEPT_LANGUAGE case.
It may read from TmpBuf larger amount than allocated,
since condition was always true.
Terminate RespInstr->AcceptLanguageHeader correctly.
Skip allocation if there is already sufficient buffer.
2012-03-11 13:21:40 +09:00
Yoichi NAKAYAMA
1b38cc963a Suppress compiler warning in CreateClientRequestPacket.
It is a static function and is called with AF_INET or AF_INET6,
so there is no real problem.
2012-03-11 12:41:32 +09:00
Fabrice Fontaine
c67187ac94 Remove some of the implicit cast in upnp part
Remove some of the "implicit integer or enum conversions" as well as
some access to NULL reference in upnp part.
2012-03-10 20:44:49 +01:00
Fabrice Fontaine
d45f3c28cf Remove lock in ThreadPoolInit
If ThreadPoolInit returned EAGAIN, tp->lock was not freed.
2012-03-10 18:10:42 +01:00
Fabrice Fontaine
06660b6383 Improve ixml
Remove "implicit integer conversions" and
"dereference NULL return value" errors in ixml part.
2012-03-10 17:58:12 +01:00
Yoichi NAKAYAMA
41412c16ef Exclude IPv6 stuff in SearchByTarget when UPNP_ENABLE_IPV6 is not defined. 2012-03-11 04:00:09 +09:00
Yoichi NAKAYAMA
04e5767ea0 Use strncpy with the standard way in readFromSSDPSocket. 2012-03-11 03:54:41 +09:00
Yoichi NAKAYAMA
5944960e17 Respect unique_service_name error in ssdp_request_type.
Respect unique_service_name error in ssdp_request_type
so as not to touch non-terminated buffer under Evt.
2012-03-11 03:52:37 +09:00
Yoichi NAKAYAMA
d952ebfb44 Handle overflow in http_SendMessage. 2012-03-11 03:33:14 +09:00
Yoichi NAKAYAMA
56b44fee91 Detect overflow in addrToString called from configure_urlbase.
Pass output buffer size to addrToString and detect overflow.
Handle addrToString error in configure_urlbase.
2012-03-11 03:25:41 +09:00
Yoichi NAKAYAMA
ff635f92c0 Detect overflow in CreateClientRequestPacket(UlaGua).
Pass output buffer size to CreateClientRequestPacket(UlaGua)
from SearchByTarget and detect overflow.
Handle SearchByTarget error in UpnpSearchAsync.
2012-03-11 02:47:58 +09:00
Yoichi NAKAYAMA
19a23dafba Clarify the last argument of GetDescDocumentAndURL has size LINE_SIZE. 2012-03-11 02:15:16 +09:00
Yoichi NAKAYAMA
bd7f83feb5 For inet_ntop, use buffer with size INET6_ADDRSTRLEN or INET_ADDRSTRLEN. 2012-03-11 01:57:34 +09:00
Yoichi NAKAYAMA
e4678168fa Treat large argument as error in UpnpAddVirtualDir. 2012-03-11 01:40:48 +09:00
Yoichi NAKAYAMA
a0dc3482dc Do not clear buffer before snprintf.
It had no effect since snprintf can overwrite whole buffer.
2012-03-11 01:16:12 +09:00
Yoichi NAKAYAMA
87d1d3c3ec Add assertion and narrow variable scope in resolve_rel_url().
I've confirmed enough buffer is allocated for output.
2012-03-11 00:42:49 +09:00
Yoichi NAKAYAMA
194397b6d6 Handle allocation error in strndup to avoid access violation.
Return NULL before calling strncpy.
Platforms with HAVE_STRNDUP are not affected.
2012-03-10 23:15:37 +09:00
Yoichi NAKAYAMA
b78eaf4e43 Fix buffer size for strncpy in UpnpAddVirtualDir()
Since 1st argument precedes the beginning of the buffer,
it is necessary to reduce the value of 3rd argument.
2012-03-10 22:29:44 +09:00
Yoichi NAKAYAMA
a54d6e7e83 Synchronize autoconfig.h with upnpconfig.h.
It fixes WIN32 build where configure is not invoked.
2012-03-10 14:37:59 +09:00
Yoichi NAKAYAMA
18bf3b1c9c fix missing assignment in commit e722d8c375 2012-03-10 12:50:11 +09:00
Fabrice Fontaine
bb140000c0 More compilaton optimisation
Do not compile most of service_table.c and client_table.c if
--disable-gena is used.
Do not compile urlconfig.c if --disable-webserver is used.
Adding new UPNP_HAVE_xxx variables in upnpconfig.h and upnpconfig.h.in.
2012-03-10 00:33:17 +01:00
Fabrice Fontaine
7aef73d7eb Optimisation of --disable-webserver
Do not compile webserver.c if --disable-webserver is used.
2012-03-09 23:28:18 +01:00
Fabrice
77c73884b8 Improve threadutil
Remove "dereference NULL return" errors and implicit conversions to
double or enum types.
2012-03-09 22:49:19 +01:00
Fabrice Fontaine
72eecacf56 Optimisation of --disable-webserver
Do not compile miniserver.c if --disable-webserver is used.
2012-03-09 17:09:34 +01:00
Fabrice Fontaine
601332f88f Adding configure options
Adding --disable-ssdp, --disable-soap, --disable-gena options to
configure script.
2012-03-09 17:08:01 +01:00
Raymond Wen
4605314569 fix bug: the project can't compile on windows with vs 2005
- define UPNP_USE_MSVCPP when necessary
- set release build's output directory to be consistent with debug build
- add missing ClientSubscription.c to libupnp project
- reference correct source files in sample project

(backport of commit 0097180ce4)
2012-03-09 11:19:18 -03:00
Fabrice Fontaine
e95b4cc53a Bug fix of last commit
_snprintf was wrongly defined in ssdp_server.c
2012-03-09 16:13:43 +01:00
Fabrice Fontaine
e722d8c375 SF Bug Tracker id 3499781 - msvc doesn't have snprintf
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-08 10:18:39 PST

97a17ff5ad commit breaks build on
windows/msvc since there is no snprintf.

Note:
* Some existing sources use _snprintf when WIN32 is defined, but its
behavior is a bit different from C99 snprintf.
* snprintf does terminate the buffer, so the commit (use buffer size
minus 1 as argument) changes the behavior at the boundary.
* Truncation might be better than crash in some cases. But it may
result in not good.
2012-03-09 15:02:49 +01:00
Marcelo Roberto Jimenez
29ee36b1ca SF Bug Tracker id 3499878 - UpnpUnSubscribeAsync(): ‘retVal’ may be used uninitialized
Submitted: Marcelo Roberto Jimenez ( mroberto ) - 2012-03-08 12:38:57 PST

src/api/upnpapi.c: In function ‘UpnpUnSubscribeAsync’:
src/api/upnpapi.c:2060:6: warning: ‘retVal’ may be used uninitialized in this function
2012-03-08 17:42:02 -03:00
Marcelo Roberto Jimenez
2fb791c9bb SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()
Submitted: Terry Farnham ( tfarnham ) - 2011-02-07 09:25:25 PST

Details: The strcmp(pNode->prefix,pCur->prefix) crashes on pCur->prefix
being NULL. This occurs on invalidly formatted xml where a node uses an
undefined namespace. I would expect to receive IXML_FAILED in this
situation.
2012-03-08 13:51:29 -03:00
Marcelo Roberto Jimenez
d909297aa7 White spaces and coding style 2012-03-08 13:39:31 -03:00
Fabrice Fontaine
9b616a08df Removing access to NULL pointers in node.c and element.c
Check that newNode is not NULL ixmlNode_cloneNodeTree and pass newAttr
as the return node in the ixmlElement_setAttributeNodeNS call of
ixmlElement_setAttributeNS.
2012-03-08 16:09:03 +01:00
Fabrice Fontaine
3ab8d536a0 Memory leaks correction in upnpapi.c
Fix memory leaks in UpnpUnSubscribe, SendActionExAsync and
RenewSubscription.
2012-03-08 15:40:23 +01:00
Fabrice Fontaine
4f34a12a83 SF Bug Tracker id 3496993 - Write after free in ixmlNode_insertBefore
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 04:54:40 PST

If ixmlNode_isParent(nodeptr, newChild) returns TRUE,
ixmlNode_removeChild(nodeptr, newChild, NULL) will free newChild before
the modifications of newChild->nextSibling and newChild->prevSibling.
2012-03-08 14:22:54 +01:00
Fabrice Fontaine
97a17ff5ad Remove most of strcpy, sprintf and strcat
Replace strcpy, sprintf and strcat by strncpy, snprintf and strncat to
avoid buffer overflows.
2012-03-08 14:07:27 +01:00
zephyrus
9965f02727 SF Patches Tracker id 3498437 - a header patch: ixml.h 1.6.15
Submitted: zephyrus ( zephyrus00jp ) - 2012-03-07 02:31:14 PST

Details: a function is declared as
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument();

This should read as follows in order to suppress strict prototype checking by GCC.
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument(void);
2012-03-07 17:15:54 -03:00
Marcelo Roberto Jimenez
861a538cea White spaces, coding style 2012-03-07 15:07:50 -03:00
Marcelo Roberto Jimenez
c12d33aca6 White spaces, coding style 2012-03-07 15:06:26 -03:00
Yoichi NAKAYAMA
4c3532585d SF Bug Tracker id 3497714 - Buffer overflows
Fix compile error on WIN32.

Local variables must be declared first.
Remove outdated comment.
2012-03-08 01:37:03 +09:00
Yoichi NAKAYAMA
71ab707e81 Avoid access violation in assertion.
xmlParser->pCurElement was dereferenced before null check.
Affects debug build only.
2012-03-08 01:22:59 +09:00
Fabrice Fontaine
cec9d55c4c Remove SIZEOF_MISTACH error in notify_send_and_recv
Replace sizeof(CRLF) by strlen(CRLF) as CRLF is a const char*.
2012-03-07 14:30:37 +01:00
Fabrice Fontaine
56c26b5199 SF Bug Tracker id 3498442 - Memory leak in get_file_info
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:44:30 PST

info->contentType is not freed before being set to NULL.
2012-03-07 12:49:13 +01:00
Fabrice Fontaine
0469388b73 SF Bug Tracker id 3498439 - Memory leak in removeServiceTable
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:35:46 PST

UDN is not freed.
2012-03-07 12:41:21 +01:00
Fabrice Fontaine
268abf72fb SF Bug Tracker id 3498436 - Memory leak in Parser_processAttributeName
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:30:57 PST

attr is not freed if ixmlNode_setNodeProperties or
ixmlNode_setAttributeNode return an error in
Parser_processAttributeName.
2012-03-07 12:36:45 +01:00
Fabrice Fontaine
288ef35cee Fixing an error in d6db7c555d commit
Evt.Sid should not be cast into char* when calling sizeof otherwise
size will be 4.
2012-03-07 10:26:42 +01:00
Fabrice Fontaine
7ef089b09a Removing two unused variables in ssdp_server.c
Removing first TempPtr allocation in unique_service_name as well as one
of the dbgStr allocation in AdvertizeAndReply as those values were not
used.
2012-03-06 18:36:48 +01:00
Fabrice Fontaine
c13b1f7e37 SF Bug Tracker id 3497714 - Buffer overflows
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-06 07:36:08 PST

Call to strcpy should be replaced by call to memset and strncpy to
avoid getting buffer overflows.
2012-03-06 17:41:47 +01:00
Fabrice Fontaine
3e7bf14488 Merge branch 'branch-1.6.x' of ssh://pupnp.git.sourceforge.net/gitroot/pupnp/pupnp into branch-1.6.x 2012-03-06 09:58:54 +01:00
Fabrice Fontaine
a8bcbe9491 SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 14:20:58 PST

fileSize = ftell( xmlFilePtr ); can return a negative value, in this
case the function should exit (at the moment, the function exits only
if ftell returns 0).
2012-03-06 00:23:54 +01:00
Fabrice Fontaine
1a1570fe0f SF Bug Tracker id 3497140 - Bug fix in http_get_code_text
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 13:07:03 PST

Replace if( statusCode < 100 && statusCode >= 600 ) which can't be true
by if( statusCode < 100 || statusCode >= 600 ).
2012-03-06 00:14:45 +01:00
Fabrice Fontaine
30badb44c7 SF Bug Tracker id 3497126 - Resource leak in http_RecvPostMessage
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 12:33:59 PST

Fp is not closed when an error is raised on membuffer_append or
sock_read.
2012-03-05 22:35:54 +01:00
Nick Leverton
3504b13eae SF Bug Tracker id 2989399 - UpnpSetVirtualDirCallbacks API removal in 1.6.x
Submitted: Nick Leverton ( leveret ) - 2010-04-19 07:44:10 PDT

Details: The recent codebase merge has removed a significant API call
which is used by several pupnp devices such as mediatomb and gmediaserver.
UpnpSetVirtualDirCallbacks() has been replaced by individual routines to
set each callback. Essentially this means that 1.6.7 will in fact be a majo
bump and 1.6.6 devices can no longer link against it. Could we have the call
reinstated please, perhaps as a wrapper around the individual calls ? As
it is, all distros will have to patch their 1.6.x apps, rebuild and re-link them.

The other removed API calls and external variables don't seem to be used
by any of the apps I have copies of, but UpnpSetVirtualDirCallbacks is
important for maintaining compatibility within 1.6.x.
2012-03-05 18:21:49 -03:00
Yoichi NAKAYAMA
d6f1e4112e SF Bug Tracker id 3325246 - Memory Leak in XML Parser
Submitted: Terry Farnham ( tfarnham ) - 2011-06-23 09:45:54 PDT

Details: The following bit of xml results in a memory leak from the xml
parser:

const char *xmlbuffer="<?xml version=\"1.0\" encoding=\"utf-8\"?>
<root xmlns=\"urn:schemas-upnp-org:device-1-0\" xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">
<dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">DMS-1.50</dlna:X_DLNADOC></root>";

When I execute the following code:

IXML_Document *doc = ixmlParseBuffer(xmlbuffer);
ixmlDocument_free(doc);

It results in a memory leak in ixmlparser.c line 2107 where it calls
safe_strdup( newElement->namespaceURI ); It's difficult to figure out why.
2012-03-05 16:59:15 -03:00
Yoichi NAKAYAMA
e5887c9036 SF Bug Tracker id 3417134 - Crash seen in UpnpFinish
Submitted: Sunil ( sunilangadi ) - 2011-10-02 08:28:47 PDT

Details: I observed crash in the below mentioned log statement in
function upnpfinish(file: upnpapi.c).
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Exiting UpnpFinish:
	UpnpSdkInit is :%d:\n", UpnpSdkInit);

In particular it was crashing in ithread_self in
UpnpDisplayFileAndLine(file upnpdebug.c) on WIN32.

Moving the call ithread_cleanup_library() below the upnp printf call
mentioned above in function upnpfinish fixed the crash but I couldn't get
to the root of the problem.

The problem was observed on WIN32.
2012-03-05 15:05:20 -03:00
Fabrice Fontaine
eeab71082f SF Bug Tracker id 3497034 - Buffer not null terminated in UpnpGetIfInfo
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:43:52 PST

gIF_NAME might be not null terminated.
2012-03-05 17:43:26 +01:00
Fabrice Fontaine
f6e88d5b0a SF Bug Tracker id 3497033 - Buffer not null terminated in UpnpInit
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:42:18 PST

gIF_IPV4, gIF_IPV6 and gIF_IPV6_ULA_GUA might be not null terminated.
Moreover, gIF_IPV4 should be 16 characters (INET_ADDRSTRLEN) and not 22
and gIF_IPV6 should be 46 characters (INET6_ADDRSTRLEN) and not 65.
2012-03-05 17:36:41 +01:00
Fabrice Fontaine
add51536fc Bug fix of lastest commit (parse_hostport)
Missing parenthesis in memset.
2012-03-05 17:31:20 +01:00
Fabrice Fontaine
40864da7c1 SF Bug Tracker id 3497027 - Buffer not null terminated in parse_hostport
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:28:38 PST

workbuf might be not null terminated.
2012-03-05 17:13:08 +01:00
Fabrice Fontaine
5caaf3ad07 SF Bug Tracker id 3497009 - Resource leak in http_SendMessage
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 05:51:44 PST

Fp is not closed if fseeko(Fp, Instr->RangeOffset, SEEK_CUR) does not return 0.
2012-03-05 17:12:15 +01:00
Fabrice Fontaine
26c3f87eca HInfo->ServiceTable initialization in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4
Initialize also HInfo->ServiceTable in UpnpRegisterRootDevice2 and
UpnpRegisterRootDevice4 functions
2012-03-05 12:43:07 +01:00
Yoichi NAKAYAMA
20372ccef6 Initialize ServiceTable. 2012-03-05 12:36:29 +01:00
Yoichi NAKAYAMA
47c86542bc Add error handling. 2012-03-05 12:26:41 +01:00
Fabrice Fontaine
da244683cf SF Bug Tracker id 3496942 - Memory leak in config_description_doc
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:55:54 PST

element was not freed if membuffer_append_str(&url_str, "http://") does
not return 0. Moreover addNew was not used.
2012-03-05 11:58:54 +01:00
Fabrice Fontaine
7301f46269 SF Bug Tracker id 3496938 - Missing structures initialisation in some functions
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:31:16 PST

Memsetting to 0 some of the structures: finfo in process_request,
job in readFromSSDPSocket, request in http_OpenHttpGetEx, job in
genaNotifyThread, job in genaNotifyAllExt, job in genaNotifyAll,
job in genaInitNotifyExt, job in genaInitNotify, LocalAddr in
getlocalhostname.
2012-03-05 11:52:22 +01:00
Fabrice Fontaine
bd203e780e SF Bug Tracker id 3496934 - Memory leaks in getlocalhostname and UpnpGetIfInfo
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:25:42 PST

LocalSock is not closed if ioctl(LocalSock, SIOCGIFCONF, &ifConf);
returns an error.
2012-03-05 11:33:12 +01:00
Fabrice Fontaine
69f3fe2330 SF Bug Tracker id 3496933 - Out-of-bounds access in CheckOtherHTTPHeaders
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:15:34 PST

An out-of-bands access is raised because size of
RespInst->AcceptLanguageHeader is 200 and TmpBuf size is 180.
2012-03-05 11:20:07 +01:00
Fabrice Fontaine
52df3081df Remove unused currentDevice variable in removeServiceTable
currentDevice is not used in this function.
2012-03-05 11:12:37 +01:00
Fabrice Fontaine
71e77a5b27 SF Bug Tracker id 3496581 - Memory leak in getServiceList
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-03 08:43:23 PST

serviceNodeList is not freed if
current->next = malloc(sizeof(service_info)); returns NULL.
2012-03-05 10:59:20 +01:00
Fabrice Fontaine
a79a149e6a SF Bug Tracker id 3495616 - Memory leak in ixmlElement_setAttributeNS
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-29 02:09:43 PST

newAttrNode is not freed if newAttr->n.nodeValue = strdup(value); returns
NULL or if ixmlElement_setAttributeNodeNS(element, newAttr, NULL) does
not return IXML_SUCCESS.
2012-03-01 14:04:26 +01:00
Fabrice Fontaine
0693adc7dc SF Bug Tracker id 3495286 - Double free in get_action_node
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:27:54 PST

ixmlFreeDOMString(ActNodeName); is called twice if
ixmlParseBufferEx(ActNodeName, RespNode); does not return IXML_SUCCESS.
2012-03-01 14:02:34 +01:00
Fabrice Fontaine
076f8e5be6 SF Bug Tracker id 3495280 - Memory leak in ixmlDocument_createElementEx
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:01:02 PST

There is a memory leak in ixmlDocument_createElementEx:
newElement->tagName is not freed if
newElement->n.nodeName = strdup(tagName); returns NULL.
2012-03-01 10:47:10 +01:00
Fabrice Fontaine
60f9df425b SF Bug Tracker id 3494865 - Use of non-initialized variable in parser_parse_requestline
Submitted: Marcelo Roberto jimenez ( mroberto ) - 2012-02-26 16:50:23 PST

src/genlib/net/http/httpparser.c: In function ‘parser_parse_requestline’:
src/genlib/net/http/httpparser.c:1319:28: warning: ‘index’ may be used uninitialized in this function
(cherry picked from commit 9125d82010)
2012-02-29 15:15:28 -03:00
Marcelo Roberto Jimenez
fa83dd4a00 Update of THANKS file 2012-02-26 21:58:28 -03:00
Marcelo Roberto Jimenez
795de3e077 SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST

In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c),
ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew
returns UPNP_E_SUCCESS.

This fixes the an issue introduced by the previous fix.
2012-02-26 21:36:24 -03:00
Yoichi NAKAYAMA
a567576100 Remove files missing in branch-1.6.x. 2012-02-26 01:36:59 -03:00
Marcelo Roberto Jimenez
bc473d5e68 SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST

In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c),
ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew
returns UPNP_E_SUCCESS.

This fixes the original issue.
2012-02-26 01:12:59 -03:00
Marcelo Roberto Jimenez
2940cbf94a SF Bug Tracker: UpnpString leaks in genaSubscribe()
In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c),
ActualSID and EventURL will not be freed.
2012-02-23 16:30:19 -02:00
Marcelo Roberto Jimenez
d87c966ec5 SF Bug Tracker: http lib only accepts HTTP/1.1 - ID:3485745
Submitted by Berend Dekens ( Berend Dekens ) - 2012-02-08 06:24:31 PST

In httpparser.c on line 1385 it says that HTTP 1.0 replies are blocked
because the UPnP verfication tool requires this.

I looked in the specs and as far as I can find, one should only be
carefull to send chunked communication to hosts supporting HTTP 1.1.
There is no requirement to support only HTTP 1.1.

The XBMC media server uses the Platinum UPnP library which replies
using HTTP/1.0 messages. As it is now, libupnp returns an error while
trying to parse the response while the response itself is completely
valid.

Is there a requirement in the UPnP 1.0 spec that I missed or is this
restriction self-imposed? And can it be lifted?

-------------------------------------------------------------------

Comment by Fabrice Fontaine:

Hide
Hi,

You're right, this modification should be removed. This version checking
was wrongly added in parser_parse_responseline function.

...
2012-02-23 15:29:45 -02:00
Marcelo Roberto Jimenez
e88d9dbedc White spaces. 2012-02-23 15:20:02 -02:00
Fabrice Fontaine
33fcfeb79f Bug fix for IPv4-mapped IPv6 addresses.
Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets
with IPv4-mapped IPv6 addresses on IPv6 sockets.
2012-02-18 16:05:50 -02:00
Edwin Stearns
a9c24fc7f3 Be nice to a server that returns its URL without a trailing slash
Attached is a patch that resolved an issue I found with a server that
gave its device description URI without a trailing slash (e.g.
`http://127.0.0.1:5555`).
2012-02-18 11:35:21 -02:00
Fabrice Fontaine
537581d8ad Bug fix for IPv4-mapped IPv6 addresses.
Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets
with IPv4-mapped IPv6 addresses on IPv6 sockets.
2012-02-18 11:22:53 -02:00
Marcelo Roberto Jimenez
66ea2ab11d Homekeeping for the next release. 2012-01-25 10:40:26 -02:00
Marcelo Roberto Jimenez
4ca0b382ea Adjust the library numbers for release. 2012-01-25 10:34:43 -02:00
Fabrice Fontaine
c155d3c68f Bug fix on M-SEARCH for IPv6 CPs.
Small bug fix on IPv6 Control Point: now CP will also send M-SEARCH on
site-scope address (FF05::C) instead of only sending M-SEARCH on
link-scope (FF02::C).
2012-01-25 09:56:02 -02:00
Fabrice Fontaine
03bd7759cd Retrieve IPv6 addresses in Upnp_Discovery.
Changing sockaddr_in into sockaddr_storage in Upnp_Discovery to be able
to retrieve IPv6 addresses of devices in Control Points using pupnp.
2012-01-25 09:54:14 -02:00
Fabrice Fontaine
80a65e5f61 Bug fix for IPv4-mapped IPv6 addresses.
Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets
with IPv4-mapped IPv6 addresses on IPv6 sockets.
2012-01-25 09:41:59 -02:00
Marcelo Roberto Jimenez
3b33626e2f Fix for return value of UpnpResolveURL and UpnpResolveURL2
SF Bug tracker, ID: 3469344
	Submitted: dimmman ( dimmman ) - 2012-01-04 01:44:29 PST
	Details: Looking at the code (v1.6.14, upnptools.c) for UpnpResolveURL
	and UpnpResolveURL2 it shows that the ExitFunction: always returns
	UPNP_E_SUCCESS.

	I'm farily sure it's a simple mistake that should have been "return ret;"
	in both cases.

	Br,
	Jonny
2012-01-09 08:58:03 -02:00
Marcelo Roberto Jimenez
b35761e893 Homekeeping for the next release. 2011-11-14 12:54:21 -02:00
Marcelo Roberto Jimenez
631259dcfc Adjust the library numbers for release. 2011-11-14 12:20:20 -02:00
Fabrice Fontaine
98e4f938d6 UPnP Low Power support
Adding two new functions (UpnpSendAdvertisementLowPower and
UpnpUnRegisterRootDeviceLowPower) which can be used to specify values
for the three SSDP headers defined by UPnP Low Power. Those headers are
Powerstate, SleepPeriod and RegistrationState.
2011-11-04 20:21:58 -02:00
Fabrice Fontaine
92c93a8010 Bug fix in IN6_IS_ADDR_GLOBAL.
Changing IN6_IS_ADDR_GLOBAL to accept all IPv6 addresses which have a
2000::/3 prefix.
2011-11-01 18:59:49 -02:00
Nick Leverton
e40e6b49d4 Summary: upnptools.h should #include upnpconfig.h - ID: 3426326
(cherry picked from commit ef7bbc4866)
2011-10-20 12:30:05 +01:00
Marcelo Roberto Jimenez
cec07d641a autoconfig.h for windows builds. 2011-07-20 06:21:32 -03:00
Fabrice Fontaine
6c6fb3707f Bug Fix on M-SEARCH.
Do not answer to M-SEARCH using HTTP version 1.0 as specified by the
UPnP Device Architecture.
2011-07-20 06:10:07 -03:00
Iain Denniston
92ea719804 Fixes for compilation under Windows (specifically MSVC). Also added MSVC supported "_inline", and fixed some WIN32 specific warnings. 2011-04-02 23:47:00 -03:00
Iain Denniston
fed316ff3e Several fixes to correctly use SOCKET (and related) types instead of non-portable variations. 2011-04-02 23:38:53 -03:00
Marcelo Roberto Jimenez
8eb7d1c1a5 Homekeeping for the next release. 2011-03-17 09:27:55 -03:00
Marcelo Roberto Jimenez
2b263b6574 Adjust the library numbers for release. 2011-03-17 09:15:19 -03:00
Marcelo Roberto Jimenez
e16cb4b225 Silence compiler warning message.
warning: unused parameter ‘listen_port6’
2011-03-15 18:27:17 -03:00
Fabrice Fontaine
0996d23318 Putting ssdpReqSocks under compilation flag.
Putting all access to ssdpReqSock4 and ssdpReqSock6 under
INCLUDE_CLIENT_APIS compilation flag to be able to compile when
client part of library is disable.
2011-03-15 18:22:30 -03:00
Fabrice Fontaine
11f9a2bafe New UpnpRegisterRootDevice4 for legacy CPs.
Add a new UpnpRegisterRootDevice4 which allow user to specify a
description URL to be returned for legacy CPs (for example, CPs
searching for a v1 when the device is v2). Most of those CPs does not
work if they found a v2 in the XML description, so this new function is
only used to solve interoperability issues.
2011-03-15 18:17:05 -03:00
Iain Denniston
8aca337de7 Fix for memory leak 2011-03-11 18:33:43 -03:00
Iain Denniston
a78a048577 Fix and Update of MSVC9 solution and project files 2011-03-11 18:07:49 -03:00
Iain Denniston
7338411c08 Partial fix for UpnpGetIfInfo with MSVC 2011-03-11 17:52:07 -03:00
Marcelo Roberto Jimenez
3a9ae348bc Created the macros PRIzd and PRIzx to deal with MSVC lack of C99.
Thanks to Iain Denniston for pointing it out.
2011-03-11 17:20:17 -03:00
Iain Denniston
840669b253 Fixes for headers when compiled under C++ 2011-03-11 16:07:51 -03:00
Marcelo Roberto Jimenez
e30e7bd586 Fix for uuid_unpack incorrect shift precedence. 2011-03-10 16:21:25 -03:00
Marcelo Roberto Jimenez
0d3412bb24 Homekeeping for the next release. 2011-02-08 21:48:46 -02:00
Marcelo Roberto Jimenez
e52dafda3b Adjust the library numbers for release. 2011-02-08 21:44:31 -02:00
Marcelo Roberto Jimenez
bab22c694b Undo the "incorrectly exported include files".
Legacy applications like linux-igd and igd2-for-linux are using those
API to create a thread pool for managing their GENA events.

Leave it to be reworked in 1.8.x.
2011-02-08 21:37:13 -02:00
Marcelo Roberto Jimenez
74665acd57 Homekeeping for the next release. 2011-02-07 22:41:08 -02:00
Marcelo Roberto Jimenez
b1629b8ac8 Adjust the library numbers for release. 2011-02-07 22:35:57 -02:00
Marcelo Roberto Jimenez
32e510b45a Remove PrintThreadPoolStats() from the public API.
This function uses a ThreadPool object as an argument, which is not
supposed to be exported. Also, debug compilation was broken.
2011-02-07 22:33:42 -02:00
Fabrice Fontaine
063d472f80 Major bug fix in IPv6 code.
Major bug fix in miniserver.c for IPv6, bug was introduced when
changing implementation of get_port in November 20th 2010 ("gena:fix
several compiler warnings" commit).
2011-02-07 21:27:41 -02:00
Marcelo Roberto Jimenez
0bbe9f62df Fix for incorrectly exported include files.
The files FreeList.h, LinkedList.h, ThreadPool.h and TimerThread.h
from the threautil library were being installed in the include
directory of the library, incorrectly exposing internal data structure
of the library.
2011-02-06 11:52:47 -02:00
Marcelo Roberto Jimenez
fdb8b9ef2f White spaces and indentation. 2011-01-30 09:40:48 -02:00
Chandra Penke
6c125feea0 Fix for compilation errors
Fix for compilation warnings of unused variables in upnpdebug.c in
release builds.
2011-01-30 09:36:05 -02:00
Chandra Penke
c4e9757bcf Fix for Race condition can hang miniserver thread.
Add 'requiredThreads' field to the ThreadPool structure, to avoid
a race condition when waiting for a new thread to be created. The
race condition occurs when a thread is destroyed while the master
thread is waiting for a new thread to be created.

Thanks to Chuck Thomason for pointing the problem.

Summary: Race condition can hang miniserver thread - ID: 3158591

Details:
Hello,

I have found a race condition in the thread pool handling of
libupnp-1.6.6 that periodically results in the miniserver thread
getting blocked infinitely.

In my setup, I have the miniserver thread pool configured with 1
job per thread, 2 threads minimum, and 50 threads maximum.

Just before the lockup occurs, the miniserver thread pool contains
2 threads: one worker thread hanging around from a previous HTTP
request job (let's call that thread "old_worker") and the
miniserver thread itself.

A new HTTP request comes in. Accordingly, the miniserver enters
schedule_request_job() and then ThreadPoolAdd(). In
ThreadPoolAdd(), the job gets added to the medium-priority queue,
and AddWorker() is called. In AddWorker(), jobs = 1 and threads =
1, so CreateWorker gets called.

When we enter CreateWorker(), tp->totalThreads is 2, so
currentThreads is 3. The function creates a new thread and then
blocks on tp->start_and_shutdown. The miniserver thread expects
the newly created thread to increment tp->totalThreads and then
signal the condition variable to wake up the miniserver thread and
let it proceed.

The newly created thread starts in the WorkerThread() function. It
increments tp->totalThreads to 3, does a broadcast on the
start_and_shutdown condition, and starts running its job. However,
before the miniserver thread wakes up, "old_worker" times out. It
sees that there are no jobs in any queue and that the total number
of threads (3) is more than the minimum (2). As a result, it
reduces tp->totalThreads to 2 and dies.

Now the miniserver thread finally wakes up. It checks
tp->totalThreads and sees that its value is 2, so it blocks on
tp->start_and_shutdown again. It has now "missed" seeing
tp->totalThreads get incremented to 3 and will never be unblocked
again.

When this issue does occur for a server device, the miniserver
port remains open, but becomes unresponsive since the miniserver
thread is stuck. SSDP alive messages keep getting sent out, as
they are handled by a separate thread. Reproducing the issue is
difficult due to the timing coincidence involved, but in my
environment I am presently seeing it at least once a day. I
figured out the sequence described above through addition of my
own debug logs.

The relevant code involved in this bug has not changed
substantially in libupnp-1.6.10, though I am planning to test
against 1.6.10 as well in the near future.

Do you have any input for an elegant fix for this issue?

Thanks,

Chuck Thomason
2011-01-20 04:45:27 -02:00
Marcelo Roberto Jimenez
639d3a5a03 Update the documentation about samples in README.
Thanks to Tom (tomdev2).
2011-01-17 11:36:52 -02:00
Chandra Penke
f46683fd0e Fix for typo in strndup() function definition. 2011-01-17 09:03:34 -02:00
Marcelo Roberto Jimenez
abfa841318 Define _FILE_OFFSET_BITS, _LARGEFILE_SOURCE and _LARGE_FILE_SOURCE in upnpconfig.h.
Make these definitions available to programs using the library.
Thanks to Chandra Penke for pointing the problem.
2011-01-16 22:38:18 -02:00
Chandra Penke
3c4ff99cdb Allow virtual callbacks to use chunked encoding by setting the file length of a UpnpFileInfo object to be UPNP_USING_CHUNKED. 2011-01-16 21:28:13 -02:00
Marcelo Roberto Jimenez
541679d651 Use config.h to test for the availability of strndup() and strnlen(). 2011-01-16 21:05:07 -02:00
Chandra Penke
cb1188d2bc Fixes chunked transfer encoding in HTTP client API 2011-01-15 21:11:24 -02:00
Marcelo Roberto Jimenez
189ce59dbe Null termination of strndup() implementation on systems missing it.
Also, implementation of strnlen() on systems missing it.
2011-01-14 22:05:22 -02:00
Marcelo Roberto Jimenez
4815e52586 Doxygen on membuffer. 2011-01-14 10:26:45 -02:00
Marcelo Roberto Jimenez
9051731a93 Minor change in membuffer.c to include "membuffer.h"
...without looking in the standard header path. This allows pupnp
to build in xcode.
2011-01-14 09:54:59 -02:00
Marcelo Roberto Jimenez
39fd869db8 Leave just one call to gmtime() in http_MakeMessage(). 2011-01-02 22:36:13 -02:00
Marcelo Roberto Jimenez
8997e7fff6 Make sure va_end() is called in http_MakeMessage(). 2011-01-02 22:31:10 -02:00
Marcelo Roberto Jimenez
7e8d1787c9 Fixes many problems in sample code.
In particular, undoes 25c908c558:
SF Patch Tracker [ 2836704 ] Search for nested serviceList (not
stopping at the first lis
Submitted By: zephyrus ( zephyrus00jp )

The original zephyrus' code is still #ifdef'd in the file, if someone
wishes to fix it, check for "#ifdef OLD_FIND_SERVICE_CODE".
2010-12-23 22:22:32 -02:00
Marcelo Roberto Jimenez
70d2a7c9e7 Simplify code in SampleUtil_GetFirstDocumentItem(). 2010-12-23 18:40:53 -02:00
Marcelo Roberto Jimenez
40e6e4503c Doxygen and white spaces in samples. 2010-12-22 11:54:45 -02:00
Marcelo Roberto Jimenez
4b0c8d52b8 Remove unnecessary inclusion of param.h. 2010-12-22 11:02:14 -02:00
Marcelo Roberto Jimenez
c05bbec6ec Fix for segfault in sample code. 2010-12-22 10:52:29 -02:00
Marcelo Roberto Jimenez
d5af7efeb8 Fix debug compilation when CFLAGS is set on the configure line. 2010-12-22 09:58:48 -02:00
Marcelo Roberto Jimenez
c8af5ec806 White spaces and some debugging information. 2010-12-22 09:55:48 -02:00
Marcelo Roberto Jimenez
1ee8cd9e1a Ivan Romanov's system file inclusion patch for WIN32 (mingw). 2010-12-21 08:33:57 -02:00
Marcelo Roberto Jimenez
a0ebf23785 Missed this inline in ssdplib.h. 2010-12-19 22:57:01 -02:00
Marcelo Roberto Jimenez
cdf35baa34 Remove unused enum SsdpCmdType and unused typedef Event. 2010-12-19 22:53:08 -02:00
Marcelo Roberto Jimenez
6d7702d3a7 Syncronize ssdplib in 1.6.x and 1.8.x, part 2. 2010-12-19 21:39:19 -02:00
Marcelo Roberto Jimenez
6af93e6ca6 White spaces. 2010-12-19 21:19:44 -02:00
Marcelo Roberto Jimenez
2ce88f80f0 Syncronize ssdplib in 1.6.x and 1.8.x. 2010-12-19 21:14:39 -02:00
Marcelo Roberto Jimenez
f67ed1949b Less include file mess and doxygenation. 2010-12-19 19:02:42 -02:00
Marcelo Roberto Jimenez
04d64a893b Doxygenation of SSDP library. 2010-12-19 13:41:58 -02:00
Marcelo Roberto Jimenez
704dca3df1 Doxygen. 2010-12-18 20:01:49 -02:00
Marcelo Roberto Jimenez
b2a88aa70b SF Tracker: Patches - Fedora mingw32 compilation - ID: 3138849
Details:
Hello. I trying compile libupnp-1.6.10 on the Fedora 14 MinGW
Environment and get many errors. I create patch to fix it. With this
patch i can get static library. This patch is very raw.

Submitted: Ivan Romanov (ivanromanov) - 2010-12-16 23:29:19 UTC
2010-12-18 19:29:24 -02:00
Marcelo Roberto Jimenez
bb5a80c05b Get rid of useless integer typedefs.
Remove unsigned32, unsigned16 and unsigned8 references in the code.
2010-12-18 18:17:14 -02:00
Marcelo Roberto Jimenez
7e8e5621a8 Remove unnecessary header <sys/utsname.h> from upnpapi.c. 2010-12-18 18:09:35 -02:00
Marcelo Roberto Jimenez
462505ff62 Use the new include files UpnpIntTypes.h, UpnpStdInt.h and UpnpUniStd.h.
Trying to keep platform dependency on the headers and clean the main
code a little bit.
2010-12-18 17:08:36 -02:00
Marcelo Roberto Jimenez
d6418b3e17 White spaces. 2010-12-18 16:00:35 -02:00
Marcelo Roberto Jimenez
e8106e4f05 Doxygen. 2010-12-13 09:33:49 -02:00
Marcelo Roberto Jimenez
3dd133a03c Homekeeping for the next release. 2010-12-11 16:42:20 -02:00
Marcelo Roberto Jimenez
79aa205657 Adjust the library numbers for release. 2010-12-11 16:35:29 -02:00
Marcelo Roberto Jimenez
9a28fcc95b Fixes a bug introduced in a previous commit in http_SendMessage.
The variable num_read was beeing used without beeing initialized.

Also, clean up the function return path and make sure va_end()
is beeing called.
2010-11-24 11:26:00 -02:00
Marcelo Roberto Jimenez
bfbd07cb40 Reformat calls to http_SendMessage(). 2010-11-24 11:12:33 -02:00
Marcelo Roberto Jimenez
255d5ee874 soap_device: Doxygen and code reformat. 2010-11-24 11:10:18 -02:00
Fabrice Fontaine
2c3bce13bd Major bug fix in http_SendMessage.
Currently, http_SendMessage was not able to write to write a buffer
due to a bad use of file_buf instead of buf. This bug was introduced by
the 0197-Doxygen-reformating-compiler-warnings patch.
2010-11-24 08:21:41 -02:00
Fabrice Fontaine
bda942b22a Returning the SID in Upnp_Event_Subscribe.
Currently, Upnp_Event_Subscribe always contains an empty chain in the
Sid parameter. This patch now saves the client Subscription ID in this
parameter so Control Points can see and use the same SID in the
Upnp_Event_Subscribe and in the Upnp_Event structures.
2010-11-24 08:21:33 -02:00
Juergen Lock
ed0ebe1588 Two fixes from Juergen Lock <nox(at)jelal.kn-bremen.de>:
1. varargs:  pass size of CRLF as size_t not as int:

--- upnp/src/gena/gena_device.c.orig
+++ upnp/src/gena/gena_device.c
@@ -225,7 +225,7 @@ static UPNP_INLINE int notify_send_and_r
		"bbb",
		start_msg.buf, start_msg.length,
		propertySet, strlen(propertySet),
-		"\r\n", 2);
+		"\r\n", sizeof "\r\n" - 1);
	if (ret_code) {
		membuffer_destroy(&start_msg);
		sock_destroy(&info, SD_BOTH);

2. Remove "b" arg here, there is no buffer passed:  (this caused a pointer
to be interpreted as a buffer size to be alloc'd/copied, hence the 32 GB.)

--- upnp/src/genlib/net/http/webserver.c.orig
+++ upnp/src/genlib/net/http/webserver.c
@@ -1262,7 +1262,7 @@ static int process_request(
			// Content-Range: bytes 222-3333/4000  HTTP_PARTIAL_CONTENT
			// Transfer-Encoding: chunked
			if (http_MakeMessage(headers, resp_major, resp_minor,
-				"R" "TLD" "s" "tcS" "b" "Xc" "sCc",
+				"R" "TLD" "s" "tcS" "Xc" "sCc",
				HTTP_OK,    // status code
				finfo.content_type, // content type
				RespInstr,  // language info
2010-11-22 23:28:56 -02:00
Marcelo Roberto Jimenez
a39f3a63c3 White spaces. 2010-11-22 13:21:30 -02:00
Marcelo Roberto Jimenez
6e7a2bb2dc Remove the "xboolean" typedef from the code base. 2010-11-22 09:28:17 -02:00
Marcelo Roberto Jimenez
c21a67f2d1 Doxygen, reformating, compiler warnings. 2010-11-21 21:40:07 -02:00
Marcelo Roberto Jimenez
c449fd1521 ssdp, soap, genlib: fix compiler warnings. 2010-11-20 19:08:20 -02:00
Marcelo Roberto Jimenez
594c611a33 gena: fix several compiler warnings. 2010-11-20 13:48:50 -02:00
Marcelo Roberto Jimenez
09f2b6ca30 uuid.c: fix compiler warnings. 2010-11-20 11:30:22 -02:00
Marcelo Roberto Jimenez
9b3a0999a9 upnp: fix for compiler warnings. 2010-11-18 14:57:11 -02:00
Marcelo Roberto Jimenez
d8a27bca96 upnp: fix for compiler warnings and incorrect API. 2010-11-18 14:55:39 -02:00
Marcelo Roberto Jimenez
6bee05a517 samples: One more code reorganization. 2010-11-18 13:59:08 -02:00
Marcelo Roberto Jimenez
2e96edcbc5 samples: fix compiler warnings. 2010-11-18 13:34:04 -02:00
Marcelo Roberto Jimenez
ef0aa38958 samples: More code reorganization. 2010-11-18 12:02:38 -02:00
Marcelo Roberto Jimenez
86159bc2a6 samples: Put more data in common_data.h. 2010-11-18 01:02:27 -02:00
Marcelo Roberto Jimenez
bd8d6cfc8b samples: Unified sample code.
This patch removes duplicated code in samples.
2010-11-18 00:47:45 -02:00
Marcelo Roberto Jimenez
8434e1e936 Update autoconfig.h. 2010-11-17 23:31:07 -02:00
Marcelo Roberto Jimenez
2765bc39c5 Remove "upnp_" prefix from samples. 2010-11-17 23:30:29 -02:00
Marcelo Roberto Jimenez
75695fcaf1 samples: Fix compiler warnings. 2010-11-17 11:54:31 -02:00
Marcelo Roberto Jimenez
5abd1a3b3e Fix some compiler warnings and some Doxygen. 2010-11-17 01:24:38 -02:00
Marcelo Roberto Jimenez
6c31683e29 Some Doxygen in upnp_tv_device.
(cherry picked from commit d5fa48bd37)
2010-11-16 23:22:59 -02:00
Marcelo Roberto Jimenez
d92e26779a Some Doxygen on sample_util.
(cherry picked from commit 0d625bd2e1)
2010-11-16 23:22:51 -02:00
Marcelo Roberto Jimenez
5d6bcabd45 Removes C++ style comments. 2010-11-16 03:14:12 -02:00
Marcelo Roberto Jimenez
7c524df1d9 threadutil: Doxygenation and compiler warnings. 2010-11-16 00:17:44 -02:00
Marcelo Roberto Jimenez
58c694f57d ixml: Fix for compiler warnings for size_t and ptrdiff_t.
ixmlparser.c static functions have been reordered.
2010-11-15 21:29:07 -02:00
Marcelo Roberto Jimenez
da7f3bf1c1 Deal with "inline" when "-ansi" compiler option is active.
This mode can be recognized by the macro __STRICT_ANSI__.

From man gcc:

-ansi
 In C mode, this is equivalent to -std=c89. In C++ mode, it is equivalent to
-std=c++98.

 This turns off certain features of GCC that are incompatible with ISO C90
(when compiling C code), or of standard (when compiling code), such as the
asm and typeof keywords, and predefined macros such as unix and vax that
identify the type of system you are using. It also enables the undesirable
and rarely used ISO trigraph feature. For the C compiler, it disables
recognition of style // comments as well as the inline keyword.

 The alternate keywords _ _asm_ _, _ _extension_ _, _ _inline_ _ and
_ _typeof_ _ continue to work despite -ansi. You would not want to use them
in an ISO C program, of course, but it is useful to put them in header files
that might be included in compilations done with -ansi. Alternate predefined
macros such as _ _unix_ _ and _ _vax_ _ are also available, with or without
-ansi.

 The -ansi option does not cause non-ISO programs to be rejected gratuitously.
For that, -pedantic is required in addition to -ansi.

 The macro _ _STRICT_ANSI_ _ is predefined when the -ansi option is used.
Some header files may notice this macro and refrain from declaring certain
functions or defining certain macros that the ISO standard doesn't call for;
this is to avoid interfering with any programs that might use these names for
other things.

 Functions that would normally be built in but do not have semantics defined
by ISO C (such as alloca and ffs) are not built-in functions when -ansi is
used.
2010-11-15 12:50:38 -02:00
Marcelo Roberto Jimenez
8651174861 Added the convenience function UpnpResolveURL2() to upnptools.c.
This function avoids some unecessary memory allocation.
The memory alloc'd by this function must be freed later by the caller.
2010-11-15 01:01:07 -02:00
Marcelo Roberto Jimenez
2dd19e5894 ReadResponseLineAndHeaders() is static.
(cherry picked from commit eb5db65692)
2010-11-11 22:00:27 -02:00
Fabrice Fontaine
e6c548f57a Add GENA_NOTIFICATION_xxx_TIMEOUT variable.
Currently, in notify_send_and_recv function, pupnp waits for
HTTP_DEFAULT_TIMEOUT seconds when trying to send a GENA notification.
When there is a lot of notifications with CPs which was disconnected
without unsusbcribing, all the pupnp threads are blocked on this
timeout. To correct, this issue, this patch adds a new variable,
GENA_NOTIFICATION_SENDING_TIMEOUT, which can be used to lower the
timeout so GENA threads return quickly when writing is impossible. By
the same mean, pupnp waits the CP's answer to the NOTIFY for
HTTP_DEFAULT_TIMEOUT seconds, so this patch adds a new variable,
GENA_NOTIFICATION_ANSWERING_TIMEOUT, to customize this value.
2010-11-11 21:42:50 -02:00
Fabrice Fontaine
32cffb5bb5 Add --disable-blocking-tcp-connections flag.
Currently, pupnp is using a blocking connect to sends GENA
notifications. As a result, when there is a lot of notifications with
CPs which were disconnected without unsusbcribing, all the pupnp
threads are blocked for 20s (timeout). To correct this issue, this
patch replace the call to connect with a call to private_connect and add
a compilation flag to disable blocking TCP connections, so if we are not
able to connect to the CP, the notification is lost.
2010-11-11 21:40:22 -02:00
Marcelo Roberto Jimenez
2b30575ca5 Remove commented old code from webserver.c. 2010-11-11 21:31:53 -02:00
Marcelo Roberto Jimenez
d32212a6fd Changelog and THANKS update. 2010-11-07 19:20:03 -02:00
Stefan Sommerfeld
508b782c79 Fixed some typos. 2010-11-07 18:42:44 -02:00
Stefan Sommerfeld
38d5e58e22 Add a simple strndup() implementation for win32. 2010-11-07 18:31:48 -02:00
Stefan Sommerfeld
ee5bd670d4 Fix for size_t in UpnpString. 2010-11-07 18:31:48 -02:00
Stefan Sommerfeld
fcb5e7c438 Fix for size_t related warnings. 2010-11-07 18:31:48 -02:00
Stefan Sommerfeld
243cd41974 Fix for inline usage. 2010-11-07 18:31:48 -02:00
Marcelo Roberto Jimenez
853cd32cfe Remove unused parameter bufferLen from GetDescDocumentAndURL(). 2010-11-07 18:31:48 -02:00
Marcelo Roberto Jimenez
f384e54fc6 Consistent usage of win32 INVALID_SOCKET and SOCKET_ERROR.
On win32 socket() returns INVALID_SOCKET, which is unsigned,
on error, not -1.

Also, most network functions return SOCKET_ERROR.

This patch tries to make the usage consistent.
2010-11-07 18:31:47 -02:00
Stefan Sommerfeld
9e12768cdb Fixed server port definition. 2010-11-07 18:31:47 -02:00
Stefan Sommerfeld
4b47e6a51d Fix for mixed usage of SOCKET and int. 2010-11-07 17:52:14 -02:00
Stefan Sommerfeld
a5fb5edfc9 Make notify_send_and_recv() return the appropriate error code.
notify_send_and_recv() was returning the connection fd.
2010-11-07 17:52:14 -02:00
Marcelo Roberto Jimenez
8bd32d330b Proper inclusion of inet_pton.h for win32. 2010-11-07 17:52:14 -02:00
Stefan Sommerfeld
00eb52cc85 fixed wrong declaration of inet_ntop4 2010-11-07 17:52:14 -02:00
Marcelo Roberto Jimenez
ff006272b5 PTHREAD_MUTEX_RECURSIVE on DragonFly is an enum.
SF Bug Tracker - ID: 3104527
Submitted: OBATA Akio ( obache ) - 2010-11-07 07:10:28 BRST

In threadutil/inc/ithread.h, it is expected that
PTHREAD_MUTEX_RECURSIVE is defined as macro. But on DragonFly BSD,
it is defined as enum, so not works as expected.

Attachment patch treat that DragonFly BSD always
have PTHREAD_MUTEX_RECURSIVE.
2010-11-07 11:49:33 -02:00
Marcelo Roberto Jimenez
852c301c5c ftime(3) in -lcompat should not be checked.
SF Bug Tracker - ID: 3104521
Submitted: OBATA Akio ( obache ) - 2010-11-07 07:03:44 BRST

In configure.ac
AC_CHECK_FUNCS(ftime,, [AC_CHECK_LIB(compat, ftime)])

But since version 1.6.3, ftime(3) is not used, so it should be
removed, or introduce unwanted linkage with -lcompat.
2010-11-07 09:45:05 -02:00
Marcelo Roberto Jimenez
d270499cd8 Homekeeping for the next release. 2010-11-07 01:43:50 -02:00
Marcelo Roberto Jimenez
6ac867bbb1 Fix the library numbers for release. 2010-11-07 01:33:18 -02:00
Marcelo Roberto Jimenez
9052ca95be Fix broken Makefile.am and remove unused file utilall.h. 2010-11-06 19:41:47 -02:00
Marcelo Roberto Jimenez
ef7edf6cf8 Fix for "SampleUtil_Initialize was called multiple times!" bug.
Fix for bug introduced in samples code in svn revision 502, commit
git:25c908c558c8e60eb386c155a6b93add447ffec0

Sample device and combo were aborting with the message:
"***** SampleUtil_Initialize was called multiple times!"
2010-11-06 00:45:24 -02:00
Fabrice Fontaine
c65ec8a720 Make multiple SSDP advertisements faster.
Put the loop to send multiple copies of each SSDP advertisements in
ssdp_server.c instead of ssdp_device.c so we have only one call to
imillisleep ( SSDP_PAUSE ) to speed up advertisements.
2010-11-05 23:52:17 -02:00
Fabrice Fontaine
2d22e997e1 Removing unused NUM_COPY variable.
Previously, NUM_COPY was used in ssdp_device.c to send multiple copies
of each advertisements but also multiple replies to each M-SEARCH
request. As sending multiple replies is not compliant with HTTPU/MU
spec, NUM_COPY has been set to 1 in an older patch. However, as this
variable is not needed and has been replaced with SSDP_COPY, it has
been removed.
2010-11-05 23:52:11 -02:00
Fabrice Fontaine
96dc968f18 Use SSDP_COPY to send multiple SSDP advertisements.
Currently, SSDP_COPY is used only to send multiple M-SEARCH requests (in
ssdp_ctrlpt.c). With this patch, SSDP_COPY is also used to send multiple
copies of each advertisements packets (in ssdp_device.c).
2010-11-05 13:25:40 -02:00
Carl Benson
8e846368e0 patch for taking notice of UPNP_USE_RWLOCK flag in threadutil
By "Carl Benson" <carl.benson@windriver.com>:

I had to do some modifications myself though, because the Android
build system insists on having a file named "util.h" taking precedence
in its include path, libupnp gets confused because of the same filename
in upnp/src/inc/util.h
2010-11-01 01:06:11 -02:00
Marcelo Roberto Jimenez
d6671c464f Bump config to 1.6.9. 2010-11-01 01:03:40 -02:00
Marcelo Roberto Jimenez
699dd3c82e Missed this line in configure.ac in the homekeeping commit. 2010-10-21 09:55:54 -02:00
Marcelo Roberto Jimenez
9be360bcd1 Homekeeping for the next release. 2010-10-20 11:15:23 -02:00
Marcelo Roberto Jimenez
593b8d0a2b Fixes in configure.ac for release. 2010-10-20 11:11:45 -02:00
Marcelo Roberto Jimenez
890c1b6ef8 Disable debug for release. 2010-10-20 10:36:11 -02:00
Marcelo Roberto Jimenez
c127a3a87e Add docs/doxygen to .gitignore. 2010-10-20 10:35:15 -02:00
Marcelo Roberto Jimenez
bd5758186c White spaces. 2010-10-20 10:29:45 -02:00
Marcelo Roberto Jimenez
cc472bc2cd Doxygen and indentation for sock. 2010-10-20 09:05:42 -02:00
Marcelo Roberto Jimenez
6128296e5f Doxygen and indentation for miniserver. 2010-10-20 08:56:06 -02:00
Marcelo Roberto Jimenez
d84c6a7e9f Indent plus Doxygen in webserver. 2010-10-20 01:28:37 -02:00
Marcelo Roberto Jimenez
113ebd1f91 Slightly better implementation for ToUpperCase(). 2010-10-20 00:36:47 -02:00
Marcelo Roberto Jimenez
bf1450bf81 Fix a long date memory leak in webserver.c:StrStr(). 2010-10-20 00:29:08 -02:00
Marcelo Roberto Jimenez
56b9c75056 Changelog fix. 2010-10-19 16:11:39 -02:00
Marcelo Roberto Jimenez
2bdc9e075e Bug fix in select of miniserver.c
Fix a bug in miniserver.c, in which maxMiniSock was wrongly declared as
unsigned int and as a result it was beeng set to ((unsigned int)(-1)).
As a result, after beeing incremented, it became zero, and this value
was beeing used in the select() call.

Thanks to Fabrice Fontaine for helping and testing with this issue.
2010-10-19 15:49:36 -02:00
Marcelo Roberto Jimenez
923eee2393 Don't ask, UTF-8 mess? 2010-10-15 12:54:00 -03:00
Marcelo Roberto Jimenez
f74746ff3f Fix for 100% CPU issue in select() in miniserv.c. I have also removed
the sleep() call, it was just a workaround.

SF Bug Tracker [ 3086852 ] 99% CPU loop in miniserver.c on a non ipv6
system.

Submitted by: Jin ( jin_eld ) - 2010-10-13 19:29:13 UTC

I cross compiled libupnp 1.6.7 for ARM9 using the --disable-ipv6
option, my system is an ipv4 only setup.

I do not know why this problem only appears when running the app in the
background (for instance using nohup &), but then it starts using 99%
CPU.

I traced the problem down to the select() call in miniserver.c in the
RunMiniServer() function. Select returns code 1, but errno is set to
"Socket operation on non-socket", I also see this when running my app
under strace.

I set all ...Sock6 variables to INVALID_SOCKET to make sure that they
do not get added to the FD_SET and the problem is gone.
2010-10-15 12:41:36 -03:00
Marcelo Roberto Jimenez
8401a59ed5 New function, sock_close(). 2010-10-15 12:25:35 -03:00
Marcelo Roberto Jimenez
5b40cfa272 Misplaced declaration of UpnpCloseSocket. 2010-10-15 12:17:15 -03:00
Marcelo Roberto Jimenez
fcda28ba75 Remove of unused file. 2010-10-15 11:53:25 -03:00
Marcelo Roberto Jimenez
7cd434225f White spaces and comments. 2010-10-04 17:05:43 -03:00
Marcelo Roberto Jimenez
78e5ba89fa Merge of similar files. 2010-10-04 15:48:45 -03:00
Marcelo Roberto Jimenez
ebb8f209b0 Merge of similar files. 2010-10-04 15:36:11 -03:00
Marcelo Roberto Jimenez
73afd667e1 Fix for bug introduced in the last commit. 2010-10-04 13:24:38 -03:00
Marcelo Roberto Jimenez
cc294a6cf1 Merge similar code. 2010-10-04 13:03:20 -03:00
Marcelo Roberto Jimenez
458a9416c6 Merge of work from 1.8.x. 2010-10-04 12:04:38 -03:00
Marcelo Roberto Jimenez
b9eeb89250 Bumped Doxyfile version. 2010-10-04 11:44:06 -03:00
Marcelo Roberto Jimenez
a6e68b481d Updated THANKS. 2010-10-04 11:33:37 -03:00
Marcelo Roberto Jimenez
a19a896e88 Updated TODO list. 2010-10-04 11:28:37 -03:00
Marcelo Roberto Jimenez
cdee5b7cde UTF-8. 2010-10-04 11:11:33 -03:00
Marcelo Roberto Jimenez
dec78c8ef1 Echo the copy on configure output. 2010-10-04 11:01:28 -03:00
Marcelo Roberto Jimenez
fb62a5d42a Update files for windows compilation. 2010-10-04 10:51:30 -03:00
Marcelo Roberto Jimenez
a9b5081a08 Update build/inc/autoconfig.h and build/inc/upnpconfig.h at configure
time.
2010-10-04 10:47:39 -03:00
Marcelo Roberto Jimenez
3886a697b5 Remove build/inc/config.h. The right file is upnp/src/inc/config.h. 2010-10-04 10:42:32 -03:00
Marcelo Roberto Jimenez
3dab2bd00a Homekeeping for the next release. 2010-10-04 09:58:15 -03:00
Marcelo Roberto Jimenez
95f7a7eeef Whitespace fix on soaplib.h. 2010-10-02 18:57:35 -03:00
Marcelo Roberto Jimenez
ca50c2153e Remove extra soaplib.h. 2010-10-02 18:57:13 -03:00
Fabrice Fontaine
c73d870f46 Adding --disable-notification-reordering option
Adding a configure flag to disable GENA notification reordering as even
with an imillisleep(1), this mechanism consumes too much CPU on embedded
devices when there is a burst of notifications.
2010-10-02 13:44:52 -03:00
Fabrice Fontaine
ab54cb3dc5 Bug fix when there is no service in embedded devices
When a device with embedded devices (like IGD) when created and one of
the embedded devices did not have any service, there was a Segmentation
Fault (see SF Tracker [ 2688125 ]).
2010-09-30 11:51:06 -03:00
Fabrice Fontaine
c33b11d09f Bug fix on burst of GENA notification
When a lot of notifications were generated by a device in a short
period of time then 100% of the CPU was used to reorder those
notifications by pushing back the thread in the job queue. This
mechanism has been modified so now thread sleep 1 ms before being
pushed back into the job queue.

Removing DEFAULT_SCHED_PARAM parameter and use
sched_get_priority_min(DEFAULT_POLICY) instead.
2010-09-28 20:41:28 -03:00
Fabrice Fontaine
4966423d96 Bug fix on M-SEARCH response
Devices must respond to M-SEARCH requests for any supported version and the
response should specify the same version as was contained in the search target.
Previously, the device did not answer if the M-SEARCH request did not
contain the same version number than the version number of the device.
2010-09-22 15:34:45 -03:00
Marcelo Roberto Jimenez
2fb55d3874 White space fix. 2010-09-21 16:49:20 -03:00
Fabrice Fontaine
d2238615e3 Add Content-Language iff Accept-Language
Add Content-Language header in the response if and only if there is an Accept-Language header in the request.
2010-09-21 13:50:29 -03:00
Fabrice Fontaine
2fcbe6df52 Addition of WEB_SERVER_CONTENT_LANGUAGE parameter
This patch adds the WEB_SERVER_CONTENT_LANGUAGE parameter so the user can specify
the language used by the device during Description and Presentation steps of UPnP
through the HTTP CONTENT-LANGUAGE header.
By default, the WEB_SERVER_CONTENT_LANGUAGE is an empty string so no
CONTENT-LANGUAGE is added.
2010-09-21 08:48:40 -03:00
Fabrice Fontaine
467f9987a1 Customize the stack size of the threads used by pupnp through the new THREAD_STACK_SIZE variable
This patch allows a user to customize the stack size of the threads used by
pupnp through the new THREAD_STACK_SIZE variable. This is especially useful
on embedded systems with limited memory where the user can set THREAD_STACK_SIZE
to ITHREAD_STACK_MIN.

However, as this modification can have side effects, I set 0 as the default
value, so threads will continue to use the default stack size of the system
(which varies greatly as stated in
https://computing.llnl.gov/tutorials/pthreads/).
2010-09-18 06:45:56 -03:00
Marcelo Roberto Jimenez
8fbecaee5e Another fix for Changelog. 2010-09-16 08:42:14 -03:00
Fabrice Fontaine
55d581481f Broken IPv6.
IPv6 is currently broken in latest release of branch-1.6.x, so find
a patch attached that correct the issue (small fixes on define,
undef and retVal).
2010-09-16 08:21:41 -03:00
Marcelo Roberto Jimenez
a0b405f902 White spaces. 2010-09-15 06:07:42 -03:00
Marcelo Roberto Jimenez
b37f9ac64a Get rid of evil CLIENTONLY macro. 2010-09-15 05:46:07 -03:00
Marcelo Roberto Jimenez
2dad42679d White spaces. 2010-09-15 05:44:36 -03:00
Chandra Penke
ea00f0f222 Fix win32 compilation errors in visual studio 2010-09-15 05:23:53 -03:00
Marcelo Roberto Jimenez
f3ae1b4116 Added UpnpString_cmp() and UpnpString_casecmp() methods to UpnpString.
UpnpString_set_String() and UpnpString_set_StringN now return error values.
String lenghts are size_t.
(cherry picked from commit 81b28fbb90)
2010-09-12 00:35:31 -03:00
David Hoeung
67009170d1 Timeout for TCP connect
Hi,

I've made some modification to the libupnp v1.6.5
I've add a timeout for each TCP connect.

It is very useful when an UPnP device stop working and do not accept
connection for an UPnP action.

Modifications are only located in
upnp/src/genlib/net/http/httpreadwrite.c

For every TCP connection, I set the socket to non-blocking, perform
connect,
check result and wait during a timeout if necessary, then reset the
socket to blocking.

Please see this patch in attached file.

I hope it helps.

Regards,

David Hoeung
Consultant Extia
Orange Labs R&D

----
2010-09-11 00:17:55 -03:00
Warwick Harvey
2b399b1791 Take notice of UPNP_USE_RWLOCK flag.
Updated threadutil to use mutexes instead of read-write locks if
UPNP_USE_RWLOCK is false (0).
2010-09-10 22:43:30 -03:00
Marcelo Roberto Jimenez
0bec9ec1ae Remove some unused code plus some coding style in httpparser.c 2010-09-10 19:46:18 -03:00
Marcelo Roberto Jimenez
25a4bd6d25 2010-09-10 Jean Sigwald <jean.sigwald(at)orange-ftgroup.com>
I discovered a reliable denial-of-service issue on the last stable
release of libupnp (1.6.6) remotely triggerable by any
unauthenticated user. The issue is related with a bad parsing of
malformed XML.
2010-09-10 19:26:10 -03:00
Marcelo Roberto Jimenez
5755ac022f SF Patch Tracker [ 2854711 ] Patch for Solaris10 compilation and usage
Submitted By: zephyrus ( zephyrus00jp )

Patch for Solaris10 compilation and usage.
2010-09-10 19:02:31 -03:00
Marcelo Roberto Jimenez
0158f52ee2 One setp further to stop the CLIENTONLY() mess. 2010-09-10 18:56:36 -03:00
Marcelo Roberto Jimenez
0db4a6beac Fix an UTF-8 issue in README. 2010-09-10 00:47:53 -03:00
Chandra Penke
575e5fc196 SUMMARY: Minor change in comment for SetMaxContentLenght in upnp.h
This is a follow up from issue 6 in tracker id 3056713: calling UpnpSetMaxContentLength() by passing '0' disables the content length checking. This is useful for developing some prototype applications that deal with a lot of XML/SOAP data, and for debugging.

The corresponding c file change is already in the pupnp tree. Copy/pasting the relevant block of code here for clarity:

In upnp/src/genlib/net/http/httpreadwrite.c:

if (g_maxContentLength > 0 && parser->content_length > (unsigned int)g_maxContentLength) {
	*http_error_code = HTTP_REQ_ENTITY_TOO_LARGE;
	line = __LINE__;
	ret = UPNP_E_OUTOF_BOUNDS;
	goto ExitFunction;
}

This block of code checks only does the bounds check if g_maxContentLength > 0, and it's only place g_maxContentLength is checked.

Attached is a patch against the latest sources.
(cherry picked from commit 7f1e164a5a)
2010-09-10 00:42:27 -03:00
Marcelo Roberto Jimenez
0e45dd9b8f Fix for coding style and compiler warning message:
src/genlib/miniserver/miniserver.c: In function ‘get_miniserver_sockets’:
src/genlib/miniserver/miniserver.c:592: warning: unused variable ‘actual_port6’
src/genlib/miniserver/miniserver.c:582: warning: unused variable ‘__ss_v6’
2010-09-10 00:32:49 -03:00
Chandra Penke
ae516b6bd3 Add support for conditionally enabling ipv6
(cherry picked from commit 6b0d84fc95)
2010-09-10 00:32:49 -03:00
Chandra Penke
7137f6e261 Fix for compilation in debug builds.
Ensure internal methods are declared as static since debug builds don't inline.
2010-09-10 00:02:04 -03:00
Marcelo Roberto Jimenez
92b241b560 Fix for UpnpPrintf() in Chandra Penke's last commit.
src/ssdp/ssdp_ctrlpt.c: In function ‘SearchByTarget’:
src/ssdp/ssdp_ctrlpt.c:634: warning: format ‘%s’ expects type ‘char *’, but argument 6 has type ‘int’
2010-09-09 22:52:27 -03:00
Chandra Penke
2b3ab1799b Fix for regression in SSDP code to send/receive messages over UDP
Sending messages over UDP is broken in some Apple OSes
such as OS X and iOS. This might be broken in other OSes to but didn't
verify.

The fix is to modify the socket lenght argument of sendto to use the correct
sockaddr lenght dependng on whether the socket is IPV4 or IPV6.

Also added some error checks and debugging related to the issue
2010-09-09 22:52:26 -03:00
Marcelo Roberto Jimenez
4657e57766 Using UpnpReadHttpGet to download large files causes the application to
crash. This happens when the file being downloaded exceeds the device
memory - entirely possible when transferring video files.
The programmatic cause is that the logic implemented in the function
http_ReadHttpGet (which UpnpReadHttpGet calls) reads the entire file
into memory. The fix modifies the existing logic to discard data after
it's been read; there's no reason to keep it around since the caller
of UpnpReadHttpGet already has a copy of it.

This issue exists in 1.6.6 as well as the latest sources.

Patch submitted by Chandra (inactiveneurons).
2010-09-07 22:15:21 -03:00
Marcelo Roberto Jimenez
21660334e4 In the latest sources, http_RequestAndResponse and other methods that
use connect() are broken. More specifically, connect() in these methods
is returning with an EINVAL. The programatic cause is that the address_len
argument passed to connect() is different in IPV4 vs IPV6 (as described in:
http://www.opengroup.org/onlinepubs/009695399/functions/connect.html).
The current code always uses the IPV6 size. The fix modifies each use of
connect() to use the correct size based on the address family being used.

Patch submitted by Chandra (inactiveneurons).
2010-09-07 21:56:53 -03:00
Marcelo Roberto Jimenez
97af8b6fdb Fix compilation error in upnp/src/gena/gena_ctrlpt.c (this is most
likely an error on all platforms).

Patch submitted by Chandra (inactiveneurons).
2010-09-07 14:57:56 -03:00
Marcelo Roberto Jimenez
934bd2682f Fix compilation error in upnp/src/inc/ssdplib.h when compiling in OS X
(the netinet/* headers are not available).

Patch submitted by Chandra (inactiveneurons).
2010-09-07 14:51:38 -03:00
Marcelo Roberto Jimenez
b8e9628140 Fix compilation error in ixml/inc/ixml.h when compiling with an
Objective-C compiler (when cross-compiling for iPhone devices).

Patch submitted by Chandra (inactiveneurons).
2010-09-07 14:47:12 -03:00
Marcelo Roberto Jimenez
b3b7a91a64 White spaces. 2010-09-03 21:51:31 -03:00
Marcelo Roberto Jimenez
ebc941f265 Issue regarding the GENA notifications. A string termination indicator was added
at the end of the notification ("\r\n") in notify_send_and_recv() in
upnp/src/gena/gena_device.c.

Patch by Fabrice Fontaine.
2010-09-03 21:49:49 -03:00
Marcelo Roberto Jimenez
842a6ce5c8 Adding .gitignore. 2010-09-03 21:49:20 -03:00
Marcelo Roberto Jimenez
2d978c32b8 White spaces.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@581 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-22 02:10:50 +00:00
Marcelo Roberto Jimenez
e386dd0d68 The last part of Ronan Menard's patch.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@580 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-22 02:05:34 +00:00
Marcelo Roberto Jimenez
5a2cc884c1 * upnp/src/ssdp/ssdp_device.c: Fix for IPV6 ULA/GUA issues.
* upnp/src/ssdp/ssdp_ctrlpt.c: Fix for IPV6 ULA/GUA issues.
* upnp/src/ssdp/ssdp_server.c: Fix for IPV6 ULA/GUA issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@578 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-22 01:34:35 +00:00
Marcelo Roberto Jimenez
a362d06dff upnp/src/genlib/miniserver/miniserver.c: Fix for IPV6 ULA/GUA issues.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@576 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 22:13:26 +00:00
Marcelo Roberto Jimenez
0e73448ea8 * gena_subscribe(): Fix for IPV6 ULA/GUA issues.
Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@574 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:53:09 +00:00
Marcelo Roberto Jimenez
a7966b6597 * SOCKET ssdpSock6UlaGua: created variable for later use.
Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@572 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:40:00 +00:00
Marcelo Roberto Jimenez
2d5c6310a9 * SSDP_IPV6_SITELOCAL: new macro.
Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@569 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:31:55 +00:00
Marcelo Roberto Jimenez
c9bcee536e The scope of the macro NUM_HANDLE is now restricted to upnpapi.c.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@568 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:22:09 +00:00
Marcelo Roberto Jimenez
1605744278 * InitHandleList() has never been implemented, I guess no one has ever
called it, so remove it.
* GetFreeHandle() and FreeHandle() are now static as they should.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@566 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:10:50 +00:00
Marcelo Roberto Jimenez
ce0d2833a3 * New internal buffer added to store global/ula IPV6 address.
* Macros to test whether an IPV6 address is global or ula.
* UpnpGetServerUlaGuaIp6Address(): added interface.
* IN6_IS_ADDR_GLOBAL, IN6_IS_ADDR_ULA: new macros.
* gIF_IPV6_ULA_GUA: new buffer.
* UpnpRegisterRootDevice3(): Change to the test of already registered
devices for IPV6.
* UpnpGetIfInfo(): gua/ula issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@564 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 20:42:43 +00:00
Marcelo Roberto Jimenez
74db05ff1e English mispelling.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@562 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-19 13:54:44 +00:00
Marcelo Roberto Jimenez
9468e0224a libUPnP does support IPV6 now.
Patch submitted by Ronan Menard.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@560 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-19 13:48:17 +00:00
Marcelo Roberto Jimenez
cb89781a55 HTTP version equal to 1.0 should failed as required by the UPnP
certification tool. Patch submitted by Ronan Menard.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@558 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-19 13:27:50 +00:00
Marcelo Roberto Jimenez
3de0765893 Backport of svn rev 556:
SF Bug Tracker [ 3022490 ] String declaration fix for patch applied in 3007407
	Hello,

	When my patch for tracker ID 3007407 was accepted, the definition of the
	serviceList string was changed from

	#define SERVICELIST_STR "serviceList"

	to

	static const char *SERVICELIST_STR = "serviceList";

	During internal code review of the final patch, it was pointed out that 
	sizeof(SERVICELIST_STR) == 4 since SERVICELIST_STR is now declared as
	a pointer instead of an array.

	If you wish to use a variable instead of a define, I suggest the
	following instead:

	static const char SERVICELIST_STR[] = "serviceList";

	Thanks,
	Chuck Thomason



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@557 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-06-28 20:40:21 +00:00
Marcelo Roberto Jimenez
ce0e5b664f Backport of svn rev. 554:
Remove excessive 'dnl's from libupnp.m4.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@555 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-06-26 11:09:49 +00:00
Marcelo Roberto Jimenez
eec36896c3 2010-06-10 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
Backport of svn revision 552:
	SF Bug Tracker [ 3007407 ] Service traversal issue in AdvertiseAndReply()
	Submitted: Chuck Thomason ( cyt4 ) - 2010-05-26 15:07:39 UTC

	When the UPnP server is started, one alive message is broadcast for each
	service in each device. It appears that libupnp's implementation of the
	alive message generation does not correctly navigate the XML description
	document when locating the services. This can result in the wrong UDN
	being used in the alive message sent for a service.

	In my specific case (see attached XML), the root EchoSTB device contains
	no services, but its embedded MediaServer device contains 2 services.
	When the existing libupnp code traverses the EchoSTB device in the XML,
	it searches the global list of serviceLists within the document instead
	of searching for a serviceList that is its direct child node. The
	ContentDirectory and ConnectionManager services are then announced with
	the UDN of EchoSTB1 (the root device) instead of with the UDN of
	MediaServer, which is actually their parent device.

	I discovered this behavior using libupnp-1.6.6. I have generated a patch
	against branch-1.6.x that corrects the XML navigation such that all
	services are traversed from their parent device, which results in the
	correct UDN being sent in the alive message for each service. I built
	from branch-1.6.x without this patch, tested, and confirmed that the
	issue still exists as I observed it in libupnp-1.6.6. I then built
	from branch-1.6.x with this patch, tested, and confirmed that the
	issue was resolved.

	Thanks,
	Chuck Thomason



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@553 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-06-17 17:07:41 +00:00
Nick Leverton
00cf8052de Add PTHREAD_CFLAGS to Libs: in libupnp.pc, as assumed by acx_pthread.m4
(fixes binutils-gold link failure)


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@551 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-05-14 13:09:59 +00:00
Marcelo Roberto Jimenez
74b8730f0f SF Bug Tracker [ 2995758 ] libupnp 1.6.6, wrong bind when reuseaddr is 1.
Submitted: viallard anthony ( homer242 )
When trying to use reuseaddr option in miniserver/miniserver.c, there
isn't a affectation of the port chosen (serverAddr.sin_port isn't
receive listen_port variable value).




git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@548 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-05-07 11:07:26 +00:00
Marcelo Roberto Jimenez
1b45bec411 Backport of r544:
Define PROTOTYPES to be one by default in global.h. This affects the
RSA MD5 code.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@546 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 14:59:32 +00:00
Marcelo Roberto Jimenez
21163f491d Comment.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@541 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 12:04:48 +00:00
Marcelo Roberto Jimenez
a54e07bfb2 Code convergence for client_table (ClientSubscription).
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@539 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 08:47:37 +00:00
Marcelo Roberto Jimenez
0dea692199 Allow null pointer deletions in membuffer.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@538 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 00:47:37 +00:00
Marcelo Roberto Jimenez
dc457414d1 Adding UpnpString.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@537 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 00:44:34 +00:00
Nick Leverton
e1d09004eb Subscription auto-renewals copy the renewal time from old subscription.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@533 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-21 12:28:27 +00:00
Marcelo Roberto Jimenez
640fa8b1be Code base convergence.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@530 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-01 20:36:30 +00:00
Marcelo Roberto Jimenez
2bcbdffd89 1 - Ported some of IPV6 code to 1.6.7.
2 - Backport of svn revision 527:
* Added API to ithread, created the following functions:
- int ithread_initialize_library(void);
- int ithread_cleanup_library(void);
- int ithread_initialize_thread(void);
- int ithread_cleanup_thread(void);
* SF Bug Tracker [ 2876374 ] Access Violation when compiling with Visual Studio 2008
Submitted: Stulle ( stulleamgym ) - 2009-10-10 19:05

Hi,

I am one of the devs of the MorphXT project and I use this lib in some
other of my projects, too. When I tried to upgrade the lib earlier for one
of my projects I had to realise that something did not work at first and
while most of the things were reasonably ease to be fixed. Now, the last
thing I encountered was not so easy to fix and I am uncertain if my fix is
any good so I'll just post it here and wait for some comments.

The problem was that I got an Access Violation when calling "UpnpInit". It
would call "ithread_rwlock_init(&GlobalHndRWLock, NULL)" which eventually
led to calling "pthread_cond_init" and I got the error notice at
"EnterCriticalSection (&ptw32_cond_list_lock);". It appeared that
"ptw32_cond_list_lock" was NULL. Now, I found two ways to fix this. Firstly
moving the whole block after at least one of the "ThreadPoolInit" calls
will fix the issue. Secondly, you could add:
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
// to get the following working we need this... is it a good patch or
not... I do not know!
pthread_win32_process_attach_np();
#endif
#endif
right before "ithread_rwlock_init(&GlobalHndRWLock, NULL)".

Just so you know, I am using libupnp 1.6.6 and libpthreads 2.8.0 and both
are linked static into the binaries. I am currently using Visual Studio
2008 for development with Windows being the target OS. Any comment at your
end?

Regards, Stulle



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@529 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-31 17:53:16 +00:00
Marcelo Roberto Jimenez
6c8a4dd361 SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage.
Submitted By: zephyrus ( zephyrus00jp )
This second part covers the issue on linking with -lsocket -lnsl -lrt.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@525 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-27 14:45:47 +00:00
Marcelo Roberto Jimenez
e9941f7ac8 UTF-8 stuff.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@524 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-27 14:41:25 +00:00
Marcelo Roberto Jimenez
5a465a5cf2 White spaces.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@523 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-22 09:08:15 +00:00
Marcelo Roberto Jimenez
6aa2419cfd SF Bug Tracker [ 2392166 ] ithread_detach not called for finished worker thread
Submitted: Ulrik ( ulsv_enea ) - 2008-12-05 08:24

	Valgrind reports a memory leak due to that the function ithread_detach is
	not called for finished worker threads in ThreadPool.c.

	==21137== 2,176 bytes in 8 blocks are possibly lost in loss record 5 of 5
	==21137== at 0x4C20F3F: calloc (vg_replace_malloc.c:279)
	==21137== by 0x4010F58: _dl_allocate_tls (in /lib/ld-2.6.1.so)
	==21137== by 0x544BA92: pthread_create@@GLIBC_2.2.5 (in
	/lib/libpthread-2.6.1.so)
	==21137== by 0x5F94592: CreateWorker (ThreadPool.c:639)
	==21137== by 0x5F95079: ThreadPoolInit (ThreadPool.c:784)

	I'm using libupnp 1.6.6

	For more info on pthread_detach, see:
	http://gelorakan.wordpress.com/2007/11/26/pthead_create-valgrind-memory-lea
	k-solved/



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@520 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 22:41:49 +00:00
Marcelo Roberto Jimenez
712ed6d2ff SF Bug Tracker [ 2392304 ] Memory leak in SSDP AdvertiseAndReply
Submitted: Ulrik ( ulsv_enea ) - 2008-12-05 08:24

	Valgrind reports a memory leak function in AdvertiseAndReply
	(ssdp/ssdp_server.c) in libupnp 1.6.6

	There are continue statements in many places in AdvertiseAndReply. In some
	of those error handling cases the variable nodelist is not free'ed before
	continuing to the next iteration. The next iteration will take care of
	free'ing the nodelist from the previous iteration in most cases, but not
	when breaking out of the for loop after the last element.

	I belive this memory leak can be solved by makeing sure that the rows

	ixmlNodeList_free( nodeList );
	nodeList = NULL;

	are always executed, also in the beginning of the last iteration when we
	found out that there are not more elements.

	==29110== at 0x4C21C16: malloc (vg_replace_malloc.c:149)
	==29110== by 0x5D8DE0E: ixmlNodeList_addToNodeList (nodeList.c:106)
	==29110== by 0x5D8B7E2: ixmlNode_getElementsByTagNameRecursive
	(node.c:1438)
	==29110== by 0x5D8E587: ixmlElement_getElementsByTagName
	(element.c:491)
	==29110== by 0x5B6C0F1: AdvertiseAndReply (ssdp_server.c:201)
	==29110== by 0x5B7AB74: UpnpSendAdvertisement (upnpapi.c:1495)



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@518 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 21:19:13 +00:00
Marcelo Roberto Jimenez
53d5e61b33 Thanks update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@517 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 19:53:20 +00:00
Marcelo Roberto Jimenez
324931ca8f Backport of svn revision 514:
libupnp and multi-flows scenario patch
	Submited by Carlo Parata from STMicroelectronics.
Hi Roberto and Nektarios,
after an analysis of the problem of libupnp with a multi-flows scenario, I
noticed that the only cause of the freezed system is the ThreadPool
management. There are not mutex problems. In practise, if all threads in the
thread pool are busy executing jobs, a new worker thread should be created if
a job is scheduled (I inspired to tombupnp library). So I solved the problem
with a little patch in threadutil library that you can find attached in this
e-mail. I hope to have helped you.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@515 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 19:51:18 +00:00
Marcelo Roberto Jimenez
edc0638640 Backport of svn revision 512:
Style compatibilization between two similar constructions addressed in two
separate recent patches.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@513 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 17:07:09 +00:00
Marcelo Roberto Jimenez
e1ea72a5fb Backport of svn revision 510:
SF Patch Tracker [ 2964973 ] install: will not overwrite just-created
	...blah... with...
	Submitted: Nick Leverton ( leveret ) - 2010-03-07 05:18

	Full error:
	/usr/bin/install: will not overwrite just-created
	`/tmp/buildd/libupnp-1.6.6/debian/tmp/usr/share/doc/libupnp3-dev/examples/s
	ample_util.c' with `common/sample_util.c'

	This seems to be from Automake 1.11 which doesn't like having duplicate
	files in a Makefile.am. Patch attached, kindly provided by Stefan Potyra
	for Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543068)

	This fix will be needed for both 1.6.x and 1.8.x branches.




git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@511 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 16:13:59 +00:00
Marcelo Roberto Jimenez
5eb55e0fb2 Backport of svn revision 504:
SF Patch Tracker [ 2969188 ] 1.8.0: patch for FreeBSD compilation
	Submitted By: Nick Leverton (leveret)
	Fix the order of header inclusion for FreeBSD.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@509 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 15:42:40 +00:00
Marcelo Roberto Jimenez
9226dd833b SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage.
Submitted By: zephyrus ( zephyrus00jp )
	Obs by Marcelo: The issue with linking with -lsocket -lnsl -lrt is not
	covered in this changeset beacuse I don't have solaris to test. I will
	need some help from zephyrus in this regard. The issue will be addressed
	in a future changeset.

	Compilation for solaris

	I have used gcc3.x and gcc4.x under solaris 10 for x86 / 64 bits.

	A couple of Source file fixes were necessary for successful compilation
	and runtime behavior.

	threadutil/src/ThreadPool.c

	POSIX
	sched_setschduler() returns non-negative value for success.

	Without the fix, UpnpInit() fails immediately.

	upnpp/src/api/upnpai.c

	There is a typo of a macro name "__sun" in one of the
	CPP conditional.
	Without the fix, the compilation aborts due to unknown constant
	in socket ioctl call.

	A few structs and an array is not properly initialized.
	Well, I think it may be safe as is, but when I checked it
	using purify evaluation version, it was reported that
	uninitizlied iszBuffer may cause read of uninitialized memory.
	So play it safe.

	Configure issue.
	This has to be more of a configure magic.
	To link a program successfully using network, we need
	-lsocket and -lnsl library specifications on the link line.
	We also need -lrt for programs that use thread scheduling features.

	The sample program under upnp/sample requires
	-lsocket -lnsl -lrt
	for successful linking.
	I added -lsocket -lnsl -lrt to Makefile.in.
	configure probably needs to take care of these.

	I don't know much about configure, automake, etc., so
	I am just raising a flag here.

	TIA



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@505 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 11:47:17 +00:00
Marcelo Roberto Jimenez
25c908c558 SF Patch Tracker [ 2836704 ] Search for nested serviceList (not
stopping at the first lis
	Submitted By: zephyrus ( zephyrus00jp )
	
	Internet Gateway Device description contains nested serviceList (rootdevice
	-> servicelist, subdevice
	and subdevice has the lower-level serviceList, etc..)

	Unfrotunately, the sample code sample_util.c used by tv_device sample,
	etc.
	has a code that looks for only the first top-level serviceList.
	This results in the failure to read all the services of an IGD xml
	description.

	Attached patch modifies this behavior and looks for the service by
	visiting all the serviceList in xml document in turn.

	With the modified patch (ad additional modification), I could
	simulate an IGD device and created a modified control program for that.

	Patch against 1.6.6

	TIA.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@502 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-20 21:32:38 +00:00
Marcelo Roberto Jimenez
16e91b5dcc Backport of svn revision 497:
* SF Patch Tracker [ 2203721 ] timeb.h check obsolete



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@498 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 23:51:09 +00:00
Marcelo Roberto Jimenez
01d17e5c4b Backport of svn revision 495:
* SF Patch Tracker [ 2970872 ] Update ErrorMessages for latest return
	code list
	Submitted By: Nick Leverton ( leveret )
	
	ErrorMessage[] in upnptools.c has got a bit out of sync, the attached
	patch (generated from grep 'define UPNP_E_') should bring it up to date.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@496 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 23:39:48 +00:00
Marcelo Roberto Jimenez
a1d707ac81 Backport of svn revision 493: Declare a few functions to have proper
(void) argument list.

	* SF Patch Tracker [ 2857611 ] Declare a few functions to have proper
	(void) argument list.
	Submitted By: zephyrus ( zephyrus00jp )
	
	In a publicly installed headers, a few functions are declared without any
	arguments at all, a la "()".
	When I used gcc's -Wimplict and -Wstrict-prototypes to check for the
	mismatch of
	function prototype declarations and their usage in my own program,
	some headers from libupnp-1.6.6 produced warnings.

	They are not strictly bugs, but pretty much annoying. This is 2009, and
	almost all the important compilers
	understand ISO-C.

	So the offending functions are declared as "(void") to show that they have
	no arguments at all.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@494 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 15:34:54 +00:00
Marcelo Roberto Jimenez
4ad6ea3545 Backport of svn revision 484:
SF Patch Tracker [ 2546532 ] Missing carriage return between
    	SOAPACTION and User-Agent headers.
    
    	There is something going wrong in soap_ctrlpt.c at line 931 (based on
    	version 1.6.6 release).
    
    	The http_Makemessage call looks as follows:
    
    	if (http_MakeMessage(
    	&request, 1, 1,
    	"Q" "sbc" "N" "s" "s" "Ucc" "sss",
    	SOAPMETHOD_POST, path.buf, path.length,
    	"HOST: ", host.buf, host.length,
    	content_length,
    	ContentTypeHeader,
    	"SOAPACTION:
    	\"urn:schemas-upnp-org:control-1-0#QueryStateVariable\"",
    	xml_start, var_name, xml_end ) != 0 ) {
    	return UPNP_E_OUTOF_MEMORY;
    	}
    
    	This will result in the SOAPACTION header to be immediately followed by the
    	User-Agent header, while a cr-lf should separate the two. I propose to fix
    	this by changing the second "s" to "sc" to force the addition of a cr-lf
    	after the SOAPACTION. This looks consistent to the other Makemessage calls.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@487 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-14 18:53:12 +00:00
Marcelo Roberto Jimenez
70a0aff4e7 Backport of svn revision 482:
wrong order in parameters corrected


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@486 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-14 18:38:31 +00:00
Marcelo Roberto Jimenez
aaacf65f41 Do not use C++ like comments. Some compilers don't like it.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@481 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-08-14 12:06:22 +00:00
Marcelo Roberto Jimenez
cd8ce90e19 Backport of svn rev. 479: Fix for application compiler warning: "PRId64" redefined.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@480 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-08-14 12:02:20 +00:00
Marcelo Roberto Jimenez
812d019d12 Backport of ixml from 1.8.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@478 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-27 05:01:52 +00:00
Marcelo Roberto Jimenez
881b212690 Backport of svn 371: Removing the useless, unused and undocumented function UpnpFree().
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@477 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-27 03:31:07 +00:00
Marcelo Roberto Jimenez
223c0e8816 Backport of Doxyfile.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@476 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-27 03:11:28 +00:00
Marcelo Roberto Jimenez
ceca478180 Backport of most of upnp.h with documentation.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@475 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-27 03:06:21 +00:00
Marcelo Roberto Jimenez
7963e97469 Backport of svn 367: Removing dead code.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@471 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-26 12:24:24 +00:00
Marcelo Roberto Jimenez
0080c080cd Update of win32 files.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@470 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 04:21:11 +00:00
Marcelo Roberto Jimenez
405451e34c Backport of svn 468: Added upnp/m4/libupnp.m4 to the distribution tarball.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@469 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 04:11:17 +00:00
Marcelo Roberto Jimenez
a772b1a754 Backport of svn 403: Bob Ciora's patch for "UpnpCreatePropertySet can leak memory".
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@466 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:42:30 +00:00
Marcelo Roberto Jimenez
ffc4668e0b Backport of 406: Updating Makefile.am for missing files in the "make dist" tarball.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@465 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:35:12 +00:00
Marcelo Roberto Jimenez
56a7f038dc Changelog update for a fixed bug of a missing HandleUnlock() that went in
in one of the latest comitts.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@463 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:25:42 +00:00
Marcelo Roberto Jimenez
3ba4e34662 Added ixmldebug and UpnpGlobal.h to the 1.6.x branch.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@462 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:22:35 +00:00
Marcelo Roberto Jimenez
515233ca56 Backport of svn 395 and 434:
395: Bob Ciora's patch for lazy UpnpAcceptSubscription().
434: Fixed a buffer overflow due to a bug in the calculation of the
     CONTENT-TYPE header line size, the length was beeing calculated with
     the wrong string, there was a missing colon.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@461 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 02:56:04 +00:00
Marcelo Roberto Jimenez
423808a095 Backport of svn 453: Andre Sodermans (wienerschnitzel) patch for building
libupnp under windows systems with VC8/VC9.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@460 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-24 11:40:33 +00:00
Marcelo Roberto Jimenez
f22a69b487 Backport of 457: SF Bug Tracker [ 2026431 ] pupnp does not build on GNU/KfreeBSD.
Submitted By: Nick Leverton - leveret
	Gnu/KFreeBSD is one of the Debian architectures, it includes a FreeBSD
	kernel with GNU userspace (glibc etc). The Gnu/KfreeBSD developers
	provided the attached patch to test the appropriate #define and allow pupnp
	to build in their environment, and asked me to forward it to you.

	Since the test is a simple check for defined(__GLIBC__), this would
	presumably also help with other ports of GNU libc to non-Linux kernels.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@458 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-24 11:30:42 +00:00
Marcelo Roberto Jimenez
bcf5a5c5e0 Backport: Debug code for http_RecvMessage().
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@450 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-10 04:15:36 +00:00
Marcelo Roberto Jimenez
e0c9de0b1d Backport: Added an m4 macro to deal with finding libupnp in the users'
configure script.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@449 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-10 04:02:16 +00:00
Marcelo Roberto Jimenez
94e4a3bdda Fix in function SetSeed() in threadutil/src/ThreadPool.c for CYGWIN
compilation. Thanks to Gary Chan.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@355 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-29 15:42:18 +00:00
Marcelo Roberto Jimenez
b7b3bb7d05 Homekeeping for the next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@354 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-29 15:38:35 +00:00
Marcelo Roberto Jimenez
f0161c7274 Merge of trunk into branch 1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@351 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-26 00:49:39 +00:00
Marcelo Roberto Jimenez
4b40e94b03 Merge of trunk into branch 1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@339 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-03-25 10:21:08 +00:00
Marcelo Roberto Jimenez
1c9632dcc3 White spaces.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@329 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-03-05 03:55:33 +00:00
Marcelo Roberto Jimenez
cc0c2ffc50 Merge of trunk into branch-1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@327 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-22 04:48:10 +00:00
Marcelo Roberto Jimenez
f812b124d7 Merge of trunk into branch-1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@324 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-10 02:27:45 +00:00
Marcelo Roberto Jimenez
a785465222 Merge of trunk into branch-1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@322 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-08 02:29:26 +00:00
Marcelo Roberto Jimenez
078f3f8faf Merge of trunk into branch 1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@312 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-03 01:36:23 +00:00
Marcelo Roberto Jimenez
1eeaf99b83 Merge of trunk into branch-1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@306 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-27 02:13:08 +00:00
Marcelo Roberto Jimenez
f6dd5062fe Merge of trunk into branch-1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@284 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-27 02:14:02 +00:00
Marcelo Roberto Jimenez
7d4a610b93 Merge of head into branch-1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@265 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-10 23:18:38 +00:00
Marcelo Roberto Jimenez
0a074d1989 Merge of trunk into branch 1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@263 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-10 22:56:56 +00:00
Marcelo Roberto Jimenez
0475a46680 Merge of current trunk to branch 1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@251 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-19 14:15:45 +00:00
Marcelo Roberto Jimenez
2a76749682 Creating branch 1.6.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@210 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-06-23 14:23:29 +00:00
174 changed files with 54452 additions and 49434 deletions

120
.gitignore vendored Normal file
View File

@ -0,0 +1,120 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.order
modules.builtin
*.elf
*.bin
*.gz
*.bz2
*.lzma
*.patch
*.gcno
#
# Top-level generic files
#
/tags
/TAGS
/linux
/vmlinux
/vmlinuz
/System.map
/Module.markers
/Module.symvers
#
# git files that we don't want to ignore even it they are dot-files
#
!.gitignore
!.mailmap
#
# Generated include files
#
include/config
include/linux/version.h
include/generated
# stgit generated dirs
patches-*
# quilt's files
patches
series
# cscope files
cscope.*
ncscope.*
# gnu global files
GPATH
GRTAGS
GSYMS
GTAGS
# QT-Creator files
Makefile.am.user
pupnp.config
pupnp.creator
pupnp.creator.user
pupnp.files
pupnp.includes
*.orig
*~
\#*#
*.lo
*.la
Makefile
Makefile.in
aclocal.m4
autoconfig.h
autoconfig.h.in
autom4te.cache/
build-aux/
config.log
config.status
configure
libtool
libupnp.pc
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
stamp-h1
upnp/inc/stamp-h2
upnp/inc/upnpconfig.h
upnp/sample/tv_combo
upnp/sample/tv_ctrlpt
upnp/sample/tv_device
upnp/unittest/unittest
upnp/unittest/*.pp.c
docs/doxygen
/build/vc10/out.vc9.Win32/Debug
/build/vc10/out.vc10.Win32
/build/vc10/out.vc10.x64
/pthreads

2730
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ PROJECT_NAME = libUPnP
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.4.7
PROJECT_NUMBER = 1.6.20
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@ -91,7 +91,7 @@ ABBREVIATE_BRIEF =
# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = NO
ALWAYS_DETAILED_SEC = YES
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
# inherited members of a class in the documentation of that class as if those
@ -290,7 +290,7 @@ HIDE_IN_BODY_DOCS = NO
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
INTERNAL_DOCS = YES
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
# file names in lower-case letters. If set to YES upper-case letters are also
@ -462,7 +462,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = ./upnp ./ixml ./threadutil
INPUT = upnp ixml threadutil
# This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
@ -995,7 +995,7 @@ ENABLE_PREPROCESSING = YES
# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
@ -1029,7 +1029,7 @@ INCLUDE_FILE_PATTERNS =
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
PREDEFINED =
PREDEFINED = DEBUG UPNP_HAVE_TOOLS INCLUDE_DEVICE_APIS INCLUDE_CLIENT_APIS EXCLUDE_GENA=0 EXCLUDE_DOM=0
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.

View File

@ -1,7 +1,7 @@
#
# Top-level "Makefile.am" for libupnp
#
# Copyright (C) 2005 Rémi Turboult <r3mi@users.sourceforge.net>
# Copyright (C) 2005 Rémi Turboult <r3mi@users.sourceforge.net>
#
ACLOCAL_AMFLAGS = -I m4
@ -16,6 +16,7 @@ SUBDIRS = \
EXTRA_DIST = \
Doxyfile \
libupnp.pc.in \
LICENSE \
THANKS \
@ -25,9 +26,23 @@ EXTRA_DIST = \
build/libupnp.dsp \
build/libupnp.dsw \
build/inc/autoconfig.h \
build/inc/config.h \
build/inc/upnpconfig.h \
build/msvc/inttypes.h
build/msvc/inttypes.h \
build/msvc/stdint.h \
build/vc8/ixml.vcproj \
build/vc8/libupnp.sln \
build/vc8/libupnp.vcproj \
build/vc8/threadutil.vcproj \
build/vc8/tvcombo.vcproj \
build/vc8/tvctrlpt.vcproj \
build/vc8/tvdevice.vcproj \
build/vc9/ixml.vcproj \
build/vc9/libupnp.sln \
build/vc9/libupnp.vcproj \
build/vc9/threadutil.vcproj \
build/vc9/tvcombo.vcproj \
build/vc9/tvctrlpt.vcproj \
build/vc9/tvdevice.vcproj
# This variable must have 'exec' in its name, in order to be installed

25
README
View File

@ -1,7 +1,7 @@
Portable SDK for UPnP* Devices (libupnp)
Copyright (c) 2000-2003 Intel Corporation - All Rights Reserved.
Copyright (c) 2005-2006 Rémi Turboult <r3mi@users.sourceforge.net>
Copyright (c) 2005-2006 Rémi Turboult <r3mi@users.sourceforge.net>
Copyright (c) 2006 Michel Pfeiffer and others <virtual_worlds@gmx.de>
See LICENSE for details.
@ -227,17 +227,18 @@ To build the samples (note: this is the default behaviour):
% ./configure --enable-samples
% make
will build the sample device "$(LIBUPNP)/upnp/upnp_tv_device" and
sample control point "$(LIBUPNP)/upnp/upnp_tv_ctrlpt".
will build the sample device "$(LIBUPNP)/upnp/tv_device" and
sample control point "$(LIBUPNP)/upnp/tv_ctrlpt".
Note : the sample device won't be built if --disable-device has been
configured, and the sample control point won't be build if --disable-client
has been configured.
To run the sample device, you need the "$(LIBUPNP)/upnp/sample/tvdevice/web"
sub-directory. Example :
To run the sample device, you need to create a tvdevice directory and move
the web directory there, giving: "$(LIBUPNP)/upnp/sample/tvdevice/web".
To run the sample invoke from the command line as follows:
% cd $(LIBUPNP)/upnp/sample/tvdevice
% ../../upnp_tv_device
% ../tv_device
@ -265,12 +266,24 @@ In order to build libupnp under Windows the pthreads-w32 package is required.
You can download a self-extracting ZIP file from the following location:
ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-7-0-release.exe
or possibly newer versions if available.
Execute the self-extracting archive and copy the Pre-build.2 folder to the
top level source folder.
Rename Pre-build.2 to pthreads.
Open the provided workspace build\libupnp.dsw with Visual C++ 6.0 and select
Build->Build libupnp.dll (F7)
In the build directory there are also VC8, VC9 and VC10 folders containing
solution files for Visual Studio 2005/2008/2010 respectively.
If you use newer versions to build libupnp, eg Visual Studio 2003 or later,
then you need to rebuild the pthreads package so it uses the same VC runtime
as libupnp to prevent cross boundary runtime problems
(see http://msdn.microsoft.com/en-us/library/ms235460%28v=VS.100%29.aspx).
Just replace the files in the Pre-build.2 folder (renamed to pthreads as
mentioned above) with the newly build versions.
If you also use a newer version of pthreads-win32 then you should also
replace the header files in that directory structure (obviously).
For building a static library instead of a DLL and for using the static
pthreads-w32 library following switches need to be defined additionally:

55
THANKS
View File

@ -6,31 +6,76 @@ suggesting various improvements or submitting actual code.
Here is a list of these people. Help us keep it complete and
exempt of errors.
- Alex (afaucher)
- Andre Sodermans (wienerschnitzel)
- Anoop Mohan (an00p)
- Anthony Viallard (homer242)
- Apostolos Syropoulos
- Arno Willig
- Bob Ciora
- Carlo Parata
- Carl Benson
- Chandra Penke (inactiveneurons)
- Chaos
- Charles Nepveu (cnepveu)
- Chris Pickel
- Chuck Thomason (cyt4)
- Craig Nelson
- David Blanchet
- David Maass
- Dirk (dirk_vdb)
- Emil Ljungdahl
- Erik Johansson
- Eric Tanguy
- Erwan Velu
- Eugene Christensen
- Fabrice Fontaine (ffontaine)
- Fredrik Svensson
- Glen Masgai
- Gustavo Zacarias (gustavoz)
- Hartmut Holzgraefe (hholzgra)
- Iain Denniston (ectotropic)
- Ingo Hofmann
- Ivan Romanov (ivanromanov)
- Jiri Zouhar
- Jean-Francois Dockes (medoc)
- John Dennis
- Jonathan (no_dice)
- Jonathan Casiot (no_dice)
- Josh Carroll
- Juergen Lock
- Keith Brindley
- Leuk_He
- Loigu
- Luke Kim
- Marcelo Roberto Jimenez
- Luke Kim (nereusuj)
- Marcelo Roberto Jimenez (mroberto)
- Markus Strobl
- Nektarios K. Papadopoulos
- Nektarios K. Papadopoulos (npapadop)
- Nicholas Kraft
- Nick Leverton (leveret)
- Obata Akio (obache)
- Oskar Liljeblad
- Michael (Oxy)
- Michael (oxygenic)
- Paul Vixie
- Peng
- Peter Hartley
- Philipp Matthias Hahn
- Pino Toscano (pinotree)
- Rene Hexel
- Robert Buckley (rbuckley)
- Robert Gingher (robsbox)
- Ronan Menard
- Sebastian Brandt
- Shaun Marko (semarko)
- Siva Chandran
- Stefan Sommerfeld (zerocom)
- Stéphane Corthésy
- Steve Bresson
- Thijs Schreijer
- Timothy Redaelli
- Titus Winters
- Tom (tomdev2)
- Yoichi Nakayama (yoichi)
- zephyrus (zephyrus00jp)
- zexian chen
- Zheng Peng (darkelf2010)

23
TODO
View File

@ -2,28 +2,5 @@
To Be Done
==========
- add FreeBSD patches
( http://sf.net/tracker/index.php?func=detail&aid=1332618&group_id=7189&atid=307189 ?)
- non-regression testing
- replace doc++ by Doxygen for documentation generation
- incorporate public patches and fix reported bugs :
http://sourceforge.net/tracker/?group_id=7189&atid=107189 and
http://sourceforge.net/tracker/?group_id=7189&atid=307189
- RPM packaging (a preliminary one here :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176617 )
- make API clean for large files and 64 bits
To Be Decided
=============
- IPV6 support ?

View File

@ -19,15 +19,9 @@
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1
/* Define to 1 if you have the `ftime' function. */
#define HAVE_FTIME 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `compat' library (-lcompat). */
/* #undef HAVE_LIBCOMPAT */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
@ -55,6 +49,12 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Defines if strndup is available on your system */
#define HAVE_STRNDUP 1
/* Defines if strnlen is available on your system */
#define HAVE_STRNLEN 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
@ -67,9 +67,6 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
@ -82,6 +79,13 @@
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 to prevent compilation of assert() */
#define NDEBUG 1
@ -101,13 +105,16 @@
#define PACKAGE_NAME "libupnp"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libupnp 1.4.7"
#define PACKAGE_STRING "libupnp 1.6.20"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libupnp"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.4.7"
#define PACKAGE_VERSION "1.6.20"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
@ -116,6 +123,18 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* see upnpconfig.h */
#define UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS 1
/* see upnpconfig.h */
/* #undef UPNP_ENABLE_IPV6 */
/* see upnpconfig.h */
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
/* see upnpconfig.h */
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
/* see upnpconfig.h */
#define UPNP_HAVE_CLIENT 1
@ -125,35 +144,50 @@
/* see upnpconfig.h */
#define UPNP_HAVE_DEVICE 1
/* see upnpconfig.h */
#define UPNP_HAVE_GENA 1
/* see upnpconfig.h */
#define UPNP_HAVE_OPTSSDP 1
/* see upnpconfig.h */
#define UPNP_HAVE_SOAP 1
/* see upnpconfig.h */
#define UPNP_HAVE_SSDP 1
/* see upnpconfig.h */
#define UPNP_HAVE_TOOLS 1
/* see upnpconfig.h */
#define UPNP_HAVE_WEBSERVER 1
/* Do not use pthread_rwlock_t */
#define UPNP_USE_RWLOCK 1
/* see upnpconfig.h */
#define UPNP_VERSION_MAJOR 1
/* see upnpconfig.h */
#define UPNP_VERSION_MINOR 4
#define UPNP_VERSION_MINOR 6
/* see upnpconfig.h */
#define UPNP_VERSION_PATCH 7
#define UPNP_VERSION_PATCH 20
/* see upnpconfig.h */
#define UPNP_VERSION_STRING "1.4.7"
#define UPNP_VERSION_STRING "1.6.20"
/* Version number of package */
#define VERSION "1.4.7"
#define VERSION "1.6.20"
/* File Offset size */
#define _FILE_OFFSET_BITS 64
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */
#define _LARGEFILE_SOURCE 1
/* Large files support */
#define _LARGE_FILE_SOURCE
#define _LARGE_FILE_SOURCE /**/
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
@ -164,5 +198,5 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Substitute for socklen_t */
/* Type for storing the length of struct sockaddr */
/* #undef socklen_t */

View File

@ -1,343 +0,0 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
#ifndef INTERNAL_CONFIG_H
#define INTERNAL_CONFIG_H
#include "autoconfig.h"
/** @name Compile time configuration options
* The Linux SDK for UPnP Devices contains some compile-time parameters
* that effect the behavior of the SDK. All configuration options are
* located in {\tt src/inc/config.h}.
*/
//@{
/** @name THREAD_IDLE_TIME
* The {\tt THREAD_IDLE_TIME} constant determines when a thread will be
* removed from the thread pool and returned to the operating system. When
* a thread in the thread pool has been idle for this number of milliseconds
* the thread will be released from the thread pool. The default value is
* 5000 milliseconds (5 seconds).
*/
//@{
#define THREAD_IDLE_TIME 5000
//@}
/** @name JOBS_PER_THREAD
* The {\tt JOBS_PER_THREAD} constant determines when a new thread will be
* allocated to the thread pool inside the SDK. The thread pool will
* try and maintain this jobs/thread ratio. When the jobs/thread ratio
* becomes greater than this, then a new thread (up to the max) will be
* allocated to the thread pool. The default ratio is 10 jobs/thread.
*/
//@{
#define JOBS_PER_THREAD 10
//@}
/** @name MIN_THREADS
* The {\tt MIN_THREADS} constant defines the minimum number of threads the
* thread pool inside the SDK will create. The thread pool will
* always have this number of threads. These threads are used
* for both callbacks into applications built on top of the SDK and also
* for making connections to other control points and devices. This number
* includes persistent threads. The default value is two threads.
*/
//@{
#define MIN_THREADS 2
//@}
/** @name MAX_THREADS
* The {\tt MAX_THREADS} constant defines the maximum number of threads the
* thread pool inside the SDK will create. These threads are used
* for both callbacks into applications built on top of the library and also
* for making connections to other control points and devices. It is not
* recommended that this value be below 10, since the threads are
* necessary for correct operation. This value can be increased for greater
* performance in operation at the expense of greater memory overhead. The
* default value is 12.
*/
//@{
#define MAX_THREADS 12
//@}
/** @name MAX_JOBS_TOTAL
* The {\tt MAX_JOBS_TOTAL} constant determines the maximum number of jobs
* that can be queued. If this limit is reached further jobs will be thrown
* to avoid memory exhaustion. The default value 100.
* (Added by Axis.)
*/
//@{
#define MAX_JOBS_TOTAL 100
//@}
/** @name DEFAULT_SOAP_CONTENT_LENGTH
* SOAP messages will read at most {\tt DEFAULT_SOAP_CONTENT_LENGTH} bytes.
* This prevents devices that have a misbehaving web server to send
* a large amount of data to the control point causing it to crash.
* This can be adjusted dynamically with {\tt UpnpSetMaxContentLength}.
*/
//@{
#define DEFAULT_SOAP_CONTENT_LENGTH 16000
//@}
/** @name NUM_SSDP_COPY
* This configuration parameter determines how many copies of each SSDP
* advertisement and search packets will be sent. By default it will send two
* copies of every packet.
*/
//@{
#define NUM_SSDP_COPY 2
//@}
/** @name SSDP_PAUSE
* This configuration parameter determines the pause between identical SSDP
* advertisement and search packets. The pause is measured in milliseconds
* and defaults to 100.
*/
//@{
#define SSDP_PAUSE 100
//@}
/** @name WEB_SERVER_BUF_SIZE
* This configuration parameter sets the maximum buffer size for the
* webserver. The default value is 1MB.
*/
//@{
#define WEB_SERVER_BUF_SIZE (1024*1024)
//@}
/** @name AUTO_RENEW_TIME
* The {\tt AUTO_RENEW_TIME} is the time, in seconds, before a subscription
* expires that the SDK automatically resubscribes. The default
* value is 10 seconds. Setting this value too low can result in the
* subscription renewal not making it to the device in time, causing the
* subscription to timeout. In order to avoid continually resubscribing
* the minimum subscription time is five seconds more than the auto renew
* time.
*/
//@{
#define AUTO_RENEW_TIME 10
//@}
/** @name CP_MINIMUM_SUBSCRIPTION_TIME
* The {\tt CP_MINIMUM_SUBSCRIPTION_TIME} is the minimum subscription time
* allowed for a control point using the SDK. Subscribing for less than
* this time automatically results in a subscription for this amount. The
* default value is 5 seconds more than the {\tt AUTO_RENEW_TIME}, or 15
* seconds.
*/
//@{
#define CP_MINIMUM_SUBSCRIPTION_TIME (AUTO_RENEW_TIME + 5)
//@}
/** @name MAX_SEARCH_TIME
* The {\tt MAX_SEARCH_TIME} is the maximum time
* allowed for an SSDP search by a control point. Searching for greater than
* this time automatically results in a search for this amount. The default
* value is 80 seconds.
*/
//@{
#define MAX_SEARCH_TIME 80
//@}
/** @name MIN_SEARCH_TIME
* The {\tt MIN_SEARCH_TIME} is the minimumm time
* allowed for an SSDP search by a control point. Searching for less than
* this time automatically results in a search for this amount. The default
* value is 2 seconds.
*/
//@{
#define MIN_SEARCH_TIME 2
//@}
/** @name AUTO_ADVERTISEMENT_TIME
* The {\tt AUTO_ADVERTISEMENT_TIME} is the time, in seconds, before an
* device advertisements expires before a renewed advertisement is sent.
* The default time is 30 seconds.
*/
//@{
#define AUTO_ADVERTISEMENT_TIME 30
//@}
/** @name SSDP_PACKET_DISTRIBUTE
* The {\tt SSDP_PACKET_DISTRIBUTE} enables the SSDP packets to be sent
* at an interval equal to half of the expiration time of SSDP packets
* minus the AUTO_ADVERTISEMENT_TIME. This is used to increase
* the probability of SSDP packets reaching to control points.
* It is recommended that this flag be turned on for embedded wireless
* devices.
*/
//@{
#define SSDP_PACKET_DISTRIBUTE 1
//@}
/** @name Module Exclusion
* Depending on the requirements, the user can selectively discard any of
* the major modules like SOAP, GENA, SSDP or the Internal web server. By
* default everything is included inside the SDK. By setting any of
* the values below to 0, that component will not be included in the final
* SDK.
* \begin{itemize}
* \item {\tt EXCLUDE_SOAP[0,1]}
* \item {\tt EXCLUDE_GENA[0,1]}
* \item {\tt EXCLUDE_SSDP[0,1]}
* \item {\tt EXCLUDE_DOM [0,1]}
* \item {\tt EXCLUDE_MINISERVER[0,1]}
* \item {\tt EXCLUDE_WEB_SERVER[0,1]}
* \item {\tt EXCLUDE_JNI[0,1]}
* \end{itemize}
*
*/
//@{
#define EXCLUDE_SSDP 0
#define EXCLUDE_SOAP 0
#define EXCLUDE_GENA 0
#define EXCLUDE_DOM 0
#define EXCLUDE_MINISERVER 0
#define EXCLUDE_WEB_SERVER 0
#ifdef USE_JNI
# define EXCLUDE_JNI 0
#else
# define EXCLUDE_JNI 1
#endif
//@}
/** @name DEBUG_TARGET
* The user has the option to redirect the library output debug messages
* to either the screen or to a log file. All the output messages with
* debug level 0 will go to {\tt upnp.err} and messages with debug level
* greater than zero will be redirected to {\tt upnp.out}.
*/
//@{
#define DEBUG_TARGET 1
//@}
/** @name Other debugging features
The UPnP SDK contains other features to aid in debugging:
see <upnp/upnpdebug.h>
*/
#define DEBUG_ALL 1
#define DEBUG_SSDP 0
#define DEBUG_SOAP 0
#define DEBUG_GENA 0
#define DEBUG_TPOOL 0
#define DEBUG_MSERV 0
#define DEBUG_DOM 0
#define DEBUG_HTTP 0
#define DEBUG_API 0
//@} // Compile time configuration options
/***************************************************************************
* Do not change, Internal purpose only!!!
***************************************************************************/
//@{
/*
* Set additional defines based on requested configuration
*/
// configure --enable-client
#if UPNP_HAVE_CLIENT
# define INCLUDE_CLIENT_APIS 1
#endif
// configure --enable-device
#if UPNP_HAVE_DEVICE
# define INCLUDE_DEVICE_APIS 1
#endif
// configure --enable-webserver --enable-device
#if UPNP_HAVE_WEBSERVER
# define INTERNAL_WEB_SERVER 1
#endif
#undef EXCLUDE_WEB_SERVER
#undef EXCLUDE_MINISERVER
#ifdef INTERNAL_WEB_SERVER
# define EXCLUDE_WEB_SERVER 0
# define EXCLUDE_MINISERVER 0
#else
# define EXCLUDE_WEB_SERVER 1
# define EXCLUDE_MINISERVER 1
#endif
#if EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
# undef EXCLUDE_MINISERVER
# define EXCLUDE_MINISERVER 1
# if INTERNAL_WEB_SERVER
# error "conflicting settings: use configure --disable-webserver"
# endif
#endif
#if EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
# undef EXCLUDE_MINISERVER
# define EXCLUDE_MINISERVER 0
# if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
# error "conflicting settings : use configure --enable-webserver"
# endif
#endif
#ifdef INCLUDE_CLIENT_APIS
# define CLIENTONLY(x) x
#else
# define CLIENTONLY(x)
#endif
//@}
#endif

View File

@ -1,35 +1,35 @@
/* upnp/inc/upnpconfig.h. Generated from upnpconfig.h.in by configure. */
// -*- C -*-
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/* -*- C -*- */
/*******************************************************************************
*
* Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#ifndef UPNP_CONFIG_H
#define UPNP_CONFIG_H
@ -40,16 +40,16 @@
***************************************************************************/
/** The library version (string) e.g. "1.3.0" */
#define UPNP_VERSION_STRING "1.4.7"
#define UPNP_VERSION_STRING "1.6.20"
/** Major version of the library */
#define UPNP_VERSION_MAJOR 1
/** Minor version of the library */
#define UPNP_VERSION_MINOR 4
#define UPNP_VERSION_MINOR 6
/** Patch version of the library */
#define UPNP_VERSION_PATCH 7
#define UPNP_VERSION_PATCH 20
/** The library version (numeric) e.g. 10300 means version 1.3.0 */
#define UPNP_VERSION \
@ -57,6 +57,19 @@
/***************************************************************************
* Large file support
***************************************************************************/
/** File Offset size */
#define _FILE_OFFSET_BITS 64
/** Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#define _LARGEFILE_SOURCE 1
/** Large files support */
#define _LARGE_FILE_SOURCE /**/
/***************************************************************************
* Library optional features
***************************************************************************/
@ -87,11 +100,37 @@
#define UPNP_HAVE_WEBSERVER 1
/** Defined to 1 if the library has been compiled with the SSDP part enabled
* (i.e. configure --enable-ssdp) */
#define UPNP_HAVE_SSDP 1
/** Defined to 1 if the library has been compiled with optional SSDP headers
* support (i.e. configure --enable-optssdp) */
#define UPNP_HAVE_OPTSSDP 1
/** Defined to 1 if the library has been compiled with the SOAP part enabled
* (i.e. configure --enable-soap) */
#define UPNP_HAVE_SOAP 1
/** Defined to 1 if the library has been compiled with the GENA part enabled
* (i.e. configure --enable-gena) */
#define UPNP_HAVE_GENA 1
/** Defined to 1 if the library has been compiled with helper API
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
#define UPNP_HAVE_TOOLS 1
/** Defined to 1 if the library has been compiled with ipv6 support
* (i.e. configure --enable-ipv6) */
/* #undef UPNP_ENABLE_IPV6 */
#endif // UPNP_CONFIG_H
/** Defined to 1 if the library has been compiled with unspecified SERVER
* header (i.e. configure --enable-unspecified_server) */
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
#endif /* UPNP_CONFIG_H */

View File

@ -5,17 +5,17 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=libupnp - Win32 Debug
!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "libupnp.mak".
!MESSAGE
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
!MESSAGE Sie können beim Ausf?hren von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "libupnp.mak" CFG="libupnp - Win32 Debug"
!MESSAGE
!MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "libupnp - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libupnp - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
@ -389,10 +389,6 @@ SOURCE=..\upnp\src\inc\upnpapi.h
# End Source File
# Begin Source File
SOURCE=..\upnp\src\inc\upnpclosesocket.h
# End Source File
# Begin Source File
SOURCE=..\upnp\src\inc\uri.h
# End Source File
# Begin Source File

222
build/msvc/stdint.h Normal file
View File

@ -0,0 +1,222 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#if (_MSC_VER < 1300) && defined(__cplusplus)
extern "C++" {
#endif
# include <wchar.h>
#if (_MSC_VER < 1300) && defined(__cplusplus)
}
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
// 7.18.1.2 Minimum-width integer types
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
// 7.18.1.4 Integer types capable of holding object pointers
#ifdef _WIN64 // [
typedef __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else // _WIN64 ][
typedef int intptr_t;
typedef unsigned int uintptr_t;
#endif // _WIN64 ]
// 7.18.1.5 Greatest-width integer types
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
// 7.18.2 Limits of specified-width integer types
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
#define INT16_MAX _I16_MAX
#define INT32_MIN ((int32_t)_I32_MIN)
#define INT32_MAX _I32_MAX
#define INT64_MIN ((int64_t)_I64_MIN)
#define INT64_MAX _I64_MAX
#define UINT8_MAX _UI8_MAX
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
// 7.18.2.3 Limits of fastest minimum-width integer types
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
// 7.18.2.4 Limits of integer types capable of holding object pointers
#ifdef _WIN64 // [
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
#else // _WIN64 ][
# define INTPTR_MIN INT32_MIN
# define INTPTR_MAX INT32_MAX
# define UINTPTR_MAX UINT32_MAX
#endif // _WIN64 ]
// 7.18.2.5 Limits of greatest-width integer types
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
// 7.18.3 Limits of other integer types
#ifdef _WIN64 // [
# define PTRDIFF_MIN _I64_MIN
# define PTRDIFF_MAX _I64_MAX
#else // _WIN64 ][
# define PTRDIFF_MIN _I32_MIN
# define PTRDIFF_MAX _I32_MAX
#endif // _WIN64 ]
#define SIG_ATOMIC_MIN INT_MIN
#define SIG_ATOMIC_MAX INT_MAX
#ifndef SIZE_MAX // [
# ifdef _WIN64 // [
# define SIZE_MAX _UI64_MAX
# else // _WIN64 ][
# define SIZE_MAX _UI32_MAX
# endif // _WIN64 ]
#endif // SIZE_MAX ]
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
#ifndef WCHAR_MIN // [
# define WCHAR_MIN 0
#endif // WCHAR_MIN ]
#ifndef WCHAR_MAX // [
# define WCHAR_MAX _UI16_MAX
#endif // WCHAR_MAX ]
#define WINT_MIN 0
#define WINT_MAX _UI16_MAX
#endif // __STDC_LIMIT_MACROS ]
// 7.18.4 Limits of other integer types
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
// 7.18.4.1 Macros for minimum-width integer constants
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
// 7.18.4.2 Macros for greatest-width integer constants
#define INTMAX_C INT64_C
#define UINTMAX_C UINT64_C
#endif // __STDC_CONSTANT_MACROS ]
#endif // _MSC_STDINT_H_ ]

3
build/vc10/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.suo
*.user

361
build/vc10/ixml.vcxproj Normal file
View File

@ -0,0 +1,361 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Lib|Win32">
<Configuration>Debug Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Lib|x64">
<Configuration>Debug Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|Win32">
<Configuration>Release Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|x64">
<Configuration>Release Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9C2C266D-35A3-465F-A297-0E21D54E5C89}</ProjectGuid>
<RootNamespace>ixml</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">true</EnableManagedIncrementalBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">true</EnableManagedIncrementalBuild>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<BuildLog>
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\ixml\src\attr.c" />
<ClCompile Include="..\..\ixml\src\document.c" />
<ClCompile Include="..\..\ixml\src\element.c" />
<ClCompile Include="..\..\ixml\src\ixml.c" />
<ClCompile Include="..\..\ixml\src\ixmldebug.c" />
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c" />
<ClCompile Include="..\..\ixml\src\ixmlparser.c" />
<ClCompile Include="..\..\ixml\src\namedNodeMap.c" />
<ClCompile Include="..\..\ixml\src\node.c" />
<ClCompile Include="..\..\ixml\src\nodeList.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\ixml\inc\ixml.h" />
<ClInclude Include="..\..\ixml\inc\ixmldebug.h" />
<ClInclude Include="..\..\ixml\src\inc\ixmlmembuf.h" />
<ClInclude Include="..\..\ixml\src\inc\ixmlparser.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\ixml\src\attr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\document.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\element.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixml.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixmldebug.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixmlparser.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\namedNodeMap.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\node.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\nodeList.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\ixml\inc\ixml.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\ixml\inc\ixmldebug.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\ixml\src\inc\ixmlmembuf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\ixml\src\inc\ixmlparser.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

147
build/vc10/libupnp.sln Normal file
View File

@ -0,0 +1,147 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "libupnp.vcxproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "ixml.vcxproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "threadutil.vcxproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "tvctrlpt.vcxproj", "{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "tvdevice.vcxproj", "{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcxproj", "{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{55AF07A8-18AA-45B8-A231-5082F1C6FC08}"
ProjectSection(SolutionItems) = preProject
..\..\AUTHORS = ..\..\AUTHORS
..\..\bootstrap = ..\..\bootstrap
..\..\ChangeLog = ..\..\ChangeLog
..\..\configure.ac = ..\..\configure.ac
..\..\COPYING = ..\..\COPYING
..\..\Doxyfile = ..\..\Doxyfile
..\..\INSTALL = ..\..\INSTALL
..\..\libupnp.pc.in = ..\..\libupnp.pc.in
..\..\libupnp.spec = ..\..\libupnp.spec
..\..\LICENSE = ..\..\LICENSE
..\..\Makefile.am = ..\..\Makefile.am
..\..\NEWS = ..\..\NEWS
..\..\README = ..\..\README
..\..\THANKS = ..\..\THANKS
..\..\TODO = ..\..\TODO
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Lib|Win32 = Debug Lib|Win32
Debug Lib|x64 = Debug Lib|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release Lib|Win32 = Release Lib|Win32
Release Lib|x64 = Release Lib|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.Build.0 = Debug Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.ActiveCfg = Debug|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.Build.0 = Debug|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.Build.0 = Release Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.ActiveCfg = Release Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.Build.0 = Release Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.ActiveCfg = Release|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.Build.0 = Release|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.Build.0 = Debug Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.ActiveCfg = Debug|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.Build.0 = Debug|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.Build.0 = Release Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.ActiveCfg = Release Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.Build.0 = Release Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.ActiveCfg = Release|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.Build.0 = Release|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.Build.0 = Debug Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.ActiveCfg = Debug|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.Build.0 = Debug|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.Build.0 = Release Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.ActiveCfg = Release Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.Build.0 = Release Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.ActiveCfg = Release|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.Build.0 = Release|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.Build.0 = Debug Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.ActiveCfg = Debug|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.Build.0 = Debug|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.ActiveCfg = Debug|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.Build.0 = Debug|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.Build.0 = Release Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.ActiveCfg = Release Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.Build.0 = Release Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.ActiveCfg = Release|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.Build.0 = Release|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.ActiveCfg = Release|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.Build.0 = Release|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.Build.0 = Debug Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.ActiveCfg = Debug|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.Build.0 = Debug|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.ActiveCfg = Debug|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.Build.0 = Debug|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.Build.0 = Release Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.ActiveCfg = Release Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.Build.0 = Release Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.ActiveCfg = Release|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.Build.0 = Release|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.ActiveCfg = Release|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.Build.0 = Release|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.Build.0 = Debug Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.ActiveCfg = Debug|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.Build.0 = Debug|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.ActiveCfg = Debug|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.Build.0 = Debug|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.Build.0 = Release Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.ActiveCfg = Release Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.Build.0 = Release Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.ActiveCfg = Release|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.Build.0 = Release|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.ActiveCfg = Release|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

706
build/vc10/libupnp.vcxproj Normal file
View File

@ -0,0 +1,706 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Lib|Win32">
<Configuration>Debug Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Lib|x64">
<Configuration>Debug Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|Win32">
<Configuration>Release Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|x64">
<Configuration>Release Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6227F51A-1498-4C4A-B213-F6FDED605125}</ProjectGuid>
<RootNamespace>libupnp</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\lib\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\lib\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/libupnp.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>
</Command>
<Message>Add pthreadVC2.dll to output</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/libupnp.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
</Bscmake>
<BuildLog>
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
</BuildLog>
<PostBuildEvent />
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/libupnp.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/libupnp.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\src\api\ActionComplete.c" />
<ClCompile Include="..\..\upnp\src\api\ActionRequest.c" />
<ClCompile Include="..\..\ixml\src\attr.c" />
<ClCompile Include="..\..\upnp\src\genlib\client_table\client_table.c" />
<ClCompile Include="..\..\upnp\src\genlib\client_table\ClientSubscription.c" />
<ClCompile Include="..\..\upnp\src\api\Discovery.c" />
<ClCompile Include="..\..\ixml\src\document.c" />
<ClCompile Include="..\..\ixml\src\element.c" />
<ClCompile Include="..\..\upnp\src\api\Event.c" />
<ClCompile Include="..\..\upnp\src\api\EventSubscribe.c" />
<ClCompile Include="..\..\upnp\src\api\FileInfo.c" />
<ClCompile Include="..\..\threadutil\src\FreeList.c" />
<ClCompile Include="..\..\upnp\src\gena\gena_callback2.c" />
<ClCompile Include="..\..\upnp\src\gena\gena_ctrlpt.c" />
<ClCompile Include="..\..\upnp\src\gena\gena_device.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpparser.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpreadwrite.c" />
<ClCompile Include="..\..\ixml\src\ixml.c" />
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c" />
<ClCompile Include="..\..\ixml\src\ixmlparser.c" />
<ClCompile Include="..\..\threadutil\src\LinkedList.c" />
<ClCompile Include="..\..\upnp\src\uuid\md5.c" />
<ClCompile Include="..\..\upnp\src\genlib\util\membuffer.c" />
<ClCompile Include="..\..\upnp\src\genlib\miniserver\miniserver.c" />
<ClCompile Include="..\..\ixml\src\namedNodeMap.c" />
<ClCompile Include="..\..\ixml\src\node.c" />
<ClCompile Include="..\..\ixml\src\nodeList.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\http\parsetools.c" />
<ClCompile Include="..\..\upnp\src\genlib\service_table\service_table.c" />
<ClCompile Include="..\..\upnp\src\soap\soap_common.c" />
<ClCompile Include="..\..\upnp\src\soap\soap_ctrlpt.c" />
<ClCompile Include="..\..\upnp\src\soap\soap_device.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\sock.c" />
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ctrlpt.c" />
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_device.c" />
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ResultData.c" />
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_server.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\http\statcodes.c" />
<ClCompile Include="..\..\upnp\src\api\StateVarComplete.c" />
<ClCompile Include="..\..\upnp\src\api\StateVarRequest.c" />
<ClCompile Include="..\..\upnp\src\genlib\util\strintmap.c" />
<ClCompile Include="..\..\upnp\src\api\SubscriptionRequest.c" />
<ClCompile Include="..\..\upnp\src\uuid\sysdep.c" />
<ClCompile Include="..\..\threadutil\src\ThreadPool.c" />
<ClCompile Include="..\..\threadutil\src\TimerThread.c" />
<ClCompile Include="..\..\upnp\src\genlib\util\upnp_timeout.c" />
<ClCompile Include="..\..\upnp\src\api\upnpapi.c" />
<ClCompile Include="..\..\upnp\src\api\upnpdebug.c" />
<ClCompile Include="..\..\upnp\src\api\UpnpString.c" />
<ClCompile Include="..\..\upnp\src\api\upnptools.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\uri\uri.c" />
<ClCompile Include="..\..\upnp\src\urlconfig\urlconfig.c" />
<ClCompile Include="..\..\upnp\src\genlib\util\util.c" />
<ClCompile Include="..\..\upnp\src\uuid\uuid.c" />
<ClCompile Include="..\..\upnp\src\genlib\net\http\webserver.c" />
<ClCompile Include="..\..\upnp\src\win_dll.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\inc\ActionComplete.h" />
<ClInclude Include="..\..\upnp\inc\ActionRequest.h" />
<ClInclude Include="..\inc\autoconfig.h" />
<ClInclude Include="..\..\upnp\inc\Callback.h" />
<ClInclude Include="..\..\upnp\src\inc\client_table.h" />
<ClInclude Include="..\..\upnp\src\inc\config.h" />
<ClInclude Include="..\..\upnp\inc\Discovery.h" />
<ClInclude Include="..\..\upnp\inc\Event.h" />
<ClInclude Include="..\..\upnp\inc\EventSubscribe.h" />
<ClInclude Include="..\..\upnp\inc\FileInfo.h" />
<ClInclude Include="..\..\upnp\src\inc\gena.h" />
<ClInclude Include="..\..\upnp\src\inc\gena_ctrlpt.h" />
<ClInclude Include="..\..\upnp\src\inc\gena_device.h" />
<ClInclude Include="..\..\upnp\src\inc\global.h" />
<ClInclude Include="..\..\upnp\src\inc\gmtdate.h" />
<ClInclude Include="..\..\upnp\src\inc\httpparser.h" />
<ClInclude Include="..\..\upnp\src\inc\httpreadwrite.h" />
<ClInclude Include="..\msvc\inttypes.h" />
<ClInclude Include="..\..\upnp\src\inc\md5.h" />
<ClInclude Include="..\..\upnp\src\inc\membuffer.h" />
<ClInclude Include="..\..\upnp\src\inc\miniserver.h" />
<ClInclude Include="..\..\upnp\src\inc\netall.h" />
<ClInclude Include="..\..\upnp\src\inc\parsetools.h" />
<ClInclude Include="..\..\upnp\src\inc\server.h" />
<ClInclude Include="..\..\upnp\src\inc\service_table.h" />
<ClInclude Include="..\..\upnp\src\inc\soaplib.h" />
<ClInclude Include="..\..\upnp\src\inc\sock.h" />
<ClInclude Include="..\..\upnp\src\ssdp\ssdp_ResultData.h" />
<ClInclude Include="..\..\upnp\src\inc\ssdplib.h" />
<ClInclude Include="..\..\upnp\src\inc\statcodes.h" />
<ClInclude Include="..\..\upnp\inc\StateVarComplete.h" />
<ClInclude Include="..\..\upnp\inc\StateVarRequest.h" />
<ClInclude Include="..\..\upnp\src\inc\statuscodes.h" />
<ClInclude Include="..\msvc\stdint.h" />
<ClInclude Include="..\..\upnp\src\inc\strintmap.h" />
<ClInclude Include="..\..\upnp\inc\SubscriptionRequest.h" />
<ClInclude Include="..\..\upnp\src\inc\sysdep.h" />
<ClInclude Include="..\..\upnp\inc\TemplateInclude.h" />
<ClInclude Include="..\..\upnp\inc\TemplateSource.h" />
<ClInclude Include="..\..\upnp\inc\TemplateUndef.h" />
<ClInclude Include="..\..\upnp\src\inc\unixutil.h" />
<ClInclude Include="..\..\upnp\inc\upnp.h" />
<ClInclude Include="..\..\upnp\src\inc\upnp_timeout.h" />
<ClInclude Include="..\..\upnp\src\inc\upnpapi.h" />
<ClInclude Include="..\inc\upnpconfig.h" />
<ClInclude Include="..\..\upnp\inc\upnpdebug.h" />
<ClInclude Include="..\..\upnp\inc\UpnpGlobal.h" />
<ClInclude Include="..\..\upnp\inc\UpnpInet.h" />
<ClInclude Include="..\..\upnp\inc\UpnpIntTypes.h" />
<ClInclude Include="..\..\upnp\inc\UpnpStdInt.h" />
<ClInclude Include="..\..\upnp\inc\UpnpString.h" />
<ClInclude Include="..\..\upnp\inc\upnptools.h" />
<ClInclude Include="..\..\upnp\inc\UpnpUniStd.h" />
<ClInclude Include="..\..\upnp\src\inc\upnputil.h" />
<ClInclude Include="..\..\upnp\src\inc\uri.h" />
<ClInclude Include="..\..\upnp\src\inc\urlconfig.h" />
<ClInclude Include="..\..\upnp\src\inc\uuid.h" />
<ClInclude Include="..\..\upnp\src\inc\VirtualDir.h" />
<ClInclude Include="..\..\upnp\src\inc\webserver.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="ixml.vcxproj">
<Project>{9c2c266d-35a3-465f-a297-0e21d54e5c89}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="threadutil.vcxproj">
<Project>{1d3eef7a-d248-48c0-b6b5-eca229fe4b3d}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,362 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="sources">
<UniqueIdentifier>{47d40159-145c-4ff3-98f5-9b2c96c80092}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="headers">
<UniqueIdentifier>{2a8d348a-a429-4b41-9934-050df3866f50}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\src\api\ActionComplete.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\ActionRequest.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\attr.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\client_table\client_table.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\client_table\ClientSubscription.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\Discovery.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\document.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\element.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\Event.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\EventSubscribe.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\FileInfo.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\FreeList.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\gena\gena_callback2.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\gena\gena_ctrlpt.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\gena\gena_device.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpparser.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpreadwrite.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixml.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\ixmlparser.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\LinkedList.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\uuid\md5.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\util\membuffer.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\miniserver\miniserver.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\namedNodeMap.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\node.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\ixml\src\nodeList.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\http\parsetools.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\service_table\service_table.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\soap\soap_common.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\soap\soap_ctrlpt.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\soap\soap_device.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\sock.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ctrlpt.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_device.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ResultData.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_server.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\http\statcodes.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\StateVarComplete.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\StateVarRequest.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\util\strintmap.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\SubscriptionRequest.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\uuid\sysdep.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\ThreadPool.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\TimerThread.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\util\upnp_timeout.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\upnpapi.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\upnpdebug.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\UpnpString.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\api\upnptools.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\uri\uri.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\urlconfig\urlconfig.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\util\util.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\uuid\uuid.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\genlib\net\http\webserver.c">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\src\win_dll.c">
<Filter>sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\inc\ActionComplete.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\ActionRequest.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\inc\autoconfig.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\Callback.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\client_table.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\config.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\Discovery.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\Event.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\EventSubscribe.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\FileInfo.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\gena.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\gena_ctrlpt.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\gena_device.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\global.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\gmtdate.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\httpparser.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\httpreadwrite.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\msvc\inttypes.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\md5.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\membuffer.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\miniserver.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\netall.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\parsetools.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\server.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\service_table.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\soaplib.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\sock.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\ssdp\ssdp_ResultData.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\ssdplib.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\statcodes.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\StateVarComplete.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\StateVarRequest.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\statuscodes.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\msvc\stdint.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\strintmap.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\SubscriptionRequest.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\sysdep.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\TemplateInclude.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\TemplateSource.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\TemplateUndef.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\unixutil.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\upnp.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\upnp_timeout.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\upnpapi.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\inc\upnpconfig.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\upnpdebug.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\UpnpGlobal.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\UpnpInet.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\UpnpIntTypes.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\UpnpStdInt.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\UpnpString.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\upnptools.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\inc\UpnpUniStd.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\upnputil.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\uri.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\urlconfig.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\uuid.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\VirtualDir.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\src\inc\webserver.h">
<Filter>headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,332 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Lib|Win32">
<Configuration>Debug Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Lib|x64">
<Configuration>Debug Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|Win32">
<Configuration>Release Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|x64">
<Configuration>Release Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}</ProjectGuid>
<RootNamespace>threadutil</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<BuildLog>
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
</BuildLog>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\threadutil\src\FreeList.c" />
<ClCompile Include="..\..\threadutil\src\LinkedList.c" />
<ClCompile Include="..\..\threadutil\src\ThreadPool.c" />
<ClCompile Include="..\..\threadutil\src\TimerThread.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\threadutil\inc\FreeList.h" />
<ClInclude Include="..\..\threadutil\inc\ithread.h" />
<ClInclude Include="..\..\threadutil\inc\LinkedList.h" />
<ClInclude Include="..\..\threadutil\inc\threadpool.h" />
<ClInclude Include="..\..\threadutil\inc\TimerThread.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\threadutil\src\FreeList.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\LinkedList.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\ThreadPool.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\threadutil\src\TimerThread.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\threadutil\inc\FreeList.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\threadutil\inc\ithread.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\threadutil\inc\LinkedList.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\threadutil\inc\threadpool.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\threadutil\inc\TimerThread.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

416
build/vc10/tvcombo.vcxproj Normal file
View File

@ -0,0 +1,416 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Lib|Win32">
<Configuration>Debug Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Lib|x64">
<Configuration>Debug Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|Win32">
<Configuration>Release Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|x64">
<Configuration>Release Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6365804B-22C6-4D5E-91F3-0C052EB55B4F}</ProjectGuid>
<RootNamespace>tvcombo</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<BuildLog>
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
</BuildLog>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\sample\common\sample_util.c" />
<ClCompile Include="..\..\upnp\sample\linux\tv_combo_main.c" />
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c" />
<ClCompile Include="..\..\upnp\sample\common\tv_device.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\sample\common\sample_util.h" />
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h" />
<ClInclude Include="..\..\upnp\sample\common\tv_device.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="libupnp.vcxproj">
<Project>{6227f51a-1498-4c4a-b213-f6fded605125}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\sample\common\sample_util.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\linux\tv_combo_main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\common\tv_device.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\sample\common\sample_util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\sample\common\tv_device.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

414
build/vc10/tvctrlpt.vcxproj Normal file
View File

@ -0,0 +1,414 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Lib|Win32">
<Configuration>Debug Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Lib|x64">
<Configuration>Debug Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|Win32">
<Configuration>Release Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|x64">
<Configuration>Release Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}</ProjectGuid>
<RootNamespace>sample</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<BuildLog>
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
</BuildLog>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\sample\common\sample_util.c" />
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c" />
<ClCompile Include="..\..\upnp\sample\linux\tv_ctrlpt_main.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\sample\common\sample_util.h" />
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="libupnp.vcxproj">
<Project>{6227f51a-1498-4c4a-b213-f6fded605125}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\sample\common\sample_util.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\linux\tv_ctrlpt_main.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\sample\common\sample_util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

423
build/vc10/tvdevice.vcxproj Normal file
View File

@ -0,0 +1,423 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Lib|Win32">
<Configuration>Debug Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug Lib|x64">
<Configuration>Debug Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|Win32">
<Configuration>Release Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Lib|x64">
<Configuration>Release Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}</ProjectGuid>
<RootNamespace>tvdevice</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<BuildLog>
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
</BuildLog>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
mkdir "$(OutDir)web"
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
</Command>
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\sample\common\sample_util.c" />
<ClCompile Include="..\..\upnp\sample\common\tv_device.c" />
<ClCompile Include="..\..\upnp\sample\linux\tv_device_main.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\sample\common\sample_util.h" />
<ClInclude Include="..\..\upnp\sample\common\tv_device.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="libupnp.vcxproj">
<Project>{6227f51a-1498-4c4a-b213-f6fded605125}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="..\..\upnp\sample\web\tvcombodesc.xml" />
<None Include="..\..\upnp\sample\web\tvcontrolSCPD.xml" />
<None Include="..\..\upnp\sample\web\tvdevicedesc.xml" />
<None Include="..\..\upnp\sample\web\tvdevicepres.html" />
<None Include="..\..\upnp\sample\web\tvpictureSCPD.xml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="SampleDeviceXMLs">
<UniqueIdentifier>{3953a023-20c4-4d35-860e-ec802019076c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\upnp\sample\common\sample_util.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\common\tv_device.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\upnp\sample\linux\tv_device_main.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\upnp\sample\common\sample_util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\upnp\sample\common\tv_device.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\upnp\sample\web\tvcombodesc.xml">
<Filter>SampleDeviceXMLs</Filter>
</None>
<None Include="..\..\upnp\sample\web\tvcontrolSCPD.xml">
<Filter>SampleDeviceXMLs</Filter>
</None>
<None Include="..\..\upnp\sample\web\tvdevicedesc.xml">
<Filter>SampleDeviceXMLs</Filter>
</None>
<None Include="..\..\upnp\sample\web\tvdevicepres.html">
<Filter>SampleDeviceXMLs</Filter>
</None>
<None Include="..\..\upnp\sample\web\tvpictureSCPD.xml">
<Filter>SampleDeviceXMLs</Filter>
</None>
</ItemGroup>
</Project>

217
build/vc8/ixml.vcproj Normal file
View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ixml"
ProjectGUID="{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}"
RootNamespace="ixml"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;DEBUG;IXML_INLINE="
RuntimeLibrary="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\ixml\src\attr.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
</File>
<File
RelativePath="..\..\ixml\src\element.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixml.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmldebug.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlmembuf.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlparser.c"
>
</File>
<File
RelativePath="..\..\ixml\src\namedNodeMap.c"
>
</File>
<File
RelativePath="..\..\ixml\src\node.c"
>
</File>
<File
RelativePath="..\..\ixml\src\nodeList.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\ixml\inc\ixml.h"
>
</File>
<File
RelativePath="..\..\ixml\inc\ixmldebug.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlmembuf.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlparser.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

65
build/vc8/libupnp.sln Normal file
View File

@ -0,0 +1,65 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "libupnp.vcproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "threadutil.vcproj", "{24884928-0501-4CF2-BC8A-180AFC23B2AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "ixml.vcproj", "{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "tvdevice.vcproj", "{F592B023-E1F3-4A1E-841E-662DEE497435}"
ProjectSection(ProjectDependencies) = postProject
{6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125}
{24884928-0501-4CF2-BC8A-180AFC23B2AF} = {24884928-0501-4CF2-BC8A-180AFC23B2AF}
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} = {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "tvctrlpt.vcproj", "{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}"
ProjectSection(ProjectDependencies) = postProject
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} = {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}
{24884928-0501-4CF2-BC8A-180AFC23B2AF} = {24884928-0501-4CF2-BC8A-180AFC23B2AF}
{6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcproj", "{B5D74697-F615-4DCB-AA8B-935F6372F01C}"
ProjectSection(ProjectDependencies) = postProject
{6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125}
{24884928-0501-4CF2-BC8A-180AFC23B2AF} = {24884928-0501-4CF2-BC8A-180AFC23B2AF}
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} = {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.ActiveCfg = Debug|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.Build.0 = Debug|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.ActiveCfg = Release|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.Build.0 = Release|Win32
{24884928-0501-4CF2-BC8A-180AFC23B2AF}.Debug|Win32.ActiveCfg = Debug|Win32
{24884928-0501-4CF2-BC8A-180AFC23B2AF}.Debug|Win32.Build.0 = Debug|Win32
{24884928-0501-4CF2-BC8A-180AFC23B2AF}.Release|Win32.ActiveCfg = Release|Win32
{24884928-0501-4CF2-BC8A-180AFC23B2AF}.Release|Win32.Build.0 = Release|Win32
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Debug|Win32.ActiveCfg = Debug|Win32
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Debug|Win32.Build.0 = Debug|Win32
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Release|Win32.ActiveCfg = Release|Win32
{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Release|Win32.Build.0 = Release|Win32
{F592B023-E1F3-4A1E-841E-662DEE497435}.Debug|Win32.ActiveCfg = Debug|Win32
{F592B023-E1F3-4A1E-841E-662DEE497435}.Debug|Win32.Build.0 = Debug|Win32
{F592B023-E1F3-4A1E-841E-662DEE497435}.Release|Win32.ActiveCfg = Release|Win32
{F592B023-E1F3-4A1E-841E-662DEE497435}.Release|Win32.Build.0 = Release|Win32
{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Debug|Win32.ActiveCfg = Debug|Win32
{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Debug|Win32.Build.0 = Debug|Win32
{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Release|Win32.ActiveCfg = Release|Win32
{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Release|Win32.Build.0 = Release|Win32
{B5D74697-F615-4DCB-AA8B-935F6372F01C}.Debug|Win32.ActiveCfg = Debug|Win32
{B5D74697-F615-4DCB-AA8B-935F6372F01C}.Debug|Win32.Build.0 = Debug|Win32
{B5D74697-F615-4DCB-AA8B-935F6372F01C}.Release|Win32.ActiveCfg = Release|Win32
{B5D74697-F615-4DCB-AA8B-935F6372F01C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

574
build/vc8/libupnp.vcproj Normal file
View File

@ -0,0 +1,574 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="libupnp"
ProjectGUID="{6227F51A-1498-4C4A-B213-F6FDED605125}"
RootNamespace="libupnp"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/libupnp.pch"
AssemblerListingLocation="$(OutDir)\"
ObjectFile="$(OutDir)\"
ProgramDataBaseFileName="$(OutDir)\"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib ..\..\pthreads\lib\pthreadvc2.lib ws2_32.lib iphlpapi.lib"
OutputFile="$(OutDir)\libupnp.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(OutDir)\libupnp.pdb"
ImportLibrary="$(OutDir)\libupnp.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc"
PreprocessorDefinitions="DEBUG;WIN32;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(OutDir)\libupnp.pch"
AssemblerListingLocation="$(OutDir)\"
ObjectFile="$(OutDir)\"
ProgramDataBaseFileName="$(OutDir)\"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadvc2.lib ws2_32.lib iphlpapi.lib ixml.lib"
OutputFile="$(OutDir)\libupnp.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)\..\ixml"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\libupnp.pdb"
ImportLibrary="$(OutDir)\libupnp.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="sources"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\ixml\src\attr.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
</File>
<File
RelativePath="..\..\ixml\src\element.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\FreeList.c"
>
</File>
<File
RelativePath="..\..\upnp\src\gena\gena_callback2.c"
>
</File>
<File
RelativePath="..\..\upnp\src\gena\gena_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\src\gena\gena_device.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\http\httpparser.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\http\httpreadwrite.c"
>
</File>
<File
RelativePath="..\..\upnp\src\inet_pton.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixml.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlmembuf.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlparser.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\LinkedList.c"
>
</File>
<File
RelativePath="..\..\upnp\src\uuid\md5.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\util\membuffer.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\miniserver\miniserver.c"
>
</File>
<File
RelativePath="..\..\ixml\src\namedNodeMap.c"
>
</File>
<File
RelativePath="..\..\ixml\src\node.c"
>
</File>
<File
RelativePath="..\..\ixml\src\nodeList.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\http\parsetools.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\service_table\service_table.c"
>
</File>
<File
RelativePath="..\..\upnp\src\soap\soap_common.c"
>
</File>
<File
RelativePath="..\..\upnp\src\soap\soap_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\src\soap\soap_device.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\sock.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
>
</File>
<File
RelativePath="..\..\upnp\src\uuid\sysdep.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\ThreadPool.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\TimerThread.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\util\upnp_timeout.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\upnpapi.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\upnpdebug.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\UpnpString.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\upnptools.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\uri\uri.c"
>
</File>
<File
RelativePath="..\..\upnp\src\urlconfig\urlconfig.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\util\util.c"
>
</File>
<File
RelativePath="..\..\upnp\src\uuid\uuid.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\net\http\webserver.c"
>
</File>
<File
RelativePath="..\..\upnp\src\win_dll.c"
>
</File>
</Filter>
<Filter
Name="headers"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\upnp\src\inc\client_table.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\config.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\gena.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\gena_ctrlpt.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\gena_device.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\global.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\gmtdate.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\http_client.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\httpparser.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\httpreadwrite.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\inet_pton.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\md5.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\membuffer.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\miniserver.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\netall.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\parsetools.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\server.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\service_table.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\soaplib.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\sock.h"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_ResultData.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\ssdplib.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\statcodes.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\statuscodes.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\strintmap.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\sysdep.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\unixutil.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\upnp.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\upnp_timeout.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\upnpapi.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\upnpdebug.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpString.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\upnptools.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\uri.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\urlconfig.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\util.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\utilall.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\uuid.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\webserver.h"
>
</File>
</Filter>
<File
RelativePath="..\..\..\..\libupnp_win32.patch"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

202
build/vc8/threadutil.vcproj Normal file
View File

@ -0,0 +1,202 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="threadutil"
ProjectGUID="{24884928-0501-4CF2-BC8A-180AFC23B2AF}"
RootNamespace="threadutil"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="pthreadVC2.lib"
AdditionalLibraryDirectories="..\..\pthreads\lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\threadutil\src\FreeList.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\LinkedList.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\ThreadPool.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\TimerThread.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\threadutil\inc\FreeList.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\ithread.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\LinkedList.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\ThreadPool.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\TimerThread.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

220
build/vc8/tvcombo.vcproj Normal file
View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="tvcombo"
ProjectGUID="{B5D74697-F615-4DCB-AA8B-935F6372F01C}"
RootNamespace="tvcombo"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\linux\tv_combo_main.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_ctrlpt.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_device.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

212
build/vc8/tvctrlpt.vcproj Normal file
View File

@ -0,0 +1,212 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="tvctrlpt"
ProjectGUID="{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}"
RootNamespace="tvctrlpt"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\linux\tv_ctrlpt_main.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvctrlpt\upnp_tv_ctrlpt.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

212
build/vc8/tvdevice.vcproj Normal file
View File

@ -0,0 +1,212 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="tvdevice"
ProjectGUID="{F592B023-E1F3-4A1E-841E-662DEE497435}"
RootNamespace="tvdevice"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\linux\tv_device_main.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvdevice\upnp_tv_device.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

648
build/vc9/ixml.vcproj Normal file
View File

@ -0,0 +1,648 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="ixml"
ProjectGUID="{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
RootNamespace="ixml"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\ixml\src\attr.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
</File>
<File
RelativePath="..\..\ixml\src\element.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixml.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmldebug.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlmembuf.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlparser.c"
>
</File>
<File
RelativePath="..\..\ixml\src\namedNodeMap.c"
>
</File>
<File
RelativePath="..\..\ixml\src\node.c"
>
</File>
<File
RelativePath="..\..\ixml\src\nodeList.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\ixml\inc\ixml.h"
>
</File>
<File
RelativePath="..\..\ixml\inc\ixmldebug.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlmembuf.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlparser.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

141
build/vc9/libupnp.sln Normal file
View File

@ -0,0 +1,141 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "libupnp.vcproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
ProjectSection(ProjectDependencies) = postProject
{9C2C266D-35A3-465F-A297-0E21D54E5C89} = {9C2C266D-35A3-465F-A297-0E21D54E5C89}
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D} = {1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "ixml.vcproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "threadutil.vcproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "tvctrlpt.vcproj", "{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
ProjectSection(ProjectDependencies) = postProject
{6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "tvdevice.vcproj", "{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
ProjectSection(ProjectDependencies) = postProject
{6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcproj", "{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
ProjectSection(ProjectDependencies) = postProject
{6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Lib|Win32 = Debug Lib|Win32
Debug Lib|x64 = Debug Lib|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release Lib|Win32 = Release Lib|Win32
Release Lib|x64 = Release Lib|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.Build.0 = Debug Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.ActiveCfg = Debug|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.Build.0 = Debug|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.Build.0 = Release Lib|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.ActiveCfg = Release Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.Build.0 = Release Lib|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.ActiveCfg = Release|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.Build.0 = Release|Win32
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.Build.0 = Debug Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.ActiveCfg = Debug|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.Build.0 = Debug|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.Build.0 = Release Lib|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.ActiveCfg = Release Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.Build.0 = Release Lib|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.ActiveCfg = Release|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.Build.0 = Release|Win32
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.Build.0 = Debug Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.ActiveCfg = Debug|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.Build.0 = Debug|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.Build.0 = Release Lib|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.ActiveCfg = Release Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.Build.0 = Release Lib|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.ActiveCfg = Release|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.Build.0 = Release|Win32
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.Build.0 = Debug Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.ActiveCfg = Debug|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.Build.0 = Debug|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.ActiveCfg = Debug|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.Build.0 = Debug|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.Build.0 = Release Lib|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.ActiveCfg = Release Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.Build.0 = Release Lib|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.ActiveCfg = Release|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.Build.0 = Release|Win32
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.ActiveCfg = Release|x64
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.Build.0 = Release|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.Build.0 = Debug Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.ActiveCfg = Debug|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.Build.0 = Debug|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.ActiveCfg = Debug|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.Build.0 = Debug|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.Build.0 = Release Lib|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.ActiveCfg = Release Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.Build.0 = Release Lib|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.ActiveCfg = Release|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.Build.0 = Release|Win32
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.ActiveCfg = Release|x64
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.Build.0 = Release|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.Build.0 = Debug Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.ActiveCfg = Debug|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.Build.0 = Debug|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.ActiveCfg = Debug|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.Build.0 = Debug|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.Build.0 = Release Lib|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.ActiveCfg = Release Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.Build.0 = Release Lib|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.ActiveCfg = Release|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.Build.0 = Release|Win32
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.ActiveCfg = Release|x64
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

1156
build/vc9/libupnp.vcproj Normal file

File diff suppressed because it is too large Load Diff

612
build/vc9/threadutil.vcproj Normal file
View File

@ -0,0 +1,612 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="threadutil"
ProjectGUID="{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
RootNamespace="threadutil"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\threadutil\src\FreeList.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\LinkedList.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\ThreadPool.c"
>
</File>
<File
RelativePath="..\..\threadutil\src\TimerThread.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\threadutil\inc\FreeList.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\ithread.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\LinkedList.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\threadpool.h"
>
</File>
<File
RelativePath="..\..\threadutil\inc\TimerThread.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

704
build/vc9/tvcombo.vcproj Normal file
View File

@ -0,0 +1,704 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="tvcombo"
ProjectGUID="{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
RootNamespace="tvcombo"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\linux\tv_combo_main.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_device.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

696
build/vc9/tvctrlpt.vcproj Normal file
View File

@ -0,0 +1,696 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="tvctrlpt"
ProjectGUID="{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
RootNamespace="sample"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\linux\tv_ctrlpt_main.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

696
build/vc9/tvdevice.vcproj Normal file
View File

@ -0,0 +1,696 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="tvdevice"
ProjectGUID="{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
RootNamespace="tvdevice"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\linux\tv_device_main.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\upnp\sample\common\sample_util.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\common\tv_device.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -4,73 +4,374 @@
#
# Process this file with autoconf to produce a configure script.
#
# (C) Copyright 2005-2006 Rémi Turboult <r3mi@users.sourceforge.net>
# (C) Copyright 2005-2007 Rémi Turboult <r3mi@users.sourceforge.net>
#
AC_PREREQ(2.60)
AC_INIT([libupnp], [1.6.0], [mroberto@users.sourceforge.net])
# *Independently* of the above libupnp package version, the libtool version
# of the 3 libraries need to be updated whenever there is a change released :
# "current:revision:age" (this is NOT the same as the package version), where:
# - library code modified: revision++
# - interfaces changed/added/removed: current++ and revision=0
# - interfaces added: age++
# - interfaces removed: age=0
# *please update only once, before a formal release, not for each change*
#
# For release 1.4.1, we had:
#AC_SUBST([LT_VERSION_IXML], [2:2:0])
#AC_SUBST([LT_VERSION_THREADUTIL], [2:2:0])
#AC_SUBST([LT_VERSION_UPNP], [2:2:0])
#
# "current:revision:age"
#
# - Code has changed in ixml
# revision: 2 -> 3
# - Code has changed in threadutil
# revision: 2 -> 3
# - Interface added in threadutil
# current: 2 -> 3
# revisiion: 3 -> 0
# age: 0 -> 1
# - Code has changed in upnp
# revision: 2 -> 3
#
# For release 1.4.6, we had:
#AC_SUBST([LT_VERSION_IXML], [2:3:0])
#AC_SUBST([LT_VERSION_THREADUTIL], [3:0:1])
#AC_SUBST([LT_VERSION_UPNP], [2:3:0])
#
# "current:revision:age"
#
# - Code has changed in ixml
# revision: 3 -> 4
# - Code has changed in threadutil
# revision: 0 -> 1
# - Code has changed in upnp
# revision: 3 -> 4
# - Interface changed in upnp
# current: 2 -> 3
# revision: 4 -> 0
# - Interface removed in upnp
# age: 0 -> 0
#
# For release 1.6.0, we had:
#AC_SUBST([LT_VERSION_IXML], [2:4:0])
#AC_SUBST([LT_VERSION_THREADUTIL], [3:1:1])
#AC_SUBST([LT_VERSION_UPNP], [3:0:0])
AC_SUBST([LT_VERSION_IXML], [2:4:0])
AC_SUBST([LT_VERSION_THREADUTIL], [3:1:1])
AC_SUBST([LT_VERSION_UPNP], [3:0:0])
AC_INIT([libupnp], [1.6.20], [mroberto@users.sourceforge.net])
dnl ############################################################################
dnl # *Independently* of the above libupnp package version, the libtool version
dnl # of the 3 libraries need to be updated whenever there is a change released:
dnl # "current:revision:age" (this is NOT the same as the package version),
dnl # where:
dnl # - library code modified: revision++
dnl # - interfaces changed/added/removed: current++ and revision=0
dnl # - interfaces added: age++
dnl # - interfaces removed: age=0
dnl # *please update only once, before a formal release, not for each change*
dnl #
dnl ############################################################################
dnl # Release 1.4.1:
dnl #AC_SUBST([LT_VERSION_IXML], [2:2:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [2:2:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [2:2:0])
dnl #
dnl ############################################################################
dnl # Release 1.4.6:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in ixml
dnl # revision: 2 -> 3
dnl # - Code has changed in threadutil
dnl # revision: 2 -> 3
dnl # - Interface added in threadutil
dnl # current: 2 -> 3
dnl # revisiion: 3 -> 0
dnl # age: 0 -> 1
dnl # - Code has changed in upnp
dnl # revision: 2 -> 3
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:3:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [3:0:1])
dnl #AC_SUBST([LT_VERSION_UPNP], [2:3:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.0:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in ixml
dnl # revision: 3 -> 4
dnl # - Code has changed in threadutil
dnl # revision: 0 -> 1
dnl # - Code has changed in upnp
dnl # revision: 3 -> 4
dnl # - Interface changed in upnp
dnl # current: 2 -> 3
dnl # revision: 4 -> 0
dnl # - Interface removed in upnp
dnl # age: 0 -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [3:1:1])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:0:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.1:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 1 -> 2
dnl # - Interface added in threadutil
dnl # current: 3 -> 4
dnl # revision: 2 -> 0
dnl # - Interface added in threadutil
dnl # age: 1 -> 2
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:0:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:1:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.2:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 1 -> 2
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:0:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.3:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 0 -> 1
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:1:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.4:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 1 -> 2
dnl # - Code has changed in upnp
dnl # revision: 2 -> 3
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:3:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.5:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 3 -> 4
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:4:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.6:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 2 -> 3
dnl # - Code has changed in upnp
dnl # revision: 4 -> 5
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:3:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.7:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 3 -> 4
dnl # - Code has changed in upnp
dnl # revision: 5 -> 6
dnl # - Interfaces have been changed, added and removed in upnp
dnl # current: 3 -> 4
dnl # revision: 6 -> 0
dnl # - Interfaces removed in upnp:
dnl # age: -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:0:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0])
dnl #
dnl # Obs.: 1.6.7 was released with a version error, the correct nubers should
dnl # have been:
dnl #AC_SUBST([LT_VERSION_UPNP], [4:0:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.8:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in ixml
dnl # revision: 4 -> 5
dnl # - Code has changed in threadutil
dnl # revision: 0 -> 1
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:5:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:1:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [4:1:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.9:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 1 -> 2
dnl # - Code has changed in upnp
dnl # revision: 1 -> 2
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:5:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:2:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [4:2:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.10:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in ixml
dnl # revision: 5 -> 6
dnl # - Code has changed in threadutil
dnl # revision: 2 -> 3
dnl # - Code has changed in upnp
dnl # revision: 2 -> 3
dnl # - interface has changed in upnp
dnl # current: 4 -> 5
dnl # revision: 3 -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl ############################################################################
dnl # Release 1.6.11:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 3 -> 4
dnl # - Code has changed in upnp
dnl # revision: 3 -> 4
dnl # - interface has changed in upnp
dnl # current: 5 -> 6
dnl # revision: 4 -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:4:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.12:
dnl # "current:revision:age"
dnl #
dnl # - interface added in threadutil
dnl # current: 5 -> 6
dnl # revision: 4 - > 0
dnl # age: 2 -> 3
dnl # - interfaces removed in threadutil
dnl # age: 3 -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.13:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl # - interface added in upnp
dnl # current: 6 -> 7
dnl # revision: 1 - > 0
dnl # age: 0 -> 1
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [7:0:1])
dnl #
dnl ############################################################################
dnl # Release 1.6.14:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl # - interface added in upnp
dnl # current: 7 -> 8
dnl # revision: 1 - > 0
dnl # age: 1 -> 2
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [8:0:2])
dnl #
dnl ############################################################################
dnl # Release 1.6.15:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [8:1:2])
dnl #
dnl ############################################################################
dnl # Release 1.6.16:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in ixml
dnl # revision: 6 -> 7
dnl # - Code has changed in threadutil
dnl # revision: 0 -> 1
dnl # - Code has changed in upnp
dnl # revision: 1 -> 2
dnl # - interface changed/added/removed in upnp
dnl # current++(9); revision = 0
dnl # - interface added in upnp
dnl # age++(3)
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:1:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [9:0:3])
dnl #
dnl ############################################################################
dnl # Release 1.6.17:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 1 -> 2
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:2:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [9:1:3])
dnl #
dnl ############################################################################
dnl # Release 1.6.18:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in ixml
dnl # revision: 7 -> 8
dnl # - Code has changed in threadutil
dnl # revision: 2 -> 3
dnl # - Code has changed in upnp
dnl # revision: 1 -> 2
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:8:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:3:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [9:2:3])
dnl #
dnl ############################################################################
dnl # Release 1.6.19:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 3 -> 4
dnl # - Code has changed in upnp
dnl # revision: 2 -> 3
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:8:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:4:0])
dnl #AC_SUBST([LT_VERSION_UPNP], [9:3:3])
dnl #
dnl ############################################################################
dnl # Release 1.6.20:
dnl # "current:revision:age"
dnl #
dnl # -
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [::])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [::])
dnl #AC_SUBST([LT_VERSION_UPNP], [::])
dnl #
dnl ############################################################################
AC_SUBST([LT_VERSION_IXML], [2:8:0])
AC_SUBST([LT_VERSION_THREADUTIL], [6:4:0])
AC_SUBST([LT_VERSION_UPNP], [9:3:3])
dnl ############################################################################
dnl # Repeating the algorithm to place it closer to the modificatin place:
dnl # - library code modified: revision++
dnl # - interfaces changed/added/removed: current++ and revision=0
dnl # - interfaces added: age++
dnl # - interfaces removed: age=0
dnl # *please update only once, before a formal release, not for each change*
dnl ############################################################################
AC_CONFIG_AUX_DIR(config.aux)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_SRCDIR(upnp/inc/upnp.h)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([upnp/inc/upnp.h])
AM_INIT_AUTOMAKE([1.8 -Wall foreign subdir-objects dist-bzip2])
#
# Get canonical host names in host and host_os
#
@ -95,8 +396,7 @@ AC_REVISION([$Revision: 1.11 $])
upnpmaj=`echo "$PACKAGE_VERSION" | sed 's/\..*//' `
upnpmin=[`echo "$PACKAGE_VERSION" | sed 's/^[^.]\.// ; s/[^0-9].*$//' `]
upnppatch=[`echo "$PACKAGE_VERSION" | sed 's/^[^.]\.[^.]\.// ; s/[^0-9].*$//' `]
AC_DEFINE_UNQUOTED([UPNP_VERSION_STRING], "$PACKAGE_VERSION",
[see upnpconfig.h])
AC_DEFINE_UNQUOTED([UPNP_VERSION_STRING], "$PACKAGE_VERSION", [see upnpconfig.h])
AC_DEFINE_UNQUOTED([UPNP_VERSION_MAJOR], $upnpmaj, [see upnpconfig.h])
AC_DEFINE_UNQUOTED([UPNP_VERSION_MINOR], $upnpmin, [see upnpconfig.h])
AC_DEFINE_UNQUOTED([UPNP_VERSION_PATCH], $upnppatch, [see upnpconfig.h])
@ -118,7 +418,6 @@ fi
#
# Check for libupnp subsets
#
RT_BOOL_ARG_ENABLE([client], [yes], [control point code (client)])
if test "x$enable_client" = xyes ; then
AC_DEFINE(UPNP_HAVE_CLIENT, 1, [see upnpconfig.h])
@ -142,21 +441,66 @@ if test "x$enable_webserver" = xyes ; then
AC_DEFINE(UPNP_HAVE_WEBSERVER, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([ssdp], [yes], [SSDP part])
if test "x$enable_ssdp" = xyes ; then
AC_DEFINE(UPNP_HAVE_SSDP, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([optssdp], [yes], [optionnal SSDP headers support)])
if test "x$enable_optssdp" = xyes ; then
AC_DEFINE(UPNP_HAVE_OPTSSDP, 1, [see upnpconfig.h])
enable_uuid=yes
fi
RT_BOOL_ARG_ENABLE([soap], [yes], [SOAP part])
if test "x$enable_soap" = xyes ; then
AC_DEFINE(UPNP_HAVE_SOAP, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([gena], [yes], [GENA part])
if test "x$enable_gena" = xyes ; then
AC_DEFINE(UPNP_HAVE_GENA, 1, [see upnpconfig.h])
enable_uuid=yes
fi
AM_CONDITIONAL(ENABLE_UUID, test x"$enable_uuid" = xyes)
RT_BOOL_ARG_ENABLE([tools], [yes], [helper APIs in upnptools.h])
if test "x$enable_tools" = xyes ; then
AC_DEFINE(UPNP_HAVE_TOOLS, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([ipv6], [no], [ipv6 support])
if test "x$enable_ipv6" = xyes ; then
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([unspecified_server], [no], [unspecified SERVER header])
if test "x$enable_unspecified_server" = xyes ; then
AC_DEFINE(UPNP_ENABLE_UNSPECIFIED_SERVER, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
if test "x$enable_notification_reordering" = xyes ; then
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([blocking_tcp_connections], [yes], [blocking TCP connections])
if test "x$enable_blocking_tcp_connections" = xyes ; then
AC_DEFINE(UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([samples], [yes], [compilation of upnp/sample/ code])
#
# doc installation
# autoconf >= 2.60 already defines ${docdir}, but we will not use its
# default value, which is ${datarootdir}/doc/${PACKAGE_TARNAME}.
# That would give us ${datarootdir}/doc/libupnp, and we want the package
# version on that.
#
docdir="${datadir}/doc/${PACKAGE_NAME}-${PACKAGE_VERSION}"
AC_MSG_CHECKING([for documentation directory])
AC_ARG_WITH(
@ -171,7 +515,9 @@ AS_HELP_STRING(
[],
[with_documentation=no])
#
# If something has been entered after an equal sign, assume it is the directory
#
if test x"$with_documentation" != xyes -a x"$with_documentation" != xno; then
docdir="$with_documentation"
fi
@ -185,6 +531,7 @@ AC_MSG_RESULT($docdir)
#
AC_PROG_CC
AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@ -204,8 +551,11 @@ freebsd*)
*)
echo "Using non-specific system compiler settings"
if test x"$enable_debug" = xyes; then
# AC_PROG_CC already sets CFLAGS to "-g -O2" by default
:
# AC_PROG_CC already sets CFLAGS to "-g -O2" by default,
# but only if CFLAGS was not previously set.
#:
# Use -O0 in debug so that variables do not get optimized out
AX_CFLAGS_GCC_OPTION([-O0, -g])
else
# add optimise for size
AX_CFLAGS_GCC_OPTION([-Os])
@ -227,9 +577,26 @@ AC_DEFINE([_FILE_OFFSET_BITS], [64], [File Offset size])
#
# Checks for header files
# Are we targetting Win32?
#
AC_MSG_CHECKING([for Win32])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#ifdef WIN32
#error Yup
#endif
],[])], [ac_cv_win32="no"], [ac_cv_win32="yes"])
if test "$ac_cv_win32" = "yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
#
# Checks for header files (which aren't needed on Win32)
#
AC_HEADER_STDC
if test "$ac_cv_win32" = "no"; then
# libupnp code doesn't use autoconf variables yet,
# so just abort if a header file is not found.
AC_CHECK_HEADERS(
@ -245,20 +612,43 @@ AC_CHECK_HEADERS(
sys/ioctl.h \
sys/socket.h \
sys/time.h \
sys/timeb.h \
syslog.h \
unistd.h \
],
[],
[AC_MSG_ERROR([required header file missing])])
fi
#
# Checks for typedefs, structures, and compiler characteristics
#
AC_C_CONST
AC_TYPE_SIZE_T
TYPE_SOCKLEN_T
# The test for socklen_t was getting it wrong when it exists but is in ws2tcpip.h,
# so we use a new test.
#TYPE_SOCKLEN_T
AC_CHECK_HEADERS([sys/types.h sys/socket.h ws2tcpip.h])
AC_MSG_CHECKING(for socklen_t)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
],[ socklen_t t = 0; return t; ])
],[ac_cv_socklen_t="yes"],[ac_cv_socklen_t="no"])
if test "$ac_cv_socklen_t" = "yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, using int])
AC_DEFINE(socklen_t, int, [Type for storing the length of struct sockaddr])
fi
#
@ -266,15 +656,54 @@ TYPE_SOCKLEN_T
#
AC_FUNC_VPRINTF
AC_FUNC_FSEEKO
AC_CHECK_FUNCS(ftime,, [AC_CHECK_LIB(compat, ftime)])
AC_CHECK_FUNC(strnlen,
AC_DEFINE(HAVE_STRNLEN, 1, [Defines if strnlen is available on your system]))
AC_CHECK_FUNC(strndup,
AC_DEFINE(HAVE_STRNDUP, 1, [Defines if strndup is available on your system]))
#
# Solaris needs -lsocket -lnsl -lrt
AC_SEARCH_LIBS([bind], [socket])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([sched_getparam], [rt])
#
# Checks for POSIX Threads
#
echo "--------------------------- pthread stuff -------------------------------------"
ACX_PTHREAD(
[],
[AC_MSG_ERROR([POSIX threads are required to build this program])])
#
# Update environment variables for pthreads
#
CC="$PTHREAD_CC"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
#
# Determine if pthread_rwlock_t is available
#
echo "----------------------- pthread_rwlock_t stuff --------------------------------"
AC_MSG_CHECKING([if pthread_rwlock_t is available])
AC_LANG([C])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>],
[pthread_rwlock_t *x;])],
[AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
AC_MSG_RESULT([yes, supported without any options])],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#define _GNU_SOURCE
#include <pthread.h>],
[pthread_rwlock_t *x;])],
[AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_MSG_RESULT([yes, definition of _GNU_SOURCE required])],
[AC_DEFINE([UPNP_USE_RWLOCK], [0], [Do not use pthread_rwlock_t])
AC_MSG_RESULT([no, needs to fallback to pthread_mutex])
AC_MSG_ERROR([pthread_rwlock_t not available])])])
echo "-------------------------------------------------------------------------------"
AC_CONFIG_FILES([
@ -292,3 +721,12 @@ AC_CONFIG_FILES([
AC_OUTPUT
#
# Files copied for windows compilation.
#
echo "configure: copying \"autoconfig.h\" to \"build/inc/autoconfig.h\""
test -d build/inc || mkdir -p build/inc
cp autoconfig.h build/inc/autoconfig.h
echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h

View File

@ -39,7 +39,7 @@ EXTRA_DIST = \
./html/upnp/UPNP_E_SOCKET_ERROR-208.html \
./html/upnp/UPNP_E_CANCELED-210.html \
./html/upnp/UPNP_E_SUBSCRIBE_UNACCEPTED-301.html \
./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCAPTED-302.html \
./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCEPTED-302.html \
./html/upnp/UPNP_E_NOTIFY_UNACCEPTED-303.html \
./html/upnp/UPNP_E_INVALID_ARGUMENT-501.html \
./html/upnp/UPNP_E_FILE_NOT_FOUND-502.html \
@ -295,7 +295,7 @@ if WITH_DOCUMENTATION
./html/upnp/UPNP_E_SOCKET_ERROR-208.html \
./html/upnp/UPNP_E_CANCELED-210.html \
./html/upnp/UPNP_E_SUBSCRIBE_UNACCEPTED-301.html \
./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCAPTED-302.html \
./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCEPTED-302.html \
./html/upnp/UPNP_E_NOTIFY_UNACCEPTED-303.html \
./html/upnp/UPNP_E_INVALID_ARGUMENT-501.html \
./html/upnp/UPNP_E_FILE_NOT_FOUND-502.html \

View File

@ -2,12 +2,13 @@
#
# "Makefile.am" for "libupnp/ixml"
#
# (C) Copyright 2005 Rémi Turboult <r3mi@users.sourceforge.net>
# (C) Copyright 2005 Rémi Turboult <r3mi@users.sourceforge.net>
#
SUBDIRS = doc
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc \
-I$(top_srcdir)/upnp/inc
AM_CFLAGS =
LDADD = libixml.la
@ -24,15 +25,23 @@ libixml_la_LDFLAGS = -version-info $(LT_VERSION_IXML) \
-export-symbols-regex '^ixml.*'
libixml_la_SOURCES = \
src/ixml.c src/node.c src/ixmlparser.c \
src/ixmlmembuf.c src/nodeList.c \
src/element.c src/attr.c src/document.c \
src/attr.c \
src/document.c \
src/element.c \
src/inc/ixmlmembuf.h \
src/inc/ixmlparser.h \
src/ixml.c \
src/ixmldebug.c \
src/ixmlparser.c \
src/ixmlmembuf.c \
src/namedNodeMap.c \
src/inc/ixmlmembuf.h src/inc/ixmlparser.h
src/node.c \
src/nodeList.c
upnpincludedir = $(includedir)/upnp
upnpinclude_HEADERS = inc/ixml.h
upnpinclude_HEADERS = \
inc/ixml.h \
inc/ixmldebug.h
check_PROGRAMS = test_document
TESTS = test/test_document.sh
@ -47,4 +56,3 @@ dist-hook:
clean-local:
@if [ -d bin ] ; then rm -rf bin ; fi

File diff suppressed because it is too large Load Diff

72
ixml/inc/ixmldebug.h Normal file
View File

@ -0,0 +1,72 @@
#ifndef IXMLDEBUG_H
#define IXMLDEBUG_H
#include "UpnpGlobal.h"
#include "ixml.h"
/*!
* \file
*
* \brief Auxiliar routines to aid debugging.
*/
/*!
* \brief Prints the debug statement either on the standard output or log file
* along with the information from where this debug statement is coming.
*/
#ifdef DEBUG
void IxmlPrintf(
/*! [in] The file name, usually __FILE__. */
const char *DbgFileName,
/*! [in] The line number, usually __LINE__ or a variable that got the
* __LINE__ at the appropriate place. */
int DbgLineNo,
/*! [in] The function name. */
const char *FunctionName,
/*! [in] Printf like format specification. */
const char* FmtStr,
/*! [in] Printf like Variable number of arguments that will go in the debug
* statement. */
...)
#if (__GNUC__ >= 3)
/* This enables printf like format checking by the compiler */
__attribute__((format (__printf__, 4, 5)))
#endif
;
#else /* DEBUG */
static UPNP_INLINE void IxmlPrintf(
const char *FmtStr,
...)
{
FmtStr = FmtStr;
}
#endif /* DEBUG */
/*!
* \brief Print the node names and values of a XML tree.
*/
#ifdef DEBUG
void printNodes(
/*! [in] The root of the tree to print. */
IXML_Node *tmpRoot,
/*! [in] The depth to print. */
int depth);
#else
static UPNP_INLINE void printNodes(
IXML_Node *tmpRoot,
int depth)
{
tmpRoot = tmpRoot;
depth = depth;
}
#endif
#endif /* IXMLDEBUG_H */

View File

@ -1,60 +1,54 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include "ixmlparser.h"
/*================================================================
* Function: Attr_init
* Initializes an attribute node
* External function.
*
*=================================================================*/
void
ixmlAttr_init( IN IXML_Attr * attr )
#include <string.h>
void ixmlAttr_init(IN IXML_Attr *attr)
{
if (attr != NULL) {
memset(attr, 0, sizeof (IXML_Attr));
}
}
/*================================================================
* Function: Attr_free
* Frees an attribute node.
* external function.
*
*=================================================================*/
void
ixmlAttr_free( IN IXML_Attr * attr )
void ixmlAttr_free(IN IXML_Attr *attr)
{
if (attr != NULL) {
ixmlNode_free((IXML_Node *)attr);
}
}

View File

@ -1,119 +1,98 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
/*!
* \file
*/
#include "ixmldebug.h"
#include "ixmlparser.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ixmlparser.h"
/*================================================================
* ixmlDocument_init
* It initialize the document structure.
* External function.
*
*=================================================================*/
void
ixmlDocument_init( IN IXML_Document * doc )
void ixmlDocument_init(IXML_Document *doc)
{
memset(doc, 0, sizeof(IXML_Document));
}
/*================================================================
* ixmlDocument_free
* It frees the whole document tree.
* External function.
*
*=================================================================*/
void
ixmlDocument_free( IN IXML_Document * doc )
void ixmlDocument_free(IXML_Document *doc)
{
if (doc != NULL) {
ixmlNode_free((IXML_Node *)doc);
}
}
/*================================================================
* ixmlDocument_setOwnerDocument
*
* When this function is called first time, nodeptr is the root
* of the subtree, so it is not necessay to do two steps
* recursion.
/*!
* When this function is called first time, nodeptr is the root of the subtree,
* so it is not necessay to do two steps recursion.
*
* Internal function called by ixmlDocument_importNode
*
*=================================================================*/
void
ixmlDocument_setOwnerDocument( IN IXML_Document * doc,
IN IXML_Node * nodeptr )
*/
static void ixmlDocument_setOwnerDocument(
/*! [in] The document node. */
IXML_Document *doc,
/*! [in] \todo documentation. */
IXML_Node *nodeptr)
{
if (nodeptr != NULL) {
nodeptr->ownerDocument = doc;
ixmlDocument_setOwnerDocument( doc,
ixmlNode_getFirstChild( nodeptr ) );
ixmlDocument_setOwnerDocument( doc,
ixmlNode_getNextSibling
( nodeptr ) );
ixmlDocument_setOwnerDocument(
doc, ixmlNode_getFirstChild(nodeptr));
ixmlDocument_setOwnerDocument(
doc, ixmlNode_getNextSibling(nodeptr));
}
}
/*================================================================
* ixmlDocument_importNode
* Imports a node from another document to this document. The
* returned node has no parent; (parentNode is null). The source
* node is not altered or removed from the original document;
* this method creates a new copy of the source node.
* For all nodes, importing a node creates a node object owned
* by the importing document, with attribute values identical to
* the source node's nodeName and nodeType, plus the attributes
* related to namespaces (prefix, localName, and namespaceURI).
* As in the cloneNode operation on a node, the source node is
* not altered.
*
* External function.
*
*=================================================================*/
int
ixmlDocument_importNode( IN IXML_Document * doc,
IN IXML_Node * importNode,
IN BOOL deep,
OUT IXML_Node ** rtNode )
int ixmlDocument_importNode(
IXML_Document *doc,
IXML_Node *importNode,
BOOL deep,
IXML_Node **rtNode)
{
unsigned short nodeType;
IXML_Node *newNode;
*rtNode = NULL;
if( ( doc == NULL ) || ( importNode == NULL ) ) {
if (doc == NULL || importNode == NULL) {
return IXML_INVALID_PARAMETER;
}
@ -133,29 +112,16 @@ ixmlDocument_importNode( IN IXML_Document * doc,
return IXML_SUCCESS;
}
/*================================================================
* ixmlDocument_createElementEx
* Creates an element of the type specified.
* External function.
* Parameters:
* doc: pointer to document
* tagName: The name of the element, it is case-sensitive.
* Return Value:
* IXML_SUCCESS
* IXML_INVALID_PARAMETER: if either doc or tagName is NULL
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
*=================================================================*/
int
ixmlDocument_createElementEx( IN IXML_Document * doc,
IN const DOMString tagName,
OUT IXML_Element ** rtElement )
{
int ixmlDocument_createElementEx(
IXML_Document *doc,
const DOMString tagName,
IXML_Element **rtElement)
{
int errCode = IXML_SUCCESS;
IXML_Element *newElement = NULL;
if( ( doc == NULL ) || ( tagName == NULL ) ) {
if (doc == NULL || tagName == NULL) {
errCode = IXML_INVALID_PARAMETER;
goto ErrorHandler;
}
@ -174,10 +140,11 @@ ixmlDocument_createElementEx( IN IXML_Document * doc,
errCode = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
// set the node fields
/* set the node fields */
newElement->n.nodeType = eELEMENT_NODE;
newElement->n.nodeName = strdup(tagName);
if (newElement->n.nodeName == NULL) {
free(newElement->tagName);
ixmlElement_free(newElement);
newElement = NULL;
errCode = IXML_INSUFFICIENT_MEMORY;
@ -188,46 +155,29 @@ ixmlDocument_createElementEx( IN IXML_Document * doc,
ErrorHandler:
*rtElement = newElement;
return errCode;
return errCode;
}
/*================================================================
* ixmlDocument_createElement
* Creates an element of the type specified.
* External function.
* Parameters:
* doc: pointer to document
* tagName: The name of the element, it is case-sensitive.
* Return Value:
* A new element object with the nodeName set to tagName, and
* localName, prefix and namespaceURI set to null.
*
*=================================================================*/
IXML_Element *
ixmlDocument_createElement( IN IXML_Document * doc,
IN const DOMString tagName )
IXML_Element *ixmlDocument_createElement(
IXML_Document *doc,
const DOMString tagName)
{
IXML_Element *newElement = NULL;
int ret = IXML_SUCCESS;
ixmlDocument_createElementEx( doc, tagName, &newElement );
ret = ixmlDocument_createElementEx(doc, tagName, &newElement);
if (ret != IXML_SUCCESS) {
IxmlPrintf(__FILE__, __LINE__, "ixmlDocument_createElement",
"Error %d\n", ret);
return NULL;
}
return newElement;
}
/*================================================================
* ixmlDocument_createDocumentEx
* Creates an document object
* Internal function.
* Parameters:
* rtDoc: the document created or NULL on failure
* Return Value:
* IXML_SUCCESS
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
*=================================================================*/
int
ixmlDocument_createDocumentEx( OUT IXML_Document ** rtDoc )
int ixmlDocument_createDocumentEx(IXML_Document **rtDoc)
{
IXML_Document *doc;
int errCode = IXML_SUCCESS;
@ -241,7 +191,7 @@ ixmlDocument_createDocumentEx( OUT IXML_Document ** rtDoc )
ixmlDocument_init(doc);
doc->n.nodeName = strdup( DOCUMENTNODENAME );
doc->n.nodeName = strdup((const char*)DOCUMENTNODENAME);
if (doc->n.nodeName == NULL) {
ixmlDocument_free(doc);
doc = NULL;
@ -257,49 +207,27 @@ ixmlDocument_createDocumentEx( OUT IXML_Document ** rtDoc )
return errCode;
}
/*================================================================
* ixmlDocument_createDocument
* Creates an document object
* Internal function.
* Parameters:
* none
* Return Value:
* A new document object with the nodeName set to "#document".
*
*=================================================================*/
IXML_Document *
ixmlDocument_createDocument( )
IXML_Document *ixmlDocument_createDocument()
{
IXML_Document *doc = NULL;
ixmlDocument_createDocumentEx(&doc);
return doc;
}
/*================================================================
* ixmlDocument_createTextNodeEx
* Creates an text node.
* External function.
* Parameters:
* data: text data for the text node. It is stored in nodeValue field.
* Return Value:
* IXML_SUCCESS
* IXML_INVALID_PARAMETER: if either doc or data is NULL
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
*=================================================================*/
int
ixmlDocument_createTextNodeEx( IN IXML_Document * doc,
IN const char *data,
OUT IXML_Node ** textNode )
int ixmlDocument_createTextNodeEx(
IXML_Document *doc,
const DOMString data,
IXML_Node **textNode)
{
IXML_Node *returnNode;
int rc = IXML_SUCCESS;
returnNode = NULL;
if( ( doc == NULL ) || ( data == NULL ) ) {
if (doc == NULL || data == NULL) {
rc = IXML_INVALID_PARAMETER;
goto ErrorHandler;
}
@ -309,17 +237,17 @@ ixmlDocument_createTextNodeEx( IN IXML_Document * doc,
rc = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
// initialize the node
/* initialize the node */
ixmlNode_init(returnNode);
returnNode->nodeName = strdup( TEXTNODENAME );
returnNode->nodeName = strdup((const char*)TEXTNODENAME);
if (returnNode->nodeName == NULL) {
ixmlNode_free(returnNode);
returnNode = NULL;
rc = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
// add in node value
/* add in node value */
if (data != NULL) {
returnNode->nodeValue = strdup(data);
if (returnNode->nodeValue == NULL) {
@ -336,22 +264,12 @@ ixmlDocument_createTextNodeEx( IN IXML_Document * doc,
ErrorHandler:
*textNode = returnNode;
return rc;
}
/*================================================================
* ixmlDocument_createTextNode
* Creates an text node.
* External function.
* Parameters:
* data: text data for the text node. It is stored in nodeValue field.
* Return Value:
* The new text node.
*
*=================================================================*/
IXML_Node *
ixmlDocument_createTextNode( IN IXML_Document * doc,
IN const char *data )
IXML_Node *ixmlDocument_createTextNode(
IXML_Document *doc,
const DOMString data)
{
IXML_Node *returnNode = NULL;
@ -360,21 +278,11 @@ ixmlDocument_createTextNode( IN IXML_Document * doc,
return returnNode;
}
/*================================================================
* ixmlDocument_createAttributeEx
* Creates an attribute of the given name.
* External function.
* Parameters:
* name: The name of the Attribute node.
* Return Value:
* IXML_SUCCESS
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
================================================================*/
int
ixmlDocument_createAttributeEx( IN IXML_Document * doc,
IN const char *name,
OUT IXML_Attr ** rtAttr )
int ixmlDocument_createAttributeEx(
IXML_Document *doc,
const char *name,
IXML_Attr **rtAttr)
{
IXML_Attr *attrNode = NULL;
int errCode = IXML_SUCCESS;
@ -385,7 +293,7 @@ ixmlDocument_createAttributeEx( IN IXML_Document * doc,
goto ErrorHandler;
}
if( ( doc == NULL ) || ( name == NULL ) ) {
if (doc == NULL || name == NULL) {
ixmlAttr_free(attrNode);
attrNode = NULL;
errCode = IXML_INVALID_PARAMETER;
@ -393,10 +301,9 @@ ixmlDocument_createAttributeEx( IN IXML_Document * doc,
}
ixmlAttr_init(attrNode);
attrNode->n.nodeType = eATTRIBUTE_NODE;
// set the node fields
/* set the node fields */
attrNode->n.nodeName = strdup(name);
if (attrNode->n.nodeName == NULL) {
ixmlAttr_free(attrNode);
@ -410,56 +317,32 @@ ixmlDocument_createAttributeEx( IN IXML_Document * doc,
ErrorHandler:
*rtAttr = attrNode;
return errCode;
}
/*================================================================
* ixmlDocument_createAttribute
* Creates an attribute of the given name.
* External function.
* Parameters:
* name: The name of the Attribute node.
* Return Value:
* A new attr object with the nodeName attribute set to the
* given name, and the localName, prefix and namespaceURI set to NULL.
* The value of the attribute is the empty string.
*
================================================================*/
IXML_Attr *
ixmlDocument_createAttribute( IN IXML_Document * doc,
IN const char *name )
IXML_Attr *ixmlDocument_createAttribute(
IXML_Document *doc,
const char *name)
{
IXML_Attr *attrNode = NULL;
ixmlDocument_createAttributeEx( doc, name, &attrNode );
return attrNode;
if(ixmlDocument_createAttributeEx(doc, name, &attrNode) != IXML_SUCCESS)
return NULL;
return attrNode;
}
/*================================================================
* ixmlDocument_createAttributeNSEx
* Creates an attrbute of the given name and namespace URI
* External function.
* Parameters:
* namespaceURI: the namespace fo the attribute to create
* qualifiedName: qualifiedName of the attribute to instantiate
* Return Value:
* IXML_SUCCESS
* IXML_INVALID_PARAMETER: if either doc,namespaceURI or qualifiedName is NULL
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
*=================================================================*/
int
ixmlDocument_createAttributeNSEx( IN IXML_Document * doc,
IN const DOMString namespaceURI,
IN const DOMString qualifiedName,
OUT IXML_Attr ** rtAttr )
int ixmlDocument_createAttributeNSEx(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName,
IXML_Attr **rtAttr )
{
IXML_Attr *attrNode = NULL;
int errCode = IXML_SUCCESS;
if( ( doc == NULL ) || ( namespaceURI == NULL )
|| ( qualifiedName == NULL ) ) {
if (doc == NULL || namespaceURI == NULL || qualifiedName == NULL) {
errCode = IXML_INVALID_PARAMETER;
goto ErrorHandler;
}
@ -469,7 +352,7 @@ ixmlDocument_createAttributeNSEx( IN IXML_Document * doc,
if (errCode != IXML_SUCCESS) {
goto ErrorHandler;
}
// set the namespaceURI field
/* set the namespaceURI field */
attrNode->n.namespaceURI = strdup(namespaceURI);
if (attrNode->n.namespaceURI == NULL) {
ixmlAttr_free(attrNode);
@ -477,7 +360,7 @@ ixmlDocument_createAttributeNSEx( IN IXML_Document * doc,
errCode = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
// set the localName and prefix
/* set the localName and prefix */
errCode =
ixmlNode_setNodeName((IXML_Node *)attrNode, qualifiedName);
if (errCode != IXML_SUCCESS) {
@ -489,70 +372,45 @@ ixmlDocument_createAttributeNSEx( IN IXML_Document * doc,
ErrorHandler:
*rtAttr = attrNode;
return errCode;
}
/*================================================================
* ixmlDocument_createAttributeNS
* Creates an attrbute of the given name and namespace URI
* External function.
* Parameters:
* namespaceURI: the namespace fo the attribute to create
* qualifiedName: qualifiedName of the attribute to instantiate
* Return Value:
* Creates an attribute node with the given namespaceURI and
* qualifiedName. The prefix and localname are extracted from
* the qualifiedName. The node value is empty.
*
*=================================================================*/
IXML_Attr *
ixmlDocument_createAttributeNS( IN IXML_Document * doc,
IN const DOMString namespaceURI,
IN const DOMString qualifiedName )
IXML_Attr *ixmlDocument_createAttributeNS(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName)
{
IXML_Attr *attrNode = NULL;
ixmlDocument_createAttributeNSEx( doc, namespaceURI, qualifiedName,
&attrNode );
ixmlDocument_createAttributeNSEx(
doc, namespaceURI, qualifiedName, &attrNode);
return attrNode;
}
/*================================================================
* ixmlDocument_createCDATASectionEx
* Creates an CDATASection node whose value is the specified string
* External function.
* Parameters:
* data: the data for the CDATASection contents.
* Return Value:
* IXML_SUCCESS
* IXML_INVALID_PARAMETER: if either doc or data is NULL
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
*=================================================================*/
int
ixmlDocument_createCDATASectionEx( IN IXML_Document * doc,
IN const DOMString data,
OUT IXML_CDATASection ** rtCD )
int ixmlDocument_createCDATASectionEx(
IXML_Document *doc,
const DOMString data,
IXML_CDATASection **rtCD)
{
int errCode = IXML_SUCCESS;
IXML_CDATASection *cDSectionNode = NULL;
if( ( doc == NULL ) || ( data == NULL ) ) {
if(doc == NULL || data == NULL) {
errCode = IXML_INVALID_PARAMETER;
goto ErrorHandler;
}
cDSectionNode =
( IXML_CDATASection * ) malloc( sizeof( IXML_CDATASection ) );
cDSectionNode = (IXML_CDATASection *)malloc(sizeof (IXML_CDATASection));
if (cDSectionNode == NULL) {
errCode = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
ixmlCDATASection_init(cDSectionNode);
cDSectionNode->n.nodeType = eCDATA_SECTION_NODE;
cDSectionNode->n.nodeName = strdup( CDATANODENAME );
cDSectionNode->n.nodeName = strdup((const char*)CDATANODENAME);
if (cDSectionNode->n.nodeName == NULL) {
ixmlCDATASection_free(cDSectionNode);
cDSectionNode = NULL;
@ -573,80 +431,58 @@ ixmlDocument_createCDATASectionEx( IN IXML_Document * doc,
ErrorHandler:
*rtCD = cDSectionNode;
return errCode;
}
/*================================================================
* ixmlDocument_createCDATASection
* Creates an CDATASection node whose value is the specified string
* External function.
* Parameters:
* data: the data for the CDATASection contents.
* Return Value:
* The new CDATASection object.
*
*=================================================================*/
IXML_CDATASection *
ixmlDocument_createCDATASection( IN IXML_Document * doc,
IN const DOMString data )
{
IXML_CDATASection *ixmlDocument_createCDATASection(
IXML_Document *doc,
const DOMString data)
{
IXML_CDATASection *cDSectionNode = NULL;
ixmlDocument_createCDATASectionEx(doc, data, &cDSectionNode);
return cDSectionNode;
}
/*================================================================
* ixmlDocument_createElementNSEx
* Creates an element of the given qualified name and namespace URI.
* External function.
* Parameters:
* namespaceURI: the namespace URI of the element to create.
* qualifiedName: the qualified name of the element to instantiate.
* Return Value:
* Return Value:
* IXML_SUCCESS
* IXML_INVALID_PARAMETER: if either doc,namespaceURI or qualifiedName is NULL
* IXML_INSUFFICIENT_MEMORY: if not enough memory to finish this operations.
*
*=================================================================*/
int
ixmlDocument_createElementNSEx( IN IXML_Document * doc,
IN const DOMString namespaceURI,
IN const DOMString qualifiedName,
OUT IXML_Element ** rtElement )
int ixmlDocument_createElementNSEx(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName,
IXML_Element **rtElement)
{
IXML_Element *newElement = NULL;
int errCode = IXML_SUCCESS;
int ret = IXML_SUCCESS;
int line = 0;
if( ( doc == NULL ) || ( namespaceURI == NULL )
|| ( qualifiedName == NULL ) ) {
errCode = IXML_INVALID_PARAMETER;
if (doc == NULL || namespaceURI == NULL || qualifiedName == NULL) {
line = __LINE__;
ret = IXML_INVALID_PARAMETER;
goto ErrorHandler;
}
errCode =
ixmlDocument_createElementEx( doc, qualifiedName, &newElement );
if( errCode != IXML_SUCCESS ) {
ret = ixmlDocument_createElementEx(doc, qualifiedName, &newElement);
if (ret != IXML_SUCCESS) {
line = __LINE__;
goto ErrorHandler;
}
// set the namespaceURI field
/* set the namespaceURI field */
newElement->n.namespaceURI = strdup(namespaceURI);
if (newElement->n.namespaceURI == NULL) {
line = __LINE__;
ixmlElement_free(newElement);
newElement = NULL;
errCode = IXML_INSUFFICIENT_MEMORY;
ret = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
// set the localName and prefix
errCode =
ixmlNode_setNodeName( ( IXML_Node * ) newElement, qualifiedName );
if( errCode != IXML_SUCCESS ) {
/* set the localName and prefix */
ret = ixmlNode_setNodeName((IXML_Node *)newElement, qualifiedName);
if (ret != IXML_SUCCESS) {
line = __LINE__;
ixmlElement_free(newElement);
newElement = NULL;
errCode = IXML_INSUFFICIENT_MEMORY;
ret = IXML_INSUFFICIENT_MEMORY;
goto ErrorHandler;
}
@ -654,115 +490,70 @@ ixmlDocument_createElementNSEx( IN IXML_Document * doc,
ErrorHandler:
*rtElement = newElement;
return errCode;
if (ret != IXML_SUCCESS) {
IxmlPrintf(__FILE__, line, "ixmlDocument_createElementNSEx", "Error %d\n", ret);
}
/*================================================================
* ixmlDocument_createElementNS
* Creates an element of the given qualified name and namespace URI.
* External function.
* Parameters:
* namespaceURI: the namespace URI of the element to create.
* qualifiedName: the qualified name of the element to instantiate.
* Return Value:
* The new element object with tagName qualifiedName, prefix and
* localName extraced from qualfiedName, nodeName of qualfiedName,
* namespaceURI of namespaceURI.
*
*=================================================================*/
IXML_Element *
ixmlDocument_createElementNS( IN IXML_Document * doc,
IN const DOMString namespaceURI,
IN const DOMString qualifiedName )
return ret;
}
IXML_Element *ixmlDocument_createElementNS(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName)
{
IXML_Element *newElement = NULL;
ixmlDocument_createElementNSEx( doc, namespaceURI, qualifiedName,
&newElement );
ixmlDocument_createElementNSEx(doc, namespaceURI, qualifiedName, &newElement);
return newElement;
}
/*================================================================
* ixmlDocument_getElementsByTagName
* Returns a nodeList of all the Elements with a given tag name
* in the order in which they are encountered in a preorder traversal
* of the document tree.
* External function.
* Parameters:
* tagName: the name of the tag to match on. The special value "*"
* matches all tags.
* Return Value:
* A new nodeList object containing all the matched Elements.
*
*=================================================================*/
IXML_NodeList *
ixmlDocument_getElementsByTagName( IN IXML_Document * doc,
IN const char *tagName )
IXML_NodeList *ixmlDocument_getElementsByTagName(
IXML_Document *doc,
const DOMString tagName)
{
IXML_NodeList *returnNodeList = NULL;
if( ( doc == NULL ) || ( tagName == NULL ) ) {
if (doc == NULL || tagName == NULL) {
return NULL;
}
ixmlNode_getElementsByTagName( ( IXML_Node * ) doc, tagName,
&returnNodeList );
ixmlNode_getElementsByTagName((IXML_Node *)doc, tagName, &returnNodeList);
return returnNodeList;
}
/*================================================================
* ixmlDocument_getElementsByTagNameNS
* Returns a nodeList of all the Elements with a given local name and
* namespace URI in the order in which they are encountered in a
* preorder traversal of the document tree.
* External function.
* Parameters:
* namespaceURI: the namespace of the elements to match on. The special
* value "*" matches all namespaces.
* localName: the local name of the elements to match on. The special
* value "*" matches all local names.
* Return Value:
* A new nodeList object containing all the matched Elements.
*
*=================================================================*/
IXML_NodeList *
ixmlDocument_getElementsByTagNameNS( IN IXML_Document * doc,
IN const DOMString namespaceURI,
IN const DOMString localName )
IXML_NodeList *ixmlDocument_getElementsByTagNameNS(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString localName)
{
IXML_NodeList *returnNodeList = NULL;
if( ( doc == NULL ) || ( namespaceURI == NULL )
|| ( localName == NULL ) ) {
if (doc == NULL || namespaceURI == NULL || localName == NULL) {
return NULL;
}
ixmlNode_getElementsByTagNameNS( ( IXML_Node * ) doc, namespaceURI,
localName, &returnNodeList );
ixmlNode_getElementsByTagNameNS(
(IXML_Node *)doc, namespaceURI, localName, &returnNodeList);
return returnNodeList;
}
/*================================================================
* ixmlDocument_getElementById
* Returns the element whose ID is given by tagName. If no such
* element exists, returns null.
* External function.
* Parameter:
* tagName: the tag name for an element.
* Return Values:
* The matching element.
*
*=================================================================*/
IXML_Element *
ixmlDocument_getElementById( IN IXML_Document * doc,
IN const DOMString tagName )
IXML_Element *ixmlDocument_getElementById(
IXML_Document *doc,
const DOMString tagName)
{
IXML_Element *rtElement = NULL;
IXML_Node *nodeptr = (IXML_Node *)doc;
const char *name;
if( ( nodeptr == NULL ) || ( tagName == NULL ) ) {
if (nodeptr == NULL || tagName == NULL) {
return rtElement;
}
@ -776,29 +567,26 @@ ixmlDocument_getElementById( IN IXML_Document * doc,
rtElement = (IXML_Element *)nodeptr;
return rtElement;
} else {
rtElement = ixmlDocument_getElementById( ( IXML_Document * )
ixmlNode_getFirstChild
( nodeptr ),
rtElement = ixmlDocument_getElementById(
(IXML_Document *)ixmlNode_getFirstChild(nodeptr),
tagName );
if (rtElement == NULL) {
rtElement = ixmlDocument_getElementById( ( IXML_Document
* )
ixmlNode_getNextSibling
( nodeptr ),
rtElement = ixmlDocument_getElementById(
(IXML_Document *)ixmlNode_getNextSibling(nodeptr),
tagName);
}
}
} else {
rtElement = ixmlDocument_getElementById( ( IXML_Document * )
ixmlNode_getFirstChild
( nodeptr ), tagName );
rtElement = ixmlDocument_getElementById(
(IXML_Document *)ixmlNode_getFirstChild(nodeptr),
tagName);
if (rtElement == NULL) {
rtElement = ixmlDocument_getElementById( ( IXML_Document * )
ixmlNode_getNextSibling
( nodeptr ),
rtElement = ixmlDocument_getElementById(
(IXML_Document *)ixmlNode_getNextSibling(nodeptr),
tagName);
}
}
return rtElement;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,77 +1,174 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
#ifndef IXML_MEMBUF_H
#define IXML_MEMBUF_H
/*!
* \file
*/
#ifndef _IXML_MEMBUF_H
#define _IXML_MEMBUF_H
#include <stdlib.h>
#include "ixml.h"
#include <stdlib.h> /* for size_t */
#define MINVAL(a, b) ( (a) < (b) ? (a) : (b) )
#define MAXVAL(a, b) ( (a) > (b) ? (a) : (b) )
#ifndef WIN32
#define UPNP_INLINE inline
#endif
#define MEMBUF_DEF_SIZE_INC 20
#define MEMBUF_DEF_SIZE_INC 20u
typedef struct // ixml_membuf
/*!
* \brief The ixml_membuf type.
*/
typedef struct
{
char *buf;
size_t length;
size_t capacity;
size_t size_inc;
} ixml_membuf;
//--------------------------------------------------
//////////////// functions /////////////////////////
//--------------------------------------------------
/*
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/*!
* \brief ixml_membuf initialization routine.
*/
void ixml_membuf_init(
/*! [in,out] The memory buffer to initializa. */
ixml_membuf *m);
void ixml_membuf_init(INOUT ixml_membuf *m);
void ixml_membuf_destroy(INOUT ixml_membuf *m);
int ixml_membuf_assign(INOUT ixml_membuf *m, IN const void *buf,
IN size_t buf_len );
int ixml_membuf_assign_str(INOUT ixml_membuf *m, IN const char *c_str );
int ixml_membuf_append(INOUT ixml_membuf *m, IN const void *buf);
int ixml_membuf_append_str(INOUT ixml_membuf *m, IN const char *c_str);
int ixml_membuf_insert(INOUT ixml_membuf *m, IN const void* buf,
IN size_t buf_len, int index );
#endif // _IXML_MEMBUF_H
/*!
* \brief ixml_membuf clearing routine.
*
* The internal buffer is deleted and ixml_membuf_init() is called in the end
* to reinitialize the buffer.
*/
void ixml_membuf_destroy(
/*! [in,out] The memory buffer to clear. */
ixml_membuf *m);
/*!
* \brief Copies the contents o a buffer to the designated ixml_membuf.
*
* The previous contents of the ixml_membuf are destroyed.
*
* \return IXML_SUCCESS if successfull, or the error code returned
* by ixml_membuf_set_size().
*
* \sa ixml_membuf_assign_str().
*/
int ixml_membuf_assign(
/*! [in,out] The memory buffer on which to operate. */
ixml_membuf *m,
/*! [in] The input buffer to copy from. */
const void *buf,
/*! [in] The number of bytes to copy from the input buffer. */
size_t buf_len);
/*!
* \brief Copies a \b NULL terminated string to the ixml_buffer.
*
* This is a convenience function that internally uses ixml_membuf_assign().
*
* \return The return value of ixml_membuf_assign().
*
* \sa ixml_membuf_assign().
*/
int ixml_membuf_assign_str(
/*! [in,out] The memory buffer on which to operate. */
ixml_membuf *m,
/*! [in] The input string to copy from. */
const char *c_str);
/*!
* \brief Appends one byte to the designated ixml_membuffer.
*
* This is a convenience function that internally uses ixml_membuf_insert().
*
* \return The return value of ixml_membuf_insert().
*
* \sa ixml_membuf_insert()
*/
int ixml_membuf_append(
/*! [in,out] The memory buffer on which to operate. */
ixml_membuf *m,
/*! [in] The pointer to the byte to append. */
const void *buf);
/*!
* \brief Appends the contents of a \b NULL terminated string to the designated
* ixml_membuf.
*
* This is a convenience function that internally uses ixml_membuf_insert().
*
* \return The return value of ixml_membuf_insert().
*
* \sa ixml_membuf_insert().
*/
int ixml_membuf_append_str(
/*! [in,out] The memory buffer on which to operate. */
ixml_membuf *m,
/*! [in] The input string to copy from. */
const char *c_str);
/*!
* \brief
*
* \return
* \li 0 if successfull.
* \li IXML_INDEX_SIZE_ERR if the index parameter is out of range.
* \li Or the return code of ixml_membuf_set_size()
*
* \sa ixml_membuf_set_size()
*/
int ixml_membuf_insert(
/*! [in,out] The memory buffer on which to operate. */
ixml_membuf *m,
/*! [in] The pointer to the input buffer. */
const void *buf,
/*! [in] The buffer length. */
size_t buf_len,
/*! [in] The point of insertion relative to the beggining of the
* ixml_membuf internal buffer. */
size_t index);
#endif /* IXML_MEMBUF_H */

View File

@ -1,41 +1,49 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
#ifndef IXMLPARSER_H
#define IXMLPARSER_H
/*!
* \file
*/
#ifndef _IXMLPARSER_H
#define _IXMLPARSER_H
#include "ixml.h"
#include "ixmlmembuf.h"
// Parser definitions
/* Parser definitions */
#define QUOT "&quot;"
#define LT "&lt;"
#define GT "&gt;"
@ -44,6 +52,7 @@
#define ESC_HEX "&#x"
#define ESC_DEC "&#"
typedef struct _IXML_NamespaceURI
{
char *nsURI;
@ -69,52 +78,192 @@ typedef enum
eCONTENT,
} PARSER_STATE;
typedef struct _Parser
{
char *dataBuffer; //data buffer
char *curPtr; //ptr to the token parsed
char *savePtr; //Saves for backup
/*! Data buffer. */
char *dataBuffer;
/*! Pointer to the token parsed. */
char *curPtr;
/*! Saves for backup. */
char *savePtr;
ixml_membuf lastElem;
ixml_membuf tokenBuf;
IXML_Node *pNeedPrefixNode;
IXML_ElementStack *pCurElement;
IXML_Node *currentNodePtr;
PARSER_STATE state;
BOOL bHasTopLevel;
} Parser;
/*!
* \brief Check to see whether name is a valid xml name.
*/
BOOL Parser_isValidXmlName(
/*! [in] The string to be checked. */
const DOMString name);
/*!
* \brief Sets the error character.
*
* If 'c' is 0 (default), the parser is strict about XML encoding:
* invalid UTF-8 sequences or "&" entities are rejected, and the parsing
* aborts.
*
* If 'c' is not 0, the parser is relaxed: invalid UTF-8 characters
* are replaced by this character, and invalid "&" entities are left
* untranslated. The parsing is then allowed to continue.
*/
void Parser_setErrorChar(
/*! [in] The character to become the error character. */
char c);
/*!
* \brief Fees a node contents.
*/
void Parser_freeNodeContent(
/*! [in] The Node to process. */
IXML_Node *IXML_Nodeptr);
int Parser_LoadDocument(IXML_Document **retDoc, const char * xmlFile, BOOL file);
BOOL Parser_isValidXmlName( const DOMString name);
int Parser_setNodePrefixAndLocalName(IXML_Node *newIXML_NodeIXML_Attr);
void Parser_freeNodeContent( IXML_Node *IXML_Nodeptr);
void Parser_setErrorChar( char c );
void ixmlAttr_free(IXML_Attr *attrNode);
void ixmlAttr_init(IXML_Attr *attrNode);
int ixmlElement_setTagName(IXML_Element *element, const char *tagName);
/*!
* \brief Set the given element's tagName.
*
* \return One of the following:
* \li \b IXML_SUCCESS, if successfull.
* \li \b IXML_FAILED, if element of tagname is \b NULL.
* \li \b IXML_INSUFFICIENT_MEMORY, if there is no memory to allocate the
* buffer for the element's tagname.
*/
int ixmlElement_setTagName(
/*! [in] The element to change the tagname. */
IXML_Element *element,
/*! [in] The new tagName for the element. */
const char *tagName);
void ixmlNamedNodeMap_init(IXML_NamedNodeMap *nnMap);
int ixmlNamedNodeMap_addToNamedNodeMap(IXML_NamedNodeMap **nnMap, IXML_Node *add);
void ixmlNode_init(IXML_Node *IXML_Nodeptr);
BOOL ixmlNode_compare(IXML_Node *srcIXML_Node, IXML_Node *destIXML_Node);
/*!
* \brief Initializes a NamedNodeMap object.
*/
void ixmlNamedNodeMap_init(
/*! [in] The named node map to process. */
IXML_NamedNodeMap *nnMap);
void ixmlNode_getElementsByTagName( IXML_Node *n, const char *tagname, IXML_NodeList **list);
void ixmlNode_getElementsByTagNameNS( IXML_Node *IXML_Node, const char *namespaceURI,
const char *localName, IXML_NodeList **list);
int ixmlNode_setNodeProperties(IXML_Node* node, IXML_Node *src);
int ixmlNode_setNodeName( IXML_Node* node, const DOMString qualifiedName);
/*!
* \brief Add a node to a NamedNodeMap.
*
* \return IXML_SUCCESS or failure.
*/
int ixmlNamedNodeMap_addToNamedNodeMap(
/* [in] The named node map. */
IXML_NamedNodeMap **nnMap,
/* [in] The node to add. */
IXML_Node *add);
void ixmlNodeList_init(IXML_NodeList *nList);
int ixmlNodeList_addToNodeList(IXML_NodeList **nList, IXML_Node *add);
/*!
* \brief Add a node to nodelist.
*/
int ixmlNodeList_addToNodeList(
/*! [in] The pointer to the nodelist. */
IXML_NodeList **nList,
/*! [in] The node to add. */
IXML_Node *add);
#endif // _IXMLPARSER_H
/*!
* \brief Intializes a node.
*/
void ixmlNode_init(
/*! [in] The \b Node to iniatialize. */
IN IXML_Node *nodeptr);
/*!
* \brief Compare two nodes to see whether they are the same node.
* Parent, sibling and children node are ignored.
*
* \return
* \li TRUE, the two nodes are the same.
* \li FALSE, the two nodes are not the same.
*/
BOOL ixmlNode_compare(
/*! [in] The first \b Node. */
IXML_Node *srcNode,
/*! [in] The second \b Node. */
IXML_Node *destNode);
/*!
* \brief Returns a nodeList of all descendant Elements with a given tagName,
* in the order in which they are encountered in a traversal of this element
* tree.
*/
void ixmlNode_getElementsByTagName(
/*! [in] The \b Node tree. */
IXML_Node *n,
/*! [in] The tag name to match. */
const char *tagname,
/*! [out] The output \b NodeList. */
IXML_NodeList **list);
/*!
* \brief Returns a nodeList of all the descendant Elements with a given local
* name and namespace URI in the order in which they are encountered in a
* preorder traversal of this Elememt tree.
*/
void ixmlNode_getElementsByTagNameNS(
/*! [in] The \b Element tree. */
IXML_Node *n,
/*! [in] The name space to match. */
const char *namespaceURI,
/*! [in] The local name to match. */
const char *localName,
/*! [out] The output \b NodeList. */
IXML_NodeList **list);
/*!
* \brief
*
* \return
*/
int ixmlNode_setNodeName(
/*! [in] The \b Node. */
IXML_Node *node,
/*! [in] . */
const DOMString qualifiedName);
/*!
* \brief
*
* \return
*/
int ixmlNode_setNodeProperties(
/*! [in] . */
IXML_Node *destNode,
/*! [in] . */
IXML_Node *src);
/*!
* \brief Initializes a nodelist
*/
void ixmlNodeList_init(
/*! [in,out] The \b NodeList to initialize. */
IXML_NodeList *nList);
#endif /* IXMLPARSER_H */

View File

@ -1,91 +1,99 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
/*!
* \file
*/
#include "ixmldebug.h"
#include "ixmlmembuf.h"
#include "ixmlparser.h"
/*================================================================
* copy_with_escape
*
*
*=================================================================*/
static void
copy_with_escape( INOUT ixml_membuf * buf,
IN const char *p )
#include <stdlib.h> /* for free() */
#include <string.h>
/*!
* \brief Appends a string to a buffer, substituting some characters by escape
* sequences.
*/
static void copy_with_escape(
/*! [in,out] The input/output buffer. */
ixml_membuf *buf,
/*! [in] The string to copy from. */
const char *p)
{
int i;
int plen;
size_t i;
size_t plen;
if (p == NULL)
return;
plen = strlen(p);
for( i = 0; i < plen; i++ ) {
for (i = (size_t)0; i < plen; ++i) {
switch (p[i]) {
case '<':
ixml_membuf_append_str(buf, "&lt;");
break;
case '>':
ixml_membuf_append_str(buf, "&gt;");
break;
case '&':
ixml_membuf_append_str(buf, "&amp;");
break;
case '\'':
ixml_membuf_append_str(buf, "&apos;");
break;
case '\"':
ixml_membuf_append_str(buf, "&quot;");
break;
default:
ixml_membuf_append(buf, &p[i]);
break;
}
}
}
/*================================================================
* ixmlPrintDomTreeRecursive
* It is a recursive function to print all the node in a tree.
/*!
* \brief Recursive function to print all the node in a tree.
* Internal to parser only.
*
*=================================================================*/
void
ixmlPrintDomTreeRecursive( IN IXML_Node * nodeptr,
IN ixml_membuf * buf )
*/
static void ixmlPrintDomTreeRecursive(
/*! [in] \todo documentation. */
IXML_Node *nodeptr,
/*! [in] \todo documentation. */
ixml_membuf *buf)
{
const char *nodeName = NULL;
const char *nodeValue = NULL;
@ -97,7 +105,6 @@ ixmlPrintDomTreeRecursive( IN IXML_Node * nodeptr,
nodeValue = ixmlNode_getNodeValue(nodeptr);
switch (ixmlNode_getNodeType(nodeptr)) {
case eTEXT_NODE:
copy_with_escape(buf, nodeValue);
break;
@ -117,8 +124,8 @@ ixmlPrintDomTreeRecursive( IN IXML_Node * nodeptr,
break;
case eDOCUMENT_NODE:
ixmlPrintDomTreeRecursive( ixmlNode_getFirstChild
( nodeptr ), buf );
ixmlPrintDomTreeRecursive(
ixmlNode_getFirstChild(nodeptr), buf);
break;
case eATTRIBUTE_NODE:
@ -126,7 +133,6 @@ ixmlPrintDomTreeRecursive( IN IXML_Node * nodeptr,
ixml_membuf_append_str(buf, "=\"");
copy_with_escape(buf, nodeValue);
ixml_membuf_append_str(buf, "\"");
if (nodeptr->nextSibling != NULL) {
ixml_membuf_append_str(buf, " ");
ixmlPrintDomTreeRecursive(nodeptr->nextSibling, buf);
@ -136,71 +142,69 @@ ixmlPrintDomTreeRecursive( IN IXML_Node * nodeptr,
case eELEMENT_NODE:
ixml_membuf_append_str(buf, "<");
ixml_membuf_append_str(buf, nodeName);
if (nodeptr->firstAttr != NULL) {
ixml_membuf_append_str(buf, " ");
ixmlPrintDomTreeRecursive(nodeptr->firstAttr, buf);
}
child = ixmlNode_getFirstChild(nodeptr);
if( ( child != NULL )
&& ( ixmlNode_getNodeType( child ) ==
eELEMENT_NODE ) ) {
if (child != NULL &&
ixmlNode_getNodeType(child) == eELEMENT_NODE) {
ixml_membuf_append_str(buf, ">\r\n");
} else {
ixml_membuf_append_str(buf, ">");
}
/* output the children */
ixmlPrintDomTreeRecursive(
ixmlNode_getFirstChild(nodeptr), buf);
// output the children
ixmlPrintDomTreeRecursive( ixmlNode_getFirstChild
( nodeptr ), buf );
// Done with children. Output the end tag.
/* Done with children. Output the end tag. */
ixml_membuf_append_str(buf, "</");
ixml_membuf_append_str(buf, nodeName);
sibling = ixmlNode_getNextSibling(nodeptr);
if( sibling != NULL
&& ixmlNode_getNodeType( sibling ) == eTEXT_NODE ) {
if (sibling != NULL &&
ixmlNode_getNodeType(sibling) == eTEXT_NODE) {
ixml_membuf_append_str( buf, ">" );
} else {
ixml_membuf_append_str( buf, ">\r\n" );
}
ixmlPrintDomTreeRecursive( ixmlNode_getNextSibling
( nodeptr ), buf );
ixmlPrintDomTreeRecursive(
ixmlNode_getNextSibling(nodeptr), buf);
break;
default:
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
"Warning, unknown node type %d\n",
(int)ixmlNode_getNodeType(nodeptr));
break;
}
}
}
/*================================================================
* ixmlPrintDomTree
* Print a DOM tree.
* Element, and Attribute nodes are handled differently.
* We don't want to print the Element and Attribute nodes' sibling.
* External function.
/*!
* \brief Print a DOM tree.
*
*=================================================================*/
void
ixmlPrintDomTree( IN IXML_Node * nodeptr,
IN ixml_membuf * buf )
* Element, and Attribute nodes are handled differently. We don't want to print
* the Element and Attribute nodes' sibling.
*/
static void ixmlPrintDomTree(
/*! [in] \todo documentation. */
IXML_Node *nodeptr,
/*! [in] \todo documentation. */
ixml_membuf *buf)
{
const char *nodeName = NULL;
const char *nodeValue = NULL;
IXML_Node *child = NULL;
if( ( nodeptr == NULL ) || ( buf == NULL ) ) {
if (nodeptr == NULL || buf == NULL) {
return;
}
nodeName = (const char *)ixmlNode_getNodeName(nodeptr);
nodeValue = ixmlNode_getNodeValue(nodeptr);
switch (ixmlNode_getNodeType(nodeptr)) {
case eTEXT_NODE:
case eCDATA_SECTION_NODE:
case ePROCESSING_INSTRUCTION_NODE:
@ -218,52 +222,54 @@ ixmlPrintDomTree( IN IXML_Node * nodeptr,
case eELEMENT_NODE:
ixml_membuf_append_str(buf, "<");
ixml_membuf_append_str(buf, nodeName);
if (nodeptr->firstAttr != NULL) {
ixml_membuf_append_str(buf, " ");
ixmlPrintDomTreeRecursive(nodeptr->firstAttr, buf);
}
child = ixmlNode_getFirstChild(nodeptr);
if( ( child != NULL )
&& ( ixmlNode_getNodeType( child ) == eELEMENT_NODE ) ) {
if (child != NULL &&
ixmlNode_getNodeType(child) == eELEMENT_NODE) {
ixml_membuf_append_str(buf, ">\r\n");
} else {
ixml_membuf_append_str(buf, ">");
}
// output the children
ixmlPrintDomTreeRecursive( ixmlNode_getFirstChild( nodeptr ),
buf );
/* output the children */
ixmlPrintDomTreeRecursive(
ixmlNode_getFirstChild(nodeptr), buf);
// Done with children. Output the end tag.
/* Done with children. Output the end tag. */
ixml_membuf_append_str(buf, "</");
ixml_membuf_append_str(buf, nodeName);
ixml_membuf_append_str(buf, ">\r\n");
break;
default:
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTree",
"Warning, unknown node type %d\n",
(int)ixmlNode_getNodeType(nodeptr));
break;
}
}
/*================================================================
* ixmlDomTreetoString
* Converts a DOM tree into a text string
* Element, and Attribute nodes are handled differently.
* We don't want to print the Element and Attribute nodes' sibling.
* External function.
/*!
* \brief Converts a DOM tree into a text string.
*
*=================================================================*/
void
ixmlDomTreetoString( IN IXML_Node * nodeptr,
IN ixml_membuf * buf )
* Element, and Attribute nodes are handled differently. We don't want to print
* the Element and Attribute nodes' sibling.
*/
static void ixmlDomTreetoString(
/*! [in] \todo documentation. */
IXML_Node *nodeptr,
/*! [in] \todo documentation. */
ixml_membuf *buf)
{
const char *nodeName = NULL;
const char *nodeValue = NULL;
IXML_Node *child = NULL;
if( ( nodeptr == NULL ) || ( buf == NULL ) ) {
if (nodeptr == NULL || buf == NULL) {
return;
}
@ -271,7 +277,6 @@ ixmlDomTreetoString( IN IXML_Node * nodeptr,
nodeValue = ixmlNode_getNodeValue(nodeptr);
switch (ixmlNode_getNodeType(nodeptr)) {
case eTEXT_NODE:
case eCDATA_SECTION_NODE:
case ePROCESSING_INSTRUCTION_NODE:
@ -289,79 +294,57 @@ ixmlDomTreetoString( IN IXML_Node * nodeptr,
case eELEMENT_NODE:
ixml_membuf_append_str(buf, "<");
ixml_membuf_append_str(buf, nodeName);
if (nodeptr->firstAttr != NULL) {
ixml_membuf_append_str(buf, " ");
ixmlPrintDomTreeRecursive(nodeptr->firstAttr, buf);
}
child = ixmlNode_getFirstChild(nodeptr);
if( ( child != NULL )
&& ( ixmlNode_getNodeType( child ) == eELEMENT_NODE ) ) {
if (child != NULL &&
ixmlNode_getNodeType(child) == eELEMENT_NODE) {
ixml_membuf_append_str(buf, ">");
} else {
ixml_membuf_append_str(buf, ">");
}
// output the children
ixmlPrintDomTreeRecursive( ixmlNode_getFirstChild( nodeptr ),
buf );
/* output the children */
ixmlPrintDomTreeRecursive(ixmlNode_getFirstChild(nodeptr), buf);
// Done with children. Output the end tag.
/* Done with children. Output the end tag. */
ixml_membuf_append_str(buf, "</");
ixml_membuf_append_str(buf, nodeName);
ixml_membuf_append_str(buf, ">");
break;
default:
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
"Warning, unknown node type %d\n",
(int)ixmlNode_getNodeType(nodeptr));
break;
}
}
/*================================================================
* ixmlLoadDocumentEx
* Parses the given file, and returns the DOM tree from it.
* External function.
*
*=================================================================*/
int
ixmlLoadDocumentEx( IN const char *xmlFile,
IXML_Document ** doc )
{
if( ( xmlFile == NULL ) || ( doc == NULL ) ) {
int ixmlLoadDocumentEx(const char *xmlFile, IXML_Document **doc)
{
if (xmlFile == NULL || doc == NULL) {
return IXML_INVALID_PARAMETER;
}
return Parser_LoadDocument(doc, xmlFile, TRUE);
}
/*================================================================
* ixmlLoadDocument
* Parses the given file, and returns the DOM tree from it.
* External function.
*
*=================================================================*/
IXML_Document *
ixmlLoadDocument( IN const char *xmlFile )
{
IXML_Document *ixmlLoadDocument(const char *xmlFile)
{
IXML_Document *doc = NULL;
ixmlLoadDocumentEx(xmlFile, &doc);
return doc;
}
/*================================================================
* ixmlPrintDocument
* Prints entire document, prepending XML prolog first.
* Puts lots of white spaces.
* External function.
*
*=================================================================*/
DOMString
ixmlPrintDocument(IXML_Document *doc)
DOMString ixmlPrintDocument(IXML_Document *doc)
{
IXML_Node* rootNode = (IXML_Node *)doc;
ixml_membuf memBuf;
@ -374,20 +357,13 @@ ixmlPrintDocument(IXML_Document *doc)
ixml_membuf_init(buf);
ixml_membuf_append_str(buf, "<?xml version=\"1.0\"?>\r\n");
ixmlPrintDomTree(rootNode, buf);
return buf->buf;
return buf->buf;
}
/*================================================================
* ixmlPrintNode
* Print DOM tree under node. Puts lots of white spaces
* External function.
*
*=================================================================*/
DOMString
ixmlPrintNode( IN IXML_Node * node )
{
DOMString ixmlPrintNode(IXML_Node *node)
{
ixml_membuf memBuf;
ixml_membuf *buf = &memBuf;
@ -397,20 +373,12 @@ ixmlPrintNode( IN IXML_Node * node )
ixml_membuf_init(buf);
ixmlPrintDomTree(node, buf);
return buf->buf;
return buf->buf;
}
/*================================================================
* ixmlDocumenttoString
* converts DOM tree under node to text string,
* prepending XML prolog first.
* External function.
*
*=================================================================*/
DOMString
ixmlDocumenttoString(IXML_Document *doc)
DOMString ixmlDocumenttoString(IXML_Document *doc)
{
IXML_Node* rootNode = (IXML_Node *)doc;
ixml_membuf memBuf;
@ -423,20 +391,13 @@ ixmlDocumenttoString(IXML_Document *doc)
ixml_membuf_init(buf);
ixml_membuf_append_str(buf, "<?xml version=\"1.0\"?>\r\n");
ixmlDomTreetoString(rootNode, buf);
return buf->buf;
return buf->buf;
}
/*================================================================
* ixmlNodetoString
* converts DOM tree under node to text string
* External function.
*
*=================================================================*/
DOMString
ixmlNodetoString( IN IXML_Node * node )
{
DOMString ixmlNodetoString(IXML_Node *node)
{
ixml_membuf memBuf;
ixml_membuf *buf = &memBuf;
@ -446,35 +407,20 @@ ixmlNodetoString( IN IXML_Node * node )
ixml_membuf_init(buf);
ixmlDomTreetoString(node, buf);
return buf->buf;
return buf->buf;
}
/*================================================================
* ixmlRelaxParser
* Makes the XML parser more tolerant to malformed text.
* External function.
*
*=================================================================*/
void
ixmlRelaxParser(char errorChar)
void ixmlRelaxParser(char errorChar)
{
Parser_setErrorChar(errorChar);
}
/*================================================================
* ixmlParseBufferEx
* Parse xml file stored in buffer.
* External function.
*
*=================================================================*/
int
ixmlParseBufferEx( IN const char *buffer,
IXML_Document ** retDoc )
int ixmlParseBufferEx(const char *buffer, IXML_Document **retDoc)
{
if( ( buffer == NULL ) || ( retDoc == NULL ) ) {
if (buffer == NULL || retDoc == NULL) {
return IXML_INVALID_PARAMETER;
}
@ -485,47 +431,31 @@ ixmlParseBufferEx( IN const char *buffer,
return Parser_LoadDocument(retDoc, buffer, FALSE);
}
/*================================================================
* ixmlParseBuffer
* Parse xml file stored in buffer.
* External function.
*
*=================================================================*/
IXML_Document *
ixmlParseBuffer( IN const char *buffer )
IXML_Document *ixmlParseBuffer(const char *buffer)
{
IXML_Document *doc = NULL;
ixmlParseBufferEx(buffer, &doc);
return doc;
}
/*================================================================
* ixmlCloneDOMString
* Clones a DOM String.
* External function.
*
*=================================================================*/
DOMString
ixmlCloneDOMString( IN const DOMString src )
DOMString ixmlCloneDOMString(const DOMString src)
{
if (src == NULL) {
return NULL;
}
return ( strdup( src ) );
return strdup(src);
}
/*================================================================
* ixmlFreeDOMString
* Frees a DOM String.
* External function.
*
*=================================================================*/
void
ixmlFreeDOMString( IN DOMString buf )
void ixmlFreeDOMString(DOMString buf)
{
if (buf != NULL) {
free(buf);
}
}

70
ixml/src/ixmldebug.c Normal file
View File

@ -0,0 +1,70 @@
/*!
* \file
*/
#include "autoconfig.h"
#include "ixmldebug.h"
#include <stdarg.h>
#include <stdio.h>
#ifdef DEBUG
void IxmlPrintf(
const char *DbgFileName,
int DbgLineNo,
const char *FunctionName,
const char *FmtStr,
...)
{
va_list ArgList;
FILE *fp = stdout;
fprintf(fp, "(%s::%s), line %d", DbgFileName, FunctionName, DbgLineNo);
if (FmtStr) {
fprintf(fp, ": ");
va_start(ArgList, FmtStr);
vfprintf(fp, FmtStr, ArgList);
fflush(fp);
va_end(ArgList);
} else {
fprintf(fp, "\n");
}
}
void printNodes(IXML_Node *tmpRoot, int depth)
{
unsigned long i;
IXML_NodeList *NodeList1;
IXML_Node *ChildNode1;
unsigned short NodeType;
const DOMString NodeValue;
const DOMString NodeName;
NodeList1 = ixmlNode_getChildNodes(tmpRoot);
for (i = 0; i < 100; ++i) {
ChildNode1 = ixmlNodeList_item(NodeList1, i);
if (ChildNode1 == NULL) {
break;
}
printNodes(ChildNode1, depth+1);
NodeType = ixmlNode_getNodeType(ChildNode1);
NodeValue = ixmlNode_getNodeValue(ChildNode1);
NodeName = ixmlNode_getNodeName(ChildNode1);
IxmlPrintf(__FILE__, __LINE__, "printNodes",
"DEPTH-%2d-IXML_Node Type %d, "
"IXML_Node Name: %s, IXML_Node Value: %s\n",
depth, NodeType, NodeName, NodeValue);
}
}
#endif

View File

@ -1,123 +1,122 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
/*!
* \file
*/
#include "ixmlmembuf.h"
#include "ixml.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "ixmlmembuf.h"
#include "ixml.h"
/*================================================================
* ixml_membuf_set_size
*
* Increases or decreases buffer cap so that at least
* 'new_length' bytes can be stored
/*!
* \brief Increases or decreases buffer capacity so that at least 'new_length'
* bytes can be stored.
*
* On error, m's fields do not change.
*
* returns:
* UPNP_E_SUCCESS
* UPNP_E_OUTOF_MEMORY
*
*=================================================================*/
static int
ixml_membuf_set_size( INOUT ixml_membuf * m,
* \return
* \li UPNP_E_SUCCESS
* \li UPNP_E_OUTOF_MEMORY
*/
static int ixml_membuf_set_size(
/*! [in,out] The memory buffer. */
INOUT ixml_membuf *m,
/*! [in] The new lenght. */
IN size_t new_length)
{
size_t diff;
size_t alloc_len;
char *temp_buf;
if( new_length >= m->length ) // increase length
{
// need more mem?
if (new_length >= m->length) {
/* increase length */
/* need more mem? */
if (new_length <= m->capacity) {
return 0; // have enough mem; done
/* have enough mem; done */
return 0;
}
diff = new_length - m->length;
alloc_len = MAXVAL(m->size_inc, diff) + m->capacity;
} else // decrease length
{
} else {
/* decrease length */
assert(new_length <= m->length);
// if diff is 0..m->size_inc, don't free
/* if diff is 0..m->size_inc, don't free */
if ((m->capacity - new_length) <= m->size_inc) {
return 0;
}
alloc_len = new_length + m->size_inc;
}
assert(alloc_len >= new_length);
temp_buf = realloc( m->buf, alloc_len + 1 );
temp_buf = realloc(m->buf, alloc_len + (size_t)1);
if (temp_buf == NULL) {
// try smaller size
/* try smaller size */
alloc_len = new_length;
temp_buf = realloc( m->buf, alloc_len + 1 );
temp_buf = realloc(m->buf, alloc_len + (size_t)1);
if (temp_buf == NULL) {
return IXML_INSUFFICIENT_MEMORY;
}
}
// save
/* save */
m->buf = temp_buf;
m->capacity = alloc_len;
return 0;
}
/*================================================================
* membuffer_init
*
*
*=================================================================*/
void
ixml_membuf_init( INOUT ixml_membuf * m )
void ixml_membuf_init(ixml_membuf *m)
{
assert(m != NULL);
m->size_inc = MEMBUF_DEF_SIZE_INC;
m->buf = NULL;
m->length = 0;
m->capacity = 0;
m->length = (size_t)0;
m->capacity = (size_t)0;
}
/*================================================================
* membuffer_destroy
*
*
*=================================================================*/
void
ixml_membuf_destroy( INOUT ixml_membuf * m )
void ixml_membuf_destroy(ixml_membuf *m)
{
if (m == NULL) {
return;
@ -127,110 +126,94 @@ ixml_membuf_destroy( INOUT ixml_membuf * m )
ixml_membuf_init(m);
}
/*================================================================
* ixml_membuf_assign
*
*
*=================================================================*/
int
ixml_membuf_assign( INOUT ixml_membuf * m,
IN const void *buf,
IN size_t buf_len )
int ixml_membuf_assign(
ixml_membuf *m,
const void *buf,
size_t buf_len)
{
int return_code;
assert(m != NULL);
// set value to null
/* set value to null */
if (buf == NULL) {
ixml_membuf_destroy(m);
return IXML_SUCCESS;
}
// alloc mem
/* alloc mem */
return_code = ixml_membuf_set_size(m, buf_len);
if (return_code != 0) {
return return_code;
}
// copy
memcpy( m->buf, buf, buf_len );
m->buf[buf_len] = 0; // null-terminate
/* copy */
memcpy(m->buf, buf, buf_len);
/* null-terminate */
m->buf[buf_len] = 0;
m->length = buf_len;
return IXML_SUCCESS;
}
/*================================================================
* ixml_membuf_assign_str
*
*
*=================================================================*/
int
ixml_membuf_assign_str( INOUT ixml_membuf * m,
IN const char *c_str )
int ixml_membuf_assign_str(
ixml_membuf *m,
const char *c_str)
{
return ixml_membuf_assign(m, c_str, strlen(c_str));
}
/*================================================================
* ixml_membuf_append
*
*
*=================================================================*/
int
ixml_membuf_append( INOUT ixml_membuf * m,
int ixml_membuf_append(
INOUT ixml_membuf *m,
IN const void *buf)
{
assert(m != NULL);
return ixml_membuf_insert( m, buf, 1, m->length );
return ixml_membuf_insert(m, buf, (size_t)1, m->length);
}
/*================================================================
* ixml_membuf_append_str
*
*
*=================================================================*/
int
ixml_membuf_append_str( INOUT ixml_membuf * m,
int ixml_membuf_append_str(
INOUT ixml_membuf *m,
IN const char *c_str)
{
return ixml_membuf_insert(m, c_str, strlen(c_str), m->length);
}
/*================================================================
* ixml_membuf_insert
*
*
*=================================================================*/
int
ixml_membuf_insert( INOUT ixml_membuf * m,
int ixml_membuf_insert(
INOUT ixml_membuf *m,
IN const void *buf,
IN size_t buf_len,
int index )
size_t index)
{
int return_code;
int return_code = 0;
assert(m != NULL);
if( index < 0 || index > ( int )m->length )
if (index > m->length) {
return IXML_INDEX_SIZE_ERR;
}
if( buf == NULL || buf_len == 0 ) {
if (buf == NULL || buf_len == (size_t)0) {
return 0;
}
// alloc mem
/* alloc mem */
return_code = ixml_membuf_set_size(m, m->length + buf_len);
if (return_code != 0) {
return return_code;
}
// insert data
// move data to right of insertion point
/* insert data */
/* move data to right of insertion point */
memmove(m->buf + index + buf_len, m->buf + index, m->length - index);
memcpy(m->buf + index, buf, buf_len);
m->length += buf_len;
m->buf[m->length] = 0; // null-terminate
/* Null terminate */
m->buf[m->length] = 0;
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +1,64 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
/*!
* \file
*/
#include "ixmlparser.h"
/*================================================================
* NamedNodeMap_getItemNumber
* return the item number of a item in NamedNodeMap.
* Internal to parser only.
* Parameters:
* name: the name of the item to find
*
*=================================================================*/
unsigned long
ixmlNamedNodeMap_getItemNumber( IN IXML_NamedNodeMap * nnMap,
#include <assert.h>
#include <stdlib.h> /* for free(), malloc() */
#include <string.h>
/*!
* \brief Return the item number of a item in NamedNodeMap.
*/
static unsigned long ixmlNamedNodeMap_getItemNumber(
/*! [in] The named node map to process. */
IN IXML_NamedNodeMap *nnMap,
/*! [in] The name of the item to find. */
IN const char *name)
{
IXML_Node *tempNode;
unsigned long returnItemNo = 0;
unsigned long returnItemNo = 0lu;
assert(nnMap != NULL && name != NULL);
if( ( nnMap == NULL ) || ( name == NULL ) ) {
return IXML_INVALID_ITEM_NUMBER;
if (nnMap == NULL || name == NULL) {
return (unsigned long)IXML_INVALID_ITEM_NUMBER;
}
tempNode = nnMap->nodeItem;
@ -56,74 +66,43 @@ ixmlNamedNodeMap_getItemNumber( IN IXML_NamedNodeMap * nnMap,
if (strcmp(name, tempNode->nodeName) == 0) {
return returnItemNo;
}
tempNode = tempNode->nextSibling;
returnItemNo++;
}
return IXML_INVALID_ITEM_NUMBER;
return (unsigned long)IXML_INVALID_ITEM_NUMBER;
}
/*================================================================
* NamedNodeMap_init
* Initializes a NamedNodeMap object.
* External function.
*
*=================================================================*/
void
ixmlNamedNodeMap_init( IN IXML_NamedNodeMap * nnMap )
void ixmlNamedNodeMap_init(IXML_NamedNodeMap *nnMap)
{
assert(nnMap != NULL);
memset(nnMap, 0, sizeof (IXML_NamedNodeMap));
}
/*================================================================
* NamedNodeMap_getNamedItem
* Retrieves a node specified by name.
* External function.
*
* Parameter:
* name: type nodeName of a node to retrieve.
*
* Return Value:
* A Node with the specified nodeName, or null if it
* does not identify any node in this map.
*
*=================================================================*/
IXML_Node *
ixmlNamedNodeMap_getNamedItem( IN IXML_NamedNodeMap * nnMap,
IN const char *name )
{
long index;
if( ( nnMap == NULL ) || ( name == NULL ) ) {
IXML_Node *ixmlNamedNodeMap_getNamedItem(
IXML_NamedNodeMap *nnMap,
const DOMString name)
{
unsigned long index;
if (nnMap == NULL || name == NULL) {
return NULL;
}
index = ixmlNamedNodeMap_getItemNumber(nnMap, name);
if( index == IXML_INVALID_ITEM_NUMBER ) {
if (index == (unsigned long)IXML_INVALID_ITEM_NUMBER) {
return NULL;
} else {
return ( ixmlNamedNodeMap_item( nnMap, ( unsigned long )index ) );
return ixmlNamedNodeMap_item(nnMap, index);
}
}
/*================================================================
* NamedNodeMap_item
* Returns the indexth item in the map. If index is greater than or
* equal to the number of nodes in this map, this returns null.
* External function.
*
* Parameter:
* index: index into this map.
*
* Return Value:
* The node at the indexth position in the map, or null if that is
* not a valid index.
*
*=================================================================*/
IXML_Node *
ixmlNamedNodeMap_item( IN IXML_NamedNodeMap * nnMap,
IXML_Node *ixmlNamedNodeMap_item(
IN IXML_NamedNodeMap *nnMap,
IN unsigned long index )
{
IXML_Node *tempNode;
@ -133,49 +112,36 @@ ixmlNamedNodeMap_item( IN IXML_NamedNodeMap * nnMap,
return NULL;
}
if( index > ixmlNamedNodeMap_getLength( nnMap ) - 1 ) {
if (index > ixmlNamedNodeMap_getLength(nnMap) - 1lu) {
return NULL;
}
tempNode = nnMap->nodeItem;
for( i = 0; i < index && tempNode != NULL; ++i ) {
for (i = 0u; i < index && tempNode != NULL; ++i) {
tempNode = tempNode->nextSibling;
}
return tempNode;
}
/*================================================================
* NamedNodeMap_getLength
* Return the number of Nodes in this map.
* External function.
*
* Parameters:
*
*=================================================================*/
unsigned long
ixmlNamedNodeMap_getLength( IN IXML_NamedNodeMap * nnMap )
unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
{
IXML_Node *tempNode;
unsigned long length = 0;
unsigned long length = 0lu;
if (nnMap != NULL) {
tempNode = nnMap->nodeItem;
for( length = 0; tempNode != NULL; ++length ) {
for (length = 0lu; tempNode != NULL; ++length) {
tempNode = tempNode->nextSibling;
}
}
return length;
}
/*================================================================
* ixmlNamedNodeMap_free
* frees a NamedNodeMap.
* External function.
*
*=================================================================*/
void
ixmlNamedNodeMap_free( IXML_NamedNodeMap * nnMap )
void ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap)
{
IXML_NamedNodeMap *pNext;
@ -186,38 +152,27 @@ ixmlNamedNodeMap_free( IXML_NamedNodeMap * nnMap )
}
}
/*================================================================
* NamedNodeMap_addToNamedNodeMap
* add a node to a NamedNodeMap.
* Internal to parser only.
* Parameters:
* add: the node to add into NamedNodeMap.
* Return:
* IXML_SUCCESS or failure.
*
*=================================================================*/
int
ixmlNamedNodeMap_addToNamedNodeMap( IN IXML_NamedNodeMap ** nnMap,
IN IXML_Node * add )
int ixmlNamedNodeMap_addToNamedNodeMap(
IXML_NamedNodeMap **nnMap,
IXML_Node *add)
{
IXML_NamedNodeMap *traverse = NULL,
*p = NULL;
IXML_NamedNodeMap *traverse = NULL;
IXML_NamedNodeMap *p = NULL;
IXML_NamedNodeMap *newItem = NULL;
if(add == NULL) {
return IXML_SUCCESS;
}
if( *nnMap == NULL ) // nodelist is empty
{
*nnMap =
( IXML_NamedNodeMap * ) malloc( sizeof( IXML_NamedNodeMap ) );
if (*nnMap == NULL) {
/* nodelist is empty */
*nnMap = (IXML_NamedNodeMap *)malloc(sizeof (IXML_NamedNodeMap));
if (*nnMap == NULL) {
return IXML_INSUFFICIENT_MEMORY;
}
ixmlNamedNodeMap_init(*nnMap);
}
if ((*nnMap)->nodeItem == NULL) {
(*nnMap)->nodeItem = add;
} else {
@ -227,9 +182,7 @@ ixmlNamedNodeMap_addToNamedNodeMap( IN IXML_NamedNodeMap ** nnMap,
p = traverse;
traverse = traverse->next;
}
newItem =
( IXML_NamedNodeMap * ) malloc( sizeof( IXML_NamedNodeMap ) );
newItem = (IXML_NamedNodeMap *)malloc(sizeof (IXML_NamedNodeMap));
if (newItem == NULL) {
return IXML_INSUFFICIENT_MEMORY;
}
@ -240,3 +193,4 @@ ixmlNamedNodeMap_addToNamedNodeMap( IN IXML_NamedNodeMap ** nnMap,
return IXML_SUCCESS;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,98 +1,90 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
/*!
* \file
*/
#include "ixmlparser.h"
/*================================================================
* ixmlNodeList_init
* initializes a nodelist
* External function.
*
*=================================================================*/
void
ixmlNodeList_init( IXML_NodeList * nList )
#include <assert.h>
#include <string.h>
void ixmlNodeList_init(IXML_NodeList *nList)
{
assert(nList != NULL);
memset(nList, 0, sizeof (IXML_NodeList));
}
/*================================================================
* ixmlNodeList_item
* Returns the indexth item in the collection. If index is greater
* than or equal to the number of nodes in the list, this returns
* null.
* External function.
*
*=================================================================*/
IXML_Node *
ixmlNodeList_item( IXML_NodeList * nList,
IXML_Node *ixmlNodeList_item(
IXML_NodeList *nList,
unsigned long index)
{
IXML_NodeList *next;
unsigned int i;
// if the list ptr is NULL
/* if the list ptr is NULL */
if (nList == NULL) {
return NULL;
}
// if index is more than list length
if( index > ixmlNodeList_length( nList ) - 1 ) {
/* if index is more than list length */
if (index > ixmlNodeList_length(nList) - 1lu) {
return NULL;
}
next = nList;
for( i = 0; i < index && next != NULL; ++i ) {
for (i = 0u; i < index && next != NULL; ++i) {
next = next->next;
}
if( next == NULL ) return NULL;
return next->nodeItem;
if (next == NULL) {
return NULL;
}
/*================================================================
* ixmlNodeList_addToNodeList
* Add a node to nodelist
* Internal to parser only.
*
*=================================================================*/
int
ixmlNodeList_addToNodeList( IN IXML_NodeList ** nList,
IN IXML_Node * add )
return next->nodeItem;
}
int ixmlNodeList_addToNodeList(
IXML_NodeList **nList,
IXML_Node *add)
{
IXML_NodeList *traverse,
*p = NULL;
IXML_NodeList *traverse = NULL;
IXML_NodeList *p = NULL;
IXML_NodeList *newListItem;
assert(add != NULL);
@ -101,8 +93,8 @@ ixmlNodeList_addToNodeList( IN IXML_NodeList ** nList,
return IXML_FAILED;
}
if( *nList == NULL ) // nodelist is empty
{
if (*nList == NULL) {
/* nodelist is empty */
*nList = (IXML_NodeList *)malloc(sizeof (IXML_NodeList));
if (*nList == NULL) {
return IXML_INSUFFICIENT_MEMORY;
@ -120,8 +112,7 @@ ixmlNodeList_addToNodeList( IN IXML_NodeList ** nList,
traverse = traverse->next;
}
newListItem =
( IXML_NodeList * ) malloc( sizeof( IXML_NodeList ) );
newListItem = (IXML_NodeList *)malloc(sizeof (IXML_NodeList));
if (newListItem == NULL) {
return IXML_INSUFFICIENT_MEMORY;
}
@ -133,18 +124,11 @@ ixmlNodeList_addToNodeList( IN IXML_NodeList ** nList,
return IXML_SUCCESS;
}
/*================================================================
* ixmlNodeList_length
* Returns the number of nodes in the list. The range of valid
* child node indices is 0 to length-1 inclusive.
* External function.
*
*=================================================================*/
unsigned long
ixmlNodeList_length( IN IXML_NodeList * nList )
unsigned long ixmlNodeList_length(IXML_NodeList *nList)
{
IXML_NodeList *list;
unsigned long length = 0;
unsigned long length = 0lu;
list = nList;
while (list != NULL) {
@ -155,22 +139,15 @@ ixmlNodeList_length( IN IXML_NodeList * nList )
return length;
}
/*================================================================
* ixmlNodeList_free
* frees a nodeList
* External function
*
*=================================================================*/
void
ixmlNodeList_free( IN IXML_NodeList * nList )
void ixmlNodeList_free(IXML_NodeList *nList)
{
IXML_NodeList *next;
while (nList != NULL) {
next = nList->next;
free(nList);
nList = next;
}
}

0
ixml/test/test_document.sh Normal file → Executable file
View File

View File

@ -6,6 +6,6 @@ includedir=@includedir@
Name: libupnp
Description: Linux SDK for UPnP Devices
Version: @VERSION@
Libs: @PTHREAD_LIBS@ -L${libdir} -lupnp -lthreadutil -lixml
Libs: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -L${libdir} -lupnp -lthreadutil -lixml
Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp

View File

@ -1,4 +1,4 @@
Version: 1.4.2
Version: 1.6.20
Summary: Universal Plug and Play (UPnP) SDK
Name: libupnp
Release: 1%{?dist}
@ -77,6 +77,12 @@ make install DESTDIR=$RPM_BUILD_ROOT
rm -rf %{buildroot}
%changelog
* Mon Nov 19 2007 Marcelo Jimenez <mroberto@users.sourceforge.net> - 1.6.2-1
- Update to version 1.6.2
* Mon Nov 19 2007 Marcelo Jimenez <mroberto@users.sourceforge.net> - 1.4.7-1
- Update to version 1.4.7
* Fri Feb 02 2007 Eric Tanguy <eric.tanguy@univ-nantes.fr> - 1.4.2-1
- Update to version 1.4.2

View File

@ -41,7 +41,7 @@ AC_DEFUN([RT_BOOL_ARG_ENABLE],[
)])
test "x$enable_[$1]" != [x]m4_if([$2],[yes],[no],[yes]) dnl
&& enable_[]Name=[$2]
AC_MSG_RESULT($enable_[]Name)dnl
AC_MSG_RESULT($enable_[]Name)
AM_CONDITIONAL([ENABLE_]NAME, test x"$enable_[]Name" = xyes)
dnl
m4_popdef([NAME])dnl

View File

@ -1,12 +1,11 @@
# $Id: Makefile.am,v 1.2 2006/02/27 21:38:56 r3mi Exp $
#
# "Makefile.am" for "libupnp/threadutil"
#
# (C) Copyright 2005 Rémi Turboult <r3mi@users.sourceforge.net>
# (C) Copyright 2005 Remi Turboult <r3mi@users.sourceforge.net>
#
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc
AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc \
-I$(top_srcdir)/upnp/inc
if ENABLE_DEBUG
AM_CPPFLAGS += -DDEBUG -DSTATS
@ -20,13 +19,21 @@ lib_LTLIBRARIES = libthreadutil.la
libthreadutil_la_LDFLAGS = -version-info $(LT_VERSION_THREADUTIL)
libthreadutil_la_SOURCES = \
src/FreeList.c src/LinkedList.c \
src/ThreadPool.c src/TimerThread.c \
src/iasnprintf.c
inc/FreeList.h \
src/FreeList.c \
inc/LinkedList.h \
src/LinkedList.c \
inc/ThreadPool.h \
src/ThreadPool.c \
inc/TimerThread.h \
src/TimerThread.c
upnpincludedir = $(includedir)/upnp
upnpinclude_HEADERS = \
inc/FreeList.h inc/LinkedList.h \
inc/ThreadPool.h inc/TimerThread.h \
inc/iasnprintf.h inc/ithread.h
upnpinclude_HEADERS = \
inc/ithread.h \
inc/FreeList.h \
inc/LinkedList.h \
inc/ThreadPool.h \
inc/TimerThread.h

View File

@ -32,105 +32,96 @@
#ifndef FREE_LIST_H
#define FREE_LIST_H
/*!
* \file
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "ithread.h"
#include <errno.h>
/****************************************************************************
* Name: FreeListNode
*
* Description:
* free list node. points to next free item.
* memory for node is borrowed from allocated items.
* Internal Use Only.
*****************************************************************************/
/*!
* Free list node. points to next free item.
* Memory for node is borrowed from allocated items.
* \internal
*/
typedef struct FREELISTNODE
{
struct FREELISTNODE *next;
} FreeListNode;
/****************************************************************************
* Name: FreeList
*
* Description:
/*!
* Stores head and size of free list, as well as mutex for protection.
* Internal Use Only.
*****************************************************************************/
* \internal
*/
typedef struct FREELIST
{
FreeListNode *head;
size_t element_size;
int maxFreeListLength;
int freeListLength;
} FreeList;
/****************************************************************************
* Function: FreeListInit
/*!
* \brief Initializes Free List.
*
* Description:
* Initializes Free List. Must be called first.
* And only once for FreeList.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* size_t - size of elements to store in free list
* maxFreeListSize - max size that the free list can grow to
* before returning memory to O.S.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
*****************************************************************************/
int FreeListInit(FreeList *free_list,
* Must be called first and only once for FreeList.
*
* \return:
* \li \c 0 on success.
* \li \c EINVAL on failure.
*/
int FreeListInit(
/*! Must be valid, non null, pointer to a linked list. */
FreeList *free_list,
/*! Size of elements to store in free list. */
size_t elementSize,
int maxFreeListSize);
/*! Max size that the free list can grow to before returning
* memory to O.S. */
int maxFreeListLength);
/****************************************************************************
* Function: FreeListAlloc
/*!
* \brief Allocates chunk of set size.
*
* Description:
* Allocates chunk of set size.
* If a free item is available in the list, returnes the stored item.
* Otherwise calls the O.S. to allocate memory.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* Returns:
* Non NULL on success. NULL on failure.
*****************************************************************************/
void * FreeListAlloc (FreeList *free_list);
/****************************************************************************
* Function: FreeListFree
* If a free item is available in the list, returnes the stored item,
* otherwise calls the O.S. to allocate memory.
*
* Description:
* Returns an item to the Free List.
* If the free list is smaller than the max size than
* adds the item to the free list.
* Otherwise returns the item to the O.S.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
*****************************************************************************/
int FreeListFree (FreeList *free_list,void * element);
* \return Non NULL on success. NULL on failure.
*/
void *FreeListAlloc(
/*! Must be valid, non null, pointer to a linked list. */
FreeList *free_list);
/****************************************************************************
* Function: FreeListDestroy
/*!
* \brief Returns an item to the Free List.
*
* Description:
* Releases the resources stored with the free list.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
*****************************************************************************/
int FreeListDestroy (FreeList *free_list);
* If the free list is smaller than the max size then adds the item to the
* free list, otherwise returns the item to the O.S.
*
* \return:
* \li \c 0 on success.
* \li \c EINVAL on failure.
*/
int FreeListFree(
/*! Must be valid, non null, pointer to a free list. */
FreeList *free_list,
/*! Must be a pointer allocated by FreeListAlloc. */
void *element);
/*!
* \brief Releases the resources stored with the free list.
*
* \return:
* \li \c 0 on success.
* \li \c EINVAL on failure.
*/
int FreeListDestroy(
/*! Must be valid, non null, pointer to a linked list. */
FreeList *free_list);
#ifdef __cplusplus
}

View File

@ -32,6 +32,10 @@
#ifndef LINKED_LIST_H
#define LINKED_LIST_H
/*!
* \file
*/
#include "FreeList.h"
#ifdef __cplusplus
@ -44,30 +48,15 @@ extern "C" {
#define LIST_SUCCESS 1
#define LIST_FAIL 0
/****************************************************************************
* Name: free_routine
*
* Description:
* Function for freeing list items
*****************************************************************************/
/*! Function for freeing list items. */
typedef void (*free_function)(void *arg);
/****************************************************************************
* Name: cmp_routine
*
* Description:
* Function for comparing list items
* Returns 1 if itemA==itemB
*****************************************************************************/
/*! Function for comparing list items. Returns 1 if itemA==itemB */
typedef int (*cmp_routine)(void *itemA,void *itemB);
/****************************************************************************
* Name: ListNode
*
* Description:
* linked list node. stores generic item and pointers to next and prev.
* Internal Use Only.
*****************************************************************************/
/*! Linked list node. Stores generic item and pointers to next and prev.
* \internal
*/
typedef struct LISTNODE
{
struct LISTNODE *prev;
@ -75,13 +64,10 @@ typedef struct LISTNODE
void *item;
} ListNode;
/****************************************************************************
* Name: LinkedList
/*!
* Linked list (no protection).
*
* Description:
* linked list (no protection). Internal Use Only.
* Because this is for internal use, parameters are NOT checked for
* validity.
* Because this is for internal use, parameters are NOT checked for validity.
* The first item of the list is stored at node: head->next
* The last item of the list is stored at node: tail->prev
* If head->next=tail, then list is empty.
@ -89,239 +75,211 @@ typedef struct LISTNODE
*
* LinkedList g;
* ListNode *temp = NULL;
* for (temp = ListHead(g);temp!=NULL;temp = ListNext(g,temp))
* {
* for (temp = ListHead(g);temp!=NULL;temp = ListNext(g,temp)) {
* }
*
*****************************************************************************/
* \internal
*/
typedef struct LINKEDLIST
{
ListNode head; /* head, first item is stored at: head->next */
ListNode tail; /* tail, last item is stored at: tail->prev */
long size; /* size of list */
FreeList freeNodeList; /* free list to use */
free_function free_func; /* free function to use */
cmp_routine cmp_func; /* compare function to use */
/*! head, first item is stored at: head->next */
ListNode head;
/*! tail, last item is stored at: tail->prev */
ListNode tail;
/*! size of list */
long size;
/*! free list to use */
FreeList freeNodeList;
/*! free function to use */
free_function free_func;
/*! compare function to use */
cmp_routine cmp_func;
} LinkedList;
/****************************************************************************
* Function: ListInit
/*!
* \brief Initializes LinkedList. Must be called first and only once for List.
*
* Description:
* Initializes LinkedList. Must be called first.
* And only once for List.
* Parameters:
* list - must be valid, non null, pointer to a linked list.
* cmp_func - function used to compare items. (May be NULL)
* free_func - function used to free items. (May be NULL)
* Returns:
* 0 on success, EOUTOFMEM on failure.
*****************************************************************************/
int ListInit(LinkedList *list,cmp_routine cmp_func, free_function free_func);
* \return
* \li \c 0 on success.
* \li \c EOUTOFMEM on failure.
*/
int ListInit(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Function used to compare items. (May be NULL). */
cmp_routine cmp_func,
/*! Function used to free items. (May be NULL). */
free_function free_func);
/****************************************************************************
* Function: ListAddHead
/*!
* \brief Adds a node to the head of the list. Node gets immediately after
* list head.
*
* Description:
* Adds a node to the head of the list.
* Node gets immediately after list.head.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* void * item - item to be added
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *ListAddHead(LinkedList *list, void *item);
*
* \return The pointer to the ListNode on success, NULL on failure.
*/
ListNode *ListAddHead(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Item to be added. */
void *item);
/****************************************************************************
* Function: ListAddTail
/*!
* \brief Adds a node to the tail of the list. Node gets added immediately
* before list.tail.
*
* Description:
* Adds a node to the tail of the list.
* Node gets added immediately before list.tail.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* void * item - item to be added
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *ListAddTail(LinkedList *list, void *item);
* Precondition: The list has been initialized.
*
* \return The pointer to the ListNode on success, NULL on failure.
*/
ListNode *ListAddTail(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Item to be added. */
void *item);
/****************************************************************************
* Function: ListAddAfter
/*!
* \brief Adds a node after the specified node. Node gets added immediately
* after bnode.
*
* Description:
* Adds a node after the specified node.
* Node gets added immediately after bnode.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* void * item - item to be added
* ListNode * bnode - node to add after
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *ListAddAfter(LinkedList *list, void *item, ListNode *bnode);
* Precondition: The list has been initialized.
*
* \return The pointer to the ListNode on success, NULL on failure.
*/
ListNode *ListAddAfter(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Item to be added. */
void *item,
/*! Node to add after. */
ListNode *bnode);
/*!
* \brief Adds a node before the specified node. Node gets added immediately
* before anode.
*
* Precondition: The list has been initialized.
*
* \return The pointer to the ListNode on success, NULL on failure.
*/
ListNode *ListAddBefore(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Item to be added. */
void *item,
/*! Node to add in front of. */
ListNode *anode);
/****************************************************************************
* Function: ListAddBefore
/*!
* \brief Removes a node from the list. The memory for the node is freed.
*
* Description:
* Adds a node before the specified node.
* Node gets added immediately before anode.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* ListNode * anode - node to add the in front of.
* void * item - item to be added
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *ListAddBefore(LinkedList *list,void *item, ListNode *anode);
* Precondition: The list has been initialized.
*
* \return The pointer to the item stored in the node or NULL if the item
* is freed.
*/
void *ListDelNode(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Node to delete. */
ListNode *dnode,
/*! if !0 then item is freed using free function. If 0 (or free
* function is NULL) then item is not freed. */
int freeItem);
/*!
* \brief Removes all memory associated with list nodes. Does not free
* LinkedList *list.
*
* Precondition: The list has been initialized.
*
* \return 0 on success, EINVAL on failure.
*/
int ListDestroy(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! if !0 then item is freed using free function. If 0 (or free
* function is NULL) then item is not freed. */
int freeItem);
/****************************************************************************
* Function: ListDelNode
/*!
* \brief Returns the head of the list.
*
* Description:
* Removes a node from the list
* The memory for the node is freed.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* ListNode *dnode - done to delete.
* freeItem - if !0 then item is freed using free function.
* if 0 (or free function is NULL) then item is not freed
* Returns:
* The pointer to the item stored in the node or NULL if the item is freed.
* Precondition:
* The list has been initialized.
*****************************************************************************/
void *ListDelNode(LinkedList *list,ListNode *dnode, int freeItem);
* Precondition: The list has been initialized.
*
* \return The head of the list. NULL if list is empty.
*/
ListNode *ListHead(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list);
/****************************************************************************
* Function: ListDestroy
/*!
* \brief Returns the tail of the list.
*
* Description:
* Removes all memory associated with list nodes.
* Does not free LinkedList *list.
* Precondition: The list has been initialized.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* freeItem - if !0 then items are freed using the free_function.
* if 0 (or free function is NULL) then items are not freed.
* Returns:
* 0 on success. Always returns 0.
* Precondition:
* The list has been initialized.
*****************************************************************************/
int ListDestroy(LinkedList *list, int freeItem);
* \return The tail of the list. NULL if list is empty.
*/
ListNode *ListTail(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list);
/*!
* \brief Returns the next item in the list.
*
* Precondition: The list has been initialized.
*
* \return The next item in the list. NULL if there are no more items in list.
*/
ListNode *ListNext(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Node from the list. */
ListNode *node);
/****************************************************************************
* Function: ListHead
/*!
* \brief Returns the previous item in the list.
*
* Description:
* Returns the head of the list.
* Precondition: The list has been initialized.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The head of the list. NULL if list is empty.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode* ListHead(LinkedList *list);
* \return The previous item in the list. NULL if there are no more items in list.
*/
ListNode *ListPrev(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! Node from the list. */
ListNode *node);
/****************************************************************************
* Function: ListTail
/*!
* \brief Finds the specified item in the list.
*
* Description:
* Returns the tail of the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The tail of the list. NULL if list is empty.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode* ListTail(LinkedList *list);
/****************************************************************************
* Function: ListNext
*
* Description:
* Returns the next item in the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The next item in the list. NULL if there are no more items in list.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode* ListNext(LinkedList *list, ListNode * node);
/****************************************************************************
* Function: ListPrev
*
* Description:
* Returns the previous item in the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The previous item in the list. NULL if there are no more items in list.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode* ListPrev(LinkedList *list, ListNode * node);
/****************************************************************************
* Function: ListFind
*
* Description:
* Finds the specified item in the list.
* Uses the compare function specified in ListInit. If compare function
* is NULL then compares items as pointers.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* ListNode *start - the node to start from, NULL if to start from
* beginning.
* void * item - the item to search for.
* Returns:
* The node containing the item. NULL if no node contains the item.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode* ListFind(LinkedList *list, ListNode *start, void * item);
/****************************************************************************
* Function: ListSize
*
* Description:
* Returns the size of the list.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* Returns:
* The number of items in the list.
* Precondition:
* The list has been initialized.
*****************************************************************************/
int ListSize(LinkedList* list);
* Precondition: The list has been initialized.
*
* \return The node containing the item. NULL if no node contains the item.
*/
ListNode* ListFind(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList *list,
/*! The node to start from, NULL if to start from beginning. */
ListNode *start,
/*! The item to search for. */
void *item);
/*!
* \brief Returns the size of the list.
*
* Precondition: The list has been initialized.
*
* \return The number of items in the list.
*/
long ListSize(
/*! Must be valid, non null, pointer to a linked list. */
LinkedList* list);
#ifdef __cplusplus
}

View File

@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -32,132 +33,144 @@
#ifndef THREADPOOL_H
#define THREADPOOL_H
/*!
* \file
*/
#include "FreeList.h"
#include "ithread.h"
#include "LinkedList.h"
#include "UpnpInet.h"
#include "UpnpGlobal.h" /* for UPNP_INLINE, EXPORT_SPEC */
#include <errno.h>
#ifdef WIN32
#include <time.h>
struct timezone
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
int gettimeofday(struct timeval *tv, struct timezone *tz);
#else /* WIN32 */
#include <sys/param.h>
#include <sys/time.h> /* for gettimeofday() */
#if defined(__OSX__) || defined(__APPLE__) || defined(__NetBSD__)
#include <sys/resource.h> /* for setpriority() */
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Size of job free list */
/*! Size of job free list */
#define JOBFREELISTSIZE 100
#define INFINITE_THREADS -1
#define EMAXTHREADS (-8 & 1<<29)
/* Invalid Policy */
/*! Invalid Policy */
#define INVALID_POLICY (-9 & 1<<29)
/* Invalid JOB Id */
/*! Invalid JOB Id */
#define INVALID_JOB_ID (-2 & 1<<29)
typedef enum duration {SHORT_TERM,PERSISTENT} Duration;
typedef enum duration {
SHORT_TERM,
PERSISTENT
} Duration;
typedef enum priority {LOW_PRIORITY,
typedef enum priority {
LOW_PRIORITY,
MED_PRIORITY,
HIGH_PRIORITY} ThreadPriority;
HIGH_PRIORITY
} ThreadPriority;
#define DEFAULT_PRIORITY MED_PRIORITY /* default priority used by TPJobInit */
#define DEFAULT_MIN_THREADS 1 /* default minimum used by TPAttrInit */
#define DEFAULT_MAX_THREADS 10 /* default max used by TPAttrInit */
#define DEFAULT_JOBS_PER_THREAD 10 /* default jobs per thread used by TPAttrInit */
#define DEFAULT_STARVATION_TIME 500 /* default starvation time used by TPAttrInit */
#define DEFAULT_IDLE_TIME 10 * 1000 /* default idle time used by TPAttrInit */
#define DEFAULT_FREE_ROUTINE NULL /* default free routine used TPJobInit */
#define DEFAULT_MAX_JOBS_TOTAL 100 /* default max jobs used TPAttrInit */
/*! default priority used by TPJobInit */
#define DEFAULT_PRIORITY MED_PRIORITY
#define STATS 1 /* always include stats because code change is minimal */
/*! default minimum used by TPAttrInit */
#define DEFAULT_MIN_THREADS 1
/*! default max used by TPAttrInit */
#define DEFAULT_MAX_THREADS 10
/* Statistics */
#ifdef WIN32 /* TODO: check why STATSONLY fails during compilation */
#undef STATS
#endif
/*! default stack size used by TPAttrInit */
#define DEFAULT_STACK_SIZE 0u
#ifdef STATS
#define STATSONLY(x) x
#else
#define STATSONLY(x)
#endif
/*! default jobs per thread used by TPAttrInit */
#define DEFAULT_JOBS_PER_THREAD 10
/*! default starvation time used by TPAttrInit */
#define DEFAULT_STARVATION_TIME 500
/*! default idle time used by TPAttrInit */
#define DEFAULT_IDLE_TIME 10 * 1000
/*! default free routine used TPJobInit */
#define DEFAULT_FREE_ROUTINE NULL
/*! default max jobs used TPAttrInit */
#define DEFAULT_MAX_JOBS_TOTAL 100
/*!
* \brief Statistics.
*
* Always include stats because code change is minimal.
*/
#define STATS 1
#ifdef _DEBUG
#define DEBUG 1
#endif
#include "LinkedList.h"
#include <sys/timeb.h>
#include "FreeList.h"
#include "ithread.h"
#include <errno.h>
#include <sys/timeb.h>
#define EXPORT
typedef int PolicyType;
#define DEFAULT_POLICY SCHED_OTHER
#define DEFAULT_SCHED_PARAM 0 /* default priority */
/****************************************************************************
* Name: free_routine
*
* Description:
* Function for freeing a thread argument
*****************************************************************************/
#define DEFAULT_POLICY SCHED_OTHER
/*! Function for freeing a thread argument. */
typedef void (*free_routine)(void *arg);
/****************************************************************************
* Name: ThreadPoolAttr
*
* Description:
* Attributes for thread pool. Used to set and change parameters of
* thread pool
*****************************************************************************/
/*! Attributes for thread pool. Used to set and change parameters of thread
* pool. */
typedef struct THREADPOOLATTR
{
int minThreads; /* minThreads, ThreadPool will always maintain at least
this many threads */
int maxThreads; /* maxThreads, ThreadPool will never have more than this
number of threads */
int maxIdleTime; /* maxIdleTime (in milliseconds)
this is the maximum time a thread will remain idle
before dying */
int jobsPerThread; /* jobs per thread to maintain */
int maxJobsTotal; /* maximum number of jobs that can be queued totally. */
int starvationTime; /* the time a low priority or med priority
job waits before getting bumped
up a priority (in milliseconds) */
PolicyType schedPolicy; /* scheduling policy to use */
/*! ThreadPool will always maintain at least this many threads. */
int minThreads;
/*! ThreadPool will never have more than this number of threads. */
int maxThreads;
/*! This is the minimum stack size allocated for each thread. */
size_t stackSize;
/*! This is the maximum time a thread will
* remain idle before dying (in milliseconds). */
int maxIdleTime;
/*! Jobs per thread to maintain. */
int jobsPerThread;
/*! Maximum number of jobs that can be queued totally. */
int maxJobsTotal;
/*! the time a low priority or med priority job waits before getting
* bumped up a priority (in milliseconds). */
int starvationTime;
/*! scheduling policy to use. */
PolicyType schedPolicy;
} ThreadPoolAttr;
/****************************************************************************
* Name: ThreadPool
*
* Description:
* Internal ThreadPool Job
*****************************************************************************/
/*! Internal ThreadPool Job. */
typedef struct THREADPOOLJOB
{
start_routine func;
void *arg;
free_routine free_func;
struct timeb requestTime;
int priority;
struct timeval requestTime;
ThreadPriority priority;
int jobId;
} ThreadPoolJob;
/****************************************************************************
* Name: ThreadPoolStats
*
* Description:
* Structure to hold statistics
*****************************************************************************/
#ifdef STATS
/*! Structure to hold statistics. */
typedef struct TPOOLSTATS
{
double totalTimeHQ;
@ -181,18 +194,12 @@ typedef struct TPOOLSTATS
int currentJobsMQ;
} ThreadPoolStats;
#endif
/****************************************************************************
* Name: ThreadPool
/*!
* \brief A thread pool similar to the thread pool in the UPnP SDK.
*
* Description:
* A thread pool similar to the thread pool in the UPnP SDK.
* Allows jobs to be scheduled for running by threads in a
* thread pool. The thread pool is initialized with a
* minimum and maximum thread number as well as a
* max idle time
* minimum and maximum thread number as well as a max idle time
* and a jobs per thread ratio. If a worker thread waits the whole
* max idle time without receiving a job and the thread pool
* currently has more threads running than the minimum
@ -201,357 +208,329 @@ typedef struct TPOOLSTATS
* becomes greater than the set ratio and the thread pool currently has
* less than the maximum threads then a new thread will
* be created.
*
*****************************************************************************/
*/
typedef struct THREADPOOL
{
ithread_mutex_t mutex; /* mutex to protect job qs */
ithread_cond_t condition; /* condition variable to signal Q */
ithread_cond_t start_and_shutdown; /* condition variable for start
and stop */
int lastJobId; /* ids for jobs */
int shutdown; /* whether or not we are shutting down */
int totalThreads; /* total number of threads */
int persistentThreads; /* number of persistent threads */
FreeList jobFreeList; /* free list of jobs */
LinkedList lowJobQ; /* low priority job Q */
LinkedList medJobQ; /* med priority job Q */
LinkedList highJobQ; /* high priority job Q */
ThreadPoolJob *persistentJob; /* persistent job */
ThreadPoolAttr attr; /* thread pool attributes */
#ifdef STATS
/* statistics */
/*! Mutex to protect job qs. */
ithread_mutex_t mutex;
/*! Condition variable to signal Q. */
ithread_cond_t condition;
/*! Condition variable for start and stop. */
ithread_cond_t start_and_shutdown;
/*! ids for jobs */
int lastJobId;
/*! whether or not we are shutting down */
int shutdown;
/*! total number of threads */
int totalThreads;
/*! flag that's set when waiting for a new worker thread to start */
int pendingWorkerThreadStart;
/*! number of threads that are currently executing jobs */
int busyThreads;
/*! number of persistent threads */
int persistentThreads;
/*! free list of jobs */
FreeList jobFreeList;
/*! low priority job Q */
LinkedList lowJobQ;
/*! med priority job Q */
LinkedList medJobQ;
/*! high priority job Q */
LinkedList highJobQ;
/*! persistent job */
ThreadPoolJob *persistentJob;
/*! thread pool attributes */
ThreadPoolAttr attr;
/*! statistics */
ThreadPoolStats stats;
#endif
} ThreadPool;
/****************************************************************************
* Function: ThreadPoolInit
/*!
* \brief Initializes and starts ThreadPool. Must be called first and
* only once for ThreadPool.
*
* Description:
* Initializes and starts ThreadPool. Must be called first.
* And only once for ThreadPool.
* Parameters:
* tp - must be valid, non null, pointer to ThreadPool.
* attr - can be null
*
* if not null then attr contains the following fields:
*
* minWorkerThreads - minimum number of worker threads
* thread pool will never have less than this
* number of threads.
* maxWorkerThreads - maximum number of worker threads
* thread pool will never have more than this
* number of threads.
* maxIdleTime - maximum time that a worker thread will spend
* idle. If a worker is idle longer than this
* time and there are more than the min
* number of workers running, than the
* worker thread exits.
* jobsPerThread - ratio of jobs to thread to try and maintain
* if a job is scheduled and the number of jobs per
* thread is greater than this number,and
* if less than the maximum number of
* workers are running then a new thread is
* started to help out with efficiency.
* schedPolicy - scheduling policy to try and set (OS dependent)
* Returns:
* 0 on success, nonzero on failure.
* EAGAIN if not enough system resources to create minimum threads.
* INVALID_POLICY if schedPolicy can't be set
* EMAXTHREADS if minimum threads is greater than maximum threads
*****************************************************************************/
int ThreadPoolInit(ThreadPool *tp,
* \return
* \li \c 0 on success.
* \li \c EAGAIN if not enough system resources to create minimum threads.
* \li \c INVALID_POLICY if schedPolicy can't be set.
* \li \c EMAXTHREADS if minimum threads is greater than maximum threads.
*/
int ThreadPoolInit(
/*! Must be valid, non null, pointer to ThreadPool. */
ThreadPool *tp,
/*! Can be null. if not null then attr contains the following fields:
* \li \c minWorkerThreads - minimum number of worker threads thread
* pool will never have less than this number of threads.
* \li \c maxWorkerThreads - maximum number of worker threads thread
* pool will never have more than this number of threads.
* \li \c maxIdleTime - maximum time that a worker thread will spend
* idle. If a worker is idle longer than this time and there are more
* than the min number of workers running, then the worker thread
* exits.
* \li \c jobsPerThread - ratio of jobs to thread to try and maintain
* if a job is scheduled and the number of jobs per thread is greater
* than this number,and if less than the maximum number of workers are
* running then a new thread is started to help out with efficiency.
* \li \c schedPolicy - scheduling policy to try and set (OS dependent).
*/
ThreadPoolAttr *attr);
/****************************************************************************
* Function: ThreadPoolAddPersistent
/*!
* \brief Adds a persistent job to the thread pool.
*
* Description:
* Adds a persistent job to the thread pool.
* Job will be run as soon as possible.
* Call will block until job is scheduled.
* Parameters:
* tp - valid thread pool pointer
* ThreadPoolJob - valid thread pool job with the following fields:
* Job will be run as soon as possible. Call will block until job is scheduled.
*
* func - ThreadFunction to run
* arg - argument to function.
* priority - priority of job.
*
* Returns:
* 0 on success, nonzero on failure
* EOUTOFMEM not enough memory to add job.
* EMAXTHREADS not enough threads to add persistent job.
*****************************************************************************/
int ThreadPoolAddPersistent (ThreadPool*tp,
* \return
* \li \c 0 on success.
* \li \c EOUTOFMEM not enough memory to add job.
* \li \c EMAXTHREADS not enough threads to add persistent job.
*/
int ThreadPoolAddPersistent(
/*! Valid thread pool pointer. */
ThreadPool*tp,
/*! Valid thread pool job. */
ThreadPoolJob *job,
/*! . */
int *jobId);
/****************************************************************************
* Function: ThreadPoolGetAttr
/*!
* \brief Gets the current set of attributes associated with the thread pool.
*
* Description:
* Gets the current set of attributes
* associated with the thread pool.
* Parameters:
* tp - valid thread pool pointer
* out - non null pointer to store attributes
* Returns:
* 0 on success, nonzero on failure
* Always returns 0.
*****************************************************************************/
int ThreadPoolGetAttr(ThreadPool *tp,
* \return
* \li \c 0 on success, nonzero on failure.
*/
int ThreadPoolGetAttr(
/*! valid thread pool pointer. */
ThreadPool *tp,
/*! non null pointer to store attributes. */
ThreadPoolAttr *out);
/****************************************************************************
* Function: ThreadPoolSetAttr
*
* Description:
* Sets the attributes for the thread pool.
/*!
* \brief Sets the attributes for the thread pool.
* Only affects future calculations.
* Parameters:
* tp - valid thread pool pointer
* attr - pointer to attributes, null sets attributes to default.
* Returns:
* 0 on success, nonzero on failure
* Returns INVALID_POLICY if policy can not be set.
*****************************************************************************/
int ThreadPoolSetAttr(ThreadPool *tp,
*
* \return
* \li \c 0 on success, nonzero on failure.
* \li \c INVALID_POLICY if policy can not be set.
*/
int ThreadPoolSetAttr(
/*! valid thread pool pointer. */
ThreadPool *tp,
/*! pointer to attributes, null sets attributes to default. */
ThreadPoolAttr *attr);
/****************************************************************************
* Function: ThreadPoolAdd
/*!
* \brief Adds a job to the thread pool. Job will be run as soon as possible.
*
* Description:
* Adds a job to the thread pool.
* Job will be run as soon as possible.
* Parameters:
* tp - valid thread pool pointer
* func - ThreadFunction to run
* arg - argument to function.
* priority - priority of job.
* poolid - id of job
* free_function - function to use when freeing argument
* Returns:
* 0 on success, nonzero on failure
* EOUTOFMEM if not enough memory to add job.
*****************************************************************************/
int ThreadPoolAdd (ThreadPool*tp,
* \return
* \li \c 0 on success, nonzero on failure.
* \li \c EOUTOFMEM if not enough memory to add job.
*/
int ThreadPoolAdd(
/*! valid thread pool pointer. */
ThreadPool*tp,
/*! . */
ThreadPoolJob *job,
/*! id of job. */
int *jobId);
/****************************************************************************
* Function: ThreadPoolRemove
/*!
* \brief Removes a job from the thread pool. Can only remove jobs which
* are not currently running.
*
* Description:
* Removes a job from the thread pool.
* Can only remove jobs which are not
* currently running.
* Parameters:
* tp - valid thread pool pointer
* jobid - id of job
* out - space for removed job.
* Returns:
* 0 on success, nonzero on failure.
* INVALID_JOB_ID if job not found.
*****************************************************************************/
int ThreadPoolRemove(ThreadPool *tp,
int jobId, ThreadPoolJob *out);
* \return
* \li \c 0 on success, nonzero on failure.
* \li \c INVALID_JOB_ID if job not found.
*/
int ThreadPoolRemove(
/*! valid thread pool pointer. */
ThreadPool *tp,
/*! id of job. */
int jobId,
/*! space for removed job. */
ThreadPoolJob *out);
/****************************************************************************
* Function: ThreadPoolShutdown
/*!
* \brief Shuts the thread pool down. Waits for all threads to finish.
* May block indefinitely if jobs do not exit.
*
* Description:
* Shuts the thread pool down.
* Waits for all threads to finish.
* May block indefinitely if jobs do not
* exit.
* Parameters:
* tp - must be valid tp
* Returns:
* 0 on success, nonzero on failure
* Always returns 0.
*****************************************************************************/
int ThreadPoolShutdown(ThreadPool *tp);
* \return 0 on success, nonzero on failure
*/
int ThreadPoolShutdown(
/*! must be valid tp. */
ThreadPool *tp);
/****************************************************************************
* Function: TPJobInit
/*!
* \brief Initializes thread pool job. Sets the priority to default defined
* in ThreadPool.h. Sets the free_routine to default defined in ThreadPool.h.
*
* Description:
* Initializes thread pool job.
* Sets the priority to default defined in ThreadPool.h.
* Sets the free_routine to default defined in ThreadPool.h
* Parameters:
* ThreadPoolJob *job - must be valid thread pool attributes.
* start_routine func - function to run, must be valid
* void * arg - argument to pass to function.
* Returns:
* Always returns 0.
*****************************************************************************/
int TPJobInit(ThreadPoolJob *job, start_routine func, void *arg);
* \return Always returns 0.
*/
int TPJobInit(
/*! must be valid thread pool attributes. */
ThreadPoolJob *job,
/*! function to run, must be valid. */
start_routine func,
/*! argument to pass to function. */
void *arg);
/****************************************************************************
* Function: TPJobSetPriority
/*!
* \brief Sets the max threads for the thread pool attributes.
*
* Description:
* Sets the max threads for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* maxThreads - value to set
* Returns:
* Always returns 0.
*****************************************************************************/
int TPJobSetPriority(ThreadPoolJob *job, ThreadPriority priority);
* \return Always returns 0.
*/
int TPJobSetPriority(
/*! must be valid thread pool attributes. */
ThreadPoolJob *job,
/*! value to set. */
ThreadPriority priority);
/****************************************************************************
* Function: TPJobSetFreeFunction
/*!
* \brief Sets the max threads for the thread pool attributes.
*
* Description:
* Sets the max threads for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* maxThreads - value to set
* Returns:
* Always returns 0.
*****************************************************************************/
int TPJobSetFreeFunction(ThreadPoolJob *job, free_routine func);
* \return Always returns 0.
*/
int TPJobSetFreeFunction(
/*! must be valid thread pool attributes. */
ThreadPoolJob *job,
/*! value to set. */
free_routine func);
/****************************************************************************
* Function: TPAttrInit
/*!
* \brief Initializes thread pool attributes. Sets values to defaults defined
* in ThreadPool.h.
*
* Description:
* Initializes thread pool attributes.
* Sets values to defaults defined in ThreadPool.h.
* Parameters:
* attr - must be valid thread pool attributes.
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrInit(ThreadPoolAttr *attr);
* \return Always returns 0.
*/
int TPAttrInit(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr);
/****************************************************************************
* Function: TPAttrSetMaxThreads
/*!
* \brief Sets the max threads for the thread pool attributes.
*
* Description:
* Sets the max threads for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* maxThreads - value to set
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetMaxThreads(ThreadPoolAttr *attr, int maxThreads);
* \return Always returns 0.
*/
int TPAttrSetMaxThreads(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! value to set. */
int maxThreads);
/****************************************************************************
* Function: TPAttrSetMinThreads
/*!
* \brief Sets the min threads for the thread pool attributes.
*
* Description:
* Sets the min threads for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* minThreads - value to set
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetMinThreads(ThreadPoolAttr *attr, int minThreads);
* \return Always returns 0.
*/
int TPAttrSetMinThreads(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! value to set. */
int minThreads);
/****************************************************************************
* Function: TPAttrSetIdleTime
/*!
* \brief Sets the stack size for the thread pool attributes.
*
* Description:
* Sets the idle time for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetIdleTime(ThreadPoolAttr *attr, int idleTime);
* \return Always returns 0.
*/
int TPAttrSetStackSize(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! value to set. */
size_t stackSize);
/****************************************************************************
* Function: TPAttrSetJobsPerThread
/*!
* \brief Sets the idle time for the thread pool attributes.
*
* Description:
* Sets the jobs per thread ratio
* Parameters:
* attr - must be valid thread pool attributes.
* jobsPerThread - number of jobs per thread to maintain
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetJobsPerThread(ThreadPoolAttr *attr, int jobsPerThread);
* \return Always returns 0.
*/
int TPAttrSetIdleTime(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! . */
int idleTime);
/****************************************************************************
* Function: TPAttrSetStarvationTime
/*!
* \brief Sets the jobs per thread ratio
*
* Description:
* Sets the starvation time for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* int starvationTime - milliseconds
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetStarvationTime(ThreadPoolAttr *attr, int starvationTime);
* \return Always returns 0.
*/
int TPAttrSetJobsPerThread(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! number of jobs per thread to maintain. */
int jobsPerThread);
/****************************************************************************
* Function: TPAttrSetSchedPolicy
/*!
* \brief Sets the starvation time for the thread pool attributes.
*
* Description:
* Sets the scheduling policy for the thread pool attributes.
* Parameters:
* attr - must be valid thread pool attributes.
* PolicyType schedPolicy - must be a valid policy type.
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetSchedPolicy(ThreadPoolAttr *attr, PolicyType schedPolicy);
* \return Always returns 0.
*/
int TPAttrSetStarvationTime(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! milliseconds. */
int starvationTime);
/****************************************************************************
* Function: TPAttrSetMaxJobsTotal
/*!
* \brief Sets the scheduling policy for the thread pool attributes.
*
* Description:
* Sets the maximum number jobs that can be qeued totally.
* Parameters:
* attr - must be valid thread pool attributes.
* maxJobsTotal - maximum number of jobs
* Returns:
* Always returns 0.
*****************************************************************************/
int TPAttrSetMaxJobsTotal(ThreadPoolAttr *attr, int maxJobsTotal);
* \return Always returns 0.
*/
int TPAttrSetSchedPolicy(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! must be a valid policy type. */
PolicyType schedPolicy);
/****************************************************************************
* Function: ThreadPoolGetStats
/*!
* \brief Sets the maximum number jobs that can be qeued totally.
*
* \return Always returns 0.
*/
int TPAttrSetMaxJobsTotal(
/*! must be valid thread pool attributes. */
ThreadPoolAttr *attr,
/*! maximum number of jobs. */
int maxJobsTotal);
/*!
* \brief Returns various statistics about the thread pool.
*
* Description:
* Returns various statistics about the
* thread pool.
* Only valid if STATS has been defined.
* Parameters:
* ThreadPool *tp - valid initialized threadpool
* ThreadPoolStats *stats - valid stats, out parameter
* Returns:
* Always returns 0.
*****************************************************************************/
*
* \return Always returns 0.
*/
#ifdef STATS
EXPORT int ThreadPoolGetStats(ThreadPool *tp, ThreadPoolStats *stats);
EXPORT_SPEC int ThreadPoolGetStats(
/*! Valid initialized threadpool. */
ThreadPool *tp,
/*! Valid stats, out parameter. */
ThreadPoolStats *stats);
#else
static UPNP_INLINE int ThreadPoolGetStats(
/*! Valid initialized threadpool. */
ThreadPool *tp,
/*! Valid stats, out parameter. */
ThreadPoolStats *stats) {}
#endif
EXPORT void ThreadPoolPrintStats(ThreadPoolStats *stats);
/*!
* \brief
*/
#ifdef STATS
EXPORT_SPEC void ThreadPoolPrintStats(
/*! . */
ThreadPoolStats *stats);
#else
static UPNP_INLINE void ThreadPoolPrintStats(
/*! . */
ThreadPoolStats *stats) {}
#endif
#ifdef __cplusplus
}
#endif
#endif /* ThreadPool */
#endif /* THREADPOOL_H */

View File

@ -32,9 +32,13 @@
#ifndef TIMERTHREAD_H
#define TIMERTHREAD_H
/*!
* \file
*/
#include "FreeList.h"
#include "ithread.h"
#include "LinkedList.h"
#include "FreeList.h"
#include "ThreadPool.h"
#ifdef __cplusplus
@ -43,24 +47,23 @@ extern "C" {
#define INVALID_EVENT_ID (-10 & 1<<29)
/* Timeout Types */
/* absolute means in seconds from Jan 1, 1970 */
/* relative means in seconds from current time */
typedef enum timeoutType {ABS_SEC,REL_SEC} TimeoutType;
/*! Timeout Types. */
typedef enum timeoutType {
/*! seconds from Jan 1, 1970. */
ABS_SEC,
/*! seconds from current time. */
REL_SEC
} TimeoutType;
/****************************************************************************
* Name: TimerThread
*
* Description:
/*!
* A timer thread similar to the one in the Upnp SDK that allows
* the scheduling of a job to run at a specified time in the future
* the scheduling of a job to run at a specified time in the future.
*
* Because the timer thread uses the thread pool there is no
* gurantee of timing, only approximate timing.
* Uses ThreadPool, Mutex, Condition, Thread
*
*
*****************************************************************************/
* Uses ThreadPool, Mutex, Condition, Thread.
*/
typedef struct TIMERTHREAD
{
ithread_mutex_t mutex;
@ -72,117 +75,83 @@ typedef struct TIMERTHREAD
ThreadPool *tp;
} TimerThread;
/****************************************************************************
* Name: TimerEvent
*
* Description:
*
/*!
* Struct to contain information for a timer event.
* Internal to the TimerThread
*
*****************************************************************************/
* Internal to the TimerThread.
*/
typedef struct TIMEREVENT
{
ThreadPoolJob job;
time_t eventTime; /* absolute time for event in seconds since Jan 1, 1970 */
Duration persistent; /* long term or short term job */
/*! [in] Absolute time for event in seconds since Jan 1, 1970. */
time_t eventTime;
/*! [in] Long term or short term job. */
Duration persistent;
int id;
} TimerEvent;
/************************************************************************
* Function: TimerThreadInit
/*!
* \brief Initializes and starts timer thread.
*
* Description:
* Initializes and starts timer thread.
*
* Parameters:
* timer - valid timer thread pointer.
* tp - valid thread pool to use. Must be
* started. Must be valid for lifetime
* of timer. Timer must be shutdown
* BEFORE thread pool.
* Return:
* 0 on success, nonzero on failure
* Returns error from ThreadPoolAddPersistent on failure.
*
************************************************************************/
int TimerThreadInit(TimerThread *timer,
* \return 0 on success, nonzero on failure. Returns error from
* ThreadPoolAddPersistent on failure.
*/
int TimerThreadInit(
/*! [in] Valid timer thread pointer. */
TimerThread *timer,
/*! [in] Valid thread pool to use. Must be started. Must be valid for
* lifetime of timer. Timer must be shutdown BEFORE thread pool. */
ThreadPool *tp);
/************************************************************************
* Function: TimerThreadSchedule
/*!
* \brief Schedules an event to run at a specified time.
*
* Description:
* Schedules an event to run at a specified time.
*
* Parameters:
* timer - valid timer thread pointer.
* time_t - time of event.
* either in absolute seconds,
* or relative seconds in the future.
* timeoutType - either ABS_SEC, or REL_SEC.
* if REL_SEC, then the event
* will be scheduled at the
* current time + REL_SEC.
* job-> valid Thread pool job with following fields
* func - function to schedule
* arg - argument to function
* priority - priority of job.
*
* id - id of timer event. (out, can be null)
* Return:
* 0 on success, nonzero on failure
* EOUTOFMEM if not enough memory to schedule job.
*
************************************************************************/
int TimerThreadSchedule(TimerThread* timer,
* \return 0 on success, nonzero on failure, EOUTOFMEM if not enough memory
* to schedule job.
*/
int TimerThreadSchedule(
/*! [in] Valid timer thread pointer. */
TimerThread* timer,
/*! [in] time of event. Either in absolute seconds, or relative
* seconds in the future. */
time_t time,
/*! [in] either ABS_SEC, or REL_SEC. If REL_SEC, then the event
* will be scheduled at the current time + REL_SEC. */
TimeoutType type,
/*! [in] Valid Thread pool job with following fields. */
ThreadPoolJob *job,
/*! [in] . */
Duration duration,
/*! [in] Id of timer event. (out, can be null). */
int *id);
/************************************************************************
* Function: TimerThreadRemove
/*!
* \brief Removes an event from the timer Q.
*
* Description:
* Removes an event from the timer Q.
* Events can only be removed
* before they have been placed in the
* thread pool.
* Events can only be removed before they have been placed in the thread pool.
*
* Parameters:
* timer - valid timer thread pointer.
* id - id of event to remove.
* ThreadPoolJob *out - space for thread pool job.
* Return:
* 0 on success,
* INVALID_EVENT_ID on failure
*
************************************************************************/
int TimerThreadRemove(TimerThread *timer,
* \return 0 on success, INVALID_EVENT_ID on failure.
*/
int TimerThreadRemove(
/*! [in] Valid timer thread pointer. */
TimerThread *timer,
/*! [in] Id of event to remove. */
int id,
/*! [in] Space for thread pool job. */
ThreadPoolJob *out);
/************************************************************************
* Function: TimerThreadShutdown
/*!
* \brief Shutdown the timer thread.
*
* Description:
* Shutdown the timer thread
* Events scheduled in the future will NOT be run.
* Timer thread should be shutdown BEFORE it's associated
* thread pool.
* Returns:
* returns 0 if succesfull,
* nonzero otherwise.
* Always returns 0.
***********************************************************************/
int TimerThreadShutdown(TimerThread *timer);
*
* Timer thread should be shutdown BEFORE it's associated thread pool.
*
* \return 0 if succesfull, nonzero otherwise. Always returns 0.
*/
int TimerThreadShutdown(
/*! [in] Valid timer thread pointer. */
TimerThread *timer);
#ifdef __cplusplus
}

View File

@ -1,7 +1,11 @@
#ifndef ITHREAD_H
#define ITHREAD_H
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -29,38 +33,53 @@
*
******************************************************************************/
#ifndef ITHREADH
#define ITHREADH
/*!
* \file
*/
#if !defined(WIN32)
#include <sys/param.h>
#endif
#include "UpnpGlobal.h" /* For UPNP_INLINE, EXPORT_SPEC */
#include "UpnpUniStd.h" /* for close() */
#ifdef __cplusplus
extern "C" {
#endif
#include <pthread.h>
#ifndef WIN32
#include <unistd.h>
#endif
#ifdef __FreeBSD__
#if defined(BSD) && !defined(__GNU__)
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
#endif
#ifdef PTHREAD_MUTEX_RECURSIVE
#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
/* This system has SuS2-compliant mutex attributes.
* E.g. on Cygwin, where we don't have the old nonportable (NP) symbols
*/
#define ITHREAD_MUTEX_FAST_NP PTHREAD_MUTEX_NORMAL
#define ITHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
#define ITHREAD_MUTEX_ERRORCHECK_NP PTHREAD_MUTEX_ERRORCHECK
#else
#else /* PTHREAD_MUTEX_RECURSIVE */
#define ITHREAD_MUTEX_FAST_NP PTHREAD_MUTEX_FAST_NP
#define ITHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE_NP
#define ITHREAD_MUTEX_ERRORCHECK_NP PTHREAD_MUTEX_ERRORCHECK_NP
#endif
#endif /* PTHREAD_MUTEX_RECURSIVE */
#define ITHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
#define ITHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
#define ITHREAD_CANCELED PTHREAD_CANCELED
#define ITHREAD_STACK_MIN PTHREAD_STACK_MIN
#define ITHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
#define ITHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
/***************************************************************************
* Name: ithread_t
*
@ -71,6 +90,7 @@ extern "C" {
***************************************************************************/
typedef pthread_t ithread_t;
/****************************************************************************
* Name: ithread_attr_t
*
@ -136,6 +156,116 @@ extern "C" {
***************************************************************************/
typedef pthread_condattr_t ithread_condattr_t;
/****************************************************************************
* Name: ithread_rwlockattr_t
*
* Description:
* Mutex attribute.
* typedef to pthread_rwlockattr_t
* Internal Use Only
***************************************************************************/
#if UPNP_USE_RWLOCK
typedef pthread_rwlockattr_t ithread_rwlockattr_t;
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Name: ithread_rwlock_t
*
* Description:
* Condition attribute.
* typedef to pthread_rwlock_t
* Internal Use Only
***************************************************************************/
#if UPNP_USE_RWLOCK
typedef pthread_rwlock_t ithread_rwlock_t;
#else
/* Read-write locks aren't available: use mutex instead. */
typedef ithread_mutex_t ithread_rwlock_t;
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_initialize_library
*
* Description:
* Initializes the library. Does nothing in all implementations, except
* when statically linked for WIN32.
* Parameters:
* none.
* Returns:
* 0 on success, Nonzero on failure.
***************************************************************************/
static UPNP_INLINE int ithread_initialize_library(void) {
int ret = 0;
return ret;
}
/****************************************************************************
* Function: ithread_cleanup_library
*
* Description:
* Clean up library resources. Does nothing in all implementations, except
* when statically linked for WIN32.
* Parameters:
* none.
* Returns:
* 0 on success, Nonzero on failure.
***************************************************************************/
static UPNP_INLINE int ithread_cleanup_library(void) {
int ret = 0;
return ret;
}
/****************************************************************************
* Function: ithread_initialize_thread
*
* Description:
* Initializes the thread. Does nothing in all implementations, except
* when statically linked for WIN32.
* Parameters:
* none.
* Returns:
* 0 on success, Nonzero on failure.
***************************************************************************/
static UPNP_INLINE int ithread_initialize_thread(void) {
int ret = 0;
#if defined(WIN32) && defined(PTW32_STATIC_LIB)
ret = !pthread_win32_thread_attach_np();
#endif
return ret;
}
/****************************************************************************
* Function: ithread_cleanup_thread
*
* Description:
* Clean up thread resources. Does nothing in all implementations, except
* when statically linked for WIN32.
* Parameters:
* none.
* Returns:
* 0 on success, Nonzero on failure.
***************************************************************************/
static UPNP_INLINE int ithread_cleanup_thread(void) {
int ret = 0;
#if defined(WIN32) && defined(PTW32_STATIC_LIB)
ret = !pthread_win32_thread_detach_np();
#endif
return ret;
}
/****************************************************************************
* Function: ithread_mutexattr_init
*
@ -150,9 +280,9 @@ extern "C" {
* Always returns 0.
* See man page for pthread_mutexattr_init
***************************************************************************/
#define ithread_mutexattr_init pthread_mutexattr_init
/****************************************************************************
* Function: ithread_mutexattr_destroy
*
@ -180,7 +310,7 @@ extern "C" {
* ITHREAD_MUTEX_ERRORCHECK_NP
*
* Parameters:
* ithread_mutexattr_t * mutex (must be valid non NULL pointer to
* ithread_mutexattr_t * attr (must be valid non NULL pointer to
* ithread_mutexattr_t)
* int kind (one of ITHREAD_MUTEX_FAST_NP or ITHREAD_MUTEX_RECURSIVE_NP
* or ITHREAD_MUTEX_ERRORCHECK_NP)
@ -189,11 +319,11 @@ extern "C" {
* Returns EINVAL if the kind is not supported.
* See man page for pthread_mutexattr_setkind_np
*****************************************************************************/
#ifdef PTHREAD_MUTEX_RECURSIVE
#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
#define ithread_mutexattr_setkind_np pthread_mutexattr_settype
#else
#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np
#endif
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_mutexattr_getkind_np
@ -205,7 +335,7 @@ extern "C" {
* ITHREAD_MUTEX_ERRORCHECK_NP
*
* Parameters:
* ithread_mutexattr_t * mutex (must be valid non NULL pointer to
* ithread_mutexattr_t * attr (must be valid non NULL pointer to
* pthread_mutexattr_t)
* int *kind (one of ITHREAD_MUTEX_FAST_NP or ITHREAD_MUTEX_RECURSIVE_NP
* or ITHREAD_MUTEX_ERRORCHECK_NP)
@ -214,11 +344,11 @@ extern "C" {
* Always returns 0.
* See man page for pthread_mutexattr_getkind_np
*****************************************************************************/
#ifdef PTHREAD_MUTEX_RECURSIVE
#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
#define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
#else
#define ithread_mutexattr_getkind_np pthread_mutexattr_getkind_np
#endif
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
@ -238,6 +368,7 @@ extern "C" {
*****************************************************************************/
#define ithread_mutex_init pthread_mutex_init
/****************************************************************************
* Function: ithread_mutex_lock
*
@ -292,6 +423,200 @@ extern "C" {
#define ithread_mutex_destroy pthread_mutex_destroy
/****************************************************************************
* Function: ithread_rwlockattr_init
*
* Description:
* Initializes a rwlock attribute variable to default values.
* Parameters:
* const ithread_rwlockattr_init *attr (must be valid non NULL pointer to
* pthread_rwlockattr_t)
* Returns:
* 0 on success, Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlockattr_init
***************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlockattr_init pthread_rwlockattr_init
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlockattr_destroy
*
* Description:
* Releases any resources held by the rwlock attribute.
* Parameters:
* ithread_rwlockattr_t *attr (must be valid non NULL pointer to
* pthread_rwlockattr_t)
* Returns:
* 0 on success, Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlockattr_destroy
***************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlockattr_destroy pthread_rwlockattr_destroy
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlockatttr_setpshared
*
* Description:
* Sets the rwlock type in the attribute.
* Valid types are: ITHREAD_PROCESS_PRIVATE
* ITHREAD_PROCESS_SHARED
*
* Parameters:
* ithread_rwlockattr_t * attr (must be valid non NULL pointer to
* ithread_rwlockattr_t)
* int kind (one of ITHREAD_PROCESS_PRIVATE or ITHREAD_PROCESS_SHARED)
*
* Returns:
* 0 on success. Nonzero on failure.
* Returns EINVAL if the kind is not supported.
* See man page for pthread_rwlockattr_setkind_np
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlockatttr_setpshared pthread_rwlockatttr_setpshared
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlockatttr_getpshared
*
* Description:
* Gets the rwlock type in the attribute.
* Valid types are: ITHREAD_PROCESS_PRIVATE
* ITHREAD_PROCESS_SHARED
*
* Parameters:
* ithread_rwlockattr_t * attr (must be valid non NULL pointer to
* pthread_rwlockattr_t)
* int *kind (one of ITHREAD_PROCESS_PRIVATE or ITHREAD_PROCESS_SHARED)
*
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlockatttr_getpshared
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlockatttr_getpshared pthread_rwlockatttr_getpshared
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlock_init
*
* Description:
* Initializes rwlock.
* Must be called before use.
*
* Parameters:
* ithread_rwlock_t *rwlock (must be valid non NULL pointer to pthread_rwlock_t)
* const ithread_rwlockattr_t *rwlock_attr
* Returns:
* 0 on success, Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlock_init
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlock_init pthread_rwlock_init
#else
/* Read-write locks aren't available: use mutex instead. */
#define ithread_rwlock_init ithread_mutex_init
#endif
/****************************************************************************
* Function: ithread_rwlock_rdlock
*
* Description:
* Locks rwlock for reading.
* Parameters:
* ithread_rwlock_t *rwlock (must be valid non NULL pointer to pthread_rwlock_t)
* rwlock must be initialized.
*
* Returns:
* 0 on success, Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlock_rdlock
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlock_rdlock pthread_rwlock_rdlock
#else
/* Read-write locks aren't available: use mutex instead. */
#define ithread_rwlock_rdlock ithread_mutex_lock
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlock_wrlock
*
* Description:
* Locks rwlock for writting.
* Parameters:
* ithread_rwlock_t *rwlock (must be valid non NULL pointer to pthread_rwlock_t)
* rwlock must be initialized.
*
* Returns:
* 0 on success, Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlock_wrlock
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlock_wrlock pthread_rwlock_wrlock
#else
/* Read-write locks aren't available: use mutex instead. */
#define ithread_rwlock_wrlock ithread_mutex_lock
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlock_unlock
*
* Description:
* Unlocks rwlock.
*
* Parameters:
* ithread_rwlock_t *rwlock (must be valid non NULL pointer to pthread_rwlock_t)
* rwlock must be initialized.
*
* Returns:
* 0 on success, Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlock_unlock
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlock_unlock pthread_rwlock_unlock
#else
/* Read-write locks aren't available: use mutex instead. */
#define ithread_rwlock_unlock ithread_mutex_unlock
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_rwlock_destroy
*
* Description:
* Releases any resources held by the rwlock.
* rwlock can no longer be used after this call.
* rwlock is only destroyed when there are no longer any threads waiting on it.
* rwlock cannot be destroyed if it is locked.
* Parameters:
* ithread_rwlock_t *rwlock (must be valid non NULL pointer to pthread_rwlock_t)
* rwlock must be initialized.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
* See man page for pthread_rwlock_destroy
*****************************************************************************/
#if UPNP_USE_RWLOCK
#define ithread_rwlock_destroy pthread_rwlock_destroy
#else
/* Read-write locks aren't available: use mutex instead. */
#define ithread_rwlock_destroy ithread_mutex_destroy
#endif /* UPNP_USE_RWLOCK */
/****************************************************************************
* Function: ithread_cond_init
*
@ -308,7 +633,6 @@ extern "C" {
#define ithread_cond_init pthread_cond_init
/****************************************************************************
* Function: ithread_cond_signal
*
@ -368,22 +692,18 @@ extern "C" {
* Function: pthread_cond_timedwait
*
* Description:
* Atomically releases the associated mutex and waits on the condition.
* If the condition is not signaled in the specified time
* than the
* Atomically releases the associated mutex and waits on the
* condition.
* If the condition is not signaled in the specified time than the
* call times out and returns.
* Associated mutex MUST be locked by thread before entering
* this call.
* Associated mutex MUST be locked by thread before entering this call.
* Mutex is reacquired when call returns.
* Parameters:
* ithread_cond_t * cond (must be valid non NULL pointer to
* ithread_cond_t)
* ithread_cond_t *cond (must be valid non NULL pointer to ithread_cond_t)
* cond must be initialized
* ithread_mutex_t *mutex (must be valid non NULL pointer to
* ithread_mutex_t)
* ithread_mutex_t *mutex (must be valid non NULL pointer to ithread_mutex_t)
* Mutex must be locked.
* const struct timespec *abstime (absolute time, measured
* from Jan 1, 1970)
* const struct timespec *abstime (absolute time, measured from Jan 1, 1970)
* Returns:
* 0 on success. ETIMEDOUT on timeout. Nonzero on failure.
* See man page for pthread_cond_timedwait
@ -408,6 +728,65 @@ extern "C" {
***************************************************************************/
#define ithread_cond_destroy pthread_cond_destroy
/****************************************************************************
* Function: ithread_attr_init
*
* Description:
* Initialises thread attribute object.
* Parameters:
* ithread_attr_t *attr (must be valid non NULL pointer to
* ithread_attr_t)
* Returns:
* 0 on success. Nonzero on failure.
* See man page for pthread_attr_init
***************************************************************************/
#define ithread_attr_init pthread_attr_init
/****************************************************************************
* Function: ithread_attr_destroy
*
* Description:
* Destroys thread attribute object.
* Parameters:
* ithread_attr_t *attr (must be valid non NULL pointer to
* ithread_attr_t)
* Returns:
* 0 on success. Nonzero on failure.
* See man page for pthread_attr_destroy
***************************************************************************/
#define ithread_attr_destroy pthread_attr_destroy
/****************************************************************************
* Function: ithread_attr_setstacksize
*
* Description:
* Sets stack size of a thread attribute object.
* Parameters:
* ithread_attr_t *attr (must be valid non NULL pointer to
* ithread_attr_t)
* size_t stacksize (value of stacksize must be greater than
* ITHREAD_STACK_MIN and lower than system-imposed limits
* Returns:
* 0 on success. Nonzero on failure.
* See man page for pthread_attr_setstacksize
***************************************************************************/
#define ithread_attr_setstacksize pthread_attr_setstacksize
/****************************************************************************
* Function: ithread_attr_setdetachstate
*
* Description:
* Sets detach state of a thread attribute object.
* Parameters:
* ithread_attr_t *attr (must be valid non NULL pointer to
* ithread_attr_t)
* int detachstate (value of detachstate must be ITHREAD_CREATE_DETACHED
* or ITHREAD_CREATE_JOINABLE)
* Returns:
* 0 on success. Nonzero on failure.
* See man page for pthread_attr_setdetachstate
***************************************************************************/
#define ithread_attr_setdetachstate pthread_attr_setdetachstate
/****************************************************************************
* Function: ithread_create
@ -417,7 +796,7 @@ extern "C" {
* and argument.
* Parameters:
* ithread_t * thread (must be valid non NULL pointer to pthread_t)
* ithread_attr_t *attr, IGNORED
* ithread_attr_t *attr
* void * (start_routine) (void *arg) (start routine)
* void * arg - argument.
* Returns:
@ -455,6 +834,7 @@ extern "C" {
***************************************************************************/
#define ithread_exit pthread_exit
/****************************************************************************
* Function: ithread_get_current_thread_id
*
@ -478,6 +858,7 @@ extern "C" {
***************************************************************************/
#define ithread_self pthread_self
/****************************************************************************
* Function: ithread_detach
*
@ -491,6 +872,7 @@ extern "C" {
***************************************************************************/
#define ithread_detach pthread_detach
/****************************************************************************
* Function: ithread_join
*
@ -510,7 +892,6 @@ extern "C" {
#define ithread_join pthread_join
/****************************************************************************
* Function: isleep
*
@ -524,7 +905,12 @@ extern "C" {
* 0 on success, Nonzero on failure.
* See man page for sleep (man 3 sleep)
*****************************************************************************/
#ifdef WIN32
#define isleep(x) Sleep((x)*1000)
#else
#define isleep sleep
#endif
/****************************************************************************
* Function: isleep
@ -539,32 +925,24 @@ extern "C" {
* 0 on success, Nonzero on failure.
* See man page for sleep (man 3 sleep)
*****************************************************************************/
#define imillisleep(x) usleep(1000*x)
#ifdef WIN32
#ifndef UPNP_STATIC_LIB
#ifdef LIBUPNP_EXPORTS
/* set up declspec for dll export to make functions visible to library users */
#define EXPORT_SPEC __declspec(dllexport)
#define imillisleep Sleep
#else
#define EXPORT_SPEC __declspec(dllimport)
#endif
#else
#define EXPORT_SPEC
#endif
#else
#define EXPORT_SPEC
#define imillisleep(x) usleep(1000*x)
#endif
#ifndef PTHREAD_MUTEX_RECURSIVE
#if !defined(PTHREAD_MUTEX_RECURSIVE) && !defined(__DragonFly__) && !defined(UPNP_USE_MSVCPP)
/* !defined(UPNP_USE_MSVCPP) should probably also have pthreads version check - but it's not clear if that is possible */
/* NK: Added for satisfying the gcc compiler */
EXPORT_SPEC int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind);
#endif
#ifdef __cplusplus
}
#endif
#endif /* ITHREADH */
#endif /* ITHREAD_H */

View File

@ -1,85 +1,54 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
#include "FreeList.h"
#include <assert.h>
#include <stdlib.h>
/****************************************************************************
* Function: FreeListInit
*
* Description:
* Initializes Free List. Must be called first.
* And only once for FreeList.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* size_t - size of elements to store in free list
* maxFreeListSize - max size that the free list can grow to
* before returning memory to O.S.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
*****************************************************************************/
int
FreeListInit( FreeList * free_list,
size_t elementSize,
int maxFreeListLength )
int FreeListInit(FreeList *free_list, size_t elementSize, int maxFreeListLength)
{
assert(free_list != NULL);
if (free_list == NULL)
return EINVAL;
free_list->element_size = elementSize;
free_list->maxFreeListLength = maxFreeListLength;
free_list->head = NULL;
free_list->freeListLength = 0;
return 0;
}
/****************************************************************************
* Function: FreeListAlloc
*
* Description:
* Allocates chunk of set size.
* If a free item is available in the list, returnes the stored item.
* Otherwise calls the O.S. to allocate memory.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* Returns:
* Non NULL on success. NULL on failure.
*****************************************************************************/
void *
FreeListAlloc( FreeList * free_list )
void *FreeListAlloc(FreeList *free_list)
{
FreeListNode *ret = NULL;
@ -99,79 +68,44 @@ FreeListAlloc( FreeList * free_list )
return ret;
}
/****************************************************************************
* Function: FreeListFree
*
* Description:
* Returns an item to the Free List.
* If the free list is smaller than the max size than
* adds the item to the free list.
* Otherwise returns the item to the O.S.
* Parameters:
* free_list - must be valid, non null, pointer to a free list.
* element - must be a pointer allocated by FreeListAlloc
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
*****************************************************************************/
int
FreeListFree( FreeList * free_list,
void *element )
int FreeListFree(FreeList *free_list, void *element)
{
FreeListNode *temp = NULL;
assert(free_list != NULL);
if (free_list == NULL)
return EINVAL;
if( ( element != NULL ) &&
( ( free_list->freeListLength + 1 ) <
free_list->maxFreeListLength ) ) {
if (element != NULL &&
free_list->freeListLength + 1 < free_list->maxFreeListLength) {
free_list->freeListLength++;
temp = (FreeListNode *)element;
temp->next = free_list->head;
free_list->head = temp;
} else {
free(element);
}
return 0;
}
/****************************************************************************
* Function: FreeListDestroy
*
* Description:
* Releases the resources stored with the free list.
* Parameters:
* free_list - must be valid, non null, pointer to a linked list.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
*****************************************************************************/
int
FreeListDestroy( FreeList * free_list )
int FreeListDestroy(FreeList *free_list)
{
FreeListNode *temp = NULL;
int i = 0;
assert(free_list != NULL);
if( free_list == NULL )
if (!free_list)
return EINVAL;
while (free_list->head) {
i++;
temp = free_list->head->next;
free(free_list->head);
free_list->head = temp;
}
free_list->freeListLength = 0;
return 0;
}

View File

@ -1,68 +1,72 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
#include "LinkedList.h"
#ifdef WIN32
/* Do not #include <sys/param.h> */
#else
#include <sys/param.h>
#if (defined(BSD) && BSD >= 199306)
#endif
#if (defined(BSD) && BSD >= 199306) || defined(__OSX__) || defined(__APPLE__)
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <assert.h>
static int
freeListNode( ListNode * node,
LinkedList * list )
static int freeListNode(ListNode *node, LinkedList *list)
{
assert(list != NULL);
return FreeListFree(&list->freeNodeList, node);
}
/****************************************************************************
* Function: CreateListNode
*
* Description:
* Creates a list node. Dynamically.
/*!
* \brief Dynamically creates a list node.
*
* Parameters:
* void * item - the item to store
* Returns:
* The new node, NULL on failure.
*****************************************************************************/
static ListNode *
CreateListNode( void *item,
*/
static ListNode *CreateListNode(
/*! the item to store. */
void *item,
/*! The list to add it to. */
LinkedList *list)
{
ListNode *temp = NULL;
assert(list != NULL);
@ -73,73 +77,36 @@ CreateListNode( void *item,
temp->next = NULL;
temp->item = item;
}
return temp;
}
/****************************************************************************
* Function: ListInit
*
* Description:
* Initializes LinkedList. Must be called first.
* And only once for List.
* Parameters:
* list - must be valid, non null, pointer to a linked list.
* cmp_func - function used to compare items. (May be NULL)
* free_func - function used to free items. (May be NULL)
* Returns:
* 0 on success, EOUTOFMEM on failure.
*****************************************************************************/
int
ListInit( LinkedList * list,
cmp_routine cmp_func,
free_function free_func )
int ListInit(LinkedList *list, cmp_routine cmp_func, free_function free_func)
{
int retCode = 0;
assert(list != NULL);
if( list == NULL )
if (!list)
return EINVAL;
list->size = 0;
list->cmp_func = cmp_func;
list->free_func = free_func;
retCode =
FreeListInit( &list->freeNodeList, sizeof( ListNode ),
FREELISTSIZE );
retCode = FreeListInit(&list->freeNodeList, sizeof(ListNode), FREELISTSIZE);
assert(retCode == 0);
list->head.item = NULL;
list->head.next = &list->tail;
list->head.prev = NULL;
list->tail.item = NULL;
list->tail.prev = &list->head;
list->tail.next = NULL;
return 0;
return retCode;
}
/****************************************************************************
* Function: ListAddHead
*
* Description:
* Adds a node to the head of the list.
* Node gets immediately after list.head.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* void * item - item to be added
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListAddHead( LinkedList * list,
void *item )
ListNode *ListAddHead(LinkedList *list, void *item)
{
assert(list != NULL);
@ -149,59 +116,24 @@ ListAddHead( LinkedList * list,
return ListAddAfter(list, item, &list->head);
}
/****************************************************************************
* Function: ListAddTail
*
* Description:
* Adds a node to the tail of the list.
* Node gets added immediately before list.tail.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* void * item - item to be added
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListAddTail( LinkedList * list,
void *item )
ListNode *ListAddTail(LinkedList *list, void *item)
{
assert(list != NULL);
if( list == NULL )
if (!list)
return NULL;
return ListAddBefore(list, item, &list->tail);
}
/****************************************************************************
* Function: ListAddAfter
*
* Description:
* Adds a node after the specified node.
* Node gets added immediately after bnode.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* void * item - item to be added
* ListNode * bnode - node to add after
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListAddAfter( LinkedList * list,
void *item,
ListNode * bnode )
ListNode *ListAddAfter(LinkedList *list, void *item, ListNode *bnode)
{
ListNode *newNode = NULL;
assert(list != NULL);
if( ( list == NULL ) || ( bnode == NULL ) )
if (!list || !bnode)
return NULL;
newNode = CreateListNode(item, list);
if (newNode) {
ListNode *temp = bnode->next;
@ -211,40 +143,22 @@ ListAddAfter( LinkedList * list,
newNode->next = temp;
temp->prev = newNode;
list->size++;
return newNode;
}
return NULL;
}
/****************************************************************************
* Function: ListAddBefore
*
* Description:
* Adds a node before the specified node.
* Node gets added immediately before anode.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* ListNode * anode - node to add the in front of.
* void * item - item to be added
* Returns:
* The pointer to the ListNode on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListAddBefore( LinkedList * list,
void *item,
ListNode * anode )
ListNode *ListAddBefore(LinkedList *list, void *item, ListNode *anode)
{
ListNode *newNode = NULL;
assert(list != NULL);
if( ( list == NULL ) || ( anode == NULL ) )
if (!list || !anode)
return NULL;
newNode = CreateListNode(item, list);
if (newNode) {
ListNode *temp = anode->prev;
@ -253,30 +167,14 @@ ListAddBefore( LinkedList * list,
newNode->prev = temp;
temp->next = newNode;
list->size++;
return newNode;
}
return NULL;
}
/****************************************************************************
* Function: ListDelNode
*
* Description:
* Removes a node from the list
* The memory for the node is freed but the
* the memory for the items are not.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* ListNode *dnode - done to delete.
* Returns:
* The pointer to the item stored in node on success, NULL on failure.
* Precondition:
* The list has been initialized.
*****************************************************************************/
void *
ListDelNode( LinkedList * list,
ListNode * dnode,
int freeItem )
void *ListDelNode(LinkedList *list, ListNode *dnode, int freeItem)
{
void *temp;
@ -284,19 +182,13 @@ ListDelNode( LinkedList * list,
assert(dnode != &list->head);
assert(dnode != &list->tail);
if( ( list == NULL ) ||
( dnode == &list->head ) ||
( dnode == &list->tail ) || ( dnode == NULL ) ) {
if (!list || dnode == &list->head || dnode == &list->tail || !dnode)
return NULL;
}
temp = dnode->item;
dnode->prev->next = dnode->next;
dnode->next->prev = dnode->prev;
freeListNode(dnode, list);
list->size--;
if (freeItem && list->free_func) {
list->free_func(temp);
temp = NULL;
@ -305,29 +197,12 @@ ListDelNode( LinkedList * list,
return temp;
}
/****************************************************************************
* Function: ListDestroy
*
* Description:
* Removes all memory associated with list nodes.
* Does not free LinkedList *list.
* Items stored in the list are not freed, only nodes are.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* Returns:
* 0 on success. Nonzero on failure.
* Always returns 0.
* Precondition:
* The list has been initialized.
*****************************************************************************/
int
ListDestroy( LinkedList * list,
int freeItem )
int ListDestroy(LinkedList *list, int freeItem)
{
ListNode *dnode = NULL;
ListNode *temp = NULL;
if( list == NULL )
if(!list)
return EINVAL;
for (dnode = list->head.next; dnode != &list->tail; ) {
@ -335,120 +210,57 @@ ListDestroy( LinkedList * list,
ListDelNode(list, dnode, freeItem);
dnode = temp;
}
list->size = 0;
FreeListDestroy(&list->freeNodeList);
return 0;
}
/****************************************************************************
* Function: ListHead
*
* Description:
* Returns the head of the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The head of the list. NULL if list is empty.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListHead( LinkedList * list )
ListNode *ListHead(LinkedList *list)
{
assert(list != NULL);
if( list == NULL )
if (!list)
return NULL;
if( list->size == 0 )
if (!list->size)
return NULL;
else
return list->head.next;
}
/****************************************************************************
* Function: ListTail
*
* Description:
* Returns the tail of the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The tail of the list. NULL if list is empty.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListTail( LinkedList * list )
ListNode *ListTail(LinkedList *list)
{
assert(list != NULL);
if( list == NULL )
if (!list)
return NULL;
if( list->size == 0 )
if (!list->size)
return NULL;
else
return list->tail.prev;
}
/****************************************************************************
* Function: ListNext
*
* Description:
* Returns the next item in the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The next item in the list. NULL if there are no more items in list.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListNext( LinkedList * list,
ListNode * node )
ListNode *ListNext(LinkedList *list, ListNode *node)
{
assert(list != NULL);
assert(node != NULL);
if( ( list == NULL ) || ( node == NULL ) )
if (!list || !node)
return NULL;
if (node->next == &list->tail)
return NULL;
else
return node->next;
}
/****************************************************************************
* Function: ListPrev
*
* Description:
* Returns the previous item in the list.
*
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
*
* Returns:
* The previous item in the list. NULL if there are no more items in list.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListPrev( LinkedList * list,
ListNode * node )
ListNode *ListPrev(LinkedList *list, ListNode *node)
{
assert(list != NULL);
assert(node != NULL);
if( ( list == NULL ) || ( node == NULL ) )
if (!list || !node)
return NULL;
if (node->prev == &list->head)
@ -457,35 +269,13 @@ ListPrev( LinkedList * list,
return node->prev;
}
/****************************************************************************
* Function: ListFind
*
* Description:
* Finds the specified item in the list.
* Uses the compare function specified in ListInit. If compare function
* is NULL then compares items as pointers.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* ListNode *start - the node to start from, NULL if to start from
* beginning.
* void * item - the item to search for.
* Returns:
* The node containing the item. NULL if no node contains the item.
* Precondition:
* The list has been initialized.
*****************************************************************************/
ListNode *
ListFind( LinkedList * list,
ListNode * start,
void *item )
ListNode *ListFind(LinkedList *list, ListNode *start, void *item)
{
ListNode *finger = NULL;
if( list == NULL )
if (!list)
return NULL;
if( start == NULL )
if (!start)
start = &list->head;
assert(start);
@ -506,29 +296,15 @@ ListFind( LinkedList * list,
}
return NULL;
}
/****************************************************************************
* Function: ListSize
*
* Description:
* Returns the size of the list.
* Parameters:
* LinkedList *list - must be valid, non null, pointer to a linked list.
* Returns:
* The number of items in the list.
* Precondition:
* The list has been initialized.
*****************************************************************************/
int
ListSize( LinkedList * list )
long ListSize(LinkedList *list)
{
assert(list != NULL);
if( list == NULL )
if (!list)
return EINVAL;
return list->size;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,202 +1,172 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
/*!
* \file
*/
#include "TimerThread.h"
#include <assert.h>
/****************************************************************************
* Function: FreeTimerEvent
*
* Description:
* Deallocates a dynamically allocated TimerEvent.
* Parameters:
* TimerEvent *event - must be allocated with CreateTimerEvent
*****************************************************************************/
static void
FreeTimerEvent( TimerThread * timer,
/*!
* \brief Deallocates a dynamically allocated TimerEvent.
*/
static void FreeTimerEvent(
/*! [in] Valid timer thread pointer. */
TimerThread *timer,
/*! [in] Must be allocated with CreateTimerEvent*/
TimerEvent *event)
{
assert(timer != NULL);
FreeListFree(&timer->freeEvents, event);
}
/****************************************************************************
* Function: TimerThreadWorker
/*!
* \brief Implements timer thread.
*
* Description:
* Implements timer thread.
* Waits for next event to occur and schedules
* associated job into threadpool.
* Internal Only.
* Parameters:
* void * arg -> is cast to TimerThread *
*****************************************************************************/
static void *
TimerThreadWorker( void *arg )
* Waits for next event to occur and schedules associated job into threadpool.
*/
static void *TimerThreadWorker(
/*! [in] arg is cast to (TimerThread *). */
void *arg)
{
TimerThread *timer = ( TimerThread * ) arg;
ListNode *head = NULL;
TimerEvent *nextEvent = NULL;
time_t currentTime = 0;
time_t nextEventTime = 0;
struct timespec timeToWait;
int tempId;
assert( timer != NULL );
ithread_mutex_lock( &timer->mutex );
while( 1 )
{
//mutex should always be locked at top of loop
//Check for shutdown
if( timer->shutdown )
{
while (1) {
/* mutex should always be locked at top of loop */
/* Check for shutdown. */
if (timer->shutdown) {
timer->shutdown = 0;
ithread_cond_signal( &timer->condition );
ithread_mutex_unlock( &timer->mutex );
return NULL;
}
nextEvent = NULL;
//Get the next event if possible
if( timer->eventQ.size > 0 )
{
/* Get the next event if possible. */
if (timer->eventQ.size > 0) {
head = ListHead( &timer->eventQ );
if (head == NULL) {
ithread_mutex_unlock( &timer->mutex );
return NULL;
}
nextEvent = ( TimerEvent * ) head->item;
nextEventTime = nextEvent->eventTime;
}
currentTime = time(NULL);
//If time has elapsed, schedule job
if( ( nextEvent != NULL ) && ( currentTime >= nextEventTime ) )
{
/* If time has elapsed, schedule job. */
if (nextEvent && currentTime >= nextEventTime) {
if( nextEvent->persistent ) {
ThreadPoolAddPersistent( timer->tp, &nextEvent->job,
&tempId );
} else {
ThreadPoolAdd( timer->tp, &nextEvent->job, &tempId );
if (ThreadPoolAddPersistent( timer->tp, &nextEvent->job, &tempId ) != 0) {
if (nextEvent->job.arg != NULL && nextEvent->job.free_func != NULL) {
nextEvent->job.free_func(nextEvent->job.arg);
}
}
} else {
if (ThreadPoolAdd( timer->tp, &nextEvent->job, &tempId ) != 0) {
if (nextEvent->job.arg != NULL && nextEvent->job.free_func != NULL) {
nextEvent->job.free_func(nextEvent->job.arg);
}
}
}
ListDelNode( &timer->eventQ, head, 0 );
FreeTimerEvent( timer, nextEvent );
continue;
}
if( nextEvent != NULL ) {
if (nextEvent) {
timeToWait.tv_nsec = 0;
timeToWait.tv_sec = nextEvent->eventTime;
timeToWait.tv_sec = (long)nextEvent->eventTime;
ithread_cond_timedwait( &timer->condition, &timer->mutex,
&timeToWait );
} else {
ithread_cond_wait( &timer->condition, &timer->mutex );
}
}
}
/****************************************************************************
* Function: CalculateEventTime
/*!
* \brief Calculates the appropriate timeout in absolute seconds
* since Jan 1, 1970.
*
* Description:
* Calculates the appropriate timeout in absolute seconds since
* Jan 1, 1970
* Internal Only.
* Parameters:
* time_t *timeout - timeout
*
*****************************************************************************/
static int
CalculateEventTime( time_t * timeout,
* \return
*/
static int CalculateEventTime(
/*! [in] Timeout. */
time_t *timeout,
/*! [in] Timeout type. */
TimeoutType type)
{
time_t now;
assert( timeout != NULL );
if( type == ABS_SEC )
switch (type) {
case ABS_SEC:
return 0;
else if( type == REL_SEC ) {
default: /* REL_SEC) */
time(&now);
( *timeout ) += now;
return 0;
}
return -1;
}
/****************************************************************************
* Function: CreateTimerEvent
/*!
* \brief Creates a Timer Event. (Dynamically allocated).
*
* Description:
* Creates a Timer Event. (Dynamically allocated)
* Internal to timer thread.
* Parameters:
* func - thread function to run.
* arg - argument to function.
* priority - priority of job.
* eventTime - the absoule time of the event
* in seconds from Jan, 1970
* id - id of job
*
* Returns:
* TimerEvent * on success, NULL on failure.
****************************************************************************/
static TimerEvent *
CreateTimerEvent( TimerThread * timer,
* \return (TimerEvent *) on success, NULL on failure.
*/
static TimerEvent *CreateTimerEvent(
/*! [in] Valid timer thread pointer. */
TimerThread *timer,
/*! [in] . */
ThreadPoolJob *job,
/*! [in] . */
Duration persistent,
/*! [in] The absoule time of the event in seconds from Jan, 1970. */
time_t eventTime,
/*! [in] Id of job. */
int id)
{
TimerEvent *temp = NULL;
@ -215,25 +185,8 @@ CreateTimerEvent( TimerThread * timer,
return temp;
}
/************************************************************************
* Function: TimerThreadInit
*
* Description:
* Initializes and starts timer thread.
*
* Parameters:
* timer - valid timer thread pointer.
* tp - valid thread pool to use. Must be
* started. Must be valid for lifetime
* of timer. Timer must be shutdown
* BEFORE thread pool.
* Return:
* 0 on success, nonzero on failure
* Returns error from ThreadPoolAddPersistent if failure.
************************************************************************/
int
TimerThreadInit( TimerThread * timer,
ThreadPool * tp )
int TimerThreadInit(TimerThread *timer, ThreadPool *tp)
{
int rc = 0;
@ -287,42 +240,16 @@ TimerThreadInit( TimerThread * timer,
}
return rc;
}
/************************************************************************
* Function: TimerThreadSchedule
*
* Description:
* Schedules an event to run at a specified time.
*
* Parameters:
* timer - valid timer thread pointer.
* time_t - time of event.
* either in absolute seconds,
* or relative seconds in the future.
* timeoutType - either ABS_SEC, or REL_SEC.
* if REL_SEC, then the event
* will be scheduled at the
* current time + REL_SEC.
*
* func - function to schedule
* arg - argument to function
* priority - priority of job.
* id - id of timer event. (out)
* Return:
* 0 on success, nonzero on failure
* EOUTOFMEM if not enough memory to schedule job
************************************************************************/
int
TimerThreadSchedule( TimerThread * timer,
int TimerThreadSchedule(
TimerThread *timer,
time_t timeout,
TimeoutType type,
ThreadPoolJob *job,
Duration duration,
int *id)
{
int rc = EOUTOFMEM;
int found = 0;
int tempId = 0;
@ -355,35 +282,25 @@ TimerThreadSchedule( TimerThread * timer,
}
tempNode = ListHead( &timer->eventQ );
//add job to Q
//Q is ordered by eventTime
//with the head of the Q being the next event
/* add job to Q. Q is ordered by eventTime with the head of the Q being
* the next event. */
while( tempNode != NULL ) {
temp = ( TimerEvent * ) tempNode->item;
if( temp->eventTime >= timeout )
{
if( ListAddBefore( &timer->eventQ, newEvent, tempNode ) !=
NULL )
if( temp->eventTime >= timeout ) {
if (ListAddBefore( &timer->eventQ, newEvent, tempNode))
rc = 0;
found = 1;
break;
}
tempNode = ListNext( &timer->eventQ, tempNode );
}
//add to the end of Q
/* add to the end of Q. */
if (!found) {
if( ListAddTail( &timer->eventQ, newEvent ) != NULL )
rc = 0;
}
//signal change in Q
/* signal change in Q. */
if( rc == 0 ) {
ithread_cond_signal( &timer->condition );
} else {
FreeTimerEvent( timer, newEvent );
@ -394,26 +311,8 @@ TimerThreadSchedule( TimerThread * timer,
return rc;
}
/************************************************************************
* Function: TimerThreadRemove
*
* Description:
* Removes an event from the timer Q.
* Events can only be removed
* before they have been placed in the
* thread pool.
*
* Parameters:
* timer - valid timer thread pointer.
* id - id of event to remove.
* out - space for returned job (Can be NULL)
* Return:
* 0 on success.
* INVALID_EVENT_ID on error.
*
************************************************************************/
int
TimerThreadRemove( TimerThread * timer,
int TimerThreadRemove(
TimerThread *timer,
int id,
ThreadPoolJob *out)
{
@ -450,21 +349,7 @@ TimerThreadRemove( TimerThread * timer,
return rc;
}
/************************************************************************
* Function: TimerThreadShutdown
*
* Description:
* Shutdown the timer thread
* Events scheduled in the future will NOT be run.
* Timer thread should be shutdown BEFORE it's associated
* thread pool.
* Returns:
* returns 0 if succesfull,
* nonzero otherwise.
* Always returns 0.
***********************************************************************/
int
TimerThreadShutdown( TimerThread * timer )
int TimerThreadShutdown(TimerThread *timer)
{
ListNode *tempNode2 = NULL;
ListNode *tempNode = NULL;
@ -480,9 +365,7 @@ TimerThreadShutdown( TimerThread * timer )
timer->shutdown = 1;
tempNode = ListHead( &timer->eventQ );
//Delete nodes in Q
//call registered free function
//on argument
/* Delete nodes in Q. Call registered free function on argument. */
while( tempNode != NULL ) {
TimerEvent *temp = ( TimerEvent * ) tempNode->item;
@ -500,20 +383,19 @@ TimerThreadShutdown( TimerThread * timer )
ithread_cond_broadcast( &timer->condition );
while( timer->shutdown ) //wait for timer thread to shutdown
{
while (timer->shutdown) {
/* wait for timer thread to shutdown. */
ithread_cond_wait( &timer->condition, &timer->mutex );
}
ithread_mutex_unlock(&timer->mutex);
//destroy condition
/* destroy condition. */
while(ithread_cond_destroy(&timer->condition) != 0) {
}
//destroy mutex
/* destroy mutex. */
while (ithread_mutex_destroy(&timer->mutex) != 0) {
}
return 0;
}

View File

@ -1,153 +0,0 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
#include <stdarg.h>
#include <assert.h>
#include <sys/param.h>
#if (defined(BSD) && BSD >= 199306)
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <stdio.h>
#include "iasnprintf.h"
#ifndef NULL
#define NULL 0
#endif
#ifdef WIN32
#define vsnprintf _vsnprintf
#endif
/**
* Allocates enough memory for the
* Formatted string, up to max
* specified.
* With max set to -1, it allocates as
* much size as needed.
* Memory must be freed using free.
*/
int
iasnprintf( char **ret,
int incr,
int max,
const char *fmt,
... )
{
int size = incr;
int retc = 0;
va_list ap;
char *temp = NULL;
assert( ret );
assert( fmt );
( *ret ) = ( char * )malloc( incr );
if( ( *ret ) == NULL ) return -1;
while( 1 ) {
va_start( ap, fmt );
retc = vsnprintf( ( *ret ), size, fmt, ap );
va_end( ap );
if( retc < 0 ) {
//size not big enough
//and vsnprintf does NOT return the
//necessary number of bytes
if( ( max != -1 ) && ( size == max ) ) //max reached
{
break;
}
incr *= 2; //increase increment
//increase size and try again
if( ( max != -1 ) && ( ( size + incr ) > max ) ) {
incr = ( max - size );
}
temp = ( char * )realloc( ( *ret ), size + incr );
if( temp == NULL ) {
break;
}
size += incr;
( *ret ) = temp;
} else {
if( ( retc + 1 ) > size ) {
//size not big enough
//and vsnprintf
//returns the necessary
//number of bytes
if( ( max != -1 ) && ( retc + 1 > max ) ) {
retc = -1;
break;
}
temp = ( char * )realloc( ( *ret ), retc + 1 );
if( temp == NULL ) {
retc = -1;
break;
}
size = retc + 1;
( *ret ) = temp; //size increased try again
} else if( ( retc + 1 ) < size ) {
//size is bigger than needed
//try and reallocate smaller
temp = ( char * )realloc( ( *ret ), retc + 1 );
if( temp != NULL ) {
( *ret ) = temp;
}
break;
} else //size is just right, exit
{
break;
}
}
}
if( retc < 0 ) {
free( ( *ret ) );
( *ret ) = NULL;
}
return retc;
}
void
iasnprintfFree( char *fChar )
{
free( fChar );
fChar = NULL;
}

View File

@ -1,7 +1,7 @@
#
# "Makefile.am" for "libupnp/upnp"
#
# Copyright (C) 2005 Rémi Turboult <r3mi@users.sourceforge.net>
# Copyright (C) 2005 Rémi Turboult <r3mi@users.sourceforge.net>
#
SUBDIRS = doc . sample
@ -11,10 +11,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/threadutil/inc \
-I$(top_srcdir)/ixml/inc
AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(PTHREAD_LIBS)
LDADD = \
libupnp.la \
$(top_builddir)/threadutil/libthreadutil.la \
@ -23,8 +19,14 @@ LDADD = \
upnpincludedir = $(includedir)/upnp
upnpinclude_HEADERS = \
inc/UpnpString.h \
inc/upnp.h \
inc/upnpdebug.h
inc/upnpdebug.h \
inc/UpnpGlobal.h \
inc/UpnpInet.h \
inc/UpnpIntTypes.h \
inc/UpnpStdInt.h \
inc/UpnpUniStd.h
nodist_upnpinclude_HEADERS = inc/upnpconfig.h
if ENABLE_TOOLS
@ -50,7 +52,6 @@ libupnp_la_SOURCES = \
src/inc/gena_device.h \
src/inc/global.h \
src/inc/gmtdate.h \
src/inc/http_client.h \
src/inc/httpparser.h \
src/inc/httpreadwrite.h \
src/inc/md5.h \
@ -69,26 +70,30 @@ libupnp_la_SOURCES = \
src/inc/sysdep.h \
src/inc/unixutil.h \
src/inc/upnpapi.h \
src/inc/upnpclosesocket.h \
src/inc/upnp_timeout.h \
src/inc/uri.h \
src/inc/urlconfig.h \
src/inc/util.h \
src/inc/utilall.h \
src/inc/upnputil.h \
src/inc/uuid.h \
src/inc/VirtualDir.h \
src/inc/webserver.h
# ssdp
if ENABLE_SSDP
libupnp_la_SOURCES += \
src/ssdp/ssdp_ResultData.h \
src/ssdp/ssdp_device.c \
src/ssdp/ssdp_ctrlpt.c \
src/ssdp/ssdp_server.c
endif
# soap
if ENABLE_SOAP
libupnp_la_SOURCES += \
src/soap/soap_device.c \
src/soap/soap_ctrlpt.c \
src/soap/soap_common.c
endif
# genlib
libupnp_la_SOURCES += \
@ -108,42 +113,56 @@ libupnp_la_SOURCES += \
src/genlib/net/uri/uri.c
# gena
if ENABLE_GENA
libupnp_la_SOURCES += \
src/gena/gena_device.c \
src/gena/gena_ctrlpt.c \
src/gena/gena_callback2.c
endif
# api
libupnp_la_SOURCES += src/api/upnpapi.c
libupnp_la_SOURCES += \
src/api/UpnpString.c \
src/api/upnpapi.c
if ENABLE_TOOLS
libupnp_la_SOURCES += src/api/upnptools.c
endif
if ENABLE_DEBUG
libupnp_la_SOURCES += src/api/upnpdebug.c
endif
# uuid
if ENABLE_UUID
libupnp_la_SOURCES += \
src/uuid/md5.c \
src/uuid/sysdep.c \
src/uuid/uuid.c
endif
# urlconfig
libupnp_la_SOURCES += src/urlconfig/urlconfig.c
# inet_pton (needed on Win32, compiles to nothing elsewhere)
libupnp_la_SOURCES += \
src/inet_pton.c \
src/inc/inet_pton.h
# check / distcheck tests
check_PROGRAMS = test_init
TESTS = test_init
check_PROGRAMS = test_init test_url
TESTS = test_init test_url
test_init_SOURCES = test/test_init.c
test_url_SOURCES = test/test_url.c
EXTRA_DIST = \
LICENSE \
src/inc/inet_pton.h \
src/inet_pton.c \
m4/libupnp.m4 \
src/win_dll.c

122
upnp/inc/UpnpGlobal.h Normal file
View File

@ -0,0 +1,122 @@
#ifndef UPNPGLOBAL_H
#define UPNPGLOBAL_H
/*!
* \file
*
* \brief Defines constants that for some reason are not defined on some systems.
*/
#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
#if defined __GNUC__
#warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
#else
#error libupnp requires largefile mode - use AC_SYS_LARGEFILE
#endif
#endif
#ifdef WIN32
/*
* EXPORT_SPEC
*/
#ifdef UPNP_STATIC_LIB
#define EXPORT_SPEC
#else /* UPNP_STATIC_LIB */
#ifdef LIBUPNP_EXPORTS
/*! set up declspec for dll export to make functions
* visible to library users */
#define EXPORT_SPEC __declspec(dllexport)
#else /* LIBUPNP_EXPORTS */
#define EXPORT_SPEC __declspec(dllimport)
#endif /* LIBUPNP_EXPORTS */
#endif /* UPNP_STATIC_LIB */
/*
* UPNP_INLINE
* PRId64
* PRIzd
* PRIzu
* PRIzx
*/
#ifdef UPNP_USE_MSVCPP
/* define some things the M$ VC++ doesn't know */
#define UPNP_INLINE _inline
typedef __int64 int64_t;
#define PRId64 "I64d"
#define PRIzd "ld"
#define PRIzu "lu"
#define PRIzx "lx"
#endif /* UPNP_USE_MSVCPP */
#ifdef UPNP_USE_BCBPP
/* define some things Borland Builder doesn't know */
#define UPNP_INLINE inline
typedef __int64 int64_t;
#warning The Borland C compiler is probably broken on PRId64,
#warning please someone provide a proper fix here
#define PRId64 "I64d"
#define PRIzd "zd"
#define PRIzu "zu"
#define PRIzx "zx"
#endif /* UPNP_USE_BCBPP */
#ifdef __GNUC__
#define UPNP_INLINE inline
/* Note with PRIzu that in the case of Mingw32, it's the MS C
* runtime printf which ends up getting called, not the glibc
* printf, so it genuinely doesn't have "zu"
*/
#define PRIzd "ld"
#define PRIzu "lu"
#define PRIzx "lx"
#endif /* __GNUC__ */
#else
/*!
* \brief Export functions on WIN32 DLLs.
*
* Every funtion that belongs to the library API must use this
* definition upon declaration or it will not be exported on WIN32
* DLLs.
*/
#define EXPORT_SPEC
/*!
* \brief Declares an inline function.
*
* Surprisingly, there are some compilers that do not understand the
* inline keyword. This definition makes the use of this keyword
* portable to these systems.
*/
#ifdef __STRICT_ANSI__
#define UPNP_INLINE __inline__
#else
#define UPNP_INLINE inline
#endif
/*!
* \brief Supply the PRId64 printf() macro.
*
* MSVC still does not know about this.
*/
/* #define PRId64 PRId64 */
/*!
* \brief Supply the PRIz* printf() macros.
*
* These macros were invented so that we can live a little longer with
* MSVC lack of C99. "z" is the correct printf() size specifier for
* the size_t type.
*/
#define PRIzd "zd"
#define PRIzu "zu"
#define PRIzx "zx"
#endif
/*
* Defining this macro here gives some interesting information about unused
* functions in the code. Of course, this should never go uncommented on a
* release.
*/
/*#define inline*/
#endif /* UPNPGLOBAL_H */

67
upnp/inc/UpnpInet.h Normal file
View File

@ -0,0 +1,67 @@
#ifndef UPNPINET_H
#define UPNPINET_H
/*!
* \addtogroup Sock
*
* @{
*
* \file
*
* \brief Provides a platform independent way to include TCP/IP types and functions.
*/
#include "UpnpUniStd.h" /* for close() */
#ifdef WIN32
#include <stdarg.h>
#ifndef UPNP_USE_MSVCPP
/* Removed: not required (and cause compilation issues) */
#include <winbase.h>
#include <windef.h>
#endif
#include <winsock2.h>
#include <iphlpapi.h>
#include <ws2tcpip.h>
#define UpnpCloseSocket closesocket
#if(_WIN32_WINNT < 0x0600)
typedef short sa_family_t;
#else
typedef ADDRESS_FAMILY sa_family_t;
#endif
#else /* WIN32 */
#include <sys/param.h>
#if defined(__sun)
#include <fcntl.h>
#include <sys/sockio.h>
#elif (defined(BSD) && BSD >= 199306) || defined (__FreeBSD_kernel__)
#include <ifaddrs.h>
/* Do not move or remove the include below for "sys/socket"!
* Will break FreeBSD builds. */
#include <sys/socket.h>
#endif
#include <arpa/inet.h> /* for inet_pton() */
#include <net/if.h>
#include <netinet/in.h>
/*! This typedef makes the code slightly more WIN32 tolerant.
* On WIN32 systems, SOCKET is unsigned and is not a file
* descriptor. */
typedef int SOCKET;
/*! INVALID_SOCKET is unsigned on win32. */
#define INVALID_SOCKET (-1)
/*! select() returns SOCKET_ERROR on win32. */
#define SOCKET_ERROR (-1)
/*! Alias to close() to make code more WIN32 tolerant. */
#define UpnpCloseSocket close
#endif /* WIN32 */
/* @} Sock */
#endif /* UPNPINET_H */

11
upnp/inc/UpnpIntTypes.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef UPNPINTTYPES_H
#define UPNPINTTYPES_H
#if !defined(UPNP_USE_BCBPP)
/* Printf format for integers. */
#include <inttypes.h>
#endif /* !defined(UPNP_USE_BCBPP) */
#endif /* UPNPINTTYPES_H */

20
upnp/inc/UpnpStdInt.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef UPNPSTDINT_H
#define UPNPSTDINT_H
#if !defined(UPNP_USE_BCBPP)
/* Sized integer types. */
#include <stdint.h>
#ifdef UPNP_USE_MSVCPP
/* no ssize_t defined for VC */
#ifdef _WIN64
typedef int64_t ssize_t;
#else
typedef int32_t ssize_t;
#endif
#endif
#endif /* !defined(UPNP_USE_BCBPP) */
#endif /* UPNPSTDINT_H */

171
upnp/inc/UpnpString.h Normal file
View File

@ -0,0 +1,171 @@
#ifndef STRING_H
#define STRING_H
/*!
* \defgroup UpnpString The UpnpString Class
*
* \brief Implements string operations in the UPnP library.
*
* \author Marcelo Roberto Jimenez
*
* \version 1.0
*
* @{
*
* \file
*
* \brief UpnpString object declaration.
*/
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include <stdlib.h> /* for size_t */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*!
* \brief Type of the string objects inside libupnp.
*/
typedef struct s_UpnpString UpnpString;
/*!
* \brief Constructor.
*
* \return A pointer to a new allocated object.
*/
EXPORT_SPEC UpnpString *UpnpString_new();
/*!
* \brief Destructor.
*/
EXPORT_SPEC void UpnpString_delete(
/*! [in] The \em \b this pointer. */
UpnpString *p);
/*!
* \brief Copy Constructor.
*
* \return A pointer to a new allocated copy of the original object.
*/
EXPORT_SPEC UpnpString *UpnpString_dup(
/*! [in] The \em \b this pointer. */
const UpnpString *p);
/*!
* \brief Assignment operator.
*/
EXPORT_SPEC void UpnpString_assign(
/*! [in] The \em \b this pointer. */
UpnpString *p,
/*! [in] The \em \b that pointer. */
const UpnpString *q);
/*!
* \brief Returns the length of the string.
*
* \return The length of the string.
* */
EXPORT_SPEC size_t UpnpString_get_Length(
/*! [in] The \em \b this pointer. */
const UpnpString *p);
/*!
* \brief Truncates the string to the specified lenght, or does nothing
* if the current lenght is less than or equal to the requested length.
* */
EXPORT_SPEC void UpnpString_set_Length(
/*! [in] The \em \b this pointer. */
UpnpString *p,
/*! [in] The requested length. */
size_t n);
/*!
* \brief Returns the pointer to char.
*
* \return The pointer to char.
*/
EXPORT_SPEC const char *UpnpString_get_String(
/*! [in] The \em \b this pointer. */
const UpnpString *p);
/*!
* \brief Sets the string from a pointer to char.
*/
EXPORT_SPEC int UpnpString_set_String(
/*! [in] The \em \b this pointer. */
UpnpString *p,
/*! [in] (char *) to copy from. */
const char *s);
/*!
* \brief Sets the string from a pointer to char using a maximum of N chars.
*/
EXPORT_SPEC int UpnpString_set_StringN(
/*! [in] The \em \b this pointer. */
UpnpString *p,
/*! [in] (char *) to copy from. */
const char *s,
/*! Maximum number of chars to copy.*/
size_t n);
/*!
* \brief Clears the string, sets its size to zero.
*/
EXPORT_SPEC void UpnpString_clear(
/*! [in] The \em \b this pointer. */
UpnpString *p);
/*!
* \brief Compares two strings for equality. Case matters.
*
* \return The result of strcmp().
*/
EXPORT_SPEC int UpnpString_cmp(
/*! [in] The \em \b the first string. */
UpnpString *p,
/*! [in] The \em \b the second string. */
UpnpString *q);
/*!
* \brief Compares two strings for equality. Case does not matter.
*
* \return The result of strcasecmp().
*/
EXPORT_SPEC int UpnpString_casecmp(
/*! [in] The \em \b the first string. */
UpnpString *p,
/*! [in] The \em \b the second string. */
UpnpString *q);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* @} UpnpString The UpnpString API */
#endif /* STRING_H */

10
upnp/inc/UpnpUniStd.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef UPNPUNISTD_H
#define UPNPUNISTD_H
#ifdef WIN32
/* Do not #include <unistd.h> on WIN32. */
#else /* WIN32 */
#include <unistd.h> /* for close() */
#endif /* WIN32 */
#endif /* UPNPUNISTD_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/* -*- C -*- */
/*******************************************************************************
*
* Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
* Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -56,6 +56,19 @@
/***************************************************************************
* Large file support
***************************************************************************/
/** File Offset size */
#undef _FILE_OFFSET_BITS
/** Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
/** Large files support */
#undef _LARGE_FILE_SOURCE
/***************************************************************************
* Library optional features
***************************************************************************/
@ -86,10 +99,37 @@
#undef UPNP_HAVE_WEBSERVER
/** Defined to 1 if the library has been compiled with the SSDP part enabled
* (i.e. configure --enable-ssdp) */
#undef UPNP_HAVE_SSDP
/** Defined to 1 if the library has been compiled with optional SSDP headers
* support (i.e. configure --enable-optssdp) */
#undef UPNP_HAVE_OPTSSDP
/** Defined to 1 if the library has been compiled with the SOAP part enabled
* (i.e. configure --enable-soap) */
#undef UPNP_HAVE_SOAP
/** Defined to 1 if the library has been compiled with the GENA part enabled
* (i.e. configure --enable-gena) */
#undef UPNP_HAVE_GENA
/** Defined to 1 if the library has been compiled with helper API
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
#undef UPNP_HAVE_TOOLS
/** Defined to 1 if the library has been compiled with ipv6 support
* (i.e. configure --enable-ipv6) */
#undef UPNP_ENABLE_IPV6
/** Defined to 1 if the library has been compiled with unspecified SERVER
* header (i.e. configure --enable-unspecified_server) */
#undef UPNP_ENABLE_UNSPECIFIED_SERVER
#endif /* UPNP_CONFIG_H */

View File

@ -1,18 +1,18 @@
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
* Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither name of Intel Corporation nor the names of its contributors
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@ -33,8 +33,13 @@
#ifndef UPNP_DEBUG_H
#define UPNP_DEBUG_H
#include "upnp.h"
/*!
* \file
*/
#include "ThreadPool.h"
#include "upnpconfig.h"
#include "UpnpGlobal.h" /* for UPNP_INLINE */
#include <stdio.h>
@ -42,16 +47,15 @@
extern "C" {
#endif
/** @name Other debugging features
The UPnP SDK contains other features to aid in debugging.
/*! \name Other debugging features
*
* The UPnP SDK contains other features to aid in debugging.
*/
/*@{*/
/*! @{ */
/** @name Upnp_LogLevel
/*! \name Upnp_LogLevel
* The user has the option to select 4 different types of debugging levels,
* see {\tt UpnpSetLogLevel}.
* see \c UpnpSetLogLevel.
* The critical level will show only those messages
* which can halt the normal processing of the library, like memory
* allocation errors. The remaining three levels are just for debugging
@ -60,14 +64,11 @@ extern "C" {
* Info Level displays the other important operational information
* regarding the working of the library. If the user selects All,
* then the library displays all the debugging information that it has.
* \begin{itemize}
* \item {\tt UPNP_CRITICAL [0]}
* \item {\tt UPNP_PACKET [1]}
* \item {\tt UPNP_INFO [2]}
* \item {\tt UPNP_ALL [3]}
* \end{itemize}
* \li \c UPNP_CRITICAL [0]
* \li \c UPNP_PACKET [1]
* \li \c UPNP_INFO [2]
* \li \c UPNP_ALL [3]
*/
typedef enum Upnp_Module {
SSDP,
SOAP,
@ -79,256 +80,213 @@ typedef enum Upnp_Module {
HTTP
} Dbg_Module;
/*! @{ */
/*@{*/
typedef enum Upnp_LogLevel_e {
UPNP_CRITICAL,
UPNP_PACKET,
UPNP_INFO,
UPNP_ALL
} Upnp_LogLevel;
/*! @} */
/*@}*/
/**
* Default log level : see {\tt Upnp_LogLevel}
/*!
* Default log level : see \c Upnp_LogLevel
*/
#define UPNP_DEFAULT_LOG_LEVEL UPNP_ALL
/***************************************************************************
* Function : UpnpInitLog
/*!
* \brief Initialize the log files.
*
* Parameters: void
*
* Description:
* This functions initializes the log files
*
* Returns: int
* -1 : If fails
* UPNP_E_SUCCESS : if success
***************************************************************************/
* \return -1 if fails or UPNP_E_SUCCESS if succeeds.
*/
#ifdef DEBUG
int UpnpInitLog();
int UpnpInitLog(void);
#else
static UPNP_INLINE int UpnpInitLog() { return UPNP_E_SUCCESS; }
static UPNP_INLINE int UpnpInitLog(void)
{
return UPNP_E_SUCCESS;
}
#endif
/*!
* \brief Set the log level (see \c Upnp_LogLevel).
*/
#ifdef DEBUG
void UpnpSetLogLevel(
/*! [in] Log level. */
Upnp_LogLevel log_level);
#else
static UPNP_INLINE void UpnpSetLogLevel(Upnp_LogLevel log_level)
{
return;
log_level = log_level;
}
#endif
/***************************************************************************
* Function : UpnpSetLogLevel
*
* Parameters: Upnp_LogLevel log_level
*
* Description:
* This functions set the log level (see {\tt Upnp_LogLevel}
* Returns: void
***************************************************************************/
/*!
* \brief Closes the log files.
*/
#ifdef DEBUG
void UpnpSetLogLevel(Upnp_LogLevel log_level);
void UpnpCloseLog(void);
#else
static UPNP_INLINE void UpnpSetLogLevel(Upnp_LogLevel log_level) {}
static UPNP_INLINE void UpnpCloseLog(void)
{
}
#endif
/***************************************************************************
* Function : UpnpCloseLog
*
* Parameters: void
*
* Description:
* This functions closes the log files
* Returns: void
***************************************************************************/
#ifdef DEBUG
void UpnpCloseLog();
#else
static UPNP_INLINE void UpnpCloseLog() {}
#endif
/***************************************************************************
* Function : UpnpSetLogFileNames
*
* Parameters:
* IN const char* ErrFileName: name of the error file
* IN const char *InfoFileName: name of the information file
* IN int size: Size of the buffer
* IN int starLength: This parameter provides the width of the banner
*
* Description:
* This functions takes the buffer and writes the buffer in the file as
* per the requested banner
* Returns: void
***************************************************************************/
/*!
* \brief Set the name for error and information files, respectively.
*/
#ifdef DEBUG
void UpnpSetLogFileNames(
/*! [in] Name of the error file. */
const char *ErrFileName,
/*! [in] Name of the information file. */
const char *InfoFileName);
#else
static UPNP_INLINE void UpnpSetLogFileNames(
const char *ErrFileName,
const char *InfoFileName) {}
static UPNP_INLINE void UpnpSetLogFileNames(const char *ErrFileName,
const char *InfoFileName)
{
return;
ErrFileName = ErrFileName;
InfoFileName = InfoFileName;
}
#endif
/***************************************************************************
* Function : UpnpGetDebugFile
/*!
* \brief Check if the module is turned on for debug and returns the file
* descriptor corresponding to the debug level
*
* Parameters:
* IN Upnp_LogLevel DLevel: The level of the debug logging. It will decide
* whether debug statement will go to standard output,
* or any of the log files.
* IN Dbg_Module Module: debug will go in the name of this module
*
* Description:
* This function checks if the module is turned on for debug
* and returns the file descriptor corresponding to the debug level
* Returns: FILE *
* NULL : if the module is turn off for debug
* else returns the right file descriptor
***************************************************************************/
* \return NULL if the module is turn off for debug otheriwse returns the
* right file descriptor.
*/
#ifdef DEBUG
FILE *UpnpGetDebugFile(Upnp_LogLevel level, Dbg_Module module);
FILE *UpnpGetDebugFile(
/*! [in] The level of the debug logging. It will decide whether debug
* statement will go to standard output, or any of the log files. */
Upnp_LogLevel level,
/*! [in] debug will go in the name of this module. */
Dbg_Module module);
#else
static UPNP_INLINE FILE *UpnpGetDebugFile(Upnp_LogLevel level, Dbg_Module module)
{
return NULL;
level = level;
module = module;
}
#endif
/***************************************************************************
* Function : DebugAtThisLevel
/*!
* \brief Returns true if debug output should be done in this module.
*
* Parameters:
* IN Upnp_LogLevel DLevel: The level of the debug logging. It will decide
* whether debug statement will go to standard output,
* or any of the log files.
* IN Dbg_Module Module: debug will go in the name of this module
*
* Description:
* This functions returns true if debug output should be done in this
* module.
*
* Returns: int
***************************************************************************/
* \return Nonzero value if true, zero if false.
*/
#ifdef DEBUG
int DebugAtThisLevel(
IN Upnp_LogLevel DLevel,
IN Dbg_Module Module);
/*! [in] The level of the debug logging. It will decide whether debug
* statement will go to standard output, or any of the log files. */
Upnp_LogLevel DLevel,
/*! [in] Debug will go in the name of this module. */
Dbg_Module Module);
#else
static UPNP_INLINE int DebugAtThisLevel(
IN Upnp_LogLevel DLevel,
IN Dbg_Module Module) { return 0; }
static UPNP_INLINE int DebugAtThisLevel(Upnp_LogLevel DLevel, Dbg_Module Module)
{
return 0;
DLevel = DLevel;
Module = Module;
}
#endif
/***************************************************************************
* Function : UpnpPrintf
*
* Parameters:
* IN Upnp_LogLevel DLevel: The level of the debug logging. It will decide
* whether debug statement will go to standard output,
* or any of the log files.
* IN Dbg_Module Module: debug will go in the name of this module
* IN char *DbgFileName: Name of the file from where debug statement is
* coming
* IN int DbgLineNo : Line number of the file from where debug statement
* is coming
* IN char * FmtStr, ...: Variable number of arguments that will go
* in the debug statement
*
* Description:
* This functions prints the debug statement either on the startdard
* output or log file along with the information from where this
* debug statement is coming
* Returns: void
***************************************************************************/
/*!
* \brief Prints the debug statement either on the standard output or log file
* along with the information from where this debug statement is coming.
*/
#ifdef DEBUG
void UpnpPrintf(
/*! [in] The level of the debug logging. It will decide whether debug
* statement will go to standard output, or any of the log files. */
Upnp_LogLevel DLevel,
/*! [in] debug will go in the name of this module. */
Dbg_Module Module,
/*! [in] Name of the file from where debug statement is coming. */
const char *DbgFileName,
/*! [in] Line number of the file from where debug statement is coming. */
int DbgLineNo,
/*! [in] Printf like format specification. */
const char *FmtStr,
/*! [in] Printf like Variable number of arguments that will go in the
* debug statement. */
...)
#if (__GNUC__ >= 3)
/* This enables printf like format checking by the compiler */
/* This enables printf like format checking by the compiler. */
__attribute__ ((format(__printf__, 5, 6)))
#endif
;
#else
static UPNP_INLINE void UpnpPrintf(
Upnp_LogLevel DLevel,
Dbg_Module Module,
const char* DbgFileName,
int DbgLineNo,
const char* FmtStr,
...) {}
#endif
#else /* DEBUG */
static UPNP_INLINE void UpnpPrintf(Upnp_LogLevel DLevel, Dbg_Module Module,
const char *DbgFileName, int DbgLineNo, const char *FmtStr, ...)
{
return;
DLevel = DLevel;
Module = Module;
DbgFileName = DbgFileName;
DbgLineNo = DbgLineNo;
FmtStr = FmtStr;
}
#endif /* DEBUG */
/***************************************************************************
* Function : UpnpDisplayBanner
*
* Parameters:
* IN FILE *fd: file descriptor where the banner will be written
* IN char **lines: The buffer that will be written
* IN int size: Size of the buffer
* IN int starLength: This parameter provides the width of the banner
*
* Description:
* This functions takes the buffer and writes the buffer in the file as
* per the requested banner
* Returns: void
***************************************************************************/
#ifdef DEBUG
void UpnpDisplayBanner(
FILE *fd,
const char **lines,
size_t size,
int starlength);
#else
static UPNP_INLINE void UpnpDisplayBanner(
FILE *fd,
const char **lines,
size_t size,
int starlength) {}
#endif
/***************************************************************************
* Function : UpnpDisplayFileAndLine
*
* Parameters:
* IN FILE *fd: File descriptor where line number and file name will be
* written
* IN char *DbgFileName: Name of the file
* IN int DbgLineNo : Line number of the file
*
* Description:
* This function writes the file name and file number from where
* debug statement is coming to the log file
* Returns: void
***************************************************************************/
/*!
* \brief Writes the file name and file number from where debug statement is
* coming to the log file.
*/
#ifdef DEBUG
void UpnpDisplayFileAndLine(
/*! [in] File descriptor where line number and file name will be
* written. */
FILE * fd,
/*! [in] Name of the file. */
const char *DbgFileName,
/*! [in] Line number of the file. */
int DbgLineNo);
#else
static UPNP_INLINE void UpnpDisplayFileAndLine(
FILE *fd,
const char *DbgFileName,
int DbgLineNo) {}
static UPNP_INLINE void UpnpDisplayFileAndLine(FILE *fd,
const char *DbgFileName, int DbgLineNo)
{
return;
fd = fd;
DbgFileName = DbgFileName;
DbgLineNo = DbgLineNo;
}
#endif
/*! @} */
/*!
* \brief Writes the buffer in the file as per the requested banner
*/
#ifdef DEBUG
void UpnpDisplayBanner(
/*! [in] file descriptor where the banner will be written. */
FILE * fd,
/*! [in] The buffer that will be written. */
const char **lines,
/*! [in] Size of the buffer. */
size_t size,
/*! [in] This parameter provides the width of the banner. */
size_t starlength);
#else
static UPNP_INLINE void UpnpDisplayBanner(FILE *fd, const char **lines,
size_t size, int starlength)
{
return;
fd = fd;
lines = lines;
size = size;
starlength = starlength;
}
#endif
/*@}*/
#ifdef __cplusplus
}
#endif
#endif /* UPNP_DEBUG_H */

View File

@ -29,201 +29,262 @@
*
******************************************************************************/
/** @name Optional Tool APIs
* The Linux SDK for UPnP Devices contains some additional, optional
* utility APIs that can be helpful in writing applications using the
* SDK. These additional APIs can be compiled out in order to save code
* size in the SDK. Refer to the README for details.
*/
/*! @{ */
#ifndef UPNP_TOOLS_H
#define UPNP_TOOLS_H
#include "upnp.h"
/*!
* \file
*
* \defgroup UPnPTools Optional Tool API
*
* \brief Additional, optional utility API that can be helpful in writing
* applications.
*
* This additional API can be compiled out in order to save code size in the
* library. Refer to the file README for details.
*
* @{
*/
#include "ixml.h" /* for IXML_Document */
#include "upnpconfig.h" /* for UPNP_HAVE_TOOLS */
/* Function declarations only if tools compiled into the library */
#if UPNP_HAVE_TOOLS
#ifdef __cplusplus
extern "C" {
#endif
/** {\bf UpnpResolveURL} combines a base URL and a relative URL into
* a single absolute URL. The memory for {\bf AbsURL} needs to be
* allocated by the caller and must be large enough to hold the
* {\bf BaseURL} and {\bf RelURL} combined.
/*!
* \brief Converts an SDK error code into a string error message suitable for
* display. The memory returned from this function should NOT be freed.
*
* @return [int] An integer representing one of the following:
* \begin{itemize}
* \item {\tt UPNP_E_SUCCESS}: The operation completed successfully.
* \item {\tt UPNP_E_INVALID_PARAM}: {\bf RelURL} is {\tt NULL}.
* \item {\tt UPNP_E_INVALID_URL}: The {\bf BaseURL} / {\bf RelURL}
* combination does not form a valid URL.
* \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to
* complete this operation.
* \end{itemize}
* \return An ASCII text string representation of the error message associated
* with the error code or the string "Unknown error code"
*/
EXPORT_SPEC int UpnpResolveURL(
IN const char * BaseURL, /** The base URL to combine. */
IN const char * RelURL, /** The relative URL to {\bf BaseURL}. */
OUT char * AbsURL /** A pointer to a buffer to store the
absolute URL. */
);
/** {\bf UpnpMakeAction} creates an action request packet based on its input
* parameters (status variable name and value pair). Any number of input
* parameters can be passed to this function but every input variable name
* should have a matching value argument.
*
* @return [IXML_Document*] The action node of {\bf Upnp_Document} type or
* {\tt NULL} if the operation failed.
*/
EXPORT_SPEC IXML_Document* UpnpMakeAction(
IN const char * ActionName, /** The action name. */
IN const char * ServType, /** The service type. */
IN int NumArg, /** Number of argument pairs to be passed. */
IN const char * Arg, /** Status variable name and value pair. */
IN ... /* Other status variable name and value pairs. */
);
/** {\bf UpnpAddToAction} creates an action request packet based on its input
* parameters (status variable name and value pair). This API is specially
* suitable inside a loop to add any number input parameters into an existing
* action. If no action document exists in the beginning then a
* {\bf Upnp_Document} variable initialized with {\tt NULL} should be passed
* as a parameter.
*
* @return [int] An integer representing one of the following:
* \begin{itemize}
* \item {\tt UPNP_E_SUCCESS}: The operation completed successfully.
* \item {\tt UPNP_E_INVALID_PARAM}: One or more of the parameters
* are invalid.
* \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to
* complete this operation.
* \end{itemize}
*/
EXPORT_SPEC int UpnpAddToAction(
IN OUT IXML_Document ** ActionDoc,
/** A pointer to store the action
document node. */
IN const char * ActionName, /** The action name. */
IN const char * ServType, /** The service type. */
IN const char * ArgName, /** The status variable name. */
IN const char * ArgVal /** The status variable value. */
);
/** {\bf UpnpMakeActionResponse} creates an action response packet based
* on its output parameters (status variable name and value pair). Any
* number of input parameters can be passed to this function but every output
* variable name should have a matching value argument.
*
* @return [IXML_Document*] The action node of {\bf Upnp_Document} type or
* {\tt NULL} if the operation failed.
*/
EXPORT_SPEC IXML_Document* UpnpMakeActionResponse(
IN const char * ActionName, /** The action name. */
IN const char * ServType, /** The service type. */
IN int NumArg, /** The number of argument pairs passed. */
IN const char * Arg, /** The status variable name and value pair. */
IN ... /* Other status variable name and value pairs. */
);
/** {\bf UpnpAddToActionResponse} creates an action response
* packet based on its output parameters (status variable name
* and value pair). This API is especially suitable inside
* a loop to add any number of input parameters into an existing action
* response. If no action document exists in the beginning, a
* {\bf Upnp_Document} variable initialized with {\tt NULL} should be passed
* as a parameter.
*
* @return [int] An integer representing one of the following:
* \begin{itemize}
* \item {\tt UPNP_E_SUCCESS}: The operation completed successfully.
* \item {\tt UPNP_E_INVALID_PARAM}: One or more of the parameters
* are invalid.
* \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to
* complete this operation.
* \end{itemize}
*/
EXPORT_SPEC int UpnpAddToActionResponse(
IN OUT IXML_Document ** ActionResponse,
/** Pointer to a document to
store the action document
node. */
IN const char * ActionName, /** The action name. */
IN const char * ServType, /** The service type. */
IN const char * ArgName, /** The status variable name. */
IN const char * ArgVal /** The status variable value. */
);
/** {\bf UpnpAddToPropertySet} can be used when an application needs to
* transfer the status of many variables at once. It can be used
* (inside a loop) to add some extra status variables into an existing
* property set. If the application does not already have a property
* set document, the application should create a variable initialized
* with {\tt NULL} and pass that as the first parameter.
*
* @return [int] An integer representing one of the following:
* \begin{itemize}
* \item {\tt UPNP_E_SUCCESS}: The operation completed successfully.
* \item {\tt UPNP_E_INVALID_PARAM}: One or more of the parameters
* are invalid.
* \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to
* complete this operation.
* \end{itemize}
*
*/
EXPORT_SPEC int UpnpAddToPropertySet(
IN OUT IXML_Document **PropSet,
/** A pointer to the document containing
the property set document node. */
IN const char * ArgName, /** The status variable name. */
IN const char * ArgVal /** The status variable value. */
);
/** {\bf UpnpCreatePropertySet} creates a property set
* message packet. Any number of input parameters can be passed
* to this function but every input variable name should have
* a matching value input argument.
*
* @return [IXML_Document*] {\tt NULL} on failure, or the property-set
* document node.
*
*/
EXPORT_SPEC IXML_Document* UpnpCreatePropertySet(
IN int NumArg, /** The number of argument pairs passed. */
IN const char* Arg, /** The status variable name and value pair. */
IN ...
);
/** {\bf UpnpGetErrorMessage} converts an SDK error code into a
* string error message suitable for display. The memory returned
* from this function should NOT be freed.
*
* @return [char*] An ASCII text string representation of the error message
* associated with the error code.
*/
EXPORT_SPEC const char *UpnpGetErrorMessage(
int errorcode /** The SDK error code to convert. */
);
/*! [in] The SDK error code to convert. */
int errorcode);
/*!
* \brief Combines a base URL and a relative URL into a single absolute URL.
*
* The memory for \b AbsURL needs to be allocated by the caller and must
* be large enough to hold the \b BaseURL and \b RelURL combined.
*
* \return An integer representing one of the following:
* \li <tt>UPNP_E_SUCCESS</tt>: The operation completed successfully.
* \li <tt>UPNP_E_INVALID_PARAM</tt>: \b RelURL is <tt>NULL</tt>.
* \li <tt>UPNP_E_INVALID_URL</tt>: The \b BaseURL / \b RelURL
* combination does not form a valid URL.
* \li <tt>UPNP_E_OUTOF_MEMORY</tt>: Insufficient resources exist to
* complete this operation.
*/
EXPORT_SPEC int UpnpResolveURL(
/*! [in] The base URL to combine. */
const char *BaseURL,
/*! [in] The relative URL to \b BaseURL. */
const char *RelURL,
/*! [out] A pointer to a buffer to store the absolute URL. */
char *AbsURL);
/*!
* \brief Combines a base URL and a relative URL into a single absolute URL.
*
* The memory for \b AbsURL becomes owned by the caller and should be freed
* later.
*
* \return An integer representing one of the following:
* \li <tt>UPNP_E_SUCCESS</tt>: The operation completed successfully.
* \li <tt>UPNP_E_INVALID_PARAM</tt>: \b RelURL is <tt>NULL</tt>.
* \li <tt>UPNP_E_INVALID_URL</tt>: The \b BaseURL / \b RelURL
* combination does not form a valid URL.
* \li <tt>UPNP_E_OUTOF_MEMORY</tt>: Insufficient resources exist to
* complete this operation.
*/
EXPORT_SPEC int UpnpResolveURL2(
/*! [in] The base URL to combine. */
const char *BaseURL,
/*! [in] The relative URL to \b BaseURL. */
const char *RelURL,
/*! [out] A pointer to a pointer to a buffer to store the
* absolute URL. Must be freed later by the caller. */
char **AbsURL);
/*!
* \brief Creates an action request packet based on its input parameters
* (status variable name and value pair).
*
* Any number of input parameters can be passed to this function but every
* input variable name should have a matching value argument.
*
* It is a wrapper function that calls makeAction() function to create the
* action request.
*
* \return The action node of \b Upnp_Document type or <tt>NULL</tt> if the
* operation failed.
*/
EXPORT_SPEC IXML_Document *UpnpMakeAction(
/*! [in] Name of the action request or response. */
const char *ActionName,
/*! [in] The service type. */
const char *ServType,
/*! [in] Number of argument pairs to be passed. */
int NumArg,
/*! [in] pointer to the first argument. */
const char *Arg,
/*! [in] Argument list. */
...);
/*!
* \brief Ceates an action response packet based on its output parameters
* (status variable name and value pair).
*
* Any number of input parameters can be passed to this function but every
* output variable name should have a matching value argument.
*
* It is a wrapper function that calls makeAction() function to create the
* action request.
*
* \return The action node of \b Upnp_Document type or <tt>NULL</tt> if the
* operation failed.
*/
EXPORT_SPEC IXML_Document *UpnpMakeActionResponse(
/*! [in] The action name. */
const char *ActionName,
/*! [in] The service type.. */
const char *ServType,
/*! [in] The number of argument pairs passed. */
int NumArg,
/*! [in] The status variable name and value pair. */
const char *Arg,
/*! [in] Other status variable name and value pairs. */
...);
/*!
* \brief Adds the argument in the action request.
*
* This API is specially suitable inside a loop to add any number input
* parameters into an existing action. If no action document exists in the
* beginning then a <b>Upnp_Document variable initialized with <tt>NULL</tt></b>
* should be passed as a parameter.
*
* It is a wrapper function that calls addToAction() function to add the
* argument in the action request.
*
* \return An integer representing one of the following:
* \li <tt>UPNP_E_SUCCESS</tt>: The operation completed successfully.
* \li <tt>UPNP_E_INVALID_PARAM</tt>: One or more of the parameters are invalid.
* \li <tt>UPNP_E_OUTOF_MEMORY</tt>: Insufficient resources exist to
* complete this operation.
*/
EXPORT_SPEC int UpnpAddToAction(
/*! [in,out] A pointer to store the action document node. */
IXML_Document **ActionDoc,
/*! [in] The action name. */
const char *ActionName,
/*! [in] The service type. */
const char *ServType,
/*! [in] The status variable name. */
const char *ArgName,
/*! [in] The status variable value. */
const char *ArgVal);
/*!
* \brief Creates an action response packet based on its output parameters
* (status variable name and value pair).
*
* This API is especially suitable inside a loop to add any number of input
* parameters into an existing action response. If no action document exists
* in the beginning, a \b Upnp_Document variable initialized with <tt>NULL</tt>
* should be passed as a parameter.
*
* It is a wrapper function that calls addToAction() function to add the
* argument in the action request.
*
* \return An integer representing one of the following:
* \li <tt>UPNP_E_SUCCESS</tt>: The operation completed successfully.
* \li <tt>UPNP_E_INVALID_PARAM</tt>: One or more of the parameters are invalid.
* \li <tt>UPNP_E_OUTOF_MEMORY</tt>: Insufficient resources exist to
* complete this operation.
*/
EXPORT_SPEC int UpnpAddToActionResponse(
/*! [in,out] Pointer to a document to store the action document node. */
IXML_Document **ActionResponse,
/*! [in] The action name. */
const char *ActionName,
/*! [in] The service type. */
const char *ServType,
/*! [in] The status variable name. */
const char *ArgName,
/*! [in] The status variable value. */
const char *ArgVal);
/*!
* \brief Creates a property set message packet.
*
* Any number of input parameters can be passed to this function but every
* input variable name should have a matching value input argument.
*
* \return <tt>NULL</tt> on failure, or the property-set document node.
*/
EXPORT_SPEC IXML_Document *UpnpCreatePropertySet(
/*! [in] The number of argument pairs passed. */
int NumArg,
/*! [in] The status variable name and value pair. */
const char *Arg,
/*! [in] Variable sized list with the rest of the parameters. */
...);
/*!
* \brief Can be used when an application needs to transfer the status of many
* variables at once.
*
* It can be used (inside a loop) to add some extra status variables into an
* existing property set. If the application does not already have a property
* set document, the application should create a variable initialized with
* <tt>NULL</tt> and pass that as the first parameter.
*
* \return An integer representing one of the following:
* \li <tt>UPNP_E_SUCCESS</tt>: The operation completed successfully.
* \li <tt>UPNP_E_INVALID_PARAM</tt>: One or more of the parameters are invalid.
* \li <tt>UPNP_E_OUTOF_MEMORY</tt>: Insufficient resources exist to
* complete this operation.
*/
EXPORT_SPEC int UpnpAddToPropertySet(
/*! [in,out] A pointer to the document containing the property set document node. */
IXML_Document **PropSet,
/*! [in] The status variable name. */
const char *ArgName,
/*! [in] The status variable value. */
const char *ArgVal);
/*! @} */
#ifdef __cplusplus
}
#endif
/*! @} */
#endif /* UPNP_HAVE_TOOLS */
#endif /* UPNP_TOOLS_H */

97
upnp/m4/libupnp.m4 Normal file
View File

@ -0,0 +1,97 @@
# -*- Autoconf -*-
# This file is part of the aMule project.
# This file is part of the libupnp library project.
#
# Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
#
# 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 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 St, Fifth Floor, Boston, MA 02110-1301, USA
#
dnl --------------------------------------------------------------------------
dnl LIBUPNP_CHECK([VERSION = 1.6.6], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
dnl Check for the libupnp library
dnl --------------------------------------------------------------------------
dnl
dnl This macro sets these variables:
dnl - LIBUPNP_VERSION
dnl Something like "1.6.7"
dnl - LIBUPNP_CPPFLAGS
dnl Flags to be added to CPPFLAGS
dnl - LIBUPNP_CFLAGS
dnl Flags to be added to CFLAGS
dnl - LIBUPNP_LDFLAGS
dnl Flags to be added to LDFLAGS
dnl - LIBUPNP_LIBS
dnl Library to be added to LIBS
dnl
dnl The LIBUPNP_CPPFLAGS, LIBUPNP_CFLAGS, LIBUPNP_LDFLAGS and LIBUPNP_LIBS variables are also substituted.
dnl
AC_DEFUN([LIBUPNP_CHECK],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
m4_define([MIN_LIBUPNP_VERSION], [m4_ifval([$1], [$1], [1.6.6])])dnl
dnl Test for --with-libupnp-prefix
AC_ARG_WITH(
[libupnp-prefix],
[AS_HELP_STRING(
[--with-libupnp-prefix=PREFIX],
[UPnP library location])],
[export PKG_CONFIG_PATH=$withval/lib/pkgconfig])
dnl Check for libupnp >= MIN_LIBUPNP_VERSION
AS_IF([test $cross_compiling = no], [
AC_MSG_CHECKING([for libupnp version >= MIN_LIBUPNP_VERSION])
AS_IF([test -n "$PKG_CONFIG"], [
AS_IF([$PKG_CONFIG libupnp --exists], [
LIBUPNP_VERSION=`$PKG_CONFIG libupnp --modversion`
AS_IF([$PKG_CONFIG libupnp --atleast-version=MIN_LIBUPNP_VERSION], [
result=yes
resultstr=" (version $LIBUPNP_VERSION)"
LIBUPNP_CPPFLAGS=`$PKG_CONFIG libupnp --cflags-only-I`
LIBUPNP_CFLAGS=`$PKG_CONFIG libupnp --cflags-only-other`
LIBUPNP_LDFLAGS=`$PKG_CONFIG libupnp --libs-only-L`
LIBUPNP_LIBS=`$PKG_CONFIG libupnp --libs-only-other`
LIBUPNP_LIBS="$LIBUPNP_LIBS `$PKG_CONFIG libupnp --libs-only-l`"
], [
result=no
resultstr=" (version $LIBUPNP_VERSION is not new enough)"
])
], [
result=no
resultstr=" (try to use --with-libupnp-prefix=PREFIX)"
])
], [
result=no
resultstr=" (pkg-config not found)"
])
AC_MSG_RESULT([$result$resultstr])
libupnp_error="libupnp >= MIN_LIBUPNP_VERSION not found$resultstr"
], [
dnl Currently cross-compilation with libupnp is not supported.
result=no
libupnp_error="cross compiling"
])
dnl Execute the right action.
AS_IF([test ${result:-no} = yes], [$2], [$3])
dnl Exported symbols
AC_SUBST([LIBUPNP_CPPFLAGS])dnl
AC_SUBST([LIBUPNP_CFLAGS])dnl
AC_SUBST([LIBUPNP_LDFLAGS])dnl
AC_SUBST([LIBUPNP_LIBS])dnl
m4_undefine([MIN_LIBUPNP_VERSION])dnl
])

View File

@ -9,75 +9,66 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/threadutil/inc \
-I$(top_srcdir)/ixml/inc
AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(PTHREAD_LIBS)
LDADD = \
$(top_builddir)/upnp/libupnp.la \
$(top_builddir)/threadutil/libthreadutil.la \
$(top_builddir)/ixml/libixml.la
# samples
noinst_PROGRAMS =
if ENABLE_SAMPLES
if ENABLE_CLIENT
noinst_PROGRAMS += upnp_tv_ctrlpt
upnp_tv_ctrlpt_CPPFLAGS = \
noinst_PROGRAMS += tv_ctrlpt
tv_ctrlpt_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(srcdir)/common/ \
-I$(srcdir)/tvctrlpt
if ENABLE_DEVICE
noinst_PROGRAMS += upnp_tv_combo
upnp_tv_combo_CPPFLAGS = $(AM_CPPFLAGS) \
noinst_PROGRAMS += tv_combo
tv_combo_CPPFLAGS = $(AM_CPPFLAGS) \
-I$(srcdir)/common/ \
-I$(srcdir)/tvcombo
endif
endif
if ENABLE_DEVICE
noinst_PROGRAMS += upnp_tv_device
upnp_tv_device_CPPFLAGS = \
noinst_PROGRAMS += tv_device
tv_device_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(srcdir)/common/ \
-I$(srcdir)/tvdevice
endif
endif
upnp_tv_device_SOURCES = \
tv_device_SOURCES = \
common/sample_util.c \
common/sample_util.h \
tvdevice/upnp_tv_device.c \
tvdevice/upnp_tv_device.h \
tvdevice/linux/upnp_tv_device_main.c
common/tv_device.c \
common/tv_device.h \
linux/tv_device_main.c
upnp_tv_ctrlpt_SOURCES = \
tv_ctrlpt_SOURCES = \
common/sample_util.c \
common/sample_util.h \
tvctrlpt/upnp_tv_ctrlpt.c \
tvctrlpt/upnp_tv_ctrlpt.h \
tvctrlpt/linux/upnp_tv_ctrlpt_main.c
common/tv_ctrlpt.c \
common/tv_ctrlpt.h \
linux/tv_ctrlpt_main.c
upnp_tv_combo_SOURCES = \
tv_combo_SOURCES = \
common/sample_util.c \
common/sample_util.h \
tvcombo/upnp_tv_ctrlpt.c \
tvcombo/upnp_tv_ctrlpt.h \
tvcombo/upnp_tv_device.c \
tvcombo/upnp_tv_device.h \
tvcombo/linux/upnp_tv_combo_main.c
common/tv_ctrlpt.c \
common/tv_ctrlpt.h \
common/tv_device.c \
common/tv_device.h \
linux/tv_combo_main.c
if WITH_DOCUMENTATION
examplesdir = $(docdir)/examples
examples_DATA = \
$(upnp_tv_ctrlpt_SOURCES) \
$(upnp_tv_device_SOURCES)
$(tv_ctrlpt_SOURCES) \
$(tv_device_SOURCES)
endif
EXTRA_DIST = \
web/tvcombodesc.xml \
web/tvcontrolSCPD.xml \

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +1,68 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
#ifndef SAMPLE_UTIL_H
#define SAMPLE_UTIL_H
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
/*!
* \defgroup UpnpSamples Sample Code
*
* @{
*
* \file
*/
#ifdef __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */
#include "ithread.h"
#include "ixml.h" /* for IXML_Document, IXML_Element */
#include "upnp.h" /* for Upnp_EventType */
#include "upnptools.h"
#include <stdlib.h>
#include <string.h>
#include "upnptools.h"
#include "ithread.h"
#include "ixml.h"
#ifdef SAMPLE_UTIL_C
/*! Service types for tv services. */
const char *TvServiceType[] = {
"urn:schemas-upnp-org:service:tvcontrol:1",
"urn:schemas-upnp-org:service:tvpicture:1"
};
#else /* SAMPLE_UTIL_C */
extern const char *TvServiceType[];
#endif /* SAMPLE_UTIL_C */
//mutex to control displaying of events
/* mutex to control displaying of events */
extern ithread_mutex_t display_mutex;
typedef enum {
@ -54,215 +72,198 @@ typedef enum {
GET_VAR_COMPLETE = 3
} eventType;
/********************************************************************************
* SampleUtil_GetElementValue
*
* Description:
* Given a DOM node such as <Channel>11</Channel>, this routine
/*!
* \brief Given a DOM node such as <Channel>11</Channel>, this routine
* extracts the value (e.g., 11) from the node and returns it as
* a string. The string must be freed by the caller using
* free.
* a string. The string must be freed by the caller using free.
*
* Parameters:
* node -- The DOM node from which to extract the value
*
********************************************************************************/
char * SampleUtil_GetElementValue(IN IXML_Element *element);
* \return The DOM node as a string.
*/
char *SampleUtil_GetElementValue(
/*! [in] The DOM node from which to extract the value. */
IXML_Element *element);
/********************************************************************************
* SampleUtil_GetFirstServiceList
*
* Description:
* Given a DOM node representing a UPnP Device Description Document,
/*!
* \brief Given a DOM node representing a UPnP Device Description Document,
* this routine parses the document and finds the first service list
* (i.e., the service list for the root device). The service list
* is returned as a DOM node list. The NodeList must be freed using
* NodeList_free.
*
* Parameters:
* node -- The DOM node from which to extract the service list
*
********************************************************************************/
* \return The service list is returned as a DOM node list.
*/
IXML_NodeList *SampleUtil_GetFirstServiceList(
/*! [in] The DOM node from which to extract the service list. */
IXML_Document *doc);
IXML_NodeList *SampleUtil_GetFirstServiceList(IN IXML_Document * doc);
/********************************************************************************
* SampleUtil_GetFirstDocumentItem
*
* Description:
* Given a document node, this routine searches for the first element
/*!
* \brief Given a document node, this routine searches for the first element
* named by the input string item, and returns its value as a string.
* String must be freed by caller using free.
* Parameters:
* doc -- The DOM document from which to extract the value
* item -- The item to search for
*
********************************************************************************/
char * SampleUtil_GetFirstDocumentItem(IN IXML_Document *doc, IN const char *item);
*/
char *SampleUtil_GetFirstDocumentItem(
/*! [in] The DOM document from which to extract the value. */
IXML_Document *doc,
/*! [in] The item to search for. */
const char *item);
/********************************************************************************
* SampleUtil_GetFirstElementItem
*
* Description:
* Given a DOM element, this routine searches for the first element
/*!
* \brief Given a DOM element, this routine searches for the first element
* named by the input string item, and returns its value as a string.
* The string must be freed using free.
* Parameters:
* node -- The DOM element from which to extract the value
* item -- The item to search for
*
********************************************************************************/
char * SampleUtil_GetFirstElementItem(IN IXML_Element *element, IN const char *item);
*/
char *SampleUtil_GetFirstElementItem(
/*! [in] The DOM element from which to extract the value. */
IXML_Element *element,
/*! [in] The item to search for. */
const char *item);
/********************************************************************************
* SampleUtil_PrintEventType
*
* Description:
* Prints a callback event type as a string.
*
* Parameters:
* S -- The callback event
*
********************************************************************************/
void SampleUtil_PrintEventType(IN Upnp_EventType S);
/*!
* \brief Prints a callback event type as a string.
*/
void SampleUtil_PrintEventType(
/*! [in] The callback event. */
Upnp_EventType S);
/********************************************************************************
* SampleUtil_PrintEvent
*
* Description:
* Prints callback event structure details.
*
* Parameters:
* EventType -- The type of callback event
* Event -- The callback event structure
*
********************************************************************************/
int SampleUtil_PrintEvent(IN Upnp_EventType EventType,
IN void *Event);
/*!
* \brief Prints callback event structure details.
*/
int SampleUtil_PrintEvent(
/*! [in] The type of callback event. */
Upnp_EventType EventType,
/*! [in] The callback event structure. */
void *Event);
/********************************************************************************
* SampleUtil_FindAndParseService
*
* Description:
* This routine finds the first occurance of a service in a DOM representation
* of a description document and parses it. Note that this function currently
* assumes that the eventURL and controlURL values in the service definitions
* are full URLs. Relative URLs are not handled here.
*
* Parameters:
* DescDoc -- The DOM description document
* location -- The location of the description document
* serviceSearchType -- The type of service to search for
* serviceId -- OUT -- The service ID
* eventURL -- OUT -- The event URL for the service
* controlURL -- OUT -- The control URL for the service
*
********************************************************************************/
int SampleUtil_FindAndParseService (IN IXML_Document *DescDoc, IN char* location,
IN char *serviceType, OUT char **serviceId,
OUT char **eventURL, OUT char **controlURL);
/*!
* \brief This routine finds the first occurance of a service in a DOM
* representation of a description document and parses it. Note that this
* function currently assumes that the eventURL and controlURL values in
* the service definitions are full URLs. Relative URLs are not handled here.
*/
int SampleUtil_FindAndParseService (
/*! [in] The DOM description document. */
IXML_Document *DescDoc,
/*! [in] The location of the description document. */
const char *location,
/*! [in] The type of service to search for. */
const char *serviceType,
/*! [out] The service ID. */
char **serviceId,
/*! [out] The event URL for the service. */
char **eventURL,
/*! [out] The control URL for the service. */
char **controlURL);
/********************************************************************************
* print_string
*
* Description:
* Prototype for displaying strings. All printing done by the device,
/*!
* \brief Prototype for displaying strings. All printing done by the device,
* control point, and sample util, ultimately use this to display strings
* to the user.
*
* Parameters:
* const char * string.
*
********************************************************************************/
typedef void (*print_string)(const char *string);
*/
typedef void (*print_string)(
/*! [in] Format. */
const char *string,
/*! [in] Arguments. */
...)
#if (__GNUC__ >= 3)
/* This enables printf like format checking by the compiler */
__attribute__((format (__printf__, 1, 2)))
#endif
;
//global print function used by sample util
/*! global print function used by sample util */
extern print_string gPrintFun;
/********************************************************************************
* state_update
*
* Description:
* Prototype for passing back state changes
*
* Parameters:
* const char * varName
* const char * varValue
* const char * UDN
* int newDevice
********************************************************************************/
typedef void (*state_update)( const char *varName, const char *varValue, const char *UDN,
/*!
* \brief Prototype for passing back state changes.
*/
typedef void (*state_update)(
/*! [in] . */
const char *varName,
/*! [in] . */
const char *varValue,
/*! [in] . */
const char *UDN,
/*! [in] . */
eventType type);
//global state update function used by smaple util
/*! global state update function used by smaple util */
extern state_update gStateUpdateFun;
/********************************************************************************
* SampleUtil_Initialize
*
* Description:
* Initializes the sample util. Must be called before any sample util
/*!
* \brief Initializes the sample util. Must be called before any sample util
* functions. May be called multiple times.
*
* Parameters:
* print_function - print function to use in SampleUtil_Print
*
********************************************************************************/
int SampleUtil_Initialize(print_string print_function);
*/
int SampleUtil_Initialize(
/*! [in] Print function to use in SampleUtil_Print. */
print_string print_function);
/********************************************************************************
* SampleUtil_Finish
*
* Description:
* Releases Resources held by sample util.
*
* Parameters:
*
********************************************************************************/
int SampleUtil_Finish(void);
/*!
* \brief Releases Resources held by sample util.
*/
int SampleUtil_Finish();
/********************************************************************************
* SampleUtil_Print
*
* Description:
* Function emulating printf that ultimately calls the registered print
/*!
* \brief Function emulating printf that ultimately calls the registered print
* function with the formatted string.
*
* Parameters:
* fmt - format (see printf)
* . . . - variable number of args. (see printf)
* Provides platform-specific print functionality. This function should be
* called when you want to print content suitable for console output (i.e.,
* in a large text box or on a screen). If your device/operating system is
* not supported here, you should add a port.
*
********************************************************************************/
int SampleUtil_Print( char *fmt, ... );
* \return The same as printf.
*/
int SampleUtil_Print(
/*! [in] Format (see printf). */
const char *fmt,
/*! [in] Format data. */
...)
#if (__GNUC__ >= 3)
/* This enables printf like format checking by the compiler */
__attribute__((format (__printf__, 1, 2)))
#endif
;
/********************************************************************************
* SampleUtil_RegisterUpdateFunction
*
* Description:
*
* Parameters:
*
********************************************************************************/
int SampleUtil_RegisterUpdateFunction( state_update update_function );
/*!
* \brief
*/
int SampleUtil_RegisterUpdateFunction(
/*! [in] . */
state_update update_function);
/********************************************************************************
* SampleUtil_StateUpdate
*
* Description:
*
* Parameters:
*
********************************************************************************/
void SampleUtil_StateUpdate( const char *varName, const char *varValue, const char *UDN,
/*!
* \brief
*/
void SampleUtil_StateUpdate(
/*! [in] . */
const char *varName,
/*! [in] . */
const char *varValue,
/*! [in] . */
const char *UDN,
/*! [in] . */
eventType type);
/*!
* \brief Prints a string to standard out.
*/
void linux_print(const char *format, ...)
#if (__GNUC__ >= 3)
/* This enables printf like format checking by the compiler */
__attribute__((format (__printf__, 1, 2)))
#endif
;
#ifdef __cplusplus
};
#endif /* __cplusplus */
#ifdef WIN32
#define snprintf _snprintf
#define strcasecmp stricmp
#endif
#endif /* UPNPSDK_UTIL_H */
/*! @} UpnpSamples */
#endif /* SAMPLE_UTIL_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,225 @@
#ifndef UPNP_TV_CTRLPT_H
#define UPNP_TV_CTRLPT_H
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
/*!
* \addtogroup UpnpSamples
*
* @{
*
* \name Contro Point Sample API
*
* @{
*
* \file
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "sample_util.h"
#include "upnp.h"
#include "UpnpString.h"
#include "upnptools.h"
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#define TV_SERVICE_SERVCOUNT 2
#define TV_SERVICE_CONTROL 0
#define TV_SERVICE_PICTURE 1
#define TV_CONTROL_VARCOUNT 3
#define TV_CONTROL_POWER 0
#define TV_CONTROL_CHANNEL 1
#define TV_CONTROL_VOLUME 2
#define TV_PICTURE_VARCOUNT 4
#define TV_PICTURE_COLOR 0
#define TV_PICTURE_TINT 1
#define TV_PICTURE_CONTRAST 2
#define TV_PICTURE_BRIGHTNESS 3
#define TV_MAX_VAL_LEN 5
#define TV_SUCCESS 0
#define TV_ERROR (-1)
#define TV_WARNING 1
/* This should be the maximum VARCOUNT from above */
#define TV_MAXVARS TV_PICTURE_VARCOUNT
extern const char *TvServiceName[];
extern const char *TvVarName[TV_SERVICE_SERVCOUNT][TV_MAXVARS];
extern char TvVarCount[];
struct tv_service {
char ServiceId[NAME_SIZE];
char ServiceType[NAME_SIZE];
char *VariableStrVal[TV_MAXVARS];
char EventURL[NAME_SIZE];
char ControlURL[NAME_SIZE];
char SID[NAME_SIZE];
};
extern struct TvDeviceNode *GlobalDeviceList;
struct TvDevice {
char UDN[250];
char DescDocURL[250];
char FriendlyName[250];
char PresURL[250];
int AdvrTimeOut;
struct tv_service TvService[TV_SERVICE_SERVCOUNT];
};
struct TvDeviceNode {
struct TvDevice device;
struct TvDeviceNode *next;
};
extern ithread_mutex_t DeviceListMutex;
extern UpnpClient_Handle ctrlpt_handle;
void TvCtrlPointPrintHelp(void);
int TvCtrlPointDeleteNode(struct TvDeviceNode *);
int TvCtrlPointRemoveDevice(const char *);
int TvCtrlPointRemoveAll(void);
int TvCtrlPointRefresh(void);
int TvCtrlPointSendAction(int, int, const char *, const char **, char **, int);
int TvCtrlPointSendActionNumericArg(int devnum, int service, const char *actionName, const char *paramName, int paramValue);
int TvCtrlPointSendPowerOn(int devnum);
int TvCtrlPointSendPowerOff(int devnum);
int TvCtrlPointSendSetChannel(int, int);
int TvCtrlPointSendSetVolume(int, int);
int TvCtrlPointSendSetColor(int, int);
int TvCtrlPointSendSetTint(int, int);
int TvCtrlPointSendSetContrast(int, int);
int TvCtrlPointSendSetBrightness(int, int);
int TvCtrlPointGetVar(int, int, const char *);
int TvCtrlPointGetPower(int devnum);
int TvCtrlPointGetChannel(int);
int TvCtrlPointGetVolume(int);
int TvCtrlPointGetColor(int);
int TvCtrlPointGetTint(int);
int TvCtrlPointGetContrast(int);
int TvCtrlPointGetBrightness(int);
int TvCtrlPointGetDevice(int, struct TvDeviceNode **);
int TvCtrlPointPrintList(void);
int TvCtrlPointPrintDevice(int);
void TvCtrlPointAddDevice(IXML_Document *, const char *, int);
void TvCtrlPointHandleGetVar(const char *, const char *, const DOMString);
/*!
* \brief Update a Tv state table. Called when an event is received.
*
* Note: this function is NOT thread save. It must be called from another
* function that has locked the global device list.
**/
void TvStateUpdate(
/*! [in] The UDN of the parent device. */
char *UDN,
/*! [in] The service state table to update. */
int Service,
/*! [out] DOM document representing the XML received with the event. */
IXML_Document *ChangedVariables,
/*! [out] pointer to the state table for the Tv service to update. */
char **State);
void TvCtrlPointHandleEvent(const char *, int, IXML_Document *);
void TvCtrlPointHandleSubscribeUpdate(const char *, const Upnp_SID, int);
int TvCtrlPointCallbackEventHandler(Upnp_EventType, void *, void *);
/*!
* \brief Checks the advertisement each device in the global device list.
*
* If an advertisement expires, the device is removed from the list.
*
* If an advertisement is about to expire, a search request is sent for that
* device.
*/
void TvCtrlPointVerifyTimeouts(
/*! [in] The increment to subtract from the timeouts each time the
* function is called. */
int incr);
void TvCtrlPointPrintCommands(void);
void* TvCtrlPointCommandLoop(void *);
int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionPtr, int combo);
int TvCtrlPointStop(void);
int TvCtrlPointProcessCommand(char *cmdline);
/*!
* \brief Print help info for this application.
*/
void TvCtrlPointPrintShortHelp(void);
/*!
* \brief Print long help info for this application.
*/
void TvCtrlPointPrintLongHelp(void);
/*!
* \briefPrint the list of valid command line commands to the user
*/
void TvCtrlPointPrintCommands(void);
/*!
* \brief Function that receives commands from the user at the command prompt
* during the lifetime of the device, and calls the appropriate
* functions for those commands.
*/
void *TvCtrlPointCommandLoop(void *args);
/*!
* \brief
*/
int TvCtrlPointProcessCommand(char *cmdline);
#ifdef __cplusplus
};
#endif
/*! @} Device Sample */
/*! @} UpnpSamples */
#endif /* UPNP_TV_CTRLPT_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,571 @@
#ifndef UPNP_TV_DEVICE_H
#define UPNP_TV_DEVICE_H
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
/*!
* \addtogroup UpnpSamples
*
* @{
*
* \name Device Sample API
*
* @{
*
* \file
*/
#include <stdio.h>
#include <signal.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "sample_util.h"
#include "ithread.h"
#include "upnp.h"
#include <stdlib.h>
#include <string.h>
/*! Color constants */
#define MAX_COLOR 10
#define MIN_COLOR 1
/*! Brightness constants */
#define MAX_BRIGHTNESS 10
#define MIN_BRIGHTNESS 1
/*! Power constants */
#define POWER_ON 1
#define POWER_OFF 0
/*! Tint constants */
#define MAX_TINT 10
#define MIN_TINT 1
/*! Volume constants */
#define MAX_VOLUME 10
#define MIN_VOLUME 1
/*! Contrast constants */
#define MAX_CONTRAST 10
#define MIN_CONTRAST 1
/*! Channel constants */
#define MAX_CHANNEL 100
#define MIN_CHANNEL 1
/*! Number of services. */
#define TV_SERVICE_SERVCOUNT 2
/*! Index of control service */
#define TV_SERVICE_CONTROL 0
/*! Index of picture service */
#define TV_SERVICE_PICTURE 1
/*! Number of control variables */
#define TV_CONTROL_VARCOUNT 3
/*! Index of power variable */
#define TV_CONTROL_POWER 0
/*! Index of channel variable */
#define TV_CONTROL_CHANNEL 1
/*! Index of volume variable */
#define TV_CONTROL_VOLUME 2
/*! Number of picture variables */
#define TV_PICTURE_VARCOUNT 4
/*! Index of color variable */
#define TV_PICTURE_COLOR 0
/*! Index of tint variable */
#define TV_PICTURE_TINT 1
/*! Index of contrast variable */
#define TV_PICTURE_CONTRAST 2
/*! Index of brightness variable */
#define TV_PICTURE_BRIGHTNESS 3
/*! Max value length */
#define TV_MAX_VAL_LEN 5
/*! Max actions */
#define TV_MAXACTIONS 12
/*! This should be the maximum VARCOUNT from above */
#define TV_MAXVARS TV_PICTURE_VARCOUNT
/*!
* \brief Prototype for all actions. For each action that a service
* implements, there is a corresponding function with this prototype.
*
* Pointers to these functions, along with action names, are stored
* in the service table. When an action request comes in the action
* name is matched, and the appropriate function is called.
* Each function returns UPNP_E_SUCCESS, on success, and a nonzero
* error code on failure.
*/
typedef int (*upnp_action)(
/*! [in] Document of action request. */
IXML_Document *request,
/*! [out] Action result. */
IXML_Document **out,
/*! [out] Error string in case action was unsuccessful. */
const char **errorString);
/*! Structure for storing Tv Service identifiers and state table. */
struct TvService {
/*! Universally Unique Device Name. */
char UDN[NAME_SIZE];
/*! . */
char ServiceId[NAME_SIZE];
/*! . */
char ServiceType[NAME_SIZE];
/*! . */
const char *VariableName[TV_MAXVARS];
/*! . */
char *VariableStrVal[TV_MAXVARS];
/*! . */
const char *ActionNames[TV_MAXACTIONS];
/*! . */
upnp_action actions[TV_MAXACTIONS];
/*! . */
int VariableCount;
};
/*! Array of service structures */
extern struct TvService tv_service_table[];
/*! Device handle returned from sdk */
extern UpnpDevice_Handle device_handle;
/*! Mutex for protecting the global state table data
* in a multi-threaded, asynchronous environment.
* All functions should lock this mutex before reading
* or writing the state table data. */
extern ithread_mutex_t TVDevMutex;
/*!
* \brief Initializes the action table for the specified service.
*
* Note that knowledge of the service description is assumed.
* Action names are hardcoded.
*/
int SetActionTable(
/*! [in] one of TV_SERVICE_CONTROL or, TV_SERVICE_PICTURE. */
int serviceType,
/*! [in,out] service containing action table to set. */
struct TvService *out);
/*!
* \brief Initialize the device state table for this TvDevice, pulling
* identifier info from the description Document.
*
* Note that knowledge of the service description is assumed.
* State table variables and default values are currently hardcoded in
* this file rather than being read from service description documents.
*/
int TvDeviceStateTableInit(
/*! [in] The description document URL. */
char *DescDocURL);
/*!
* \brief Called during a subscription request callback.
*
* If the subscription request is for this device and either its
* control service or picture service, then accept it.
*/
int TvDeviceHandleSubscriptionRequest(
/*! [in] The subscription request event structure. */
struct Upnp_Subscription_Request *sr_event);
/*!
* \brief Called during a get variable request callback.
*
* If the request is for this device and either its control service or
* picture service, then respond with the variable value.
*/
int TvDeviceHandleGetVarRequest(
/*! [in,out] The control get variable request event structure. */
struct Upnp_State_Var_Request *cgv_event);
/*!
* \brief Called during an action request callback.
*
* If the request is for this device and either its control service
* or picture service, then perform the action and respond.
*/
int TvDeviceHandleActionRequest(
/*! [in,out] The control action request event structure. */
struct Upnp_Action_Request *ca_event);
/*!
* \brief The callback handler registered with the SDK while registering
* root device.
*
* Dispatches the request to the appropriate procedure
* based on the value of EventType. The four requests handled by the
* device are:
* \li 1) Event Subscription requests.
* \li 2) Get Variable requests.
* \li 3) Action requests.
*/
int TvDeviceCallbackEventHandler(
/*! [in] The type of callback event. */
Upnp_EventType,
/*! [in] Data structure containing event data. */
void *Event,
/*! [in] Optional data specified during callback registration. */
void *Cookie);
/*!
* \brief Update the TvDevice service state table, and notify all subscribed
* control points of the updated state.
*
* Note that since this function blocks on the mutex TVDevMutex,
* to avoid a hang this function should not be called within any other
* function that currently has this mutex locked.
*/
int TvDeviceSetServiceTableVar(
/*! [in] The service number (TV_SERVICE_CONTROL or TV_SERVICE_PICTURE). */
unsigned int service,
/*! [in] The variable number (TV_CONTROL_POWER, TV_CONTROL_CHANNEL,
* TV_CONTROL_VOLUME, TV_PICTURE_COLOR, TV_PICTURE_TINT,
* TV_PICTURE_CONTRAST, or TV_PICTURE_BRIGHTNESS). */
int variable,
/*! [in] The string representation of the new value. */
char *value);
/* Control Service Actions */
/*!
* \brief Turn the power on.
*/
int TvDevicePowerOn(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Turn the power off.
*/
int TvDevicePowerOff(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Change the channel, update the TvDevice control service
* state table, and notify all subscribed control points of the
* updated state.
*/
int TvDeviceSetChannel(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Increase the channel.
*/
int TvDeviceIncreaseChannel(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Decrease the channel.
*/
int TvDeviceDecreaseChannel(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Change the volume, update the TvDevice control service
* state table, and notify all subscribed control points of the
* updated state.
*/
int TvDeviceSetVolume(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Increase the volume.
*/
int TvDeviceIncreaseVolume(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Decrease the volume.
*/
int TvDeviceDecreaseVolume(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*Picture Service Actions */
/*!
* \brief Change the color, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*/
int TvDeviceSetColor(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Increase the color.
*/
int TvDeviceIncreaseColor(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Decrease the color.
*/
int TvDeviceDecreaseColor(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Change the tint, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*/
int TvDeviceSetTint(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Increase tint.
*/
int TvDeviceIncreaseTint(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Decrease tint.
*/
int TvDeviceDecreaseTint(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Change the contrast, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*/
int TvDeviceSetContrast(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Increase the contrast.
*/
int TvDeviceIncreaseContrast(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Decrease the contrast.
*/
int TvDeviceDecreaseContrast(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Change the brightness, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*/
int TvDeviceSetBrightness(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Increase brightnesss.
*/
int TvDeviceIncreaseBrightness(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Decrease brightnesss.
*/
int TvDeviceDecreaseBrightness(
/*! [in] Document of action request. */
IXML_Document *in,
/*! [in] Action result. */
IXML_Document **out,
/*! [out] ErrorString in case action was unsuccessful. */
const char **errorString);
/*!
* \brief Initializes the UPnP Sdk, registers the device, and sends out
* advertisements.
*/
int TvDeviceStart(
/*! [in] ip address to initialize the sdk (may be NULL)
* if null, then the first non null loopback address is used. */
char *ip_address,
/*! [in] port number to initialize the sdk (may be 0)
* if zero, then a random number is used. */
unsigned short port,
/*! [in] name of description document.
* may be NULL. Default is tvdevicedesc.xml. */
const char *desc_doc_name,
/*! [in] path of web directory.
* may be NULL. Default is ./web (for Linux) or ../tvdevice/web. */
const char *web_dir_path,
/*! [in] print function to use. */
print_string pfun,
/*! [in] Non-zero if called from the combo application. */
int combo);
/*!
* \brief Stops the device. Uninitializes the sdk.
*/
int TvDeviceStop(void);
/*!
* \brief Function that receives commands from the user at the command prompt
* during the lifetime of the device, and calls the appropriate
* functions for those commands. Only one command, exit, is currently
* defined.
*/
void *TvDeviceCommandLoop(void *args);
/*!
* \brief Main entry point for tv device application.
*
* Initializes and registers with the sdk.
* Initializes the state stables of the service.
* Starts the command loop.
*
* Accepts the following optional arguments:
* \li \c -ip ipaddress
* \li \c -port port
* \li \c -desc desc_doc_name
* \li \c -webdir web_dir_path
* \li \c -help
*/
int device_main(int argc, char *argv[]);
#ifdef __cplusplus
}
#endif
/*! @} Control Point Sample API */
/*! @} UpnpSamples */
#endif /* UPNP_TV_DEVICE_H */

View File

@ -0,0 +1,75 @@
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include "sample_util.h"
#include "tv_ctrlpt.h"
#include "tv_device.h"
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
int rc;
ithread_t cmdloop_thread;
#ifdef WIN32
#else
int sig;
sigset_t sigs_to_catch;
#endif
int code;
device_main(argc, argv);
rc = TvCtrlPointStart(linux_print, NULL, 1);
if (rc != TV_SUCCESS) {
SampleUtil_Print("Error starting UPnP TV Control Point\n");
return rc;
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
if (code != 0) {
return UPNP_E_INTERNAL_ERROR;
}
#ifdef WIN32
ithread_join(cmdloop_thread, NULL);
#else
/* Catch Ctrl-C and properly shutdown */
sigemptyset(&sigs_to_catch);
sigaddset(&sigs_to_catch, SIGINT);
sigwait(&sigs_to_catch, &sig);
SampleUtil_Print("Shutting down on signal %d...\n", sig);
#endif
TvDeviceStop();
rc = TvCtrlPointStop();
return rc;
}

View File

@ -0,0 +1,75 @@
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include "sample_util.h"
#include "tv_ctrlpt.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
int rc;
ithread_t cmdloop_thread;
#ifdef WIN32
#else
int sig;
sigset_t sigs_to_catch;
#endif
int code;
rc = TvCtrlPointStart(linux_print, NULL, 0);
if (rc != TV_SUCCESS) {
SampleUtil_Print("Error starting UPnP TV Control Point\n");
return rc;
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
if (code != 0) {
return UPNP_E_INTERNAL_ERROR;
}
#ifdef WIN32
ithread_join(cmdloop_thread, NULL);
#else
/* Catch Ctrl-C and properly shutdown */
sigemptyset(&sigs_to_catch);
sigaddset(&sigs_to_catch, SIGINT);
sigwait(&sigs_to_catch, &sig);
SampleUtil_Print("Shutting down on signal %d...\n", sig);
#endif
rc = TvCtrlPointStop();
return rc;
argc = argc;
argv = argv;
}

View File

@ -6,12 +6,12 @@
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither name of Intel Corporation nor the names of its contributors
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@ -29,38 +29,44 @@
*
******************************************************************************/
#include "sample_util.h"
#include "tv_device.h"
#include <stdarg.h>
#include <stdio.h>
#define EXPORT
#ifdef __cplusplus
extern "C" {
#endif
/**
* Allocates enough memory for the
* Formatted string, up to max
* specified.
* With max set to -1, allocates
* as much size as needed.
* Memory must be freed using free.
*/
EXPORT int iasnprintf(char **ret,
int incr,
int max,
const char * fmt, ...)
#ifndef SPARC_SOLARIS
#if (__GNUC__ >= 3)
__attribute__((format (__printf__, 4, 5)));
int main(int argc, char *argv[])
{
int rc;
ithread_t cmdloop_thread;
#ifdef WIN32
#else
;
#endif
EXPORT void iasnprintfFree(char *);
#else
;
int sig;
sigset_t sigs_to_catch;
#endif
int code;
#ifdef __cplusplus
rc = device_main(argc, argv);
if (rc != UPNP_E_SUCCESS) {
return rc;
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvDeviceCommandLoop, NULL);
if (code != 0) {
return UPNP_E_INTERNAL_ERROR;
}
#ifdef WIN32
ithread_join(cmdloop_thread, NULL);
#else
/* Catch Ctrl-C and properly shutdown */
sigemptyset(&sigs_to_catch);
sigaddset(&sigs_to_catch, SIGINT);
sigwait(&sigs_to_catch, &sig);
SampleUtil_Print("Shutting down on signal %d...\n", sig);
#endif
rc = TvDeviceStop();
return rc;
}

View File

@ -1,489 +0,0 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
#include "sample_util.h"
#include "upnp_tv_ctrlpt.h"
#include "upnp_tv_device.h"
#include <stdio.h>
#include <string.h>
/*
Tags for valid commands issued at the command prompt
*/
enum cmdloop_tvcmds {
PRTHELP = 0, PRTFULLHELP, POWON, POWOFF,
SETCHAN, SETVOL, SETCOL, SETTINT, SETCONT, SETBRT,
CTRLACTION, PICTACTION, CTRLGETVAR, PICTGETVAR,
PRTDEV, LSTDEV, REFRESH, EXITCMD
};
/*
Data structure for parsing commands from the command line
*/
struct cmdloop_commands {
char *str; // the string
int cmdnum; // the command
int numargs; // the number of arguments
char *args; // the args
} cmdloop_commands;
/*
Mappings between command text names, command tag,
and required command arguments for command line
commands
*/
static struct cmdloop_commands cmdloop_cmdlist[] = {
{"Help", PRTHELP, 1, ""},
{"HelpFull", PRTFULLHELP, 1, ""},
{"ListDev", LSTDEV, 1, ""},
{"Refresh", REFRESH, 1, ""},
{"PrintDev", PRTDEV, 2, "<devnum>"},
{"PowerOn", POWON, 2, "<devnum>"},
{"PowerOff", POWOFF, 2, "<devnum>"},
{"SetChannel", SETCHAN, 3, "<devnum> <channel (int)>"},
{"SetVolume", SETVOL, 3, "<devnum> <volume (int)>"},
{"SetColor", SETCOL, 3, "<devnum> <color (int)>"},
{"SetTint", SETTINT, 3, "<devnum> <tint (int)>"},
{"SetContrast", SETCONT, 3, "<devnum> <contrast (int)>"},
{"SetBrightness", SETBRT, 3, "<devnum> <brightness (int)>"},
{"CtrlAction", CTRLACTION, 2, "<devnum> <action (string)>"},
{"PictAction", PICTACTION, 2, "<devnum> <action (string)>"},
{"CtrlGetVar", CTRLGETVAR, 2, "<devnum> <varname (string)>"},
{"PictGetVar", PICTGETVAR, 2, "<devnum> <varname (string)>"},
{"Exit", EXITCMD, 1, ""}
};
void
linux_print( const char *string )
{
puts( string );
}
/********************************************************************************
* TvCtrlPointPrintHelp
*
* Description:
* Print help info for this application.
********************************************************************************/
void
TvCtrlPointPrintShortHelp( void )
{
SampleUtil_Print( "Commands:" );
SampleUtil_Print( " Help" );
SampleUtil_Print( " HelpFull" );
SampleUtil_Print( " ListDev" );
SampleUtil_Print( " Refresh" );
SampleUtil_Print( " PrintDev <devnum>" );
SampleUtil_Print( " PowerOn <devnum>" );
SampleUtil_Print( " PowerOff <devnum>" );
SampleUtil_Print( " SetChannel <devnum> <channel>" );
SampleUtil_Print( " SetVolume <devnum> <volume>" );
SampleUtil_Print( " SetColor <devnum> <color>" );
SampleUtil_Print( " SetTint <devnum> <tint>" );
SampleUtil_Print( " SetContrast <devnum> <contrast>" );
SampleUtil_Print( " SetBrightness <devnum> <brightness>" );
SampleUtil_Print( " CtrlAction <devnum> <action>" );
SampleUtil_Print( " PictAction <devnum> <action>" );
SampleUtil_Print( " CtrlGetVar <devnum> <varname>" );
SampleUtil_Print( " PictGetVar <devnum> <action>" );
SampleUtil_Print( " Exit" );
}
void
TvCtrlPointPrintLongHelp( void )
{
SampleUtil_Print( "" );
SampleUtil_Print( "******************************" );
SampleUtil_Print( "* TV Control Point Help Info *" );
SampleUtil_Print( "******************************" );
SampleUtil_Print( "" );
SampleUtil_Print( "This sample control point application automatically searches" );
SampleUtil_Print( "for and subscribes to the services of television device emulator" );
SampleUtil_Print( "devices. While registers a tv device itself." );
SampleUtil_Print( "" );
SampleUtil_Print( "Commands:" );
SampleUtil_Print( " Help" );
SampleUtil_Print( " Print this help info." );
SampleUtil_Print( " ListDev" );
SampleUtil_Print( " Print the current list of TV Device Emulators that this" );
SampleUtil_Print( " control point is aware of. Each device is preceded by a" );
SampleUtil_Print( " device number which corresponds to the devnum argument of" );
SampleUtil_Print( " commands listed below." );
SampleUtil_Print( " Refresh" );
SampleUtil_Print( " Delete all of the devices from the device list and issue new" );
SampleUtil_Print( " search request to rebuild the list from scratch." );
SampleUtil_Print( " PrintDev <devnum>" );
SampleUtil_Print( " Print the state table for the device <devnum>." );
SampleUtil_Print( " e.g., 'PrintDev 1' prints the state table for the first" );
SampleUtil_Print( " device in the device list." );
SampleUtil_Print( " PowerOn <devnum>" );
SampleUtil_Print( " Sends the PowerOn action to the Control Service of" );
SampleUtil_Print( " device <devnum>." );
SampleUtil_Print( " PowerOff <devnum>" );
SampleUtil_Print( " Sends the PowerOff action to the Control Service of" );
SampleUtil_Print( " device <devnum>." );
SampleUtil_Print( " SetChannel <devnum> <channel>" );
SampleUtil_Print( " Sends the SetChannel action to the Control Service of" );
SampleUtil_Print( " device <devnum>, requesting the channel to be changed" );
SampleUtil_Print( " to <channel>." );
SampleUtil_Print( " SetVolume <devnum> <volume>" );
SampleUtil_Print( " Sends the SetVolume action to the Control Service of" );
SampleUtil_Print( " device <devnum>, requesting the volume to be changed" );
SampleUtil_Print( " to <volume>." );
SampleUtil_Print( " SetColor <devnum> <color>" );
SampleUtil_Print( " Sends the SetColor action to the Control Service of" );
SampleUtil_Print( " device <devnum>, requesting the color to be changed" );
SampleUtil_Print( " to <color>." );
SampleUtil_Print( " SetTint <devnum> <tint>" );
SampleUtil_Print( " Sends the SetTint action to the Control Service of" );
SampleUtil_Print( " device <devnum>, requesting the tint to be changed" );
SampleUtil_Print( " to <tint>." );
SampleUtil_Print( " SetContrast <devnum> <contrast>" );
SampleUtil_Print( " Sends the SetContrast action to the Control Service of" );
SampleUtil_Print( " device <devnum>, requesting the contrast to be changed" );
SampleUtil_Print( " to <contrast>." );
SampleUtil_Print( " SetBrightness <devnum> <brightness>" );
SampleUtil_Print( " Sends the SetBrightness action to the Control Service of" );
SampleUtil_Print( " device <devnum>, requesting the brightness to be changed" );
SampleUtil_Print( " to <brightness>." );
SampleUtil_Print( " CtrlAction <devnum> <action>" );
SampleUtil_Print( " Sends an action request specified by the string <action>" );
SampleUtil_Print( " to the Control Service of device <devnum>. This command" );
SampleUtil_Print( " only works for actions that have no arguments." );
SampleUtil_Print( " (e.g., \"CtrlAction 1 IncreaseChannel\")" );
SampleUtil_Print( " PictAction <devnum> <action>" );
SampleUtil_Print( " Sends an action request specified by the string <action>" );
SampleUtil_Print( " to the Picture Service of device <devnum>. This command" );
SampleUtil_Print( " only works for actions that have no arguments." );
SampleUtil_Print( " (e.g., \"PictAction 1 DecreaseContrast\")" );
SampleUtil_Print( " CtrlGetVar <devnum> <varname>" );
SampleUtil_Print( " Requests the value of a variable specified by the string <varname>" );
SampleUtil_Print( " from the Control Service of device <devnum>." );
SampleUtil_Print( " (e.g., \"CtrlGetVar 1 Volume\")" );
SampleUtil_Print( " PictGetVar <devnum> <action>" );
SampleUtil_Print( " Requests the value of a variable specified by the string <varname>" );
SampleUtil_Print( " from the Picture Service of device <devnum>." );
SampleUtil_Print( " (e.g., \"PictGetVar 1 Tint\")" );
SampleUtil_Print( " Exit" );
SampleUtil_Print( " Exits the control point application." );
}
/********************************************************************************
* TvCtrlPointPrintCommands
*
* Description:
* Print the list of valid command line commands to the user
*
* Parameters:
* None
*
********************************************************************************/
void
TvCtrlPointPrintCommands()
{
int i;
int numofcmds = sizeof( cmdloop_cmdlist ) / sizeof( cmdloop_commands );
SampleUtil_Print( "Valid Commands:" );
for( i = 0; i < numofcmds; i++ ) {
SampleUtil_Print( " %-14s %s", cmdloop_cmdlist[i].str,
cmdloop_cmdlist[i].args );
}
SampleUtil_Print( "" );
}
/********************************************************************************
* TvCtrlPointCommandLoop
*
* Description:
* Function that receives commands from the user at the command prompt
* during the lifetime of the control point, and calls the appropriate
* functions for those commands.
*
* Parameters:
* None
*
********************************************************************************/
void *
TvCtrlPointCommandLoop( void *args )
{
char cmdline[100];
while( 1 ) {
SampleUtil_Print( "\n>> " );
fgets( cmdline, 100, stdin );
TvCtrlPointProcessCommand( cmdline );
}
return NULL;
}
int
TvCtrlPointProcessCommand( char *cmdline )
{
char cmd[100];
char strarg[100];
int arg_val_err = -99999;
int arg1 = arg_val_err;
int arg2 = arg_val_err;
int cmdnum = -1;
int numofcmds = sizeof( cmdloop_cmdlist ) / sizeof( cmdloop_commands );
int cmdfound = 0;
int i,
rc;
int invalidargs = 0;
int validargs;
validargs = sscanf( cmdline, "%s %d %d", cmd, &arg1, &arg2 );
for( i = 0; i < numofcmds; i++ ) {
if( strcasecmp( cmd, cmdloop_cmdlist[i].str ) == 0 ) {
cmdnum = cmdloop_cmdlist[i].cmdnum;
cmdfound++;
if( validargs != cmdloop_cmdlist[i].numargs )
invalidargs++;
break;
}
}
if( !cmdfound ) {
SampleUtil_Print( "Command not found; try 'Help'" );
return TV_SUCCESS;
}
if( invalidargs ) {
SampleUtil_Print( "Invalid arguments; try 'Help'" );
return TV_SUCCESS;
}
switch ( cmdnum ) {
case PRTHELP:
TvCtrlPointPrintShortHelp();
break;
case PRTFULLHELP:
TvCtrlPointPrintLongHelp();
break;
case POWON:
TvCtrlPointSendPowerOn( arg1 );
break;
case POWOFF:
TvCtrlPointSendPowerOff( arg1 );
break;
case SETCHAN:
TvCtrlPointSendSetChannel( arg1, arg2 );
break;
case SETVOL:
TvCtrlPointSendSetVolume( arg1, arg2 );
break;
case SETCOL:
TvCtrlPointSendSetColor( arg1, arg2 );
break;
case SETTINT:
TvCtrlPointSendSetTint( arg1, arg2 );
break;
case SETCONT:
TvCtrlPointSendSetContrast( arg1, arg2 );
break;
case SETBRT:
TvCtrlPointSendSetBrightness( arg1, arg2 );
break;
case CTRLACTION:
/*
re-parse commandline since second arg is string
*/
validargs = sscanf( cmdline, "%s %d %s", cmd, &arg1, strarg );
if( 3 == validargs )
TvCtrlPointSendAction( TV_SERVICE_CONTROL, arg1, strarg,
NULL, NULL, 0 );
else
invalidargs++;
break;
case PICTACTION:
/*
re-parse commandline since second arg is string
*/
validargs = sscanf( cmdline, "%s %d %s", cmd, &arg1, strarg );
if( 3 == validargs )
TvCtrlPointSendAction( TV_SERVICE_PICTURE, arg1, strarg,
NULL, NULL, 0 );
else
invalidargs++;
break;
case CTRLGETVAR:
/*
re-parse commandline since second arg is string
*/
validargs = sscanf( cmdline, "%s %d %s", cmd, &arg1, strarg );
if( 3 == validargs )
TvCtrlPointGetVar( TV_SERVICE_CONTROL, arg1, strarg );
else
invalidargs++;
break;
case PICTGETVAR:
/*
re-parse commandline since second arg is string
*/
validargs = sscanf( cmdline, "%s %d %s", cmd, &arg1, strarg );
if( 3 == validargs )
TvCtrlPointGetVar( TV_SERVICE_PICTURE, arg1, strarg );
else
invalidargs++;
break;
case PRTDEV:
TvCtrlPointPrintDevice( arg1 );
break;
case LSTDEV:
TvCtrlPointPrintList();
break;
case REFRESH:
TvCtrlPointRefresh();
break;
case EXITCMD:
rc = TvCtrlPointStop();
exit( rc );
break;
default:
SampleUtil_Print( "Command not implemented; see 'Help'" );
break;
}
if( invalidargs )
SampleUtil_Print( "Invalid args in command; see 'Help'" );
return TV_SUCCESS;
}
int
device_main( int argc, char **argv )
{
unsigned int portTemp = 0;
char *ip_address = NULL,
*desc_doc_name = NULL,
*web_dir_path = NULL;
unsigned int port = 0;
int i = 0;
SampleUtil_Initialize( linux_print );
// Parse options
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-ip" ) == 0 ) {
ip_address = argv[++i];
} else if( strcmp( argv[i], "-port" ) == 0 ) {
sscanf( argv[++i], "%u", &portTemp );
} else if( strcmp( argv[i], "-desc" ) == 0 ) {
desc_doc_name = argv[++i];
} else if( strcmp( argv[i], "-webdir" ) == 0 ) {
web_dir_path = argv[++i];
} else if( strcmp( argv[i], "-help" ) == 0 ) {
SampleUtil_Print( "Usage: %s -ip ipaddress -port port"
" -desc desc_doc_name -webdir web_dir_path"
" -help (this message)\n", argv[0] );
SampleUtil_Print( "\tipaddress: IP address of the device"
" (must match desc. doc)\n" );
SampleUtil_Print( "\t\te.g.: 192.168.0.4\n" );
SampleUtil_Print( "\tport: Port number to use for "
"receiving UPnP messages (must match desc. doc)\n" );
SampleUtil_Print( "\t\te.g.: 5431\n" );
SampleUtil_Print
( "\tdesc_doc_name: name of device description document\n" );
SampleUtil_Print( "\t\te.g.: tvcombodesc.xml\n" );
SampleUtil_Print
( "\tweb_dir_path: Filesystem path where web files "
"related to the device are stored\n" );
SampleUtil_Print( "\t\te.g.: /upnp/sample/web\n" );
return 1;
}
}
port = ( unsigned short )portTemp;
return TvDeviceStart(
ip_address, port, desc_doc_name, web_dir_path, linux_print );
}
int
main( int argc, char **argv )
{
int rc;
ithread_t cmdloop_thread;
int sig;
sigset_t sigs_to_catch;
int code;
device_main(argc, argv);
rc = TvCtrlPointStart( linux_print, NULL );
if( rc != TV_SUCCESS ) {
SampleUtil_Print( "Error starting UPnP TV Control Point" );
return rc;
}
// start a command loop thread
code =
ithread_create( &cmdloop_thread, NULL, TvCtrlPointCommandLoop,
NULL );
/*
Catch Ctrl-C and properly shutdown
*/
sigemptyset( &sigs_to_catch );
sigaddset( &sigs_to_catch, SIGINT );
sigwait( &sigs_to_catch, &sig );
SampleUtil_Print( "Shutting down on signal %d...", sig );
TvDeviceStop();
rc = TvCtrlPointStop();
return rc;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,158 +0,0 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
#ifndef UPNP_TV_CTRLPT_H
#define UPNP_TV_CTRLPT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include "ithread.h"
#include <unistd.h>
#include <stdarg.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include "upnp.h"
#include "upnptools.h"
#include "sample_util.h"
#define TV_SERVICE_SERVCOUNT 2
#define TV_SERVICE_CONTROL 0
#define TV_SERVICE_PICTURE 1
#define TV_CONTROL_VARCOUNT 3
#define TV_CONTROL_POWER 0
#define TV_CONTROL_CHANNEL 1
#define TV_CONTROL_VOLUME 2
#define TV_PICTURE_VARCOUNT 4
#define TV_PICTURE_COLOR 0
#define TV_PICTURE_TINT 1
#define TV_PICTURE_CONTRAST 2
#define TV_PICTURE_BRIGHTNESS 3
#define TV_MAX_VAL_LEN 5
#define TV_SUCCESS 0
#define TV_ERROR (-1)
#define TV_WARNING 1
/* This should be the maximum VARCOUNT from above */
#define TV_MAXVARS TV_PICTURE_VARCOUNT
extern char TvDeviceType[];
extern char *TvServiceType[];
extern char *TvServiceName[];
extern char *TvVarName[TV_SERVICE_SERVCOUNT][TV_MAXVARS];
extern char TvVarCount[];
struct tv_service {
char ServiceId[NAME_SIZE];
char ServiceType[NAME_SIZE];
char *VariableStrVal[TV_MAXVARS];
char EventURL[NAME_SIZE];
char ControlURL[NAME_SIZE];
char SID[NAME_SIZE];
};
extern struct TvDeviceNode *GlobalDeviceList;
struct TvDevice {
char UDN[250];
char DescDocURL[250];
char FriendlyName[250];
char PresURL[250];
int AdvrTimeOut;
struct tv_service TvService[TV_SERVICE_SERVCOUNT];
};
struct TvDeviceNode {
struct TvDevice device;
struct TvDeviceNode *next;
};
extern ithread_mutex_t DeviceListMutex;
extern UpnpClient_Handle ctrlpt_handle;
void TvCtrlPointPrintHelp( void );
int TvCtrlPointDeleteNode(struct TvDeviceNode*);
int TvCtrlPointRemoveDevice(char*);
int TvCtrlPointRemoveAll( void );
int TvCtrlPointRefresh( void );
int TvCtrlPointSendAction(int, int, char *, char **, char **, int);
int TvCtrlPointSendActionNumericArg(int devnum, int service, char *actionName, char *paramName, int paramValue);
int TvCtrlPointSendPowerOn(int devnum);
int TvCtrlPointSendPowerOff(int devnum);
int TvCtrlPointSendSetChannel(int, int);
int TvCtrlPointSendSetVolume(int, int);
int TvCtrlPointSendSetColor(int, int);
int TvCtrlPointSendSetTint(int, int);
int TvCtrlPointSendSetContrast(int, int);
int TvCtrlPointSendSetBrightness(int, int);
int TvCtrlPointGetVar(int, int, char*);
int TvCtrlPointGetPower(int devnum);
int TvCtrlPointGetChannel(int);
int TvCtrlPointGetVolume(int);
int TvCtrlPointGetColor(int);
int TvCtrlPointGetTint(int);
int TvCtrlPointGetContrast(int);
int TvCtrlPointGetBrightness(int);
int TvCtrlPointGetDevice(int, struct TvDeviceNode **);
int TvCtrlPointPrintList( void );
int TvCtrlPointPrintDevice(int);
void TvCtrlPointAddDevice (IXML_Document *, char *, int);
void TvCtrlPointHandleGetVar(char *,char *,DOMString);
void TvStateUpdate(char*,int, IXML_Document * , char **);
void TvCtrlPointHandleEvent(Upnp_SID, int, IXML_Document *);
void TvCtrlPointHandleSubscribeUpdate(char *, Upnp_SID, int);
int TvCtrlPointCallbackEventHandler(Upnp_EventType, void *, void *);
void TvCtrlPointVerifyTimeouts(int);
void TvCtrlPointPrintCommands( void );
void* TvCtrlPointCommandLoop( void* );
int TvCtrlPointStart( print_string printFunctionPtr, state_update updateFunctionPtr );
int TvCtrlPointStop( void );
int TvCtrlPointProcessCommand( char *cmdline );
#ifdef __cplusplus
};
#endif
#endif //UPNP_TV_CTRLPT_H

File diff suppressed because it is too large Load Diff

View File

@ -1,638 +0,0 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2003 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
#ifndef UPNP_TV_DEVICE_H
#define UPNP_TV_DEVICE_H
#include <stdio.h>
#include <signal.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "ithread.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "upnp.h"
#include "sample_util.h"
//Color constants
#define MAX_COLOR 10
#define MIN_COLOR 1
//Brightness constants
#define MAX_BRIGHTNESS 10
#define MIN_BRIGHTNESS 1
//Power constants
#define POWER_ON 1
#define POWER_OFF 0
//Tint constants
#define MAX_TINT 10
#define MIN_TINT 1
//Volume constants
#define MAX_VOLUME 10
#define MIN_VOLUME 1
//Contrast constants
#define MAX_CONTRAST 10
#define MIN_CONTRAST 1
//Channel constants
#define MAX_CHANNEL 100
#define MIN_CHANNEL 1
//Number of services.
#define TV_SERVICE_SERVCOUNT 2
//Index of control service
#define TV_SERVICE_CONTROL 0
//Index of picture service
#define TV_SERVICE_PICTURE 1
//Number of control variables
#define TV_CONTROL_VARCOUNT 3
//Index of power variable
#define TV_CONTROL_POWER 0
//Index of channel variable
#define TV_CONTROL_CHANNEL 1
//Index of volume variable
#define TV_CONTROL_VOLUME 2
//Number of picture variables
#define TV_PICTURE_VARCOUNT 4
//Index of color variable
#define TV_PICTURE_COLOR 0
//Index of tint variable
#define TV_PICTURE_TINT 1
//Index of contrast variable
#define TV_PICTURE_CONTRAST 2
//Index of brightness variable
#define TV_PICTURE_BRIGHTNESS 3
//Max value length
#define TV_MAX_VAL_LEN 5
//Max actions
#define TV_MAXACTIONS 12
/* This should be the maximum VARCOUNT from above */
#define TV_MAXVARS TV_PICTURE_VARCOUNT
extern char TvDeviceType[];
extern char *TvServiceType[];
/******************************************************************************
* upnp_action
*
* Description:
* Prototype for all actions. For each action that a service
* implements, there is a corresponding function with this prototype.
* Pointers to these functions, along with action names, are stored
* in the service table. When an action request comes in the action
* name is matched, and the appropriate function is called.
* Each function returns UPNP_E_SUCCESS, on success, and a nonzero
* error code on failure.
*
* Parameters:
*
* IXML_Document * request - document of action request
* IXML_Document **out - action result
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
typedef int (*upnp_action) (IXML_Document *request, IXML_Document **out,
char **errorString);
/* Structure for storing Tv Service
identifiers and state table */
struct TvService {
char UDN[NAME_SIZE]; /* Universally Unique Device Name */
char ServiceId[NAME_SIZE];
char ServiceType[NAME_SIZE];
char *VariableName[TV_MAXVARS];
char *VariableStrVal[TV_MAXVARS];
char *ActionNames[TV_MAXACTIONS];
upnp_action actions[TV_MAXACTIONS];
unsigned int VariableCount;
};
//Array of service structures
extern struct TvService tv_service_table[];
//Device handle returned from sdk
extern UpnpDevice_Handle device_handle;
/* Mutex for protecting the global state table data
in a multi-threaded, asynchronous environment.
All functions should lock this mutex before reading
or writing the state table data. */
extern ithread_mutex_t TVDevMutex;
/******************************************************************************
* SetActionTable
*
* Description:
* Initializes the action table for the specified service.
* Note that
* knowledge of the service description is
* assumed. Action names are hardcoded.
* Parameters:
* int serviceType - one of TV_SERVICE_CONTROL or, TV_SERVICE_PICTURE
* struct TvService *out - service containing action table to set.
*
*****************************************************************************/
int SetActionTable(int serviceType, struct TvService * out);
/******************************************************************************
* TvDeviceStateTableInit
*
* Description:
* Initialize the device state table for
* this TvDevice, pulling identifier info
* from the description Document. Note that
* knowledge of the service description is
* assumed. State table variables and default
* values are currently hardcoded in this file
* rather than being read from service description
* documents.
*
* Parameters:
* DescDocURL -- The description document URL
*
*****************************************************************************/
int TvDeviceStateTableInit(char*);
/******************************************************************************
* TvDeviceHandleSubscriptionRequest
*
* Description:
* Called during a subscription request callback. If the
* subscription request is for this device and either its
* control service or picture service, then accept it.
*
* Parameters:
* sr_event -- The subscription request event structure
*
*****************************************************************************/
int TvDeviceHandleSubscriptionRequest(struct Upnp_Subscription_Request *);
/******************************************************************************
* TvDeviceHandleGetVarRequest
*
* Description:
* Called during a get variable request callback. If the
* request is for this device and either its control service
* or picture service, then respond with the variable value.
*
* Parameters:
* cgv_event -- The control get variable request event structure
*
*****************************************************************************/
int TvDeviceHandleGetVarRequest(struct Upnp_State_Var_Request *);
/******************************************************************************
* TvDeviceHandleActionRequest
*
* Description:
* Called during an action request callback. If the
* request is for this device and either its control service
* or picture service, then perform the action and respond.
*
* Parameters:
* ca_event -- The control action request event structure
*
*****************************************************************************/
int TvDeviceHandleActionRequest(struct Upnp_Action_Request *);
/******************************************************************************
* TvDeviceCallbackEventHandler
*
* Description:
* The callback handler registered with the SDK while registering
* root device. Dispatches the request to the appropriate procedure
* based on the value of EventType. The four requests handled by the
* device are:
* 1) Event Subscription requests.
* 2) Get Variable requests.
* 3) Action requests.
*
* Parameters:
*
* EventType -- The type of callback event
* Event -- Data structure containing event data
* Cookie -- Optional data specified during callback registration
*
*****************************************************************************/
int TvDeviceCallbackEventHandler(Upnp_EventType, void*, void*);
/******************************************************************************
* TvDeviceSetServiceTableVar
*
* Description:
* Update the TvDevice service state table, and notify all subscribed
* control points of the updated state. Note that since this function
* blocks on the mutex TVDevMutex, to avoid a hang this function should
* not be called within any other function that currently has this mutex
* locked.
*
* Parameters:
* service -- The service number (TV_SERVICE_CONTROL or TV_SERVICE_PICTURE)
* variable -- The variable number (TV_CONTROL_POWER, TV_CONTROL_CHANNEL,
* TV_CONTROL_VOLUME, TV_PICTURE_COLOR, TV_PICTURE_TINT,
* TV_PICTURE_CONTRAST, or TV_PICTURE_BRIGHTNESS)
* value -- The string representation of the new value
*
*****************************************************************************/
int TvDeviceSetServiceTableVar(unsigned int, unsigned int, char*);
//Control Service Actions
/******************************************************************************
* TvDevicePowerOn
*
* Description:
* Turn the power on.
*
* Parameters:
*
* IXML_Document * in - document of action request
* IXML_Document **out - action result
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDevicePowerOn(IN IXML_Document * in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDevicePowerOff
*
* Description:
* Turn the power off.
*
* Parameters:
*
* IXML_Document * in - document of action request
* IXML_Document **out - action result
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDevicePowerOff(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceSetChannel
*
* Description:
* Change the channel, update the TvDevice control service
* state table, and notify all subscribed control points of the
* updated state.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceSetChannel(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceIncreaseChannel
*
* Description:
* Increase the channel.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceIncreaseChannel(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceDecreaseChannel
*
* Description:
* Decrease the channel.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceDecreaseChannel(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceSetVolume
*
* Description:
* Change the volume, update the TvDevice control service
* state table, and notify all subscribed control points of the
* updated state.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceSetVolume(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceIncreaseVolume
*
* Description:
* Increase the volume.
*
* Parameters:
*
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*****************************************************************************/
int TvDeviceIncreaseVolume(IN IXML_Document *in, OUT IXML_Document**out,
OUT char **errorString);
/******************************************************************************
* TvDeviceDecreaseVolume
*
* Description:
* Decrease the volume.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceDecreaseVolume(IN IXML_Document *in, OUT IXML_Document**out,
OUT char **errorString);
//Picture Service Actions
/******************************************************************************
* TvDeviceSetColor
*
* Description:
* Change the color, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceSetColor(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceIncreaseColor
*
* Description:
* Increase the color.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*****************************************************************************/
int TvDeviceIncreaseColor(IN IXML_Document * in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceDecreaseColor
*
* Description:
* Decrease the color.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*****************************************************************************/
int TvDeviceDecreaseColor(IN IXML_Document * in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceSetTint
*
* Description:
* Change the tint, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceSetTint(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceIncreaseTint
*
* Description:
* Increase tint.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceIncreaseTint(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceDecreaseTint
*
* Description:
* Decrease tint.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceDecreaseTint(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/*****************************************************************************
* TvDeviceSetContrast
*
* Description:
* Change the contrast, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
****************************************************************************/
int TvDeviceSetContrast(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceIncreaseContrast
*
* Description:
*
* Increase the contrast.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceIncreaseContrast(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceDecreaseContrast
*
* Description:
* Decrease the contrast.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceDecreaseContrast(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceSetBrightness
*
* Description:
* Change the brightness, update the TvDevice picture service
* state table, and notify all subscribed control points of the
* updated state.
*
* Parameters:
* brightness -- The brightness value to change to.
*
*****************************************************************************/
int TvDeviceSetBrightness(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceIncreaseBrightness
*
* Description:
* Increase brightness.
*
* Parameters:
*
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceIncreaseBrightness(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
/******************************************************************************
* TvDeviceDecreaseBrightness
*
* Description:
* Decrease brightnesss.
*
* Parameters:
* IXML_Document * in - action request document
* IXML_Document **out - action result document
* char **errorString - errorString (in case action was unsuccessful)
*
*****************************************************************************/
int TvDeviceDecreaseBrightness(IN IXML_Document *in, OUT IXML_Document **out,
OUT char **errorString);
int TvDeviceStart(char * ip_address, unsigned short port,char * desc_doc_name,
char *web_dir_path, print_string pfun);
int TvDeviceStop();
#ifdef __cplusplus
}
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More