source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/UpperTestAdapter/TriggerCommandsGUI/CheckNewMediaAdded.cpp @ 48

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