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.

86 lines
2.0 KiB

  1. /*++
  2. Copyright (C) 1996-2000 Microsoft Corporation
  3. Module Name:
  4. logfiles.h
  5. Abstract:
  6. Header file for the implementation of the CImpILogFiles
  7. and CImpIEnumLogFile objects.
  8. --*/
  9. #ifndef _LOGFILES_H_
  10. #define _LOGFILES_H_
  11. class CPolyline;
  12. class CLogFileItem;
  13. class CImpILogFiles : public ILogFiles
  14. {
  15. public:
  16. CImpILogFiles(CPolyline*, LPUNKNOWN);
  17. ~CImpILogFiles();
  18. /* IUnknown methods */
  19. STDMETHOD(QueryInterface) (REFIID riid, LPVOID *ppvObj);
  20. STDMETHOD_(ULONG, AddRef) ();
  21. STDMETHOD_(ULONG, Release) ();
  22. /* IDispatch methods */
  23. STDMETHOD(GetTypeInfoCount) (UINT *pctinfo);
  24. STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo **pptinfo);
  25. STDMETHOD(GetIDsOfNames) (REFIID riid, OLECHAR **rgszNames,
  26. UINT cNames, LCID lcid, DISPID *rgdispid);
  27. STDMETHOD(Invoke) (DISPID dispidMember, REFIID riid, LCID lcid,WORD wFlags,
  28. DISPPARAMS *pdispparams, VARIANT *pvarResult,
  29. EXCEPINFO *pexcepinfo, UINT *puArgErr);
  30. /* LogFiles methods */
  31. STDMETHOD(get_Count) (long *pLong);
  32. STDMETHOD(get__NewEnum) (IUnknown **ppIunk);
  33. STDMETHOD(get_Item) (VARIANT index, DILogFileItem **ppI);
  34. STDMETHOD(Add) (BSTR bstrLogFilePath, DILogFileItem **ppI);
  35. STDMETHOD(Remove) (VARIANT index);
  36. protected:
  37. ULONG m_cRef;
  38. CPolyline* m_pObj;
  39. LPUNKNOWN m_pUnkOuter;
  40. ULONG m_uiItemCount;
  41. };
  42. typedef CImpILogFiles *PCImpILogFiles;
  43. // LogFile enumerator
  44. class CImpIEnumLogFile : public IEnumVARIANT
  45. {
  46. public:
  47. CImpIEnumLogFile (VOID);
  48. HRESULT Init (CLogFileItem* pItem, INT cItems);
  49. // IUnknown methods
  50. STDMETHOD(QueryInterface) (REFIID riid, LPVOID *ppvObj);
  51. STDMETHOD_(ULONG, AddRef) ();
  52. STDMETHOD_(ULONG, Release) ();
  53. // Enum methods
  54. STDMETHOD(Next) (ULONG cItems, VARIANT *varItems, ULONG *pcReturned);
  55. STDMETHOD(Skip) (ULONG cSkip);
  56. STDMETHOD(Reset) (VOID);
  57. STDMETHOD(Clone) (IEnumVARIANT **pIEnum);
  58. private:
  59. DWORD m_cRef;
  60. CLogFileItem** m_paLogFileItem;
  61. ULONG m_cItems;
  62. ULONG m_uCurrent;
  63. };
  64. #endif //_LOGFILES_H_