Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / xml / sax / XFastTokenHandler.idl
blobd4998aeeb153f291ebb4b9b078002c46c0088f6c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XFastTokenHandler.idl,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__
31 #define __com_sun_star_xml_sax_XFastTokenHandler_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 //=============================================================================
39 module com { module sun { module star { module xml { module sax {
41 //============================================================================
43 /** interface to translate xml strings to integer tokens.
45 <p>An instance of this interface can be registered at a <type>XFastParser</type>.
46 It should be able to translate all xml names (element local names,
47 attribute local names and constant attribute values) to integer tokens.
49 A token value must be greater or equal to zero and less than
50 <const>FastToken::NAMESPACE</const>. If a string identifier is not known
51 to this instance, <const>FastToken::DONTKNOW</const> is returned.
53 interface XFastTokenHandler: com::sun::star::uno::XInterface
55 //-------------------------------------------------------------------------
57 /** returns a integer token for the given string identifier.
59 @returns
60 a unique integer token for the given String or <const>FastToken::DONTKNOW</const>
61 if the identifier is not known to this instance.
63 long getToken( [in] string Identifier );
65 //-------------------------------------------------------------------------
67 /** returns a string identifier for the given integer token.
69 string getIdentifier( [in] long Token );
71 //-------------------------------------------------------------------------
73 /** returns a integer token for the given string
75 @param Identifier
76 the string given as a byte sequence encoded in UTF8
78 @returns
79 a unique integer token for the given String or <const>FastToken::DONTKNOW</const>
80 if the identifier is not known to this instance.
82 long getTokenFromUTF8( [in] sequence< byte > Identifier );
84 //-------------------------------------------------------------------------
86 /** returns a identifier for the given integer token as a byte
87 sequence encoded in UTF8.
89 sequence< byte > getUTF8Identifier( [in] long Token );
92 //============================================================================
94 }; }; }; }; };
96 #endif