1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski#ifndef com_sun_star_graphic_XGraphicProvider_idl
25*b1cdbd2cSJim Jagielski#define com_sun_star_graphic_XGraphicProvider_idl
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski#include <com/sun/star/io/XInputStream.idl>
28*b1cdbd2cSJim Jagielski#include <com/sun/star/io/XOutputStream.idl>
29*b1cdbd2cSJim Jagielski#include <com/sun/star/io/IOException.idl>
30*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl>
31*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/WrappedTargetException.idl>
32*b1cdbd2cSJim Jagielski#include <com/sun/star/beans/PropertyValues.idl>
33*b1cdbd2cSJim Jagielski#include <com/sun/star/beans/XPropertySet.idl>
34*b1cdbd2cSJim Jagielski#include <com/sun/star/graphic/XGraphic.idl>
35*b1cdbd2cSJim Jagielski
36*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module graphic
37*b1cdbd2cSJim Jagielski{
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim Jagielski/** This interface acts as the main interface to handle graphic
40*b1cdbd2cSJim Jagielski	content. It is used to load graphics, store graphics and
41*b1cdbd2cSJim Jagielski	to get information about unloaded graphics
42*b1cdbd2cSJim Jagielski  */
43*b1cdbd2cSJim Jagielskipublished interface XGraphicProvider : ::com::sun::star::uno::XInterface
44*b1cdbd2cSJim Jagielski{
45*b1cdbd2cSJim Jagielski	/** Calling this method returns a
46*b1cdbd2cSJim Jagielski		<type scope="com::sun::star::beans">XPropertySet</type>
47*b1cdbd2cSJim Jagielski		interface that gives access to the properties of the
48*b1cdbd2cSJim Jagielski		unloaded graphic
49*b1cdbd2cSJim Jagielski
50*b1cdbd2cSJim Jagielski		<p>In most cases, this method will be used to query the
51*b1cdbd2cSJim Jagielski		mime type of the graphic and, in the case of pixel graphics,
52*b1cdbd2cSJim Jagielski		the resulting size after loading</p>
53*b1cdbd2cSJim Jagielski
54*b1cdbd2cSJim Jagielski		@param MediaProperties
55*b1cdbd2cSJim Jagielski			A sequence of property values to describe the location
56*b1cdbd2cSJim Jagielski			of the graphic, for which the attributes should be returned
57*b1cdbd2cSJim Jagielski
58*b1cdbd2cSJim Jagielski		@returns
59*b1cdbd2cSJim Jagielski			A <type scope="com::sun::star::beans">XPropertySet</type> interface
60*b1cdbd2cSJim Jagielski			to get access to the different graphic properties
61*b1cdbd2cSJim Jagielski
62*b1cdbd2cSJim Jagielski		@see MediaProperties
63*b1cdbd2cSJim Jagielski		@see GraphicDescriptor
64*b1cdbd2cSJim Jagielski		@see com::sun::star::beans::PropertyValues
65*b1cdbd2cSJim Jagielski	*/
66*b1cdbd2cSJim Jagielski	::com::sun::star::beans::XPropertySet	queryGraphicDescriptor( [in] ::com::sun::star::beans::PropertyValues MediaProperties )
67*b1cdbd2cSJim Jagielski												raises( ::com::sun::star::io::IOException,
68*b1cdbd2cSJim Jagielski    					        						::com::sun::star::lang::IllegalArgumentException,
69*b1cdbd2cSJim Jagielski														::com::sun::star::lang::WrappedTargetException );
70*b1cdbd2cSJim Jagielski
71*b1cdbd2cSJim Jagielski
72*b1cdbd2cSJim Jagielski
73*b1cdbd2cSJim Jagielski	/** Calling this method returns a <type>XGraphic</type> interface
74*b1cdbd2cSJim Jagielski		that holds the graphic content after loading the graphic
75*b1cdbd2cSJim Jagielski
76*b1cdbd2cSJim Jagielski		@param MediaProperties
77*b1cdbd2cSJim Jagielski			A sequence of property values to describe the location
78*b1cdbd2cSJim Jagielski			of the graphic from which the graphic is to be loaded
79*b1cdbd2cSJim Jagielski
80*b1cdbd2cSJim Jagielski		@returns
81*b1cdbd2cSJim Jagielski			The <type>XGraphic</type> interface
82*b1cdbd2cSJim Jagielski
83*b1cdbd2cSJim Jagielski		@see MediaProperties
84*b1cdbd2cSJim Jagielski		@see XGraphic
85*b1cdbd2cSJim Jagielski		@see com::sun::star::beans::PropertyValues
86*b1cdbd2cSJim Jagielski	*/
87*b1cdbd2cSJim Jagielski	XGraphic	queryGraphic( [in] ::com::sun::star::beans::PropertyValues MediaProperties )
88*b1cdbd2cSJim Jagielski				     raises( ::com::sun::star::io::IOException,
89*b1cdbd2cSJim Jagielski    				 	     ::com::sun::star::lang::IllegalArgumentException,
90*b1cdbd2cSJim Jagielski							 ::com::sun::star::lang::WrappedTargetException );
91*b1cdbd2cSJim Jagielski
92*b1cdbd2cSJim Jagielski	/** Store the graphic content, represented through the <type>XGraphic</type>
93*b1cdbd2cSJim Jagielski		interface at the specified location
94*b1cdbd2cSJim Jagielski
95*b1cdbd2cSJim Jagielski		@param Graphic
96*b1cdbd2cSJim Jagielski			The graphic that should be stored
97*b1cdbd2cSJim Jagielski
98*b1cdbd2cSJim Jagielski		@param MediaProperties
99*b1cdbd2cSJim Jagielski			A sequence of property values to describe the destination
100*b1cdbd2cSJim Jagielski			location of the graphic
101*b1cdbd2cSJim Jagielski
102*b1cdbd2cSJim Jagielski		@see XGraphic
103*b1cdbd2cSJim Jagielski		@see MediaProperties
104*b1cdbd2cSJim Jagielski		@see com::sun::star::beans::PropertyValues
105*b1cdbd2cSJim Jagielski	*/
106*b1cdbd2cSJim Jagielski	void		storeGraphic( [in] ::com::sun::star::graphic::XGraphic Graphic,
107*b1cdbd2cSJim Jagielski							  [in] ::com::sun::star::beans::PropertyValues MediaProperties  )
108*b1cdbd2cSJim Jagielski				    raises( ::com::sun::star::io::IOException,
109*b1cdbd2cSJim Jagielski    			     		::com::sun::star::lang::IllegalArgumentException,
110*b1cdbd2cSJim Jagielski							::com::sun::star::lang::WrappedTargetException );
111*b1cdbd2cSJim Jagielski};
112*b1cdbd2cSJim Jagielski
113*b1cdbd2cSJim Jagielski} ; } ; } ; } ;
114*b1cdbd2cSJim Jagielski
115*b1cdbd2cSJim Jagielski#endif
116