[SVN-NetXMS] revision 3313

From: NetXMS.org SVN Server <svn_at_DOMAIN_REMOVED>
Date: Tue, 17 Jun 2008 18:46:50 +0300

* { font-family: Consolas, Lucida Console, Courier New; font-size: 100%; }
h1 { font-size: 150%; }
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
pre { line-height: 100%; width: 100%; }
.highlight span { width: 100%; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
body { background: #ffffff; }
body .c { color: #999988; font-style: italic } /* Comment */
body .err { color: #a61717; background-color: #e3d2d2 } /* Error */
body .k { font-weight: bold } /* Keyword */
body .o { font-weight: bold } /* Operator */
body .cm { color: #999988; font-style: italic } /* Comment.Multiline */
body .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
body .c1 { color: #999988; font-style: italic } /* Comment.Single */
body .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
body .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
body .ge { font-style: italic } /* Generic.Emph */
body .gr { color: #aa0000 } /* Generic.Error */
body .gh { color: #999999 } /* Generic.Heading */
body .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
body .go { color: #888888 } /* Generic.Output */
body .gp { color: #555555 } /* Generic.Prompt */
body .gs { font-weight: bold } /* Generic.Strong */
body .gu { color: #aaaaaa } /* Generic.Subheading */
body .gt { color: #aa0000 } /* Generic.Traceback */
body .kc { font-weight: bold } /* Keyword.Constant */
body .kd { font-weight: bold } /* Keyword.Declaration */
body .kp { font-weight: bold } /* Keyword.Pseudo */
body .kr { font-weight: bold } /* Keyword.Reserved */
body .kt { color: #445588; font-weight: bold } /* Keyword.Type */
body .m { color: #009999 } /* Literal.Number */
body .s { color: #bb8844 } /* Literal.String */
body .na { color: #008080 } /* Name.Attribute */
body .nb { color: #999999 } /* Name.Builtin */
body .nc { color: #445588; font-weight: bold } /* Name.Class */
body .no { color: #008080 } /* Name.Constant */
body .ni { color: #800080 } /* Name.Entity */
body .ne { color: #990000; font-weight: bold } /* Name.Exception */
body .nf { color: #990000; font-weight: bold } /* Name.Function */
body .nn { color: #555555 } /* Name.Namespace */
body .nt { color: #000080 } /* Name.Tag */
body .nv { color: #008080 } /* Name.Variable */
body .ow { font-weight: bold } /* Operator.Word */
body .w { color: #bbbbbb } /* Text.Whitespace */
body .mf { color: #009999 } /* Literal.Number.Float */
body .mh { color: #009999 } /* Literal.Number.Hex */
body .mi { color: #009999 } /* Literal.Number.Integer */
body .mo { color: #009999 } /* Literal.Number.Oct */
body .sb { color: #bb8844 } /* Literal.String.Backtick */
body .sc { color: #bb8844 } /* Literal.String.Char */
body .sd { color: #bb8844 } /* Literal.String.Doc */
body .s2 { color: #bb8844 } /* Literal.String.Double */
body .se { color: #bb8844 } /* Literal.String.Escape */
body .sh { color: #bb8844 } /* Literal.String.Heredoc */
body .si { color: #bb8844 } /* Literal.String.Interpol */
body .sx { color: #bb8844 } /* Literal.String.Other */
body .sr { color: #808000 } /* Literal.String.Regex */
body .s1 { color: #bb8844 } /* Literal.String.Single */
body .ss { color: #bb8844 } /* Literal.String.Symbol */
body .bp { color: #999999 } /* Name.Builtin.Pseudo */
body .vc { color: #008080 } /* Name.Variable.Class */
body .vg { color: #008080 } /* Name.Variable.Global */
body .vi { color: #008080 } /* Name.Variable.Instance */
body .il { color: #009999 } /* Literal.Number.Integer.Long */

Info

Revision:3313
Author:victor

Date:2008-06-17 18:46:49 +0300 (Tue, 17 Jun 2008)

Comment:Custom attribute support implemented in client library and windows console

Changes
U trunk/src/console/win32/EditVariableDlg.cpp
U trunk/src/console/win32/EditVariableDlg.h
U trunk/src/console/win32/Makefile.am
A trunk/src/console/win32/ObjectPropsCustomAttrs.cpp
A trunk/src/console/win32/ObjectPropsCustomAttrs.h
U trunk/src/console/win32/nxcon.clw
U trunk/src/console/win32/nxcon.cpp
U trunk/src/console/win32/nxcon.dsp
U trunk/src/console/win32/nxcon.rc
U trunk/src/console/win32/resource.h
U trunk/src/libnxcl/libnxcl.h
U trunk/src/libnxcl/objects.cpp

Diff
Modified: trunk/src/console/win32/EditVariableDlg.cpp
===================================================================
--- trunk/src/console/win32/EditVariableDlg.cpp 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/EditVariableDlg.cpp 2008-06-17 15:46:49 UTC (rev 3313)
@@ -23,6 +23,7 @@
         m_strValue = _T(&quot;&quot;);
         //}}AFX_DATA_INIT
    m_bNewVariable = FALSE;
+ m_pszTitle = NULL;
 }
 
 
@@ -59,6 +60,8 @@
       SendDlgItemMessage(IDC_EDIT_NAME, EM_SETREADONLY, TRUE, 0);
       ::SetFocus(::GetDlgItem(m_hWnd, IDC_EDIT_VALUE));
    }
+ if (m_pszTitle != NULL)
+ SetWindowText(m_pszTitle);
         return m_bNewVariable;
 }
 

Modified: trunk/src/console/win32/EditVariableDlg.h
===================================================================
--- trunk/src/console/win32/EditVariableDlg.h 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/EditVariableDlg.h 2008-06-17 15:46:49 UTC (rev 3313)
@@ -14,6 +14,7 @@
 {
 // Construction
 public:
+ const TCHAR * m_pszTitle;
         BOOL m_bNewVariable;
         CEditVariableDlg(CWnd* pParent = NULL); // standard constructor
 

Modified: trunk/src/console/win32/Makefile.am
===================================================================
--- trunk/src/console/win32/Makefile.am 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/Makefile.am 2008-06-17 15:46:49 UTC (rev 3313)
@@ -119,6 +119,7 @@
         ObjectDepView.cpp ObjectDepView.h \
         ObjectOverview.cpp ObjectOverview.h \
         ObjectPropCaps.cpp ObjectPropCaps.h \
+ ObjectPropsCustomAttrs.cpp ObjectPropsCustomAttrs.h \
         ObjectPropsGeneral.cpp ObjectPropsGeneral.h \
         ObjectPropSheet.cpp ObjectPropSheet.h \
         ObjectPropsPresentation.cpp ObjectPropsPresentation.h \

Added: trunk/src/console/win32/ObjectPropsCustomAttrs.cpp
===================================================================
--- trunk/src/console/win32/ObjectPropsCustomAttrs.cpp (rev 0)
+++ trunk/src/console/win32/ObjectPropsCustomAttrs.cpp 2008-06-17 15:46:49 UTC (rev 3313)
@@ -0,0 +1,198 @@
+// ObjectPropsCustomAttrs.cpp : implementation file
+//
+
+#include &quot;stdafx.h&quot;
+#include &quot;nxcon.h&quot;
+#include &quot;ObjectPropsCustomAttrs.h&quot;
+#include &quot;ObjectPropSheet.h&quot;
+#include &quot;EditVariableDlg.h&quot;
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CObjectPropsCustomAttrs property page
+
+IMPLEMENT_DYNCREATE(CObjectPropsCustomAttrs, CPropertyPage)
+
+CObjectPropsCustomAttrs::CObjectPropsCustomAttrs() : CPropertyPage(CObjectPropsCustomAttrs::IDD)
+{
+ //{{AFX_DATA_INIT(CObjectPropsCustomAttrs)
+ // NOTE: the ClassWizard will add member initialization here
+ //}}AFX_DATA_INIT
+}
+
+CObjectPropsCustomAttrs::~CObjectPropsCustomAttrs()
+{
+}
+
+void CObjectPropsCustomAttrs::DoDataExchange(CDataExchange* pDX)
+{
+ CPropertyPage::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CObjectPropsCustomAttrs)
+ DDX_Control(pDX, IDC_LIST_ATTRIBUTES, m_wndListCtrl);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CObjectPropsCustomAttrs, CPropertyPage)
+ //{{AFX_MSG_MAP(CObjectPropsCustomAttrs)
+ ON_BN_CLICKED(IDC_BUTTON_ADD, OnButtonAdd)
+ ON_BN_CLICKED(IDC_BUTTON_EDIT, OnButtonEdit)
+ ON_BN_CLICKED(IDC_BUTTON_DELETE, OnButtonDelete)
+ ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_ATTRIBUTES, OnItemchangedListAttributes)
+ ON_NOTIFY(NM_DBLCLK, IDC_LIST_ATTRIBUTES, OnDblclkListAttributes)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CObjectPropsCustomAttrs message handlers
+
+
+//
+// WM_INITDIALOG message handler
+//
+
+BOOL CObjectPropsCustomAttrs::OnInitDialog()
+{
+ DWORD i;
+ int item;
+ RECT rect;
+
+ CPropertyPage::OnInitDialog();
+
+ m_pUpdate = ((CObjectPropSheet *)GetParent())-&gt;GetUpdateStruct();
+
+ // Setup list control
+ m_wndListCtrl.GetClientRect(&amp;rect);
+ m_wndListCtrl.InsertColumn(0, _T(&quot;Name&quot;), LVCFMT_LEFT, 100);
+ m_wndListCtrl.InsertColumn(1, _T(&quot;Value&quot;), LVCFMT_LEFT, rect.right - 100 - GetSystemMetrics(SM_CXVSCROLL));
+ m_wndListCtrl.SetExtendedStyle(LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
+
+ // Fill list control with data
+ for(i = 0; i &lt; m_pObject-&gt;pCustomAttrs-&gt;Size(); i++)
+ {
+ item = m_wndListCtrl.InsertItem(i, m_pObject-&gt;pCustomAttrs-&gt;GetKeyByIndex(i));
+ if (item != -1)
+ m_wndListCtrl.SetItemText(item, 1, m_pObject-&gt;pCustomAttrs-&gt;GetValueByIndex(i));
+ }
+
+ EnableDlgItem(this, IDC_BUTTON_EDIT, m_wndListCtrl.GetSelectedCount() == 1);
+ EnableDlgItem(this, IDC_BUTTON_DELETE, m_wndListCtrl.GetSelectedCount() &gt; 0);
+
+ return TRUE;
+}
+
+
+//
+// PSN_OK handler
+//
+
+void CObjectPropsCustomAttrs::OnOK()
+{
+ int i;
+
+ if (m_pUpdate-&gt;qwFlags &amp; OBJ_UPDATE_CUSTOM_ATTRS)
+ {
+ m_pUpdate-&gt;pCustomAttrs = &amp;m_strMap;
+ for(i = 0; i &lt; m_wndListCtrl.GetItemCount(); i++)
+ {
+ m_strMap.Set(m_wndListCtrl.GetItemText(i, 0), m_wndListCtrl.GetItemText(i, 1));
+ }
+ }
+ CPropertyPage::OnOK();
+}
+
+
+//
+// &quot;Add&quot; button handler
+//
+
+void CObjectPropsCustomAttrs::OnButtonAdd()
+{
+ CEditVariableDlg dlg;
+ int item;
+ LVFINDINFO lvfi;
+
+ dlg.m_pszTitle = _T(&quot;New Attribute&quot;);
+ dlg.m_bNewVariable = TRUE;
+ if (dlg.DoModal() == IDOK)
+ {
+ lvfi.flags = LVFI_STRING;
+ lvfi.psz = dlg.m_strName;
+ item = m_wndListCtrl.FindItem(&amp;lvfi);
+ if (item == -1)
+ {
+ item = m_wndListCtrl.InsertItem(0x7FFFFFFF, dlg.m_strName);
+ }
+ m_wndListCtrl.SetItemText(item, 1, dlg.m_strValue);
+
+ m_pUpdate-&gt;qwFlags |= OBJ_UPDATE_CUSTOM_ATTRS;
+ SetModified();
+ }
+}
+
+
+//
+// &quot;Edit&quot; button handler
+//
+
+void CObjectPropsCustomAttrs::OnButtonEdit()
+{
+ CEditVariableDlg dlg;
+ int item;
+
+ if (m_wndListCtrl.GetSelectedCount() != 1)
+ return;
+
+ item = m_wndListCtrl.GetSelectionMark();
+ dlg.m_strName = m_wndListCtrl.GetItemText(item, 0);
+ dlg.m_strValue = m_wndListCtrl.GetItemText(item, 1);
+ dlg.m_pszTitle = _T(&quot;Edit Attribute&quot;);
+ if (dlg.DoModal() == IDOK)
+ {
+ m_wndListCtrl.SetItemText(item, 1, dlg.m_strValue);
+
+ m_pUpdate-&gt;qwFlags |= OBJ_UPDATE_CUSTOM_ATTRS;
+ SetModified();
+ }
+}
+
+
+//
+// &quot;Delete&quot; button handler
+//
+
+void CObjectPropsCustomAttrs::OnButtonDelete()
+{
+ int item;
+
+ while((item = m_wndListCtrl.GetNextItem(-1, LVIS_SELECTED)) != -1)
+ m_wndListCtrl.DeleteItem(item);
+}
+
+
+//
+// Item change handler
+//
+
+void CObjectPropsCustomAttrs::OnItemchangedListAttributes(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ EnableDlgItem(this, IDC_BUTTON_EDIT, m_wndListCtrl.GetSelectedCount() == 1);
+ EnableDlgItem(this, IDC_BUTTON_DELETE, m_wndListCtrl.GetSelectedCount() &gt; 0);
+ *pResult = 0;
+}
+
+
+//
+// Handler for double click in list control
+//
+
+void CObjectPropsCustomAttrs::OnDblclkListAttributes(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ PostMessage(WM_COMMAND, IDC_BUTTON_EDIT, 0);
+ *pResult = 0;
+}

Added: trunk/src/console/win32/ObjectPropsCustomAttrs.h
===================================================================
--- trunk/src/console/win32/ObjectPropsCustomAttrs.h (rev 0)
+++ trunk/src/console/win32/ObjectPropsCustomAttrs.h 2008-06-17 15:46:49 UTC (rev 3313)
@@ -0,0 +1,61 @@
+#if !defined(AFX_OBJECTPROPSCUSTOMATTRS_H__1FCD36D6_FB2D_4664_A351_055FC2B17D19__INCLUDED_)
+#define AFX_OBJECTPROPSCUSTOMATTRS_H__1FCD36D6_FB2D_4664_A351_055FC2B17D19__INCLUDED_
+
+#include &quot;..\..\..\INCLUDE\nms_util.h&quot; // Added by ClassView
+#if _MSC_VER &gt; 1000
+#pragma once
+#endif // _MSC_VER &gt; 1000
+// ObjectPropsCustomAttrs.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CObjectPropsCustomAttrs dialog
+
+class CObjectPropsCustomAttrs : public CPropertyPage
+{
+ DECLARE_DYNCREATE(CObjectPropsCustomAttrs)
+
+// Construction
+public:
+ NXC_OBJECT * m_pObject;
+ CObjectPropsCustomAttrs();
+ ~CObjectPropsCustomAttrs();
+
+// Dialog Data
+ //{{AFX_DATA(CObjectPropsCustomAttrs)
+ enum { IDD = IDD_OBJECT_CUSTOM_ATTRS };
+ CListCtrl m_wndListCtrl;
+ //}}AFX_DATA
+
+
+// Overrides
+ // ClassWizard generate virtual function overrides
+ //{{AFX_VIRTUAL(CObjectPropsCustomAttrs)
+ public:
+ virtual void OnOK();
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+ StringMap m_strMap;
+ // Generated message map functions
+ //{{AFX_MSG(CObjectPropsCustomAttrs)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnButtonAdd();
+ afx_msg void OnButtonEdit();
+ afx_msg void OnButtonDelete();
+ afx_msg void OnItemchangedListAttributes(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnDblclkListAttributes(NMHDR* pNMHDR, LRESULT* pResult);
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+private:
+ NXC_OBJECT_UPDATE * m_pUpdate;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_OBJECTPROPSCUSTOMATTRS_H__1FCD36D6_FB2D_4664_A351_055FC2B17D19__INCLUDED_)

Modified: trunk/src/console/win32/nxcon.clw
===================================================================
--- trunk/src/console/win32/nxcon.clw 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/nxcon.clw 2008-06-17 15:46:49 UTC (rev 3313)
@@ -2,35 +2,35 @@
 
 [General Info]
 Version=1
-LastClass=CObjectTreeCtrl
-LastTemplate=CTreeCtrl
+LastClass=CObjectPropsCustomAttrs
+LastTemplate=CPropertyPage
 NewFileInclude1=#include &quot;stdafx.h&quot;
 NewFileInclude2=#include &quot;nxcon.h&quot;
 LastPage=0
 
-ClassCount=177
+ClassCount=178
 Class1=CConsoleApp
 Class3=CMainFrame
 Class4=CChildFrame
 Class7=CEventBrowser
 Class9=CMapView
 
-ResourceCount=257
+ResourceCount=258
 Resource1=IDD_EDIT_TRAP (English (U.S.))
-Resource2=IDA_MAP_MANAGER
+Resource2=IDD_REQUEST_PROCESSING
 Resource3=IDD_EDIT_RULE_SCRIPT (English (U.S.))
-Resource4=IDA_SCRIPT_MANAGER
-Resource5=IDD_GRAPH_PROP_DATA
+Resource4=IDA_NODE_POLLER
+Resource5=IDD_OBJECT_VPNC_GENERAL
 Class2=CChildView
 Class5=CAboutDlg
 Class6=CControlPanel
 Class8=CMapFrame
 Class10=CLoginDialog
-Resource6=IDD_MIB_BROWSER
+Resource6=IDD_EDIT_RULE_SEVERITY
 Class11=CProgressDialog
-Resource7=IDD_COND_DCI_PROP
+Resource7=IDD_DISCOVERY_RANGES
 Class12=CAddrEntryDlg
-Resource8=IDD_NEW_USER
+Resource8=IDD_DCI_THRESHOLDS
 Class13=CObjectPropDlg
 Resource9=IDD_ACTION_PROPERTIES (English (U.S.))
 Resource10=IDA_AGENT_CFG_EDITOR (English (U.S.))
@@ -46,45 +46,45 @@
 Class16=CDebugFrame
 Resource18=IDA_EPP (English (U.S.))
 Resource19=IDD_OBJECT_PROPERTIES (English (U.S.))
-Resource20=IDD_EDIT_RULE_SEVERITY
+Resource20=IDD_SELECT_ACTION
 Class17=CObjectPreview
 Resource21=IDA_TRAP_EDITOR (English (U.S.))
 Class18=CToolBox
 Class19=CObjectInfoBox
 Class20=CObjectSearchBox
-Resource22=IDD_REQUEST_PROCESSING
+Resource22=IDD_USER_PROPERTIES
 Class21=CEditBox
 Class22=COPGeneral
 Class23=CNodePropsGeneral
 Resource23=IDD_GRAPH_PROPERTIES (English (U.S.))
 Class24=CObjectPropCaps
 Class25=CObjectPropSheet
-Resource24=IDD_SELECT_AGENT_PARAM
+Resource24=IDD_OBJECT_RELATIONS
 Class26=CRequestProcessingDlg
 Resource25=IDD_CREATE_IF_DCI (English (U.S.))
 Resource26=IDD_PROGRESS (English (U.S.))
-Resource27=IDD_SET_PASSWORD
+Resource27=IDD_SELECT_OBJECT
 Resource28=IDD_THRESHOLD (English (U.S.))
 Class27=CObjectPropsGeneral
 Resource29=IDD_OBJTOOL_OPTIONS (English (U.S.))
 Class28=CObjectPropsSecurity
 Resource30=IDD_OBJECT_NETSRV_GENERAL (English (U.S.))
-Resource31=IDD_CREATE_CONTAINER
-Resource32=IDA_TRAP_EDITOR
+Resource31=IDD_DATA_QUERY
+Resource32=IDA_AGENT_CFG_EDITOR
 Class29=CUserSelectDlg
-Resource33=IDD_DCI_COLLECTION
+Resource33=IDD_EDIT_RULE_COMMENT
 Class30=CUserEditor
 Resource34=IDD_DCI_PROPERTIES
 Class31=CNewUserDlg
-Resource35=IDD_DATA_QUERY
-Resource36=IDD_OBJECT_STATUS
+Resource35=IDD_INPUT_BOX
+Resource36=IDD_REMOVE_TEMPLATE
 Class32=CUserPropDlg
 Resource37=IDD_SELECT_USER (English (U.S.))
-Resource38=IDD_DISCOVERY_TARGETS
+Resource38=IDD_SELECT_TRAP
 Class33=CGroupPropDlg
-Resource39=IDD_REMOVE_TEMPLATE
-Resource40=IDD_AGENT_CONFIG
-Resource41=IDD_EDIT_RULE_SITUATION
+Resource39=IDD_CREATE_CONDITION
+Resource40=IDD_ADDR_ENTRY
+Resource41=IDA_MDI_DEFAULT
 Resource42=IDD_MIB_BROWSER (English (U.S.))
 Class34=CPasswordChangeDlg
 Class35=CNodeSummary
@@ -99,56 +99,56 @@
 Class41=CGraphFrame
 Class42=CDCIThresholdsPage
 Resource46=IDD_DISCOVERY_RANGES (English (U.S.))
-Resource47=IDD_OBJECT_COND_SCRIPT
-Resource48=IDD_CHANGE_IP
+Resource47=IDD_EDIT_RULE_SCRIPT
+Resource48=IDD_CHANGE_PASSWORD
 Class43=CThresholdDlg
 Resource49=IDD_EDIT_EVENT (English (U.S.))
-Resource50=IDA_PACKAGE_MGR
+Resource50=IDA_OBJECT_TOOLS_EDITOR
 Class44=CMIBBrowserDlg
 Class45=CEventPolicyEditor
 Class46=CRuleList
 Class47=CRuleHeader
 Resource51=IDD_OBJECT_IF_GENERAL (English (U.S.))
-Resource52=IDA_DC_EDITOR
+Resource52=IDA_OBJECT_COMMENTS
 Class48=CObjectSelDlg
-Resource53=IDR_MAINFRAME
-Resource54=IDA_EPP
+Resource53=IDD_SET_PASSWORD
+Resource54=IDA_TRAP_EDITOR
 Class49=CRuleCommentDlg
-Resource55=IDD_CREATE_TG
+Resource55=IDD_SELECT_INTERNAL_ITEM
 Class50=CEventSelDlg
-Resource56=IDD_OBJECT_TRUSTED_NODES
+Resource56=IDA_OBJECT_BROWSER
 Resource57=IDD_COND_DCI_PROP (English (U.S.))
-Resource58=IDD_CREATE_NODE
+Resource58=IDD_EDIT_TRAP
 Resource59=IDD_GROUP_PROPERTIES (English (U.S.))
 Resource60=IDD_DISCOVERY_GENERAL (English (U.S.))
 Class51=CObjectPropsPresentation
 Resource61=IDD_SET_PASSWORD (English (U.S.))
-Resource62=IDD_CREATE_TEMPLATE
+Resource62=IDD_SELECT_AGENT_PARAM
 Class52=CRuleSeverityDlg
-Resource63=IDA_NODE_POLLER
+Resource63=IDD_OBJECT_NODE_GENERAL
 Class53=CRuleAlarmDlg
 Class54=CAlarmBrowser
 Resource64=IDD_CHANGE_IP (English (U.S.))
-Resource65=IDD_OBJECT_NETSRV_GENERAL
+Resource65=IDD_GRAPH_PROP_DATA
 Resource66=IDD_DCI_THRESHOLDS (English (U.S.))
 Resource67=IDD_GRAPH_PROP_SETTINGS (English (U.S.))
 Resource68=IDD_CREATE_VPNC (English (U.S.))
 Class55=CConsolePropsGeneral
 Class56=CActionEditor
-Resource69=IDD_OBJECT_NODE_GENERAL
-Resource70=IDD_UPGRADE
+Resource69=IDD_SELECT_USER
+Resource70=IDD_FATAL_ERROR
 Class57=CNewActionDlg
-Resource71=IDD_OBJECT_CAPS
+Resource71=IDD_NEW_USER
 Class58=CEditActionDlg
-Resource72=IDA_MDI_DEFAULT
+Resource72=IDA_NETMAP
 Class59=CActionSelDlg
-Resource73=IDD_OBJECT_NODE_POLL
+Resource73=IDD_LASTVAL_PROP
 Resource74=IDD_OBJECT_COND_SCRIPT (English (U.S.))
 Resource75=IDD_EDIT_TRAP_ARG (English (U.S.))
-Resource76=IDD_NEW_ACTION
+Resource76=IDD_DCI_TRANSFORM
 Class60=CCreateObjectDlg
 Class61=CCreateContainerDlg
-Resource77=IDA_CERT_MANAGER
+Resource77=IDD_EDIT_EVENT
 Class62=CCreateNodeDlg
 Resource78=IDA_CERT_MANAGER (English (U.S.))
 Resource79=IDT_MAP (English (U.S.))
@@ -158,31 +158,31 @@
 Class64=CPollNodeDlg
 Resource82=IDD_POLL_NODE (English (U.S.))
 Class65=CNodePoller
-Resource83=IDA_EVENT_EDITOR
-Resource84=IDD_DEFINE_GRAPH
+Resource83=IDA_LAST_VALUES
+Resource84=IDD_CREATE_IF_DCI
 Class66=CCreateTemplateDlg
 Class67=CCreateTGDlg
-Resource85=IDA_GRAPH
-Resource86=IDA_AGENT_CFG_EDITOR
+Resource85=IDA_DC_EDITOR
+Resource86=IDA_AGENT_CONFIG_MANAGER
 Class68=CTrapEditor
-Resource87=IDD_EDIT_TRAP_ARG
-Resource88=IDD_CP_GENERAL
-Resource89=IDD_GROUP_PROPERTIES
+Resource87=IDD_OBJECT_NETSRV_GENERAL
+Resource88=IDD_CREATE_NODE
+Resource89=IDD_MIB_BROWSER
 Class69=CDataQueryDlg
-Resource90=IDD_IMPORT_CA_CERT
+Resource90=IDD_DISCOVERY_COMMUNITIES
 Class70=CTrapEditDlg
 Resource91=IDD_SET_CHILD_MGMT_STATUS (English (U.S.))
 Class71=CTrapParamDlg
-Resource92=IDD_GRAPH_PROP_SETTINGS
-Resource93=IDD_CREATE_CLUSTER
+Resource92=IDD_CREATE_VPNC
+Resource93=IDD_DEFINE_GRAPH
 Class72=CGraphPropDlg
 Class73=CColorSelector
 Class74=CPackageMgr
-Resource94=IDD_OBJECT_CLUSTER_RESOURCES
+Resource94=IDD_GRAPH_PROP_STYLES
 Resource95=IDD_IMPORT_CA_CERT (English (U.S.))
 Resource96=IDD_SUBMAP_BKGND (English (U.S.))
 Resource97=IDD_DISCOVERY_TARGETS (English (U.S.))
-Resource98=IDD_SNMP_WALK
+Resource98=IDD_OBJECT_COND_SCRIPT
 Resource99=IDA_NODE_POLLER (English (U.S.))
 Resource100=IDD_CREATE_MP (English (U.S.))
 Resource101=IDM_VIEW_SPECIFIC (English (U.S.))
@@ -244,7 +244,7 @@
 Class103=CWebBrowser
 Class104=CSyslogBrowser
 Class105=CLPPList
-Resource129=IDD_SELECT_INTERNAL_ITEM
+Resource129=IDD_OBJECT_NODE_POLL
 Class106=CDCISchedulePage
 Resource130=IDD_FATAL_ERROR (English (U.S.))
 Class107=CObjectPropsStatus
@@ -270,113 +270,113 @@
 Resource138=IDD_MANAGE_GRAPHS (English (U.S.))
 Class120=CSubmapBkgndDlg
 Resource139=IDD_USER_PROPERTIES (English (U.S.))
-Resource140=IDD_CREATE_MP
-Resource141=IDD_CREATE_NETSRV
-Resource142=IDD_DCI_DATA_EXPORT
-Resource143=IDD_FATAL_ERROR
-Resource144=IDD_OBJECT_PRESENTATION
-Resource145=IDD_OBJECT_CLUSTER_GENERAL
-Resource146=IDD_DISCOVERY_RANGES
-Resource147=IDA_OBJECT_BROWSER
-Resource148=IDA_SERVER_CFG_EDITOR
-Resource149=IDA_SITUATION_MANAGER
-Resource150=IDD_LASTVAL_PROP
-Resource151=IDA_LAST_VALUES
-Resource152=IDD_EDIT_RULE_COMMENT
-Resource153=IDD_ADDR_ENTRY
-Resource154=IDD_DESKTOP_SAVE_AS
-Resource155=IDA_OBJECT_COMMENTS
-Resource156=IDD_EDIT_EVENT
-Resource157=IDD_EDIT_RULE_OPTIONS
-Resource158=IDA_ACTION_EDITOR
-Resource159=IDD_THRESHOLD
-Resource160=IDD_ACTION_PROPERTIES
-Resource161=IDD_USER_PROPERTIES
-Resource162=IDA_AGENT_CONFIG_MANAGER
-Resource163=IDM_CONTEXT
-Resource164=IDD_EDIT_IP_SUBNET
-Resource165=IDA_NETMAP
-Resource166=IDD_INPUT_BOX
-Resource167=IDD_OBJECT_COND_GENERAL
-Resource168=IDD_SELECT_USER
-Resource169=IDD_GRAPH_PROP_STYLES
-Resource170=IDD_MAP_LINK
-Resource171=IDD_SELECT_TRAP
+Resource140=IDD_OBJECT_CLUSTER_GENERAL
+Resource141=IDD_GRAPH_PROP_SETTINGS
+Resource142=IDD_SAVE_AGENT_CFG
+Resource143=IDD_SET_CHILD_MGMT_STATUS
+Resource144=IDD_ACTION_PROPERTIES
+Resource145=IDD_MANAGE_GRAPHS
+Resource146=IDD_UPGRADE
+Resource147=IDA_EVENT_EDITOR
+Resource148=IDA_DATA_VIEW
+Resource149=IDD_OBJECT_CAPS
+Resource150=IDD_EDIT_IP_SUBNET
+Resource151=IDA_SCRIPT_MANAGER
+Resource152=IDD_CP_GENERAL
+Resource153=IDD_CREATE_CLUSTER
+Resource154=IDD_EDIT_VARIABLE
+Resource155=IDD_ABOUTBOX
+Resource156=IDD_OBJECT_SECURITY
+Resource157=IDD_CREATE_NETMAP
+Resource158=IDA_SERVER_CFG_EDITOR
+Resource159=IDD_OBJECT_PRESENTATION
+Resource160=IDD_CREATE_TG
+Resource161=IDD_THRESHOLD
+Resource162=IDA_MAP_MANAGER
+Resource163=IDM_VIEW_SPECIFIC
+Resource164=IDD_NEW_OBJECT_TOOL
+Resource165=IDA_PACKAGE_MGR
+Resource166=IDD_DESKTOP_SAVE_AS
+Resource167=IDD_AGENT_CONFIG
+Resource168=IDD_DCI_COLLECTION
+Resource169=IDD_OBJECT_IF_GENERAL
+Resource170=IDD_EDIT_RULE_SITUATION
+Resource171=IDD_CLUSTER_RESOURCE
 Class121=CModuleManager
 Class122=CDesktopManager
-Resource172=IDD_SELECT_MP
-Resource173=IDD_DCI_THRESHOLDS
+Resource172=IDD_OBJECT_CLUSTER_RESOURCES
+Resource173=IDD_SELECT_EVENT
 Class123=CCreateCondDlg
 Class124=CCondPropsGeneral
 Class125=CCondPropsScript
 Class126=CCondPropsData
-Resource174=IDD_EDIT_VARIABLE
+Resource174=IDD_DCI_SCHEDULE
 Class127=CAddDCIDlg
-Resource175=IDD_CLUSTER_RESOURCE
+Resource175=IDD_IMPORT_CA_CERT
 Class128=CCondDCIPropDlg
-Resource176=IDD_OBJTOOL_COLUMNS
+Resource176=IDD_OBJECT_COND_GENERAL
 Class129=CAgentConfigMgr
-Resource177=IDA_ALARM_BROWSER
-Resource178=IDD_SELECT_MAP
+Resource177=IDA_GRAPH
+Resource178=IDA_EPP
 Class130=CAgentCfgDlg
 Class131=CObjectCommentsEditor
-Resource179=IDD_SELECT_OBJECT
+Resource179=IDD_EDIT_RULE_ALARM
 Class132=CRuleScriptDlg
 Class133=CDetailsView
-Resource180=IDD_SELECT_ACTION
+Resource180=IDD_CREATE_TEMPLATE
 Class134=CDiscoveryPropGeneral
-Resource181=IDD_OBJTOOL_OPTIONS
+Resource181=IDD_SUBMAP_BKGND
 Class135=CDiscoveryPropTargets
-Resource182=IDD_OBJTOOL_GENERAL
+Resource182=IDD_OBJTOOL_COLUMNS
 Class136=CDiscoveryPropAddrList
-Resource183=IDD_SUBMAP_BKGND
+Resource183=IDD_OBJECT_COND_DATA
 Class138=CObjectView
 Class139=CObjectOverview
 Class140=CAlarmView
 Class141=CObjectDepView
-Resource184=IDD_SELECT_EVENT
+Resource184=IDD_NEW_ACTION
 Class137=CObjectBrowser
 Class142=CCreateMPDlg
-Resource185=IDD_CREATE_CONDITION
+Resource185=IDD_COND_DCI_PROP
 Class143=CSelectMPDlg
-Resource186=IDD_CREATE_VPNC
+Resource186=IDD_OBJECT_STATUS
 Class144=CTrapSelDlg
-Resource187=IDD_ABOUTBOX
+Resource187=IDD_OBJECT_GENERAL
 Class145=CConsoleUpgradeDlg
-Resource188=IDD_NEW_OBJECT_TOOL
+Resource188=IDD_SNMP_WALK
 Class146=CCreateClusterDlg
-Resource189=IDD_CREATE_IF_DCI
+Resource189=IDD_SELECT_SITUATION
 Class147=CClusterPropsGeneral
-Resource190=IDD_DISCOVERY_COMMUNITIES
+Resource190=IDD_SELECT_MAP
 Class148=CClusterPropsResources
-Resource191=IDD_MANAGE_GRAPHS
+Resource191=IDD_MAP_LINK
 Class149=CClusterResDlg
-Resource192=IDD_DCI_TRANSFORM
+Resource192=IDD_EDIT_TRAP_ARG
 Class150=CClusterView
 Class151=CExtEditCtrl
-Resource193=IDD_OBJECT_VPNC_GENERAL
+Resource193=IDD_OBJTOOL_GENERAL
 Class152=CFatalErrorDlg
-Resource194=IDM_VIEW_SPECIFIC
+Resource194=IDM_CONTEXT
 Class153=CDefineGraphDlg
-Resource195=IDD_SAVE_AGENT_CFG
+Resource195=IDD_OBJTOOL_OPTIONS
 Class154=CGraphManagerDlg
-Resource196=IDD_OBJECT_IF_GENERAL
+Resource196=IDD_OBJECT_TRUSTED_NODES
 Class155=CGraphStylePage
 Class156=CNodePerfView
 Class157=CCertManager
-Resource197=IDD_EDIT_TRAP
+Resource197=IDD_CREATE_NETSRV
 Class158=CImportCertDlg
-Resource198=IDD_CHANGE_PASSWORD
+Resource198=IDD_ADD_DCI
 Class159=CNodeTopologyView
 Class160=CObjectStatusBar
 Class161=CObjectTree
-Resource199=IDD_OBJECT_GENERAL
+Resource199=IDD_GROUP_PROPERTIES
 Class162=CChildMgmtStatusDlg
-Resource200=IDD_DCI_SCHEDULE
+Resource200=IDD_CHANGE_IP
 Class163=CCreateIfDCIDlg
 Class164=CNodeLastValuesView
 Class165=CObjectSubordinateView
-Resource201=IDD_OBJECT_SECURITY
+Resource201=IDA_ALARM_BROWSER
 Class166=CMapLinkPropDlg
 Resource202=IDD_INPUT_BOX (English (U.S.))
 Resource203=IDD_EDIT_RULE_SEVERITY (English (U.S.))
@@ -430,21 +430,23 @@
 Resource245=IDD_UPGRADE (English (U.S.))
 Class173=CObjectPropsTrustedNodes
 Resource246=IDD_OBJECT_TRUSTED_NODES (English (U.S.))
-Resource247=IDD_DISCOVERY_GENERAL
-Resource248=IDA_OBJECT_TOOLS_EDITOR
-Resource249=IDD_SELECT_SITUATION
-Resource250=IDD_OBJECT_COND_DATA
-Resource251=IDD_ADD_DCI
-Resource252=IDD_EDIT_RULE_ALARM
-Resource253=IDA_DATA_VIEW
-Resource254=IDD_EDIT_RULE_SCRIPT
+Resource247=IDD_SELECT_MP
+Resource248=IDA_CERT_MANAGER
+Resource249=IDR_MAINFRAME
+Resource250=IDD_DISCOVERY_GENERAL
+Resource251=IDD_DISCOVERY_TARGETS
+Resource252=IDD_CREATE_CONTAINER
+Resource253=IDA_SITUATION_MANAGER
+Resource254=IDD_CREATE_MP
 Class174=CMapSelDlg
 Class175=CMapManager
-Resource255=IDD_SET_CHILD_MGMT_STATUS
-Resource256=IDD_OBJECT_RELATIONS
+Resource255=IDD_EDIT_RULE_OPTIONS
+Resource256=IDD_DCI_DATA_EXPORT
 Class176=CCreateNetMapDlg
 Class177=CObjectTreeCtrl
-Resource257=IDD_CREATE_NETMAP
+Resource257=IDA_ACTION_EDITOR
+Class178=CObjectPropsCustomAttrs
+Resource258=IDD_OBJECT_CUSTOM_ATTRS
 
 [CLS:CConsoleApp]
 Type=0
@@ -6627,4 +6629,23 @@
 BaseClass=CTreeCtrl
 Filter=W
 VirtualFilter=GWC
+LastObject=CObjectTreeCtrl
 
+[DLG:IDD_OBJECT_CUSTOM_ATTRS]
+Type=1
+Class=CObjectPropsCustomAttrs
+ControlCount=4
+Control1=IDC_LIST_ATTRIBUTES,SysListView32,1342275609
+Control2=IDC_BUTTON_ADD,button,1342242816
+Control3=IDC_BUTTON_EDIT,button,1342242816
+Control4=IDC_BUTTON_DELETE,button,1342242816
+
+[CLS:CObjectPropsCustomAttrs]
+Type=0
+HeaderFile=ObjectPropsCustomAttrs.h
+ImplementationFile=ObjectPropsCustomAttrs.cpp
+BaseClass=CPropertyPage
+Filter=D
+VirtualFilter=idWC
+LastObject=CObjectPropsCustomAttrs
+

Modified: trunk/src/console/win32/nxcon.cpp
===================================================================
--- trunk/src/console/win32/nxcon.cpp 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/nxcon.cpp 2008-06-17 15:46:49 UTC (rev 3313)
@@ -80,6 +80,7 @@
 #include &quot;SituationManager.h&quot;
 #include &quot;MapManager.h&quot;
 #include &quot;ObjectPropsTrustedNodes.h&quot;
+#include &quot;ObjectPropsCustomAttrs.h&quot;
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -1392,6 +1393,7 @@
    CCondPropsScript wndCondScript;
         CClusterPropsGeneral wndClusterGeneral;
         CClusterPropsResources wndClusterResources;
+ CObjectPropsCustomAttrs wndCustomAttrs;
    NXC_OBJECT *pObject;
 
    pObject = NXCFindObjectById(g_hSession, dwObjectId);
@@ -1521,6 +1523,10 @@
       wndObjectTrustedNodes.m_pdwNodeList = pObject-&gt;pdwTrustedNodes;
       wndPropSheet.AddPage(&amp;wndObjectTrustedNodes);
 
+ // Create &quot;Custom Attributes&quot; tab
+ wndCustomAttrs.m_pObject = pObject;
+ wndPropSheet.AddPage(&amp;wndCustomAttrs);
+
       // Create &quot;Presentation&quot; tab
 /* wndObjectPresentation.m_dwImageId = pObject-&gt;dwImage;
       wndObjectPresentation.m_bUseDefaultImage = (pObject-&gt;dwImage == IMG_DEFAULT);

Modified: trunk/src/console/win32/nxcon.dsp
===================================================================
--- trunk/src/console/win32/nxcon.dsp 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/nxcon.dsp 2008-06-17 15:46:49 UTC (rev 3313)
@@ -616,6 +616,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\ObjectPropsCustomAttrs.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\ObjectPropsGeneral.cpp
 # End Source File
 # Begin Source File
@@ -1313,6 +1317,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\ObjectPropsCustomAttrs.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\ObjectPropsGeneral.h
 # End Source File
 # Begin Source File

Modified: trunk/src/console/win32/nxcon.rc
===================================================================
--- trunk/src/console/win32/nxcon.rc 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/nxcon.rc 2008-06-17 15:46:49 UTC (rev 3313)
@@ -1586,7 +1586,7 @@
 IDD_GROUP_PROPERTIES DIALOGEX 0, 0, 230, 301
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Group Properties&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     EDITTEXT IDC_EDIT_NAME,57,7,165,14,ES_AUTOHSCROLL
     EDITTEXT IDC_EDIT_DESCRIPTION,57,27,165,14,ES_AUTOHSCROLL
@@ -1702,7 +1702,7 @@
 IDD_DCI_THRESHOLDS DIALOGEX 0, 0, 228, 236
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Thresholds&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     EDITTEXT IDC_EDIT_INSTANCE,7,16,214,14,ES_AUTOHSCROLL
     CONTROL &quot;&amp;Always process all thresholds (ignore order)&quot;,
@@ -2056,7 +2056,7 @@
 IDD_DCI_TRANSFORM DIALOGEX 0, 0, 228, 236
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
 CAPTION &quot;Transformation&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     LTEXT &quot;Step 1 - Delta processing&quot;,IDC_STATIC,7,7,80,8
     COMBOBOX IDC_COMBO_DELTA,7,17,214,120,CBS_DROPDOWNLIST |
@@ -2126,7 +2126,7 @@
 IDD_EDIT_TRAP DIALOGEX 0, 0, 271, 281
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Trap Configuration&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     EDITTEXT IDC_EDIT_DESCRIPTION,13,17,245,14,ES_AUTOHSCROLL
     EDITTEXT IDC_EDIT_TRAP,13,50,189,14,ES_AUTOHSCROLL
@@ -2428,7 +2428,7 @@
 IDD_GRAPH_PROP_DATA DIALOGEX 0, 0, 297, 174
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Data Sources&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_DCI,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SHOWSELALWAYS | WS_TABSTOP,7,7,226,160,
@@ -2591,7 +2591,7 @@
 IDD_DCI_SCHEDULE DIALOGEX 0, 0, 228, 236
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
 CAPTION &quot;Schedule&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_SCHEDULES,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | WS_TABSTOP,7,18,
@@ -2906,7 +2906,7 @@
 IDD_ADD_DCI DIALOGEX 0, 0, 373, 215
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Add Parameter&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_NODES,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING |
@@ -3205,7 +3205,7 @@
 IDD_DEFINE_GRAPH DIALOGEX 0, 0, 279, 196
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Define Graph&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     EDITTEXT IDC_EDIT_NAME,7,17,265,14,ES_AUTOHSCROLL
     CONTROL &quot;List1&quot;,IDC_LIST_USERS,&quot;SysListView32&quot;,LVS_REPORT |
@@ -3230,7 +3230,7 @@
 IDD_MANAGE_GRAPHS DIALOGEX 0, 0, 327, 241
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Preconfigured Graphs Manager&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;Tree1&quot;,IDC_TREE_GRAPHS,&quot;SysTreeView32&quot;,TVS_HASBUTTONS |
                     TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
@@ -3244,7 +3244,7 @@
 IDD_GRAPH_PROP_STYLES DIALOGEX 0, 0, 297, 174
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
 CAPTION &quot;Item Style&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_ITEMS,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_OWNERDRAWFIXED |
@@ -3270,7 +3270,7 @@
 IDD_SET_CHILD_MGMT_STATUS DIALOGEX 0, 0, 351, 166
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Set management status for child objects&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_OBJECTS,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_NOSORTHEADER |
@@ -3378,7 +3378,7 @@
 IDD_DISCOVERY_COMMUNITIES DIALOGEX 0, 0, 234, 230
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;SNMP Communities&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_STRINGS,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SHOWSELALWAYS | LVS_SORTASCENDING |
@@ -3403,7 +3403,7 @@
 IDD_SELECT_SITUATION DIALOGEX 0, 0, 250, 234
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Select Situation&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     DEFPUSHBUTTON &quot;OK&quot;,IDOK,139,213,50,14
     PUSHBUTTON &quot;Cancel&quot;,IDCANCEL,193,213,50,14
@@ -3416,7 +3416,7 @@
 IDD_EDIT_RULE_SITUATION DIALOGEX 0, 0, 309, 188
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Situation Configuration&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;&amp;Update situation if current rule match&quot;,
                     IDC_CHECK_ENABLE,&quot;Button&quot;,BS_AUTOCHECKBOX | WS_TABSTOP,7,
@@ -3439,7 +3439,7 @@
 IDD_OBJECT_TRUSTED_NODES DIALOGEX 0, 0, 292, 194
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
 CAPTION &quot;Trusted Nodes&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_NODES,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SHOWSELALWAYS | WS_TABSTOP,7,7,278,161,
@@ -3451,7 +3451,7 @@
 IDD_SELECT_MAP DIALOGEX 0, 0, 272, 151
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION &quot;Select Map&quot;
-FONT 8, &quot;MS Sans Serif&quot;
+FONT 8, &quot;MS Sans Serif&quot;, 0, 0, 0x1
 BEGIN
     CONTROL &quot;List1&quot;,IDC_LIST_MAPS,&quot;SysListView32&quot;,LVS_REPORT |
                     LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING |
@@ -3475,7 +3475,20 @@
     LTEXT &quot;Root object&quot;,IDC_STATIC,7,39,38,8
 END
 
+IDD_OBJECT_CUSTOM_ATTRS DIALOGEX 0, 0, 292, 194
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
+CAPTION &quot;Custom Attributes&quot;
+FONT 8, &quot;MS Sans Serif&quot;
+BEGIN
+ CONTROL &quot;List1&quot;,IDC_LIST_ATTRIBUTES,&quot;SysListView32&quot;,LVS_REPORT |
+ LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER |
+ WS_TABSTOP,7,7,278,163,WS_EX_CLIENTEDGE
+ PUSHBUTTON &quot;&amp;Add...&quot;,IDC_BUTTON_ADD,127,173,50,14
+ PUSHBUTTON &quot;&amp;Edit...&quot;,IDC_BUTTON_EDIT,181,173,50,14
+ PUSHBUTTON &quot;&amp;Delete&quot;,IDC_BUTTON_DELETE,235,173,50,14
+END
 
+
 #ifndef _MAC
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -4310,6 +4323,14 @@
         TOPMARGIN, 7
         BOTTOMMARGIN, 63
     END
+
+ IDD_OBJECT_CUSTOM_ATTRS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 285
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 187
+ END
 END
 #endif // APSTUDIO_INVOKED
 

Modified: trunk/src/console/win32/resource.h
===================================================================
--- trunk/src/console/win32/resource.h 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/console/win32/resource.h 2008-06-17 15:46:49 UTC (rev 3313)
@@ -260,6 +260,7 @@
 #define IDD_SELECT_MAP 386
 #define IDA_MAP_MANAGER 387
 #define IDD_CREATE_NETMAP 388
+#define IDD_OBJECT_CUSTOM_ATTRS 389
 #define ID_EDIT_BOX 525
 #define IDC_STATIC_TITLE 1003
 #define IDC_STATIC_TEXT 1004
@@ -984,9 +985,9 @@
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 389
+#define _APS_NEXT_RESOURCE_VALUE 390
 #define _APS_NEXT_COMMAND_VALUE 33100
-#define _APS_NEXT_CONTROL_VALUE 1529
+#define _APS_NEXT_CONTROL_VALUE 1532
 #define _APS_NEXT_SYMED_VALUE 135
 #endif
 #endif

Modified: trunk/src/libnxcl/libnxcl.h
===================================================================
--- trunk/src/libnxcl/libnxcl.h 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/libnxcl/libnxcl.h 2008-06-17 15:46:49 UTC (rev 3313)
@@ -38,7 +38,7 @@
 // Constants
 //
 
-#define OBJECT_CACHE_MAGIC 0x2007ABBA
+#define OBJECT_CACHE_MAGIC 0x2008ABBA
 
 #define MAX_SERVER_NAME 64
 #define MAX_LOGIN_NAME 64

Modified: trunk/src/libnxcl/objects.cpp
===================================================================
--- trunk/src/libnxcl/objects.cpp 2008-06-17 13:59:55 UTC (rev 3312)
+++ trunk/src/libnxcl/objects.cpp 2008-06-17 15:46:49 UTC (rev 3313)
@@ -1,7 +1,7 @@
 /*
 ** NetXMS - Network Management System
 ** Client Library
-** Copyright (C) 2004, 2005, 2006 Victor Kirhenshtein
+** Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -58,6 +58,7 @@
    safe_free(pObject-&gt;pAccessList);
    safe_free(pObject-&gt;pszComments);
         safe_free(pObject-&gt;pdwTrustedNodes);
+ delete pObject-&gt;pCustomAttrs;
    free(pObject);
 }
 
@@ -162,6 +163,7 @@
    safe_free(pObject-&gt;pAccessList);
    safe_free(pObject-&gt;pszComments);
         safe_free(pObject-&gt;pdwTrustedNodes);
+ delete pObject-&gt;pCustomAttrs;
    memcpy(pObject, pNewObject, sizeof(NXC_OBJECT));
    free(pNewObject);
 }
@@ -174,7 +176,7 @@
 static NXC_OBJECT *NewObjectFromMsg(CSCPMessage *pMsg)
 {
    NXC_OBJECT *pObject;
- DWORD i, dwId1, dwId2;
+ DWORD i, dwId1, dwId2, dwCount;
 
    // Allocate memory for new object structure
    pObject = (NXC_OBJECT *)malloc(sizeof(NXC_OBJECT));
@@ -209,6 +211,14 @@
                 pMsg-&gt;GetVariableInt32Array(VID_TRUSTED_NODES, pObject-&gt;dwNumTrustedNodes, pObject-&gt;pdwTrustedNodes);
         }
 
+ // Custom attributes
+ pObject-&gt;pCustomAttrs = new StringMap;
+ dwCount = pMsg-&gt;GetVariableLong(VID_NUM_CUSTOM_ATTRIBUTES);
+ for(i = 0, dwId1 = VID_CUSTOM_ATTRIBUTES_BASE; i &lt; dwCount; i++, dwId1 += 2)
+ {
+ pObject-&gt;pCustomAttrs-&gt;SetPreallocated(pMsg-&gt;GetVariableStr(dwId1), pMsg-&gt;GetVariableStr(dwId1 + 1));
+ }
+
    // Parents
    pObject-&gt;dwNumParents = pMsg-&gt;GetVariableLong(VID_PARENT_CNT);
    pObject-&gt;pdwParentList = (DWORD *)malloc(sizeof(DWORD) * pObject-&gt;dwNumParents);
@@ -802,6 +812,15 @@
       msg.SetVariable(VID_NUM_TRUSTED_NODES, pUpdate-&gt;dwNumTrustedNodes);
                 msg.SetVariableToInt32Array(VID_TRUSTED_NODES, pUpdate-&gt;dwNumTrustedNodes, pUpdate-&gt;pdwTrustedNodes);
    }
+ if (pUpdate-&gt;qwFlags &amp; OBJ_UPDATE_CUSTOM_ATTRS)
+ {
+ msg.SetVariable(VID_NUM_CUSTOM_ATTRIBUTES, pUpdate-&gt;pCustomAttrs-&gt;Size());
+ for(i = 0, dwId1 = VID_CUSTOM_ATTRIBUTES_BASE; i &lt; pUpdate-&gt;pCustomAttrs-&gt;Size(); i++)
+ {
+ msg.SetVariable(dwId1++, pUpdate-&gt;pCustomAttrs-&gt;GetKeyByIndex(i));
+ msg.SetVariable(dwId1++, pUpdate-&gt;pCustomAttrs-&gt;GetValueByIndex(i));
+ }
+ }
 
    // Send request
    ((NXCL_Session *)hSession)-&gt;SendMsg(&amp;msg);
@@ -1255,7 +1274,7 @@
 {
    FILE *hFile;
    OBJECT_CACHE_HEADER hdr;
- DWORD i, dwResult, dwNumObjects, dwSize;
+ DWORD i, j, dwResult, dwNumObjects, dwSize;
    INDEX *pList;
 
    hFile = _tfopen(pszFile, _T(&quot;wb&quot;));
@@ -1290,6 +1309,20 @@
                         if (pList[i].pObject-&gt;dwNumTrustedNodes &gt; 0)
                                 fwrite(pList[i].pObject-&gt;pdwTrustedNodes, pList[i].pObject-&gt;dwNumTrustedNodes, sizeof(DWORD), hFile);
 
+ // Custom attributes
+ dwSize = pList[i].pObject-&gt;pCustomAttrs-&gt;Size();
+ fwrite(&amp;dwSize, 1, sizeof(DWORD), hFile);
+ for(j = 0; j &lt; pList[i].pObject-&gt;pCustomAttrs-&gt;Size(); j++)
+ {
+ dwSize = _tcslen(pList[i].pObject-&gt;pCustomAttrs-&gt;GetKeyByIndex(j)) * sizeof(TCHAR);
+ fwrite(&amp;dwSize, 1, sizeof(DWORD), hFile);
+ fwrite(pList[i].pObject-&gt;pCustomAttrs-&gt;GetKeyByIndex(j), 1, dwSize, hFile);
+
+ dwSize = _tcslen(pList[i].pObject-&gt;pCustomAttrs-&gt;GetValueByIndex(j)) * sizeof(TCHAR);
+ fwrite(&amp;dwSize, 1, sizeof(DWORD), hFile);
+ fwrite(pList[i].pObject-&gt;pCustomAttrs-&gt;GetValueByIndex(j), 1, dwSize, hFile);
+ }
+
          switch(pList[i].pObject-&gt;iClass)
          {
             case OBJECT_NETWORKSERVICE:
@@ -1353,7 +1386,8 @@
    FILE *hFile;
    OBJECT_CACHE_HEADER hdr;
    NXC_OBJECT object;
- DWORD i, dwSize;
+ DWORD i, j, dwSize, dwCount;
+ TCHAR *key, *value;
 
    hFile = _tfopen(pszFile, _T(&quot;rb&quot;));
    if (hFile != NULL)
@@ -1396,6 +1430,24 @@
                                                         object.pdwTrustedNodes = NULL;
                                                 }
 
+ // Custom attributes
+ object.pCustomAttrs = new StringMap;
+ fread(&amp;dwCount, 1, sizeof(DWORD), hFile);
+ for(j = 0; j &lt; dwCount; j++)
+ {
+ fread(&amp;dwSize, 1, sizeof(DWORD), hFile);
+ key = (TCHAR *)malloc(dwSize + sizeof(TCHAR));
+ fread(key, 1, dwSize, hFile);
+ key[dwSize / sizeof(TCHAR)] = 0;
+
+ fread(&amp;dwSize, 1, sizeof(DWORD), hFile);
+ value = (TCHAR *)malloc(dwSize + sizeof(TCHAR));
+ fread(value, 1, dwSize, hFile);
+ value[dwSize / sizeof(TCHAR)] = 0;
+
+ object.pCustomAttrs-&gt;SetPreallocated(key, value);
+ }
+
                   switch(object.iClass)
                   {
                      case OBJECT_NETWORKSERVICE:
Received on Tue Jun 17 2008 - 18:46:50 EEST

This archive was generated by hypermail 2.2.0 : Tue Jun 17 2008 - 18:43:07 EEST