1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef com_sun_star_graphic_XGraphicProvider_idl
29#define com_sun_star_graphic_XGraphicProvider_idl
30
31#include <com/sun/star/io/XInputStream.idl>
32#include <com/sun/star/io/XOutputStream.idl>
33#include <com/sun/star/io/IOException.idl>
34#include <com/sun/star/lang/IllegalArgumentException.idl>
35#include <com/sun/star/lang/WrappedTargetException.idl>
36#include <com/sun/star/beans/PropertyValues.idl>
37#include <com/sun/star/beans/XPropertySet.idl>
38#include <com/sun/star/graphic/XGraphic.idl>
39
40module com { module sun { module star { module graphic
41{
42
43/** This interface acts as the main interface to handle graphic
44	content. It is used to load graphics, store graphics and
45	to get information about unloaded graphics
46  */
47published interface XGraphicProvider : ::com::sun::star::uno::XInterface
48{
49	/** Calling this method returns a
50		<type scope="com::sun::star::beans">XPropertySet</type>
51		interface that gives access to the properties of the
52		unloaded graphic
53
54		<p>In most cases, this method will be used to query the
55		mime type of the graphic and, in the case of pixel graphics,
56		the resulting size after loading</p>
57
58		@param MediaProperties
59			A sequence of property values to describe the location
60			of the graphic, for which the attributes should be returned
61
62		@returns
63			A <type scope="com::sun::star::beans">XPropertySet</type> interface
64			to get access to the different graphic properties
65
66		@see MediaProperties
67		@see GraphicDescriptor
68		@see com::sun::star::beans::PropertyValues
69	*/
70	::com::sun::star::beans::XPropertySet	queryGraphicDescriptor( [in] ::com::sun::star::beans::PropertyValues MediaProperties )
71												raises( ::com::sun::star::io::IOException,
72    					        						::com::sun::star::lang::IllegalArgumentException,
73														::com::sun::star::lang::WrappedTargetException );
74
75
76
77	/** Calling this method returns a <type>XGraphic</type> interface
78		that holds the graphic content after loading the graphic
79
80		@param MediaProperties
81			A sequence of property values to describe the location
82			of the graphic from which the graphic is to be loaded
83
84		@returns
85			The <type>XGraphic</type> interface
86
87		@see MediaProperties
88		@see XGraphic
89		@see com::sun::star::beans::PropertyValues
90	*/
91	XGraphic	queryGraphic( [in] ::com::sun::star::beans::PropertyValues MediaProperties )
92				     raises( ::com::sun::star::io::IOException,
93    				 	     ::com::sun::star::lang::IllegalArgumentException,
94							 ::com::sun::star::lang::WrappedTargetException );
95
96	/** Store the graphic content, represented through the <type>XGraphic</type>
97		interface at the specified location
98
99		@param Graphic
100			The graphic that should be stored
101
102		@param MediaProperties
103			A sequence of property values to describe the destination
104			location of the graphic
105
106		@see XGraphic
107		@see MediaProperties
108		@see com::sun::star::beans::PropertyValues
109	*/
110	void		storeGraphic( [in] ::com::sun::star::graphic::XGraphic Graphic,
111							  [in] ::com::sun::star::beans::PropertyValues MediaProperties  )
112				    raises( ::com::sun::star::io::IOException,
113    			     		::com::sun::star::lang::IllegalArgumentException,
114							::com::sun::star::lang::WrappedTargetException );
115};
116
117} ; } ; } ; } ;
118
119#endif
120