📄 napipriv.h
字号:
/********************************************************************* FILE: WWWpriv.h** DESCRIPTION: INetLib Wrapper Private definitions Header** VERSION: 1.0**********************************************************************/typedef enum {MESG_GET = 1, MESG_SET, MESG_INVALID} Mesg;typedef struct{ UInt16 inetRefNum; Handle inetHan; Handle inetSockH; UInt32 downloadSize; UInt32 requestSize; UInt32 inetLowConvAlgorithm; UInt32 includeHeaders;} INetLowInfoType;typedef INetLowInfoType* INetLowInfoPtr;#define wwwCreatorID ( 'PAKA' )#define wwwPrefsVersion ((Int16) 1)#define wwwPrefsID ((UInt16) 0)// Config Dialog options.// List items for Connect Via choice#define wwwConfigWireless ( 0 )#define wwwConfigWireline ( 1 )// Progress stuff#define NUM_ICONS ( 4 )#define FORWARDS ( 1 )#define BACKWARDS ( -1 )#define DIALOG_MSG_X ( 50 )#define DIALOG_MSG_Y ( 20 )#define DIALOG_PIC_X ( 10 )#define DIALOG_PIC_Y ( 20 )#define DIALOG_WIN_X ( 130 )#define DIALOG_WIN_Y ( 20 )#define ticksPerIcon ( 5 )#define MAX_RESPONSE_SIZE ( 4096 )#define wwwContentTimeoutSecs ( 30 )#define wwwContentTimeoutTicks ( 5 )#define wwwContentEvtWaitTicks ( 30 )// Connection type enumtypedef enum _WWWConnectionType{ wwwConnectionINetLib = 1} WWWConnectionType;// Status enum. typedef enum _WWWStatusEnum{ wwwStatusNone = 0, wwwStatusOpening, wwwStatusConnecting, wwwStatusDownloading, wwwStatusCompleted, wwwStatusError } WWWStatusEnum;// Our prefstypedef struct _WWWPrefs{ UInt16 version; UInt16 inetConfigIndex; UInt32 inetCompression;} WWWPrefsType, *WWWPrefsTypePtr;// Our state informationstruct _WWWinstance{ WWWConnectionType conType; INetLowInfoType inetInfo; WWWPrefsType prefs; UInt32 progressThenTicks; FormPtr saveFrmP; MemHandle contentHandle; UInt8 *contentP; UInt32 contentSz; Boolean socketReadyToRead; WWWStatusEnum socketStatus;};Err INetStart(void);Err INetInit(UInt16 libRefNum, Handle* inetHP);Err INetInfo(INetLowInfoPtr inetInfoP, Mesg message);Err INetGo(CharPtr urlP, CharPtr dataP, Int32 timeout);Boolean INetConnectionEventHandler( INetEventType *eventP );void INGetEvent( EventType *eventP, Int32 timeout );Err INetSubTask( void );Err INetEndTransaction(void);Err INetEnd(void);static Boolean WWWAntennaDialogFormHandler( EventPtr eventP // Pointer to an EventType that contains the event to handle);Boolean WWWUseWireline( void );void WWWDisplayConnectionDialogMsg( Char * );void WWWSetSocketStatus( WWWStatusEnum status );void WWWSetSocketReady( Boolean isReady );Boolean WWWIsSocketReady( void );MemHandle WWWGetContentHandle( void );void WWWSetContentSize( UInt32 newSz );UInt32 WWWGetContentSize( void );Boolean WWWIsSocketReady( void );Err WWWOpen( void );Err WWWClose( void );void INetShowIndicator(void);void WWWShowIndicator( void );void WWWHideIndicator( void );void INetHideIndicator(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -