|
API Guide Home (Online version only) |
![]() |
00001 /* 00002 HS_HTTPLibApp.h 00003 Copyright(c) 1996-2002 ACCESS CO., LTD. 00004 All rights are reserved by ACCESS CO., LTD., whether the whole or 00005 part of the source code including any modifications. 00006 */ 00007 #ifndef HS_HTTPLIBAPP_H__ 00008 #define HS_HTTPLIBAPP_H__ 00009 00010 00011 #define HS_HTTPLibID 'AsHT' 00012 #define HS_HTTPLibDBType 'libr' 00013 #define HS_HTTPLibName "HTTPLibrary" 00014 00015 #define sysNotifyStopEvent 'test' 00016 00017 /* structure for application */ 00018 00019 typedef MemHandle HS_HTTPLibHandle; 00020 struct HS_HTTPLibOpaque_ { 00021 Int32 fDummy; 00022 }; 00023 typedef struct HS_HTTPLibOpaque_ *HS_HTTPLibOpaque; 00024 00025 struct HS_HTTPLibIPAddr_ { 00026 Int32 type; 00027 Char addr[16]; 00028 }; 00029 typedef struct HS_HTTPLibIPAddr_ HS_HTTPLibIPAddr; 00030 00031 #define httpIPAddrTypeV4 4 00032 #define httpIPAddrLenV4 4 00033 00034 00035 /* cookie info */ 00036 00037 00038 00039 struct HS_HTTPLibAppinfo_ { 00040 UInt32 appCreator; 00041 Int32 maxSockets; 00042 Int32 isForeground; 00043 UInt32 recvBufferSize; 00044 /* cookie DB */ 00045 Char *cookieDBName; 00046 UInt32 cookieDBCreator; 00047 UInt32 cookieDBType; 00048 UInt16 cookieDBVersion; 00049 Int32 cookieMaxJarSize; 00050 /* certDB */ 00051 Char *certDBName; 00052 UInt32 certDBType; 00053 UInt16 certDBVersion; 00054 }; 00055 typedef struct HS_HTTPLibAppinfo_ HS_HTTPLibAppInfo; 00056 00057 typedef Boolean (*HS_HTTPLibNetLibOpenProc)(HS_HTTPLibHandle in_libH, HS_HTTPLibOpaque in_aux); 00058 typedef Boolean (*HS_HTTPLibNetLibCloseProc)(HS_HTTPLibHandle in_libH, HS_HTTPLibOpaque in_aux); 00059 typedef Boolean (*HS_HTTPLibNetLibOnlineProc)(HS_HTTPLibHandle in_libH, HS_HTTPLibOpaque in_aux); 00060 typedef Boolean (*HS_HTTPLibNetLibOfflineProc)(HS_HTTPLibHandle in_libH, HS_HTTPLibOpaque in_aux); 00061 00062 struct HS_HTTPLibNetLibInfo_ 00063 { 00064 UInt16 refNum; 00065 HS_HTTPLibNetLibOpenProc openProc; 00066 HS_HTTPLibNetLibCloseProc closeProc; 00067 HS_HTTPLibNetLibOnlineProc onlineProc; 00068 HS_HTTPLibNetLibOfflineProc offlineProc; 00069 }; 00070 typedef struct HS_HTTPLibNetLibInfo_ HS_HTTPLibNetLibInfo; 00071 00072 00073 /* peer functions */ 00074 typedef Int32 (*HS_TCPOpenPeer)(Int32 in_domain, HS_HTTPLibOpaque in_aux); 00075 typedef void (*HS_TCPClosePeer)(Int32 in_desc, HS_HTTPLibOpaque in_aux); 00076 typedef Int32 (*HS_TCPIsConnectedPeer)(Int32 in_desc, HS_HTTPLibOpaque in_aux); 00077 typedef Int32 (*HS_TCPConnectPeer)(Int32 in_desc, HS_HTTPLibIPAddr *in_addr, Int32 in_port, HS_HTTPLibOpaque in_aux); 00078 typedef Int32 (*HS_TCPReadPeer)(Int32 in_desc, Char *out_buf, Int32 in_len, HS_HTTPLibOpaque in_aux); 00079 typedef Int32 (*HS_TCPWritePeer)(Int32 in_desc, Char *in_buf, Int32 in_len, HS_HTTPLibOpaque in_aux); 00080 typedef Int32 (*HS_TCPCanReadWritePeer)(Int32 in_desc, Int32 in_rw, HS_HTTPLibOpaque in_aux); 00081 00082 struct HS_HTTPLibPeer_ 00083 { 00084 /* method ptr */ 00085 Int32 (*HS_HTTPLibPeerTCPOpen)(Int32 in_domain, HS_HTTPLibOpaque in_aux); /* Open method func */ 00086 void (*HS_HTTPLibPeerTCPClose)(Int32 in_desc, HS_HTTPLibOpaque in_aux); /* Close method func */ 00087 Int32 (*HS_HTTPLibPeerTCPIsConnected)(Int32 in_desc, HS_HTTPLibOpaque in_aux); /* IsConnected method func */ 00088 Int32 (*HS_HTTPLibPeerTCPConnect)(Int32 in_desc, HS_HTTPLibIPAddr *in_addr, Int32 in_port, HS_HTTPLibOpaque in_aux);/* Connect method func */ 00089 Int32 (*HS_HTTPLibPeerTCPRead)(Int32 in_desc, Char *out_buf, Int32 in_len, HS_HTTPLibOpaque in_aux); /* Read method func */ 00090 Int32 (*HS_HTTPLibPeerTCPWrite)(Int32 in_desc, Char *in_buf, Int32 in_len, HS_HTTPLibOpaque in_aux); /* Write method func */ 00091 Int32 (*HS_HTTPLibPeerTCPCanReadWrite)(Int32 in_desc, Int32 in_rw, HS_HTTPLibOpaque in_aux); 00092 }; 00093 typedef struct HS_HTTPLibPeer_ HS_HTTPLibPeer; 00094 00095 #endif /* HS_HTTPLIBAPP_H_ */ 00096
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:53 2008 for Palm API Guide |