~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to tools/gsoap/macosx-x86-2.7/extras/.svn/text-base/gsoapWinInet.h.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * File:    gsoapWinInet2.h
3
 
 *
4
 
 * Authors: 26 May 2003: Jack Kustanowitz (jackk@atomica.com)
5
 
 *          Original version
6
 
 *
7
 
 *          29 September 2003: Brodie Thiesfield (bt@jellycan.com)
8
 
 *          Rewritten as C plugin for gsoap. Bugs fixed and features added.
9
 
 *
10
 
 *          14 January 2004: Brodie Thiesfield (bt@jellycan.com)
11
 
 *          Bug fix.
12
 
 *
13
 
 * Purpose: Allow gsoap clients (not servers) to direct all communications 
14
 
 *          through the WinInet API. This automatically provides all of the 
15
 
 *          proxy and authentication features supported by the control panel 
16
 
 *          'Internet Options' dialog to the client. As these options are 
17
 
 *          shared by IE, this means that "if IE works, gsoap works."
18
 
 *
19
 
 * Features:
20
 
 *          + gsoap plugin - extremely easy to use
21
 
 *          + complete support for:
22
 
 *              - HTTP/1.0 and HTTP/1.1
23
 
 *              - HTTPS (no extra libraries are required)
24
 
 *              - HTTP authentication
25
 
 *              - Proxy servers (simple, automatic discovery, etc)
26
 
 *              - Proxy authentication (basic, NTLM, etc)
27
 
 *          + authentication prompts and HTTPS warnings (e.g. invalid HTTPS CA) 
28
 
 *              can be resolved by the user via standard system dialog boxes.
29
 
 *          + message size is limited only by available memory
30
 
 *          + connect, receive and send timeouts are used 
31
 
 *          + supports all SOAP_IO types (see limitations)
32
 
 *          + written completely in C, can be used in C, C++, and MFC projects
33
 
 *              without modification (anywhere that gsoap is used)
34
 
 *          + can be used in both MBCS and UNICODE projects
35
 
 *          + compiles cleanly at warning level 4 (if gsoap uses SOAP_SOCKET
36
 
 *              for the definition of sockets instead of int, it will also
37
 
 *              compile without win64 warnings).
38
 
 *          + all debug trace goes to the gsoap TEST.log file 
39
 
 *          + supports multiple threads (all plugin data is stored in the 
40
 
 *              soap structure - no static variables)
41
 
 *
42
 
 * Limitations:
43
 
 *          - DIME attachments are not supported
44
 
 *          - may internally buffer the entire outgoing message before sending
45
 
 *              (if the serialized message is larger then SOAP_BUFLEN, or if 
46
 
 *              SOAP_IO_CHUNK mode is being used then the entire message will 
47
 
 *              be buffered)
48
 
 *
49
 
 * Usage:   Add the gsoapWinInet2.h and gsoapWinInet2.cpp files to your project 
50
 
 *          (if you have a C project, rename gsoapWinInet2.cpp to .c and use
51
 
 *          it as is). Ensure that you turn off precompiled headers for the 
52
 
 *          .cpp file.
53
 
 *
54
 
 *          In your source, just after calling soap_init(), register this 
55
 
 *          plugin with soap_register_plugin( soap, wininet_plugin ). 
56
 
 *
57
 
 *          e.g.
58
 
 *              struct soap soap;
59
 
 *              soap_init( &soap );
60
 
 *              soap_register_plugin( &soap, wininet_plugin );
61
 
 *              soap.connect_timeout = 5; // this will be used by wininet too
62
 
 *              ...
63
 
 *              soap_done(&soap);
64
 
 *
65
 
 * Notes:   For extra control, you may also register this plugin using the 
66
 
 *          soap_register_plugin_arg() function, and supply as the argument 
67
 
 *          flags which you wished to be passed to HttpOpenRequest. 
68
 
 *
69
 
 *          e.g.
70
 
 *              struct soap soap;
71
 
 *              soap_init( &soap );
72
 
 *              soap_register_plugin_arg( &soap, wininet_plugin,
73
 
 *                  (void*) INTERNET_FLAG_IGNORE_CERT_CN_INVALID );
74
 
 *
75
 
 *          See the MSDN documentation on HttpOpenRequest for details of 
76
 
 *          available flags. The <wininet.h> header file is required for the 
77
 
 *          definitions of the flags. Some flags which may be useful are:
78
 
 *
79
 
 *              INTERNET_FLAG_KEEP_CONNECTION
80
 
 *              Uses keep-alive semantics, if available, for the connection. 
81
 
 *              This flag is required for Microsoft Network (MSN), NT LAN 
82
 
 *              Manager (NTLM), and other types of authentication. 
83
 
 *              ++ Note that this flag is used automatically when soap.omode 
84
 
 *              has the SOAP_IO_KEEPALIVE flag set. ++
85
 
 *
86
 
 *              INTERNET_FLAG_IGNORE_CERT_CN_INVALID
87
 
 *              Disables Microsoft Win32 Internet function checking of SSL/PCT-
88
 
 *              based certificates that are returned from the server against 
89
 
 *              the host name given in the request. 
90
 
 *
91
 
 *              INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
92
 
 *              Disables Win32 Internet function checking of SSL/PCT-based 
93
 
 *              certificates for proper validity dates.
94
 
 *
95
 
 *          This plugin uses the following callback functions and is not 
96
 
 *          compatible with any other plugin that uses these functions.
97
 
 *
98
 
 *              soap->fopen
99
 
 *              soap->fposthdr
100
 
 *              soap->fsend
101
 
 *              soap->frecv
102
 
 *              soap->fclose
103
 
 *
104
 
 *          If there are errors in sending the HTTP request which would 
105
 
 *          cause a dialog box to be displayed in IE (for instance, invalid
106
 
 *          certificates on an HTTPS connection), then a dialog will also
107
 
 *          be displayed by this library. At the moment is is not possible
108
 
 *          to disable the UI. If you wish to remove the UI then you will 
109
 
 *          need to hack the source to remove the dialog box and resolve the
110
 
 *          errors programmatically, or supply the appropriate flags in
111
 
 *          soap_register_plugin_arg() to disable the unwanted warnings.
112
 
 *
113
 
 *          Because messages are buffered internally to gsoapWinInet2 plugin
114
 
 *          it is recommended that the SOAP_IO_STORE flag is not used otherwise
115
 
 *          the message may be buffered twice on every send. Use the default
116
 
 *          flag SOAP_IO_BUFFER, or SOAP_IO_FLUSH.
117
 
 *
118
 
 * Redistribution: 
119
 
 *          Feel free to use, improve, and share.  I would appreciate 
120
 
 *          notification of any bugs found/fixed, or improvements made. This 
121
 
 *          code has not been extensively tested, so use at your own risk.  
122
 
 */
123
 
#ifndef INCLUDED_gsoapWinInet2_h
124
 
#define INCLUDED_gsoapWinInet2_h
125
 
 
126
 
#include <stdsoap2.h>
127
 
 
128
 
#ifdef __cplusplus
129
 
extern "C" {
130
 
#endif 
131
 
 
132
 
extern int 
133
 
wininet_plugin( 
134
 
    struct soap *           a_pSoap, 
135
 
    struct soap_plugin *    a_pPluginData, 
136
 
    void *                  a_pUnused );
137
 
 
138
 
#ifdef __cplusplus
139
 
}
140
 
#endif 
141
 
 
142
 
#endif // INCLUDED_gsoapWinInet2_h