1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _STORE_TYPES_H_ 25 #define _STORE_TYPES_H_ "$Revision$" 26 27 #include <sal/types.h> 28 #include <rtl/ustring.h> 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 /** PageSize (recommended) default. 35 @see store_openFile() 36 */ 37 #define STORE_DEFAULT_PAGESIZE ((sal_uInt16)0x0400) 38 39 40 /** PageSize (enforced) limits. 41 @see store_openFile() 42 */ 43 #define STORE_MINIMUM_PAGESIZE ((sal_uInt16)0x0200) 44 #define STORE_MAXIMUM_PAGESIZE ((sal_uInt16)0x8000) 45 46 47 /** NameSize (enforced) limit. 48 @see any param pName 49 @see store_E_NameTooLong 50 */ 51 #define STORE_MAXIMUM_NAMESIZE 256 52 53 54 /** Attributes (predefined). 55 @see store_attrib() 56 */ 57 #define STORE_ATTRIB_ISLINK ((sal_uInt32)0x10000000) 58 #define STORE_ATTRIB_ISDIR ((sal_uInt32)0x20000000) 59 #define STORE_ATTRIB_ISFILE ((sal_uInt32)0x40000000) 60 61 62 /** Access Mode enumeration. 63 @see store_openFile() 64 @see store_openDirectory() 65 @see store_openStream() 66 */ 67 enum __store_AccessMode 68 { 69 store_AccessCreate, 70 store_AccessReadCreate, 71 store_AccessReadWrite, 72 store_AccessReadOnly, 73 store_Access_FORCE_EQUAL_SIZE = SAL_MAX_ENUM 74 }; 75 76 /** Access Mode type. 77 */ 78 typedef enum __store_AccessMode storeAccessMode; 79 80 81 /** Error Code enumeration. 82 */ 83 enum __store_Error 84 { 85 store_E_None = 0, 86 store_E_AccessViolation, 87 store_E_LockingViolation, 88 store_E_CantSeek, 89 store_E_CantRead, 90 store_E_CantWrite, 91 store_E_InvalidAccess, 92 store_E_InvalidHandle, 93 store_E_InvalidParameter, 94 store_E_InvalidChecksum, 95 store_E_AlreadyExists, 96 store_E_NotExists, 97 store_E_NotDirectory, 98 store_E_NotFile, 99 store_E_NoMoreFiles, 100 store_E_NameTooLong, 101 store_E_OutOfMemory, 102 store_E_OutOfSpace, 103 store_E_Pending, 104 store_E_WrongFormat, 105 store_E_WrongVersion, 106 store_E_Unknown, 107 store_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM 108 }; 109 110 /** Error Code type. 111 */ 112 typedef enum __store_Error storeError; 113 114 115 /** Find Data structure. 116 @see store_findFirst() 117 @see store_findNext() 118 */ 119 struct __store_FindData 120 { 121 /** Name. 122 @see m_nLength 123 */ 124 sal_Unicode m_pszName[STORE_MAXIMUM_NAMESIZE]; 125 126 /** Name Length. 127 @see m_pszName 128 */ 129 sal_Int32 m_nLength; 130 131 /** Attributes. 132 @see store_attrib() 133 */ 134 sal_uInt32 m_nAttrib; 135 136 /** Size. 137 @see store_getStreamSize() 138 @see store_setStreamSize() 139 */ 140 sal_uInt32 m_nSize; 141 142 /** Reserved for internal use. 143 */ 144 sal_uInt32 m_nReserved; 145 }; 146 147 /** Find Data type. 148 */ 149 typedef struct __store_FindData storeFindData; 150 151 152 /*======================================================================== 153 * 154 * The End. 155 * 156 *======================================================================*/ 157 158 #ifdef __cplusplus 159 } 160 #endif 161 162 #endif /* _STORE_TYPES_H_ */ 163 164