Google
Web alhem.net
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

MyApp.h

Go to the documentation of this file.
00001 00005 /* 00006 Copyright (C) 2004 Anders Hedström (grymse@alhem.net) 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 #pragma once 00023 00024 #include <string> 00025 #include <vector> 00026 #include <list> 00027 #include <io.h> 00028 #include "WinApp.h" 00029 00030 // custom window messages 00031 enum { 00032 WM_SHELLNOTIFY = WM_USER + 100, 00033 WM_SHOW_SETTINGS, 00034 WM_CHANGE_ICON, 00035 }; 00036 00037 00038 class Database; 00039 class Query; 00040 class FinderSocket; 00041 class FinderHandler; 00042 00043 class MyApp : public WinApp 00044 { 00045 public: 00046 MyApp(HINSTANCE, HINSTANCE, Database& ); 00047 ~MyApp(); 00048 00049 Database& GetDatabase() { return m_db; } 00050 00051 int Init(LPSTR lpCmdLine, int nCmdShow); 00052 00053 void SetDialogData(); 00054 void GetDialogData(); 00055 void ShowTaskBar(BOOL show); 00056 00057 void SetQuit(bool x = true) { m_quit = x; } 00058 int GetLocalPort() { return m_local_port; } 00059 bool BindLocal() { return m_bind_local; } 00060 00061 void check_thread_status(); 00062 void view_thread_status(FinderSocket& ); 00063 void settings_form(FinderSocket& ); 00064 00065 void reg_minder(FinderHandler& ,const std::string& cmd); 00066 void minion_connect(FinderHandler& h); 00067 int GetMinionPort() { return m_minion_port; } 00068 void ApplyChanges(); 00069 bool NoMinder() { return m_no_minder; } 00070 00071 bool CreateTop() { return m_create_top; } 00072 void SetCreateTop(bool x = true) { m_create_top = x; } 00073 00074 void SetValues(int local_port, 00075 bool bind_local,const std::string& minder_host,int minder_port, 00076 bool no_minder,bool create_top, 00077 const std::string& join_group,bool use_password,const std::string& group_password); 00078 void SetDrop(bool x = true); 00079 00080 BOOL ShowBalloonTip(const std::string& title, 00081 const std::string& msg); 00082 void ChangeIcon(int id); 00083 int MemoryUsage(); 00084 // 00085 private: 00086 Database& m_db; 00087 bool m_quit; 00088 // dialog 00089 int m_local_port; 00090 bool m_bind_local; 00091 std::string m_minder_host; 00092 int m_minder_port; 00093 int m_minion_port; 00094 bool m_no_minder; 00095 std::string m_new_minder_host; 00096 int m_new_minder_port; 00097 bool m_new_no_minder; 00098 bool m_create_top; 00099 std::string m_join_group; 00100 bool m_use_password; 00101 std::string m_group_password; 00102 std::string m_new_join_group; 00103 bool m_new_use_password; 00104 std::string m_new_group_password; 00105 }; 00106 00107 extern MyApp *g_app; 00108 extern HWND g_hwndMain; 00109 00110

Generated on Thu Feb 10 22:42:34 2005 for Distributed URL Classification Tool by doxygen 1.3.7