2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
26 * $XConsortium: Node.h /main/4 1996/04/21 19:42:44 drk $
28 * RESTRICTED CONFIDENTIAL INFORMATION:
30 * The information in this document is subject to special
31 * restrictions in a confidential disclosure agreement between
32 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
33 * document outside HP, IBM, Sun, USL, SCO, or Univel without
34 * Sun's specific written approval. This document and all copies
35 * and derivative works thereof must be returned or destroyed at
38 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
43 #ifndef __NODESERVANT_HH
44 #define __NODESERVANT_HH
46 #include <sys/types.h>
49 #include <DtMail/DtMail.hh>
51 // Nodes are of critical importance to the MailTool architecture
52 // since all classes rely heavily on Nodes.
53 // It is possible for the client to maintain a list of Nodes for
54 // each Folder that it is interested in. Each Folder has a list of
55 // Nodes, a Node for each Message the Folder's mailfile contains.
56 // Each Message has a list of Nodes, a Node for each Attachment the
57 // Message contains. And so on...
58 // Nodes are circular lists and the root node is the only one that
59 // has a "home-p" set to TRUE. Each Node has a my_previous_node and
60 // a my_next_node which point to the previous and next nodes in the
61 // circular list. Each Node has data which is of type CORBA::ObjRef.
62 // The data in the Node depends on which level the node exists -
63 // Nodes maintained by Folders contain Messages, Nodes maintained by
64 // Messages contain Attachments, ...
65 // This implementation of Nodes is abstract enough for *any* CORBA::ObjRef
66 // to be placed in Nodes. Hence, it can be easily used or adapted-for-use
67 // in any other environment requiring its functionality.
70 // set_homep() : Set self to be home-node.
71 // is_homep() : Is self home-node?
72 // get_home() : Traverse through hierarchy until
73 // home-node is reached.
74 // set/get_data() : Set or get Node's data.
75 // next(), prev() : Go to next (or previous) Node.
76 // append(), prepend() : Append or prepend a Node to self.`
77 // remove() : Remove node from list.
78 // destroy() : Destroy node, its contents and release objrefs.
86 DtMailMessageHandle msg_num,
99 void set_message_handle(
100 DtMailMessageHandle a_hndl
104 DtMailMessageHandle get_message_handle(
107 void set_message_header(char* hdr);
108 char* get_message_header();
110 void set_number(int i);
119 void set_previous_node(
138 DtMailMessageHandle my_message_handle;
139 char* my_message_header;
143 Node* my_previous_node;
148 #endif //__NODESERVANT_HH