Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 | |
michael@0 | 9 | /** |
michael@0 | 10 | * This represents an ASN.1 object, |
michael@0 | 11 | * where ASN.1 is "Abstract Syntax Notation number One". |
michael@0 | 12 | * |
michael@0 | 13 | * The additional state information carried in this interface |
michael@0 | 14 | * makes it fit for being used as the data structure |
michael@0 | 15 | * when working with visual reprenstation of ASN.1 objects |
michael@0 | 16 | * in a human user interface, like in a tree widget |
michael@0 | 17 | * where open/close state of nodes must be remembered. |
michael@0 | 18 | */ |
michael@0 | 19 | [scriptable, uuid(ba8bf582-1dd1-11b2-898c-f40246bc9a63)] |
michael@0 | 20 | interface nsIASN1Object : nsISupports { |
michael@0 | 21 | |
michael@0 | 22 | /** |
michael@0 | 23 | * Identifiers for the possible types of object. |
michael@0 | 24 | */ |
michael@0 | 25 | const unsigned long ASN1_END_CONTENTS = 0; |
michael@0 | 26 | const unsigned long ASN1_BOOLEAN = 1; |
michael@0 | 27 | const unsigned long ASN1_INTEGER = 2; |
michael@0 | 28 | const unsigned long ASN1_BIT_STRING = 3; |
michael@0 | 29 | const unsigned long ASN1_OCTET_STRING = 4; |
michael@0 | 30 | const unsigned long ASN1_NULL = 5; |
michael@0 | 31 | const unsigned long ASN1_OBJECT_ID = 6; |
michael@0 | 32 | const unsigned long ASN1_ENUMERATED = 10; |
michael@0 | 33 | const unsigned long ASN1_UTF8_STRING = 12; |
michael@0 | 34 | const unsigned long ASN1_SEQUENCE = 16; |
michael@0 | 35 | const unsigned long ASN1_SET = 17; |
michael@0 | 36 | const unsigned long ASN1_PRINTABLE_STRING = 19; |
michael@0 | 37 | const unsigned long ASN1_T61_STRING = 20; |
michael@0 | 38 | const unsigned long ASN1_IA5_STRING = 22; |
michael@0 | 39 | const unsigned long ASN1_UTC_TIME = 23; |
michael@0 | 40 | const unsigned long ASN1_GEN_TIME = 24; |
michael@0 | 41 | const unsigned long ASN1_VISIBLE_STRING = 26; |
michael@0 | 42 | const unsigned long ASN1_UNIVERSAL_STRING = 28; |
michael@0 | 43 | const unsigned long ASN1_BMP_STRING = 30; |
michael@0 | 44 | const unsigned long ASN1_HIGH_TAG_NUMBER = 31; |
michael@0 | 45 | const unsigned long ASN1_CONTEXT_SPECIFIC = 32; |
michael@0 | 46 | const unsigned long ASN1_APPLICATION = 33; |
michael@0 | 47 | const unsigned long ASN1_PRIVATE = 34; |
michael@0 | 48 | |
michael@0 | 49 | /** |
michael@0 | 50 | * "type" will be equal to one of the defined object identifiers. |
michael@0 | 51 | */ |
michael@0 | 52 | attribute unsigned long type; |
michael@0 | 53 | |
michael@0 | 54 | |
michael@0 | 55 | /** |
michael@0 | 56 | * This contains a tag as explained in ASN.1 standards documents. |
michael@0 | 57 | */ |
michael@0 | 58 | attribute unsigned long tag; |
michael@0 | 59 | |
michael@0 | 60 | /** |
michael@0 | 61 | * "displayName" contains a human readable explanatory label. |
michael@0 | 62 | */ |
michael@0 | 63 | attribute AString displayName; |
michael@0 | 64 | |
michael@0 | 65 | /** |
michael@0 | 66 | * "displayValue" contains the human readable value. |
michael@0 | 67 | */ |
michael@0 | 68 | attribute AString displayValue; |
michael@0 | 69 | }; |
michael@0 | 70 |