Show duplicate attribute
[LibreOffice.git] / include / store / types.h
blobdd4fafccd324beeb72537d02a53556f1055544a8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_STORE_TYPES_H
21 #define INCLUDED_STORE_TYPES_H
23 #include <sal/types.h>
24 #include <rtl/ustring.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 /** PageSize (recommended) default.
31 @see store_openFile()
33 #define STORE_DEFAULT_PAGESIZE ((sal_uInt16)0x0400)
36 /** PageSize (enforced) limits.
37 @see store_openFile()
39 #define STORE_MINIMUM_PAGESIZE ((sal_uInt16)0x0200)
40 #define STORE_MAXIMUM_PAGESIZE ((sal_uInt16)0x8000)
43 /** NameSize (enforced) limit.
44 @see any param pName
45 @see store_E_NameTooLong
47 #define STORE_MAXIMUM_NAMESIZE 256
50 /** Attributes (predefined).
51 @see store_attrib()
53 #define STORE_ATTRIB_ISLINK ((sal_uInt32)0x10000000)
54 #define STORE_ATTRIB_ISDIR ((sal_uInt32)0x20000000)
55 #define STORE_ATTRIB_ISFILE ((sal_uInt32)0x40000000)
58 /** Access Mode enumeration.
59 @see store_openFile()
60 @see store_openDirectory()
61 @see store_openStream()
63 enum __store_AccessMode
65 store_AccessCreate,
66 store_AccessReadCreate,
67 store_AccessReadWrite,
68 store_AccessReadOnly,
69 store_Access_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
72 /** Access Mode type.
74 typedef enum __store_AccessMode storeAccessMode;
77 /** Error Code enumeration.
79 enum __store_Error
81 store_E_None = 0,
82 store_E_AccessViolation,
83 store_E_LockingViolation,
84 store_E_CantSeek,
85 store_E_CantRead,
86 store_E_CantWrite,
87 store_E_InvalidAccess,
88 store_E_InvalidHandle,
89 store_E_InvalidParameter,
90 store_E_InvalidChecksum,
91 store_E_AlreadyExists,
92 store_E_NotExists,
93 store_E_NotDirectory,
94 store_E_NotFile,
95 store_E_NoMoreFiles,
96 store_E_NameTooLong,
97 store_E_OutOfMemory,
98 store_E_OutOfSpace,
99 store_E_Pending,
100 store_E_WrongFormat,
101 store_E_WrongVersion,
102 store_E_Unknown,
103 store_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
106 /** Error Code type.
108 typedef enum __store_Error storeError;
111 /** Find Data structure.
112 @see store_findFirst()
113 @see store_findNext()
115 struct __store_FindData
117 /** Name.
118 @see m_nLength
120 sal_Unicode m_pszName[STORE_MAXIMUM_NAMESIZE];
122 /** Name Length.
123 @see m_pszName
125 sal_Int32 m_nLength;
127 /** Attributes.
128 @see store_attrib()
130 sal_uInt32 m_nAttrib;
132 /** Size.
133 @see store_getStreamSize()
134 @see store_setStreamSize()
136 sal_uInt32 m_nSize;
138 /** Reserved for internal use.
140 sal_uInt32 m_nReserved;
143 /** Find Data type.
145 typedef struct __store_FindData storeFindData;
148 /*========================================================================
150 * The End.
152 *======================================================================*/
154 #ifdef __cplusplus
156 #endif
158 #endif // INCLUDED_STORE_TYPES_H
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */