xref: /AOO42X/main/offapi/com/sun/star/embed/XEmbedObjectCreator.idl (revision d7a630b93db4316516c543e21eb4f4faf6d62bb4)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_embed_XEmbedObjectCreator_idl__
24cdf0e10cSrcweir#define __com_sun_star_embed_XEmbedObjectCreator_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_embed_XStorage_idl__
31cdf0e10cSrcweir#include <com/sun/star/embed/XStorage.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_io_IOException_idl__
35cdf0e10cSrcweir#include <com/sun/star/io/IOException.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_embed_WrongStateException_idl__
39cdf0e10cSrcweir#include <com/sun/star/embed/WrongStateException.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
47cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
48cdf0e10cSrcweir#endif
49cdf0e10cSrcweir
50cdf0e10cSrcweir//============================================================================
51cdf0e10cSrcweir
52cdf0e10cSrcweir module com {  module sun {  module star {  module embed {
53cdf0e10cSrcweir
54cdf0e10cSrcweir//============================================================================
55cdf0e10cSrcweir/** allows to create and initialize a new embedded object.
56cdf0e10cSrcweir
57cdf0e10cSrcweir    <p>
58cdf0e10cSrcweir    This interface contains methods that can help to create and initialize
59cdf0e10cSrcweir    an embedded object.
60cdf0e10cSrcweir    </p>
61cdf0e10cSrcweir */
62cdf0e10cSrcweirpublished interface XEmbedObjectCreator: com::sun::star::uno::XInterface
63cdf0e10cSrcweir{
64cdf0e10cSrcweir    // -----------------------------------------------------------------------
65cdf0e10cSrcweir    /** creates a new object and initializes it as a new one.
66cdf0e10cSrcweir
67cdf0e10cSrcweir        <p> In case specified entry exists it's contents are ignored and
68cdf0e10cSrcweir        will be overwritten on storing.
69cdf0e10cSrcweir        </p>
70cdf0e10cSrcweir
71cdf0e10cSrcweir        @param aClassID
72cdf0e10cSrcweir            the class id of the new object
73cdf0e10cSrcweir
74cdf0e10cSrcweir        @param sClassName
75cdf0e10cSrcweir            the class name of the new object
76cdf0e10cSrcweir
77cdf0e10cSrcweir        @param xStorage
78cdf0e10cSrcweir            a parent storage the entry should be created/opened in
79cdf0e10cSrcweir
80cdf0e10cSrcweir        @param sEntryName
81cdf0e10cSrcweir            a name for the entry
82cdf0e10cSrcweir
83cdf0e10cSrcweir        @param aObjectArgs
84cdf0e10cSrcweir            optional parameters for the object persistence initialization
85cdf0e10cSrcweir            see also
86cdf0e10cSrcweir            <type>EmbeddedObjectDescriptor</type>
87cdf0e10cSrcweir
88cdf0e10cSrcweir        @throws ::com::sun::star::lang::IllegalArgumentException
89cdf0e10cSrcweir            one of arguments is illegal
90cdf0e10cSrcweir
91cdf0e10cSrcweir        @throws com::sun::star::io::IOException
92cdf0e10cSrcweir            in case of io problems during opening\creation
93cdf0e10cSrcweir
94cdf0e10cSrcweir        @throws com::sun::star::uno::Exception
95cdf0e10cSrcweir            in case of other problems
96cdf0e10cSrcweir     */
97cdf0e10cSrcweir    ::com::sun::star::uno::XInterface createInstanceInitNew(
98cdf0e10cSrcweir            [in] sequence< byte > aClassID,
99cdf0e10cSrcweir            [in] string sClassName,
100cdf0e10cSrcweir            [in] ::com::sun::star::embed::XStorage xStorage,
101cdf0e10cSrcweir            [in] string sEntryName,
102cdf0e10cSrcweir            [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
103cdf0e10cSrcweir        raises( ::com::sun::star::lang::IllegalArgumentException,
104cdf0e10cSrcweir                ::com::sun::star::io::IOException,
105cdf0e10cSrcweir                ::com::sun::star::uno::Exception );
106cdf0e10cSrcweir
107cdf0e10cSrcweir
108cdf0e10cSrcweir    // -----------------------------------------------------------------------
109cdf0e10cSrcweir    /** creates a new object that should be based on specified storage entry.
110cdf0e10cSrcweir
111cdf0e10cSrcweir        <p> The specified entry must exists and the object should be loaded
112cdf0e10cSrcweir        from the entry. In case a persistent representation of a link is
113cdf0e10cSrcweir        specified, the result object will be a link.
114cdf0e10cSrcweir        </p>
115cdf0e10cSrcweir
116cdf0e10cSrcweir        @param xStorage
117cdf0e10cSrcweir            a parent storage the entry should be opened in
118cdf0e10cSrcweir
119cdf0e10cSrcweir        @param sEntryName
120cdf0e10cSrcweir            a name for the entry
121cdf0e10cSrcweir
122cdf0e10cSrcweir        @param aMediaDescriptor
123cdf0e10cSrcweir            an object of type
124cdf0e10cSrcweir            <type scope="com::sun::star::document">MediaDescriptor</type> that
125cdf0e10cSrcweir            specifies document related properties; please remember that target
126cdf0e10cSrcweir            related parameters, for example URL, will be ignored since the
127cdf0e10cSrcweir            object should be loaded from storage entry
128cdf0e10cSrcweir
129cdf0e10cSrcweir        @param aObjectArgs
130cdf0e10cSrcweir            an object of type <type>EmbeddedObjectDescriptor</type>
131cdf0e10cSrcweir            contains object related properties
132cdf0e10cSrcweir
133*8e0daafcSTsutomu Uchino        @throws ::com::sun::star::lang::IllegalArgumentException
134cdf0e10cSrcweir            one of arguments is illegal
135cdf0e10cSrcweir
136*8e0daafcSTsutomu Uchino        @throws ::com::sun::star::container::NoSuchElementException
137cdf0e10cSrcweir            the specified entry does not exist
138cdf0e10cSrcweir
139cdf0e10cSrcweir        @throws com::sun::star::io::IOException
140cdf0e10cSrcweir            in case of io problems during opening
141cdf0e10cSrcweir
142cdf0e10cSrcweir        @throws com::sun::star::uno::Exception
143cdf0e10cSrcweir            in case of other problems
144cdf0e10cSrcweir     */
145cdf0e10cSrcweir    ::com::sun::star::uno::XInterface createInstanceInitFromEntry(
146cdf0e10cSrcweir            [in] ::com::sun::star::embed::XStorage xStorage,
147cdf0e10cSrcweir            [in] string sEntryName,
148cdf0e10cSrcweir            [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor,
149cdf0e10cSrcweir            [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
150cdf0e10cSrcweir        raises( ::com::sun::star::lang::IllegalArgumentException,
151cdf0e10cSrcweir                ::com::sun::star::container::NoSuchElementException,
152cdf0e10cSrcweir                ::com::sun::star::io::IOException,
153cdf0e10cSrcweir                ::com::sun::star::uno::Exception );
154cdf0e10cSrcweir
155cdf0e10cSrcweir    // -----------------------------------------------------------------------
156cdf0e10cSrcweir    /** creates a new object and initializes it based on
157cdf0e10cSrcweir        <type scope="com::sun::star::document">MediaDescriptor</type>.
158cdf0e10cSrcweir
159cdf0e10cSrcweir        <p> In case specified entry exists it's contents are ignored and will
160cdf0e10cSrcweir        be overwritten on storing.
161cdf0e10cSrcweir        </p>
162cdf0e10cSrcweir
163cdf0e10cSrcweir        @param xStorage
164cdf0e10cSrcweir            a parent storage the entry should be created/opened in
165cdf0e10cSrcweir
166cdf0e10cSrcweir        @param sEntryName
167cdf0e10cSrcweir            a name for the entry
168cdf0e10cSrcweir
169cdf0e10cSrcweir        @param aMediaDescriptor
170cdf0e10cSrcweir            an object of type
171cdf0e10cSrcweir            <type scope="com::sun::star::document">MediaDescriptor</type> that
172cdf0e10cSrcweir            specifies source
173cdf0e10cSrcweir
174cdf0e10cSrcweir        @param aObjectArgs
175cdf0e10cSrcweir            an object of type <type>EmbeddedObjectDescriptor</type>
176cdf0e10cSrcweir            contains object related properties
177cdf0e10cSrcweir
178*8e0daafcSTsutomu Uchino        @throws ::com::sun::star::lang::IllegalArgumentException
179cdf0e10cSrcweir            one of arguments is illegal
180cdf0e10cSrcweir
181cdf0e10cSrcweir        @throws com::sun::star::io::IOException
182cdf0e10cSrcweir            in case of io problems during opening\creation
183cdf0e10cSrcweir
184cdf0e10cSrcweir        @throws com::sun::star::uno::Exception
185cdf0e10cSrcweir            in case of other problems
186cdf0e10cSrcweir     */
187cdf0e10cSrcweir    ::com::sun::star::uno::XInterface createInstanceInitFromMediaDescriptor(
188cdf0e10cSrcweir            [in] ::com::sun::star::embed::XStorage xStorage,
189cdf0e10cSrcweir            [in] string sEntryName,
190cdf0e10cSrcweir            [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor,
191cdf0e10cSrcweir            [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
192cdf0e10cSrcweir        raises( ::com::sun::star::lang::IllegalArgumentException,
193cdf0e10cSrcweir                ::com::sun::star::io::IOException,
194cdf0e10cSrcweir                ::com::sun::star::uno::Exception );
195cdf0e10cSrcweir};
196cdf0e10cSrcweir
197cdf0e10cSrcweir//============================================================================
198cdf0e10cSrcweir
199cdf0e10cSrcweir}; }; }; };
200cdf0e10cSrcweir
201cdf0e10cSrcweir#endif
202