~ubuntu-branches/ubuntu/jaunty/trousers/jaunty

« back to all changes in this revision

Viewing changes to src/include/obj_hash.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-01-23 22:03:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123220300-fhtqja3c0oq0gp6z
Tags: 0.3.1-4
* Added patch from Aaron M. Ucko <ucko@debian.org> to allow trousers to
  build successfully on amd64, and presumably also other 64-bit
  architectures (Closes: #457400).
* Including udev rule for /dev/tpm from William Lima
  <wlima.amadeus@gmail.com> as suggested by David Smith <dds@google.com>
  (Closes: #459682).
* Added lintian overrides.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Licensed Materials - Property of IBM
 
4
 *
 
5
 * trousers - An open source TCG Software Stack
 
6
 *
 
7
 * (C) Copyright International Business Machines Corp. 2004-2007
 
8
 *
 
9
 */
 
10
 
 
11
#ifndef _OBJ_HASH_H_
 
12
#define _OBJ_HASH_H_
 
13
 
 
14
#ifdef TSS_BUILD_HASH_LIST
 
15
 
 
16
/* structures */
 
17
struct tr_hash_obj {
 
18
        UINT32 type;
 
19
        BYTE *hashData;
 
20
        UINT32 hashSize;
 
21
        UINT32 hashUpdateSize;
 
22
        BYTE *hashUpdateBuffer;
 
23
};
 
24
 
 
25
/* obj_hash.c */
 
26
void       hash_free(void *data);
 
27
TSS_RESULT obj_hash_add(TSS_HCONTEXT, UINT32, TSS_HOBJECT *);
 
28
TSS_BOOL   obj_is_hash(TSS_HOBJECT);
 
29
TSS_RESULT obj_hash_remove(TSS_HOBJECT, TSS_HCONTEXT);
 
30
TSS_RESULT obj_hash_get_tsp_context(TSS_HHASH, TSS_HCONTEXT *);
 
31
TSS_RESULT obj_hash_set_value(TSS_HHASH, UINT32, BYTE *);
 
32
TSS_RESULT obj_hash_get_value(TSS_HHASH, UINT32 *, BYTE **);
 
33
TSS_RESULT obj_hash_update_value(TSS_HHASH, UINT32, BYTE *);
 
34
 
 
35
#define HASH_LIST_DECLARE               struct obj_list hash_list
 
36
#define HASH_LIST_DECLARE_EXTERN        extern struct obj_list hash_list
 
37
#define HASH_LIST_INIT()                list_init(&hash_list)
 
38
#define HASH_LIST_CONNECT(a,b)          obj_connectContext_list(&hash_list, a, b)
 
39
#define HASH_LIST_CLOSE(a)              obj_list_close(&hash_list, &hash_free, a)
 
40
 
 
41
#else
 
42
 
 
43
#define obj_is_hash(a)  FALSE
 
44
 
 
45
#define HASH_LIST_DECLARE
 
46
#define HASH_LIST_DECLARE_EXTERN
 
47
#define HASH_LIST_INIT()
 
48
#define HASH_LIST_CONNECT(a,b)
 
49
#define HASH_LIST_CLOSE(a)
 
50
 
 
51
#endif
 
52
 
 
53
#endif