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

« back to all changes in this revision

Viewing changes to .pc/fix_fsf_address.patch/Scanner.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) 2007-2010 Andrei Prygounkov <hugbug@users.sourceforge.net>
5
 
 *
6
 
 *  This program is free software; you can redistribute it and/or modify
7
 
 *  it under the terms of the GNU General Public License as published by
8
 
 *  the Free Software Foundation; either version 2 of the License, or
9
 
 *  (at your option) any later version.
10
 
 *
11
 
 *  This program is distributed in the hope that it will be useful,
12
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *  GNU General Public License for more details.
15
 
 *
16
 
 *  You should have received a copy of the GNU General Public License
17
 
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
 
 *
20
 
 * $Revision: 378 $
21
 
 * $Date: 2010-01-29 10:34:44 +0100 (Fri, 29 Jan 2010) $
22
 
 *
23
 
 */
24
 
 
25
 
 
26
 
#ifndef SCANNER_H
27
 
#define SCANNER_H
28
 
 
29
 
#include <deque>
30
 
#include <time.h>
31
 
#include "DownloadInfo.h"
32
 
 
33
 
class Scanner
34
 
{
35
 
private:
36
 
        class FileData
37
 
        {
38
 
        private:
39
 
                char*                   m_szFilename;
40
 
                long long               m_iSize;
41
 
                time_t                  m_tLastChange;
42
 
 
43
 
        public:
44
 
                                                FileData(const char* szFilename);
45
 
                                                ~FileData();
46
 
                const char*             GetFilename() { return m_szFilename; }
47
 
                long long               GetSize() { return m_iSize; }
48
 
                void                    SetSize(long long lSize) { m_iSize = lSize; }
49
 
                time_t                  GetLastChange() { return m_tLastChange; }
50
 
                void                    SetLastChange(time_t tLastChange) { m_tLastChange = tLastChange; }
51
 
        };
52
 
 
53
 
        typedef std::deque<FileData*>           FileList;
54
 
 
55
 
        bool                            m_bRequestedNZBDirScan;
56
 
        int                                     m_iNZBDirInterval;
57
 
        bool                            m_bNZBScript;
58
 
        int                                     m_iPass;
59
 
        int                                     m_iStepMSec;
60
 
        FileList                        m_FileList;
61
 
 
62
 
        void                            CheckIncomingNZBs(const char* szDirectory, const char* szCategory, bool bCheckStat);
63
 
        void                            AddFileToQueue(const char* szFilename, const char* szCategory, NZBParameterList* pParameterList);
64
 
        void                            ProcessIncomingFile(const char* szDirectory, const char* szBaseFilename, const char* szFullFilename, const char* szCategory);
65
 
        bool                            CanProcessFile(const char* szFullFilename, bool bCheckStat);
66
 
        void                            DropOldFiles();
67
 
 
68
 
public:
69
 
                                                Scanner();
70
 
                                                ~Scanner();
71
 
        void                            SetStepInterval(int iStepMSec) { m_iStepMSec = iStepMSec; }
72
 
        void                            ScanNZBDir();
73
 
        void                            Check();
74
 
};
75
 
 
76
 
#endif