1.2.1
by Phil Brooke
Import upstream version 62 |
1 |
-- Topal: GPG/GnuPG and Alpine/Pine integration
|
1.2.6
by Phil Brooke
Import upstream version 75 |
2 |
-- Copyright (C) 2001--2012 Phillip J. Brooke
|
1.2.1
by Phil Brooke
Import upstream version 62 |
3 |
--
|
4 |
-- This program is free software: you can redistribute it and/or modify
|
|
5 |
-- it under the terms of the GNU General Public License version 3 as
|
|
6 |
-- published by the Free Software Foundation.
|
|
7 |
--
|
|
8 |
-- This program is distributed in the hope that it will be useful,
|
|
9 |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11 |
-- GNU General Public License for more details.
|
|
12 |
--
|
|
13 |
-- You should have received a copy of the GNU General Public License
|
|
14 |
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
1
by Phil Brooke
Import upstream version 0.7.13.3 |
15 |
|
16 |
with Globals; use Globals; |
|
17 |
||
18 |
package Attachments is |
|
19 |
||
20 |
type Attachment_List is limited private; |
|
21 |
||
22 |
Attachment_Not_Found : exception; |
|
23 |
||
1.2.1
by Phil Brooke
Import upstream version 62 |
24 |
-- Add an attachment to the list....
|
1
by Phil Brooke
Import upstream version 0.7.13.3 |
25 |
procedure Add_Attachment (Filename : in UBS; |
26 |
List : in out Attachment_List); |
|
27 |
||
28 |
-- Remove an attachment. We then shuffle the array down.
|
|
29 |
-- It will only remove the last attachment if there are multiple instances.
|
|
30 |
procedure Remove_Attachment (Filename : in UBS; |
|
31 |
List : in out Attachment_List); |
|
32 |
||
1.2.1
by Phil Brooke
Import upstream version 62 |
33 |
-- List the attachments and edit them as appropriate (include removing an
|
1
by Phil Brooke
Import upstream version 0.7.13.3 |
34 |
-- attachment or adding a new one.
|
35 |
procedure List (List : in out Attachment_List); |
|
36 |
||
1.2.1
by Phil Brooke
Import upstream version 62 |
37 |
procedure Empty_Attachment_List (List : in out Attachment_List); |
1
by Phil Brooke
Import upstream version 0.7.13.3 |
38 |
|
39 |
function Count (List : in Attachment_List) return Natural; |
|
40 |
||
41 |
-- This function takes the original Tmpfile, and (in the case of a
|
|
1.2.1
by Phil Brooke
Import upstream version 62 |
42 |
-- non-empty attachment list) replaces it with a multipart/mixed
|
43 |
-- structure. The attachments in List are base64 armoured. We
|
|
44 |
-- assume that Tmpfile has already been appropriately
|
|
45 |
-- processed.... This is safe to call if List is empty.
|
|
1
by Phil Brooke
Import upstream version 0.7.13.3 |
46 |
procedure Replace_Tmpfile (Tmpfile : in String; |
1.2.1
by Phil Brooke
Import upstream version 62 |
47 |
List : in Attachment_List); |
1
by Phil Brooke
Import upstream version 0.7.13.3 |
48 |
|
49 |
private
|
|
50 |
||
51 |
type Attachment_List is |
|
52 |
record
|
|
1.2.5
by Phil Brooke
Import upstream version 74 |
53 |
AA : UVV; |
1
by Phil Brooke
Import upstream version 0.7.13.3 |
54 |
end record; |
55 |
||
56 |
end Attachments; |