auth_srv.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2009 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. // $Id$
  15. #ifndef __AUTH_SRV_H
  16. #define __AUTH_SRV_H 1
  17. #include <string>
  18. #include <cc/data.h>
  19. #include <auth/data_source_static.h>
  20. #include <auth/data_source_sqlite3.h>
  21. class AuthSrv {
  22. public:
  23. explicit AuthSrv(int port);
  24. int getSocket() { return (sock); }
  25. void processMessage();
  26. void serve(std::string zone_name);
  27. void setDbFile(const std::string& db_file);
  28. isc::data::ElementPtr updateConfig(isc::data::ElementPtr config);
  29. private:
  30. std::string _db_file;
  31. isc::auth::MetaDataSrc data_src;
  32. int sock;
  33. };
  34. #endif // __AUTH_SRV_H
  35. // Local Variables:
  36. // mode: c++
  37. // End: