1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/translation/cld2/internal/langspan.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 +// Copyright 2013 Google Inc. All Rights Reserved. 1.5 +// 1.6 +// Licensed under the Apache License, Version 2.0 (the "License"); 1.7 +// you may not use this file except in compliance with the License. 1.8 +// You may obtain a copy of the License at 1.9 +// 1.10 +// http://www.apache.org/licenses/LICENSE-2.0 1.11 +// 1.12 +// Unless required by applicable law or agreed to in writing, software 1.13 +// distributed under the License is distributed on an "AS IS" BASIS, 1.14 +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.15 +// See the License for the specific language governing permissions and 1.16 +// limitations under the License. 1.17 + 1.18 +// 1.19 +// Author: dsites@google.com (Dick Sites) 1.20 +// 1.21 + 1.22 + 1.23 +#ifndef I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ 1.24 +#define I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ 1.25 + 1.26 +#include "generated_language.h" 1.27 +#include "generated_ulscript.h" 1.28 + 1.29 +namespace CLD2 { 1.30 + 1.31 +typedef struct { 1.32 + char* text; // Pointer to the span, somewhere 1.33 + int text_bytes; // Number of bytes of text in the span 1.34 + int offset; // Offset of start of span in original input buffer 1.35 + ULScript ulscript; // Unicode Letters Script of this span 1.36 + Language lang; // Language identified for this span 1.37 + bool truncated; // true if buffer filled up before a 1.38 + // different script or EOF was found 1.39 +} LangSpan; 1.40 + 1.41 +} // namespace CLD2 1.42 +#endif // I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ 1.43 +