Source code of Windows XP (NT5)
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.

117 lines
2.5 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: row.h
  7. //
  8. // Contents: Cert Server Database interface implementation
  9. //
  10. //---------------------------------------------------------------------------
  11. #include "resource.h" // main symbols
  12. class CCertDBRow: public ICertDBRow
  13. {
  14. public:
  15. CCertDBRow();
  16. ~CCertDBRow();
  17. public:
  18. // IUnknown
  19. STDMETHODIMP QueryInterface(const IID& iid, void **ppv);
  20. ULONG STDMETHODCALLTYPE AddRef();
  21. ULONG STDMETHODCALLTYPE Release();
  22. // ICertDBRow
  23. STDMETHOD(BeginTransaction)();
  24. STDMETHOD(CommitTransaction)(
  25. /* [in] */ BOOL fCommit);
  26. STDMETHOD(GetRowId)(
  27. /* [out] */ DWORD *pRowId);
  28. STDMETHOD(Delete)();
  29. STDMETHOD(SetProperty)(
  30. /* [in] */ WCHAR const *pwszPropName,
  31. /* [in] */ DWORD dwFlags,
  32. /* [in] */ DWORD cbProp,
  33. /* [in] */ BYTE const *pbProp); // OPTIONAL
  34. STDMETHOD(GetProperty)(
  35. /* [in] */ WCHAR const *pwszPropName,
  36. /* [in] */ DWORD dwFlags,
  37. /* [in, out] */ DWORD *pcbProp,
  38. /* [out] */ BYTE *pbProp); // OPTIONAL
  39. STDMETHOD(SetExtension)(
  40. /* [in] */ WCHAR const *pwszExtensionName,
  41. /* [in] */ DWORD dwExtFlags,
  42. /* [in] */ DWORD cbValue,
  43. /* [in] */ BYTE const *pbValue); // OPTIONAL
  44. STDMETHOD(GetExtension)(
  45. /* [in] */ WCHAR const *pwszExtensionName,
  46. /* [out] */ DWORD *pdwExtFlags,
  47. /* [in, out] */ DWORD *pcbValue,
  48. /* [out] */ BYTE *pbValue); // OPTIONAL
  49. STDMETHOD(CopyRequestNames)();
  50. STDMETHOD(EnumCertDBName)(
  51. /* [in] */ DWORD dwFlags,
  52. /* [out] */ IEnumCERTDBNAME **ppenum);
  53. // CCertDBRow
  54. HRESULT Open(
  55. IN CERTSESSION *pcs,
  56. IN ICertDB *pdb,
  57. OPTIONAL IN CERTVIEWRESTRICTION const *pcvr);
  58. HRESULT EnumerateNext(
  59. IN OUT DWORD *pFlags,
  60. IN JET_TABLEID tableid,
  61. IN LONG cskip,
  62. IN ULONG celt,
  63. OUT CERTDBNAME *rgelt,
  64. OUT ULONG *pceltFetched);
  65. HRESULT EnumerateClose(
  66. IN JET_TABLEID tableid);
  67. private:
  68. VOID _Cleanup();
  69. HRESULT _SetPropertyA(
  70. IN WCHAR const *pwszPropName,
  71. IN DWORD dwFlags,
  72. IN DWORD cbProp,
  73. IN BYTE const *pbProp);
  74. HRESULT _GetPropertyA(
  75. IN WCHAR const *pwszPropName,
  76. IN DWORD dwFlags,
  77. IN OUT DWORD *pcbProp,
  78. OPTIONAL OUT BYTE *pbProp);
  79. BOOL _VerifyPropertyLength(
  80. IN DWORD dwFlags,
  81. IN DWORD cbProp,
  82. IN BYTE const *pbProp);
  83. HRESULT _VerifyPropertyValue(
  84. IN DWORD dwFlags,
  85. IN DWORD cbProp,
  86. IN JET_COLTYP coltyp,
  87. IN DWORD cbMax);
  88. ICertDB *m_pdb;
  89. CERTSESSION *m_pcs;
  90. // Reference count
  91. long m_cRef;
  92. };