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_XEmbedObjectFactory_idl__
24#define __com_sun_star_embed_XEmbedObjectFactory_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_embed_XStorage_idl__
31#include <com/sun/star/embed/XStorage.idl>
32#endif
33
34#ifndef __com_sun_star_io_IOException_idl__
35#include <com/sun/star/io/IOException.idl>
36#endif
37
38#ifndef __com_sun_star_embed_WrongStateException_idl__
39#include <com/sun/star/embed/WrongStateException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43#include <com/sun/star/lang/IllegalArgumentException.idl>
44#endif
45
46#ifndef __com_sun_star_beans_PropertyValue_idl__
47#include <com/sun/star/beans/PropertyValue.idl>
48#endif
49
50//============================================================================
51
52 module com {  module sun {  module star {  module embed {
53
54//============================================================================
55/** allows to create and initialize a new embedded object of specified type.
56	<p>
57	This interface provides user with full control over object creation.
58	</p>
59 */
60published interface XEmbedObjectFactory: com::sun::star::uno::XInterface
61{
62	//------------------------------------------------------------------------
63    /** creates a new object and transport parameters for persistent
64		initialization.
65
66		<p>
67		This method can be used to have a full control over persistence
68		initialization of a object.
69		</p>
70
71        <p>
72        If the service implementation does not support
73        <type>XEmbedObjectCreator</type> interface, it must accept the empty
74        aClassID parameter in case of loading from existing entry.
75        </p>
76
77		@param aClassID
78			the class id of the new object
79
80		@param sClassName
81			the class name of the new object
82
83		@param xStorage
84			a parent storage the entry should be created/opened in
85
86		@param sEntName
87			a name for the entry
88
89		@param nEntryConnectionMode
90			a mode in which the object should be initialized from entry
91			can take values from <type>EntryInitModes</type> constant set
92
93        @param aArgs
94            optional parameters for the embedded document persistence
95			initialization, see also
96			<type scope="com::sun::star::document">MediaDescriptor</type>
97
98        @param aObjectArgs
99            optional parameters for the object persistence initialization,
100            see also
101			<type scope="com::sun::star::embed">EmbeddedObjectDescriptor</type>
102
103		@thrown ::com::sun::star::lang::IllegalArgumentException
104			one of arguments is illegal
105
106        @throws com::sun::star::io::IOException
107			in case of io problems during opening\creation
108
109        @throws com::sun::star::uno::Exception
110			in case of other problems
111	 */
112	::com::sun::star::uno::XInterface createInstanceUserInit(
113			[in] sequence< byte > aClassID,
114			[in] string sClassName,
115			[in] ::com::sun::star::embed::XStorage xStorage,
116			[in] string sEntName,
117			[in] long nEntryConnectionMode,
118			[in] sequence< ::com::sun::star::beans::PropertyValue > aArgs,
119			[in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
120		raises( ::com::sun::star::lang::IllegalArgumentException,
121				::com::sun::star::io::IOException,
122				::com::sun::star::uno::Exception );
123};
124
125//============================================================================
126
127}; }; }; };
128
129#endif
130
131