- New client source tree added
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 11 Jul 2007 19:46:58 +0000 (19:46 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 11 Jul 2007 19:46:58 +0000 (19:46 +0000)
- Minor changes in libraris for better support of new console

40 files changed:
.gitattributes
include/netxms-version.h
include/nms_util.h
include/nxclapi.h
netxms.dsw
src/client/console/include/nxmc_api.h [new file with mode: 0644]
src/client/console/libnxmc/libnxmc.dsp [new file with mode: 0644]
src/client/console/libnxmc/libnxmc.h [copied from include/netxms-version.h with 55% similarity]
src/client/console/libnxmc/main.cpp [copied from include/netxms-version.h with 59% similarity]
src/client/console/libnxmc/nxview.cpp [copied from include/netxms-version.h with 58% similarity]
src/client/console/libnxmc/nxview.h [copied from include/netxms-version.h with 58% similarity]
src/client/console/libnxmc/viewtracker.cpp [new file with mode: 0644]
src/client/console/nxmc/busydlg.cpp [new file with mode: 0644]
src/client/console/nxmc/busydlg.h [copied from include/netxms-version.h with 58% similarity]
src/client/console/nxmc/comm.cpp [new file with mode: 0644]
src/client/console/nxmc/conlog.cpp [new file with mode: 0644]
src/client/console/nxmc/conlog.h [copied from include/netxms-version.h with 58% similarity]
src/client/console/nxmc/frame.cpp [copied from include/netxms-version.h with 57% similarity]
src/client/console/nxmc/frame.h [copied from include/netxms-version.h with 58% similarity]
src/client/console/nxmc/logindlg.cpp [new file with mode: 0644]
src/client/console/nxmc/logindlg.h [new file with mode: 0644]
src/client/console/nxmc/mainfrm.cpp [new file with mode: 0644]
src/client/console/nxmc/mainfrm.h [new file with mode: 0644]
src/client/console/nxmc/nxmc.cpp [new file with mode: 0644]
src/client/console/nxmc/nxmc.dsp [new file with mode: 0644]
src/client/console/nxmc/nxmc.h [new file with mode: 0644]
src/client/console/nxmc/nxmc.rc [new file with mode: 0644]
src/client/console/nxmc/plugins.cpp [copied from include/netxms-version.h with 58% similarity]
src/client/console/nxmc/rc/login.png [new file with mode: 0644]
src/client/console/nxmc/rc/nxmc.fbp [new file with mode: 0644]
src/client/console/nxmc/rc/processing.png [new file with mode: 0644]
src/client/console/nxmc/resource.h [new file with mode: 0644]
src/client/console/plugins/ObjectBrowser/main.cpp [copied from include/netxms-version.h with 59% similarity]
src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp [new file with mode: 0644]
src/client/console/plugins/ObjectBrowser/object_browser.h [copied from include/netxms-version.h with 58% similarity]
src/console/nxav/nxav.clw
src/console/win32/GraphManagerDlg.cpp
src/libnetxms/dload.cpp
src/libnxcl/libnxcl.h
src/libnxcl/objects.cpp

index 19afb41..d2a962d 100644 (file)
@@ -430,6 +430,36 @@ src/agent/subagents/winperf/winperf.cpp -text
 src/agent/subagents/winperf/winperf.dsp -text
 src/agent/subagents/winperf/winperf.dsw -text
 src/agent/subagents/winperf/winperf.h -text
+src/client/console/include/nxmc_api.h -text
+src/client/console/libnxmc/libnxmc.dsp -text
+src/client/console/libnxmc/libnxmc.h -text
+src/client/console/libnxmc/main.cpp -text
+src/client/console/libnxmc/nxview.cpp -text
+src/client/console/libnxmc/nxview.h -text
+src/client/console/libnxmc/viewtracker.cpp -text
+src/client/console/nxmc/busydlg.cpp -text
+src/client/console/nxmc/busydlg.h -text
+src/client/console/nxmc/comm.cpp -text
+src/client/console/nxmc/conlog.cpp -text
+src/client/console/nxmc/conlog.h -text
+src/client/console/nxmc/frame.cpp -text
+src/client/console/nxmc/frame.h -text
+src/client/console/nxmc/logindlg.cpp -text
+src/client/console/nxmc/logindlg.h -text
+src/client/console/nxmc/mainfrm.cpp -text
+src/client/console/nxmc/mainfrm.h -text
+src/client/console/nxmc/nxmc.cpp -text
+src/client/console/nxmc/nxmc.dsp -text
+src/client/console/nxmc/nxmc.h -text
+src/client/console/nxmc/nxmc.rc -text
+src/client/console/nxmc/plugins.cpp -text
+src/client/console/nxmc/rc/login.png -text
+src/client/console/nxmc/rc/nxmc.fbp -text
+src/client/console/nxmc/rc/processing.png -text
+src/client/console/nxmc/resource.h -text
+src/client/console/plugins/ObjectBrowser/main.cpp -text
+src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp -text
+src/client/console/plugins/ObjectBrowser/object_browser.h -text
 src/console/Makefile.am -text
 src/console/PocketPC/AlarmView.cpp -text
 src/console/PocketPC/AlarmView.h -text
index 0cd3e25..d1c4804 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
+/* $Id: netxms-version.h,v 1.122 2007-07-11 19:46:57 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
 ** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
@@ -31,9 +31,9 @@
 
 #define NETXMS_VERSION_MAJOR        0
 #define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
+#define NETXMS_VERSION_BUILD        19
 #define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+#define NETXMS_VERSION_STRING       _T("0.2.19-rc1")
 
 
 //
index 41373f0..65a5e1f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: nms_util.h,v 1.107 2007-07-02 23:14:16 victor Exp $ */
+/* $Id: nms_util.h,v 1.108 2007-07-11 19:46:57 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
 ** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
@@ -461,9 +461,9 @@ extern "C"
                                            NX_CFG_TEMPLATE *pTemplateList, BOOL bPrint);
    int LIBNETXMS_EXPORTABLE NxDCIDataTypeFromText(TCHAR *pszText);
 
-   HMODULE LIBNETXMS_EXPORTABLE DLOpen(TCHAR *szLibName, TCHAR *pszErrorText);
+   HMODULE LIBNETXMS_EXPORTABLE DLOpen(const TCHAR *pszLibName, TCHAR *pszErrorText);
    void LIBNETXMS_EXPORTABLE DLClose(HMODULE hModule);
-   void LIBNETXMS_EXPORTABLE *DLGetSymbolAddr(HMODULE hModule, TCHAR *szSymbol, TCHAR *pszErrorText);
+   void LIBNETXMS_EXPORTABLE *DLGetSymbolAddr(HMODULE hModule, const TCHAR *pszSymbol, TCHAR *pszErrorText);
 
    void LIBNETXMS_EXPORTABLE InitSubAgentsLogger(void (* pFunc)(int, TCHAR *));
    void LIBNETXMS_EXPORTABLE InitSubAgentsTrapSender(void (* pFunc1)(DWORD, int, TCHAR **),
@@ -549,6 +549,9 @@ void LIBNETXMS_EXPORTABLE StartMainLoop(THREAD_RESULT (THREAD_CALL * pfSignalHan
 /*
 
 $Log: not supported by cvs2svn $
+Revision 1.107  2007/07/02 23:14:16  victor
+Various fixes
+
 Revision 1.106  2007/06/20 13:28:35  victor
 Fixed 'const char *' to 'char *' conversion error with some GCC versions
 
index c8c04a8..01a62fc 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: nxclapi.h,v 1.269 2007-07-02 12:32:12 victor Exp $ */
+/* $Id: nxclapi.h,v 1.270 2007-07-11 19:46:57 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
 ** Client Library API
@@ -1747,7 +1747,7 @@ void LIBNXCL_EXPORTABLE *NXCGetClientData(NXC_SESSION hSession);
 void LIBNXCL_EXPORTABLE NXCSetClientData(NXC_SESSION hSession, void *pData);
 
 DWORD LIBNXCL_EXPORTABLE NXCSyncObjects(NXC_SESSION hSession);
-DWORD LIBNXCL_EXPORTABLE NXCSyncObjectsEx(NXC_SESSION hSession, TCHAR *pszCacheFile,
+DWORD LIBNXCL_EXPORTABLE NXCSyncObjectsEx(NXC_SESSION hSession, const TCHAR *pszCacheFile,
                                           BOOL bSyncComments);
 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectById(NXC_SESSION hSession, DWORD dwId);
 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectByIdNoLock(NXC_SESSION hSession, DWORD dwId);
@@ -1777,7 +1777,7 @@ DWORD LIBNXCL_EXPORTABLE NXCGetSupportedParameters(NXC_SESSION hSession, DWORD d
 void LIBNXCL_EXPORTABLE NXCGetComparableObjectName(NXC_SESSION hSession, DWORD dwObjectId,
                                                    TCHAR *pszName);
 void LIBNXCL_EXPORTABLE NXCGetComparableObjectNameEx(NXC_OBJECT *pObject, TCHAR *pszName);
-DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, TCHAR *pszFile);
+DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, const TCHAR *pszFile);
 DWORD LIBNXCL_EXPORTABLE NXCGetAgentConfig(NXC_SESSION hSession, DWORD dwNodeId,
                                            TCHAR **ppszConfig);
 DWORD LIBNXCL_EXPORTABLE NXCUpdateAgentConfig(NXC_SESSION hSession, DWORD dwNodeId,
index cd9594e..03fc76e 100644 (file)
@@ -78,6 +78,24 @@ Package=<4>
 
 ###############################################################################
 
+Project: "libnxmc"=.\src\client\console\libnxmc\libnxmc.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libnetxms
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxcl
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Project: "libnxsl"=.\src\libnxsl\libnxsl.dsp - Package Owner=<4>
 
 Package=<5>
@@ -150,6 +168,27 @@ Package=<4>
 
 ###############################################################################
 
+Project: "mcpObjectBrowser"=.\src\client\console\plugins\ObjectBrowser\mcpObjectBrowser.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libnetxms
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxcl
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxmc
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Project: "mssql"=.\src\server\dbdrv\mssql\mssql.dsp - Package Owner=<4>
 
 Package=<5>
@@ -438,6 +477,30 @@ Package=<4>
 
 ###############################################################################
 
+Project: "nxmc"=.\src\client\console\nxmc\nxmc.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libnetxms
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxcl
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxmap
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxmc
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Project: "nxmibc"=.\src\nxmibc\nxmibc.dsp - Package Owner=<4>
 
 Package=<5>
diff --git a/src/client/console/include/nxmc_api.h b/src/client/console/include/nxmc_api.h
new file mode 100644 (file)
index 0000000..cf1e57c
--- /dev/null
@@ -0,0 +1,154 @@
+#ifndef _nxmc_api_h_
+#define _nxmc_api_h_
+
+#define WXUSINGDLL
+
+#ifdef _WIN32
+#include <wx/msw/winundef.h>
+#endif
+
+#include <wx/wx.h>
+
+#ifndef WX_PRECOMP
+#include <wx/app.h>
+#include <wx/frame.h>
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/filesys.h>
+#include <wx/fs_arc.h>
+#include <wx/fs_mem.h>
+#include <wx/aui/aui.h>
+#include <wx/dir.h>
+#include <wx/config.h>
+#include <wx/stdpaths.h>
+#endif
+
+
+#ifdef LIBNXMC_EXPORTS
+#define LIBNXMC_EXPORTABLE __declspec(dllexport)
+#else
+#define LIBNXMC_EXPORTABLE __declspec(dllimport)
+#endif
+
+
+//
+// Constants
+//
+
+#define MAX_PLUGIN_NAME_LEN      256
+#define MAX_PLUGIN_VERSION_LEN   64
+
+
+//
+// Integration points
+//
+
+#define NXMC_IP_CONTROL_PANEL                  0x0001
+#define NXMC_IP_MAIN_MENU                              0x0002
+#define NXMC_IP_PLUGIN_CONTEXT_MENU    0x0004
+
+
+//
+// Export definition
+//
+
+#ifdef _WIN32
+#define NXMC_PLUGIN_EXPORT __declspec(dllexport)
+#else
+#define NXMC_PLUGIN_EXPORT
+#endif
+
+
+//
+// Macros for declaring plugin entry point
+//
+
+#define NXMC_IMPLEMENT_PLUGIN_REGISTRATION(n,v,f) \
+       extern "C" void NXMC_PLUGIN_EXPORT nxmcRegisterPlugin(NXMC_PLUGIN_INFO *p) \
+       { \
+               nx_strncpy(p->name, n, MAX_PLUGIN_NAME_LEN); \
+               nx_strncpy(p->version, v, MAX_PLUGIN_VERSION_LEN); \
+               p->flags = f; \
+       }
+
+
+//
+// Plugin registration structure
+//
+
+typedef struct
+{
+       TCHAR name[MAX_PLUGIN_NAME_LEN];
+       TCHAR version[MAX_PLUGIN_VERSION_LEN];
+       DWORD flags;
+} NXMC_PLUGIN_INFO;
+
+
+//
+// Data exchange macros
+//
+
+#define DX_GET_TEXTCTRL(id,var) \
+       { \
+               var = XRCCTRL(*this,id,wxTextCtrl)->GetValue(); \
+       }
+#define DX_SET_TEXTCTRL(id,var) \
+       { \
+               XRCCTRL(*this,id,wxTextCtrl)->SetValue(var); \
+       }
+
+#define DX_GET_CHECKBOX(id,var) \
+       { \
+               var = XRCCTRL(*this,id,wxCheckBox)->IsChecked(); \
+       }
+#define DX_SET_CHECKBOX(id,var) \
+       { \
+               XRCCTRL(*this,id,wxCheckBox)->SetValue(var); \
+       }
+
+#define DX_GET_STATIC(id,var) \
+       { \
+               var = XRCCTRL(*this,id,wxStaticText)->GetLabel(); \
+       }
+#define DX_SET_STATIC(id,var) \
+       { \
+               XRCCTRL(*this,id,wxStaticText)->SetLabel(var); \
+       }
+
+#define DX_GET_COMBOBOX(id,var) \
+       { \
+               var = XRCCTRL(*this,id,wxComboBox)->GetValue(); \
+       }
+#define DX_SET_COMBOBOX(id,var) \
+       { \
+               XRCCTRL(*this,id,wxComboBox)->SetValue(var); \
+       }
+
+
+//
+// Additional event table macros
+//
+
+#define EVT_NC_RIGHT_DOWN(func) wx__DECLARE_EVT0(wxEVT_NC_RIGHT_DOWN, wxMouseEventHandler(func))
+#define EVT_NC_RIGHT_UP(func) wx__DECLARE_EVT0(wxEVT_NC_RIGHT_UP, wxMouseEventHandler(func))
+
+
+//
+// Classes
+//
+
+#include "../libnxmc/nxview.h"
+
+
+//
+// Functions
+//
+
+void LIBNXMC_EXPORTABLE InitViewTracker(wxAuiManager *mgr, wxAuiNotebook *nb);
+void LIBNXMC_EXPORTABLE RegisterUniqueView(const TCHAR *name, nxView *view);
+void LIBNXMC_EXPORTABLE UnregisterUniqueView(const TCHAR *name);
+nxView LIBNXMC_EXPORTABLE *FindUniqueView(const TCHAR *name);
+void LIBNXMC_EXPORTABLE ActivateView(nxView *view);
+
+
+#endif
diff --git a/src/client/console/libnxmc/libnxmc.dsp b/src/client/console/libnxmc/libnxmc.dsp
new file mode 100644 (file)
index 0000000..2faf396
--- /dev/null
@@ -0,0 +1,223 @@
+# Microsoft Developer Studio Project File - Name="libnxmc" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=libnxmc - Win32 Debug UNICODE
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "libnxmc.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "libnxmc.mak" CFG="libnxmc - Win32 Debug UNICODE"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "libnxmc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libnxmc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libnxmc - Win32 Release UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libnxmc - Win32 Debug UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "libnxmc - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /dll /machine:I386
+
+!ELSEIF  "$(CFG)" == "libnxmc - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+
+!ELSEIF  "$(CFG)" == "libnxmc - Win32 Release UNICODE"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release UNICODE"
+# PROP BASE Intermediate_Dir "Release UNICODE"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_UNICODE"
+# PROP Intermediate_Dir "Release_UNICODE"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /D "UNICODE" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib /nologo /dll /machine:I386 /libpath:"..\..\..\libnetxms\Release_UNICODE" /libpath:"..\..\..\libnxcl\Release_UNICODE"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy   Release_UNICODE\libnxmc.dll   C:\NetXMS\bin\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "libnxmc - Win32 Debug UNICODE"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug UNICODE"
+# PROP BASE Intermediate_Dir "Debug UNICODE"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_UNICODE"
+# PROP Intermediate_Dir "Debug_UNICODE"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNXMC_EXPORTS" /D "UNICODE" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libnetxms\Debug_UNICODE" /libpath:"..\..\..\libnxcl\Debug_UNICODE"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Debug_UNICODE\libnxmc.dll ..\..\..\..\bin
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "libnxmc - Win32 Release"
+# Name "libnxmc - Win32 Debug"
+# Name "libnxmc - Win32 Release UNICODE"
+# Name "libnxmc - Win32 Debug UNICODE"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\main.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\nxview.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\viewtracker.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\libnxmc.h
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\..\include\netxms-version.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_common.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_cscp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_threads.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nxclapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nxcpapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\nxmc_api.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\nxview.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
similarity index 55%
copy from include/netxms-version.h
copy to src/client/console/libnxmc/libnxmc.h
index 0cd3e25..446b1ff 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: libnxmc.h
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#ifndef _libnxmc_h_
+#define _libnxmc_h_
 
+#define WXUSINGDLL
 
-//
-// Version constants 
-//
+#include <nms_common.h>
+#include <nms_util.h>
+#include <nxclapi.h>
+
+#ifdef _WIN32
+#include <wx/msw/winundef.h>
+#endif
+
+#include <wx/wx.h>
+
+#ifndef WX_PRECOMP
+#include <wx/app.h>
+#include <wx/frame.h>
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/filesys.h>
+#include <wx/fs_arc.h>
+#include <wx/fs_mem.h>
+#include <wx/aui/aui.h>
+#include <wx/dir.h>
+#endif
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+#include <nxmc_api.h>
 
 
 //
-// Current client-server protocol version
+// Hash map types
 //
 
-#define CLIENT_PROTOCOL_VERSION     14
+WX_DECLARE_STRING_HASH_MAP(nxView*, nxViewHash);
 
 
 #endif
similarity index 59%
copy from include/netxms-version.h
copy to src/client/console/libnxmc/main.cpp
index 0cd3e25..0e0c9d2 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: main.cpp
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#include "libnxmc.h"
 
 
 //
-// Version constants 
+// DLL entry point
 //
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
-
-
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
+#ifdef _WIN32
 
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+       if (dwReason == DLL_PROCESS_ATTACH)
+               DisableThreadLibraryCalls(hInstance);
+       return TRUE;
+}
 
 #endif
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/libnxmc/nxview.cpp
index 0cd3e25..4bb21cc 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: nxview.cpp
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#include "libnxmc.h"
 
 
 //
-// Version constants 
+// Event table
 //
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+BEGIN_EVENT_TABLE(nxView, wxWindow)
+       EVT_NC_RIGHT_DOWN(OnNcRightDown)
+END_EVENT_TABLE()
 
 
 //
-// Current client-server protocol version
+// Constructor
 //
 
-#define CLIENT_PROTOCOL_VERSION     14
+nxView::nxView(wxWindow *parent)
+       : wxWindow(parent, wxID_ANY,  wxDefaultPosition, wxDefaultSize)
+{
+}
 
 
-#endif
+//
+// Destructor
+//
+
+nxView::~nxView()
+{
+}
+
+
+//
+// Right mouse button down in non-client area
+//
+
+void nxView::OnNcRightDown(wxMouseEvent &event)
+{
+       MessageBox(NULL, L"right click", L"", 0);
+}
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/libnxmc/nxview.h
index 0cd3e25..e88db96 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: nxview.h
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#ifndef _nxview_h_
+#define _nxview_h_
 
+class LIBNXMC_EXPORTABLE nxView : public wxWindow
+{
+public:
+       nxView(wxWindow *parent);
+       virtual ~nxView();
 
-//
-// Version constants 
-//
-
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
-
-
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
+       // Event handlers
+protected:
+       void OnNcRightDown(wxMouseEvent &event);
 
+       DECLARE_EVENT_TABLE()
+};
 
 #endif
diff --git a/src/client/console/libnxmc/viewtracker.cpp b/src/client/console/libnxmc/viewtracker.cpp
new file mode 100644 (file)
index 0000000..8e3a599
--- /dev/null
@@ -0,0 +1,115 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: viewtracker.cpp
+**
+**/
+
+#include "libnxmc.h"
+
+
+//
+// Static data
+//
+
+nxViewHash s_viewMap;
+wxAuiManager *s_mgr = NULL;
+wxAuiNotebook *s_notebook = NULL;
+
+
+//
+// Initialize view tracker
+//
+
+void LIBNXMC_EXPORTABLE InitViewTracker(wxAuiManager *mgr, wxAuiNotebook *nb)
+{
+       s_mgr = mgr;
+       s_notebook = nb;
+}
+
+
+//
+// Register unique view
+//
+
+void LIBNXMC_EXPORTABLE RegisterUniqueView(const TCHAR *name, nxView *view)
+{
+       s_viewMap[name] = view;
+       view->SetName(name);
+}
+
+
+//
+// Unregister unique view
+//
+
+void LIBNXMC_EXPORTABLE UnregisterUniqueView(const TCHAR *name)
+{
+       nxViewHash::iterator it;
+
+       it = s_viewMap.find(name);
+       if (it != s_viewMap.end())
+               s_viewMap.erase(it);
+}
+
+
+//
+// Find unique view
+//
+
+nxView LIBNXMC_EXPORTABLE *FindUniqueView(const TCHAR *name)
+{
+       nxViewHash::iterator it;
+
+       it = s_viewMap.find(name);
+       return (it != s_viewMap.end()) ? it->second : NULL;
+}
+
+
+//
+// Activate view
+//
+
+void LIBNXMC_EXPORTABLE ActivateView(nxView *view)
+{
+       // First, try to find requested view in panes
+       wxAuiPaneInfo &pane = s_mgr->GetPane(view->GetName());
+       if (pane.IsOk())
+       {
+               pane.Show();
+               view->SetFocus();
+       }
+       else
+       {
+               // Find view in notebook
+               size_t page;
+
+               page = s_notebook->GetPageIndex(view);
+               if (page != wxNOT_FOUND)
+               {
+                       // Activate page
+                       s_notebook->SetSelection(page);
+               }
+               else
+               {
+                       // View is in detached frame
+                       view->SetFocus();
+               }
+       }
+}
diff --git a/src/client/console/nxmc/busydlg.cpp b/src/client/console/nxmc/busydlg.cpp
new file mode 100644 (file)
index 0000000..7215da5
--- /dev/null
@@ -0,0 +1,100 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: busydlg.cpp
+**
+**/
+
+#include "nxmc.h"
+#include "busydlg.h"
+
+
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxBusyDialog, wxDialog)
+       EVT_NX_REQUEST_COMPLETED(OnRequestCompleted)
+       EVT_NX_SET_STATUS_TEXT(OnSetStatusText)
+END_EVENT_TABLE()
+
+
+//
+// Constructor
+//
+
+nxBusyDialog::nxBusyDialog(wxWindow *parent, TCHAR *initialText)
+             : wxDialog()
+{
+       m_rcc = RCC_INTERNAL_ERROR;
+       wxXmlResource::Get()->LoadDialog(this, parent, _T("nxBusyDialog"));
+       XRCCTRL(*this, "textMessage", wxStaticText)->SetLabel((initialText != NULL) ? initialText : _T("Processing request..."));
+}
+
+
+//
+// Handler for nxEVT_REQUEST_COMPLETED event
+//
+
+void nxBusyDialog::OnRequestCompleted(wxCommandEvent &event)
+{
+       m_rcc = CAST_FROM_POINTER(event.GetClientData(), DWORD);
+       EndModal(wxID_OK);
+}
+
+
+//
+// Handler for nxEVT_SET_STATUS_TEXT event
+//
+
+void nxBusyDialog::OnSetStatusText(wxCommandEvent &event)
+{
+       TCHAR *text;
+
+       text = (TCHAR *)event.GetClientData();
+       if (text != NULL)
+       {
+               XRCCTRL(*this, "textMessage", wxStaticText)->SetLabel(text);
+               free(text);
+       }
+}
+
+
+//
+// Set status text (thread-safe)
+//
+
+void nxBusyDialog::SetStatusText(TCHAR *newText)
+{
+       wxCommandEvent event(nxEVT_SET_STATUS_TEXT);
+       event.SetClientData(_tcsdup(CHECK_NULL(newText)));
+       AddPendingEvent(event);
+}
+
+
+//
+// Report operation completion (thread-safe)
+//
+
+void nxBusyDialog::ReportCompletion(DWORD rcc)
+{
+       wxCommandEvent event(nxEVT_REQUEST_COMPLETED);
+       event.SetClientData(CAST_TO_POINTER(rcc, void *));
+       AddPendingEvent(event);
+}
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/nxmc/busydlg.h
index 0cd3e25..86a401d 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: busydlg.h
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#ifndef _busydlg_h_
+#define _busydlg_h_
 
+class nxBusyDialog : public wxDialog
+{
+public:
+       DWORD m_rcc;
 
-//
-// Version constants 
-//
+       nxBusyDialog(wxWindow *parent, TCHAR *initialText);
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+       void ReportCompletion(DWORD rcc);
+       void SetStatusText(TCHAR *newText);
 
+       // Event handlers
+protected:
+       void OnSetStatusText(wxCommandEvent &event);
+       void OnRequestCompleted(wxCommandEvent &event);
 
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
-
+       DECLARE_EVENT_TABLE()
+};
 
 #endif
diff --git a/src/client/console/nxmc/comm.cpp b/src/client/console/nxmc/comm.cpp
new file mode 100644 (file)
index 0000000..51f2235
--- /dev/null
@@ -0,0 +1,123 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: comm.cpp
+**
+**/
+
+#include "nxmc.h"
+#include "logindlg.h"
+
+
+//
+// Login data
+//
+
+struct LOGIN_DATA
+{
+       DWORD flags;
+       int objectCacheMode;            // 0 = disabled, 1 = clear current, 2 = use existing
+       TCHAR server[MAX_DB_STRING];
+       TCHAR login[MAX_DB_STRING];
+       TCHAR password[MAX_DB_STRING];
+       nxBusyDialog *dlg;
+};
+
+
+//
+// Login thread
+//
+
+static THREAD_RESULT THREAD_CALL LoginThread(void *arg)
+{
+       LOGIN_DATA *data = ((LOGIN_DATA *)arg);
+       DWORD rcc;
+
+       rcc = NXCConnect(data->flags, data->server, data->login,
+                        data->password, 0, NULL, NULL, &g_hSession,
+                        _T("NetXMS Console/") NETXMS_VERSION_STRING, NULL);
+
+       // Synchronize objects
+       if (rcc == RCC_SUCCESS)
+       {
+      BYTE serverId[8];
+               TCHAR serverIdAsText[32];
+               wxString cacheFile;
+
+      data->dlg->SetStatusText(_T("Synchronizing objects..."));
+      if (data->objectCacheMode != 0)
+               {
+                       NXCGetServerID(g_hSession, serverId);
+                       BinToStr(serverId, 8, serverIdAsText);
+                       cacheFile = wxStandardPaths::Get().GetUserDataDir();
+                       cacheFile += FS_PATH_SEPARATOR;
+                       cacheFile += _T("cache.");
+                       cacheFile += serverIdAsText;
+                       cacheFile += _T(".");
+                       cacheFile += data->login;
+                       if (data->objectCacheMode == 1)
+                               wxRemoveFile(cacheFile);
+                       wxLogDebug(_T("Using object cache file: %s"), cacheFile.c_str());
+               }
+      rcc = NXCSubscribe(g_hSession, NXC_CHANNEL_OBJECTS);
+      if (rcc == RCC_SUCCESS)
+         rcc = NXCSyncObjectsEx(g_hSession, (data->objectCacheMode != 0) ? cacheFile.c_str() : NULL, TRUE);
+       }
+
+       data->dlg->ReportCompletion(rcc);
+   return THREAD_OK;
+}
+
+
+//
+// Do login
+//
+
+DWORD DoLogin(nxLoginDialog &dlgLogin)
+{
+       LOGIN_DATA data;
+       nxBusyDialog dlgWait(wxGetApp().GetMainFrame(), _T("Connecting to server..."));
+
+       data.flags = 0;
+       if (dlgLogin.m_isMatchVersion)
+               data.flags |= NXCF_EXACT_VERSION_MATCH;
+       if (dlgLogin.m_isEncrypt)
+               data.flags |= NXCF_ENCRYPT;
+       if (dlgLogin.m_isCacheDisabled)
+       {
+               data.objectCacheMode = 0;
+       }
+       else if (dlgLogin.m_isClearCache)
+       {
+               data.objectCacheMode = 1;
+       }
+       else
+       {
+               data.objectCacheMode = 2;
+       }
+       nx_strncpy(data.server, dlgLogin.m_server, MAX_DB_STRING);
+       nx_strncpy(data.login, dlgLogin.m_login, MAX_DB_STRING);
+       nx_strncpy(data.password, dlgLogin.m_password, MAX_DB_STRING);
+       data.dlg = &dlgWait;
+       wxLogDebug(_T("Attempting to establish connection with server: HOST=%s LOGIN=%s PASSWD=%s FLAGS=%04X"),
+                  data.server, data.login, data.password, data.flags);
+       ThreadCreate(LoginThread, 0, &data);
+       dlgWait.ShowModal();
+       return dlgWait.m_rcc;
+}
diff --git a/src/client/console/nxmc/conlog.cpp b/src/client/console/nxmc/conlog.cpp
new file mode 100644 (file)
index 0000000..9e7a6be
--- /dev/null
@@ -0,0 +1,49 @@
+#include "nxmc.h"
+#include "conlog.h"
+
+
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxConsoleLogger, nxView)
+       EVT_SIZE(nxConsoleLogger::OnSize)
+END_EVENT_TABLE()
+
+
+//
+// Constructor
+//
+
+nxConsoleLogger::nxConsoleLogger(wxWindow *parent)
+                : nxView(parent)
+{
+       m_wndTextCtrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
+                                      wxDefaultPosition, wxDefaultSize,
+                                      wxTE_MULTILINE | wxSUNKEN_BORDER);
+       m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_wndTextCtrl));
+       wxLogMessage(_T("Message Logger Console started"));
+       RegisterUniqueView(_T("conlog"), this);
+}
+
+
+//
+// Destructor
+//
+
+nxConsoleLogger::~nxConsoleLogger()
+{
+       delete wxLog::SetActiveTarget(m_logOld);
+       UnregisterUniqueView(_T("conlog"));
+}
+
+
+//
+// Resize handler
+//
+
+void nxConsoleLogger::OnSize(wxSizeEvent &event)
+{
+       wxSize size = GetClientSize();
+       m_wndTextCtrl->SetSize(0, 0, size.x, size.y);
+}
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/nxmc/conlog.h
index 0cd3e25..1813e80 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: conlog.h
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#ifndef _conlog_h_
+#define _conlog_h_
 
