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_ucb_TransientDocumentsContentProvider_idl__
24#define __com_sun_star_ucb_TransientDocumentsContentProvider_idl__
25
26#ifndef __com_sun_star_ucb_XContentProvider_idl__
27#include <com/sun/star/ucb/XContentProvider.idl>
28#endif
29
30//=============================================================================
31
32module com { module sun { module star { module ucb {
33
34//=============================================================================
35/** The Transient Documents Content Provider (TDCP) implements a
36    <type>ContentProvider</type> for the <type>UniversalContentBroker</type>
37	(UCB).
38
39    <p>It provides access to the hierachical structure of the documents that
40    are active in a running OpenOffice.org process. As long as a document was
41    not closed, the TDCP can access it. All documents that have been loaded -
42    regardless of their persistent document format (sxw, doc, sxc, xls, ...)
43    or that have been created  but not yet saved to any storage medium, are
44    supported. The TDCP is not able to load any documents itself. This is
45    exclusively done by the OpenOffice.org document handling framework. The
46    document contents provided by the TDCP represent live data, which may
47    differ from any persistent representation of the document, for instance,
48    because the user modified the document after loading, but did not yet save
49    it.
50
51    @see TransientDocumentsRootContent
52    @see TransientDocumentsDocumentContent
53    @see TransientDocumentsFolderContent
54    @see TransientDocumentsStreamContent
55
56    @since OOo 2.0
57*/
58service TransientDocumentsContentProvider
59{
60	//-------------------------------------------------------------------------
61    /** provides four different types of contents: Stream, Folder, Document and
62        Root.
63
64		<p>
65
66        <b>TDCP Contents</b>
67		<ol>
68		<li>
69        A TDCP Stream (<type>TransientDocumentsStreamContent</type>) is a
70        content which represents a data stream of an Office document. It is
71        contained in a TDCP Folder or TDCP Document. A TDCP Stream has no
72        children.
73		</li>
74		<li>
75        A TDCP Folder (<type>TransientDocumentsFolderContent</type>) is a
76        container for other TDCP Folders and TDCP Streams. It may be contained
77        in another TDCP Folder or in a TDCP Document.
78		</li>
79		<li>
80        A TDCP Document (<type>TransientDocumentsDocumentContent</type>)
81        represents the root folder of a transient document. It is a container
82        for other TDCP Folders and TDCP Streams. It is always a child of the
83        TDCP Root.
84		</li>
85        <li>
86        There is at most one instance of a TDCP Root
87        (<type>TransientDocumentsRootContent</type>) at a time. All other TDCP
88        contents are children of this folder. The TDCP Root Folder can contain
89        only TDCP Documents. It has the fixed URL "vnd.sun.star.tdoc:/".
90        </li>
91		</ol>
92
93        <p><b>URL Scheme for TDCP Contents</b>
94
95        <p>Each TDCP content has an identifier corresponding to the following
96        scheme:
97
98        <ul>
99        <li>
100        tdcp-URL   = "vnd.sun.star.tdoc:" abs-path
101        </li>
102        <li>
103        abs-path   = +( "/" segment )
104        </li>
105        <li>
106        segment    = *( pchar )
107        </li>
108        <li>
109        pchar      = unreserved | escaped | ":" | "@" | "&" | "=" | "+" | "$" | ","
110        </li>
111        <li>
112        unreserved = alphanum | mark
113        </li>
114        <li>
115        mark       = "-" | "_" | "." | "!" | "~" | "*" | "'" | "("  | ")"
116        </li>
117        <li>
118        escaped    = "%" hex hex
119        </li>
120        </ul>
121
122        <p>Examples:
123
124        <ul>
125        <li>
126        vnd.sun.star.tdoc:/
127        ( The TDCP Root  )
128        </li>
129        <li>
130        vnd.sun.star.tdoc:/22
131        ( The document with the id 22 )
132        </li>
133        <li>
134        vnd.sun.star.tdoc:/22/
135        ( The document with the id 22 )
136        </li>
137        <li>
138        vnd.sun.star.tdoc:/42/folder/subfolder
139        ( The folder/stream named subfolder contained in folder named folder,
140        which is contained in the document with the id 42 )
141        </li>
142        </ul>
143
144        </p>
145     */
146	interface com::sun::star::ucb::XContentProvider;
147
148};
149
150//=============================================================================
151
152}; }; }; };
153
154#endif
155