Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
3.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: qryfrm.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // QryFrm.h : Declaration of the CRRASQueryForm
  11. #ifndef __RRASQUERYFORM_H_
  12. #define __RRASQUERYFORM_H_
  13. #include "resource.h" // main symbols
  14. #include "dialog.h" // CBaseDialog
  15. #include "helper.h"
  16. // attribute names
  17. #define ATTR_NAME_CN L"cn"
  18. #define ATTR_NAME_DN L"distinguishedName"
  19. #define ATTR_NAME_OBJECTCLASS L"objectClass"
  20. #define ATTR_NAME_RRASATTRIBUTE L"msRRASAttribute"
  21. #define ATTR_NAME_RRASDICENTRY L"msRRASVendorAttributeEntry"
  22. #define CN_ROUTERID L"CN=RouterIdentity"
  23. #define DNPREFIX_ROUTERID L"CN=RouterIdentity,CN="
  24. #define CN_DICTIONARY L"cn=IdentityDictionary,cn=RRAS,cn=Services,"
  25. // class names
  26. #define ATTR_CLASS_RRASID L"RRASAdministrationConnectionPoint"
  27. #define ATTR_CLASS_RRASDIC L"RRASAdministrationDictionary"
  28. #define ATTR_CLASS_COMPUTER L"computer"
  29. // special attribute values
  30. #define ATTR_VAL_VENDORID_MS L"311"
  31. #define ATTR_VAL_LANtoLAN L"311:6:601"
  32. #define ATTR_VAL_RAS L"311:6:602"
  33. #define ATTR_VAL_DEMANDDIAL L"311:6:603"
  34. #define ATTR_VAL_NAT L"311:6:604"
  35. class CQryDialog : public CBaseDialog
  36. {
  37. // Construction
  38. public:
  39. CQryDialog(UINT nIDTemplate, CWnd* pParent) : CBaseDialog(nIDTemplate, pParent) { };
  40. virtual void Init() PURE;
  41. virtual HRESULT GetQueryParams(LPDSQUERYPARAMS* ppDsQueryParams) PURE;
  42. virtual HRESULT ClearForm() {Init(); UpdateData(FALSE); return S_OK;};
  43. virtual HRESULT Enable(BOOL bEnable) SAYOK;
  44. virtual HRESULT Persist(IPersistQuery* pPersistQuery, BOOL fRead) NOIMP;
  45. };
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CRRASQueryForm
  48. class ATL_NO_VTABLE CRRASQueryForm :
  49. public CComObjectRootEx<CComSingleThreadModel>,
  50. public CComCoClass<CRRASQueryForm, &CLSID_RRASQueryForm>,
  51. public IQueryForm
  52. {
  53. public:
  54. CRRASQueryForm()
  55. {
  56. }
  57. DECLARE_REGISTRY(CRRASQueryForm,
  58. _T("RouterDSQueryForm.RouterDSQueryForm.1"),
  59. _T("RouterDSQueryForm.RouterDSQueryForm"),
  60. IDS_QRY_TITLE_RRASQUERYFORM, THREADFLAGS_APARTMENT);
  61. // IQueryForm methods
  62. STDMETHOD(Initialize)(THIS_ HKEY hkForm);
  63. STDMETHOD(AddForms)(THIS_ LPCQADDFORMSPROC pAddFormsProc, LPARAM lParam);
  64. STDMETHOD(AddPages)(THIS_ LPCQADDPAGESPROC pAddPagesProc, LPARAM lParam);
  65. BEGIN_COM_MAP(CRRASQueryForm)
  66. COM_INTERFACE_ENTRY(IQueryForm)
  67. END_COM_MAP()
  68. // IRRASQueryForm
  69. public:
  70. };
  71. #define FILTER_PREFIX TEXT("(")
  72. #define FILTER_POSTFIX TEXT(")")
  73. typedef struct
  74. {
  75. INT fmt;
  76. INT cx;
  77. UINT idsName;
  78. LONG iPropertyIndex;
  79. LPWSTR pPropertyName;
  80. } COLUMNINFO, * LPCOLUMNINFO;
  81. extern COLUMNINFO RRASColumn[];
  82. extern int cRRASColumn;
  83. HRESULT BuildQueryParams(LPDSQUERYPARAMS* ppDsQueryParams, LPWSTR pQuery);
  84. HRESULT QueryParamsAlloc(LPDSQUERYPARAMS* ppDsQueryParams, LPWSTR pQuery, LONG iColumns, LPCOLUMNINFO aColumnInfo);
  85. HRESULT QueryRRASAdminDictionary(VARIANT* pVar);
  86. HRESULT GetGeneralPageAttributes(CStrArray& array);
  87. HRESULT QueryParamsAddQueryString(LPDSQUERYPARAMS* ppDsQueryParams, LPWSTR pQuery);
  88. #endif //__RRASQUERYFORM_H_