+class nxConsoleLogger : public nxView
+{
+private:
+       wxLog *m_logOld;
+       wxTextCtrl *m_wndTextCtrl;
 
-//
-// Version constants 
-//
+public:
+       nxConsoleLogger(wxWindow *parent);
+       virtual ~nxConsoleLogger();
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
-
-
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
+protected:
+       void OnSize(wxSizeEvent &event);
 
+       DECLARE_EVENT_TABLE()
+};
 
 #endif
similarity index 57%
copy from include/netxms-version.h
copy to src/client/console/nxmc/frame.cpp
index 0cd3e25..83ba455 100644 (file)
@@ -1,7 +1,8 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
+/* $Id: frame.cpp,v 1.1 2007-07-11 19:46:58 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: frame.cpp
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#include "nxmc.h"
 
 
 //
-// Version constants 
+// Event table
 //
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+BEGIN_EVENT_TABLE(nxFrame, wxFrame)
+       EVT_SIZE(OnSize)
+END_EVENT_TABLE()
 
 
 //
-// Current client-server protocol version
+// Constructor
 //
 
-#define CLIENT_PROTOCOL_VERSION     14
+nxFrame::nxFrame(const wxString& title, wxWindow *child)
+        : wxFrame(NULL, wxID_ANY, title)
+{
+       m_child = child;
+       m_child->Reparent(this);
+}
 
 
-#endif
+//
+// Resize handler
+//
+
+void nxFrame::OnSize(wxSizeEvent &event)
+{
+       wxSize size = GetClientSize();
+       m_child->SetSize(0, 0, size.x, size.y);
+}
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/nxmc/frame.h
index 0cd3e25..92c3330 100644 (file)
@@ -1,7 +1,8 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
+/* $Id: frame.h,v 1.1 2007-07-11 19:46:58 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: frame.h
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#ifndef _frame_h_
+#define _frame_h_
 
+class nxFrame : public wxFrame
+{
+private:
+       wxWindow *m_child;
 
-//
-// Version constants 
-//
+public:
+       nxFrame(const wxString& title, wxWindow *child);
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+       virtual bool ShouldPreventAppExit() const { return false; }
 
+// Event handlers
+protected:
+       void OnSize(wxSizeEvent &event);
 
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
-
+       DECLARE_EVENT_TABLE()
+};
 
 #endif
diff --git a/src/client/console/nxmc/logindlg.cpp b/src/client/console/nxmc/logindlg.cpp
new file mode 100644 (file)
index 0000000..2b85720
--- /dev/null
@@ -0,0 +1,98 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: logindlg.cpp
+**
+**/
+
+#include "nxmc.h"
+#include "logindlg.h"
+
+
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxLoginDialog, wxDialog)
+       EVT_INIT_DIALOG(OnInitDialog)
+END_EVENT_TABLE()
+
+
+//
+// Constructor
+//
+
+nxLoginDialog::nxLoginDialog(wxWindow *parent)
+              : wxDialog()
+{
+       wxXmlResource::Get()->LoadDialog(this, parent, _T("nxLoginDialog"));
+}
+
+
+//
+// Data exchange
+//
+
+bool nxLoginDialog::TransferDataFromWindow(void)
+{
+       DX_GET_COMBOBOX("comboServer", m_server);
+       DX_GET_TEXTCTRL("textUserName", m_login);
+       DX_GET_TEXTCTRL("textPassword", m_password);
+       DX_GET_CHECKBOX("cbEncrypt", m_isEncrypt);
+       DX_GET_CHECKBOX("cbClearCache", m_isClearCache);
+       DX_GET_CHECKBOX("cbNoCache", m_isCacheDisabled);
+       DX_GET_CHECKBOX("cbMatchVersion", m_isMatchVersion);
+       return true;
+}
+
+bool nxLoginDialog::TransferDataToWindow(void)
+{
+       DX_SET_COMBOBOX("comboServer", m_server);
+       DX_SET_TEXTCTRL("textUserName", m_login);
+       DX_SET_TEXTCTRL("textPassword", m_password);
+       DX_SET_CHECKBOX("cbEncrypt", m_isEncrypt);
+       DX_SET_CHECKBOX("cbClearCache", m_isClearCache);
+       DX_SET_CHECKBOX("cbNoCache", m_isCacheDisabled);
+       DX_SET_CHECKBOX("cbMatchVersion", m_isMatchVersion);
+
+       if (m_isCacheDisabled)
+       {
+               wxCheckBox *cb;
+
+               cb = XRCCTRL(*this, "cbClearCache", wxCheckBox);
+               cb->SetValue(true);
+               cb->Disable();
+       }
+       return true;
+}
+
+
+//
+// Dialog initialization handler
+//
+
+void nxLoginDialog::OnInitDialog(wxInitDialogEvent &event)
+{
+       wxWindow *wnd;
+
+       wnd = FindWindowById(wxID_OK, this);
+       if (wnd != NULL)
+               ((wxButton *)wnd)->SetDefault();
+       event.Skip();
+}
diff --git a/src/client/console/nxmc/logindlg.h b/src/client/console/nxmc/logindlg.h
new file mode 100644 (file)
index 0000000..1a619fc
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _logindlg_h_
+#define _logindlg_h_
+
+class nxLoginDialog : public wxDialog
+{
+protected:
+       virtual bool TransferDataFromWindow(void);
+       virtual bool TransferDataToWindow(void);
+
+public:
+       nxLoginDialog(wxWindow *parent);
+
+       wxString m_login;
+       wxString m_password;
+       wxString m_server;
+       bool m_isEncrypt;
+       bool m_isCacheDisabled;
+       bool m_isClearCache;
+       bool m_isMatchVersion;
+
+// Event handlers
+protected:
+       void OnInitDialog(wxInitDialogEvent &event);
+
+       DECLARE_EVENT_TABLE()
+};
+
+#endif
diff --git a/src/client/console/nxmc/mainfrm.cpp b/src/client/console/nxmc/mainfrm.cpp
new file mode 100644 (file)
index 0000000..aaa0965
--- /dev/null
@@ -0,0 +1,310 @@
+/* $Id: mainfrm.cpp,v 1.1 2007-07-11 19:46:58 victor Exp $ */
+/* 
+** NetXMS - Network Management System
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: mainfrm.cpp
+**
+**/
+
+#include "nxmc.h"
+#include "conlog.h"
+#include "logindlg.h"
+
+
+//
+// Externals
+//
+
+DWORD DoLogin(nxLoginDialog &dlgLogin);
+
+
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxMainFrame, wxFrame)
+       EVT_CLOSE(OnClose)
+       EVT_CONTEXT_MENU(OnContextMenu)
+       EVT_NX_CONNECT(OnConnect)
+       EVT_MENU(XRCID("menuFileExit"), OnFileExit)
+       EVT_MENU(XRCID("menuViewConsoleLog"), OnViewConsoleLog)
+       EVT_MENU(XRCID("menuHelpAbout"), OnHelpAbout)
+       EVT_MENU(wxID_PANE_CLOSE, OnPaneClose)
+       EVT_MENU(wxID_PANE_DETACH, OnPaneDetach)
+       EVT_MENU(wxID_PANE_FLOAT, OnPaneFloat)
+       EVT_MENU(wxID_PANE_MOVE_TO_NOTEBOOK, OnPaneMoveToNotebook)
+END_EVENT_TABLE()
+
+
+//
+// Constructor
+//
+
+nxMainFrame::nxMainFrame(const wxPoint &pos, const wxSize &size)
+            :wxFrame((wxWindow *)NULL, wxID_ANY, _T("NetXMS Management Console"), pos, size)
+{
+       m_mgr.SetManagedWindow(this);
+
+       m_mgr.AddPane(CreateNotebook(), wxAuiPaneInfo().Name(_T("notebook")).CenterPane().PaneBorder(false));
+       InitViewTracker(&m_mgr, m_notebook);
+
+       m_mgr.AddPane(new nxConsoleLogger(this), wxAuiPaneInfo().Name(_T("conlog")).Caption(_T("Console Log")).Bottom().BestSize(700, 150));
+
+       SetMenuBar(wxXmlResource::Get()->LoadMenuBar(_T("menubarMain")));
+       CreateStatusBar();
+
+       m_mgr.Update();
+}
+
+
+//
+// Destructor
+//
+
+nxMainFrame::~nxMainFrame()
+{
+       m_mgr.UnInit();
+}
+
+
+//
+// Create notebook
+//
+
+wxAuiNotebook *nxMainFrame::CreateNotebook()
+{
+   // create the notebook off-window to avoid flicker
+   wxSize clientSize = GetClientSize();
+   
+   m_notebook = new wxAuiNotebook(this, wxID_ANY,
+                                  wxPoint(clientSize.x, clientSize.y),
+                                  wxSize(430,200),
+                                  wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER);
+   
+   wxBitmap bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
+   m_notebook->AddPage(new wxTextCtrl(m_notebook, wxID_ANY, wxT("Some text"),
+                wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxNO_BORDER) , wxT("wxTextCtrl 1"), false, bmp);
+
+       return m_notebook;
+}
+
+
+//
+// Close event handler
+//
+
+void nxMainFrame::OnClose(wxCloseEvent &event)
+{
+       wxConfig::Get()->Write(_T("/MainFrame/IsMaximized"), IsMaximized());
+       event.Skip();
+}
+
+
+//
+// File->Exit menu handler
+//
+
+void nxMainFrame::OnFileExit(wxCommandEvent &event)
+{
+       Close(true);
+}
+
+
+//
+// Help->About menu handler
+//
+
+void nxMainFrame::OnHelpAbout(wxCommandEvent &event)
+{
+       wxDialog *dlg;
+       wxStaticText *versionTextCtrl;
+
+       dlg = wxXmlResource::Get()->LoadDialog(this, _T("nxDlgAbout"));
+       dlg->SetAffirmativeId(XRCID("buttonOK"));
+       versionTextCtrl = XRCCTRL(*dlg, "staticTextVersion", wxStaticText);
+       versionTextCtrl->SetLabel(_T("Version ") NETXMS_VERSION_STRING);
+       dlg->ShowModal();
+       delete dlg;
+}
+
+
+//
+// File->Connect menu handler
+//
+
+void nxMainFrame::OnConnect(wxCommandEvent &event)
+{
+       nxLoginDialog dlg(this);
+       DWORD rcc;
+       int result;
+       wxConfigBase *cfg;
+
+       cfg = wxConfig::Get();
+       dlg.m_server = cfg->Read(_T("/Connect/Server"), _T("localhost"));
+       dlg.m_login = cfg->Read(_T("/Connect/Login"), _T(""));
+       cfg->Read(_T("/Connect/Encrypt"), &dlg.m_isEncrypt, false);
+       cfg->Read(_T("/Connect/ClearCache"), &dlg.m_isClearCache, true);
+       cfg->Read(_T("/Connect/DisableCaching"), &dlg.m_isCacheDisabled, true);
+       cfg->Read(_T("/Connect/MatchVersion"), &dlg.m_isMatchVersion, false);
+       do
+       {
+               result = dlg.ShowModal();
+               if (result == wxID_CANCEL)
+               {
+                       Close(true);
+                       break;
+               }
+
+               rcc = DoLogin(dlg);
+               if (rcc == RCC_SUCCESS)
+               {
+                       cfg->Write(_T("/Connect/Server"), dlg.m_server);
+                       cfg->Write(_T("/Connect/Login"), dlg.m_login);
+                       cfg->Write(_T("/Connect/Encrypt"), dlg.m_isEncrypt);
+                       cfg->Write(_T("/Connect/ClearCache"), dlg.m_isClearCache);
+                       cfg->Write(_T("/Connect/DisableCaching"), dlg.m_isCacheDisabled);
+                       cfg->Write(_T("/Connect/MatchVersion"), dlg.m_isMatchVersion);
+                       if (!dlg.m_isCacheDisabled)
+                       {
+                               g_appFlags |= AF_SAVE_OBJECT_CACHE;
+                       }
+                       nx_strncpy(g_userName, dlg.m_login.c_str(), MAX_DB_STRING);
+                       wxLogMessage(_T("Successfully connected to server %s as %s"), dlg.m_server.c_str(), dlg.m_login.c_str());
+               }
+               else
+               {
+                       wxGetApp().ShowClientError(rcc, _T("Cannot establish session with management server: %s"));
+               }
+       } while(rcc != RCC_SUCCESS);
+}
+
+
+//
+// View->Console Log menu handler
+//
+
+void nxMainFrame::OnViewConsoleLog(wxCommandEvent &event)
+{
+       nxView *view;
+
+       view = FindUniqueView(_T("conlog"));
+       if (view != NULL)
+       {
+               ActivateView(view);
+       }
+       else
+       {
+               m_mgr.AddPane(new nxConsoleLogger(this), wxAuiPaneInfo().Name(_T("conlog")).Caption(_T("Console Log")).Bottom().BestSize(700, 150));
+       }
+       m_mgr.Update();
+}
+
+
+//
+// Context menu handler
+//
+
+void nxMainFrame::OnContextMenu(wxContextMenuEvent &event)
+{
+       wxPoint pt;
+
+       pt = ScreenToClient(event.GetPosition());
+       if ((m_currPane = m_mgr.PaneHeaderFromPoint(pt.x, pt.y)) != NULL)
+       {
+               wxMenu menu;
+
+               menu.Append(wxID_PANE_DETACH, _T("&Detach"));
+               menu.Append(wxID_PANE_FLOAT, _T("&Float"));
+               menu.Append(wxID_PANE_MOVE_TO_NOTEBOOK, _T("&Move to main area"));
+               menu.Append(wxID_PANE_CLOSE, _T("&Close"));
+               PopupMenu(&menu);
+       }
+       else
+       {
+               event.Skip();
+       }
+}
+
+
+//
+// Close pane on request from context menu
+//
+
+void nxMainFrame::OnPaneClose(wxCommandEvent &event)
+{
+       if (m_currPane != NULL)
+       {
+               m_mgr.ClosePane(*m_currPane);
+               m_mgr.Update();
+       }
+}
+
+
+//
+// Detach pane on request from context menu
+//
+
+void nxMainFrame::OnPaneDetach(wxCommandEvent &event)
+{
+       wxWindow *wnd;
+       nxFrame *frame;
+
+       if (m_currPane != NULL)
+       {
+               wnd = m_currPane->window;
+               wxString caption = _T("NetXMS Console - ") + m_currPane->caption;
+               m_mgr.DetachPane(wnd);
+               frame = new nxFrame(caption, wnd);
+               m_mgr.Update();
+               frame->Show(true);
+       }
+}
+
+
+//
+// Float pane on request from context menu
+//
+
+void nxMainFrame::OnPaneFloat(wxCommandEvent &event)
+{
+       if (m_currPane != NULL)
+       {
+               m_currPane->Float();
+               m_mgr.Update();
+       }
+}
+
+
+//
+// Move pane to notebook on request from context menu
+//
+
+void nxMainFrame::OnPaneMoveToNotebook(wxCommandEvent &event)
+{
+       wxWindow *wnd;
+
+       if (m_currPane != NULL)
+       {
+               wnd = m_currPane->window;
+               wxString caption = m_currPane->caption;
+               m_mgr.DetachPane(wnd);
+               m_notebook->AddPage(wnd, caption, true);
+               m_mgr.Update();
+       }
+}
diff --git a/src/client/console/nxmc/mainfrm.h b/src/client/console/nxmc/mainfrm.h
new file mode 100644 (file)
index 0000000..1668981
--- /dev/null
@@ -0,0 +1,80 @@
+/* $Id: mainfrm.h,v 1.1 2007-07-11 19:46:58 victor Exp $ */
+/* 
+** NetXMS - Network Management System
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: mainfrm.h
+**
+**/
+
+#ifndef _mainfrm_h_
+#define _mainfrm_h_
+
+
+//
+// Customized wxAuiManager class
+//
+
+class nxAuiManager : public wxAuiManager
+{
+public:
+       wxAuiPaneInfo *PaneHeaderFromPoint(int x, int y)
+       {
+               wxAuiDockUIPart *part = HitTest(x, y);
+               if (part == NULL)
+                       return NULL;
+               return (part->type == wxAuiDockUIPart::typeCaption) ? part->pane : NULL;
+       }
+};
+
+
+//
+// Main frame class
+//
+
+class nxMainFrame : public wxFrame
+{
+protected:
+       nxAuiManager m_mgr;
+       wxAuiNotebook *m_notebook;
+       wxAuiPaneInfo *m_currPane;      // Current pane for context menu operation
+
+       wxAuiNotebook *CreateNotebook(void);
+
+public:
+       nxMainFrame(const wxPoint &pos, const wxSize &size);
+       virtual ~nxMainFrame();
+
+       // Event handlers
+protected:
+       void OnClose(wxCloseEvent &event);
+       void OnConnect(wxCommandEvent &event);
+       void OnFileExit(wxCommandEvent &event);
+       void OnViewConsoleLog(wxCommandEvent &event);
+       void OnHelpAbout(wxCommandEvent &event);
+       void OnPaneClose(wxCommandEvent &event);
+       void OnPaneDetach(wxCommandEvent &event);
+       void OnPaneFloat(wxCommandEvent &event);
+       void OnPaneMoveToNotebook(wxCommandEvent &event);
+       void OnContextMenu(wxContextMenuEvent &event);
+
+       DECLARE_EVENT_TABLE()
+};
+
+
+#endif
diff --git a/src/client/console/nxmc/nxmc.cpp b/src/client/console/nxmc/nxmc.cpp
new file mode 100644 (file)
index 0000000..53b68bc
--- /dev/null
@@ -0,0 +1,198 @@
+#include "nxmc.h"
+#include "mainfrm.h"
+
+
+//
+// Global variables
+//
+
+NXC_SESSION g_hSession = NULL;
+DWORD g_appFlags = 0;
+TCHAR g_userName[MAX_DB_STRING];
+
+
+//
+// Custom events
+//
+
+DEFINE_LOCAL_EVENT_TYPE(nxEVT_CONNECT)
+DEFINE_LOCAL_EVENT_TYPE(nxEVT_REQUEST_COMPLETED)
+DEFINE_LOCAL_EVENT_TYPE(nxEVT_SET_STATUS_TEXT)
+
+
+//
+// Implement application object
+//
+
+IMPLEMENT_APP(nxApp)
+
+
+//
+// Application init
+//
+
+bool nxApp::OnInit()
+{
+       SetAppName(_T("nxmc"));
+       SetVendorName(_T("NetXMS"));
+
+   InitThreadLibrary();
+
+       if (!wxApp::OnInit())
+               return false;
+
+#ifdef _WIN32
+   WSADATA wsaData;
+   WSAStartup(0x0002, &wsaData);
+#endif
+
+       if (!NXCInitialize())
+               return false;
+
+       wxFileSystem::AddHandler(new wxArchiveFSHandler);
+       wxImage::AddHandler(new wxPNGHandler);
+       wxImage::AddHandler(new wxICOHandler);
+
+       wxXmlResource::Get()->InitAllHandlers();
+#ifdef _WIN32
+       HRSRC hRes;
+       HGLOBAL hMem;
+       void *data;
+
+       wxFileSystem::AddHandler(new wxMemoryFSHandler);
+       hRes = FindResource(wxGetInstance(), MAKEINTRESOURCE(IDR_XRS), _T("XRS"));
+       if (hRes != NULL)
+       {
+               hMem = LoadResource(NULL, hRes);
+               if (hMem != NULL)
+               {
+                       data = LockResource(hMem);
+                       if (data != NULL)
+                       {
+                               wxMemoryFSHandler::AddFile(_T("resource.xrs"), data, SizeofResource(NULL, hRes));
+                               UnlockResource(hMem);
+                       }
+                       FreeResource(hMem);
+               }
+       }
+       if (!wxXmlResource::Get()->Load(_T("memory:resource.xrs")))
+         return false;
+#else
+       if (!wxXmlResource::Get()->Load(_T("nxmc.xrs")))
+         return false;
+#endif
+
+       // Create application directories if needed
+       wxFileName::Mkdir(wxStandardPaths::Get().GetUserDataDir(), 0700, wxPATH_MKDIR_FULL);
+
+       // Create global config object
+       wxConfig::Set(new wxConfig(GetAppName(), GetVendorName(), wxEmptyString, wxEmptyString, wxCONFIG_USE_LOCAL_FILE));
+
+       m_mainFrame = new nxMainFrame(wxDefaultPosition, wxSize(700, 500));
+       SetTopWindow(m_mainFrame);
+
+       LoadPlugins();
+
+       bool flag;
+       wxConfig::Get()->Read(_T("/MainFrame/IsMaximized"), &flag, true);
+       if (flag)
+               m_mainFrame->Maximize();
+       m_mainFrame->Show(true);
+
+       // Cause main window to show login dialog
+       wxCommandEvent event(nxEVT_CONNECT);
+       wxPostEvent(m_mainFrame, event);
+
+       return true;
+}
+
+
+//
+// Exit handler
+//
+
+int nxApp::OnExit()
+{
+       if (g_appFlags & AF_SAVE_OBJECT_CACHE)
+       {
+      BYTE serverId[8];
+               TCHAR serverIdAsText[32];
+               wxString cacheFile;
+
+               NXCGetServerID(g_hSession, serverId);
+               BinToStr(serverId, 8, serverIdAsText);
+               cacheFile = wxStandardPaths::Get().GetUserDataDir();
+               cacheFile += FS_PATH_SEPARATOR;
+               cacheFile += _T("cache.");
+               cacheFile += serverIdAsText;
+               cacheFile += _T(".");
+               cacheFile += g_userName;
+               NXCSaveObjectCache(g_hSession, cacheFile.c_str());
+       }
+       NXCDisconnect(g_hSession);
+       return wxApp::OnExit();
+}
+
+
+//
+// Load plugins
+//
+
+void nxApp::LoadPlugins(void)
+{
+       TCHAR *p;
+       wxString fname, path;
+       bool success;
+
+       // Determine plugin path
+       p = _tgetenv(_T("NXMC_PLUGIN_PATH"));
+       if (p != NULL)
+       {
+               path = p;
+               if (path.Last() != FS_PATH_SEPARATOR_CHAR)
+                       path.Append(FS_PATH_SEPARATOR_CHAR, 1);
+       }
+       else
+       {
+               // Search plugins in <install_dir>/lib/nxmc directory
+               path = wxStandardPaths::Get().GetPluginsDir();
+#ifdef _WIN32
+               // On Windows, GetPluginsDir() will return bin directory, change it to lib\nxmc
+               int idx = path.Find(FS_PATH_SEPARATOR_CHAR, true);
+               if (idx != wxNOT_FOUND)
+               {
+                       path.Truncate(idx);
+                       path.Append(_T("\\lib\\nxmc\\"));
+               }
+#else
+               if (path.Last() != FS_PATH_SEPARATOR_CHAR)
+                       path.Append(FS_PATH_SEPARATOR_CHAR, 1);
+#endif
+       }
+
+       // Find and load plugins
+       wxDir dir(path);
+       if (dir.IsOpened())
+       {
+               success = dir.GetFirst(&fname, _T("*.so"));
+               while(success)
+               {
+                       LoadPlugin(path + fname);
+                       success = dir.GetNext(&fname);
+               }
+       }
+}
+
+
+//
+// Show client library error
+//
+
+void nxApp::ShowClientError(DWORD rcc, TCHAR *msgTemplate)
+{
+       TCHAR msg[4096];
+
+       _sntprintf(msg, 4096, msgTemplate, NXCGetErrorText(rcc));
+       wxLogMessage(msg);
+       wxMessageBox(msg, _T("NetXMS Console - Error"), wxOK | wxICON_ERROR, m_mainFrame);
+}
diff --git a/src/client/console/nxmc/nxmc.dsp b/src/client/console/nxmc/nxmc.dsp
new file mode 100644 (file)
index 0000000..70ada59
--- /dev/null
@@ -0,0 +1,325 @@
+# Microsoft Developer Studio Project File - Name="nxmc" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=nxmc - Win32 Debug UNICODE
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "nxmc.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "nxmc.mak" CFG="nxmc - Win32 Debug UNICODE"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "nxmc - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "nxmc - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "nxmc - Win32 Release UNICODE" (based on "Win32 (x86) Application")
+!MESSAGE "nxmc - Win32 Debug UNICODE" (based on "Win32 (x86) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "nxmc - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\libnetxms\Release"
+
+!ELSEIF  "$(CFG)" == "nxmc - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 wxbase28ud.lib wxmsw28ud_core.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libnetxms\Debug"
+
+!ELSEIF  "$(CFG)" == "nxmc - Win32 Release UNICODE"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "nxmc___Win32_Release_UNICODE"
+# PROP BASE Intermediate_Dir "nxmc___Win32_Release_UNICODE"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_UNICODE"
+# PROP Intermediate_Dir "Release_UNICODE"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /D "__WXMSW__" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 libnetxmsw.lib libnxclw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\libnetxms\Release_UNICODE" /libpath:"..\..\..\libnxcl\Release_UNICODE"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Release_UNICODE\nxmc.exe C:\NetXMS\bin
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "nxmc - Win32 Debug UNICODE"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "nxmc___Win32_Debug_UNICODE"
+# PROP BASE Intermediate_Dir "nxmc___Win32_Debug_UNICODE"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_UNICODE"
+# PROP Intermediate_Dir "Debug_UNICODE"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wxbase28ud.lib wxmsw28ud_core.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 wxbase28ud.lib wxmsw28ud_core.lib libnetxmsw.lib libnxclw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\libnetxms\Debug_UNICODE" /libpath:"..\..\..\libnxcl\Debug_UNICODE"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Debug_UNICODE\nxmc.exe ..\..\..\..\bin
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "nxmc - Win32 Release"
+# Name "nxmc - Win32 Debug"
+# Name "nxmc - Win32 Release UNICODE"
+# Name "nxmc - Win32 Debug UNICODE"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\busydlg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\comm.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\conlog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\frame.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\logindlg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\mainfrm.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\nxmc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\plugins.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\busydlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\conlog.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\frame.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\logindlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mainfrm.h
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\..\include\netxms-version.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\netxms_maps.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_common.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_cscp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_threads.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nxclapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nxcpapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\nxmc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\nxmc_api.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\nxmc.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\rc\nxmc.xrs
+# End Source File
+# Begin Source File
+
+SOURCE=.\rc\wxfb_code.xrc
+
+!IF  "$(CFG)" == "nxmc - Win32 Release"
+
+# Begin Custom Build - Processing $(InputPath)
+ProjDir=.
+InputPath=.\rc\wxfb_code.xrc
+
+"rc\nxmc.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       perl ..\..\..\..\tools\update_xrc.pl < $(InputPath) > $(ProjDir)\rc\resource.xrc 
+       wxrc $(ProjDir)\rc\resource.xrc -o $(ProjDir)\rc\nxmc.xrs 
+       
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "nxmc - Win32 Debug"
+
+# Begin Custom Build - Processing $(InputPath)
+ProjDir=.
+InputPath=.\rc\wxfb_code.xrc
+
+"rc\nxmc.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       perl ..\..\..\..\tools\update_xrc.pl < $(InputPath) > $(ProjDir)\rc\resource.xrc 
+       wxrc $(ProjDir)\rc\resource.xrc -o $(ProjDir)\rc\nxmc.xrs 
+       
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "nxmc - Win32 Release UNICODE"
+
+# Begin Custom Build - Processing $(InputPath)
+ProjDir=.
+InputPath=.\rc\wxfb_code.xrc
+
+"rc\nxmc.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       perl ..\..\..\..\tools\update_xrc.pl < $(InputPath) > $(ProjDir)\rc\resource.xrc 
+       wxrc $(ProjDir)\rc\resource.xrc -o $(ProjDir)\rc\nxmc.xrs 
+       
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "nxmc - Win32 Debug UNICODE"
+
+# Begin Custom Build - Processing $(InputPath)
+ProjDir=.
+InputPath=.\rc\wxfb_code.xrc
+
+"rc\nxmc.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       perl ..\..\..\..\tools\update_xrc.pl < $(InputPath) > $(ProjDir)\rc\resource.xrc 
+       wxrc $(ProjDir)\rc\resource.xrc -o $(ProjDir)\rc\nxmc.xrs 
+       
+# End Custom Build
+
+!ENDIF 
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/src/client/console/nxmc/nxmc.h b/src/client/console/nxmc/nxmc.h
new file mode 100644 (file)
index 0000000..4a5035a
--- /dev/null
@@ -0,0 +1,99 @@
+#ifndef _nxmc_h_
+#define _nxmc_h_
+
+#include <nms_common.h>
+#include <nms_util.h>
+#include <nxclapi.h>
+
+#include <nxmc_api.h>
+
+#ifdef _WIN32
+#include "resource.h"
+
+extern "C" WXDLLIMPEXP_BASE HINSTANCE wxGetInstance();
+
+#endif
+
+#include "mainfrm.h"
+#include "busydlg.h"
+#include "frame.h"
+
+
+//
+// Application flags
+//
+
+#define AF_SAVE_OBJECT_CACHE           0x0001
+
+
+//
+// Custom events
+//
+
+BEGIN_DECLARE_EVENT_TYPES()
+    DECLARE_LOCAL_EVENT_TYPE(nxEVT_CONNECT, 0)
+    DECLARE_LOCAL_EVENT_TYPE(nxEVT_REQUEST_COMPLETED, 0)
+    DECLARE_LOCAL_EVENT_TYPE(nxEVT_SET_STATUS_TEXT, 0)
+END_DECLARE_EVENT_TYPES()
+
+#define EVT_NXMC_EVENT(evt, fn) \
+    DECLARE_EVENT_TABLE_ENTRY( \
+        evt, wxID_ANY, wxID_ANY, \
+                 (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
+        (wxObject *) NULL \
+    ),
+#define EVT_NX_CONNECT(fn)             EVT_NXMC_EVENT(nxEVT_CONNECT, fn)
+#define EVT_NX_REQUEST_COMPLETED(fn)   EVT_NXMC_EVENT(nxEVT_REQUEST_COMPLETED, fn)
+#define EVT_NX_SET_STATUS_TEXT(fn)     EVT_NXMC_EVENT(nxEVT_SET_STATUS_TEXT, fn)
+
+
+//
+// Command codes
+//
+
+#define wxID_PANE_DETACH                               (wxID_HIGHEST + 1)
+#define wxID_PANE_CLOSE                                        (wxID_HIGHEST + 2)
+#define wxID_PANE_FLOAT                                        (wxID_HIGHEST + 3)
+#define wxID_PANE_MOVE_TO_NOTEBOOK     (wxID_HIGHEST + 4)
+
+
+//
+// Application class
+//
+
+class nxApp : public wxApp
+{
+private:
+       nxMainFrame *m_mainFrame;
+
+       void LoadPlugins(void);
+
+public:
+    virtual bool OnInit();
+        virtual int OnExit();
+
+        nxMainFrame *GetMainFrame(void) { return m_mainFrame; }
+
+        void ShowClientError(DWORD rcc, TCHAR *msgTemplate);
+};
+
+DECLARE_APP(nxApp)
+
+
+//
+// Functions
+//
+
+bool LoadPlugin(wxString &file);
+
+
+//
+// Global variables
+//
+
+extern NXC_SESSION g_hSession;
+extern DWORD g_appFlags;
+extern TCHAR g_userName[];
+
+
+#endif
diff --git a/src/client/console/nxmc/nxmc.rc b/src/client/console/nxmc/nxmc.rc
new file mode 100644 (file)
index 0000000..5cd01fb
--- /dev/null
@@ -0,0 +1,116 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// XRS
+//
+
+IDR_XRS                 XRS     DISCARDABLE     "rc\\nxmc.xrs"
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "Comments", "\0"
+            VALUE "CompanyName", "NetXMS\0"
+            VALUE "FileDescription", "nxmc\0"
+            VALUE "FileVersion", "1, 0, 0, 1\0"
+            VALUE "InternalName", "nxmc\0"
+            VALUE "LegalCopyright", "Copyright © 2003-2007 Victor Kirhenshtein\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "nxmc.exe\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "NetXMS Management Console\0"
+            VALUE "ProductVersion", "1, 0, 0, 1\0"
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // !_MAC
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/nxmc/plugins.cpp
index 0cd3e25..9f3d960 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: plugins.cpp
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#include "nxmc.h"
 
 
 //
-// Version constants 
+// Load plugin
 //
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
-
-
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
-
-
-#endif
+bool LoadPlugin(wxString &file)
+{
+       HMODULE module;
+       TCHAR errorText[256];
+       bool status = false;
+
+       wxLogDebug(_T("Loading plugin %s..."), file.c_str());
+       module = DLOpen(file.c_str(), errorText);
+       if (module != NULL)
+       {
+       }
+       else
+       {
+               wxLogWarning(_T("Cannot load plugin module %s: %s"), file.c_str(), errorText);
+       }
+       return status;
+}
diff --git a/src/client/console/nxmc/rc/login.png b/src/client/console/nxmc/rc/login.png
new file mode 100644 (file)
index 0000000..744730d
Binary files /dev/null and b/src/client/console/nxmc/rc/login.png differ
diff --git a/src/client/console/nxmc/rc/nxmc.fbp b/src/client/console/nxmc/rc/nxmc.fbp
new file mode 100644 (file)
index 0000000..a019ef6
--- /dev/null
@@ -0,0 +1,1015 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="6" />
+    <object class="Project" expanded="1">
+        <property name="bitmaps"></property>
+        <property name="class_decoration"></property>
+        <property name="code_generation">XRC</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">wxfb_code</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="icons"></property>
+        <property name="internationalize">0</property>
+        <property name="name">NetXMS Management Console</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header">wx/wxprec.h</property>
+        <property name="relative_path">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="1">
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="enabled">1</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">delete_nxMainFrame</property>
+            <property name="pos"></property>
+            <property name="size">654,397</property>
+            <property name="style">wxDEFAULT_FRAME_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">NetXMS Management Console</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxMenuBar" expanded="1">
+                <property name="bg"></property>
+                <property name="context_help"></property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="label">MainMenu</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">menubarMain</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="style"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_style"></property>
+                <event name="OnUpdateUI"></event>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">&amp;File</property>
+                    <property name="name">menuFile</property>
+                    <property name="permission">protected</property>
+                    <object class="separator" expanded="1" />
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">E&amp;xit</property>
+                        <property name="name">menuFileExit</property>
+                        <property name="shortcut">Alt+X</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">&amp;View</property>
+                    <property name="name">menuView</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Console &amp;Log</property>
+                        <property name="name">menuViewConsoleLog</property>
+                        <property name="shortcut">Ctrl+Shift+F12</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">&amp;Control Panel</property>
+                        <property name="name">menuViewControlPanel</property>
+                        <property name="shortcut">F9</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="wxMenu" expanded="0">
+                    <property name="label">&amp;Perspective</property>
+                    <property name="name">menuPerspective</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">ID_PERSPECTIVE_SAVE</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Save current perspective...</property>
+                        <property name="name">menuPerspectiveSave</property>
+                        <property name="shortcut">Ctrl+Alt+S</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="1" />
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">&amp;Default perspective</property>
+                        <property name="name">menuPerspectiveDefault</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">&amp;Help</property>
+                    <property name="name">menuHelp</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">&amp;About...</property>
+                        <property name="name">menuHelpAbout</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="enabled">1</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font">MS Sans Serif,90,90,8</property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">nxDlgAbout</property>
+            <property name="pos"></property>
+            <property name="size">460,103</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">About</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxFlexGridSizer" expanded="1">
+                <property name="cols">3</property>
+                <property name="flexible_direction">wxHORIZONTAL</property>
+                <property name="growablecols">1</property>
+                <property name="growablerows"></property>
+                <property name="hgap">0</property>
+                <property name="minimum_size"></property>
+                <property name="name">fgSizer2</property>
+                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                <property name="permission">none</property>
+                <property name="rows">1</property>
+                <property name="vgap">0</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBitmap" expanded="1">
+                        <property name="bg"></property>
+                        <property name="bitmap">; Load From Icon Resource</property>
+                        <property name="context_help"></property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_bitmap2</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_style"></property>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer5</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="bg"></property>
+                                <property name="context_help"></property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="font"></property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">NetXMS Management Console</property>
+                                <property name="maximum_size"></property>
+                                <property name="minimum_size"></property>
+                                <property name="name">m_staticText5</property>
+                                <property name="permission">protected</property>
+                                <property name="pos"></property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="bg"></property>
+                                <property name="context_help"></property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="font"></property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Version x.y.z</property>
+                                <property name="maximum_size"></property>
+                                <property name="minimum_size"></property>
+                                <property name="name">staticTextVersion</property>
+                                <property name="permission">protected</property>
+                                <property name="pos"></property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="bg"></property>
+                                <property name="context_help"></property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="font"></property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Copyright (c) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein</property>
+                                <property name="maximum_size"></property>
+                                <property name="minimum_size"></property>
+                                <property name="name">m_staticText7</property>
+                                <property name="permission">protected</property>
+                                <property name="pos"></property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_RIGHT|wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxButton" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_OK</property>
+                        <property name="label">OK</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">buttonOK</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_style"></property>
+                        <event name="OnButtonClick"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="enabled">1</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font">MS Sans Serif,90,90,8</property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">nxLoginDialog</property>
+            <property name="pos"></property>
+            <property name="size">501,279</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">Connect to Server</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer2</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBitmap" expanded="1">
+                        <property name="bg"></property>
+                        <property name="bitmap">login.png; Load From File</property>
+                        <property name="context_help"></property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font">MS Sans Serif,90,90,8</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_bitmap2</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_style"></property>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxFlexGridSizer" expanded="0">
+                        <property name="cols">2</property>
+                        <property name="flexible_direction">wxHORIZONTAL</property>
+                        <property name="growablecols">0</property>
+                        <property name="growablerows"></property>
+                        <property name="hgap">5</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">fgSizer2</property>
+                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                        <property name="permission">none</property>
+                        <property name="rows">2</property>
+                        <property name="vgap">0</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxStaticBoxSizer" expanded="0">
+                                <property name="label">Connection</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">sbSizer1</property>
+                                <property name="orient">wxVERTICAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">1</property>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer3</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxFlexGridSizer" expanded="1">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxHORIZONTAL</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer3</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">3</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font">MS Sans Serif,90,90,8</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Server:</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_staticText5</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxComboBox" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="choices"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font">MS Sans Serif,90,90,8</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">comboServer</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxCB_DROPDOWN|wxCB_SORT</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="value">Combo!</property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnCombobox"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font">MS Sans Serif,90,90,8</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">User name:</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_staticText6</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font">MS Sans Serif,90,90,8</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">textUserName</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font">MS Sans Serif,90,90,8</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Password:</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_staticText7</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font">MS Sans Serif,90,90,8</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">textPassword</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_PASSWORD</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxStaticBoxSizer" expanded="0">
+                                <property name="label">Options</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">sbSizer2</property>
+                                <property name="orient">wxVERTICAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">1</property>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer4</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="checked">0</property>
+                                                <property name="context_help"></property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font">MS Sans Serif,90,90,8</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">&amp;Encrypt connection</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">cbEncrypt</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="checked">0</property>
+                                                <property name="context_help"></property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font">MS Sans Serif,90,90,8</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">&amp;Clear object cache on connect</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">cbClearCache</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="checked">0</property>
+                                                <property name="context_help"></property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font">MS Sans Serif,90,90,8</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">&amp;Do not cache this session</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">cbNoCache</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="checked">0</property>
+                                                <property name="context_help"></property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font">MS Sans Serif,90,90,8</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">&amp;Server version should match client version</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">cbMatchVersion</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStdDialogButtonSizer" expanded="1">
+                        <property name="Apply">0</property>
+                        <property name="Cancel">1</property>
+                        <property name="ContextHelp">0</property>
+                        <property name="Help">0</property>
+                        <property name="No">0</property>
+                        <property name="OK">1</property>
+                        <property name="Save">0</property>
+                        <property name="Yes">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_sdbSizer1</property>
+                        <property name="permission">protected</property>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="enabled">1</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">nxBusyDialog</property>
+            <property name="pos"></property>
+            <property name="size">436,63</property>
+            <property name="style"></property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxFlexGridSizer" expanded="1">
+                <property name="cols">2</property>
+                <property name="flexible_direction">wxHORIZONTAL</property>
+                <property name="growablecols">1</property>
+                <property name="growablerows"></property>
+                <property name="hgap">0</property>
+                <property name="minimum_size"></property>
+                <property name="name">fgSizer4</property>
+                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_ALL</property>
+                <property name="permission">none</property>
+                <property name="rows">1</property>
+                <property name="vgap">0</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_CENTER|wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBitmap" expanded="1">
+                        <property name="bg"></property>
+                        <property name="bitmap">processing.png; Load From File</property>
+                        <property name="context_help"></property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_bitmap3</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_style"></property>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">MyLabel</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">textMessage</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/src/client/console/nxmc/rc/processing.png b/src/client/console/nxmc/rc/processing.png
new file mode 100644 (file)
index 0000000..b3c0a9b
Binary files /dev/null and b/src/client/console/nxmc/rc/processing.png differ
diff --git a/src/client/console/nxmc/resource.h b/src/client/console/nxmc/resource.h
new file mode 100644 (file)
index 0000000..35c9a52
--- /dev/null
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by nxmc.rc
+//
+#define IDR_XRS                         101
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
similarity index 59%
copy from include/netxms-version.h
copy to src/client/console/plugins/ObjectBrowser/main.cpp
index 0cd3e25..72ece2a 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console - Object Browser plugin
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: main.cpp
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
+#include "object_browser.h"
 
 
 //
-// Version constants 
+// Registration function
 //
 
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
+NXMC_IMPLEMENT_PLUGIN_REGISTRATION(_T("ObjectBrowser"), NETXMS_VERSION_STRING, NXMC_IP_MAIN_MENU)
 
 
 //
-// Current client-server protocol version
+// Initialization function
 //
 
-#define CLIENT_PROTOCOL_VERSION     14
-
-
-#endif
+extern "C" bool NXMC_PLUGIN_EXPORT nxmcInitializePlugin(void)
+{
+       return true;
+}
diff --git a/src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp b/src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp
new file mode 100644 (file)
index 0000000..d1563b4
--- /dev/null
@@ -0,0 +1,177 @@
+# Microsoft Developer Studio Project File - Name="mcpObjectBrowser" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=mcpObjectBrowser - Win32 Debug UNICODE
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "mcpObjectBrowser.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "mcpObjectBrowser.mak" CFG="mcpObjectBrowser - Win32 Debug UNICODE"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "mcpObjectBrowser - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpObjectBrowser - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpObjectBrowser - Win32 Release UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpObjectBrowser - Win32 Debug UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "mcpObjectBrowser - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "__WXMSW__" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"Release/ObjectBrowser.so"
+
+!ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\include" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/ObjectBrowser.so" /pdbtype:sept
+
+!ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Release UNICODE"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "mcpObjectBrowser___Win32_Release_UNICODE"
+# PROP BASE Intermediate_Dir "mcpObjectBrowser___Win32_Release_UNICODE"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_UNICODE"
+# PROP Intermediate_Dir "Release_UNICODE"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "UNICODE" /D "__WXMSW__" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib libnxmc.lib /nologo /dll /machine:I386 /out:"Release_UNICODE/ObjectBrowser.so" /libpath:"..\..\..\..\libnetxms\Release_UNICODE" /libpath:"..\..\..\..\libnxcl\Release_UNICODE" /libpath:"..\..\libnxmc\Release_UNICODE"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy  Release_UNICODE\ObjectBrowser.so  C:\NetXMS\lib\nxmc\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Debug UNICODE"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "mcpObjectBrowser___Win32_Debug_UNICODE"
+# PROP BASE Intermediate_Dir "mcpObjectBrowser___Win32_Debug_UNICODE"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_UNICODE"
+# PROP Intermediate_Dir "Debug_UNICODE"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "UNICODE" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib libnxmc.lib /nologo /dll /debug /machine:I386 /out:"Debug_UNICODE/ObjectBrowser.so" /pdbtype:sept /libpath:"..\..\..\..\libnetxms\Debug_UNICODE" /libpath:"..\..\..\..\libnxcl\Debug_UNICODE" /libpath:"..\..\libnxmc\Debug_UNICODE"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Debug_UNICODE\ObjectBrowser.so ..\..\..\..\..\lib\nxmc
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "mcpObjectBrowser - Win32 Release"
+# Name "mcpObjectBrowser - Win32 Debug"
+# Name "mcpObjectBrowser - Win32 Release UNICODE"
+# Name "mcpObjectBrowser - Win32 Debug UNICODE"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\main.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\object_browser.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
similarity index 58%
copy from include/netxms-version.h
copy to src/client/console/plugins/ObjectBrowser/object_browser.h
index 0cd3e25..17e0d40 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: netxms-version.h,v 1.121 2007-06-27 18:19:40 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Portable management console - Object Browser plugin
+** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: netxms-version.h
+** File: object_browser.h
 **
 **/
 
-#ifndef _netxms_version_h_
-#define _netxms_version_h_
-
-
-//
-// Version constants 
-//
-
-#define NETXMS_VERSION_MAJOR        0
-#define NETXMS_VERSION_MINOR        2
-#define NETXMS_VERSION_BUILD        18
-#define NETXMS_VERSION_HOTFIX       0
-#define NETXMS_VERSION_STRING       _T("0.2.18")
-
-
-//
-// Current client-server protocol version
-//
-
-#define CLIENT_PROTOCOL_VERSION     14
+#ifndef _object_browser_h_
+#define _object_browser_h_
 
+#include <nms_common.h>
+#include <nms_util.h>
+#include <nxclapi.h>
+#include <nxmc_api.h>
 
 #endif
index 3e1f627..9a0446e 100644 (file)
@@ -14,22 +14,22 @@ Class3=CMainFrame
 Class4=CAboutDlg
 
 ResourceCount=11
-Resource1=IDD_REQUEST_WAIT
-Resource2=IDD_ABOUTBOX
+Resource1=IDR_MAINFRAME
+Resource2=IDD_SETTINGS
 Class2=CChildView
 Class5=CAlarmList
 Class6=CInfoLine
 Class7=CRequestProcessingDlg
 Resource3=IDD_ABOUTBOX (English (U.S.))
-Resource4=IDD_SETTINGS
+Resource4=IDD_ABOUTBOX
 Class9=CSettingsDlg
-Resource5=IDM_CONTEXT
+Resource5=IDD_REQUEST_WAIT
 Resource7=IDR_MAINFRAME (English (U.S.))
 Resource8=IDD_REQUEST_WAIT (English (U.S.))
 Resource9=IDD_SETTINGS (English (U.S.))
 Class8=CAlarmBrowser
 Resource10=IDM_CONTEXT (English (U.S.))
-Resource11=IDR_MAINFRAME
+Resource11=IDM_CONTEXT
 
 [CLS:CAlarmViewApp]
 Type=0
@@ -204,7 +204,7 @@ LastObject=CSettingsDlg
 
 [DLG:IDD_SETTINGS]
 Type=1
-Class=?
+Class=CSettingsDlg
 ControlCount=13
 Control1=IDC_CHECK_AUTOLOGIN,button,1342242819
 Control2=IDC_EDIT_SERVER_NAME,edit,1350631552
index 85a32ca..fab9efa 100644 (file)
@@ -124,8 +124,9 @@ void CGraphManagerDlg::CreateGraphTree(HTREEITEM hRoot, TCHAR *pszCurrPath, DWOR
             pszName = &szPath[j];
             for(; (szPath[j] != 0) && (memcmp(&szPath[j], _T("->"), sizeof(TCHAR) * 2)); j++);
             szPath[j] = 0;
-            StrStrip(pszName);
-                               hSubTree = m_wndTreeCtrl.InsertItem(pszName, 1, 1, hRoot);
+                               nx_strncpy(szName, pszName, MAX_DB_STRING);
+            StrStrip(szName);
+                               hSubTree = m_wndTreeCtrl.InsertItem(szName, 1, 1, hRoot);
                                m_wndTreeCtrl.SetItemData(hSubTree, 0);
                                CreateGraphTree(hSubTree, szPath, &i);
          }
index eb5661b..440a80e 100644 (file)
@@ -71,19 +71,19 @@ static char *m_pszErrorText[] =
 // Load DLL/shared library
 //
 
-HMODULE LIBNETXMS_EXPORTABLE DLOpen(TCHAR *szLibName, TCHAR *pszErrorText)
+HMODULE LIBNETXMS_EXPORTABLE DLOpen(const TCHAR *pszLibName, TCHAR *pszErrorText)
 {
    HMODULE hModule;
 
 #if defined(_WIN32)
-   hModule = LoadLibrary(szLibName);
+   hModule = LoadLibrary(pszLibName);
    if ((hModule == NULL) && (pszErrorText != NULL))
       GetSystemErrorText(GetLastError(), pszErrorText, 255);
 #elif defined(_NETWARE)
    TCHAR szBuffer[MAX_PATH + 4];
    int nError;
 
-   nx_strncpy(&szBuffer[4], szLibName, MAX_PATH);
+   nx_strncpy(&szBuffer[4], pszLibName, MAX_PATH);
    nError = LoadModule(getnetwarelogger(), &szBuffer[4], LO_RETURN_HANDLE);
    if (nError == 0)
    {
@@ -98,7 +98,7 @@ HMODULE LIBNETXMS_EXPORTABLE DLOpen(TCHAR *szLibName, TCHAR *pszErrorText)
        nx_strncpy(pszErrorText, (nError <= 19) ? m_pszErrorText[nError] : "Unknown error code", 255);
    }
 #else    /* _WIN32 */
-   hModule = dlopen(szLibName, RTLD_NOW | RTLD_GLOBAL);
+   hModule = dlopen(pszLibName, RTLD_NOW | RTLD_GLOBAL);
    if ((hModule == NULL) && (pszErrorText != NULL))
       nx_strncpy(pszErrorText, dlerror(), 255);
 #endif
@@ -134,7 +134,7 @@ void LIBNETXMS_EXPORTABLE DLClose(HMODULE hModule)
 //
 
 void LIBNETXMS_EXPORTABLE *DLGetSymbolAddr(HMODULE hModule,
-                                                                                  TCHAR *pszSymbol,
+                                                                                  const TCHAR *pszSymbol,
                                                                                   TCHAR *pszErrorText)
 {
    void *pAddr;
index d54e1a2..cc26178 100644 (file)
@@ -167,7 +167,7 @@ private:
 
    void ProcessObjectUpdate(CSCPMessage *pMsg);
    void AddObject(NXC_OBJECT *pObject, BOOL bSortIndex);
-   void LoadObjectsFromCache(TCHAR *pszCacheFile);
+   void LoadObjectsFromCache(const TCHAR *pszCacheFile);
 
    void WatchdogThread(void);
    static THREAD_RESULT THREAD_CALL WatchdogThreadStarter(void *pArg);
@@ -212,7 +212,7 @@ public:
    BOOL GetUserDB(NXC_USER **ppUserList, DWORD *pdwNumUsers);
    NXC_USER *FindUserById(DWORD dwId);
 
-   DWORD SyncObjects(TCHAR *pszCacheFile, BOOL bSyncComments);
+   DWORD SyncObjects(const TCHAR *pszCacheFile, BOOL bSyncComments);
    void LockObjectIndex(void) { MutexLock(m_mutexIndexAccess, INFINITE); }
    void UnlockObjectIndex(void) { MutexUnlock(m_mutexIndexAccess); }
    NXC_OBJECT *FindObjectById(DWORD dwId, BOOL bLock);
index b8fdf1a..951dc3e 100644 (file)
@@ -408,7 +408,7 @@ void NXCL_Session::ProcessObjectUpdate(CSCPMessage *pMsg)
 // This function is NOT REENTRANT
 //
 
-DWORD NXCL_Session::SyncObjects(TCHAR *pszCacheFile, BOOL bSyncComments)
+DWORD NXCL_Session::SyncObjects(const TCHAR *pszCacheFile, BOOL bSyncComments)
 {
    CSCPMessage msg;
    DWORD dwRetCode, dwRqId;
@@ -449,7 +449,7 @@ DWORD LIBNXCL_EXPORTABLE NXCSyncObjects(NXC_SESSION hSession)
    return ((NXCL_Session *)hSession)->SyncObjects(NULL, FALSE);
 }
 
-DWORD LIBNXCL_EXPORTABLE NXCSyncObjectsEx(NXC_SESSION hSession, TCHAR *pszCacheFile,
+DWORD LIBNXCL_EXPORTABLE NXCSyncObjectsEx(NXC_SESSION hSession, const TCHAR *pszCacheFile,
                                           BOOL bSyncComments)
 {
    return ((NXCL_Session *)hSession)->SyncObjects(pszCacheFile, bSyncComments);
@@ -1232,7 +1232,7 @@ void LIBNXCL_EXPORTABLE NXCGetComparableObjectNameEx(NXC_OBJECT *pObject, TCHAR
 // Save object's cache to file
 //
 
-DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, TCHAR *pszFile)
+DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, const TCHAR *pszFile)
 {
    FILE *hFile;
    OBJECT_CACHE_HEADER hdr;
@@ -1326,7 +1326,7 @@ DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, TCHAR *pszFile
 // Load objects from cache file
 //
 
-void NXCL_Session::LoadObjectsFromCache(TCHAR *pszFile)
+void NXCL_Session::LoadObjectsFromCache(const TCHAR *pszFile)
 {
    FILE *hFile;
    OBJECT_CACHE_HEADER hdr;