svn-gvsig-desktop / tags / v1_1_1_Build_1016 / libraries / libjni-ecw / include / NCScnet.h @ 33925
History | View | Annotate | Download (3.74 KB)
1 |
/********************************************************
|
---|---|
2 |
** Copyright 1999 Earth Resource Mapping Ltd.
|
3 |
** This document contains proprietary source code of
|
4 |
** Earth Resource Mapping Ltd, and can only be used under
|
5 |
** one of the three licenses as described in the
|
6 |
** license.txt file supplied with this distribution.
|
7 |
** See separate license.txt file for license details
|
8 |
** and conditions.
|
9 |
**
|
10 |
** This software is covered by US patent #6,442,298,
|
11 |
** #6,102,897 and #6,633,688. Rights to use these patents
|
12 |
** is included in the license agreements.
|
13 |
**
|
14 |
** FILE: NCScnet.h
|
15 |
** CREATED: Thu Mar 4 09:19:00 WST 1999
|
16 |
** AUTHOR: Doug Mansell
|
17 |
** PURPOSE: IWS client side networking - public interface
|
18 |
** EDITS:
|
19 |
** [01] sjc 01Oct99 Protocol version define
|
20 |
** [02] sjc 25Feb00 Chenged NCS_PROTOCOL_VERSION to 3
|
21 |
** [03] ny 12May00 Added bIsConnected parameter to NCScnetSendPacket
|
22 |
** to enable the propagation of loss of connection
|
23 |
** error to the upper level
|
24 |
** [04] jmp 06Mar01 Added generic NCScnetPostURL
|
25 |
** [05] rar 14May01 Added NCSUrlStream.
|
26 |
** [06] rar 17-May-01 Modified NCSnetPacketRecvCB() to include a returned error code.
|
27 |
** [07] rar 28May01 Added sending of ping packet by client,
|
28 |
** incremented version to 4.
|
29 |
*******************************************************/
|
30 |
|
31 |
#ifndef NCSCNET_H
|
32 |
#define NCSCNET_H
|
33 |
|
34 |
|
35 |
#include "NCSTypes.h" |
36 |
#include "NCSErrors.h" |
37 |
|
38 |
#ifdef NCSCNET3
|
39 |
#ifdef __cplusplus
|
40 |
#include "NCSUrlStream.h" |
41 |
#endif
|
42 |
#endif
|
43 |
|
44 |
#ifdef WIN32
|
45 |
typedef SIZE_T DWORD_PTR, *PDWORD_PTR;
|
46 |
#include "WinInet.h" |
47 |
#endif //WIN32 |
48 |
|
49 |
|
50 |
#ifndef NCS_MAX_PACKET_SIZE
|
51 |
#define NCS_MAX_PACKET_SIZE (1024*1024) |
52 |
#endif
|
53 |
#ifndef NCS_PROTOCOL_VERSION
|
54 |
/*
|
55 |
** Version of the wire protocol. keep in sync with NCSsnet.h [01]
|
56 |
*/
|
57 |
#define NCS_PROTOCOL_VERSION 4 /**[07]**/ |
58 |
#endif
|
59 |
|
60 |
typedef void *pNCSnetClient; |
61 |
typedef void NCSnetPacketRecvCB(void *, INT32, pNCSnetClient, void *, NCSError eError); /**[06]**/ // pPacket, nLength, pClient, pUserData, eError |
62 |
typedef void NCSnetPacketSentCB(NCSError, void *, void *); // eError, pPacket, pUserData |
63 |
|
64 |
|
65 |
/////
|
66 |
|
67 |
#ifdef __cplusplus
|
68 |
extern "C" { |
69 |
#endif
|
70 |
|
71 |
BOOLEAN NCScnetVerifyURL(char *szURL);
|
72 |
|
73 |
void NCScnetSetIISDLLName(char *szDLLname); |
74 |
NCSError NCScnetCreate(char *szURL, void **ppClient, void *pPacketIn, int nLengthIn, void **ppPacketOut, INT32 *pLengthOut, NCSnetPacketRecvCB *pRecvCB, void *pRecvUserdata); |
75 |
NCSError NCScnetCreateEx(char *szURL, void **ppClient, void *pPacketIn, int nLengthIn, void **ppPacketOut, INT32 *pLengthOut, NCSnetPacketRecvCB *pRecvCB, void *pRecvUserdata, char *pszIISDLLName); |
76 |
NCSError NCScnetCreateProxy(char *szURL, void **ppClient, void *pPacketIn, int nLengthIn, void **ppPacketOut, INT32 *pLengthOut, NCSnetPacketRecvCB *pRecvCB, void *pRecvUserdata, char *pszIISDLLName, char *pszUsername, char *pszPassword ); |
77 |
void NCScnetSetSendBlocking(void *pConnection, BOOLEAN bOn); |
78 |
void NCScnetSetRecvCB(pNCSnetClient pClient, NCSnetPacketRecvCB *pRecvCB, void *pUserdata); |
79 |
void NCScnetSetSentCB(pNCSnetClient pClient, NCSnetPacketSentCB *pSentCB);
|
80 |
BOOLEAN NCScnetSendPacket(pNCSnetClient pClient, void *pPacket, int nLength, void *pUserdata, BOOLEAN *bIsConnected); |
81 |
//#ifdef NCS_POST_VERSION2
|
82 |
NCSError NCScnetPostURL(char *szURL, char *szBody, char *szHeaders, char **ppAccept, |
83 |
BOOLEAN bIsPost, BOOLEAN bUseCache, UINT8**szResponse, int *nRespLength,
|
84 |
UINT32 *pnStatusCode, UINT32 *pnContentLength); /**[04]**/
|
85 |
//#endif
|
86 |
void NCScnetDestroy(pNCSnetClient pClient);
|
87 |
void NCScnetStartup();
|
88 |
void NCScnetShutdown();
|
89 |
|
90 |
void NCScnetSetProxy( char *pProxy, INT32 nPort, char *pProxyBypass ); |
91 |
|
92 |
//
|
93 |
// Function specifically required for use by the IWS Proxy
|
94 |
//
|
95 |
#ifdef PROXYSERVER
|
96 |
void NCSUseWinHTTP( BOOL bValue );
|
97 |
#endif //PROXYSERVER |
98 |
|
99 |
#ifdef _DEBUG
|
100 |
__declspec(dllexport) void NCScnetSetTimeout(BOOLEAN bTimeout);
|
101 |
#endif
|
102 |
|
103 |
#ifdef __cplusplus
|
104 |
}; |
105 |
#endif
|
106 |
|
107 |
#endif
|