]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[65-libyang-generic] Addressed comments
authorFrancis Dupont <fdupont@isc.org>
Wed, 12 Sep 2018 09:37:35 +0000 (11:37 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 12 Sep 2018 09:37:35 +0000 (11:37 +0200)
doc/devel/mainpage.dox
src/lib/yang/sysrepo_connection.cc
src/lib/yang/sysrepo_connection.h

index d093ef7648ad91ef65e74a9d3569fc92df76e380..7da6b86a6f89569931533e9045359b058d6ad89b 100644 (file)
  *
  * @section libraries Kea libraries
  * - @subpage libcc
- * - @subpage libyang
  * - @subpage libdhcp
  *   - @subpage libdhcpIntro
  *   - @subpage libdhcpRelay
  * - @subpage libprocess
  *   - @subpage cpl
  *   - @subpage cplSignals
+ * - @subpage libyang
  *
  * @section miscellaneousTopics Miscellaneous Topics
  * - @subpage terminology
index e2e859bdfd9670c85074141e8fe9cc378f59c162..d3ffd4613a8803313e56c3de2732b2b26fae563d 100644 (file)
@@ -14,11 +14,11 @@ SysrepoConnection::SysrepoConnection() {
 
 SysrepoConnection::~SysrepoConnection() {
     if (session_) {
-      session_->discard_changes();
-      session_->unlock_datastore();
-      session_->session_stop();
+        session_->discard_changes();
+        session_->unlock_datastore();
+        session_->session_stop();
 
-      // how to call disconnect?
+        // @todo: how to call disconnect?
     }
 }
 
@@ -34,10 +34,10 @@ SysrepoConnection::connect() {
 
 void
 SysrepoConnection::commit() {
-  if (!session_) {
-    isc_throw(SysrepoConnectionError, "session not established");
-  }
-  session_->commit();
+    if (!session_) {
+        isc_throw(SysrepoConnectionError, "session not established");
+    }
+    session_->commit();
 }
 
 }
index 10dced10fa166895ff6c454bf1d34c74893f0afb..b17e99e7bcda1f087a1a372bc4ab87c40ec56576 100644 (file)
 namespace isc {
 namespace yang {
 
+/// @brief Exception from the sysrepo library for connection.
 class SysrepoConnectionError : public Exception {
 public:
     SysrepoConnectionError(const char* file, size_t line, const char* what) :
         isc::Exception(file, line, what) {}
 };
 
+/// @brief Connection to the sysrepo library. Provision, i.e. currently unused.
 class SysrepoConnection {
 public:
+    // @brief Constructor.
     SysrepoConnection();
+
+    // @brief Destructor.
     virtual ~SysrepoConnection();
+
+    // @brief Get a connection and a session.
     void connect();
 
+    // @brief Commit a session.
     void commit();
 
  private:
+    // @brief The session.
     S_Session session_;
 };