gecko-dev/security/manager/pki/nsASN1Tree.h
Birunthan Mohanathas ed468964b8 Bug 1164714 - Flatten security/manager/pki/src/ directory. r=keeler
--HG--
rename : security/manager/pki/src/nsASN1Tree.cpp => security/manager/pki/nsASN1Tree.cpp
rename : security/manager/pki/src/nsASN1Tree.h => security/manager/pki/nsASN1Tree.h
rename : security/manager/pki/src/nsNSSDialogHelper.cpp => security/manager/pki/nsNSSDialogHelper.cpp
rename : security/manager/pki/src/nsNSSDialogHelper.h => security/manager/pki/nsNSSDialogHelper.h
rename : security/manager/pki/src/nsNSSDialogs.cpp => security/manager/pki/nsNSSDialogs.cpp
rename : security/manager/pki/src/nsNSSDialogs.h => security/manager/pki/nsNSSDialogs.h
rename : security/manager/pki/src/nsPKIModule.cpp => security/manager/pki/nsPKIModule.cpp
rename : security/manager/pki/src/nsPKIParamBlock.cpp => security/manager/pki/nsPKIParamBlock.cpp
rename : security/manager/pki/src/nsPKIParamBlock.h => security/manager/pki/nsPKIParamBlock.h
2015-05-19 10:47:42 -07:00

73 lines
1.9 KiB
C++

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _NSSASNTREE_H_
#define _NSSASNTREE_H_
#include "nscore.h"
#include "nsIX509Cert.h"
#include "nsIASN1Tree.h"
#include "nsIASN1Object.h"
#include "nsIASN1Sequence.h"
#include "nsITreeView.h"
#include "nsITreeBoxObject.h"
#include "nsITreeSelection.h"
#include "nsCOMPtr.h"
//4bfaa9f0-1dd2-11b2-afae-a82cbaa0b606
#define NS_NSSASN1OUTINER_CID { \
0x4bfaa9f0, \
0x1dd2, \
0x11b2, \
{0xaf,0xae,0xa8,0x2c,0xba,0xa0,0xb6,0x06} \
}
class nsNSSASN1Tree : public nsIASN1Tree
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIASN1TREE
NS_DECL_NSITREEVIEW
nsNSSASN1Tree();
protected:
virtual ~nsNSSASN1Tree();
class myNode
{
public:
nsCOMPtr<nsIASN1Object> obj;
nsCOMPtr<nsIASN1Sequence> seq;
myNode *child;
myNode *next;
myNode *parent;
myNode() {
child = next = parent = nullptr;
}
};
myNode *mTopNode;
nsCOMPtr<nsIASN1Object> mASN1Object;
nsCOMPtr<nsITreeSelection> mSelection;
nsCOMPtr<nsITreeBoxObject> mTree;
void InitNodes();
void InitChildsRecursively(myNode *n);
void ClearNodes();
void ClearNodesRecursively(myNode *n);
int32_t CountVisibleNodes(myNode *n);
myNode *FindNodeFromIndex(myNode *n, int32_t wantedIndex,
int32_t &index_counter, int32_t &level_counter,
int32_t *optionalOutParentIndex, int32_t *optionalOutLevel);
myNode *FindNodeFromIndex(int32_t wantedIndex,
int32_t *optionalOutParentIndex = nullptr,
int32_t *optionalOutLevel = nullptr);
};
#endif //_NSSASNTREE_H_