blob: 771ac32bccc41a1a2dbcc994f65417ec33cfe983 [file] [log] [blame]
Jeff Thompson8238d002013-07-10 11:56:49 -07001/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07002 * Copyright (C) 2013 Regents of the University of California.
3 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompson8238d002013-07-10 11:56:49 -07004 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NDN_PUBLISHERPUBLICKEYDIGEST_H
Jeff Thompson2d27e2f2013-08-09 12:55:00 -07008#define NDN_PUBLISHERPUBLICKEYDIGEST_H
Jeff Thompson8238d002013-07-10 11:56:49 -07009
Yingdi Yu61ec2722014-01-20 14:22:32 -080010#include <ndn-cpp-dev/c/common.h>
Jeff Thompson93034532013-10-08 11:52:43 -070011#include "util/blob.h"
Jeff Thompson10ad12a2013-09-24 16:19:11 -070012
Jeff Thompson2d27e2f2013-08-09 12:55:00 -070013#ifdef __cplusplus
Jeff Thompson8238d002013-07-10 11:56:49 -070014extern "C" {
15#endif
16
17/**
18 * A PublisherPublicKeyDigest holds a pointer to the publisher public key digest value, if any.
19 * We make a separate struct since this is used by multiple other structs.
20 */
21struct ndn_PublisherPublicKeyDigest {
Jeff Thompson93034532013-10-08 11:52:43 -070022 struct ndn_Blob publisherPublicKeyDigest; /**< A Blob whose value is a pointer to pre-allocated buffer. 0 for none */
Jeff Thompson8238d002013-07-10 11:56:49 -070023};
24
25/**
26 * Initialize an ndn_PublisherPublicKeyDigest struct with 0 for none.
27 */
Jeff Thompsond1427fb2013-08-29 17:20:32 -070028static inline void ndn_PublisherPublicKeyDigest_initialize(struct ndn_PublisherPublicKeyDigest *self)
Jeff Thompson8238d002013-07-10 11:56:49 -070029{
Jeff Thompson93034532013-10-08 11:52:43 -070030 ndn_Blob_initialize(&self->publisherPublicKeyDigest, 0, 0);
Jeff Thompson8238d002013-07-10 11:56:49 -070031}
32
Jeff Thompson2d27e2f2013-08-09 12:55:00 -070033#ifdef __cplusplus
Jeff Thompson8238d002013-07-10 11:56:49 -070034}
35#endif
36
37#endif