~ubuntu-branches/debian/experimental/nzbget/experimental

« back to all changes in this revision

Viewing changes to .pc/fix_fsf_address.patch/Thread.h

  • Committer: Package Import Robot
  • Author(s): Andreas Moog
  • Date: 2013-07-18 14:50:28 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130718145028-qhxse81w1sj5w424
Tags: 11.0+dfsg-1
* New upstream release (Closes: #701896)
* Repackage original tarball to remove copies of jquery and twitter-
  bootstrap
* debian/watch: Update for new versioning scheme
* debian/patches: Remove all old patches, add one patch:
  - dont-embed-libraries.patch: Don't install embedded jquery and bootstrap 
    libraries
* debian/combat: Upgrade to debhelper combat 9
* debian/control:
  - Fix Vcs-Git field
  - Adjust debhelper version for combat level 9
  - Add jquery and bootstrap to depends for integrated webserver
  - Add python to recommends for post-processing scripts
  - Bump build-depends on libpar2-dev to support the cancel function
* debian/links:
  - Use the system jquery and bootstrap libraries
* debian/rules:
  - Add get-orig-source target to build modified upstream tarball
* Adjust sample nzbget.conf:
  - Only listen to 127.0.0.1 instead of 0.0.0.0
  - Use nzbget.conf as template for webui configuration
* Adjust sample nzbgetd init file:
  - Point to correct location of nzbget binary

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  This file is part of nzbget
3
 
 *
4
 
 *  Copyright (C) 2004 Sven Henkel <sidddy@users.sourceforge.net>
5
 
 *  Copyright (C) 2007-2009 Andrei Prygounkov <hugbug@users.sourceforge.net>
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; either version 2 of the License, or
10
 
 *  (at your option) any later version.
11
 
 *
12
 
 *  This program is distributed in the hope that it will be useful,
13
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 *  GNU General Public License for more details.
16
 
 *
17
 
 *  You should have received a copy of the GNU General Public License
18
 
 *  along with this program; if not, write to the Free Software
19
 
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
 
 *
21
 
 * $Revision: 323 $
22
 
 * $Date: 2009-05-27 23:09:08 +0200 (Wed, 27 May 2009) $
23
 
 *
24
 
 */
25
 
 
26
 
 
27
 
#ifndef THREAD_H
28
 
#define THREAD_H
29
 
 
30
 
class Mutex
31
 
{
32
 
private:
33
 
        void*                                   m_pMutexObj;
34
 
        
35
 
public:
36
 
                                                        Mutex();
37
 
                                                        ~Mutex();
38
 
        void                                    Lock();
39
 
        void                                    Unlock();
40
 
};
41
 
 
42
 
 
43
 
class Thread
44
 
{
45
 
private:
46
 
        static Mutex*                   m_pMutexThread;
47
 
        static int                              m_iThreadCount;
48
 
        void*                                   m_pThreadObj;
49
 
        bool                                    m_bRunning;
50
 
        bool                                    m_bStopped;
51
 
        bool                                    m_bAutoDestroy;
52
 
 
53
 
#ifdef WIN32
54
 
        static void __cdecl     thread_handler(void* pObject);
55
 
#else
56
 
        static void                             *thread_handler(void* pObject);
57
 
#endif
58
 
 
59
 
public:
60
 
                                                        Thread();
61
 
        virtual                                 ~Thread();
62
 
        static void                             Init();
63
 
        static void                             Final();
64
 
 
65
 
        virtual void                    Start();
66
 
        virtual void                    Stop();
67
 
        bool                                    Kill();
68
 
 
69
 
        bool                                    IsStopped() { return m_bStopped; };
70
 
        bool                                    IsRunning()     const { return m_bRunning; }
71
 
        void                                    SetRunning(bool bOnOff) { m_bRunning = bOnOff; }
72
 
        bool                                    GetAutoDestroy() { return m_bAutoDestroy; }
73
 
        void                                    SetAutoDestroy(bool bAutoDestroy) { m_bAutoDestroy = bAutoDestroy; }
74
 
        static int                              GetThreadCount();
75
 
 
76
 
protected:
77
 
        virtual void                    Run() {}; // Virtual function - override in derivatives
78
 
};
79
 
 
80
 
#endif