1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SOLTOOLS_GILACCES_HXX 29 #define SOLTOOLS_GILACCES_HXX 30 31 32 33 class GenericInfoParseTypes 34 { 35 public: 36 enum E_Error 37 { 38 ok = 0, 39 cannot_open, 40 unexpected_eof, 41 syntax_error, 42 unexpected_list_end 43 }; 44 }; 45 46 47 48 /** This class is an abstract interface for a service, which 49 builds a memory structure out of a generic information 50 structure, read from a file or other stream. 51 52 There may be different implementations, which build different kinds 53 of memory structures. 54 */ 55 class GenericInfoList_Builder 56 { 57 public: 58 typedef unsigned long UINT32; 59 60 virtual ~GenericInfoList_Builder() {} 61 62 virtual void AddKey( 63 const char * i_sKey, 64 UINT32 i_nKeyLength, 65 const char * i_sValue, 66 UINT32 i_nValueLength, 67 const char * i_sComment, 68 UINT32 i_nCommentLength ) = 0; 69 70 virtual void OpenList() = 0; 71 virtual void CloseList() = 0; 72 }; 73 74 75 /** This class is an abstract interface for a service, which 76 returns the values of a generic information tree out of 77 a memory structure. 78 79 There may be different implementations, which browse different 80 kinds of memory structures. 81 */ 82 class GenericInfoList_Browser 83 { 84 public: 85 virtual ~GenericInfoList_Browser() {} 86 87 virtual bool Start_CurList() = 0; 88 virtual bool NextOf_CurList() = 0; 89 90 virtual void Get_CurKey( 91 char * o_rKey ) const = 0; 92 virtual void Get_CurValue( 93 char * o_rValue ) const = 0; 94 virtual void Get_CurComment( 95 char * o_rComment ) const = 0; 96 virtual bool HasSubList_CurKey() const = 0; 97 98 virtual void Push_CurList() = 0; 99 virtual void Pop_CurList() = 0; 100 }; 101 102 103 #endif 104 105