dns_requestacl_python.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #ifndef __PYTHON_REQUESTACL_H
  15. #define __PYTHON_REQUESTACL_H 1
  16. #include <Python.h>
  17. #include <boost/shared_ptr.hpp>
  18. #include <acl/dns.h>
  19. namespace isc {
  20. namespace acl {
  21. namespace dns {
  22. namespace python {
  23. // The s_* Class simply covers one instantiation of the object
  24. class s_RequestACL : public PyObject {
  25. public:
  26. s_RequestACL();
  27. // We don't have to use a shared pointer for its original purposes as
  28. // the python object maintains reference counters itself. But the
  29. // underlying C++ API only exposes a shared pointer for the ACL objects,
  30. // so we store it in that form.
  31. boost::shared_ptr<RequestACL> cppobj;
  32. };
  33. extern PyTypeObject requestacl_type;
  34. bool initModulePart_RequestACL(PyObject* mod);
  35. } // namespace python
  36. } // namespace dns
  37. } // namespace acl
  38. } // namespace isc
  39. #endif // __PYTHON_REQUESTACL_H
  40. // Local Variables:
  41. // mode: c++
  42. // End: