security/manager/pki/src/nsASN1Tree.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4 #ifndef _NSSASNTREE_H_
michael@0 5 #define _NSSASNTREE_H_
michael@0 6
michael@0 7 #include "nscore.h"
michael@0 8 #include "nsIX509Cert.h"
michael@0 9 #include "nsIASN1Tree.h"
michael@0 10 #include "nsIASN1Object.h"
michael@0 11 #include "nsIASN1Sequence.h"
michael@0 12 #include "nsITreeView.h"
michael@0 13 #include "nsITreeBoxObject.h"
michael@0 14 #include "nsITreeSelection.h"
michael@0 15 #include "nsCOMPtr.h"
michael@0 16
michael@0 17 //4bfaa9f0-1dd2-11b2-afae-a82cbaa0b606
michael@0 18 #define NS_NSSASN1OUTINER_CID { \
michael@0 19 0x4bfaa9f0, \
michael@0 20 0x1dd2, \
michael@0 21 0x11b2, \
michael@0 22 {0xaf,0xae,0xa8,0x2c,0xba,0xa0,0xb6,0x06} \
michael@0 23 }
michael@0 24
michael@0 25
michael@0 26 class nsNSSASN1Tree : public nsIASN1Tree
michael@0 27 {
michael@0 28 public:
michael@0 29 NS_DECL_THREADSAFE_ISUPPORTS
michael@0 30 NS_DECL_NSIASN1TREE
michael@0 31 NS_DECL_NSITREEVIEW
michael@0 32
michael@0 33 nsNSSASN1Tree();
michael@0 34 virtual ~nsNSSASN1Tree();
michael@0 35 protected:
michael@0 36
michael@0 37 class myNode
michael@0 38 {
michael@0 39 public:
michael@0 40 nsCOMPtr<nsIASN1Object> obj;
michael@0 41 nsCOMPtr<nsIASN1Sequence> seq;
michael@0 42 myNode *child;
michael@0 43 myNode *next;
michael@0 44 myNode *parent;
michael@0 45
michael@0 46 myNode() {
michael@0 47 child = next = parent = nullptr;
michael@0 48 }
michael@0 49 };
michael@0 50
michael@0 51 myNode *mTopNode;
michael@0 52
michael@0 53 nsCOMPtr<nsIASN1Object> mASN1Object;
michael@0 54 nsCOMPtr<nsITreeSelection> mSelection;
michael@0 55 nsCOMPtr<nsITreeBoxObject> mTree;
michael@0 56
michael@0 57 void InitNodes();
michael@0 58 void InitChildsRecursively(myNode *n);
michael@0 59
michael@0 60 void ClearNodes();
michael@0 61 void ClearNodesRecursively(myNode *n);
michael@0 62
michael@0 63 int32_t CountVisibleNodes(myNode *n);
michael@0 64 myNode *FindNodeFromIndex(myNode *n, int32_t wantedIndex,
michael@0 65 int32_t &index_counter, int32_t &level_counter,
michael@0 66 int32_t *optionalOutParentIndex, int32_t *optionalOutLevel);
michael@0 67 myNode *FindNodeFromIndex(int32_t wantedIndex,
michael@0 68 int32_t *optionalOutParentIndex = nullptr,
michael@0 69 int32_t *optionalOutLevel = nullptr);
michael@0 70
michael@0 71 };
michael@0 72 #endif //_NSSASNTREE_H_

mercurial