[asterisk-scf-commits] asterisk-scf/integration/logger.git branch "filename" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Mar 31 15:00:17 CDT 2011


branch "filename" has been updated
       via  154937cf74e4613a5bac1eaec33ce96bd0790af8 (commit)
      from  0c7312212a76b9397e5f741cc2ed797191fbce31 (commit)

Summary of changes:
 server/src/CMakeLists.txt                          |    2 +-
 server/src/Configuration.cpp                       |   96 ++++++++++----------
 server/src/Configuration.h                         |    6 +-
 server/src/LoggingServer.cpp                       |    2 +-
 server/src/LoggingServer.h                         |    2 +-
 server/test/CMakeLists.txt                         |    2 +-
 server/test/ConfigurationTest.cpp                  |    2 +-
 ...omponent.cpp => LoggingConfigurationHelper.cpp} |    0
 ...ionComponent.h => LoggingConfigurationHelper.h} |    0
 slice                                              |    2 +-
 10 files changed, 57 insertions(+), 57 deletions(-)
 rename server/test/{ConfigurationComponent.cpp => LoggingConfigurationHelper.cpp} (100%)
 rename server/test/{ConfigurationComponent.h => LoggingConfigurationHelper.h} (100%)


- Log -----------------------------------------------------------------
commit 154937cf74e4613a5bac1eaec33ce96bd0790af8
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Mar 31 14:58:45 2011 -0500

    Make changes suggested by reviewers:
    
    * Update copyright dates to 2011
    * Change "visitor" class to be "LoggingGroupVisitor"
    * Change file name of ConfigurationComponent.* in the tests to LoggingConfigurationHelper.*
    * s/Impl/Priv/g in source

diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 5d02911..a2859bb 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -1,7 +1,7 @@
 #
 # Asterisk Scalable Communications Framework
 #
-# Copyright (C) 2010 -- Digium, Inc.
+# Copyright (C) 2011 -- Digium, Inc.
 #
 # All rights reserved.
 #
diff --git a/server/src/Configuration.cpp b/server/src/Configuration.cpp
index a17a2e4..cf70445 100644
--- a/server/src/Configuration.cpp
+++ b/server/src/Configuration.cpp
@@ -58,27 +58,27 @@ public:
 
 typedef boost::shared_ptr<LoggerGeneralConfiguration> LoggerGeneralConfigurationPtr;
 
-class ConfigurationServiceImpl
+class ConfigurationServicePriv
 {
 public:
-    ConfigurationServiceImpl(LoggingServerIPtr server)
+    ConfigurationServicePriv(LoggingServerIPtr server)
         : mServer(server) { }
     LoggingServerIPtr mServer;
     LoggerGeneralConfigurationPtr mGeneralConfiguration;
 };
 
-typedef boost::shared_ptr<ConfigurationServiceImpl> ConfigurationServiceImplPtr;
+typedef boost::shared_ptr<ConfigurationServicePriv> ConfigurationServicePrivPtr;
 
 LoggerConfigurationService::LoggerConfigurationService(LoggingServerIPtr server)
