|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #include "nsISupports.idl" |
|
8 #include "nsIASN1Object.idl" |
|
9 |
|
10 interface nsIMutableArray; |
|
11 |
|
12 /** |
|
13 * This represents a sequence of ASN.1 objects, |
|
14 * where ASN.1 is "Abstract Syntax Notation number One". |
|
15 * |
|
16 * Overview of how this ASN1 interface is intended to |
|
17 * work. |
|
18 * |
|
19 * First off, the nsIASN1Sequence is any type in ASN1 |
|
20 * that consists of sub-elements (ie SEQUENCE, SET) |
|
21 * nsIASN1Printable Items are all the other types that |
|
22 * can be viewed by themselves without interpreting further. |
|
23 * Examples would include INTEGER, UTF-8 STRING, OID. |
|
24 * These are not intended to directly reflect the numberous |
|
25 * types that exist in ASN1, but merely an interface to ease |
|
26 * producing a tree display the ASN1 structure of any DER |
|
27 * object. |
|
28 * |
|
29 * The additional state information carried in this interface |
|
30 * makes it fit for being used as the data structure |
|
31 * when working with visual reprenstation of ASN.1 objects |
|
32 * in a human user interface, like in a tree widget |
|
33 * where open/close state of nodes must be remembered. |
|
34 */ |
|
35 [scriptable, uuid(b6b957e6-1dd1-11b2-89d7-e30624f50b00)] |
|
36 interface nsIASN1Sequence : nsIASN1Object { |
|
37 |
|
38 /** |
|
39 * The array of objects stored in the sequence. |
|
40 */ |
|
41 attribute nsIMutableArray ASN1Objects; |
|
42 |
|
43 /** |
|
44 * Whether the node at this position in the ASN.1 data structure |
|
45 * sequence contains sub elements understood by the |
|
46 * application. |
|
47 */ |
|
48 attribute boolean isValidContainer; |
|
49 |
|
50 /** |
|
51 * Whether the contained objects should be shown or hidden. |
|
52 * A UI implementation can use this flag to store the current |
|
53 * expansion state when shown in a tree widget. |
|
54 */ |
|
55 attribute boolean isExpanded; |
|
56 }; |