[asterisk-scf-commits] asterisk-scf/integration/logger.git branch "retry_deux" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Feb 2 13:35:36 CST 2012
branch "retry_deux" has been updated
via a1c6ba6eaec09951bb6bfdd294a08d4b66bcedb5 (commit)
from 58912b5d4883cd552854fdd4ca57e10c9f3c4591 (commit)
Summary of changes:
server/test/LoggingConfigurationHelper.cpp | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit a1c6ba6eaec09951bb6bfdd294a08d4b66bcedb5
Author: Brent Eagles <beagles at digium.com>
Date: Thu Feb 2 16:05:03 2012 -0330
Fixup test to build with operation context.
diff --git a/server/test/LoggingConfigurationHelper.cpp b/server/test/LoggingConfigurationHelper.cpp
index fa03dd7..c437f56 100644
--- a/server/test/LoggingConfigurationHelper.cpp
+++ b/server/test/LoggingConfigurationHelper.cpp
@@ -20,12 +20,30 @@
#include "LoggingConfigurationHelper.h"
#include "LoggingConfigurationIf.h"
+#include <IceUtil/UUID.h>
+#include <AsteriskSCF/System/OperationsIf.h>
namespace
{
const std::string FileItemName("file");
const std::string FormatItemName("format");
const std::string LevelItemName("level");
+}
+
+/*
+ * for consistency with helper method defined in ice-util-cpp. logger doesn't use it because it would
+ * create a circular dependency.
+ */
+namespace AsteriskSCF
+{
+
+AsteriskSCF::System::V1::OperationContextPtr createContext()
+{
+ AsteriskSCF::System::V1::OperationContextPtr newContext(new AsteriskSCF::System::V1::OperationContext);
+ newContext->id = IceUtil::generateUUID();
+ return newContext;
+}
+
};
using namespace AsteriskSCF::System::Configuration::V1;
@@ -98,7 +116,7 @@ void LoggingConfigurationHelper::setLogOutFile(const std::string &fileName, int
fileItem->serialNumber = serialNumber;
generalGroup->configurationItems.insert(make_pair(FileItemName, fileItem));
groups.push_back(generalGroup);
- mConfigPrx->setConfiguration(groups);
+ mConfigPrx->setConfiguration(AsteriskSCF::createContext(), groups);
}
void LoggingConfigurationHelper::removeLogOutFile(const std::string &fileName)
@@ -109,7 +127,7 @@ void LoggingConfigurationHelper::removeLogOutFile(const std::string &fileName)
fileItem->fileName = fileName;
generalGroup->configurationItems.insert(make_pair(FileItemName, fileItem));
groups.push_back(generalGroup);
- mConfigPrx->removeConfigurationItems(groups);
+ mConfigPrx->removeConfigurationItems(AsteriskSCF::createContext(), groups);
}
AsteriskSCF::Configuration::LoggingService::V1::FileItemPtr LoggingConfigurationHelper::getConfiguredOutputFile()
@@ -144,7 +162,7 @@ void LoggingConfigurationHelper::setFormat(const std::string& fmtStr, int serial
formatItem->serialNumber = serialNumber;
generalGroup->configurationItems.insert(make_pair(FormatItemName, formatItem));
groups.push_back(generalGroup);
- mConfigPrx->setConfiguration(groups);
+ mConfigPrx->setConfiguration(AsteriskSCF::createContext(), groups);
}
@@ -156,7 +174,7 @@ void LoggingConfigurationHelper::unsetFormat(const std::string& fmtStr)
formatItem->formatSpec = fmtStr;
generalGroup->configurationItems.insert(make_pair(FormatItemName, formatItem));
groups.push_back(generalGroup);
- mConfigPrx->removeConfigurationItems(groups);
+ mConfigPrx->removeConfigurationItems(AsteriskSCF::createContext(), groups);
}
AsteriskSCF::Configuration::LoggingService::V1::FormatItemPtr LoggingConfigurationHelper::getConfiguredOutputFormat()
@@ -190,7 +208,7 @@ void LoggingConfigurationHelper::setLoggingLevel(const std::string& loggerName,
levelItem->serialNumber = serialNumber;
generalGroup->configurationItems.insert(make_pair(loggerName + ".level", levelItem));
groups.push_back(generalGroup);
- mConfigPrx->setConfiguration(groups);
+ mConfigPrx->setConfiguration(AsteriskSCF::createContext(), groups);
}
AsteriskSCF::System::Logging::Level LoggingConfigurationHelper::getLoggingLevel(const std::string& loggerName)
-----------------------------------------------------------------------
--
asterisk-scf/integration/logger.git
More information about the asterisk-scf-commits
mailing list