1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_ucb_TransientDocumentsContentProvider_idl__
28*cdf0e10cSrcweir#define __com_sun_star_ucb_TransientDocumentsContentProvider_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContentProvider_idl__
31*cdf0e10cSrcweir#include <com/sun/star/ucb/XContentProvider.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir//=============================================================================
35*cdf0e10cSrcweir
36*cdf0e10cSrcweirmodule com { module sun { module star { module ucb {
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir//=============================================================================
39*cdf0e10cSrcweir/** The Transient Documents Content Provider (TDCP) implements a
40*cdf0e10cSrcweir    <type>ContentProvider</type> for the <type>UniversalContentBroker</type>
41*cdf0e10cSrcweir	(UCB).
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir    <p>It provides access to the hierachical structure of the documents that
44*cdf0e10cSrcweir    are active in a running OpenOffice.org process. As long as a document was
45*cdf0e10cSrcweir    not closed, the TDCP can access it. All documents that have been loaded -
46*cdf0e10cSrcweir    regardless of their persistent document format (sxw, doc, sxc, xls, ...)
47*cdf0e10cSrcweir    or that have been created  but not yet saved to any storage medium, are
48*cdf0e10cSrcweir    supported. The TDCP is not able to load any documents itself. This is
49*cdf0e10cSrcweir    exclusively done by the OpenOffice.org document handling framework. The
50*cdf0e10cSrcweir    document contents provided by the TDCP represent live data, which may
51*cdf0e10cSrcweir    differ from any persistent representation of the document, for instance,
52*cdf0e10cSrcweir    because the user modified the document after loading, but did not yet save
53*cdf0e10cSrcweir    it.
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir    @see TransientDocumentsRootContent
56*cdf0e10cSrcweir    @see TransientDocumentsDocumentContent
57*cdf0e10cSrcweir    @see TransientDocumentsFolderContent
58*cdf0e10cSrcweir    @see TransientDocumentsStreamContent
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir    @since OOo 2.0
61*cdf0e10cSrcweir*/
62*cdf0e10cSrcweirservice TransientDocumentsContentProvider
63*cdf0e10cSrcweir{
64*cdf0e10cSrcweir	//-------------------------------------------------------------------------
65*cdf0e10cSrcweir    /** provides four different types of contents: Stream, Folder, Document and
66*cdf0e10cSrcweir        Root.
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir		<p>
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir        <b>TDCP Contents</b>
71*cdf0e10cSrcweir		<ol>
72*cdf0e10cSrcweir		<li>
73*cdf0e10cSrcweir        A TDCP Stream (<type>TransientDocumentsStreamContent</type>) is a
74*cdf0e10cSrcweir        content which represents a data stream of an Office document. It is
75*cdf0e10cSrcweir        contained in a TDCP Folder or TDCP Document. A TDCP Stream has no
76*cdf0e10cSrcweir        children.
77*cdf0e10cSrcweir		</li>
78*cdf0e10cSrcweir		<li>
79*cdf0e10cSrcweir        A TDCP Folder (<type>TransientDocumentsFolderContent</type>) is a
80*cdf0e10cSrcweir        container for other TDCP Folders and TDCP Streams. It may be contained
81*cdf0e10cSrcweir        in another TDCP Folder or in a TDCP Document.
82*cdf0e10cSrcweir		</li>
83*cdf0e10cSrcweir		<li>
84*cdf0e10cSrcweir        A TDCP Document (<type>TransientDocumentsDocumentContent</type>)
85*cdf0e10cSrcweir        represents the root folder of a transient document. It is a container
86*cdf0e10cSrcweir        for other TDCP Folders and TDCP Streams. It is always a child of the
87*cdf0e10cSrcweir        TDCP Root.
88*cdf0e10cSrcweir		</li>
89*cdf0e10cSrcweir        <li>
90*cdf0e10cSrcweir        There is at most one instance of a TDCP Root
91*cdf0e10cSrcweir        (<type>TransientDocumentsRootContent</type>) at a time. All other TDCP
92*cdf0e10cSrcweir        contents are children of this folder. The TDCP Root Folder can contain
93*cdf0e10cSrcweir        only TDCP Documents. It has the fixed URL "vnd.sun.star.tdoc:/".
94*cdf0e10cSrcweir        </li>
95*cdf0e10cSrcweir		</ol>
96*cdf0e10cSrcweir
97*cdf0e10cSrcweir        <p><b>URL Scheme for TDCP Contents</b>
98*cdf0e10cSrcweir
99*cdf0e10cSrcweir        <p>Each TDCP content has an identifier corresponding to the following
100*cdf0e10cSrcweir        scheme:
101*cdf0e10cSrcweir
102*cdf0e10cSrcweir        <ul>
103*cdf0e10cSrcweir        <li>
104*cdf0e10cSrcweir        tdcp-URL   = "vnd.sun.star.tdoc:" abs-path
105*cdf0e10cSrcweir        </li>
106*cdf0e10cSrcweir        <li>
107*cdf0e10cSrcweir        abs-path   = +( "/" segment )
108*cdf0e10cSrcweir        </li>
109*cdf0e10cSrcweir        <li>
110*cdf0e10cSrcweir        segment    = *( pchar )
111*cdf0e10cSrcweir        </li>
112*cdf0e10cSrcweir        <li>
113*cdf0e10cSrcweir        pchar      = unreserved | escaped | ":" | "@" | "&" | "=" | "+" | "$" | ","
114*cdf0e10cSrcweir        </li>
115*cdf0e10cSrcweir        <li>
116*cdf0e10cSrcweir        unreserved = alphanum | mark
117*cdf0e10cSrcweir        </li>
118*cdf0e10cSrcweir        <li>
119*cdf0e10cSrcweir        mark       = "-" | "_" | "." | "!" | "~" | "*" | "'" | "("  | ")"
120*cdf0e10cSrcweir        </li>
121*cdf0e10cSrcweir        <li>
122*cdf0e10cSrcweir        escaped    = "%" hex hex
123*cdf0e10cSrcweir        </li>
124*cdf0e10cSrcweir        </ul>
125*cdf0e10cSrcweir
126*cdf0e10cSrcweir        <p>Examples:
127*cdf0e10cSrcweir
128*cdf0e10cSrcweir        <ul>
129*cdf0e10cSrcweir        <li>
130*cdf0e10cSrcweir        vnd.sun.star.tdoc:/
131*cdf0e10cSrcweir        ( The TDCP Root  )
132*cdf0e10cSrcweir        </li>
133*cdf0e10cSrcweir        <li>
134*cdf0e10cSrcweir        vnd.sun.star.tdoc:/22
135*cdf0e10cSrcweir        ( The document with the id 22 )
136*cdf0e10cSrcweir        </li>
137*cdf0e10cSrcweir        <li>
138*cdf0e10cSrcweir        vnd.sun.star.tdoc:/22/
139*cdf0e10cSrcweir        ( The document with the id 22 )
140*cdf0e10cSrcweir        </li>
141*cdf0e10cSrcweir        <li>
142*cdf0e10cSrcweir        vnd.sun.star.tdoc:/42/folder/subfolder
143*cdf0e10cSrcweir        ( The folder/stream named subfolder contained in folder named folder,
144*cdf0e10cSrcweir        which is contained in the document with the id 42 )
145*cdf0e10cSrcweir        </li>
146*cdf0e10cSrcweir        </ul>
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir        </p>
149*cdf0e10cSrcweir     */
150*cdf0e10cSrcweir	interface com::sun::star::ucb::XContentProvider;
151*cdf0e10cSrcweir
152*cdf0e10cSrcweir};
153*cdf0e10cSrcweir
154*cdf0e10cSrcweir//=============================================================================
155*cdf0e10cSrcweir
156*cdf0e10cSrcweir}; }; }; };
157*cdf0e10cSrcweir
158*cdf0e10cSrcweir#endif
159