00001 /*************************************************************************** 00002 ** 00003 ** This file is part of GeopsySLink. 00004 ** 00005 ** This file may be distributed and/or modified under the terms of the 00006 ** GNU General Public License version 2 or 3 as published by the Free 00007 ** Software Foundation and appearing in the file LICENSE.GPL included 00008 ** in the packaging of this file. 00009 ** 00010 ** This file is distributed in the hope that it will be useful, but WITHOUT 00011 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 ** more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 ** 00018 ** See http://www.geopsy.org for more information. 00019 ** 00020 ** Created : 2007-04-24 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (LGIT, Grenoble, France) 00024 ** 00025 ***************************************************************************/ 00026 00027 #ifndef SEEDLINKSERVER_H 00028 #define SEEDLINKSERVER_H 00029 00030 #include <QGpCoreTools.h> 00031 #include <GeopsyCore.h> 00032 #include "GeopsySLinkDLLExport.h" 00033 00034 namespace GeopsySLink { 00035 00036 class SeedLinkStation; 00037 00038 class GEOPSYSLINK_EXPORT SeedLinkServer : public XMLClass, private QList<SeedLinkStation *> 00039 { 00040 public: 00041 ~SeedLinkServer(); 00042 00043 virtual const QString& xml_tagName() const {return xmlSeedLinkServerTag;} 00044 static const QString xmlSeedLinkServerTag; 00045 00046 virtual void xml_attributes(XML_ATTRIBUTES_ARGS) const; 00047 virtual bool xml_setAttributes(XML_SETATTRIBUTES_ARGS); 00048 00049 QString software() const {return _software;} 00050 QString organization() const {return _organization;} 00051 QString beginTime() const {return _beginTime;} 00052 00053 void addStation(SeedLinkStation * station) {append(station);} 00054 int indexOf(SeedLinkStation * station) const {return QList<SeedLinkStation *>::indexOf(station);} 00055 QList<int> indexOf(QRegExp networkStation) const; 00056 const SeedLinkStation * at(int index) const {return QList<SeedLinkStation *>::at(index);} 00057 int count() const {return QList<SeedLinkStation *>::count();} 00058 void clear(); 00059 00060 SubSignalPool allSignals() const; 00061 protected: 00062 virtual void xml_writeChildren(XML_WRITECHILDREN_ARGS) const; 00063 virtual XMLMember xml_member(XML_MEMBER_ARGS); 00064 virtual void xml_polish(XML_POLISH_ARGS); 00065 private: 00066 QString _software; 00067 QString _organization; 00068 QString _beginTime; 00069 }; 00070 00071 00072 } // namespace GeopsySLink 00073 00074 #endif // SEEDLINKSERVER_H