00001
00002
00003
00004
00005
00006
00007
00008
00010
00011 #ifndef __UPNPTASKSEARCH_H__
00012 #define __UPNPTASKSEARCH_H__
00013
00014
00015 #include <sys/types.h>
00016 #ifndef USING_MINGW
00017 #include <netinet/in.h>
00018 #include <arpa/inet.h>
00019 #endif
00020
00021
00022 #include <qsocketdevice.h>
00023
00024
00025 #include "upnp.h"
00026 #include "compat.h"
00027
00030
00031
00032
00035
00036 class UPnpSearchTask : public Task
00037 {
00038 protected:
00039
00040 QStringList m_addressList;
00041 int m_nServicePort;
00042 int m_nMaxAge;
00043
00044 QHostAddress m_PeerAddress;
00045 int m_nPeerPort;
00046 QString m_sST;
00047 QString m_sUDN;
00048
00049
00050 protected:
00051
00052
00053
00054 virtual ~UPnpSearchTask();
00055
00056 void ProcessDevice ( QSocketDevice *pSocket, UPnpDevice *pDevice );
00057 void SendMsg ( QSocketDevice *pSocket,
00058 QString sST,
00059 QString sUDN );
00060
00061 public:
00062
00063 UPnpSearchTask( int nServicePort,
00064 QHostAddress peerAddress,
00065 int nPeerPort,
00066 QString sST,
00067 QString sUDN );
00068
00069 virtual QString Name () { return( "Search" ); }
00070 virtual void Execute( TaskQueue * );
00071
00072 };
00073
00074
00075 #endif