ede395e4ddb08043569b4fd8151290fbcd47e083
[yazpp-moved-to-github.git] / include / yaz++ / gdu.h
1 /*
2  * Copyright (c) 1998-2005, Index Data.
3  * See the file LICENSE for details.
4  * 
5  * $Id: gdu.h,v 1.1 2005-06-21 17:37:15 adam Exp $
6  */
7
8 #ifndef YAZPP_GDU_INCLUDED
9 #define YAZPP_GDU_INCLUDED
10
11 #include <yaz/yconfig.h>
12 #include <yaz/proto.h>
13
14 namespace yazpp_1 {
15
16     class YAZ_EXPORT GDU {
17     public:
18         GDU(Z_GDU *gdu);
19         GDU(Z_APDU *apdu);
20         ~GDU();
21         Z_GDU *get();
22         void extract_odr_to(ODR dst);
23     private:
24         void base(Z_GDU *gdu, ODR o);
25         Z_GDU *m_gdu;
26         ODR m_decode;
27     };
28
29     class GDUQueue_List {
30         friend class GDUQueue;
31     private:
32         GDU *m_item;
33         GDUQueue_List *m_next;
34     };
35
36     class GDUQueue {
37     public:
38         GDUQueue();
39         ~GDUQueue();
40         void clear();
41         void enqueue(GDU *gdu);
42         GDU *dequeue();
43         int size();
44     private:
45         GDUQueue_List *m_list;
46     };
47 };
48
49 #endif