Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FbUpdateThread.h « MyRuLib « sources - github.com/lintest/myrulib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 959e6a59d110ead85dbdbce276f7b684c06769aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef __FBUPDATETHREAD_H__
#define __FBUPDATETHREAD_H__

#include <wx/wx.h>
#include <wx/wxsqlite3.h>
#include "FbThread.h"
#include "controls/FbURL.h"

class FbUpdateThread: public FbThread
{
	public:
		FbUpdateThread();
	protected:
		virtual void * Entry();
};

class FbUpdateItem: public wxObject
{
	public:
		static wxString GetAddr(int date, const wxString &type);
		FbUpdateItem(wxSQLite3Database & database, int code, const wxString &type);
		virtual ~FbUpdateItem();
		int Execute();
	private:
		bool OpenURL();
		bool OpenZip();
		int DoUpdate();
		void ExecInsert();
		void ExecDelete();
		void CalcCount();
	private:
		wxSQLite3Database & m_database;
		int m_code;
		wxString m_type;
		wxString m_url;
		wxString m_filename;
		wxString m_dataname;
		wxInputStream * m_input;
		DECLARE_CLASS(FbUpdateItem);
};

#endif // __FBUPDATETHREAD_H__