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