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#ifndef __com_sun_star_embed_ElementModes_idl__
24#define __com_sun_star_embed_ElementModes_idl__
25
26
27//============================================================================
28
29module com { module sun { module star { module embed {
30
31//============================================================================
32/** The constant set contains possible modes to open an element.
33
34	<p>
35	The modes can be combined by 'or' operation.
36	<const>ElementModes::READ</const> and <const>ElementModes::WRITE</const>
37	are base modes. A result mode must include one of base modes.
38	</p>
39
40	@see <type>XStorage</type>
41*/
42published constants ElementModes
43{
44	//------------------------------------------------------------------------
45	/** specifies opening of an element for reading.
46	 */
47	const long READ = 1;
48
49	//------------------------------------------------------------------------
50	/** specifies opening of a seekable element.
51
52		<p>
53		This mode is ignored for <type>Storage</type> elements.
54		This flag makes sence only in combination with
55		<const>ElementModes::READ</const> and/or
56		<const>ElementModes::WRITE</const>.
57		</p>
58	 */
59	const long SEEKABLE = 2;
60
61	//------------------------------------------------------------------------
62	/** specifies opening of a seekable element for reading.
63
64		<p>
65		This is just a combination of the previous two values. For storages
66		it is the same as <const>ElementModes::READ</const>.
67		</p>
68	 */
69	const long SEEKABLEREAD = 3;
70
71	//------------------------------------------------------------------------
72	/** specifies opening of an element for writing.
73	 */
74	const long WRITE = 4;
75
76	//------------------------------------------------------------------------
77	/** specifies opening of an element for reading and writing.
78
79		<p>
80		For a stream element is also specifies that it must be seekable.
81		</p>
82	 */
83	const long READWRITE = 7;
84
85	//------------------------------------------------------------------------
86	/** lets the document be truncated immediatelly after opening.
87
88		<p>
89		This flag makes sence only in combination with
90		<const>ElementModes::WRITE</const>.
91		</p>
92	 */
93	const long TRUNCATE = 8;
94
95	//------------------------------------------------------------------------
96	/** restricts creation of a new element on opening in case a requested one
97		does not exist.
98
99		<p>
100		This flag makes sence only in combination with
101		<const>ElementModes::WRITE</const>.
102		</p>
103	 */
104	const long NOCREATE = 16;
105};
106
107//============================================================================
108
109}; }; }; };
110
111#endif
112
113