cec: added GetPortName() to CUSBCECAdapterCommunication
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 15 Feb 2012 18:38:14 +0000 (19:38 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 15 Feb 2012 18:38:14 +0000 (19:38 +0100)
src/lib/adapter/AdapterCommunication.h
src/lib/adapter/USBCECAdapterCommunication.cpp
src/lib/adapter/USBCECAdapterCommunication.h

index c169e169d3ae7c024f7bd75b2b9517a8e73cad06..98ecd2e2a975c378756959799386f8cb396dc0b6 100644 (file)
@@ -143,5 +143,10 @@ namespace CEC
      * @return True when the configuration was persisted, false otherwise.
      */
     virtual bool PersistConfiguration(libcec_configuration *configuration) = 0;
+
+    /*!
+     * @return The name of the port
+     */
+    virtual CStdString GetPortName(void) = 0;
   };
 };
index e5cedb8b03e99d07652018813b0ef180c4666fb6..7037c78eff960357f2842e3f8cd5a154dfcb61cb 100644 (file)
@@ -707,3 +707,10 @@ void CUSBCECAdapterCommunication::WriteNextCommand(void)
   if (m_outBuffer.Pop(msg))
     SendMessageToAdapter(msg);
 }
+
+CStdString CUSBCECAdapterCommunication::GetPortName(void)
+{
+  CStdString strName;
+  strName = m_port->GetName();
+  return strName;
+}
index d2de30e17447c7f41e15b895dd5ee5aa73af4613..3a9ba515d02be277bd7356855e513ae7c82bf7c6 100644 (file)
@@ -67,6 +67,7 @@ namespace CEC
     virtual uint16_t GetFirmwareVersion(void);
     virtual bool SetControlledMode(bool controlled);
     virtual bool PersistConfiguration(libcec_configuration * UNUSED(configuration)) { return false; } // TODO
+    virtual CStdString GetPortName(void);
 
     void *Process(void);
   private: