~ubuntu-branches/ubuntu/trusty/nzbget/trusty

« back to all changes in this revision

Viewing changes to QueueEditor.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-48qbia23dx6sg8u1
Tags: 11.0+dfsg-0ubuntu1
* 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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  This file if part of nzbget
3
3
 *
4
 
 *  Copyright (C) 2007-2009 Andrei Prygounkov <hugbug@users.sourceforge.net>
 
4
 *  Copyright (C) 2007-2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  along with this program; if not, write to the Free Software
18
18
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
19
 *
20
 
 * $Revision: 311 $
21
 
 * $Date: 2009-05-03 19:14:52 +0200 (So, 03 Mai 2009) $
 
20
 * $Revision: 617 $
 
21
 * $Date: 2013-04-06 22:54:00 +0200 (Sat, 06 Apr 2013) $
22
22
 *
23
23
 */
24
24
 
43
43
                eaFileDelete,
44
44
                eaFilePauseAllPars,
45
45
                eaFilePauseExtraPars,
 
46
                eaFileSetPriority,
 
47
                eaFileReorder,
 
48
                eaFileSplit,
46
49
                eaGroupMoveOffset,                              // move to m_iOffset relative to the current position in queue
47
50
                eaGroupMoveTop,
48
51
                eaGroupMoveBottom,
51
54
                eaGroupDelete,
52
55
                eaGroupPauseAllPars,
53
56
                eaGroupPauseExtraPars,
 
57
                eaGroupSetPriority,
54
58
                eaGroupSetCategory,
55
59
                eaGroupMerge,
56
 
                eaGroupSetParameter
 
60
                eaGroupSetParameter,
 
61
                eaGroupSetName
 
62
        };
 
63
 
 
64
        enum EMatchMode
 
65
        {
 
66
                mmID = 1,
 
67
                mmName,
 
68
                mmRegEx
57
69
        };
58
70
 
59
71
private:
74
86
        int                                             FindFileInfoEntry(DownloadQueue* pDownloadQueue, FileInfo* pFileInfo);
75
87
        bool                                    InternEditList(DownloadQueue* pDownloadQueue, IDList* pIDList, bool bSmartOrder, EEditAction eAction, int iOffset, const char* szText);
76
88
        void                                    PrepareList(DownloadQueue* pDownloadQueue, ItemList* pItemList, IDList* pIDList, bool bSmartOrder, EEditAction eAction, int iOffset);
77
 
        bool                                    EditGroup(DownloadQueue* pDownloadQueue, FileInfo* pFileInfo, EEditAction eAction, int iOffset);
 
89
        bool                                    BuildIDListFromNameList(DownloadQueue* pDownloadQueue, IDList* pIDList, NameList* pNameList, EMatchMode eMatchMode, EEditAction eAction);
 
90
        bool                                    EditGroup(DownloadQueue* pDownloadQueue, FileInfo* pFileInfo, EEditAction eAction, int iOffset, const char* szText);
78
91
        void                                    BuildGroupList(DownloadQueue* pDownloadQueue, FileList* pGroupList);
79
92
        void                                    AlignAffectedGroups(DownloadQueue* pDownloadQueue, IDList* pIDList, bool bSmartOrder, int iOffset);
80
93
        bool                                    ItemExists(FileList* pFileList, FileInfo* pFileInfo);
81
 
        void                                    AlignGroup(DownloadQueue* pDownloadQueue, FileInfo* pFirstFileInfo);
 
94
        void                                    AlignGroup(DownloadQueue* pDownloadQueue, NZBInfo* pNZBInfo);
82
95
        void                                    PauseParsInGroups(ItemList* pItemList, bool bExtraParsOnly);
83
96
        void                                    PausePars(FileList* pFileList, bool bExtraParsOnly);
84
97
        void                                    SetNZBCategory(NZBInfo* pNZBInfo, const char* szCategory);
 
98
        void                                    SetNZBName(NZBInfo* pNZBInfo, const char* szName);
85
99
        bool                                    CanCleanupDisk(DownloadQueue* pDownloadQueue, NZBInfo* pNZBInfo);
86
 
        void                                    MergeGroups(DownloadQueue* pDownloadQueue, ItemList* pItemList);
 
100
        bool                                    MergeGroups(DownloadQueue* pDownloadQueue, ItemList* pItemList);
 
101
        bool                                    SplitGroup(DownloadQueue* pDownloadQueue, ItemList* pItemList, const char* szName);
 
102
        void                                    ReorderFiles(DownloadQueue* pDownloadQueue, ItemList* pItemList);
87
103
        void                                    SetNZBParameter(NZBInfo* pNZBInfo, const char* szParamString);
88
104
 
89
105
        void                                    PauseUnpauseEntry(FileInfo* pFileInfo, bool bPause);
90
106
        void                                    DeleteEntry(FileInfo* pFileInfo);
91
107
        void                                    MoveEntry(DownloadQueue* pDownloadQueue, FileInfo* pFileInfo, int iOffset);
 
108
        void                                    SetPriorityEntry(FileInfo* pFileInfo, const char* szPriority);
92
109
 
93
110
public:
94
111
                                                        QueueEditor();                
95
112
                                                        ~QueueEditor();
96
113
 
97
114
        bool                                    EditEntry(int ID, bool bSmartOrder, EEditAction eAction, int iOffset, const char* szText);
98
 
        bool                                    EditList(IDList* pIDList, bool bSmartOrder, EEditAction eAction, int iOffset, const char* szText);
 
115
        bool                                    EditList(IDList* pIDList, NameList* pNameList, EMatchMode eMatchMode, bool bSmartOrder, EEditAction eAction, int iOffset, const char* szText);
99
116
 
100
117
        bool                                    LockedEditEntry(DownloadQueue* pDownloadQueue, int ID, bool bSmartOrder, EEditAction eAction, int iOffset, const char* szText);
101
118
        bool                                    LockedEditList(DownloadQueue* pDownloadQueue, IDList* pIDList, bool bSmartOrder, EEditAction eAction, int iOffset, const char* szText);