1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XLinguServiceManager_idl__
28*cdf0e10cSrcweir#define __com_sun_star_linguistic2_XLinguServiceManager_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XSpellChecker_idl__
32*cdf0e10cSrcweir#include <com/sun/star/linguistic2/XSpellChecker.idl>
33*cdf0e10cSrcweir#endif
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XHyphenator_idl__
36*cdf0e10cSrcweir#include <com/sun/star/linguistic2/XHyphenator.idl>
37*cdf0e10cSrcweir#endif
38*cdf0e10cSrcweir
39*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XThesaurus_idl__
40*cdf0e10cSrcweir#include <com/sun/star/linguistic2/XThesaurus.idl>
41*cdf0e10cSrcweir#endif
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XEventListener_idl__
44*cdf0e10cSrcweir#include <com/sun/star/lang/XEventListener.idl>
45*cdf0e10cSrcweir#endif
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir//=============================================================================
48*cdf0e10cSrcweir
49*cdf0e10cSrcweirmodule com { module sun { module star { module linguistic2 {
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir//=============================================================================
52*cdf0e10cSrcweir/** the basic interface to be used to access linguistic functionality.
53*cdf0e10cSrcweir
54*cdf0e10cSrcweir	<P>This interface is used to access spellchecker, hyphenator, and
55*cdf0e10cSrcweir	thesaurus functionality.
56*cdf0e10cSrcweir	Additionally, it can query what implementations of those services are
57*cdf0e10cSrcweir	available (for specific languages or in general).
58*cdf0e10cSrcweir	It can select and query which of those implementations should
59*cdf0e10cSrcweir	be used for a specific language.</P>
60*cdf0e10cSrcweir
61*cdf0e10cSrcweir	<P>
62*cdf0e10cSrcweir	For spellchecking and thesaurus, the order in the list defines the order
63*cdf0e10cSrcweir	of creation/usage of those services.
64*cdf0e10cSrcweir	That is, if the first spellchecker implementation does not recognize
65*cdf0e10cSrcweir	the given word as correct, the second service implementation for that
66*cdf0e10cSrcweir	language is created and gets queried. If that one fails, the third one
67*cdf0e10cSrcweir	gets created and queried and so on.
68*cdf0e10cSrcweir	This chain stops if an implementation reports the word as correct or the
69*cdf0e10cSrcweir	end of the list is reached, in which case the word is reported as incorrect.
70*cdf0e10cSrcweir	</P>
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir	<P> For the thesaurus, the behavior is the same when no meaning was found.
73*cdf0e10cSrcweir	</P>
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir    @see    <type scope="com::sun::star::linguistic2">SpellChecker</type>
76*cdf0e10cSrcweir    @see    <type scope="com::sun::star::linguistic2">Hyphenator</type>
77*cdf0e10cSrcweir    @see    <type scope="com::sun::star::linguistic2">Thesaurus</type>
78*cdf0e10cSrcweir*/
79*cdf0e10cSrcweirpublished interface XLinguServiceManager : com::sun::star::uno::XInterface
80*cdf0e10cSrcweir{
81*cdf0e10cSrcweir	//-------------------------------------------------------------------------
82*cdf0e10cSrcweir	/**
83*cdf0e10cSrcweir		@returns
84*cdf0e10cSrcweir			the <type scope="com::sun::star::linguistic2">XSpellChecker</type>
85*cdf0e10cSrcweir			interface to be used for spellchecking.
86*cdf0e10cSrcweir	*/
87*cdf0e10cSrcweir	com::sun::star::linguistic2::XSpellChecker	getSpellChecker();
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir	//-------------------------------------------------------------------------
90*cdf0e10cSrcweir	/**
91*cdf0e10cSrcweir		@returns
92*cdf0e10cSrcweir			the <type scope="com::sun::star::linguistic2">XHyphenator</type>
93*cdf0e10cSrcweir			interface to be used for hyphenation.
94*cdf0e10cSrcweir	*/
95*cdf0e10cSrcweir	com::sun::star::linguistic2::XHyphenator	getHyphenator();
96*cdf0e10cSrcweir
97*cdf0e10cSrcweir	//-------------------------------------------------------------------------
98*cdf0e10cSrcweir	/**
99*cdf0e10cSrcweir		@returns
100*cdf0e10cSrcweir			the <type scope="com::sun::star::linguistic2">XThesaurus</type>
101*cdf0e10cSrcweir			interface to be used for thesaurus functionality.
102*cdf0e10cSrcweir	*/
103*cdf0e10cSrcweir	com::sun::star::linguistic2::XThesaurus		getThesaurus();
104*cdf0e10cSrcweir
105*cdf0e10cSrcweir	//-------------------------------------------------------------------------
106*cdf0e10cSrcweir	/** adds a listener to the list of event listeners.
107*cdf0e10cSrcweir
108*cdf0e10cSrcweir		<P>The listeners may support one or both of
109*cdf0e10cSrcweir		<type scope="com::sun::star::linguistic2">XDictionaryEventListener</type>
110*cdf0e10cSrcweir		and
111*cdf0e10cSrcweir		<type scope="com::sun::star::linguistic2">XLinguServiceEventListener</type>
112*cdf0e10cSrcweir		interfaces.
113*cdf0e10cSrcweir		</P>
114*cdf0e10cSrcweir
115*cdf0e10cSrcweir		@returns
116*cdf0e10cSrcweir			<TRUE/> if the listener was succesfully added, <FALSE/> otherwise.
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir		@param xListener
119*cdf0e10cSrcweir			the listener to be added.
120*cdf0e10cSrcweir	*/
121*cdf0e10cSrcweir	boolean		addLinguServiceManagerListener(
122*cdf0e10cSrcweir		[in] com::sun::star::lang::XEventListener xListener );
123*cdf0e10cSrcweir
124*cdf0e10cSrcweir	//-------------------------------------------------------------------------
125*cdf0e10cSrcweir	/** removes a listener from the list of event listeners.
126*cdf0e10cSrcweir
127*cdf0e10cSrcweir		@returns
128*cdf0e10cSrcweir			<TRUE/> if the listener was succesfully removed, <FALSE/> otherwise.
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir		@param xListener
131*cdf0e10cSrcweir			the listener to be removed.
132*cdf0e10cSrcweir	*/
133*cdf0e10cSrcweir	boolean		removeLinguServiceManagerListener(
134*cdf0e10cSrcweir		[in] com::sun::star::lang::XEventListener xListener );
135*cdf0e10cSrcweir
136*cdf0e10cSrcweir	//-------------------------------------------------------------------------
137*cdf0e10cSrcweir	/**
138*cdf0e10cSrcweir		@returns
139*cdf0e10cSrcweir			the list of implementation names of the available services.
140*cdf0e10cSrcweir
141*cdf0e10cSrcweir		@param aServiceName
142*cdf0e10cSrcweir			the name of the service requesting the list of available
143*cdf0e10cSrcweir			implementations.
144*cdf0e10cSrcweir
145*cdf0e10cSrcweir		@param aLocale
146*cdf0e10cSrcweir			the language used to query the list of available implementations.
147*cdf0e10cSrcweir	*/
148*cdf0e10cSrcweir	sequence< string >	getAvailableServices(
149*cdf0e10cSrcweir		[in] string 						aServiceName,
150*cdf0e10cSrcweir		[in] com::sun::star::lang::Locale 	aLocale );
151*cdf0e10cSrcweir
152*cdf0e10cSrcweir	//-------------------------------------------------------------------------
153*cdf0e10cSrcweir	/** sets the list of service implementations to be used for a
154*cdf0e10cSrcweir		given service and language.
155*cdf0e10cSrcweir
156*cdf0e10cSrcweir		@param aServiceName
157*cdf0e10cSrcweir			the name of the service to set the list of implementations
158*cdf0e10cSrcweir			to be used.
159*cdf0e10cSrcweir
160*cdf0e10cSrcweir		@param aLocale
161*cdf0e10cSrcweir			the language to set the list.
162*cdf0e10cSrcweir
163*cdf0e10cSrcweir		@param aServiceImplNames
164*cdf0e10cSrcweir			the name of the service to set the list.
165*cdf0e10cSrcweir	*/
166*cdf0e10cSrcweir	void				setConfiguredServices(
167*cdf0e10cSrcweir		[in] string 						aServiceName,
168*cdf0e10cSrcweir		[in] com::sun::star::lang::Locale 	aLocale,
169*cdf0e10cSrcweir		[in] sequence< string > 			aServiceImplNames );
170*cdf0e10cSrcweir
171*cdf0e10cSrcweir	//-------------------------------------------------------------------------
172*cdf0e10cSrcweir	/** queries the list of service implementations to be used for a
173*cdf0e10cSrcweir		given service and language.
174*cdf0e10cSrcweir
175*cdf0e10cSrcweir		@returns
176*cdf0e10cSrcweir			the list of implementation names of the services to be used.
177*cdf0e10cSrcweir
178*cdf0e10cSrcweir		@param aServiceName
179*cdf0e10cSrcweir			the name of the service to get queried.
180*cdf0e10cSrcweir
181*cdf0e10cSrcweir		@param aLocale
182*cdf0e10cSrcweir			the language to get queried.
183*cdf0e10cSrcweir	*/
184*cdf0e10cSrcweir	sequence< string >	getConfiguredServices(
185*cdf0e10cSrcweir		[in] string 						aServiceName,
186*cdf0e10cSrcweir		[in] com::sun::star::lang::Locale 	aLocale );
187*cdf0e10cSrcweir
188*cdf0e10cSrcweir};
189*cdf0e10cSrcweir
190*cdf0e10cSrcweir//=============================================================================
191*cdf0e10cSrcweir
192*cdf0e10cSrcweir}; }; }; };
193*cdf0e10cSrcweir
194*cdf0e10cSrcweir#endif
195