source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/UpperTestAdapter/TriggerCommandsOffLine/CheckNewMediaAdded.cpp

Last change on this file was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#include "CheckNewMediaAdded.h"
2#include <sstream>
3#include <iostream>
4
5#include "Logger/Logger.h"
6
7using namespace std;
8using namespace boost;
9
10namespace UpperTestAdapter {
11 
12namespace Processors {
13 
14namespace TriggerCommandsOffLine {
15 
16string CheckNewMediaAdded::CheckNewMediaAddedId = "UE_CHECK_NEW_MEDIA_STREAM_IS_ADDED";
17
18CheckNewMediaAdded::CheckNewMediaAdded()
19{
20  m_successor.reset();
21}
22
23CheckNewMediaAdded::CheckNewMediaAdded(boost::shared_ptr<EutIPInterface> eutIface)
24{
25  CheckNewMediaAdded();
26  m_eutIface = eutIface;
27}
28
29CheckNewMediaAdded::~CheckNewMediaAdded()
30{
31  Logger::Instance().LogInfo("CheckNewMediaAdded::~CheckNewMediaAdded");
32  m_successor.reset();
33}
34
35int CheckNewMediaAdded::Process(const string &trigger, const vector<string> &parameterList)
36{
37  stringstream ss;
38  // Process the command.
39  if (trigger == CheckNewMediaAdded::CheckNewMediaAddedId)
40  {
41    ss << "CheckNewMediaAdded::Process: " << trigger;
42    Logger::Instance().LogDebug(ss.str());
43   
44    return 0; // See TTCN-3 FncRetCode
45  }
46  else if (m_successor.get() != NULL)
47  {
48    ss << "CheckNewMediaAdded::Not supported command: " << trigger;
49    Logger::Instance().LogInfo(ss.str());
50    return m_successor.get()->Process(trigger, parameterList);
51  }
52
53  return 1; // See TTCN-3 FncRetCode
54}
55
56void CheckNewMediaAdded::SetSuccessor(boost::shared_ptr<UpperTestAdapter::Processors::TriggerCommandsImpl> successor)
57{
58  m_successor = successor;
59};
60} } } // namespaces
61
Note: See TracBrowser for help on using the repository browser.