[asterisk-scf-commits] asterisk-scf/release/test_channel.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue May 8 17:29:52 CDT 2012
branch "master" has been updated
via 3a535448bdb70d4f77e34e7199934655c06619b3 (commit)
from db6f6d2229821b9d2382fcd80870979e081e4b0a (commit)
Summary of changes:
src/CMakeLists.txt | 4 +-
src/MediaSession.cpp | 12 +++--
src/MediaSession.h | 27 +++++++----
src/Service.cpp | 9 ++-
src/TestEndpoint.cpp | 124 +++++++++++++++++++++++++++++++++----------------
5 files changed, 117 insertions(+), 59 deletions(-)
- Log -----------------------------------------------------------------
commit 3a535448bdb70d4f77e34e7199934655c06619b3
Author: Ken Hunt <ken.hunt at digium.com>
Date: Tue May 8 12:13:27 2012 -0500
Changes for new retry logic.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 57e4eaf..3819295 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,7 +18,7 @@ astscf_component_add_ice_libraries(TestChannel IceStorm)
astscf_component_add_boost_libraries(TestChannel thread date_time)
astscf_component_add_slice_collection_libraries(TestChannel ASTSCF TEST_CHANNEL)
astscf_component_build_icebox(TestChannel)
-target_link_libraries(TestChannel LoggingClient)
+target_link_libraries(TestChannel LoggingClient ASTSCFIceUtilCpp)
astscf_component_install(TestChannel)
astscf_component_init(ConsoleDriver)
@@ -26,5 +26,5 @@ astscf_component_add_files(ConsoleDriver ConsoleDriver.cpp)
astscf_component_add_files(ConsoleDriver ConsoleDriver.h)
astscf_component_add_files(ConsoleDriver main.cpp)
astscf_component_add_slice_collection_libraries(ConsoleDriver TEST_CHANNEL)
-astscf_component_build_standalone(ConsoleDriver)
+astscf_component_build_standalone(ConsoleDriver ASTSCFIceUtilCpp)
astscf_component_install(ConsoleDriver)
diff --git a/src/MediaSession.cpp b/src/MediaSession.cpp
index a245f68..18ed603 100644
--- a/src/MediaSession.cpp
+++ b/src/MediaSession.cpp
@@ -81,8 +81,10 @@ void MediaSessionI::echo()
/**
* Implementation of the corresponding API call.
*/
-void MediaSessionI::setCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies,
- const Ice::Current&)
+void MediaSessionI::setCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::SessionCookies& cookies,
+ const Ice::Current&)
{
for (AsteriskSCF::Media::V1::SessionCookies::const_iterator i = cookies.begin();
i != cookies.end(); ++i)
@@ -121,8 +123,10 @@ void MediaSessionI::getCookies_async(
/**
* Implementation of the corresponding API call.
*/
-void MediaSessionI::removeCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies,
- const Ice::Current&)
+void MediaSessionI::removeCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::SessionCookies& cookies,
+ const Ice::Current&)
{
for (AsteriskSCF::Media::V1::SessionCookies::const_iterator i = cookies.begin();
i != cookies.end(); ++i)
diff --git a/src/MediaSession.h b/src/MediaSession.h
index d33a65b..5e1ada1 100644
--- a/src/MediaSession.h
+++ b/src/MediaSession.h
@@ -44,7 +44,8 @@ public:
mThread->pushFrames(frames);
}
- void setSource(const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
+ void setSource(const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
{
mSource = source;
}
@@ -64,7 +65,8 @@ public:
return mId;
}
- void requestFormat(const AsteriskSCF::Media::V1::FormatPtr&, const Ice::Current&)
+ void requestFormat(const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::FormatPtr&, const Ice::Current&)
{
// XXX
}
@@ -110,13 +112,15 @@ public:
{
}
- void addSink(const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
+ void addSink(const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
{
mSinks.push_back(sink);
mSinkServant->setRelaySinks(mSinks);
}
- void removeSink(const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
+ void removeSink(const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
{
mSinks.erase(std::remove(mSinks.begin(), mSinks.end(),
sink), mSinks.end());
@@ -138,7 +142,8 @@ public:
return mId;
}
- void requestFormat(const AsteriskSCF::Media::V1::FormatPtr&, const Ice::Current&)
+ void requestFormat(const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::FormatPtr&, const Ice::Current&)
{
// XXX
}
@@ -161,14 +166,18 @@ public:
AsteriskSCF::Media::V1::StreamSourceSeq getSources(const Ice::Current&);
AsteriskSCF::Media::V1::StreamSinkSeq getSinks(const Ice::Current&);
std::string getId(const Ice::Current&);
- void setCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies,
- const Ice::Current&);
+ void setCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::SessionCookies& cookies,
+ const Ice::Current&);
void getCookies_async(
const AsteriskSCF::Media::V1::AMD_Session_getCookiesPtr& cb,
const AsteriskSCF::Media::V1::SessionCookies& cookiesToGet,
const Ice::Current&);
- void removeCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies,
- const Ice::Current&);
+ void removeCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Media::V1::SessionCookies& cookies,
+ const Ice::Current&);
//
// internal test methods.
diff --git a/src/Service.cpp b/src/Service.cpp
index fccaa1f..824a530 100644
--- a/src/Service.cpp
+++ b/src/Service.cpp
@@ -20,6 +20,7 @@
#include <AsteriskSCF/Core/Routing/RoutingIf.h>
#include "Logger.h"
#include "TestEndpoint.h"
+#include <AsteriskSCF/Operations/OperationContext.h>
namespace
{
@@ -92,15 +93,17 @@ void TestChannelDriver::start(const std::string& name, const Ice::CommunicatorPt
AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx management =
AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx::checkedCast(communicator->propertyToProxy("LocatorServiceManagement.Proxy"));
- mServiceManagement = AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx::uncheckedCast(management->addService(endpointLocatorPrx, "TestChannel"));
+ mServiceManagement =
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx::uncheckedCast(
+ management->addService(AsteriskSCF::Operations::createContext(), endpointLocatorPrx, "TestChannel"));
AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params = new AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams();
params->category = "TestChannel";
- mServiceManagement->addLocatorParams(params, "");
+ mServiceManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
}
void TestChannelDriver::stop()
{
- mServiceManagement->unregister();
+ mServiceManagement->unregister(AsteriskSCF::Operations::createContext());
try
{
mAdapter->deactivate();
diff --git a/src/TestEndpoint.cpp b/src/TestEndpoint.cpp
index a8996c8..98d9d23 100644
--- a/src/TestEndpoint.cpp
+++ b/src/TestEndpoint.cpp
@@ -32,6 +32,7 @@
#include "Logger.h"
#include "MediaSession.h"
#include <AsteriskSCF/TestChannel/CommandsIf.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
using namespace AsteriskSCF::TestUtil;
@@ -78,46 +79,61 @@ public:
//
void connected()
{
- mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication(),
- AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(
+ AsteriskSCF::Operations::createContext(), mSession,
+ new AsteriskSCF::SessionCommunications::V1::ConnectedIndication(),
+ AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void flashed()
{
- mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::FlashedIndication(),
- AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(
+ AsteriskSCF::Operations::createContext(),
+ mSession, new AsteriskSCF::SessionCommunications::V1::FlashedIndication(),
+ AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void held()
{
- mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::HeldIndication(),
- AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(
+ AsteriskSCF::Operations::createContext(),
+ mSession, new AsteriskSCF::SessionCommunications::V1::HeldIndication(),
+ AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void progressing(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response)
{
- AsteriskSCF::SessionCommunications::V1::ProgressingIndicationPtr indication(new AsteriskSCF::SessionCommunications::V1::ProgressingIndication());
+ AsteriskSCF::SessionCommunications::V1::ProgressingIndicationPtr indication(
+ new AsteriskSCF::SessionCommunications::V1::ProgressingIndication());
indication->response = response;
- mPublisher->indicated(mSession, indication, AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(AsteriskSCF::Operations::createContext(),
+ mSession, indication, AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void ringing()
{
- mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::RingingIndication(),
- AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(
+ AsteriskSCF::Operations::createContext(),
+ mSession, new AsteriskSCF::SessionCommunications::V1::RingingIndication(),
+ AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void stopped(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response)
{
- AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr indication(new AsteriskSCF::SessionCommunications::V1::StoppedIndication());
+ AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr indication(
+ new AsteriskSCF::SessionCommunications::V1::StoppedIndication());
indication->response = response;
- mPublisher->indicated(mSession, indication, AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(
+ AsteriskSCF::Operations::createContext(),
+ mSession, indication, AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void unheld()
{
- mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::UnheldIndication(),
- AsteriskSCF::SessionCommunications::V1::SessionCookies());
+ mPublisher->indicated(
+ AsteriskSCF::Operations::createContext(),
+ mSession, new AsteriskSCF::SessionCommunications::V1::UnheldIndication(),
+ AsteriskSCF::SessionCommunications::V1::SessionCookies());
}
void setProxy(const AsteriskSCF::SessionCommunications::V1::SessionPrx& prx)
@@ -139,6 +155,7 @@ public:
void write_async(
const AsteriskSCF::SessionCommunications::V1::AMD_TelephonyEventSink_writePtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::TelephonyEventPtr& telephonyEvent,
const Ice::Current&)
{
@@ -148,6 +165,7 @@ public:
void setSource_async(
const AsteriskSCF::SessionCommunications::V1::AMD_TelephonyEventSink_setSourcePtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::TelephonyEventSourcePrx& source,
const Ice::Current&)
{
@@ -180,6 +198,7 @@ public:
void addSinks_async(
const AsteriskSCF::SessionCommunications::V1::AMD_TelephonyEventSource_addSinksPtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::TelephonyEventSinkSeq& sinks,
const Ice::Current&)
{
@@ -189,6 +208,7 @@ public:
void removeSinks_async(
const AsteriskSCF::SessionCommunications::V1::AMD_TelephonyEventSource_removeSinksPtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::TelephonyEventSinkSeq& sinks,
const Ice::Current&)
{
@@ -231,8 +251,7 @@ public:
NamePtr name = new Name("bar");
NumberPtr number = new Number("100");
- PrivacyPtr privacy = new Privacy(false);
- IdPtr testId = new Id(name, number, privacy);
+ IdPtr testId = new Id(name, number, new Privacy(false));
IdSeq idSeq;
idSeq.push_back(testId);
mCaller = new Caller(idSeq);
@@ -241,23 +260,22 @@ public:
NamePtr dialedName = new Name("foo");
NumberPtr dialedNumber = new Number("104");
- PrivacyPtr dialedPrivacy = new Privacy(false);
- IdPtr dialedId = new Id(dialedName, dialedNumber, dialedPrivacy);
+ IdPtr dialedId = new Id(dialedName, dialedNumber, new Privacy(false));
IdSeq dialedSeq;
dialedSeq.push_back(dialedId);
mDialed = new Dialed(dialedNumber);
NamePtr redirName = new Name("scud");
NumberPtr redirNumber = new Number("666");
- PrivacyPtr redirPrivacy = new Privacy(false);
- IdPtr connectedId = new Id(redirName, redirNumber, redirPrivacy);
+
+ IdPtr connectedId = new Id(redirName, redirNumber, new Privacy(false));
IdSeq idSeq2;
idSeq2.push_back(connectedId);
mConnectedLine = new ConnectedLine(idSeq2);
RedirectionSeq redirects;
- RedirectionReasonPtr reason = new RedirectionReason(AsteriskSCF::SessionCommunications::PartyIdentification::V1::Unknown);
- RedirectionPtr redirect = new Redirection(dialedId, connectedId, reason);
+ RedirectionPtr redirect = new Redirection(dialedId, connectedId,
+ new RedirectionReason(Unavailable));
redirects.push_back(redirect);
mRedirections = new Redirections(redirects);
@@ -273,6 +291,7 @@ public:
void addListener_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_addListenerPtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const Ice::Current&)
{
@@ -283,6 +302,7 @@ public:
void indicate_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_indicatePtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::IndicationPtr& value,
const Ice::Current&)
{
@@ -352,8 +372,9 @@ public:
}
void removeListener(
- const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
- const Ice::Current&)
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
+ const Ice::Current&)
{
mListeners->removeListener(listener);
mEndpointManager->log(mId, __FUNCTION__);
@@ -364,13 +385,15 @@ public:
mEndpointManager->log(mId, __FUNCTION__);
}
- void start(const Ice::Current&)
+ void start(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::Current&)
{
mEndpointManager->log(mId, __FUNCTION__);
mListeners->connected();
}
- void stop(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
+ void stop(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
{
mEndpointManager->log(mId, __FUNCTION__);
}
@@ -394,6 +417,7 @@ public:
*/
void setBridge_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_setBridgePtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::BridgePrx& newBridge,
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const Ice::Current&)
@@ -407,6 +431,7 @@ public:
void removeBridge_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_removeBridgePtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const Ice::Current&)
{
@@ -429,14 +454,18 @@ public:
cb->ice_response(AsteriskSCF::Media::V1::StreamInformationDict());
}
- void setAndGetSessionController_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_setAndGetSessionControllerPtr& cb,
+ void setAndGetSessionController_async(
+ const AsteriskSCF::SessionCommunications::V1::AMD_Session_setAndGetSessionControllerPtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
const AsteriskSCF::SessionCommunications::V1::SessionControllerPrx&, const Ice::Current&)
{
cb->ice_response(0);
}
- void removeSessionController_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_removeSessionControllerPtr& cb,
- const AsteriskSCF::SessionCommunications::V1::SessionControllerPrx&, const Ice::Current&)
+ void removeSessionController_async(
+ const AsteriskSCF::SessionCommunications::V1::AMD_Session_removeSessionControllerPtr& cb,
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::SessionCommunications::V1::SessionControllerPrx&, const Ice::Current&)
{
cb->ice_response();
}
@@ -466,11 +495,15 @@ public:
mListeners->stopped(new AsteriskSCF::SessionCommunications::V1::ResponseCode);
}
- void setCookies(const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
+ void setCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
{
}
- void removeCookies(const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
+ void removeCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
{
}
@@ -581,10 +614,11 @@ public:
}
AsteriskSCF::SessionCommunications::V1::SessionPrx createSession(
- const std::string& destination,
- const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&,
- const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx&,
- const Ice::Current& current)
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const std::string& destination,
+ const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&,
+ const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx&,
+ const Ice::Current& current)
{
InternalSessionInfo info;
info.id = mId + "." + destination + "." + IceUtil::generateUUID();
@@ -721,23 +755,31 @@ public:
std::cerr << "Unknown id" << std::endl;
}
- void addDefaultSessionListener(const SessionListenerPrx& listener, const Ice::Current& )
+ void addDefaultSessionListener(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const SessionListenerPrx& listener, const Ice::Current& )
{
mDefaultListeners.add(listener);
}
- void removeDefaultSessionListener(const SessionListenerPrx& listener, const Ice::Current&)
+ void removeDefaultSessionListener(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const SessionListenerPrx& listener, const Ice::Current&)
{
mDefaultListeners.remove(listener);
}
- void addDefaultSessionCookies(const SessionCookies&,
- const Ice::Current&)
+ void addDefaultSessionCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const SessionCookies&,
+ const Ice::Current&)
{
}
- void removeDefaultSessionCookies(const SessionCookies&,
- const Ice::Current&)
+ void removeDefaultSessionCookies(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const SessionCookies&,
+ const Ice::Current&)
{
}
-----------------------------------------------------------------------
--
asterisk-scf/release/test_channel.git
More information about the asterisk-scf-commits
mailing list