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.

64 lines
2.4 KiB

  1. // Securable.h -- Securable class declaration
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #if !defined(SLBCSP_SECURABLE_H)
  8. #define SLBCSP_SECURABLE_H
  9. #include "Retainable.h"
  10. // Abstract base class mixin (interface) used by derived classes to
  11. // define the interface to secure an object. Securing an object
  12. // involves retaining the object for exclusive access and setting the
  13. // state for secure use. The object is then abandoned by clearing any
  14. // priviledged state before relinquishing exclusive access. See the
  15. // companion Secured template class to manage the resources derived
  16. // from Securable.
  17. class Securable
  18. : public Retainable
  19. {
  20. public:
  21. // Types
  22. // C'tors/D'tors
  23. Securable();
  24. virtual
  25. ~Securable() = 0;
  26. // Operators
  27. // Operations
  28. // Clear any priviledged state
  29. virtual void
  30. Abandon() = 0;
  31. // Prime the resource for secure use
  32. virtual void
  33. Secure() = 0;
  34. // Access
  35. // Predicates
  36. protected:
  37. // Types
  38. // C'tors/D'tors
  39. // Operators
  40. // Operations
  41. // Access
  42. // Predicates
  43. // Variables
  44. private:
  45. // Types
  46. // C'tors/D'tors
  47. // Operators
  48. // Operations
  49. // Access
  50. // Predicates
  51. // Variables
  52. };
  53. #endif // SLBCSP_SECURABLE_H