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.1 KiB

  1. /*===================================================================
  2. Microsoft Denali
  3. Microsoft Confidential.
  4. Copyright 1996 Microsoft Corporation. All Rights Reserved.
  5. Component: ScriptingContext object
  6. File: Context.h
  7. Owner: SteveBr
  8. This file contains the header info for defining the Context object.
  9. Note: This was largely stolen from Kraig Brocjschmidt's Inside OLE2
  10. second edition, chapter 14 Beeper v5.
  11. ===================================================================*/
  12. #ifndef SCRIPTING_CONTEXT_H
  13. #define SCRIPTING_CONTEXT_H
  14. #include "debug.h"
  15. #include "util.h"
  16. #include "request.h"
  17. #include "response.h"
  18. #include "server.h"
  19. #include "asptlb.h"
  20. #include "memcls.h"
  21. /*===================================================================
  22. C S c r i p t i n g C o n t e x t
  23. ===================================================================*/
  24. class CScriptingContext : public IScriptingContextImpl
  25. {
  26. private:
  27. // Ref count
  28. ULONG m_cRef;
  29. // Intrinsics
  30. IApplicationObject *m_pAppln;
  31. ISessionObject *m_pSession;
  32. IRequest *m_pRequest;
  33. IResponse *m_pResponse;
  34. IServer *m_pServer;
  35. // Interface to indicate that we support ErrorInfo reporting
  36. CSupportErrorInfo m_ImpISuppErr;
  37. public:
  38. CScriptingContext()
  39. {
  40. Assert(FALSE); // Default constructor should not be used
  41. }
  42. CScriptingContext
  43. (
  44. IApplicationObject *pAppln,
  45. ISessionObject *pSession,
  46. IRequest *pRequest,
  47. IResponse *pResponse,
  48. IServer *pServer
  49. );
  50. ~CScriptingContext();
  51. // Non-delegating object IUnknown
  52. STDMETHODIMP QueryInterface(REFIID, PPVOID);
  53. STDMETHODIMP_(ULONG) AddRef(void);
  54. STDMETHODIMP_(ULONG) Release(void);
  55. // IScriptingContext implementation
  56. STDMETHODIMP get_Request(IRequest **ppRequest);
  57. STDMETHODIMP get_Response(IResponse **ppResponse);
  58. STDMETHODIMP get_Server(IServer **ppServer);
  59. STDMETHODIMP get_Session(ISessionObject **ppSession);
  60. STDMETHODIMP get_Application(IApplicationObject **ppApplication);
  61. // Cache on per-class basis
  62. ACACHE_INCLASS_DEFINITIONS()
  63. };
  64. #endif // SCRIPTING_CONTEXT_H