-    : mImpl(new ConfigurationServiceImpl(server)) { }
+    : mPriv(new ConfigurationServicePriv(server)) { }
 
 ConfigurationGroupSeq LoggerConfigurationService::getConfiguration(const ConfigurationGroupSeq& groups, const Ice::Current&)
 {
-    class visitor : public LoggerConfigurationGroupVisitor
+    class LoggerGroupVisitor : public LoggerConfigurationGroupVisitor
     {
     public:
-        visitor(const ConfigurationServiceImplPtr &impl, ConfigurationGroupSeq &groups)
-            : mImpl(impl), mGroups(groups) { }
+        LoggerGroupVisitor(const ConfigurationServicePrivPtr &priv, ConfigurationGroupSeq &groups)
+            : mPriv(priv), mGroups(groups) { }
     private:
         /**
          * Internal helper function which determines what configuration items should be returned
@@ -99,28 +99,28 @@ ConfigurationGroupSeq LoggerConfigurationService::getConfiguration(const Configu
                     continue;
        	        }
        
-       	        returnedItems.insert(make_pair((*requestedItem).first, (*requestedItem).second));
+       	        returnedItems.insert(*requestedItem);
        	    }
        	}
 
         void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
         {
-            if (!mImpl->mGeneralConfiguration)
+            if (!mPriv->mGeneralConfiguration)
             {
                 return;
             }
 
             LoggerGeneralGroupPtr returnedGroup = new LoggerGeneralGroup();
-            insertRequestedConfigurationItems(group->configurationItems, mImpl->mGeneralConfiguration->mGroup->configurationItems, returnedGroup->configurationItems);
+            insertRequestedConfigurationItems(group->configurationItems, mPriv->mGeneralConfiguration->mGroup->configurationItems, returnedGroup->configurationItems);
             mGroups.push_back(returnedGroup);
         }
 
-        ConfigurationServiceImplPtr mImpl;
+        ConfigurationServicePrivPtr mPriv;
         ConfigurationGroupSeq &mGroups;
     };
 
     ConfigurationGroupSeq newGroups;
-    LoggerConfigurationGroupVisitorPtr v = new visitor(mImpl, newGroups);
+    LoggerConfigurationGroupVisitorPtr v = new LoggerGroupVisitor(mPriv, newGroups);
 
     for (ConfigurationGroupSeq::const_iterator group = groups.begin(); group != groups.end(); ++group)
     {
@@ -132,28 +132,28 @@ ConfigurationGroupSeq LoggerConfigurationService::getConfiguration(const Configu
 
 ConfigurationGroupSeq LoggerConfigurationService::getConfigurationAll(const ConfigurationGroupSeq& groups, const Ice::Current&)
 {
-    class visitor : public LoggerConfigurationGroupVisitor
+    class LoggerGroupVisitor : public LoggerConfigurationGroupVisitor
     {
     public:
-        visitor(const ConfigurationServiceImplPtr &impl, ConfigurationGroupSeq &groups)
-            : mImpl(impl), mGroups(groups) { }
+        LoggerGroupVisitor(const ConfigurationServicePrivPtr &priv, ConfigurationGroupSeq &groups)
+            : mPriv(priv), mGroups(groups) { }
     private:
         void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
         {
-            if (!mImpl->mGeneralConfiguration)
+            if (!mPriv->mGeneralConfiguration)
             {
                 return;
             }
 
-            mGroups.push_back(mImpl->mGeneralConfiguration->mGroup);
+            mGroups.push_back(mPriv->mGeneralConfiguration->mGroup);
         }
 
-        ConfigurationServiceImplPtr mImpl;
+        ConfigurationServicePrivPtr mPriv;
         ConfigurationGroupSeq &mGroups;
     };
 
     ConfigurationGroupSeq newGroups;
-    LoggerConfigurationGroupVisitorPtr v = new visitor(mImpl, newGroups);
+    LoggerConfigurationGroupVisitorPtr v = new LoggerGroupVisitor(mPriv, newGroups);
     
     for (ConfigurationGroupSeq::const_iterator group = groups.begin(); group != groups.end(); ++group)
     {
@@ -167,7 +167,7 @@ ConfigurationGroupSeq LoggerConfigurationService::getConfigurationGroups(const I
 {
     ConfigurationGroupSeq groups;
 
-    if (mImpl->mGeneralConfiguration)
+    if (mPriv->mGeneralConfiguration)
     {
         LoggerGeneralGroupPtr general = new LoggerGeneralGroup();
         groups.push_back(general);
@@ -181,8 +181,8 @@ void LoggerConfigurationService::setConfiguration(const ConfigurationGroupSeq& g
     class GroupsVisitor : public LoggerConfigurationGroupVisitor
     {
     public:
-        GroupsVisitor(const ConfigurationServiceImplPtr &impl)
-            : mImpl(impl) { }
+        GroupsVisitor(const ConfigurationServicePrivPtr &priv)
+            : mPriv(priv) { }
     private:
         /**
          * Helper function which performs serial number checking of items
@@ -216,49 +216,49 @@ void LoggerConfigurationService::setConfiguration(const ConfigurationGroupSeq& g
 
         void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
         {
-            if (!mImpl->mGeneralConfiguration)
+            if (!mPriv->mGeneralConfiguration)
             {
-                mImpl->mGeneralConfiguration.reset(new LoggerGeneralConfiguration(new LoggerGeneralGroup));
+                mPriv->mGeneralConfiguration.reset(new LoggerGeneralConfiguration(new LoggerGeneralGroup));
             }
             else
             {
-                performSerialCheck(group->configurationItems, mImpl->mGeneralConfiguration->mGroup);
+                performSerialCheck(group->configurationItems, mPriv->mGeneralConfiguration->mGroup);
             }
             
             class GeneralItemsVisitor : public LoggerConfigurationItemVisitor
             {
             public:
-                GeneralItemsVisitor(ConfigurationServiceImplPtr impl)
-                    : mImpl(impl) { }
+                GeneralItemsVisitor(ConfigurationServicePrivPtr priv)
+                    : mPriv(priv) { }
             private:
                 void visitFileItem(const FileItemPtr &fileItem)
                 {
-                    if (mImpl->mGeneralConfiguration->mOutputFile &&
-                            mImpl->mGeneralConfiguration->mOutputFile->fileName == fileItem->fileName)
+                    if (mPriv->mGeneralConfiguration->mOutputFile &&
+                            mPriv->mGeneralConfiguration->mOutputFile->fileName == fileItem->fileName)
                     {
                         // The new configuration has the same file name as
                         // the old. Don't interrupt things. Just return.
                         return;
                     }
 
-                    mImpl->mGeneralConfiguration->mOutputFile.reset(new FileItemI(mImpl->mServer, fileItem->fileName));
+                    mPriv->mGeneralConfiguration->mOutputFile.reset(new FileItemI(mPriv->mServer, fileItem->fileName));
                 }
-                ConfigurationServiceImplPtr mImpl;
+                ConfigurationServicePrivPtr mPriv;
             };
 
-            LoggerConfigurationItemVisitorPtr generalVisitor = new GeneralItemsVisitor(mImpl);
+            LoggerConfigurationItemVisitorPtr generalVisitor = new GeneralItemsVisitor(mPriv);
 
             for (ConfigurationItemDict::const_iterator item = group->configurationItems.begin();
                     item != group->configurationItems.end();
                     ++item)
             {
-                mImpl->mGeneralConfiguration->mGroup->configurationItems.insert(make_pair(item->first, item->second));
+                mPriv->mGeneralConfiguration->mGroup->configurationItems.insert(*item);
                 item->second->visit(generalVisitor);
             }
         }
-        ConfigurationServiceImplPtr mImpl;
+        ConfigurationServicePrivPtr mPriv;
     };
-    LoggerConfigurationGroupVisitorPtr v = new GroupsVisitor(mImpl);
+    LoggerConfigurationGroupVisitorPtr v = new GroupsVisitor(mPriv);
     
     for (ConfigurationGroupSeq::const_iterator group = groups.begin(); group != groups.end(); ++group)
     {
@@ -271,8 +271,8 @@ void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGro
     class GroupsVisitor : public LoggerConfigurationGroupVisitor
     {
     public:
-        GroupsVisitor(const ConfigurationServiceImplPtr &impl)
-            : mImpl(impl) { }
+        GroupsVisitor(const ConfigurationServicePrivPtr &priv)
+            : mPriv(priv) { }
     private:
 
         void removeItems(LoggerConfigurationItemVisitor* visitor, const ConfigurationItemDict& itemsToRemove,
@@ -297,7 +297,7 @@ void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGro
 
         void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
         {
-            if (!mImpl->mGeneralConfiguration)
+            if (!mPriv->mGeneralConfiguration)
             {
                 return;
             }
@@ -316,14 +316,14 @@ void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGro
                     }
                 }
                 LoggerGeneralConfigurationPtr mGroup;
-            } generalVisitor(mImpl->mGeneralConfiguration);
+            } generalVisitor(mPriv->mGeneralConfiguration);
 
-            removeItems(&generalVisitor, group->configurationItems, mImpl->mGeneralConfiguration->mGroup->configurationItems);
+            removeItems(&generalVisitor, group->configurationItems, mPriv->mGeneralConfiguration->mGroup->configurationItems);
         }
-        ConfigurationServiceImplPtr mImpl;
+        ConfigurationServicePrivPtr mPriv;
     };
 
-    LoggerConfigurationGroupVisitorPtr v = new GroupsVisitor(mImpl);
+    LoggerConfigurationGroupVisitorPtr v = new GroupsVisitor(mPriv);
  
     for (ConfigurationGroupSeq::const_iterator group = groups.begin(); group != groups.end(); ++group)
     {
@@ -333,20 +333,20 @@ void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGro
 
 void LoggerConfigurationService::removeConfigurationGroups(const ConfigurationGroupSeq& groups, const Ice::Current&)
 {
-    class visitor : public LoggerConfigurationGroupVisitor
+    class LoggerGroupVisitor : public LoggerConfigurationGroupVisitor
     {
     public:
-        visitor(const ConfigurationServiceImplPtr &impl)
-            : mImpl(impl) { }
+        LoggerGroupVisitor(const ConfigurationServicePrivPtr &priv)
+            : mPriv(priv) { }
     private:
         void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
         {
-            mImpl->mGeneralConfiguration.reset();
+            mPriv->mGeneralConfiguration.reset();
         }
-        ConfigurationServiceImplPtr mImpl;
+        ConfigurationServicePrivPtr mPriv;
     };
 
-    LoggerConfigurationGroupVisitorPtr v = new visitor(mImpl);
+    LoggerConfigurationGroupVisitorPtr v = new LoggerGroupVisitor(mPriv);
 
     for (ConfigurationGroupSeq::const_iterator group = groups.begin(); group != groups.end(); ++group)
     {
diff --git a/server/src/Configuration.h b/server/src/Configuration.h
index 64125a9..fa5563d 100644
--- a/server/src/Configuration.h
+++ b/server/src/Configuration.h
@@ -37,10 +37,10 @@ namespace Logging
 /*
  * Private implementation class for ConfigurationService.
  */
-class ConfigurationServiceImpl;
+class ConfigurationServicePriv;
 
 /**
- * Implementation of the configuration service.
+ * Privementation of the configuration service.
  */
 class LoggerConfigurationService : public AsteriskSCF::System::Configuration::V1::ConfigurationService
 {
@@ -56,7 +56,7 @@ private:
     /**
      * Private implementation details.
      */
-    boost::shared_ptr<ConfigurationServiceImpl> mImpl;
+    boost::shared_ptr<ConfigurationServicePriv> mPriv;
 };
 
 }; //End namespace Logging
diff --git a/server/src/LoggingServer.cpp b/server/src/LoggingServer.cpp
index 764a236..5433884 100644
--- a/server/src/LoggingServer.cpp
+++ b/server/src/LoggingServer.cpp
@@ -1,7 +1,7 @@
 /*
  * Asterisk SCF -- An open-source communications framework.
  *
- * Copyright (C) 2010, Digium, Inc.
+ * Copyright (C) 2011, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk SCF project. Please do not directly contact
diff --git a/server/src/LoggingServer.h b/server/src/LoggingServer.h
index 5d6f3b0..3d68d71 100644
--- a/server/src/LoggingServer.h
+++ b/server/src/LoggingServer.h
@@ -1,7 +1,7 @@
 /*
  * Asterisk SCF -- An open-source communications framework.
  *
- * Copyright (C) 2010, Digium, Inc.
+ * Copyright (C) 2011, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk SCF project. Please do not directly contact
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index 41d2cc4..37d60fc 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -1,7 +1,7 @@
 #
 # Asterisk Scalable Communications Framework
 #
-# Copyright (C) 2010 -- Digium, Inc.
+# Copyright (C) 2011 -- Digium, Inc.
 #
 # All rights reserved.
 #
diff --git a/server/test/ConfigurationTest.cpp b/server/test/ConfigurationTest.cpp
index e4c9a07..b94cb3b 100644
--- a/server/test/ConfigurationTest.cpp
+++ b/server/test/ConfigurationTest.cpp
@@ -1,7 +1,7 @@
 /*
  * Asterisk SCF -- An open-source communications framework.
  *
- * Copyright (C) 2010, Digium, Inc.
+ * Copyright (C) 2011, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk SCF project. Please do not directly contact
diff --git a/server/test/ConfigurationComponent.cpp b/server/test/LoggingConfigurationHelper.cpp
similarity index 100%
rename from server/test/ConfigurationComponent.cpp
rename to server/test/LoggingConfigurationHelper.cpp
diff --git a/server/test/ConfigurationComponent.h b/server/test/LoggingConfigurationHelper.h
similarity index 100%
rename from server/test/ConfigurationComponent.h
rename to server/test/LoggingConfigurationHelper.h
diff --git a/slice b/slice
index 0c62939..03ea08a 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit 0c629393e2f05dc0ed43bcc6305880949df36289
+Subproject commit 03ea08a0f749b5f36ae4dc36d25493689f9e273c

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/logger.git



More information about the asterisk-scf-commits mailing list