00001 #pragma once 00002 00003 // QStreamer 00004 // A GStreamer replacement for Qt. 00005 // 00006 // Authors : 00007 // Darren R. Starr <submux at gmail dot com> 00008 // 00009 // Copyright : 2010 The QStreamer Project 00010 // License : BSD (until we're informed that we're in violation of some other license) 00011 // Donations : Appreciated and possible through SourceForge donation page. 00012 // 00013 // All code included in this project can be used freely in whatever way the user feels fit. 00014 // If you want to take it, close it and be a weasel that doesn't even contribute back patches, 00015 // so be it. Patches are however appreciated. Wrappers for other open source components are 00016 // also appreciated. 00017 // 00018 // If you wish to be nice to us so we can see how our code is being used. Drop us a mail and let us 00019 // know you're using it in your project. 00020 // 00021 // Support : By default the support is "you get what you pay for". Paid nothing, there's no implied 00022 // requirement to support you. On the other hand, some project developers are likely to 00023 // make fixes, changes, features on request or contract. 00024 // 00025 // Enjoy 00026 00027 #include <QtCore/QString> 00028 00029 namespace QStreamer 00030 { 00041 class QPin 00042 { 00043 friend class QPinList; 00044 00045 public: 00047 enum Direction 00048 { 00049 Source, 00050 Sink 00051 }; 00052 00054 ~QPin(); 00055 00057 Direction direction() const; 00058 00060 const QString &name() const; 00061 00063 const class QElement *parent() const; 00064 00066 class QElement *parent(); 00067 00068 protected: 00076 QPin(Direction direction, const QString &name, class QElement *parent); 00077 00079 class QMediaError &error(); 00080 00085 void setParent(QElement *parent); 00086 00087 private: 00088 Direction m_direction; 00089 QString m_name; 00090 class QElement *m_parent; 00091 }; 00092 00093 inline QPin::QPin(Direction direction, const QString &name, class QElement *parent) : 00094 m_direction(direction), 00095 m_name(name), 00096 m_parent(parent) 00097 { 00098 } 00099 00100 inline QPin::~QPin() 00101 { 00102 } 00103 00104 inline QPin::Direction QPin::direction() const 00105 { 00106 return m_direction; 00107 } 00108 00109 inline const QString &QPin::name() const 00110 { 00111 return m_name; 00112 } 00113 00114 inline const class QElement *QPin::parent() const 00115 { 00116 return m_parent; 00117 } 00118 00119 inline class QElement *QPin::parent() 00120 { 00121 return m_parent; 00122 } 00123 }