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

« back to all changes in this revision

Viewing changes to ArticleDownloader.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:
2
2
 *  This file is part of nzbget
3
3
 *
4
4
 *  Copyright (C) 2004 Sven Henkel <sidddy@users.sourceforge.net>
5
 
 *  Copyright (C) 2007-2009 Andrei Prygounkov <hugbug@users.sourceforge.net>
 
5
 *  Copyright (C) 2007-2009 Andrey Prygunkov <hugbug@users.sourceforge.net>
6
6
 *
7
7
 *  This program is free software; you can redistribute it and/or modify
8
8
 *  it under the terms of the GNU General Public License as published by
18
18
 *  along with this program; if not, write to the Free Software
19
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
20
 *
21
 
 * $Revision: 326 $
22
 
 * $Date: 2009-05-31 00:09:41 +0200 (Sun, 31 May 2009) $
 
21
 * $Revision: 695 $
 
22
 * $Date: 2013-05-26 22:42:15 +0200 (Sun, 26 May 2013) $
23
23
 *
24
24
 */
25
25
 
42
42
        {
43
43
                adUndefined,
44
44
                adRunning,
 
45
                adWaiting,
45
46
                adFinished,
46
47
                adFailed,
47
48
                adRetry,
48
 
                adDecodeError,
49
49
                adCrcError,
50
50
                adDecoding,
51
51
                adJoining,
76
76
        EStatus                         Download();
77
77
        bool                            Write(char* szLine, int iLen);
78
78
        bool                            PrepareFile(char* szLine);
 
79
        bool                            CreateOutputFile(int iSize);
 
80
        void                            BuildOutputFilename();
79
81
        EStatus                         DecodeCheck();
80
82
        void                            FreeConnection(bool bKeepConnected);
81
83
        EStatus                         CheckResponse(const char* szResponse, const char* szComment);
 
84
        void                            SetStatus(EStatus eStatus) { m_eStatus = eStatus; }
 
85
        const char*             GetTempFilename() { return m_szTempFilename; }
 
86
        void                            SetTempFilename(const char* v);
 
87
        void                            SetOutputFilename(const char* v);
82
88
 
83
89
public:
84
90
                                                ArticleDownloader();
87
93
        FileInfo*                       GetFileInfo() { return m_pFileInfo; }
88
94
        void                            SetArticleInfo(ArticleInfo* pArticleInfo) { m_pArticleInfo = pArticleInfo; }
89
95
        ArticleInfo*            GetArticleInfo() { return m_pArticleInfo; }
90
 
        void                            SetStatus(EStatus eStatus);
91
96
        EStatus                         GetStatus() { return m_eStatus; }
92
97
        virtual void            Run();
93
98
        virtual void            Stop();
94
99
        bool                            Terminate();
95
100
        time_t                          GetLastUpdateTime() { return m_tLastUpdateTime; }
96
101
        void                            SetLastUpdateTimeNow() { m_tLastUpdateTime = ::time(NULL); }
97
 
        const char*             GetTempFilename() { return m_szTempFilename; }
98
 
        void                            SetTempFilename(const char* v);
99
 
        void                            SetOutputFilename(const char* v);
100
102
        const char*             GetArticleFilename() { return m_szArticleFilename; }
101
103
        void                            SetInfoName(const char* v);
102
104
        const char*                     GetInfoName() { return m_szInfoName; }
111
113
{
112
114
public:
113
115
        virtual                         ~DownloadSpeedMeter() {};
114
 
        virtual float           CalcCurrentDownloadSpeed() = 0;
 
116
        virtual int                     CalcCurrentDownloadSpeed() = 0;
115
117
        virtual void            AddSpeedReading(int iBytes) = 0;
116
118
};
117
119