2 * dselect - Debian package maintenance user interface
3 * method.h - access method handling declarations
5 * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2001 Wichert Akkerman <wakkerma@debian.org>
8 * This is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
25 #define CMETHOPTFILE "cmethopt"
26 #define METHLOCKFILE "methlock"
28 #define METHODSDIR "methods"
30 #define IMETHODMAXLEN 50
31 #define IOPTIONMAXLEN IMETHODMAXLEN
32 #define METHODOPTIONSFILE "names"
33 #define METHODSETUPSCRIPT "setup"
34 #define METHODUPDATESCRIPT "update"
35 #define METHODINSTALLSCRIPT "install"
36 #define OPTIONSDESCPFX "desc."
37 #define OPTIONINDEXMAXLEN 5
40 struct method
*next
, *prev
;
41 char *name
, *path
, *pathinmeth
;
44 struct dselect_option
{
47 char index
[OPTIONINDEXMAXLEN
];
52 class methodlist
: public baselist
{
59 struct dselect_option
**table
;
61 // Information displays
62 void itd_description();
64 // Define these virtuals
65 void redraw1itemsel(int index
, int selected
) override
;
66 void redrawcolheads() override
;
67 void redrawthisstate() override
;
68 void redrawinfo() override
;
69 void redrawtitle() override
;
70 void setwidths() override
;
71 void setheights() override
;
72 const char *itemname(int index
) override
;
73 const struct helpmenuentry
*helpmenulist() override
;
76 // Keybinding functions */
81 methodlist(const methodlist
&) = delete;
82 methodlist
&operator =(const methodlist
&) = delete;
88 extern struct dselect_option
*options
, *coption
;
89 extern struct method
*methods
;
91 void readmethods(const char *pathbase
, dselect_option
**optionspp
, int *nread
);
93 void writecurrentopt();