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 librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: vm_storage.h /main/4 1996/07/18 16:35:41 drk $ */
26 #define _vm_storage_h 1
28 #include "dstr/void_ptr_array.h"
29 #include "storage/abs_storage.h"
31 class vm_storage : public abs_storage
34 void_ptr_array f_array;
37 vm_storage(char* path, char* name, rep_policy* rep_p = 0);
43 int readString (mmdb_pos_t loc, char* base, int len,
45 int insertString(mmdb_pos_t& loc, const char* base, int len, Boolean flush = false) ;
46 int get_str_ptr(mmdb_pos_t loc, char*&, int& len);
48 int updateString(mmdb_pos_t loc, const char* base, int len,
49 int string_ofst = 0, Boolean flush = false) ;
50 int deleteString (mmdb_pos_t loc, Boolean flush = false) ;
51 int allocString (mmdb_pos_t& loc, int len, char*&, int mode = 0);
53 int appendString(mmdb_pos_t loc, const char*, int len,
54 Boolean flush_opt = false) ;
57 Boolean io_mode(int mode) ;
59 friend class storage_mgr_t;