summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 12:05:29 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 12:05:29 -0600
commit61dfcc04f73e45082f51945a7b98b7838da56da8 (patch)
tree31ba95662c5972ef74abc64e4404e7e20e2f498e /lib
parent941d8c3b969eae32b0945987f1d849930736f5bb (diff)
downloadulab-61dfcc04f73e45082f51945a7b98b7838da56da8.tar.gz
ulab-61dfcc04f73e45082f51945a7b98b7838da56da8.zip
User management console now functional
Diffstat (limited to 'lib')
-rw-r--r--lib/libtqtrla/src/tqtrla.cpp144
-rw-r--r--lib/libtqtrla/src/tqtrla.h62
2 files changed, 198 insertions, 8 deletions
diff --git a/lib/libtqtrla/src/tqtrla.cpp b/lib/libtqtrla/src/tqtrla.cpp
index 4434a3d..50cb025 100644
--- a/lib/libtqtrla/src/tqtrla.cpp
+++ b/lib/libtqtrla/src/tqtrla.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012 by Timothy Pearson *
+ * Copyright (C) 2012-2013 by Timothy Pearson *
* kb9vqf@pearsoncomputing.net *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -463,6 +463,29 @@ TQDataStream &operator>>( TQDataStream &s, StationType &st )
return s;
}
+StationList::StationList() : TQValueList<StationType>() {
+ //
+}
+
+StationList::~StationList() {
+ //
+}
+
+/*!
+ \relates StationType
+
+ Finds a StationType with ID \a id in this list.
+*/
+StationList::iterator StationList::findByID(TQ_UINT32 id) {
+ StationList::iterator it;
+ for (it = begin(); it != end(); ++it) {
+ if ((*it).id == id) {
+ break;
+ }
+ }
+ return it;
+}
+
/*!
\relates SensorType
@@ -508,7 +531,7 @@ TQDataStream &operator>>( TQDataStream &s, SensorType &st )
/*!
\relates TerminalServiceStatusType
- Writes the TerminalServiceStatusType \a str to the stream \a s.
+ Writes the TerminalServiceStatusType \a st to the stream \a s.
See also \link datastreamformat.html Format of the TQDataStream operators \endlink
*/
@@ -531,7 +554,7 @@ TQDataStream &operator<<( TQDataStream &s, const TerminalServiceStatusType &st )
/*!
\relates SensorType
- Reads a SensorType from the stream \a s into SensorType \a str.
+ Reads a TerminalServiceStatusType from the stream \a s into TerminalServiceStatusType \a st.
See also \link datastreamformat.html Format of the TQDataStream operators \endlink
*/
@@ -554,7 +577,7 @@ TQDataStream &operator>>( TQDataStream &s, TerminalServiceStatusType &st )
/*!
\relates WorkspaceServiceStatusType
- Writes the WorkspaceServiceStatusType \a str to the stream \a s.
+ Writes the WorkspaceServiceStatusType \a st to the stream \a s.
See also \link datastreamformat.html Format of the TQDataStream operators \endlink
*/
@@ -575,9 +598,9 @@ TQDataStream &operator<<( TQDataStream &s, const WorkspaceServiceStatusType &st
}
/*!
- \relates SensorType
+ \relates WorkspaceServiceStatusType
- Reads a SensorType from the stream \a s into SensorType \a str.
+ Reads a WorkspaceServiceStatusType from the stream \a s into WorkspaceServiceStatusType \a st.
See also \link datastreamformat.html Format of the TQDataStream operators \endlink
*/
@@ -596,5 +619,114 @@ TQDataStream &operator>>( TQDataStream &s, WorkspaceServiceStatusType &st )
s >> st.terminateStamp;
return s;
}
+
+/*!
+ \relates TerminalServiceAuthGroupType
+
+ Writes the TerminalServiceAuthGroupType \a agt to the stream \a s.
+
+ See also \link datastreamformat.html Format of the TQDataStream operators \endlink
+*/
+
+TQDataStream &operator<<( TQDataStream &s, const TerminalServiceAuthGroupType &agt )
+{
+ s << agt.protocolVersion;
+ s << agt.groupName;
+ s << agt.allowedServerNames;
+ return s;
+}
+
+/*!
+ \relates TerminalServiceAuthGroupType
+
+ Reads a TerminalServiceAuthGroupType from the stream \a s into TerminalServiceAuthGroupType \a agt.
+
+ See also \link datastreamformat.html Format of the TQDataStream operators \endlink
+*/
+
+TQDataStream &operator>>( TQDataStream &s, TerminalServiceAuthGroupType &agt )
+{
+ s >> agt.protocolVersion;
+ s >> agt.groupName;
+ s >> agt.allowedServerNames;
+ return s;
+}
+
+/*!
+ \relates WorkspaceServiceAuthGroupType
+
+ Writes the WorkspaceServiceAuthGroupType \a agt to the stream \a s.
+
+ See also \link datastreamformat.html Format of the TQDataStream operators \endlink
+*/
+
+TQDataStream &operator<<( TQDataStream &s, const WorkspaceServiceAuthGroupType &agt )
+{
+ s << agt.protocolVersion;
+ s << agt.groupName;
+ s << agt.allowedStationIDs;
+ return s;
+}
+
+/*!
+ \relates WorkspaceServiceAuthGroupType
+
+ Reads a WorkspaceServiceAuthGroupType from the stream \a s into WorkspaceServiceAuthGroupType \a agt.
+
+ See also \link datastreamformat.html Format of the TQDataStream operators \endlink
+*/
+
+TQDataStream &operator>>( TQDataStream &s, WorkspaceServiceAuthGroupType &agt )
+{
+ s >> agt.protocolVersion;
+ s >> agt.groupName;
+ s >> agt.allowedStationIDs;
+ return s;
+}
#endif // QT_NO_DATASTREAM
+TerminalServiceAuthGroupList::TerminalServiceAuthGroupList() : TQValueList<TerminalServiceAuthGroupType>() {
+ //
+}
+
+TerminalServiceAuthGroupList::~TerminalServiceAuthGroupList() {
+ //
+}
+
+/*!
+ \relates WorkspaceServiceAuthGroupType
+
+ Finds a WorkspaceServiceAuthGroupType with group name \a name in this list.
+*/
+TerminalServiceAuthGroupList::iterator TerminalServiceAuthGroupList::findByName(TQString name) {
+ TerminalServiceAuthGroupList::iterator it;
+ for (it = begin(); it != end(); ++it) {
+ if ((*it).groupName == name) {
+ break;
+ }
+ }
+ return it;
+}
+
+WorkspaceServiceAuthGroupList::WorkspaceServiceAuthGroupList() : TQValueList<WorkspaceServiceAuthGroupType>() {
+ //
+}
+
+WorkspaceServiceAuthGroupList::~WorkspaceServiceAuthGroupList() {
+ //
+}
+
+/*!
+ \relates WorkspaceServiceAuthGroupType
+
+ Finds a WorkspaceServiceAuthGroupType with group name \a name in this list.
+*/
+WorkspaceServiceAuthGroupList::iterator WorkspaceServiceAuthGroupList::findByName(TQString name) {
+ WorkspaceServiceAuthGroupList::iterator it;
+ for (it = begin(); it != end(); ++it) {
+ if ((*it).groupName == name) {
+ break;
+ }
+ }
+ return it;
+} \ No newline at end of file
diff --git a/lib/libtqtrla/src/tqtrla.h b/lib/libtqtrla/src/tqtrla.h
index 64a8ef5..b649c4d 100644
--- a/lib/libtqtrla/src/tqtrla.h
+++ b/lib/libtqtrla/src/tqtrla.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012 by Timothy Pearson *
+ * Copyright (C) 2012-2013 by Timothy Pearson *
* kb9vqf@pearsoncomputing.net *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -165,7 +165,15 @@ Q_EXPORT TQDataStream &operator<<(TQDataStream &, const StationType &);
Q_EXPORT TQDataStream &operator>>(TQDataStream &, StationType &);
#endif
-typedef TQValueList<StationType> StationList;
+class StationList : public TQValueList<StationType>
+{
+ public:
+ StationList();
+ virtual ~StationList();
+
+ public:
+ StationList::iterator findByID(TQ_UINT32 id);
+};
// =============================================================================
@@ -239,4 +247,54 @@ typedef TQValueList<WorkspaceServiceStatusType> WorkspaceServiceStatusList;
// =============================================================================
+class TerminalServiceAuthGroupType
+{
+ public:
+ TQ_UINT32 protocolVersion;
+ TQString groupName;
+ TQStringList allowedServerNames;
+};
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<(TQDataStream &, const TerminalServiceAuthGroupType &);
+Q_EXPORT TQDataStream &operator>>(TQDataStream &, TerminalServiceAuthGroupType &);
+#endif
+
+class TerminalServiceAuthGroupList : public TQValueList<TerminalServiceAuthGroupType>
+{
+ public:
+ TerminalServiceAuthGroupList();
+ virtual ~TerminalServiceAuthGroupList();
+
+ public:
+ TerminalServiceAuthGroupList::iterator findByName(TQString name);
+};
+
+// =============================================================================
+
+class WorkspaceServiceAuthGroupType
+{
+ public:
+ TQ_UINT32 protocolVersion;
+ TQString groupName;
+ TQInt32List allowedStationIDs;
+};
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<(TQDataStream &, const WorkspaceServiceAuthGroupType &);
+Q_EXPORT TQDataStream &operator>>(TQDataStream &, WorkspaceServiceAuthGroupType &);
+#endif
+
+class WorkspaceServiceAuthGroupList : public TQValueList<WorkspaceServiceAuthGroupType>
+{
+ public:
+ WorkspaceServiceAuthGroupList();
+ virtual ~WorkspaceServiceAuthGroupList();
+
+ public:
+ WorkspaceServiceAuthGroupList::iterator findByName(TQString name);
+};
+
+// =============================================================================
+
#endif // TQTRLA_H \ No newline at end of file