Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / storage / vm_storage.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /* $XConsortium: vm_storage.h /main/4 1996/07/18 16:35:41 drk $ */
24
25 #ifndef _vm_storage_h
26 #define _vm_storage_h 1
27
28 #include "dstr/void_ptr_array.h"
29 #include "storage/abs_storage.h"
30
31 class vm_storage : public abs_storage
32 {
33 protected:
34    void_ptr_array f_array;
35
36 public:
37    vm_storage(char* path, char* name, rep_policy* rep_p = 0);
38    ~vm_storage() ;
39
40    void remove();
41
42    // i/o functions
43    int readString (mmdb_pos_t loc, char* base, int len, 
44                   int str_offset = 0) ;
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);
47
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);
52
53    int appendString(mmdb_pos_t loc, const char*, int len,
54                             Boolean flush_opt = false) ;
55
56 // status functions
57    Boolean io_mode(int mode) ;
58
59    friend class storage_mgr_t;
60
61 protected:
62 };
63
64 #endif