author | zecke <zecke> | 2002-06-19 20:17:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-19 20:17:39 (UTC) |
commit | 5c56a4cb4bd0aaf3fb2145feb018f8d074a58da2 (patch) (side-by-side diff) | |
tree | 39df033332c4d8f35f8542a731697cf564a04535 | |
parent | 4c943ea6682e53c2039881aab72f6e003b78880d (diff) | |
download | opie-5c56a4cb4bd0aaf3fb2145feb018f8d074a58da2.zip opie-5c56a4cb4bd0aaf3fb2145feb018f8d074a58da2.tar.gz opie-5c56a4cb4bd0aaf3fb2145feb018f8d074a58da2.tar.bz2 |
sdptool parser
-rw-r--r-- | noncore/net/opietooth/lib/lib.pro | 6 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/services.cc | 28 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/services.h | 30 |
3 files changed, 32 insertions, 32 deletions
diff --git a/noncore/net/opietooth/lib/lib.pro b/noncore/net/opietooth/lib/lib.pro index ce36d66..72cb456 100644 --- a/noncore/net/opietooth/lib/lib.pro +++ b/noncore/net/opietooth/lib/lib.pro @@ -1,9 +1,9 @@ TEMPLATE = lib CONFIG += qte warn_on release -HEADERS = device.h manager.h remotedevice.h services.h -SOURCES = device.cc manager.cc remotedevice.cc services.cc +HEADERS = parser.h device.h manager.h remotedevice.h services.h +SOURCES = parser.cc device.cc manager.cc remotedevice.cc services.cc TARGET = opietooth -INCLUDEPATH += $(OPIEDIR)/include +INCLUDEPATH += $(OPIEDIR)/include . DESTDIR = $(QTDIR)/lib$(PROJMAK) LIBS += -lopie #VERSION = 0.0.0 diff --git a/noncore/net/opietooth/lib/services.cc b/noncore/net/opietooth/lib/services.cc index 75c1bd6..d91e4a1 100644 --- a/noncore/net/opietooth/lib/services.cc +++ b/noncore/net/opietooth/lib/services.cc @@ -4,13 +4,13 @@ using namespace OpieTooth; Services::ProfileDescriptor::ProfileDescriptor(){ } -Services::ProfileDescriptor::ProfileDescriptor(const QString &id, uint idInt, uint version ){ +Services::ProfileDescriptor::ProfileDescriptor(const QString &id, int idInt, int version ){ m_id = id; m_idInt = idInt; m_version = version; } Services::ProfileDescriptor::ProfileDescriptor( const ProfileDescriptor& rem){ (*this) = rem; @@ -18,47 +18,47 @@ Services::ProfileDescriptor::ProfileDescriptor( const ProfileDescriptor& rem){ QString Services::ProfileDescriptor::id() const { return m_id; } void Services::ProfileDescriptor::setId( const QString& id ){ m_id = id; } -void Services::ProfileDescriptor::setId(uint id ){ +void Services::ProfileDescriptor::setId(int id ){ m_idInt = id; } -uint Services::ProfileDescriptor::idInt()const{ +int Services::ProfileDescriptor::idInt()const{ return m_idInt; } -uint Services::ProfileDescriptor::version() const{ +int Services::ProfileDescriptor::version() const{ return m_version; } -void Services::ProfileDescriptor::setVersion(uint version){ +void Services::ProfileDescriptor::setVersion(int version){ m_version = version; } Services::ProfileDescriptor& Services::ProfileDescriptor::operator=( const Services::ProfileDescriptor& prof){ m_id = prof.m_id; m_idInt = prof.m_idInt; m_version = prof.m_version; return *this; } -bool operator==(const Services::ProfileDescriptor& first, +bool operator==(const Services::ProfileDescriptor& first, const Services::ProfileDescriptor& second ){ - if( (first.id() == second.id() ) && + if( (first.id() == second.id() ) && (first.version() == second.version() ) && (first.idInt() == second.idInt() ) ) return true; return false; } Services::ProtocolDescriptor::ProtocolDescriptor(){ m_number = 0; m_channel = 0; } Services::ProtocolDescriptor::ProtocolDescriptor(const QString& name, - uint number, - uint channel){ + int number, + int channel){ m_name = name; m_number = number; m_channel = channel; } Services::ProtocolDescriptor::ProtocolDescriptor( const ProtocolDescriptor& ole ){ (*this) = ole; @@ -69,34 +69,34 @@ Services::ProtocolDescriptor::~ProtocolDescriptor(){ QString Services::ProtocolDescriptor::name() const{ return m_name; } void Services::ProtocolDescriptor::setName(const QString& name ){ m_name = name; } -uint Services::ProtocolDescriptor::id()const { +int Services::ProtocolDescriptor::id()const { return m_number; } -void Services::ProtocolDescriptor::setId( uint id ){ +void Services::ProtocolDescriptor::setId( int id ){ m_number = id; } -uint Services::ProtocolDescriptor::port()const { +int Services::ProtocolDescriptor::port()const { return m_channel; } -void Services::ProtocolDescriptor::setPort( uint port ){ +void Services::ProtocolDescriptor::setPort( int port ){ m_channel = port; } Services::ProtocolDescriptor &Services::ProtocolDescriptor::operator=( const Services::ProtocolDescriptor& desc ){ m_name = desc.m_name; m_channel = desc.m_channel; m_number = desc.m_number; return *this; } bool operator==( const Services::ProtocolDescriptor &first, const Services::ProtocolDescriptor &second ){ if( ( first.name() == second.name() ) && - ( first.id() == second.id() ) && + ( first.id() == second.id() ) && ( first.port() == second.port() ) ) return true; return false; } diff --git a/noncore/net/opietooth/lib/services.h b/noncore/net/opietooth/lib/services.h index 8e9378a..65de049 100644 --- a/noncore/net/opietooth/lib/services.h +++ b/noncore/net/opietooth/lib/services.h @@ -23,13 +23,13 @@ namespace OpieTooth { /** * c'tor * @param id The id or name ("Lan Access Using PPP") * @param idInt The id as uint ( 0x1102 ) * @param version Version of the Profile ( 1 ) */ - ProfileDescriptor(const QString &id, uint idInt, uint version ); + ProfileDescriptor(const QString &id, int idInt, int version ); /** * copy c'tor */ ProfileDescriptor(const ProfileDescriptor& ); /** * returns the id @@ -38,39 +38,39 @@ namespace OpieTooth { /** * sets the id */ void setId(const QString& id); /** - * sets the uint id + * sets the int id */ - void setId(uint ); + void setId(int ); /** * reutns the id as int */ - uint idInt()const; + int idInt()const; /** * returns the version */ - uint version()const; + int version()const; /** * sets the Version */ - void setVersion(uint version ); + void setVersion(int version ); /** * copy operator */ ProfileDescriptor &operator=( const ProfileDescriptor& ); /** * operator== */ friend bool operator==(const ProfileDescriptor&, const ProfileDescriptor& ); private: QString m_id; - uint m_idInt; - uint m_version; + int m_idInt; + int m_version; }; /** * Protocol Descriptor */ class ProtocolDescriptor { public: @@ -81,28 +81,28 @@ namespace OpieTooth { ProtocolDescriptor(); /** * name * number * channel/port */ - ProtocolDescriptor(const QString&, uint, uint channel ); // Q_UINT8 ? + ProtocolDescriptor(const QString&, int, int port = -1 ); // Q_UINT8 ? ProtocolDescriptor(const ProtocolDescriptor& ); ~ProtocolDescriptor(); QString name()const; void setName(const QString& ); - uint id()const; - void setId(uint ); - uint port()const; - void setPort(uint ); + int id()const; + void setId(int ); + int port()const; + void setPort(int ); ProtocolDescriptor &operator=( const ProtocolDescriptor& ); friend bool operator==( const ProtocolDescriptor&, const ProtocolDescriptor& ); private: QString m_name; - uint m_number; - uint m_channel; + int m_number; + int m_channel; }; public: typedef QValueList<Services> ValueList; Services(); Services(const Services& service ); |