/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ #ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__ #define __com_sun_star_xml_sax_XFastTokenHandler_idl__ #ifndef __com_sun_star_uno_XInterface_idl__ #include #endif //============================================================================= module com { module sun { module star { module xml { module sax { //============================================================================ /** interface to translate xml strings to integer tokens.

An instance of this interface can be registered at a XFastParser. It should be able to translate all xml names (element local names, attribute local names and constant attribute values) to integer tokens. A token value must be greater or equal to zero and less than FastToken::NAMESPACE. If a string identifier is not known to this instance, FastToken::DONTKNOW is returned. */ interface XFastTokenHandler: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** returns a integer token for the given string identifier. @returns a unique integer token for the given String or FastToken::DONTKNOW if the identifier is not known to this instance. */ long getToken( [in] string Identifier ); //------------------------------------------------------------------------- /** returns a string identifier for the given integer token. */ string getIdentifier( [in] long Token ); //------------------------------------------------------------------------- /** returns a integer token for the given string @param Identifier the string given as a byte sequence encoded in UTF8 @returns a unique integer token for the given String or FastToken::DONTKNOW if the identifier is not known to this instance. */ long getTokenFromUTF8( [in] sequence< byte > Identifier ); //------------------------------------------------------------------------- /** returns a identifier for the given integer token as a byte sequence encoded in UTF8. */ sequence< byte > getUTF8Identifier( [in] long Token ); }; //============================================================================ }; }; }; }; }; #endif