4 * $TOG: MsgHndArray.hh /main/9 1998/09/02 15:54:58 mgreess $
6 * RESTRICTED CONFIDENTIAL INFORMATION:
8 * The information in this document is subject to special
9 * restrictions in a confidential disclosure agreement between
10 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
11 * document outside HP, IBM, Sun, USL, SCO, or Univel without
12 * Sun's specific written approval. This document and all copies
13 * and derivative works thereof must be returned or destroyed at
16 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
21 #ifndef _MSGHNDARRAY_HH
22 #define _MSGHNDARRAY_HH
26 #if defined(USL) && (OSMAJORVERSION == 2)
30 #if defined(USL) && (OSMAJORVERSION == 2)
33 #include <DtMail/DtMail.hh>
42 DtMailMessageHandle message_handle;
49 MsgStruct **_contents;
53 MsgHndArray(int sz = 1024, int zeroed = 1)
55 _contents = (MsgStruct**) malloc(sizeof(MsgStruct*)*sz);
57 if (zeroed) memset(_contents, 0, sizeof(MsgStruct *)*sz);
65 // for (int ent = 0; ent < _length; ent++) {
66 // delete _contents[ent];
69 free((void*) _contents);
73 MsgStruct* at(int a_number);
74 int insert(MsgStruct* a_msg_struct);
76 int indexof(MsgStruct* a_msg_struct);
77 int indexof(DtMailMessageHandle a_msg_handle);
78 void remove_entry(int position);
79 void remove_entry(MsgStruct *ms);
80 void append(MsgStruct *a_msg_struct);
81 void mark_for_delete(int position);
82 void compact(int start_pos);
83 void replace(int postition, MsgStruct *a_msg_struct);