policy_params.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef SANDBOX_WIN_SRC_POLICY_PARAMS_H_
  5. #define SANDBOX_WIN_SRC_POLICY_PARAMS_H_
  6. #include "sandbox/win/src/policy_engine_params.h"
  7. namespace sandbox {
  8. class ParameterSet;
  9. // Warning: The following macros store the address to the actual variables, in
  10. // other words, the values are not copied.
  11. #define POLPARAMS_BEGIN(type) class type { public: enum Args {
  12. #define POLPARAM(arg) arg,
  13. #define POLPARAMS_END(type) PolParamLast }; }; \
  14. typedef sandbox::ParameterSet type##Array [type::PolParamLast];
  15. // Policy parameters for file access.
  16. POLPARAMS_BEGIN(OpenFile)
  17. POLPARAM(NAME)
  18. POLPARAM(ACCESS)
  19. POLPARAM(OPENONLY)
  20. POLPARAMS_END(OpenFile)
  21. // Policy parameter for name-based policies.
  22. POLPARAMS_BEGIN(NameBased)
  23. POLPARAM(NAME)
  24. POLPARAMS_END(NameBased)
  25. // Policy parameters for open event.
  26. POLPARAMS_BEGIN(OpenEventParams)
  27. POLPARAM(NAME)
  28. POLPARAM(ACCESS)
  29. POLPARAMS_END(OpenEventParams)
  30. // Policy Parameters for reg open / create.
  31. POLPARAMS_BEGIN(OpenKey)
  32. POLPARAM(NAME)
  33. POLPARAM(ACCESS)
  34. POLPARAMS_END(OpenKey)
  35. // Policy parameter for name-based policies.
  36. POLPARAMS_BEGIN(HandleTarget)
  37. POLPARAM(NAME)
  38. POLPARAM(TARGET)
  39. POLPARAMS_END(HandleTarget)
  40. } // namespace sandbox
  41. #endif // SANDBOX_WIN_SRC_POLICY_PARAMS_H_