summaryrefslogblamecommitdiffstats
path: root/src/net/pvsServiceBroadcast.h
blob: a23370fb28cd18ab7138e5a16d219e960dba0df9 (plain) (tree)








































                                                                                
                                   



                                    
/*
# Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
#
# If you have any feedback please consult http://openslx.org/feedback and
# send your suggestions, praise, or complaints to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
# src/net/pvsServiceBroadcast.cpp
#    - broadcast sessionname, port, auth/encryption
# -----------------------------------------------------------------------------
*/

#ifndef PVSSERVICEBROADCAST_H_
#define PVSSERVICEBROADCAST_H_

#include <QtCore/QString>
#include <QtCore/QObject>
#include <QtNetwork/QUdpSocket>
#include "src/net/pvsMsg.h"

class PVSMsg;

class PVSServiceBroadcast : public QObject
{
    Q_OBJECT

public:
    PVSServiceBroadcast();
    virtual ~PVSServiceBroadcast();
    void setFingerprint(QByteArray sha1);

protected:
    void timerEvent(QTimerEvent *event);

private:
    QByteArray *_announce;
    QUdpSocket _broadcaster;
    QList<QHostAddress> _everyone;
    int _timer;
};

#endif /* PVSSERVICEBROADCAST_H_ */