/usr/include/dclib-0.3/dclib/clistenmanager.h is in libdc-dev 0.3.24~svn3121-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | /***************************************************************************
clistenmanager.h - description
-------------------
begin : Sun Feb 29 2004
copyright : (C) 2004-2005 by Mathias Küster
email : mathen@users.berlios.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef CLISTENMANAGER_H
#define CLISTENMANAGER_H
/**
*@author Mathias Küster
*
* This is for incoming peer connections, which go to
* CDownloadManager.
*
* ConnectionWait was a counter but was not used anywhere
* and got removed.
*/
#include <dclib/dcos.h>
#include <dclib/core/cmutex.h>
#include <dclib/core/csingleton.h>
#include <dclib/core/cstring.h>
#include <dclib/core/ccallback.h>
class CListen;
class CListenManagerBase {
public:
/** */
unsigned int GetListenPort();
/** */
CString GetSocketErrorMsg() { return m_sSocketError; };
protected:
/** */
CListenManagerBase();
/** */
virtual ~CListenManagerBase();
/** called by CManager, no parameters */
int ManagerCallback();
/** called by a CListen with a socket descriptor int */
int ListenCallback( int fd );
/** A pure virtual function */
virtual _CCallback1<int> * CreateListenCallback() = 0;
/** */
_CCallback0 * m_pCallback;
/** */
bool m_bCrypto;
private:
/** */
void StartListen();
/** current used port */
unsigned int m_nListenPort;
/** socket error message */
CString m_sSocketError;
/** */
CMutex m_Mutex;
/** */
CListen * m_pListen;
};
class CListenManager : public CSingleton<CListenManager>, public CListenManagerBase {
public:
/** */
CListenManager();
/** */
virtual ~CListenManager();
protected:
/** */
virtual _CCallback1<int> * CreateListenCallback();
};
class CCryptoListenManager: public CSingleton<CCryptoListenManager>, public CListenManagerBase {
public:
/** */
CCryptoListenManager();
/** */
virtual ~CCryptoListenManager();
protected:
/** */
virtual _CCallback1<int> * CreateListenCallback();
};
#endif
|