⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 downloadbmp.h

📁 brew 用IWEB接口来实现下载图片的一个列子
💻 H
字号:
#define MAX_HIST 100
typedef struct _CDBApp CDBApp;

typedef void (*PFNCLEANUP)(CDBApp *);
typedef struct WebAction
{
   CDBApp * pParent;          // my parent
   AEECallback          cb;            // how to call me back
              
   IWebResp *           piWResp;       // the answer I get from IWeb
   IGetLine *           piGetLine;     // the body of the response, if any
   int                  nLines;        // count of lines in response
   int                  nBytes;        // count of bytes in response

   uint32               uStart;
   uint32               uRecvStart;

   IPeek                *pipPostData;  // POST stream, if any
   char                 *pszPostData;  // POST string

} WebAction;
typedef struct _CDBApp
{
	AEEApplet a;
	AEERect    m_nScreenRect;
	IFileMgr *           m_pFileMgr;             // Pointer to the apps IFileMgr object
	IHtmlViewer *        m_pHTMLViewer; 
	IMenuCtl *   m_pMenu;
    IStatic *            m_pIStatic; 
	INetMgr *            m_pINetMgr; 
	AEEDNSResult         m_dnsr; 
	IImage*		         m_pProgressImages[3];
	AECHAR               m_AnimalTitle[100];
	char *               m_ppszHistory[MAX_HIST]; // history list
    int                  m_cntHistory;           // number of entries currently in the history list
	int                  m_nTotleTimes;
	int                  m_nFontHeight;
	char *               m_pszFormData;          // this points to the memory block holding all values
    char *               m_pszHost;              // "HOST" field
    char *               m_pszURL;               // "URL" field
    char *               m_pszMsg;               // "MSG" field
	IWeb *               m_pIWeb;                // Pointer to IWeb for HTTP Tests
    WebAction            m_awa[1];               // array of WebActions.  By changing the '1' to any 
	PFNCLEANUP           m_pfnViewCleanup;       // function to clean up after test (NULL => no test)
	uint16               m_nDataLength;          // length of pszMsg (calculated when set)
	boolean		         m_bSuspended;
	boolean		         m_bIsProgressDisp;
}CDBApp;  
#define JUMP_MAIN          "file:///main1.html"
#define JUMP_ECHOTEST      "test:echo"                // starts echo test (expects form data)
#define WEBBER_USERAGENT   "downloadbmp/1.0 (built on "__DATE__")\r\n"
#define STREQ(a,b)         (!STRCMP(a,b))

#define FORALL(p,a)        for (p = (a) + ARRAY_SIZE(a) - 1; p >= (a); --p)

#define FOR_ALL_WEBACTIONS(pApp, var, exp)     {WebAction *var; FORALL(var, (pApp)->m_awa) { exp; } }
#define PROG_ANIM 			0
#define PROG_PHONE			1
#define PROG_FILE			2
#define CX_PROG_DISPLAY 	100
#define CY_PROG_DISPLAY 	67

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -