~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to include/widgets/CBroadcastDiscoveryWidget.h

  • Committer: Nathan Osman
  • Date: 2012-06-29 22:01:55 UTC
  • Revision ID: admin@quickmediasolutions.com-20120629220155-ogwrn9fxxve9wyw1
Moved a TON of the broadcast and discovery code around, creating separate classes for each and partially implementing their use in the first start wizard.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#ifndef CBROADCASTDISCOVERYWIDGET_H
18
18
#define CBROADCASTDISCOVERYWIDGET_H
19
19
 
 
20
#include <QList>
20
21
#include <QWidget>
21
22
 
 
23
#include <discovery/CBasicBroadcaster.h>
 
24
#include <discovery/CBasicListener.h>
 
25
 
22
26
namespace Ui {
23
27
    class CBroadcastDiscoveryWidget;
24
28
}
30
34
    public:
31
35
 
32
36
        CBroadcastDiscoveryWidget(QWidget *);
33
 
        ~CBroadcastDiscoveryWidget();
 
37
        virtual ~CBroadcastDiscoveryWidget();
 
38
 
 
39
        void StartBroadcasting();
 
40
        void StopBroadcasting();
 
41
 
 
42
    signals:
 
43
 
 
44
        // TODO: signal indicating we received something.
 
45
 
 
46
    private slots:
 
47
 
 
48
        void OnPing(QHostAddress);
34
49
        
35
50
    private:
36
51
 
37
52
        Ui::CBroadcastDiscoveryWidget * ui;
 
53
 
 
54
        /* This list contains a bunch of broadcasters that continually
 
55
           send broadcast packets over all available network interfaces. */
 
56
        QList<CBasicBroadcaster *> m_broadcasters;
 
57
 
 
58
        /* ...and we use this listener to catch any incoming pings. */
 
59
        CBasicListener * m_listener;
38
60
};
39
61
 
40
62
#endif // CBROADCASTDISCOVERYWIDGET_H