xref: /AOO41X/main/offapi/com/sun/star/graphic/XGraphicProvider.idl (revision d5bd2f9e3a2ae3e1afd69ce26d2fa06adc6f3f31)
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
24#ifndef com_sun_star_graphic_XGraphicProvider_idl
25#define com_sun_star_graphic_XGraphicProvider_idl
26
27#include <com/sun/star/io/XInputStream.idl>
28#include <com/sun/star/io/XOutputStream.idl>
29#include <com/sun/star/io/IOException.idl>
30#include <com/sun/star/lang/IllegalArgumentException.idl>
31#include <com/sun/star/lang/WrappedTargetException.idl>
32#include <com/sun/star/beans/PropertyValues.idl>
33#include <com/sun/star/beans/XPropertySet.idl>
34#include <com/sun/star/graphic/XGraphic.idl>
35
36module com { module sun { module star { module graphic
37{
38
39/** This interface acts as the main interface to handle graphic
40    content. It is used to load graphics, store graphics and
41    to get information about unloaded graphics
42  */
43published interface XGraphicProvider : ::com::sun::star::uno::XInterface
44{
45    /** Calling this method returns a
46        <type scope="com::sun::star::beans">XPropertySet</type>
47        interface that gives access to the properties of the
48        unloaded graphic
49
50        <p>In most cases, this method will be used to query the
51        mime type of the graphic and, in the case of pixel graphics,
52        the resulting size after loading</p>
53
54        @param MediaProperties
55            A sequence of property values to describe the location
56            of the graphic, for which the attributes should be returned
57
58        @returns
59            A <type scope="com::sun::star::beans">XPropertySet</type> interface
60            to get access to the different graphic properties
61
62        @see MediaProperties
63        @see GraphicDescriptor
64        @see com::sun::star::beans::PropertyValues
65    */
66    ::com::sun::star::beans::XPropertySet   queryGraphicDescriptor( [in] ::com::sun::star::beans::PropertyValues MediaProperties )
67                                                raises( ::com::sun::star::io::IOException,
68                                                        ::com::sun::star::lang::IllegalArgumentException,
69                                                        ::com::sun::star::lang::WrappedTargetException );
70
71
72
73    /** Calling this method returns a <type>XGraphic</type> interface
74        that holds the graphic content after loading the graphic
75
76        @param MediaProperties
77            A sequence of property values to describe the location
78            of the graphic from which the graphic is to be loaded
79
80        @returns
81            The <type>XGraphic</type> interface
82
83        @see MediaProperties
84        @see XGraphic
85        @see com::sun::star::beans::PropertyValues
86    */
87    XGraphic    queryGraphic( [in] ::com::sun::star::beans::PropertyValues MediaProperties )
88                     raises( ::com::sun::star::io::IOException,
89                             ::com::sun::star::lang::IllegalArgumentException,
90                             ::com::sun::star::lang::WrappedTargetException );
91
92    /** Store the graphic content, represented through the <type>XGraphic</type>
93        interface at the specified location
94
95        @param Graphic
96            The graphic that should be stored
97
98        @param MediaProperties
99            A sequence of property values to describe the destination
100            location of the graphic
101
102        @see XGraphic
103        @see MediaProperties
104        @see com::sun::star::beans::PropertyValues
105    */
106    void        storeGraphic( [in] ::com::sun::star::graphic::XGraphic Graphic,
107                              [in] ::com::sun::star::beans::PropertyValues MediaProperties  )
108                    raises( ::com::sun::star::io::IOException,
109                            ::com::sun::star::lang::IllegalArgumentException,
110                            ::com::sun::star::lang::WrappedTargetException );
111};
112
113} ; } ; } ; } ;
114
115#endif
116