]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/clAppUtils/BlobList.h
Security-57031.10.10.tar.gz
[apple/security.git] / SecurityTests / clxutils / clAppUtils / BlobList.h
1 #ifndef _BLOBLIST_H_
2 #define _BLOBLIST_H_
3
4 #include <Security/cssmtype.h>
5
6 #ifndef NULL
7 #define NULL (0)
8 #endif
9
10 /*** BlobList class for managing groups of raw certs and CRLs ***/
11
12 class BlobList
13 {
14 public:
15 BlobList()
16 : mNumBlobs(0), mBlobList(NULL) { }
17 ~BlobList();
18 /* blob is mallocd & copied; its referent is only copied if copyBlob is
19 * true and is always freed in ~BlobList */
20 void addBlob(const CSSM_DATA &blob, CSSM_BOOL copyBlob = CSSM_FALSE);
21 int addFile(const char *fileName, const char *dirName = NULL);
22 uint32 numBlobs() { return mNumBlobs; }
23 CSSM_DATA_PTR blobList() { return mBlobList; }
24
25 private:
26 uint32 mNumBlobs;
27 CSSM_DATA_PTR mBlobList;
28 };
29
30 #endif /* _BLOBLIST_H_ */