From dfe289850f068f19ba4a83ab4e7e22a7e09c13c9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:21 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- tdehtml/css/cssparser.cpp | 2614 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2614 insertions(+) create mode 100644 tdehtml/css/cssparser.cpp (limited to 'tdehtml/css/cssparser.cpp') diff --git a/tdehtml/css/cssparser.cpp b/tdehtml/css/cssparser.cpp new file mode 100644 index 000000000..b994ad773 --- /dev/null +++ b/tdehtml/css/cssparser.cpp @@ -0,0 +1,2614 @@ +/* + * This file is part of the DOM implementation for KDE. + * + * Copyright (C) 2003 Lars Knoll (knoll@kde.org) + * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) + * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +// #define CSS_DEBUG +// #define TOKEN_DEBUG +#define YYDEBUG 0 + +#include +#include +#include + +#include "cssparser.h" +#include "css_valueimpl.h" +#include "css_ruleimpl.h" +#include "css_stylesheetimpl.h" +#include "cssproperties.h" +#include "cssvalues.h" +#include "misc/helper.h" +#include "csshelper.h" +using namespace DOM; + +#include +#include + +// used to promote background: left to left center +#define BACKGROUND_SKIP_CENTER( num ) \ + if ( !pos_ok[ num ] && expected != 1 ) { \ + pos_ok[num] = true; \ + pos[num] = 0; \ + skip_next = false; \ + } + +ValueList::~ValueList() +{ + unsigned numValues = m_values.size(); + for (unsigned i = 0; i < numValues; i++) + if (m_values[i].unit == Value::Function) + delete m_values[i].function; +} + +namespace { + class ShorthandScope { + public: + ShorthandScope(CSSParser* parser, int propId) : m_parser(parser) + { + if (!(m_parser->m_inParseShorthand++)) + m_parser->m_currentShorthand = propId; + } + ~ShorthandScope() + { + if (!(--m_parser->m_inParseShorthand)) + m_parser->m_currentShorthand = 0; + } + + private: + CSSParser* m_parser; + }; +} + +using namespace DOM; + +#if YYDEBUG > 0 +extern int cssyydebug; +#endif + +extern int cssyyparse( void * parser ); + +CSSParser *CSSParser::currentParser = 0; + +CSSParser::CSSParser( bool strictParsing ) +{ +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "CSSParser::CSSParser this=" << this << endl; +#endif + strict = strictParsing; + + parsedProperties = (CSSProperty **) malloc( 32 * sizeof( CSSProperty * ) ); + numParsedProperties = 0; + maxParsedProperties = 32; + + data = 0; + valueList = 0; + rule = 0; + id = 0; + important = false; + nonCSSHint = false; + + m_inParseShorthand = 0; + m_currentShorthand = 0; + m_implicitShorthand = false; + + yy_start = 1; + +#if YYDEBUG > 0 + cssyydebug = 1; +#endif + +} + +CSSParser::~CSSParser() +{ + if ( numParsedProperties ) + clearProperties(); + free( parsedProperties ); + + delete valueList; + +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "CSSParser::~CSSParser this=" << this << endl; +#endif + + free( data ); + +} + +unsigned int CSSParser::defaultNamespace() +{ + if (styleElement && styleElement->isCSSStyleSheet()) + return static_cast(styleElement)->defaultNamespace(); + else + return anyNamespace; +} + +void CSSParser::runParser(int length) +{ + data[length-1] = 0; + data[length-2] = 0; + data[length-3] = ' '; + + yyTok = -1; + block_nesting = 0; + yy_hold_char = 0; + yyleng = 0; + yytext = yy_c_buf_p = data; + yy_hold_char = *yy_c_buf_p; + + CSSParser *old = currentParser; + currentParser = this; + cssyyparse( this ); + currentParser = old; +} + +void CSSParser::parseSheet( CSSStyleSheetImpl *sheet, const DOMString &string ) +{ + styleElement = sheet; + + int length = string.length() + 3; + data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); + memcpy( data, string.unicode(), string.length()*sizeof( unsigned short) ); + +#ifdef CSS_DEBUG + kdDebug( 6080 ) << ">>>>>>> start parsing style sheet" << endl; +#endif + runParser(length); +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "<<<<<<< done parsing style sheet" << endl; +#endif + + delete rule; + rule = 0; +} + +CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOMString &string ) +{ + styleElement = sheet; + + const char tdehtml_rule[] = "@-tdehtml-rule{"; + int length = string.length() + 4 + strlen(tdehtml_rule); + assert( !data ); + data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); + for ( unsigned int i = 0; i < strlen(tdehtml_rule); i++ ) + data[i] = tdehtml_rule[i]; + memcpy( data + strlen( tdehtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) ); + // tqDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); + data[length-4] = '}'; + + runParser(length); + + CSSRuleImpl *result = rule; + rule = 0; + + return result; +} + +bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id, const DOM::DOMString &string, + bool _important, bool _nonCSSHint ) +{ +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "CSSParser::parseValue: id=" << _id << " important=" << _important + << " nonCSSHint=" << _nonCSSHint << " value='" << string.string() << "'" << endl; +#endif + + styleElement = declaration->stylesheet(); + + const char tdehtml_value[] = "@-tdehtml-value{"; + int length = string.length() + 4 + strlen(tdehtml_value); + assert( !data ); + data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); + for ( unsigned int i = 0; i < strlen(tdehtml_value); i++ ) + data[i] = tdehtml_value[i]; + memcpy( data + strlen( tdehtml_value ), string.unicode(), string.length()*sizeof( unsigned short) ); + data[length-4] = '}'; + // tqDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); + + id = _id; + important = _important; + nonCSSHint = _nonCSSHint; + + runParser(length); + + delete rule; + rule = 0; + + bool ok = false; + if ( numParsedProperties ) { + ok = true; + for ( int i = 0; i < numParsedProperties; i++ ) { + declaration->removeProperty(parsedProperties[i]->m_id, nonCSSHint); + declaration->values()->append( parsedProperties[i] ); + } + numParsedProperties = 0; + } + + return ok; +} + +bool CSSParser::parseDeclaration( DOM::CSSStyleDeclarationImpl *declaration, const DOM::DOMString &string, + bool _nonCSSHint ) +{ +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "CSSParser::parseDeclaration: nonCSSHint=" << nonCSSHint + << " value='" << string.string() << "'" << endl; +#endif + + styleElement = declaration->stylesheet(); + + const char tdehtml_decls[] = "@-tdehtml-decls{"; + int length = string.length() + 4 + strlen(tdehtml_decls); + assert( !data ); + data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); + for ( unsigned int i = 0; i < strlen(tdehtml_decls); i++ ) + data[i] = tdehtml_decls[i]; + memcpy( data + strlen( tdehtml_decls ), string.unicode(), string.length()*sizeof( unsigned short) ); + data[length-4] = '}'; + + nonCSSHint = _nonCSSHint; + + runParser(length); + + delete rule; + rule = 0; + + bool ok = false; + if ( numParsedProperties ) { + ok = true; + for ( int i = 0; i < numParsedProperties; i++ ) { + declaration->removeProperty(parsedProperties[i]->m_id, false); + declaration->values()->append( parsedProperties[i] ); + } + numParsedProperties = 0; + } + + return ok; +} + +void CSSParser::addProperty( int propId, CSSValueImpl *value, bool important ) +{ + CSSProperty *prop = new CSSProperty; + prop->m_id = propId; + prop->setValue( value ); + prop->m_important = important; + prop->nonCSSHint = nonCSSHint; + + if ( numParsedProperties >= maxParsedProperties ) { + maxParsedProperties += 32; + parsedProperties = (CSSProperty **) realloc( parsedProperties, + maxParsedProperties*sizeof( CSSProperty * ) ); + } + parsedProperties[numParsedProperties++] = prop; +} + +CSSStyleDeclarationImpl *CSSParser::createStyleDeclaration( CSSStyleRuleImpl *rule ) +{ + TQPtrList *propList = new TQPtrList; + propList->setAutoDelete( true ); + for ( int i = 0; i < numParsedProperties; i++ ) + propList->append( parsedProperties[i] ); + + numParsedProperties = 0; + return new CSSStyleDeclarationImpl(rule, propList); +} + +void CSSParser::clearProperties() +{ + for ( int i = 0; i < numParsedProperties; i++ ) + delete parsedProperties[i]; + numParsedProperties = 0; +} + +DOM::DocumentImpl *CSSParser::document() const +{ + const StyleBaseImpl* root = styleElement; + DocumentImpl *doc = 0; + while (root->parent()) + root = root->parent(); + if (root->isCSSStyleSheet()) + doc = static_cast(root)->doc(); + return doc; +} + + +// defines units allowed for a certain property, used in parseUnit +enum Units +{ + FUnknown = 0x0000, + FInteger = 0x0001, + FNumber = 0x0002, // Real Numbers + FPercent = 0x0004, + FLength = 0x0008, + FAngle = 0x0010, + FTime = 0x0020, + FFrequency = 0x0040, + FRelative = 0x0100, + FNonNeg = 0x0200 +}; + +static bool validUnit( Value *value, int unitflags, bool strict ) +{ + if ( unitflags & FNonNeg && value->fValue < 0 ) + return false; + + bool b = false; + switch( value->unit ) { + case CSSPrimitiveValue::CSS_NUMBER: + b = (unitflags & FNumber); + if ( !b && ( (unitflags & FLength) && (value->fValue == 0 || !strict ) ) ) { + value->unit = CSSPrimitiveValue::CSS_PX; + b = true; + } + if (!b && (unitflags & FInteger) && value->isInt) + b = true; + break; + case CSSPrimitiveValue::CSS_PERCENTAGE: + b = (unitflags & FPercent); + break; + case Value::Q_EMS: + case CSSPrimitiveValue::CSS_EMS: + case CSSPrimitiveValue::CSS_EXS: + case CSSPrimitiveValue::CSS_PX: + case CSSPrimitiveValue::CSS_CM: + case CSSPrimitiveValue::CSS_MM: + case CSSPrimitiveValue::CSS_IN: + case CSSPrimitiveValue::CSS_PT: + case CSSPrimitiveValue::CSS_PC: + b = (unitflags & FLength); + break; + case CSSPrimitiveValue::CSS_MS: + case CSSPrimitiveValue::CSS_S: + b = (unitflags & FTime); + break; + case CSSPrimitiveValue::CSS_DEG: + case CSSPrimitiveValue::CSS_RAD: + case CSSPrimitiveValue::CSS_GRAD: + case CSSPrimitiveValue::CSS_HZ: + case CSSPrimitiveValue::CSS_KHZ: + case CSSPrimitiveValue::CSS_DIMENSION: + default: + break; + } + return b; +} + +bool CSSParser::parseValue( int propId, bool important ) +{ + if ( !valueList ) return false; + + Value *value = valueList->current(); + + if ( !value ) + return false; + + int id = value->id; + + int num = inShorthand() ? 1 : valueList->size(); + + if ( id == CSS_VAL_INHERIT ) { + if (num != 1) + return false; + addProperty( propId, new CSSInheritedValueImpl(), important ); + return true; + } else if (id == CSS_VAL_INITIAL ) { + if (num != 1) + return false; + addProperty(propId, new CSSInitialValueImpl(), important); + return true; + } + + bool valid_primitive = false; + CSSValueImpl *parsedValue = 0; + + switch(propId) { + /* The comment to the left defines all valid value of this properties as defined + * in CSS 2, Appendix F. Property index + */ + + /* All the CSS properties are not supported by the renderer at the moment. + * Note that all the CSS2 Aural properties are only checked, if CSS_AURAL is defined + * (see parseAuralValues). As we don't support them at all this seems reasonable. + */ + + case CSS_PROP_SIZE: // {1,2} | auto | portrait | landscape | inherit +// case CSS_PROP_PAGE: // | auto // ### CHECK + // ### To be done + if (id) + valid_primitive = true; + break; + case CSS_PROP_UNICODE_BIDI: // normal | embed | bidi-override | inherit + if ( id == CSS_VAL_NORMAL || + id == CSS_VAL_EMBED || + id == CSS_VAL_BIDI_OVERRIDE ) + valid_primitive = true; + break; + + case CSS_PROP_POSITION: // static | relative | absolute | fixed | inherit + if ( id == CSS_VAL_STATIC || + id == CSS_VAL_RELATIVE || + id == CSS_VAL_ABSOLUTE || + id == CSS_VAL_FIXED ) + valid_primitive = true; + break; + + case CSS_PROP_PAGE_BREAK_AFTER: // auto | always | avoid | left | right | inherit + case CSS_PROP_PAGE_BREAK_BEFORE: // auto | always | avoid | left | right | inherit + if ( id == CSS_VAL_AUTO || + id == CSS_VAL_ALWAYS || + id == CSS_VAL_AVOID || + id == CSS_VAL_LEFT || + id == CSS_VAL_RIGHT ) + valid_primitive = true; + break; + + case CSS_PROP_PAGE_BREAK_INSIDE: // avoid | auto | inherit + if ( id == CSS_VAL_AUTO || + id == CSS_VAL_AVOID ) + valid_primitive = true; + break; + + case CSS_PROP_EMPTY_CELLS: // show | hide | inherit + if ( id == CSS_VAL_SHOW || + id == CSS_VAL_HIDE ) + valid_primitive = true; + break; + + case CSS_PROP_QUOTES: // [ ]+ | none | inherit + if (id == CSS_VAL_NONE) { + valid_primitive = true; + } else { + QuotesValueImpl *quotes = new QuotesValueImpl; + bool is_valid = true; + TQString open, close; + Value *val=valueList->current(); + while (val) { + if (val->unit == CSSPrimitiveValue::CSS_STRING) + open = qString(val->string); + else { + is_valid = false; + break; + } + valueList->next(); + val=valueList->current(); + if (val && val->unit == CSSPrimitiveValue::CSS_STRING) + close = qString(val->string); + else { + is_valid = false; + break; + } + quotes->addLevel(open, close); + valueList->next(); + val=valueList->current(); + } + if (is_valid) + parsedValue = quotes; + else + delete quotes; + } + break; + + case CSS_PROP_CONTENT: // normal | none | inherit | + // [ | | | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ + if ( id == CSS_VAL_NORMAL || id == CSS_VAL_NONE) + valid_primitive = true; + else + return parseContent( propId, important ); + break; + + case CSS_PROP_WHITE_SPACE: // normal | pre | nowrap | pre-wrap | pre-line | inherit + if ( id == CSS_VAL_NORMAL || + id == CSS_VAL_PRE || + id == CSS_VAL_PRE_WRAP || + id == CSS_VAL_PRE_LINE || + id == CSS_VAL_NOWRAP ) + valid_primitive = true; + break; + + case CSS_PROP_CLIP: // | auto | inherit + if ( id == CSS_VAL_AUTO ) + valid_primitive = true; + else if ( value->unit == Value::Function ) + return parseShape( propId, important ); + break; + + /* Start of supported CSS properties with validation. This is needed for parseShortHand to work + * correctly and allows optimization in tdehtml::applyRule(..) + */ + case CSS_PROP_CAPTION_SIDE: // top | bottom | left | right | inherit + // Left and right were deprecated in CSS 2.1 and never supported by KHTML + if ( /* id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || */ + id == CSS_VAL_TOP || id == CSS_VAL_BOTTOM) + valid_primitive = true; + break; + + case CSS_PROP_BORDER_COLLAPSE: // collapse | separate | inherit + if ( id == CSS_VAL_COLLAPSE || id == CSS_VAL_SEPARATE ) + valid_primitive = true; + break; + + case CSS_PROP_VISIBILITY: // visible | hidden | collapse | inherit + if (id == CSS_VAL_VISIBLE || id == CSS_VAL_HIDDEN || id == CSS_VAL_COLLAPSE) + valid_primitive = true; + break; + + case CSS_PROP_OVERFLOW: // visible | hidden | scroll | auto | marquee | inherit + case CSS_PROP_OVERFLOW_X: + case CSS_PROP_OVERFLOW_Y: + if (id == CSS_VAL_VISIBLE || id == CSS_VAL_HIDDEN || id == CSS_VAL_SCROLL || id == CSS_VAL_AUTO || + id == CSS_VAL_MARQUEE) + valid_primitive = true; + break; + + case CSS_PROP_LIST_STYLE_POSITION: // inside | outside | inherit + if ( id == CSS_VAL_INSIDE || id == CSS_VAL_OUTSIDE ) + valid_primitive = true; + break; + + case CSS_PROP_LIST_STYLE_TYPE: + // disc | circle | square | decimal | decimal-leading-zero | lower-roman | + // upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha | + // upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | + // katakana | hiragana-iroha | katakana-iroha | none | inherit + if ((id >= CSS_VAL_DISC && id <= CSS_VAL__KHTML_CLOSE_QUOTE) || id == CSS_VAL_NONE) + valid_primitive = true; + break; + + case CSS_PROP_DISPLAY: + // inline | block | list-item | run-in | inline-block | -tdehtml-ruler | table | + // inline-table | table-row-group | table-header-group | table-footer-group | table-row | + // table-column-group | table-column | table-cell | table-caption | none | inherit + if ((id >= CSS_VAL_INLINE && id <= CSS_VAL_TABLE_CAPTION) || id == CSS_VAL_NONE) + valid_primitive = true; + break; + + case CSS_PROP_DIRECTION: // ltr | rtl | inherit + if ( id == CSS_VAL_LTR || id == CSS_VAL_RTL ) + valid_primitive = true; + break; + + case CSS_PROP_TEXT_TRANSFORM: // capitalize | uppercase | lowercase | none | inherit + if ((id >= CSS_VAL_CAPITALIZE && id <= CSS_VAL_LOWERCASE) || id == CSS_VAL_NONE) + valid_primitive = true; + break; + + case CSS_PROP_FLOAT: // left | right | none | tdehtml_left | tdehtml_right | inherit + center for buggy CSS + if ( id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || id == CSS_VAL__KHTML_LEFT || + id == CSS_VAL__KHTML_RIGHT ||id == CSS_VAL_NONE || id == CSS_VAL_CENTER) + valid_primitive = true; + break; + + case CSS_PROP_CLEAR: // none | left | right | both | inherit + if ( id == CSS_VAL_NONE || id == CSS_VAL_LEFT || + id == CSS_VAL_RIGHT|| id == CSS_VAL_BOTH) + valid_primitive = true; + break; + + case CSS_PROP_TEXT_ALIGN: + // left | right | center | justify | tdehtml_left | tdehtml_right | tdehtml_center | | inherit + if ( ( id >= CSS_VAL__KHTML_AUTO && id <= CSS_VAL__KHTML_CENTER ) || + value->unit == CSSPrimitiveValue::CSS_STRING ) + valid_primitive = true; + break; + + case CSS_PROP_OUTLINE_STYLE: // | inherit + case CSS_PROP_BORDER_TOP_STYLE: //// | inherit + case CSS_PROP_BORDER_RIGHT_STYLE: // Defined as: none | hidden | dotted | dashed | + case CSS_PROP_BORDER_BOTTOM_STYLE: // solid | double | groove | ridge | inset | outset | -tdehtml-native + case CSS_PROP_BORDER_LEFT_STYLE: //// + if (id >= CSS_VAL__KHTML_NATIVE && id <= CSS_VAL_DOUBLE) + valid_primitive = true; + break; + + case CSS_PROP_FONT_WEIGHT: // normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | + // 500 | 600 | 700 | 800 | 900 | inherit + if (id >= CSS_VAL_NORMAL && id <= CSS_VAL_900) { + // Allready correct id + valid_primitive = true; + } else if ( validUnit( value, FInteger|FNonNeg, false ) ) { + int weight = (int)value->fValue; + if ( (weight % 100) ) + break; + weight /= 100; + if ( weight >= 1 && weight <= 9 ) { + id = CSS_VAL_100 + weight - 1; + valid_primitive = true; + } + } + break; + + case CSS_PROP_BORDER_SPACING: + { + const int properties[2] = { CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING, + CSS_PROP__KHTML_BORDER_VERTICAL_SPACING }; + if (num == 1) { + ShorthandScope scope(this, CSS_PROP_BORDER_SPACING); + if (!parseValue(properties[0], important)) return false; + CSSValueImpl* value = parsedProperties[numParsedProperties-1]->value(); + addProperty(properties[1], value, important); + return true; + } + else if (num == 2) { + ShorthandScope scope(this, CSS_PROP_BORDER_SPACING); + if (!parseValue(properties[0], important)) return false; + if (!parseValue(properties[1], important)) return false; + return true; + } + return false; + } + case CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING: + case CSS_PROP__KHTML_BORDER_VERTICAL_SPACING: + valid_primitive = validUnit(value, FLength|FNonNeg, strict&(!nonCSSHint)); + break; + + case CSS_PROP_SCROLLBAR_FACE_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_SHADOW_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_3DLIGHT_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_TRACK_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_ARROW_COLOR: // IE5.5 + case CSS_PROP_SCROLLBAR_BASE_COLOR: // IE5.5 + if ( strict ) + break; + /* nobreak */ + case CSS_PROP_OUTLINE_COLOR: // | invert | inherit + // outline has "invert" as additional keyword. + if ( propId == CSS_PROP_OUTLINE_COLOR && id == CSS_VAL_INVERT ) { + valid_primitive = true; + break; + } + /* nobreak */ + case CSS_PROP_BACKGROUND_COLOR: // | inherit + case CSS_PROP_BORDER_TOP_COLOR: // | inherit + case CSS_PROP_BORDER_RIGHT_COLOR: // | inherit + case CSS_PROP_BORDER_BOTTOM_COLOR: // | inherit + case CSS_PROP_BORDER_LEFT_COLOR: // | inherit + case CSS_PROP_COLOR: // | inherit + if ( id == CSS_VAL__KHTML_TEXT || id == CSS_VAL_MENU || + (id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT ) || + id == CSS_VAL_TRANSPARENT || + (id >= CSS_VAL_GREY && id < CSS_VAL__KHTML_TEXT && (nonCSSHint|!strict) ) ) { + valid_primitive = true; + } else { + parsedValue = parseColor(); + if ( parsedValue ) + valueList->next(); + } + break; + + case CSS_PROP_CURSOR: + // [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize | + // nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | + // wait | help ] ] | inherit + // MSIE 5 compatibility :/ + if ( !strict && id == CSS_VAL_HAND ) { + id = CSS_VAL_POINTER; + valid_primitive = true; + } else if ( id >= CSS_VAL_AUTO && id <= CSS_VAL_HELP ) + valid_primitive = true; + break; + + case CSS_PROP_BACKGROUND_ATTACHMENT: + case CSS_PROP__KHTML_BACKGROUND_CLIP: + case CSS_PROP_BACKGROUND_IMAGE: + case CSS_PROP__KHTML_BACKGROUND_ORIGIN: + case CSS_PROP_BACKGROUND_POSITION: + case CSS_PROP_BACKGROUND_POSITION_X: + case CSS_PROP_BACKGROUND_POSITION_Y: + case CSS_PROP__KHTML_BACKGROUND_SIZE: + case CSS_PROP_BACKGROUND_REPEAT: { + CSSValueImpl *val1 = 0, *val2 = 0; + int propId1, propId2; + if (parseBackgroundProperty(propId, propId1, propId2, val1, val2)) { + addProperty(propId1, val1, important); + if (val2) + addProperty(propId2, val2, important); + return true; + } + return false; + } + case CSS_PROP_LIST_STYLE_IMAGE: // | none | inherit + if (id == CSS_VAL_NONE) { + parsedValue = new CSSImageValueImpl(); + valueList->next(); + } + else if (value->unit == CSSPrimitiveValue::CSS_URI ) { + // ### allow string in non strict mode? + DOMString uri = tdehtml::parseURL( domString( value->string ) ); + if (!uri.isEmpty()) { + parsedValue = new CSSImageValueImpl( + DOMString(KURL( styleElement->baseURL(), uri.string()).url()), + styleElement ); + valueList->next(); + } + } + break; + + case CSS_PROP_OUTLINE_WIDTH: // | inherit + case CSS_PROP_BORDER_TOP_WIDTH: //// | inherit + case CSS_PROP_BORDER_RIGHT_WIDTH: // Which is defined as + case CSS_PROP_BORDER_BOTTOM_WIDTH: // thin | medium | thick | + case CSS_PROP_BORDER_LEFT_WIDTH: //// + if (id == CSS_VAL_THIN || id == CSS_VAL_MEDIUM || id == CSS_VAL_THICK) + valid_primitive = true; + else + valid_primitive = ( validUnit( value, FLength, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_LETTER_SPACING: // normal | | inherit + case CSS_PROP_WORD_SPACING: // normal | | inherit + if ( id == CSS_VAL_NORMAL ) + valid_primitive = true; + else + valid_primitive = validUnit( value, FLength, strict&(!nonCSSHint) ); + break; + + case CSS_PROP_TEXT_INDENT: // | | inherit + valid_primitive = ( !id && validUnit( value, FLength|FPercent, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_PADDING_TOP: // | | inherit + case CSS_PROP_PADDING_RIGHT: // | inherit + case CSS_PROP_PADDING_BOTTOM: // Which is defined as + case CSS_PROP_PADDING_LEFT: // | + case CSS_PROP__KHTML_PADDING_START: + valid_primitive = ( !id && validUnit( value, FLength|FPercent|FNonNeg, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_MAX_HEIGHT: // | | none | inherit + case CSS_PROP_MAX_WIDTH: // | | none | inherit + if ( id == CSS_VAL_NONE ) { + valid_primitive = true; + break; + } + /* nobreak */ + case CSS_PROP_MIN_HEIGHT: // | | inherit + case CSS_PROP_MIN_WIDTH: // | | inherit + valid_primitive = ( !id && validUnit( value, FLength|FPercent|FNonNeg, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_FONT_SIZE: + // | | | | inherit + if (id >= CSS_VAL_XX_SMALL && id <= CSS_VAL_LARGER) + valid_primitive = true; + else + valid_primitive = ( validUnit( value, FLength|FPercent, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_FONT_STYLE: // normal | italic | oblique | inherit + if ( id == CSS_VAL_NORMAL || id == CSS_VAL_ITALIC || id == CSS_VAL_OBLIQUE) + valid_primitive = true; + break; + + case CSS_PROP_FONT_VARIANT: // normal | small-caps | inherit + if ( id == CSS_VAL_NORMAL || id == CSS_VAL_SMALL_CAPS) + valid_primitive = true; + break; + + case CSS_PROP_VERTICAL_ALIGN: + // baseline | sub | super | top | text-top | middle | bottom | text-bottom | + // | | inherit + + if ( id >= CSS_VAL_BASELINE && id <= CSS_VAL__KHTML_BASELINE_MIDDLE ) + valid_primitive = true; + else + valid_primitive = ( !id && validUnit( value, FLength|FPercent, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_HEIGHT: // | | auto | inherit + case CSS_PROP_WIDTH: // | | auto | inherit + if ( id == CSS_VAL_AUTO ) + valid_primitive = true; + else + // ### handle multilength case where we allow relative units + valid_primitive = ( !id && validUnit( value, FLength|FPercent|FNonNeg, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_BOTTOM: // | | auto | inherit + case CSS_PROP_LEFT: // | | auto | inherit + case CSS_PROP_RIGHT: // | | auto | inherit + case CSS_PROP_TOP: // | | auto | inherit + case CSS_PROP_MARGIN_TOP: //// | inherit + case CSS_PROP_MARGIN_RIGHT: // Which is defined as + case CSS_PROP_MARGIN_BOTTOM: // | | auto | inherit + case CSS_PROP_MARGIN_LEFT: //// + case CSS_PROP__KHTML_MARGIN_START: + if ( id == CSS_VAL_AUTO ) + valid_primitive = true; + else + valid_primitive = ( !id && validUnit( value, FLength|FPercent, strict&(!nonCSSHint) ) ); + break; + + case CSS_PROP_Z_INDEX: // auto | | inherit + // tqDebug("parsing z-index: id=%d, fValue=%f", id, value->fValue ); + if ( id == CSS_VAL_AUTO ) { + valid_primitive = true; + break; + } + /* nobreak */ + case CSS_PROP_ORPHANS: // | inherit + case CSS_PROP_WIDOWS: // | inherit + // ### not supported later on + valid_primitive = ( !id && validUnit( value, FInteger, false ) ); + break; + + case CSS_PROP_LINE_HEIGHT: // normal | | | | inherit + if ( id == CSS_VAL_NORMAL ) + valid_primitive = true; + else + valid_primitive = ( !id && validUnit( value, FNumber|FLength|FPercent, strict&(!nonCSSHint) ) ); + break; + case CSS_PROP_COUNTER_INCREMENT: // [ ? ]+ | none | inherit + if ( id == CSS_VAL_NONE ) + valid_primitive = true; + else + return parseCounter(propId, true, important); + break; + case CSS_PROP_COUNTER_RESET: // [ ? ]+ | none | inherit + if ( id == CSS_VAL_NONE ) + valid_primitive = true; + else + return parseCounter(propId, false, important); + break; + + case CSS_PROP_FONT_FAMILY: + // [[ | ],]* [ | ] | inherit + { + parsedValue = parseFontFamily(); + break; + } + + case CSS_PROP_TEXT_DECORATION: + // none | [ underline || overline || line-through || blink ] | inherit + if (id == CSS_VAL_NONE) { + valid_primitive = true; + } else { + CSSValueListImpl *list = new CSSValueListImpl; + bool is_valid = true; + while( is_valid && value ) { + switch ( value->id ) { + case CSS_VAL_BLINK: + break; + case CSS_VAL_UNDERLINE: + case CSS_VAL_OVERLINE: + case CSS_VAL_LINE_THROUGH: + list->append( new CSSPrimitiveValueImpl( value->id ) ); + break; + default: + is_valid = false; + } + value = valueList->next(); + } + //kdDebug( 6080 ) << "got " << list->length() << "d decorations" << endl; + if(list->length() && is_valid) { + parsedValue = list; + valueList->next(); + } else { + delete list; + } + } + break; + + case CSS_PROP_TABLE_LAYOUT: // auto | fixed | inherit + if ( id == CSS_VAL_AUTO || id == CSS_VAL_FIXED ) + valid_primitive = true; + break; + + case CSS_PROP__KHTML_FLOW_MODE: + if ( id == CSS_VAL__KHTML_NORMAL || id == CSS_VAL__KHTML_AROUND_FLOATS ) + valid_primitive = true; + break; + + /* CSS3 properties */ + case CSS_PROP_BOX_SIZING: // border-box | content-box | inherit + if ( id == CSS_VAL_BORDER_BOX || id == CSS_VAL_CONTENT_BOX ) + valid_primitive = true; + break; + case CSS_PROP_OUTLINE_OFFSET: + valid_primitive = validUnit(value, FLength, strict); + break; + case CSS_PROP_TEXT_SHADOW: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3 + if (id == CSS_VAL_NONE) + valid_primitive = true; + else + return parseShadow(propId, important); + break; + case CSS_PROP_OPACITY: + valid_primitive = validUnit(value, FNumber, strict); + break; + case CSS_PROP__KHTML_USER_INPUT: // none | enabled | disabled | inherit + if ( id == CSS_VAL_NONE || id == CSS_VAL_ENABLED || id == CSS_VAL_DISABLED ) + valid_primitive = true; +// kdDebug(6080) << "CSS_PROP__KHTML_USER_INPUT: " << valid_primitive << endl; + break; + case CSS_PROP__KHTML_MARQUEE: { + const int properties[5] = { CSS_PROP__KHTML_MARQUEE_DIRECTION, CSS_PROP__KHTML_MARQUEE_INCREMENT, + CSS_PROP__KHTML_MARQUEE_REPETITION, + CSS_PROP__KHTML_MARQUEE_STYLE, CSS_PROP__KHTML_MARQUEE_SPEED }; + return parseShortHand(propId, properties, 5, important); + } + case CSS_PROP__KHTML_MARQUEE_DIRECTION: + if (id == CSS_VAL_FORWARDS || id == CSS_VAL_BACKWARDS || id == CSS_VAL_AHEAD || + id == CSS_VAL_REVERSE || id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || id == CSS_VAL_DOWN || + id == CSS_VAL_UP || id == CSS_VAL_AUTO) + valid_primitive = true; + break; + case CSS_PROP__KHTML_MARQUEE_INCREMENT: + if (id == CSS_VAL_SMALL || id == CSS_VAL_LARGE || id == CSS_VAL_MEDIUM) + valid_primitive = true; + else + valid_primitive = validUnit(value, FLength|FPercent, strict&(!nonCSSHint)); + break; + case CSS_PROP__KHTML_MARQUEE_STYLE: + if (id == CSS_VAL_NONE || id == CSS_VAL_SLIDE || id == CSS_VAL_SCROLL || id == CSS_VAL_ALTERNATE || + id == CSS_VAL_UNFURL) + valid_primitive = true; + break; + case CSS_PROP__KHTML_MARQUEE_REPETITION: + if (id == CSS_VAL_INFINITE) + valid_primitive = true; + else + valid_primitive = validUnit(value, FInteger|FNonNeg, strict&(!nonCSSHint)); + break; + case CSS_PROP__KHTML_MARQUEE_SPEED: + if (id == CSS_VAL_NORMAL || id == CSS_VAL_SLOW || id == CSS_VAL_FAST) + valid_primitive = true; + else + valid_primitive = validUnit(value, FTime|FInteger|FNonNeg, strict&(!nonCSSHint)); + break; + case CSS_PROP_TEXT_OVERFLOW: // clip | ellipsis + if (id == CSS_VAL_CLIP || id == CSS_VAL_ELLIPSIS) + valid_primitive = true; + break; + // End of CSS3 properties + + /* shorthand properties */ + case CSS_PROP_BACKGROUND: + // ['background-color' || 'background-image' ||'background-repeat' || + // 'background-attachment' || 'background-position'] | inherit + return parseBackgroundShorthand(important); + case CSS_PROP_BORDER: + // [ 'border-width' || 'border-style' || ] | inherit + { + const int properties[3] = { CSS_PROP_BORDER_WIDTH, CSS_PROP_BORDER_STYLE, + CSS_PROP_BORDER_COLOR }; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_BORDER_TOP: + // [ 'border-top-width' || 'border-style' || ] | inherit + { + const int properties[3] = { CSS_PROP_BORDER_TOP_WIDTH, CSS_PROP_BORDER_TOP_STYLE, + CSS_PROP_BORDER_TOP_COLOR}; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_BORDER_RIGHT: + // [ 'border-right-width' || 'border-style' || ] | inherit + { + const int properties[3] = { CSS_PROP_BORDER_RIGHT_WIDTH, CSS_PROP_BORDER_RIGHT_STYLE, + CSS_PROP_BORDER_RIGHT_COLOR }; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_BORDER_BOTTOM: + // [ 'border-bottom-width' || 'border-style' || ] | inherit + { + const int properties[3] = { CSS_PROP_BORDER_BOTTOM_WIDTH, CSS_PROP_BORDER_BOTTOM_STYLE, + CSS_PROP_BORDER_BOTTOM_COLOR }; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_BORDER_LEFT: + // [ 'border-left-width' || 'border-style' || ] | inherit + { + const int properties[3] = { CSS_PROP_BORDER_LEFT_WIDTH, CSS_PROP_BORDER_LEFT_STYLE, + CSS_PROP_BORDER_LEFT_COLOR }; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_OUTLINE: + // [ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit + { + const int properties[3] = { CSS_PROP_OUTLINE_WIDTH, CSS_PROP_OUTLINE_STYLE, + CSS_PROP_OUTLINE_COLOR }; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_BORDER_COLOR: + // {1,4} | inherit + { + const int properties[4] = { CSS_PROP_BORDER_TOP_COLOR, CSS_PROP_BORDER_RIGHT_COLOR, + CSS_PROP_BORDER_BOTTOM_COLOR, CSS_PROP_BORDER_LEFT_COLOR }; + return parse4Values(propId, properties, important); + } + case CSS_PROP_BORDER_WIDTH: + // {1,4} | inherit + { + const int properties[4] = { CSS_PROP_BORDER_TOP_WIDTH, CSS_PROP_BORDER_RIGHT_WIDTH, + CSS_PROP_BORDER_BOTTOM_WIDTH, CSS_PROP_BORDER_LEFT_WIDTH }; + return parse4Values(propId, properties, important); + } + case CSS_PROP_BORDER_STYLE: + // {1,4} | inherit + { + const int properties[4] = { CSS_PROP_BORDER_TOP_STYLE, CSS_PROP_BORDER_RIGHT_STYLE, + CSS_PROP_BORDER_BOTTOM_STYLE, CSS_PROP_BORDER_LEFT_STYLE }; + return parse4Values(propId, properties, important); + } + case CSS_PROP_MARGIN: + // {1,4} | inherit + { + const int properties[4] = { CSS_PROP_MARGIN_TOP, CSS_PROP_MARGIN_RIGHT, + CSS_PROP_MARGIN_BOTTOM, CSS_PROP_MARGIN_LEFT }; + return parse4Values(propId, properties, important); + } + case CSS_PROP_PADDING: + // {1,4} | inherit + { + const int properties[4] = { CSS_PROP_PADDING_TOP, CSS_PROP_PADDING_RIGHT, + CSS_PROP_PADDING_BOTTOM, CSS_PROP_PADDING_LEFT }; + return parse4Values(propId, properties, important); + } + case CSS_PROP_FONT: + // [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? + // 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit + if ( id >= CSS_VAL_CAPTION && id <= CSS_VAL_STATUS_BAR ) + valid_primitive = true; + else + return parseFont(important); + + case CSS_PROP_LIST_STYLE: + { + const int properties[3] = { CSS_PROP_LIST_STYLE_TYPE, CSS_PROP_LIST_STYLE_POSITION, + CSS_PROP_LIST_STYLE_IMAGE }; + return parseShortHand(propId, properties, 3, important); + } + case CSS_PROP_WORD_WRAP: + { + // normal | break-word + if ( id == CSS_VAL_NORMAL || id == CSS_VAL_BREAK_WORD ) + valid_primitive = true; + break; + } + default: +// #ifdef CSS_DEBUG +// kdDebug( 6080 ) << "illegal or CSS2 Aural property: " << val << endl; +// #endif + break; + } + + if ( valid_primitive ) { + + if ( id != 0 ) { + parsedValue = new CSSPrimitiveValueImpl( id ); + } else if ( value->unit == CSSPrimitiveValue::CSS_STRING ) + parsedValue = new CSSPrimitiveValueImpl( domString( value->string ), + (CSSPrimitiveValue::UnitTypes) value->unit ); + else if ( value->unit >= CSSPrimitiveValue::CSS_NUMBER && + value->unit <= CSSPrimitiveValue::CSS_KHZ ) { + parsedValue = new CSSPrimitiveValueImpl( value->fValue, + (CSSPrimitiveValue::UnitTypes) value->unit ); + } else if ( value->unit >= Value::Q_EMS ) { + parsedValue = new CSSQuirkPrimitiveValueImpl( value->fValue, CSSPrimitiveValue::CSS_EMS ); + } + valueList->next(); + } + if ( parsedValue ) { + if (!valueList->current() || inShorthand()) { + addProperty( propId, parsedValue, important ); + return true; + } + delete parsedValue; + } + return false; +} + +void CSSParser::addBackgroundValue(CSSValueImpl*& lval, CSSValueImpl* rval) +{ + if (lval) { + if (lval->isValueList()) + static_cast(lval)->append(rval); + else { + CSSValueImpl* oldVal = lval; + CSSValueListImpl* list = new CSSValueListImpl(); + lval = list; + list->append(oldVal); + list->append(rval); + } + } + else + lval = rval; +} + +bool CSSParser::parseBackgroundShorthand(bool important) +{ + // Position must come before color in this array because a plain old "0" is a legal color + // in quirks mode but it's usually the X coordinate of a position. + // FIXME: Add CSS_PROP__KHTML_BACKGROUND_SIZE to the shorthand. + const int numProperties = 7; + const int properties[numProperties] = { CSS_PROP_BACKGROUND_IMAGE, CSS_PROP_BACKGROUND_REPEAT, + CSS_PROP_BACKGROUND_ATTACHMENT, CSS_PROP_BACKGROUND_POSITION, CSS_PROP__KHTML_BACKGROUND_CLIP, + CSS_PROP__KHTML_BACKGROUND_ORIGIN, CSS_PROP_BACKGROUND_COLOR }; + + ShorthandScope scope(this, CSS_PROP_BACKGROUND); + + bool parsedProperty[numProperties] = { false }; // compiler will repeat false as necessary + CSSValueImpl* values[numProperties] = { 0 }; // compiler will repeat 0 as necessary + CSSValueImpl* positionYValue = 0; + int i; + + while (valueList->current()) { + Value* val = valueList->current(); + if (val->unit == Value::Operator && val->iValue == ',') { + // We hit the end. Fill in all remaining values with the initial value. + valueList->next(); + for (i = 0; i < numProperties; ++i) { + if (properties[i] == CSS_PROP_BACKGROUND_COLOR && parsedProperty[i]) + // Color is not allowed except as the last item in a list. Reject the entire + // property. + goto fail; + + if (!parsedProperty[i] && properties[i] != CSS_PROP_BACKGROUND_COLOR) { + addBackgroundValue(values[i], new CSSInitialValueImpl()); + if (properties[i] == CSS_PROP_BACKGROUND_POSITION) + addBackgroundValue(positionYValue, new CSSInitialValueImpl()); + } + parsedProperty[i] = false; + } + if (!valueList->current()) + break; + } + + bool found = false; + for (i = 0; !found && i < numProperties; ++i) { + if (!parsedProperty[i]) { + CSSValueImpl *val1 = 0, *val2 = 0; + int propId1, propId2; + if (parseBackgroundProperty(properties[i], propId1, propId2, val1, val2)) { + parsedProperty[i] = found = true; + addBackgroundValue(values[i], val1); + if (properties[i] == CSS_PROP_BACKGROUND_POSITION) + addBackgroundValue(positionYValue, val2); + } + } + } + + // if we didn't find at least one match, this is an + // invalid shorthand and we have to ignore it + if (!found) + goto fail; + } + + // Fill in any remaining properties with the initial value. + for (i = 0; i < numProperties; ++i) { + if (!parsedProperty[i]) { + addBackgroundValue(values[i], new CSSInitialValueImpl()); + if (properties[i] == CSS_PROP_BACKGROUND_POSITION) + addBackgroundValue(positionYValue, new CSSInitialValueImpl()); + } + } + + // Now add all of the properties we found. + for (i = 0; i < numProperties; i++) { + if (properties[i] == CSS_PROP_BACKGROUND_POSITION) { + addProperty(CSS_PROP_BACKGROUND_POSITION_X, values[i], important); + addProperty(CSS_PROP_BACKGROUND_POSITION_Y, positionYValue, important); + } + else + addProperty(properties[i], values[i], important); + } + + return true; + +fail: + for (int k = 0; k < numProperties; k++) + delete values[k]; + delete positionYValue; + return false; +} + +bool CSSParser::parseShortHand(int propId, const int *properties, int numProperties, bool important ) +{ + /* We try to match as many properties as possible + * We setup an array of booleans to mark which property has been found, + * and we try to search for properties until it makes no longer any sense + */ + ShorthandScope scope(this, propId); + + bool found = false; + bool fnd[6]; //Trust me ;) + for( int i = 0; i < numProperties; i++ ) + fnd[i] = false; + + while ( valueList->current() ) { + found = false; + for (int propIndex = 0; !found && propIndex < numProperties; ++propIndex) { + if (!fnd[propIndex]) { + if ( parseValue( properties[propIndex], important ) ) { + fnd[propIndex] = found = true; + } + } + } + + // if we didn't find at least one match, this is an + // invalid shorthand and we have to ignore it + if (!found) + return false; + } + + // Fill in any remaining properties with the initial value. + m_implicitShorthand = true; + for (int i = 0; i < numProperties; ++i) { + if (!fnd[i]) + addProperty(properties[i], new CSSInitialValueImpl(), important); + } + m_implicitShorthand = false; + + return true; +} + +bool CSSParser::parse4Values(int propId, const int *properties, bool important ) +{ + /* From the CSS 2 specs, 8.3 + * If there is only one value, it applies to all sides. If there are two values, the top and + * bottom margins are set to the first value and the right and left margins are set to the second. + * If there are three values, the top is set to the first value, the left and right are set to the + * second, and the bottom is set to the third. If there are four values, they apply to the top, + * right, bottom, and left, respectively. + */ + + int num = inShorthand() ? 1 : valueList->size(); + //tqDebug("parse4Values: num=%d %d", num, valueList->numValues ); + + ShorthandScope scope(this, propId); + + // the order is top, right, bottom, left + switch (num) { + case 1: { + if (!parseValue(properties[0], important)) + return false; + CSSValueImpl *value = parsedProperties[numParsedProperties-1]->value(); + m_implicitShorthand = true; + addProperty(properties[1], value, important); + addProperty(properties[2], value, important); + addProperty(properties[3], value, important); + m_implicitShorthand = false; + break; + } + case 2: { + if (!parseValue(properties[0], important) || !parseValue(properties[1], important)) + return false; + CSSValueImpl *value = parsedProperties[numParsedProperties-2]->value(); + m_implicitShorthand = true; + addProperty(properties[2], value, important); + value = parsedProperties[numParsedProperties-2]->value(); + addProperty(properties[3], value, important); + m_implicitShorthand = false; + break; + } + case 3: { + if (!parseValue(properties[0], important) || !parseValue(properties[1], important) || !parseValue(properties[2], important)) + return false; + CSSValueImpl *value = parsedProperties[numParsedProperties-2]->value(); + m_implicitShorthand = true; + addProperty(properties[3], value, important); + m_implicitShorthand = false; + break; + } + case 4: { + if (!parseValue(properties[0], important) || !parseValue(properties[1], important) || + !parseValue(properties[2], important) || !parseValue(properties[3], important)) + return false; + break; + } + default: { + return false; + } + } + + return true; +} + +// [ | | | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit +// in CSS 2.1 this got somewhat reduced: +// [ | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit +bool CSSParser::parseContent( int propId, bool important ) +{ + CSSValueListImpl* values = new CSSValueListImpl(); + + bool isValid = true; + Value *val; + CSSValueImpl *parsedValue = 0; + while ( (val = valueList->current()) ) { + parsedValue = 0; + if ( val->unit == CSSPrimitiveValue::CSS_URI ) { + // url + DOMString value = tdehtml::parseURL(domString(val->string)); + parsedValue = new CSSImageValueImpl( + DOMString(KURL( styleElement->baseURL(), value.string()).url() ), styleElement ); +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "content, url=" << value.string() << " base=" << styleElement->baseURL().url( ) << endl; +#endif + } else if ( val->unit == Value::Function ) { + // attr( X ) | counter( X [,Y] ) | counters( X, Y, [,Z] ) + ValueList *args = val->function->args; + TQString fname = qString( val->function->name ).lower(); + if (!args) return false; + if (fname == "attr(") { + if ( args->size() != 1) + return false; + Value *a = args->current(); + if (a->unit != CSSPrimitiveValue::CSS_IDENT) { + isValid=false; + break; + } + if (qString(a->string)[0] == '-') { + isValid=false; + break; + } + parsedValue = new CSSPrimitiveValueImpl(domString(a->string), CSSPrimitiveValue::CSS_ATTR); + } + else + if (fname == "counter(") { + parsedValue = parseCounterContent(args, false); + if (!parsedValue) return false; + } else + if (fname == "counters(") { + parsedValue = parseCounterContent(args, true); + if (!parsedValue) return false; + } + else + return false; + + } else if ( val->unit == CSSPrimitiveValue::CSS_IDENT ) { + // open-quote | close-quote | no-open-quote | no-close-quote + if ( val->id == CSS_VAL_OPEN_QUOTE || + val->id == CSS_VAL_CLOSE_QUOTE || + val->id == CSS_VAL_NO_OPEN_QUOTE || + val->id == CSS_VAL_NO_CLOSE_QUOTE ) { + parsedValue = new CSSPrimitiveValueImpl(val->id); + } + } else if ( val->unit == CSSPrimitiveValue::CSS_STRING ) { + parsedValue = new CSSPrimitiveValueImpl(domString(val->string), CSSPrimitiveValue::CSS_STRING); + } + + if (parsedValue) + values->append(parsedValue); + else { + isValid = false; + break; + } + valueList->next(); + } + if ( isValid && values->length() ) { + addProperty( propId, values, important ); + valueList->next(); + return true; + } + + delete values; // also frees any content by deref + return false; +} + +CSSValueImpl* CSSParser::parseCounterContent(ValueList *args, bool counters) +{ + if (counters || (args->size() != 1 && args->size() != 3)) + if (!counters || (args->size() != 3 && args->size() != 5)) + return 0; + + CounterImpl *counter = new CounterImpl; + Value *i = args->current(); + if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid; + if (qString(i->string)[0] == '-') goto invalid; + counter->m_identifier = domString(i->string); + if (counters) { + i = args->next(); + if (i->unit != Value::Operator || i->iValue != ',') goto invalid; + i = args->next(); + if (i->unit != CSSPrimitiveValue::CSS_STRING) goto invalid; + counter->m_separator = domString(i->string); + } + counter->m_listStyle = CSS_VAL_DECIMAL - CSS_VAL_DISC; + i = args->next(); + if (i) { + if (i->unit != Value::Operator || i->iValue != ',') goto invalid; + i = args->next(); + if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid; + if (i->id < CSS_VAL_DISC || i->id > CSS_VAL__KHTML_CLOSE_QUOTE) goto invalid; + counter->m_listStyle = i->id - CSS_VAL_DISC; + } + return new CSSPrimitiveValueImpl(counter); +invalid: + delete counter; + return 0; +} + +CSSValueImpl* CSSParser::parseBackgroundColor() +{ + int id = valueList->current()->id; + if (id == CSS_VAL__KHTML_TEXT || id == CSS_VAL_TRANSPARENT || + (id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT) || id == CSS_VAL_MENU || + (id >= CSS_VAL_GREY && id < CSS_VAL__KHTML_TEXT && !strict)) + return new CSSPrimitiveValueImpl(id); + return parseColor(); +} + +CSSValueImpl* CSSParser::parseBackgroundImage() +{ + if (valueList->current()->id == CSS_VAL_NONE) + return new CSSImageValueImpl(); + if (valueList->current()->unit == CSSPrimitiveValue::CSS_URI) { + DOMString uri = tdehtml::parseURL(domString(valueList->current()->string)); + if (!uri.isEmpty()) + return new CSSImageValueImpl(DOMString(KURL(styleElement->baseURL(), uri.string()).url()), + styleElement); + } + return 0; +} + +CSSValueImpl* CSSParser::parseBackgroundPositionXY(bool& xFound, bool& yFound) +{ + int id = valueList->current()->id; + if (id == CSS_VAL_LEFT || id == CSS_VAL_TOP || id == CSS_VAL_RIGHT || id == CSS_VAL_BOTTOM || id == CSS_VAL_CENTER) { + int percent = 0; + if (id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT) { + if (xFound) + return 0; + xFound = true; + if (id == CSS_VAL_RIGHT) + percent = 100; + } + else if (id == CSS_VAL_TOP || id == CSS_VAL_BOTTOM) { + if (yFound) + return 0; + yFound = true; + if (id == CSS_VAL_BOTTOM) + percent = 100; + } + else if (id == CSS_VAL_CENTER) + // Center is ambiguous, so we're not sure which position we've found yet, an x or a y. + percent = 50; + return new CSSPrimitiveValueImpl(percent, CSSPrimitiveValue::CSS_PERCENTAGE); + } + if (validUnit(valueList->current(), FPercent|FLength, strict)) + return new CSSPrimitiveValueImpl(valueList->current()->fValue, + (CSSPrimitiveValue::UnitTypes)valueList->current()->unit); + + return 0; +} + +void CSSParser::parseBackgroundPosition(CSSValueImpl*& value1, CSSValueImpl*& value2) +{ + value1 = value2 = 0; + Value* value = valueList->current(); + + // Parse the first value. We're just making sure that it is one of the valid keywords or a percentage/length. + bool value1IsX = false, value1IsY = false; + value1 = parseBackgroundPositionXY(value1IsX, value1IsY); + if (!value1) + return; + + // It only takes one value for background-position to be correctly parsed if it was specified in a shorthand (since we + // can assume that any other values belong to the rest of the shorthand). If we're not parsing a shorthand, though, the + // value was explicitly specified for our property. + value = valueList->next(); + + // First check for the comma. If so, we are finished parsing this value or value pair. + if (value && value->unit == Value::Operator && value->iValue == ',') + value = 0; + + bool value2IsX = false, value2IsY = false; + if (value) { + value2 = parseBackgroundPositionXY(value2IsX, value2IsY); + if (value2) + valueList->next(); + else { + if (!inShorthand()) { + delete value1; + value1 = 0; + return; + } + } + } + + if (!value2) + // Only one value was specified. If that value was not a keyword, then it sets the x position, and the y position + // is simply 50%. This is our default. + // For keywords, the keyword was either an x-keyword (left/right), a y-keyword (top/bottom), or an ambiguous keyword (center). + // For left/right/center, the default of 50% in the y is still correct. + value2 = new CSSPrimitiveValueImpl(50, CSSPrimitiveValue::CSS_PERCENTAGE); + + if (value1IsY || value2IsX) { + // Swap our two values. + CSSValueImpl* val = value2; + value2 = value1; + value1 = val; + } +} + +CSSValueImpl* CSSParser::parseBackgroundSize() +{ + Value* value = valueList->current(); + CSSPrimitiveValueImpl* parsedValue1; + + if (value->id == CSS_VAL_AUTO) + parsedValue1 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN); + else { + if (!validUnit(value, FLength|FPercent, strict)) + return 0; + parsedValue1 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit); + } + + CSSPrimitiveValueImpl* parsedValue2 = parsedValue1; + if ((value = valueList->next())) { + if (value->id == CSS_VAL_AUTO) + parsedValue2 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN); + else { + if (!validUnit(value, FLength|FPercent, strict)) { + delete parsedValue1; + return 0; + } + parsedValue2 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit); + } + } + + PairImpl* pair = new PairImpl(parsedValue1, parsedValue2); + return new CSSPrimitiveValueImpl(pair); +} + +bool CSSParser::parseBackgroundProperty(int propId, int& propId1, int& propId2, + CSSValueImpl*& retValue1, CSSValueImpl*& retValue2) +{ +#ifdef CSS_DEBUG + kdDebug(6080) << "parseBackgroundProperty()" << endl; + kdDebug(6080) << "LOOKING FOR: " << getPropertyName(propId).string() << endl; +#endif + CSSValueListImpl *values = 0, *values2 = 0; + Value* val; + CSSValueImpl *value = 0, *value2 = 0; + bool allowComma = false; + + retValue1 = retValue2 = 0; + propId1 = propId; + propId2 = propId; + if (propId == CSS_PROP_BACKGROUND_POSITION) { + propId1 = CSS_PROP_BACKGROUND_POSITION_X; + propId2 = CSS_PROP_BACKGROUND_POSITION_Y; + } + + while ((val = valueList->current())) { + CSSValueImpl *currValue = 0, *currValue2 = 0; + if (allowComma) { + if (val->unit != Value::Operator || val->iValue != ',') + goto failed; + valueList->next(); + allowComma = false; + } + else { + switch (propId) { + case CSS_PROP_BACKGROUND_ATTACHMENT: + if (val->id == CSS_VAL_SCROLL || val->id == CSS_VAL_FIXED) { + currValue = new CSSPrimitiveValueImpl(val->id); + valueList->next(); + } + break; + case CSS_PROP_BACKGROUND_COLOR: + currValue = parseBackgroundColor(); + if (currValue) + valueList->next(); + break; + case CSS_PROP_BACKGROUND_IMAGE: + currValue = parseBackgroundImage(); + if (currValue) + valueList->next(); + break; + case CSS_PROP__KHTML_BACKGROUND_CLIP: + case CSS_PROP__KHTML_BACKGROUND_ORIGIN: + if (val->id == CSS_VAL_BORDER || val->id == CSS_VAL_PADDING || val->id == CSS_VAL_CONTENT) { + currValue = new CSSPrimitiveValueImpl(val->id); + valueList->next(); + } + break; + case CSS_PROP_BACKGROUND_POSITION: + parseBackgroundPosition(currValue, currValue2); + // unlike the other functions, parseBackgroundPosition advances the valueList pointer + break; + case CSS_PROP_BACKGROUND_POSITION_X: { + bool xFound = false, yFound = true; + currValue = parseBackgroundPositionXY(xFound, yFound); + if (currValue) + valueList->next(); + break; + } + case CSS_PROP_BACKGROUND_POSITION_Y: { + bool xFound = true, yFound = false; + currValue = parseBackgroundPositionXY(xFound, yFound); + if (currValue) + valueList->next(); + break; + } + case CSS_PROP_BACKGROUND_REPEAT: + if (val->id >= CSS_VAL_REPEAT && val->id <= CSS_VAL_NO_REPEAT) { + currValue = new CSSPrimitiveValueImpl(val->id); + valueList->next(); + } + break; + case CSS_PROP__KHTML_BACKGROUND_SIZE: + currValue = parseBackgroundSize(); + if (currValue) + valueList->next(); + break; + } + + if (!currValue) + goto failed; + + if (value && !values) { + values = new CSSValueListImpl(); + values->append(value); + value = 0; + } + + if (value2 && !values2) { + values2 = new CSSValueListImpl(); + values2->append(value2); + value2 = 0; + } + + if (values) + values->append(currValue); + else + value = currValue; + if (currValue2) { + if (values2) + values2->append(currValue2); + else + value2 = currValue2; + } + allowComma = true; + } + + // When parsing the 'background' shorthand property, we let it handle building up the lists for all + // properties. + if (inShorthand()) + break; + } + + if (values && values->length()) { + retValue1 = values; + if (values2 && values2->length()) + retValue2 = values2; + return true; + } + if (value) { + retValue1 = value; + retValue2 = value2; + return true; + } + +failed: + delete values; delete values2; + delete value; delete value2; + return false; +} + +bool CSSParser::parseShape( int propId, bool important ) +{ + Value *value = valueList->current(); + ValueList *args = value->function->args; + TQString fname = qString( value->function->name ).lower(); + //tqDebug( "parseShape: fname: %d", fname.latin1() ); + if ( fname != "rect(" || !args ) + return false; + + // rect( t, r, b, l ) || rect( t r b l ) + if ( args->size() != 4 && args->size() != 7 ) + return false; + RectImpl *rect = new RectImpl(); + bool valid = true; + int i = 0; + Value *a = args->current(); + while ( a ) { + valid = validUnit( a, FLength, strict ); + if ( !valid ) + break; + CSSPrimitiveValueImpl *length = + new CSSPrimitiveValueImpl( a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit ); + if ( i == 0 ) + rect->setTop( length ); + else if ( i == 1 ) + rect->setRight( length ); + else if ( i == 2 ) + rect->setBottom( length ); + else + rect->setLeft( length ); + a = args->next(); + if ( a && args->size() == 7 ) { + if ( a->unit == Value::Operator && a->iValue == ',' ) { + a = args->next(); + } else { + valid = false; + break; + } + } + i++; + } + if ( valid ) { + addProperty( propId, new CSSPrimitiveValueImpl( rect ), important ); + valueList->next(); + return true; + } + delete rect; + return false; +} + +// [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' +bool CSSParser::parseFont( bool important ) +{ +// kdDebug(6080) << "parsing font property current=" << valueList->currentValue << endl; + bool valid = true; + Value *value = valueList->current(); + CSSValueListImpl* family = 0; + CSSPrimitiveValueImpl *style = 0, *variant = 0, *weight = 0, *size = 0, *lineHeight = 0; + // optional font-style, font-variant and font-weight + while ( value ) { +// kdDebug( 6080 ) << "got value " << value->id << " / " << (value->unit == CSSPrimitiveValue::CSS_STRING || + // value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : TQString::null ) +// << endl; + int id = value->id; + if ( id ) { + if ( id == CSS_VAL_NORMAL ) { + // do nothing, it's the initial value for all three + } + /* + else if ( id == CSS_VAL_INHERIT ) { + // set all non set ones to inherit + // This is not that simple as the inherit could also apply to the following font-size. + // very ahrd to tell without looking ahead. + inherit = true; + } */ + else if ( id == CSS_VAL_ITALIC || id == CSS_VAL_OBLIQUE ) { + if ( style ) + goto invalid; + style = new CSSPrimitiveValueImpl( id ); + } else if ( id == CSS_VAL_SMALL_CAPS ) { + if ( variant ) + goto invalid; + variant = new CSSPrimitiveValueImpl( id ); + } else if ( id >= CSS_VAL_BOLD && id <= CSS_VAL_LIGHTER ) { + if ( weight ) + goto invalid; + weight = new CSSPrimitiveValueImpl( id ); + } else { + valid = false; + } + } else if ( !weight && validUnit( value, FInteger|FNonNeg, true ) ) { + int w = (int)value->fValue; + int val = 0; + if ( w == 100 ) + val = CSS_VAL_100; + else if ( w == 200 ) + val = CSS_VAL_200; + else if ( w == 300 ) + val = CSS_VAL_300; + else if ( w == 400 ) + val = CSS_VAL_400; + else if ( w == 500 ) + val = CSS_VAL_500; + else if ( w == 600 ) + val = CSS_VAL_600; + else if ( w == 700 ) + val = CSS_VAL_700; + else if ( w == 800 ) + val = CSS_VAL_800; + else if ( w == 900 ) + val = CSS_VAL_900; + + if ( val ) + weight = new CSSPrimitiveValueImpl( val ); + else + valid = false; + } else { + valid = false; + } + if ( !valid ) + break; + value = valueList->next(); + } + if ( !value ) + goto invalid; + + // set undefined values to default + if ( !style ) + style = new CSSPrimitiveValueImpl( CSS_VAL_NORMAL ); + if ( !variant ) + variant = new CSSPrimitiveValueImpl( CSS_VAL_NORMAL ); + if ( !weight ) + weight = new CSSPrimitiveValueImpl( CSS_VAL_NORMAL ); + +// kdDebug( 6080 ) << " got style, variant and weight current=" << valueList->currentValue << endl; + + // now a font size _must_ come + // | | | | inherit + if ( value->id >= CSS_VAL_XX_SMALL && value->id <= CSS_VAL_LARGER ) + size = new CSSPrimitiveValueImpl( value->id ); + else if ( validUnit( value, FLength|FPercent, strict ) ) { + size = new CSSPrimitiveValueImpl( value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit ); + } + value = valueList->next(); + if ( !size || !value ) + goto invalid; + + // kdDebug( 6080 ) << " got size" << endl; + + if ( value->unit == Value::Operator && value->iValue == '/' ) { + // line-height + value = valueList->next(); + if ( !value ) + goto invalid; + if ( value->id == CSS_VAL_NORMAL ) { + // default value, nothing to do + } else if ( validUnit( value, FNumber|FLength|FPercent, strict ) ) { + lineHeight = new CSSPrimitiveValueImpl( value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit ); + } else { + goto invalid; + } + value = valueList->next(); + if ( !value ) + goto invalid; + } + if ( !lineHeight ) + lineHeight = new CSSPrimitiveValueImpl( CSS_VAL_NORMAL ); + +// kdDebug( 6080 ) << " got line height current=" << valueList->currentValue << endl; + // font family must come now + family = parseFontFamily(); + + if ( valueList->current() || !family ) + goto invalid; + //kdDebug( 6080 ) << " got family, parsing ok!" << endl; + + addProperty( CSS_PROP_FONT_FAMILY, family, important ); + addProperty( CSS_PROP_FONT_STYLE, style, important ); + addProperty( CSS_PROP_FONT_VARIANT, variant, important ); + addProperty( CSS_PROP_FONT_WEIGHT, weight, important ); + addProperty( CSS_PROP_FONT_SIZE, size, important ); + addProperty( CSS_PROP_LINE_HEIGHT, lineHeight, important ); + return true; + + invalid: + //kdDebug(6080) << " -> invalid" << endl; + delete family; + delete style; + delete variant; + delete weight; + delete size; + delete lineHeight; + + return false; +} + +CSSValueListImpl *CSSParser::parseFontFamily() +{ +// kdDebug( 6080 ) << "CSSParser::parseFontFamily current=" << valueList->currentValue << endl; + CSSValueListImpl *list = new CSSValueListImpl; + Value *value = valueList->current(); + TQString currFace; + + while ( value ) { +// kdDebug( 6080 ) << "got value " << value->id << " / " +// << (value->unit == CSSPrimitiveValue::CSS_STRING || +// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : TQString::null ) +// << endl; + Value* nextValue = valueList->next(); + bool nextValBreaksFont = !nextValue || + (nextValue->unit == Value::Operator && nextValue->iValue == ','); + bool nextValIsFontName = nextValue && + ((nextValue->id >= CSS_VAL_SERIF && nextValue->id <= CSS_VAL_MONOSPACE) || + (nextValue->unit == CSSPrimitiveValue::CSS_STRING || + nextValue->unit == CSSPrimitiveValue::CSS_IDENT)); + + if (value->id >= CSS_VAL_SERIF && value->id <= CSS_VAL_MONOSPACE) { + if (!currFace.isNull()) { + currFace += ' '; + currFace += qString(value->string); + } + else if (nextValBreaksFont || !nextValIsFontName) { + if ( !currFace.isNull() ) { + list->append( new FontFamilyValueImpl( currFace ) ); + currFace = TQString::null; + } + list->append(new CSSPrimitiveValueImpl(value->id)); + } + else { + currFace = qString( value->string ); + } + } + else if (value->unit == CSSPrimitiveValue::CSS_STRING) { + // Strings never share in a family name. + currFace = TQString::null; + list->append(new FontFamilyValueImpl(qString( value->string) ) ); + } + else if (value->unit == CSSPrimitiveValue::CSS_IDENT) { + if (!currFace.isNull()) { + currFace += ' '; + currFace += qString(value->string); + } + else if (nextValBreaksFont || !nextValIsFontName) { + if ( !currFace.isNull() ) { + list->append( new FontFamilyValueImpl( currFace ) ); + currFace = TQString::null; + } + list->append(new FontFamilyValueImpl( qString( value->string ) ) ); + } + else { + currFace = qString( value->string); + } + } + else { + //kdDebug( 6080 ) << "invalid family part" << endl; + break; + } + + if (!nextValue) + break; + + if (nextValBreaksFont) { + value = valueList->next(); + if ( !currFace.isNull() ) + list->append( new FontFamilyValueImpl( currFace ) ); + currFace = TQString::null; + } + else if (nextValIsFontName) + value = nextValue; + else + break; + } + + if ( !currFace.isNull() ) + list->append( new FontFamilyValueImpl( currFace ) ); + + if ( !list->length() ) { + delete list; + list = 0; + } + return list; +} + + +bool CSSParser::parseColorParameters(Value* value, int* colorArray, bool parseAlpha) +{ + ValueList* args = value->function->args; + Value* v = args->current(); + // Get the first value + if (!validUnit(v, FInteger | FPercent, true)) + return false; + colorArray[0] = static_cast(v->fValue * (v->unit == CSSPrimitiveValue::CSS_PERCENTAGE ? 256.0 / 100.0 : 1.0)); + for (int i = 1; i < 3; i++) { + v = args->next(); + if (v->unit != Value::Operator && v->iValue != ',') + return false; + v = args->next(); + if (!validUnit(v, FInteger | FPercent, true)) + return false; + colorArray[i] = static_cast(v->fValue * (v->unit == CSSPrimitiveValue::CSS_PERCENTAGE ? 256.0 / 100.0 : 1.0)); + } + if (parseAlpha) { + v = args->next(); + if (v->unit != Value::Operator && v->iValue != ',') + return false; + v = args->next(); + if (!validUnit(v, FNumber, true)) + return false; + colorArray[3] = static_cast(kMax(0.0, kMin(1.0, v->fValue)) * 255); + } + return true; +} + +// CSS3 specification defines the format of a HSL color as +// hsl(, , ) +// and with alpha, the format is +// hsla(, , , ) +// The first value, HUE, is in an angle with a value between 0 and 360 +bool CSSParser::parseHSLParameters(Value* value, double* colorArray, bool parseAlpha) +{ + ValueList* args = value->function->args; + Value* v = args->current(); + // Get the first value + if (!validUnit(v, FInteger, true)) + return false; + // normalize the Hue value and change it to be between 0 and 1.0 + colorArray[0] = (((static_cast(v->fValue) % 360) + 360) % 360) / 360.0; + for (int i = 1; i < 3; i++) { + v = args->next(); + if (v->unit != Value::Operator && v->iValue != ',') + return false; + v = args->next(); + if (!validUnit(v, FPercent, true)) + return false; + colorArray[i] = kMax(0.0, kMin(100.0, v->fValue)) / 100.0; // needs to be value between 0 and 1.0 + } + if (parseAlpha) { + v = args->next(); + if (v->unit != Value::Operator && v->iValue != ',') + return false; + v = args->next(); + if (!validUnit(v, FNumber, true)) + return false; + colorArray[3] = kMax(0.0, kMin(1.0, v->fValue)); + } + return true; +} + +static bool parseColor(int unit, const TQString &name, QRgb& rgb) +{ + int len = name.length(); + + if ( !len ) + return false; + + + bool ok; + + if ( len == 3 || len == 6 ) { + int val = name.toInt(&ok, 16); + if ( ok ) { + if (len == 6) { + rgb = (0xff << 24) | val; + return true; + } + else if ( len == 3 ) { + // #abc converts to #aabbcc according to the specs + rgb = (0xff << 24) | + (val&0xf00)<<12 | (val&0xf00)<<8 | + (val&0xf0)<<8 | (val&0xf0)<<4 | + (val&0xf)<<4 | (val&0xf); + return true; + } + } + } + + if ( unit == CSSPrimitiveValue::CSS_IDENT ) { + // try a little harder + TQColor tc; + tc.setNamedColor(name.lower()); + if ( tc.isValid() ) { + rgb = tc.rgb(); + return true; + } + } + + return false; +} + +CSSPrimitiveValueImpl *CSSParser::parseColor() +{ + return parseColorFromValue(valueList->current()); +} + +CSSPrimitiveValueImpl *CSSParser::parseColorFromValue(Value* value) +{ + QRgb c = tdehtml::transparentColor; + if ( !strict && value->unit == CSSPrimitiveValue::CSS_NUMBER && + value->fValue >= 0. && value->fValue < 1000000. ) { + TQString str; + str.sprintf( "%06d", (int)(value->fValue+.5) ); + if ( !::parseColor( value->unit, str, c ) ) + return 0; + } + else if (value->unit == CSSPrimitiveValue::CSS_RGBCOLOR || + value->unit == CSSPrimitiveValue::CSS_IDENT || + (!strict && value->unit == CSSPrimitiveValue::CSS_DIMENSION)) { + if ( !::parseColor( value->unit, qString( value->string ), c) ) + return 0; + } + else if ( value->unit == Value::Function && + value->function->args != 0 && + value->function->args->size() == 5 /* rgb + two commas */ && + qString( value->function->name ).lower() == "rgb(" ) { + int colorValues[3]; + if (!parseColorParameters(value, colorValues, false)) + return 0; + colorValues[0] = kMax( 0, kMin( 255, colorValues[0] ) ); + colorValues[1] = kMax( 0, kMin( 255, colorValues[1] ) ); + colorValues[2] = kMax( 0, kMin( 255, colorValues[2] ) ); + c = tqRgb(colorValues[0], colorValues[1], colorValues[2]); + } else if (value->unit == Value::Function && + value->function->args != 0 && + value->function->args->size() == 7 /* rgba + three commas */ && + domString(value->function->name).lower() == "rgba(") { + int colorValues[4]; + if (!parseColorParameters(value, colorValues, true)) + return 0; + colorValues[0] = kMax( 0, kMin( 255, colorValues[0] ) ); + colorValues[1] = kMax( 0, kMin( 255, colorValues[1] ) ); + colorValues[2] = kMax( 0, kMin( 255, colorValues[2] ) ); + c = tqRgba(colorValues[0], colorValues[1], colorValues[2], colorValues[3]); + } else if (value->unit == Value::Function && + value->function->args != 0 && + value->function->args->size() == 5 /* hsl + two commas */ && + domString(value->function->name).lower() == "hsl(") { + double colorValues[3]; + if (!parseHSLParameters(value, colorValues, false)) + return 0; + c = tdehtml::tqRgbaFromHsla(colorValues[0], colorValues[1], colorValues[2], 1.0); + } else if (value->unit == Value::Function && + value->function->args != 0 && + value->function->args->size() == 7 /* hsla + three commas */ && + domString(value->function->name).lower() == "hsla(") { + double colorValues[4]; + if (!parseHSLParameters(value, colorValues, true)) + return 0; + c = tdehtml::tqRgbaFromHsla(colorValues[0], colorValues[1], colorValues[2], colorValues[3]); + } + else + return 0; + + return new CSSPrimitiveValueImpl(c); +} + +// This class tracks parsing state for shadow values. If it goes out of scope (e.g., due to an early return) +// without the allowBreak bit being set, then it will clean up all of the objects and destroy them. +struct ShadowParseContext { + ShadowParseContext() + :values(0), x(0), y(0), blur(0), color(0), + allowX(true), allowY(false), allowBlur(false), allowColor(true), + allowBreak(true) + {} + + ~ShadowParseContext() { + if (!allowBreak) { + delete values; + delete x; + delete y; + delete blur; + delete color; + } + } + + bool allowLength() { return allowX || allowY || allowBlur; } + + bool failed() { return allowBreak = false; } + + void commitValue() { + // Handle the ,, case gracefully by doing nothing. + if (x || y || blur || color) { + if (!values) + values = new CSSValueListImpl(); + + // Construct the current shadow value and add it to the list. + values->append(new ShadowValueImpl(x, y, blur, color)); + } + + // Now reset for the next shadow value. + x = y = blur = color = 0; + allowX = allowColor = allowBreak = true; + allowY = allowBlur = false; + } + + void commitLength(Value* v) { + CSSPrimitiveValueImpl* val = new CSSPrimitiveValueImpl(v->fValue, + (CSSPrimitiveValue::UnitTypes)v->unit); + if (allowX) { + x = val; + allowX = false; allowY = true; allowColor = false; allowBreak = false; + } + else if (allowY) { + y = val; + allowY = false; allowBlur = true; allowColor = true; allowBreak = true; + } + else if (allowBlur) { + blur = val; + allowBlur = false; + } + else + delete val; + } + + void commitColor(CSSPrimitiveValueImpl* val) { + color = val; + allowColor = false; + if (allowX) + allowBreak = false; + else + allowBlur = false; + } + + CSSValueListImpl* values; + CSSPrimitiveValueImpl* x; + CSSPrimitiveValueImpl* y; + CSSPrimitiveValueImpl* blur; + CSSPrimitiveValueImpl* color; + + bool allowX; + bool allowY; + bool allowBlur; + bool allowColor; + bool allowBreak; +}; + +bool CSSParser::parseShadow(int propId, bool important) +{ + ShadowParseContext context; + Value* val; + while ((val = valueList->current())) { + // Check for a comma break first. + if (val->unit == Value::Operator) { + if (val->iValue != ',' || !context.allowBreak) + // Other operators aren't legal or we aren't done with the current shadow + // value. Treat as invalid. + return context.failed(); + + // The value is good. Commit it. + context.commitValue(); + } + // Check to see if we're a length. + else if (validUnit(val, FLength, true)) { + // We required a length and didn't get one. Invalid. + if (!context.allowLength()) + return context.failed(); + + // A length is allowed here. Construct the value and add it. + context.commitLength(val); + } + else { + // The only other type of value that's ok is a color value. + CSSPrimitiveValueImpl* parsedColor = 0; + bool isColor = (val->id >= CSS_VAL_AQUA && val->id <= CSS_VAL_WINDOWTEXT || val->id == CSS_VAL_MENU || + (val->id >= CSS_VAL_GREY && val->id <= CSS_VAL__KHTML_TEXT && !strict)); + if (!context.allowColor) + return context.failed(); + + if (isColor) + parsedColor = new CSSPrimitiveValueImpl(val->id); + + if (!parsedColor) + // It's not built-in. Try to parse it as a color. + parsedColor = parseColorFromValue(val); + + if (!parsedColor) + return context.failed(); + + context.commitColor(parsedColor); + } + + valueList->next(); + } + + if (context.allowBreak) { + context.commitValue(); + if (context.values->length()) { + addProperty(propId, context.values, important); + valueList->next(); + return true; + } + } + + return context.failed(); +} + +bool CSSParser::parseCounter(int propId, bool increment, bool important) +{ + enum { ID, VAL, COMMA } state = ID; + + CSSValueListImpl *list = new CSSValueListImpl; + DOMString c; + Value* val; + while (true) { + val = valueList->current(); + switch (state) { + // Commas are not allowed according to the standard, but Opera allows them and being the only + // other browser with counter support we need to match their behavior to work with current use + case COMMA: + state = ID; + if (val && val->unit == Value::Operator && val->iValue == ',') { + valueList->next(); + continue; + } + // no break + case ID: + if (val && val->unit == CSSPrimitiveValue::CSS_IDENT) { + c = qString(val->string); + state = VAL; + valueList->next(); + continue; + } + break; + case VAL: { + short i = 0; + if (val && val->unit == CSSPrimitiveValue::CSS_NUMBER) { + i = (short)val->fValue; + valueList->next(); + } else + i = (increment) ? 1 : 0; + + CounterActImpl *cv = new CounterActImpl(c,i); + list->append(cv); + state = COMMA; + continue; + } + } + break; + } + if(list->length() > 0) { + addProperty( propId, list, important ); + return true; + } + delete list; + return false; +} + +static inline int yyerror( const char *str ) { +// assert( 0 ); +#ifdef CSS_DEBUG + kdDebug( 6080 ) << "CSS parse error " << str << endl; +#else + Q_UNUSED( str ); +#endif + return 1; +} + +#define END 0 + +#include "parser.h" + +int DOM::CSSParser::lex( void *_yylval ) +{ + YYSTYPE *yylval = (YYSTYPE *)_yylval; + int token = lex(); + int length; + unsigned short *t = text( &length ); + +#ifdef TOKEN_DEBUG + tqDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : TQString( (TQChar *)t, length ).latin1() ); +#endif + switch( token ) { + case '{': + block_nesting++; + break; + case '}': + if ( block_nesting ) + block_nesting--; + break; + case END: + if ( block_nesting ) { + block_nesting--; + return '}'; + } + break; + case S: + case SGML_CD: + case INCLUDES: + case DASHMATCH: + break; + + case URI: + case STRING: + case IDENT: + case NTH: + case HASH: + case DIMEN: + case UNICODERANGE: + case NOTFUNCTION: + case FUNCTION: + yylval->string.string = t; + yylval->string.length = length; + break; + + case IMPORT_SYM: + case PAGE_SYM: + case MEDIA_SYM: + case FONT_FACE_SYM: + case CHARSET_SYM: + case NAMESPACE_SYM: + + case IMPORTANT_SYM: + break; + + case QEMS: + length--; + case GRADS: + length--; + case DEGS: + case RADS: + case KHERZ: + length--; + case MSECS: + case HERZ: + case EMS: + case EXS: + case PXS: + case CMS: + case MMS: + case INS: + case PTS: + case PCS: + length--; + case SECS: + case PERCENTAGE: + length--; + case FLOAT: + case INTEGER: + yylval->val = TQString( (TQChar *)t, length ).toDouble(); + //tqDebug("value = %s, converted=%.2f", TQString( (TQChar *)t, length ).latin1(), yylval->val ); + break; + + default: + break; + } + + return token; +} + +static inline int toHex( char c ) { + if ( '0' <= c && c <= '9' ) + return c - '0'; + if ( 'a' <= c && c <= 'f' ) + return c - 'a' + 10; + if ( 'A' <= c && c<= 'F' ) + return c - 'A' + 10; + return 0; +} + +unsigned short *DOM::CSSParser::text(int *length) +{ + unsigned short *start = yytext; + int l = yyleng; + switch( yyTok ) { + case STRING: + l--; + /* nobreak */ + case HASH: + start++; + l--; + break; + case URI: + // "url("{w}{string}{w}")" + // "url("{w}{url}{w}")" + + // strip "url(" and ")" + start += 4; + l -= 5; + // strip {w} + while ( l && + (*start == ' ' || *start == '\t' || *start == '\r' || + *start == '\n' || *start == '\f' ) ) { + start++; l--; + } + if ( *start == '"' || *start == '\'' ) { + start++; l--; + } + while ( l && + (start[l-1] == ' ' || start[l-1] == '\t' || start[l-1] == '\r' || + start[l-1] == '\n' || start[l-1] == '\f' ) ) { + l--; + } + if ( l && (start[l-1] == '\"' || start[l-1] == '\'' ) ) + l--; + + default: + break; + } + + // process escapes + unsigned short *out = start; + unsigned short *escape = 0; + + for ( int i = 0; i < l; i++ ) { + unsigned short *current = start+i; + if ( escape == current - 1 ) { + if ( ( *current >= '0' && *current <= '9' ) || + ( *current >= 'a' && *current <= 'f' ) || + ( *current >= 'A' && *current <= 'F' ) ) + continue; + if ( yyTok == STRING && + ( *current == '\n' || *current == '\r' || *current == '\f' ) ) { + // ### handle \r\n case + if ( *current != '\r' ) + escape = 0; + continue; + } + // in all other cases copy the char to output + // ### + *out++ = *current; + escape = 0; + continue; + } + if ( escape == current - 2 && yyTok == STRING && + *(current-1) == '\r' && *current == '\n' ) { + escape = 0; + continue; + } + if ( escape > current - 7 && + ( ( *current >= '0' && *current <= '9' ) || + ( *current >= 'a' && *current <= 'f' ) || + ( *current >= 'A' && *current <= 'F' ) ) ) + continue; + if ( escape ) { + // add escaped char + int uc = 0; + escape++; + while ( escape < current ) { +// tqDebug("toHex( %c = %x", (char)*escape, toHex( *escape ) ); + uc *= 16; + uc += toHex( *escape ); + escape++; + } +// tqDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc ); + // can't handle chars outside ucs2 + if ( uc > 0xffff ) + uc = 0xfffd; + *(out++) = (unsigned short)uc; + escape = 0; + if ( *current == ' ' || + *current == '\t' || + *current == '\r' || + *current == '\n' || + *current == '\f' ) + continue; + } + if ( !escape && *current == '\\' ) { + escape = current; + continue; + } + *(out++) = *current; + } + if ( escape ) { + // add escaped char + int uc = 0; + escape++; + while ( escape < start+l ) { + // tqDebug("toHex( %c = %x", (char)*escape, toHex( *escape ) ); + uc *= 16; + uc += toHex( *escape ); + escape++; + } + // tqDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc ); + // can't handle chars outside ucs2 + if ( uc > 0xffff ) + uc = 0xfffd; + *(out++) = (unsigned short)uc; + } + + *length = out - start; + return start; +} + + +#define YY_DECL int DOM::CSSParser::lex() +#define yyconst const +typedef int yy_state_type; +typedef unsigned int YY_CHAR; +// this line makes sure we treat all Unicode chars correctly. +#define YY_SC_TO_UI(c) (c > 0xff ? 0xff : c) +#define YY_DO_BEFORE_ACTION \ + yytext = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = 0; \ + yy_c_buf_p = yy_cp; +#define YY_BREAK break; +#define ECHO tqDebug( "%s", TQString( (TQChar *)yytext, yyleng ).latin1() ) +#define YY_RULE_SETUP +#define INITIAL 0 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +#define YY_START ((yy_start - 1) / 2) +#define yyterminate() yyTok = END; return yyTok +#define YY_FATAL_ERROR(a) tqFatal(a) +#define BEGIN yy_start = 1 + 2 * +#define COMMENT 1 + +#include "tokenizer.cpp" -- cgit v1.2.3 From 7427e438358d44c37e3c8b0a9cfbb225ffd60e79 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 15:54:26 -0600 Subject: Rename KHTML and kiobuffer --- KDE2PORTING.html | 12 +- KDE3PORTING.html | 10 +- TODO | 2 +- configure.in.in | 2 +- kjs/README | 2 +- kstyles/keramik/keramik.cpp | 8 +- tdecore/network/kiobuffer.h | 144 ---- tdecore/network/tdeiobuffer.h | 144 ++++ tdecore/tdelibs_export.h | 2 +- tdehtml/ChangeLog | 32 +- tdehtml/DESIGN.html | 14 +- tdehtml/Mainpage.dox | 12 +- tdehtml/README.HTMLWidget | 2 +- tdehtml/css/css_renderstyledeclarationimpl.cpp | 56 +- tdehtml/css/css_valueimpl.cpp | 2 +- tdehtml/css/csshelper.h | 2 +- tdehtml/css/cssparser.cpp | 82 +- tdehtml/css/cssproperties.c | 30 +- tdehtml/css/cssproperties.h | 30 +- tdehtml/css/cssstyleselector.cpp | 72 +- tdehtml/css/cssstyleselector.h | 18 +- tdehtml/css/cssvalues.c | 54 +- tdehtml/css/cssvalues.h | 54 +- tdehtml/css/cssvalues.in | 6 +- tdehtml/css/parser.cpp | 14 +- tdehtml/css/parser.h | 12 +- tdehtml/css/parser.y | 12 +- tdehtml/css/tokenizer.cpp | 6 +- tdehtml/css/tokenizer.flex | 6 +- tdehtml/design.h | 2 +- tdehtml/dom/css_rule.h | 20 +- tdehtml/dom/css_stylesheet.h | 14 +- tdehtml/dom/css_value.h | 14 +- tdehtml/dom/dom2_events.h | 14 +- tdehtml/dom/dom2_range.h | 4 +- tdehtml/dom/dom2_traversal.h | 8 +- tdehtml/dom/dom2_views.h | 2 +- tdehtml/dom/dom_doc.cpp | 2 +- tdehtml/dom/dom_doc.h | 20 +- tdehtml/dom/dom_element.h | 6 +- tdehtml/dom/dom_exception.h | 2 +- tdehtml/dom/dom_misc.h | 2 +- tdehtml/dom/dom_node.h | 8 +- tdehtml/dom/dom_string.h | 14 +- tdehtml/dom/dom_text.h | 6 +- tdehtml/dom/dom_xml.h | 10 +- tdehtml/dom/html_base.h | 12 +- tdehtml/dom/html_block.h | 14 +- tdehtml/dom/html_document.cpp | 2 +- tdehtml/dom/html_document.h | 12 +- tdehtml/dom/html_element.h | 6 +- tdehtml/dom/html_form.h | 22 +- tdehtml/dom/html_head.h | 12 +- tdehtml/dom/html_image.h | 6 +- tdehtml/dom/html_inline.h | 10 +- tdehtml/dom/html_list.h | 12 +- tdehtml/dom/html_misc.h | 8 +- tdehtml/dom/html_object.h | 6 +- tdehtml/dom/html_table.h | 12 +- tdehtml/domtreeview.cpp | 2 +- tdehtml/domtreeview.h | 4 +- tdehtml/ecma/README | 4 +- tdehtml/ecma/kjs_binding.cpp | 2 +- tdehtml/ecma/kjs_debugwin.cpp | 10 +- tdehtml/ecma/kjs_dom.cpp | 26 +- tdehtml/ecma/kjs_events.cpp | 4 +- tdehtml/ecma/kjs_html.cpp | 34 +- tdehtml/ecma/kjs_mozilla.cpp | 4 +- tdehtml/ecma/kjs_mozilla.h | 8 +- tdehtml/ecma/kjs_navigator.cpp | 2 +- tdehtml/ecma/kjs_navigator.h | 8 +- tdehtml/ecma/kjs_proxy.cpp | 8 +- tdehtml/ecma/kjs_proxy.h | 6 +- tdehtml/ecma/kjs_traversal.cpp | 4 +- tdehtml/ecma/kjs_window.cpp | 150 ++-- tdehtml/ecma/kjs_window.h | 12 +- tdehtml/ecma/testecma.cpp | 2 +- tdehtml/ecma/xmlhttprequest.cpp | 2 +- tdehtml/html/html_baseimpl.cpp | 24 +- tdehtml/html/html_baseimpl.h | 6 +- tdehtml/html/html_blockimpl.cpp | 28 +- tdehtml/html/html_documentimpl.cpp | 12 +- tdehtml/html/html_documentimpl.h | 4 +- tdehtml/html/html_elementimpl.cpp | 6 +- tdehtml/html/html_formimpl.cpp | 36 +- tdehtml/html/html_formimpl.h | 2 +- tdehtml/html/html_headimpl.cpp | 4 +- tdehtml/html/html_headimpl.h | 2 +- tdehtml/html/html_inlineimpl.cpp | 4 +- tdehtml/html/html_objectimpl.cpp | 10 +- tdehtml/html/html_objectimpl.h | 2 +- tdehtml/html/html_tableimpl.cpp | 10 +- tdehtml/html/htmlparser.cpp | 52 +- tdehtml/html/htmlparser.h | 12 +- tdehtml/html/htmltokenizer.cpp | 28 +- tdehtml/html/htmltokenizer.h | 12 +- tdehtml/htmlpageinfo.ui | 2 +- tdehtml/java/kjavaappletcontext.h | 6 +- tdehtml/java/kjavaappletviewer.cpp | 8 +- tdehtml/misc/decoder.h | 4 +- tdehtml/misc/htmltags.h | 4 +- tdehtml/misc/loader.cpp | 26 +- tdehtml/misc/loader.h | 24 +- tdehtml/misc/maketags | 4 +- tdehtml/misc/stringit.h | 4 +- tdehtml/rendering/bidi.cpp | 16 +- tdehtml/rendering/font.cpp | 2 +- tdehtml/rendering/font.h | 4 +- tdehtml/rendering/render_applet.cpp | 8 +- tdehtml/rendering/render_applet.h | 2 +- tdehtml/rendering/render_arena.cpp | 14 +- tdehtml/rendering/render_arena.h | 6 +- tdehtml/rendering/render_block.cpp | 40 +- tdehtml/rendering/render_block.h | 2 +- tdehtml/rendering/render_box.cpp | 14 +- tdehtml/rendering/render_canvas.cpp | 8 +- tdehtml/rendering/render_canvas.h | 8 +- tdehtml/rendering/render_container.cpp | 14 +- tdehtml/rendering/render_flow.cpp | 2 +- tdehtml/rendering/render_form.cpp | 42 +- tdehtml/rendering/render_form.h | 6 +- tdehtml/rendering/render_frames.cpp | 40 +- tdehtml/rendering/render_frames.h | 4 +- tdehtml/rendering/render_generated.cpp | 4 +- tdehtml/rendering/render_image.cpp | 6 +- tdehtml/rendering/render_inline.cpp | 4 +- tdehtml/rendering/render_inline.h | 2 +- tdehtml/rendering/render_list.cpp | 10 +- tdehtml/rendering/render_object.cpp | 20 +- tdehtml/rendering/render_object.h | 6 +- tdehtml/rendering/render_replaced.cpp | 42 +- tdehtml/rendering/render_replaced.h | 10 +- tdehtml/rendering/render_style.h | 4 +- tdehtml/rendering/render_table.cpp | 22 +- tdehtml/rendering/render_text.cpp | 20 +- tdehtml/tdehtml-devel-gdb | 6 +- tdehtml/tdehtml.desktop | 4 +- tdehtml/tdehtml_caret.cpp | 18 +- tdehtml/tdehtml_caret_p.h | 14 +- tdehtml/tdehtml_ext.cpp | 134 +-- tdehtml/tdehtml_ext.h | 42 +- tdehtml/tdehtml_factory.cpp | 60 +- tdehtml/tdehtml_factory.h | 26 +- tdehtml/tdehtml_iface.cc | 80 +- tdehtml/tdehtml_iface.h | 12 +- tdehtml/tdehtml_pagecache.cpp | 100 +-- tdehtml/tdehtml_pagecache.h | 22 +- tdehtml/tdehtml_part.cpp | 1028 ++++++++++++------------ tdehtml/tdehtml_part.h | 86 +- tdehtml/tdehtml_printsettings.cpp | 8 +- tdehtml/tdehtml_printsettings.h | 10 +- tdehtml/tdehtml_run.cpp | 22 +- tdehtml/tdehtml_run.h | 8 +- tdehtml/tdehtml_settings.cc | 146 ++-- tdehtml/tdehtml_settings.h | 16 +- tdehtml/tdehtmlimage.cpp | 72 +- tdehtml/tdehtmlimage.h | 26 +- tdehtml/tdehtmlpart_p.h | 82 +- tdehtml/tdehtmlview.cpp | 464 +++++------ tdehtml/tdehtmlview.h | 44 +- tdehtml/tdemultipart/README | 6 +- tdehtml/tdemultipart/tdemultipart.cpp | 14 +- tdehtml/tdemultipart/tdemultipart.h | 2 +- tdehtml/test_regression.cpp | 44 +- tdehtml/test_regression.h | 24 +- tdehtml/test_regression_fontoverload.cpp | 4 +- tdehtml/testtdehtml.cpp | 6 +- tdehtml/testtdehtml.h | 8 +- tdehtml/xml/dom2_eventsimpl.cpp | 18 +- tdehtml/xml/dom2_eventsimpl.h | 12 +- tdehtml/xml/dom2_rangeimpl.cpp | 2 +- tdehtml/xml/dom_docimpl.cpp | 30 +- tdehtml/xml/dom_docimpl.h | 14 +- tdehtml/xml/dom_elementimpl.cpp | 4 +- tdehtml/xml/dom_nodeimpl.cpp | 6 +- tdehtml/xml/dom_nodeimpl.h | 6 +- tdehtml/xml/xml_tokenizer.cpp | 4 +- tdehtml/xml/xml_tokenizer.h | 10 +- tdeio/tdeio/kprotocolmanager.cpp | 2 +- tdeparts/COMMENTS | 4 +- tdeparts/browserextension.h | 16 +- tdeparts/browserrun.cpp | 4 +- tdeparts/browserrun.h | 2 +- tdeparts/browserview.desktop | 2 +- tdespell2/tests/backgroundtest.cpp | 12 +- tdeui/ksyntaxhighlighter.cpp | 2 +- win/tdelibs_export_win.h | 6 +- 187 files changed, 2464 insertions(+), 2464 deletions(-) delete mode 100644 tdecore/network/kiobuffer.h create mode 100644 tdecore/network/tdeiobuffer.h (limited to 'tdehtml/css/cssparser.cpp') diff --git a/KDE2PORTING.html b/KDE2PORTING.html index 131c74577..8f6070bf7 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -351,13 +351,13 @@ This makes KRun the recommended way to run another program in KDE 2. tdehtmlw has been replaced with tdehtml.
    -
  • KHTMLView has vanished. Just use KHTMLWidget, which does scrollbar +
  • TDEHTMLView has vanished. Just use TDEHTMLWidget, which does scrollbar managing for free.
  • A lot of the API has changed. If you just want to open a file/URL, you just need to do:

    -	KHTMLWidget *w = new KHTMLWidget();
    +	TDEHTMLWidget *w = new TDEHTMLWidget();
     	w->openURL(myURL);
       
    @@ -367,18 +367,18 @@ tdehtmlw has been replaced with tdehtml.
    const char * -> QString TQStrList -> QStringList - The only exception for the moment is KHTMLWidget::write(), which does + The only exception for the moment is TDEHTMLWidget::write(), which does also exist in a const char * version.

    -

  • you won't need the getKHTMLWiget function anymore. Just replace - getKHTMLWidget->xxx() with xxx()

    +

  • you won't need the getTDEHTMLWiget function anymore. Just replace + getTDEHTMLWidget->xxx() with xxx()

  • xxx(TQString) -> xxx(const TQString &)

  • consistent naming. All getXyz() functions are renamed to xyz()

  • replaced/changed functions:

    - + diff --git a/KDE3PORTING.html b/KDE3PORTING.html index 7d6130ac4..ca9b67388 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -22,7 +22,7 @@ or this page online.

  • Changes in kio
  • Changes in tdeparts
  • Changes in tdespell
  • -
  • API-cleanup in KHTML
  • +
  • API-cleanup in TDEHTML
  • Changes in tdefile
  • TDE Control Center
  • Panel Applets and Extensions
  • @@ -495,9 +495,9 @@ The API has been cleaned up to be in line with the rest of tdelibs, in particula

    Return to the Table of Contents

    -

    API-cleanups in KHTML

    +

    API-cleanups in TDEHTML

    -There were a few relatively minor API-adjustements in KHTMLPart. In particular: +There were a few relatively minor API-adjustements in TDEHTMLPart. In particular:
    • enableJScript(bool) has been replaced by setJScriptEnabled(bool)
    • enableJava(bool) has been replaced by setJavaEnabled(bool)
    • enablePlugins(bool) has been replaced by setPluginsEnabled(bool) @@ -505,7 +505,7 @@ There were a few relatively minor API-adjustements in KHTMLPart. In particular:
    • enableMetaRefresh(bool) has been replaced by setMetaRefreshEnabled(bool)
    • setBaseURL and setBaseTarget have been removed. baseURL(), baseTarget() and completeURL() are remained for compatibility reasons, but they're deprecated now. use the variants in DOM::HTMLDocument() instead. -
    • the second parameter of KHTMLPart::completeURL is removed. it didn't have +
    • the second parameter of TDEHTMLPart::completeURL is removed. it didn't have any effect before either.
    Besides that, all methods previously marked as deprecated or were internal @@ -513,7 +513,7 @@ but accidentally part of the public API are now private or removed. As they were marked as becoming private already you should not experience any problems. Backward compatibility exists for the common methods, to disable this use a #define KDE_NO_COMPAT. -

    In KHTMLView, the following changes were done: +

    In TDEHTMLView, the following changes were done:

    • gotoNextLink has been replaced by gotoLink(true);
    • gotoPrevLink has been replaced by gotoLink(false); diff --git a/TODO b/TODO index 75f989156..7e7f116fc 100644 --- a/TODO +++ b/TODO @@ -223,7 +223,7 @@ an alternative help->contents action) - Move KRichTextLabel into tdeui if still required with Qt 4. -- Add the concept of a session to KIO, in particular for KHTML so that it can +- Add the concept of a session to KIO, in particular for TDEHTML so that it can have all of its jobs associated in some way (a unique key of sorts). Will make SSL much easier to implement and allow removal of many hacks, mostly involving metadata. diff --git a/configure.in.in b/configure.in.in index 00870d24c..e6969bb1f 100644 --- a/configure.in.in +++ b/configure.in.in @@ -255,7 +255,7 @@ AC_SUBST(LIB_TDEUI, '$(top_builddir)/tdeui/libtdeui.la') AC_SUBST(LIB_KIO, '$(top_builddir)/tdeio/libtdeio.la') AC_SUBST(LIB_KFILE, '$(top_builddir)/tdeio/libtdeio.la') AC_SUBST(LIB_KSYCOCA, '$(top_builddir)/tdeio/libtdeio.la') -AC_SUBST(LIB_KHTML, '$(top_builddir)/tdehtml/libtdehtml.la') +AC_SUBST(LIB_TDEHTML, '$(top_builddir)/tdehtml/libtdehtml.la') AC_SUBST(LIB_TDEPRINT, '$(top_builddir)/tdeprint/libtdeprint.la') AC_SUBST(LIB_KPARTS, '$(top_builddir)/tdeparts/libtdeparts.la') AC_SUBST(LIB_KIMGIO, '$(top_builddir)/kimgio/libkimgio.la') diff --git a/kjs/README b/kjs/README index 7e01b0b41..a0545086e 100644 --- a/kjs/README +++ b/kjs/README @@ -13,7 +13,7 @@ for the standard page. About 95% of the required features should be covered by now. Note that this number covers the core language elements only. Features like the famous roll-over buttons on the www are NOT part of the standard. Those extensions -are added via a module loaded dynamically by the KHTML Widget. +are added via a module loaded dynamically by the TDEHTML Widget. I'll provide some examples of how to extend this library for various needs at a later point in time. Feel free to contact me via mail if you have any diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp index 7105d81c5..591a5aae3 100644 --- a/kstyles/keramik/keramik.cpp +++ b/kstyles/keramik/keramik.cpp @@ -1357,7 +1357,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe, bool KeramikStyle::isFormWidget(const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const { if (widget) { - //Form widgets are in the KHTMLView, but that has 2 further inner levels + //Form widgets are in the TDEHTMLView, but that has 2 further inner levels //of widgets - QClipperWidget, and outside of that, QViewportWidget TQWidget* potentialClipPort = widget->parentWidget(); if ((ceData.parentWidgetData.widgetObjectTypes.isEmpty()) && (ceData.parentWidgetFlags & CEF_IsTopLevel)) { @@ -1369,9 +1369,9 @@ bool KeramikStyle::isFormWidget(const TQStyleControlElementData &ceData, const C qstrcmp(potentialViewPort->name(), "qt_viewport") ) return false; - TQWidget* potentialKHTML = potentialViewPort->parentWidget(); - if (!potentialKHTML || potentialKHTML->isTopLevel() || - qstrcmp(potentialKHTML->className(), "KHTMLView") ) + TQWidget* potentialTDEHTML = potentialViewPort->parentWidget(); + if (!potentialTDEHTML || potentialTDEHTML->isTopLevel() || + qstrcmp(potentialTDEHTML->className(), "TDEHTMLView") ) return false; diff --git a/tdecore/network/kiobuffer.h b/tdecore/network/kiobuffer.h deleted file mode 100644 index c79daaa70..000000000 --- a/tdecore/network/kiobuffer.h +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- C++ -*- - * Copyright (C) 2003 Thiago Macieira - * - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef KIOBUFFER_H -#define KIOBUFFER_H - -#include - -#include - -class TQIODevice; - -/** - * @class TDEIOBufferBase kiobuffer.h kiobuffer.h - * @brief base for I/O buffer implementation - * - * This class declares the base methods to interface with an I/O buffer. - * Most applications will not need to access this class directly, since - * it is all handled by @ref KNetwork::TDEBufferedSocket and other buffering - * classes. - * - * @author Thiago Macieira - */ -class TDEIOBufferBase -{ -public: - /** - * Default constructor. Does nothing. - */ - TDEIOBufferBase() - { } - - /** - * Copy constructor. Does nothing here. - */ - TDEIOBufferBase(const TDEIOBufferBase& ) - { } - - /** - * Virtual destructor. Does nothing. - */ - virtual ~TDEIOBufferBase() - { } - - /** - * Assignment operator. Does nothing. - */ - TDEIOBufferBase& operator=(const TDEIOBufferBase& ) - { return *this; } - - /** - * Returns true if a line can be read from the buffer. - */ - virtual bool canReadLine() const = 0; - - /** - * Reads a line from the buffer and discards it. - */ - virtual TQCString readLine() = 0; - - /** - * Returns the number of bytes in the buffer. Note that this is not - * the size of the buffer. - * - * @sa size - */ - virtual TQ_LONG length() const = 0; - - /** - * Returns true if the buffer is empty of data. - */ - inline bool isEmpty() const - { return length() == 0; } - - /** - * Retrieves the buffer size. The value of -1 indicates that - * the buffer has no defined upper limit. - * - * @sa length for the length of the data stored - */ - virtual TQ_LONG size() const = 0; - - /** - * Returns true if the buffer is full (i.e., cannot receive more data) - */ - inline bool isFull() const - { return size() != -1 && size() == length(); } - - /** - * Sets the size of the buffer, if allowed. - * - * @param size the maximum size, use -1 for unlimited. - * @returns true on success, false if an error occurred. - * @note if the new size is less than length(), the buffer will be truncated - */ - virtual bool setSize(TQ_LONG size) = 0; - - /** - * Adds data to the end of the buffer. - * - * @param data the data to be added - * @param len the data length, in bytes - * @returns the number of bytes added to the end of the buffer. - */ - virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len) = 0; - - /** - * Consumes data from the beginning of the buffer. - * - * @param data where to copy the data to - * @param maxlen the maximum length to copy, in bytes - * @param discard if true, the bytes copied will be discarded - * @returns the number of bytes copied from the buffer - */ - virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true) = 0; - - /** - * Clears the buffer. - */ - virtual void clear() = 0; -}; - -#endif diff --git a/tdecore/network/tdeiobuffer.h b/tdecore/network/tdeiobuffer.h new file mode 100644 index 000000000..c79daaa70 --- /dev/null +++ b/tdecore/network/tdeiobuffer.h @@ -0,0 +1,144 @@ +/* -*- C++ -*- + * Copyright (C) 2003 Thiago Macieira + * + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef KIOBUFFER_H +#define KIOBUFFER_H + +#include + +#include + +class TQIODevice; + +/** + * @class TDEIOBufferBase kiobuffer.h kiobuffer.h + * @brief base for I/O buffer implementation + * + * This class declares the base methods to interface with an I/O buffer. + * Most applications will not need to access this class directly, since + * it is all handled by @ref KNetwork::TDEBufferedSocket and other buffering + * classes. + * + * @author Thiago Macieira + */ +class TDEIOBufferBase +{ +public: + /** + * Default constructor. Does nothing. + */ + TDEIOBufferBase() + { } + + /** + * Copy constructor. Does nothing here. + */ + TDEIOBufferBase(const TDEIOBufferBase& ) + { } + + /** + * Virtual destructor. Does nothing. + */ + virtual ~TDEIOBufferBase() + { } + + /** + * Assignment operator. Does nothing. + */ + TDEIOBufferBase& operator=(const TDEIOBufferBase& ) + { return *this; } + + /** + * Returns true if a line can be read from the buffer. + */ + virtual bool canReadLine() const = 0; + + /** + * Reads a line from the buffer and discards it. + */ + virtual TQCString readLine() = 0; + + /** + * Returns the number of bytes in the buffer. Note that this is not + * the size of the buffer. + * + * @sa size + */ + virtual TQ_LONG length() const = 0; + + /** + * Returns true if the buffer is empty of data. + */ + inline bool isEmpty() const + { return length() == 0; } + + /** + * Retrieves the buffer size. The value of -1 indicates that + * the buffer has no defined upper limit. + * + * @sa length for the length of the data stored + */ + virtual TQ_LONG size() const = 0; + + /** + * Returns true if the buffer is full (i.e., cannot receive more data) + */ + inline bool isFull() const + { return size() != -1 && size() == length(); } + + /** + * Sets the size of the buffer, if allowed. + * + * @param size the maximum size, use -1 for unlimited. + * @returns true on success, false if an error occurred. + * @note if the new size is less than length(), the buffer will be truncated + */ + virtual bool setSize(TQ_LONG size) = 0; + + /** + * Adds data to the end of the buffer. + * + * @param data the data to be added + * @param len the data length, in bytes + * @returns the number of bytes added to the end of the buffer. + */ + virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len) = 0; + + /** + * Consumes data from the beginning of the buffer. + * + * @param data where to copy the data to + * @param maxlen the maximum length to copy, in bytes + * @param discard if true, the bytes copied will be discarded + * @returns the number of bytes copied from the buffer + */ + virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true) = 0; + + /** + * Clears the buffer. + */ + virtual void clear() = 0; +}; + +#endif diff --git a/tdecore/tdelibs_export.h b/tdecore/tdelibs_export.h index a226eac94..9ba0a994b 100644 --- a/tdecore/tdelibs_export.h +++ b/tdecore/tdelibs_export.h @@ -46,7 +46,7 @@ #define KVCARD_EXPORT KDE_EXPORT #define KRESOURCES_EXPORT KDE_EXPORT #define KSTYLE_EXPORT KDE_EXPORT -#define KHTML_EXPORT KDE_EXPORT +#define TDEHTML_EXPORT KDE_EXPORT #define KMDI_EXPORT KDE_EXPORT #define KUTILS_EXPORT KDE_EXPORT #define KATEPARTINTERFACES_EXPORT KDE_EXPORT diff --git a/tdehtml/ChangeLog b/tdehtml/ChangeLog index ea77bf459..cf19f1b06 100644 --- a/tdehtml/ChangeLog +++ b/tdehtml/ChangeLog @@ -243,7 +243,7 @@ stalled layout flags problems - #121653). (updateWidgetMasks): mask the content box, not the border box. (enclosingStackingContext) new. Returns the layer defining current stacking context. - * rendering/render_replaced.{h,cpp} (isKHTMLWidget): new flag for KHTML-proxied widgets. + * rendering/render_replaced.{h,cpp} (isTDEHTMLWidget): new flag for TDEHTML-proxied widgets. (detach/resizeWidget/setQWidget/layout/updateFromElement/slotWidgetDestructed/setStyle/paint): use the flag insead of strcmp's Only allow !tdehtml widgets to register in the view (only those need masking). @@ -473,7 +473,7 @@ 2005-08-10 Dawit Alemayehu * ecma/xmlhttprequest.cpp: Convert a 304 (Not Modified) HTTP response in - XMLHttpRequest to a 200 (OK) response to make KHTML conform to IE's and + XMLHttpRequest to a 200 (OK) response to make TDEHTML conform to IE's and Mozilla's behavior. BUG: 110272 * ecma/xmlhttprequest.cpp: Factored out the HTTP status line parsing code @@ -510,7 +510,7 @@ replace them with the "blocked" pixmap.) * tdehtml_part.{cpp,h}: Added runAdFilters() function which is called from reparseConfiguration() - * tdehtml_ext.cpp: Call KHTMLPart::reparseConfiguration() after adding new filters. + * tdehtml_ext.cpp: Call TDEHTMLPart::reparseConfiguration() after adding new filters. * misc/loader.cpp: Create blockedPixmap in Cache::init() instead of the CachedImage constructor. 2005-07-19 Allan Sandfeld Jensen @@ -528,7 +528,7 @@ * tdehtml_ext.{cpp,h}: Added "blockiframe" to context popup menu * tdehtml_popupmenu.rc: Same - * tdehtml_part.h: added KHTMLPopupGUIClient to friend classes + * tdehtml_part.h: added TDEHTMLPopupGUIClient to friend classes 2005-07-08 Germain Garand @@ -544,11 +544,11 @@ 2005-07-07 Allan Sandfeld Jensen - There is nothing KHTML specific about keypress events. They might not be DOM2 or 3, + There is nothing TDEHTML specific about keypress events. They might not be DOM2 or 3, but MSIE, Mozilla and Safari all handles them as a valid event class. * xml/dom2_eventsimpl.{h,cpp}: Allow KEYPRESS as a valid event type - * ./.: Rename KHTML_KEYPRESS_EVENT to KEYPRESS_EVENT + * ./.: Rename TDEHTML_KEYPRESS_EVENT to KEYPRESS_EVENT 2005-07-05 Allan Sandfeld Jensen @@ -1969,7 +1969,7 @@ 2004-07-28 Leo Savernik - * tdehtmlview.{cpp,h} (KHTMLToolTip::maybeTip): Query elements + * tdehtmlview.{cpp,h} (TDEHTMLToolTip::maybeTip): Query elements of image maps. (dispatchMouseEvent): Added parameter innerNonSharedNode. * tdehtml_part.{cpp,h}: Added method nonSharedNodeUnderMouse. @@ -1978,7 +1978,7 @@ * xml/dom_nodeimpl.h: Added innerNonSharedNode to NodeImpl::MouseEvent. * html/html_imageimpl.h: Added cachedRegion() for being able to - retrieve the region in KHTMLToolTip. + retrieve the region in TDEHTMLToolTip. 2004-07-20 Stephan Kulow @@ -2297,7 +2297,7 @@ 2004-05-06 Tobias Anton - * html/htmlparser.cpp (class KHTMLParser): use setCurrent() after reset() + * html/htmlparser.cpp (class TDEHTMLParser): use setCurrent() after reset() to avoid a memleak whenever the parser is used on a DocumentFragment. 2004-05-04 Leo Savernik @@ -2370,8 +2370,8 @@ Added classes CaretBox, CaretBoxLine, CaretBoxIterator, EditableCaretBoxIterator. Changed every other class. - * tdehtmlview.[cpp,h}: (class KHTMLView) Adapt to tdehtml_caret* changes. - (KHTMLToolTip::maybeTip) Save tooltip position instead of recalculating it. + * tdehtmlview.[cpp,h}: (class TDEHTMLView) Adapt to tdehtml_caret* changes. + (TDEHTMLToolTip::maybeTip) Save tooltip position instead of recalculating it. * rendering/render_{inline,box}.{cpp,h}: (Render{Box,Inline}::caretPos) Handle outside caret positions. @@ -2508,7 +2508,7 @@ * ecma/xmlhttprequest.h/cpp: Implement asynchronous interface enough to pass the tests on http://www.mozilla.org/xmlextras/tests.html - * xml/dom2_eventsimpl.h (EventImpl): rename KHTML_KEYUP/DOWN_EVENT + * xml/dom2_eventsimpl.h (EventImpl): rename TDEHTML_KEYUP/DOWN_EVENT to KEYUP/DOWN_EVENT. Add events needed for XMLHttpRequest. * rendering/render_object.h (class RenderObject): introduce a PaintInfo @@ -2526,7 +2526,7 @@ * tdehtml_part.cpp/.h (openURL): In case the call is a reload, do a stat on the user-defined stylesheet and reload it in case it changed in the meanwhile (#39962). - * tdehtmlpart_p.h (class KHTMLPartPrivate): Added + * tdehtmlpart_p.h (class TDEHTMLPartPrivate): Added m_userStyleSheetLastModified variable which keeps track of the mtime of the user-defined sheet. @@ -2825,7 +2825,7 @@ 2004-01-18 Dirk Mueller - * tdehtmlpart_p.h (class KHTMLPartPrivate): experimental: + * tdehtmlpart_p.h (class TDEHTMLPartPrivate): experimental: copy encoding information from parent frame. helps on http://www.pfl.ru/ when manually setting the correct encoding. @@ -3835,7 +3835,7 @@ to make the one call entering a local event loop the last, so that we can cleanly exit when it the view is already deleted. - * tdehtml_ext.cpp (KHTMLPopupGUIClient): pass QObject parent + * tdehtml_ext.cpp (TDEHTMLPopupGUIClient): pass QObject parent 2003-10-05 Dirk Mueller @@ -3852,7 +3852,7 @@ 2003-10-04 Dirk Mueller - * html/htmlparser.h (class KHTMLParser): keep "current" NodeImpl referenced + * html/htmlparser.h (class TDEHTMLParser): keep "current" NodeImpl referenced to avoid ugly crashes when DHTML deletes the node while we're still parsing. #57020, testcase alja.html diff --git a/tdehtml/DESIGN.html b/tdehtml/DESIGN.html index 861825141..3907a56d0 100644 --- a/tdehtml/DESIGN.html +++ b/tdehtml/DESIGN.html @@ -15,7 +15,7 @@ document, but it'll hopefully make it easier for you to read the source code.

      The library is build up out of several different parts. Basically, when you use the lib, you -create an instance of a KHTMLPart, and feed data to it. That's more or less all you need to +create an instance of a TDEHTMLPart, and feed data to it. That's more or less all you need to know if you want to use tdehtml for another application. If you want to start hacking tdehtml, here's a sketch of the objects that will get constructed, when eg. running testtdehtml with a url argument. @@ -52,8 +52,8 @@ compatible to IE.

      -KHTMLPart creates one instance of a -KHTMLView (derived from TQScrollView), +TDEHTMLPart creates one instance of a +TDEHTMLView (derived from TQScrollView), the widget showing the whole thing. At the same time a DOM tree is built up from the HTML or XML found in the specified file.

      @@ -173,7 +173,7 @@ classes. In the implementation classes we have added a few more intermediate cla not be seen from the outside for various reasons (make implementation of shared features easier or to reduce memory consumption).

      -In C++, you can access the whole DOM tree from outside KHTML by using the interface classes. +In C++, you can access the whole DOM tree from outside TDEHTML by using the interface classes. For a description see the introduction to tdehtml on developer.kde.org. One thing that has been omitted in the discussion above is the style sheet defined inside the @@ -261,8 +261,8 @@ RenderRoot* A call to of layout() on the RenderRoot (the root of the rendering tree) object causes the rendering tree to layout itself into the available space -(width) given by the the KHTMLView. After that, the drawContents() method of -KHTMLView can call RenderRoot->print() with appropriate parameters to actually +(width) given by the the TDEHTMLView. After that, the drawContents() method of +TDEHTMLView can call RenderRoot->print() with appropriate parameters to actually paint the document. This is not 100% correct, when parsing incrementally, but is exactly what happens when you resize the document. @@ -301,7 +301,7 @@ the definition of the objects used in the rendering tree, the layouting code, an

      Exception handling

      To save on library size, C++-exceptions are only enabled in the dom/ subdirectory, -since exceptions are mandated by the DOM API. In the rest of KHTML's code, +since exceptions are mandated by the DOM API. In the rest of TDEHTML's code, we pass an error flag (usually called "exceptionCode"), and the class that is part of dom/* checks for this flag and throws the exception. diff --git a/tdehtml/Mainpage.dox b/tdehtml/Mainpage.dox index 84ebfedb1..5de4d53a2 100644 --- a/tdehtml/Mainpage.dox +++ b/tdehtml/Mainpage.dox @@ -1,19 +1,19 @@ /** @mainpage Trinity HTML Parser and Widget If you want a fully-fledged HTML browser widget in your application, -you can use KHTMLPart to do so. +you can use TDEHTMLPart to do so. @code KUrl url = "http://www.trinitydesktop.org"; -KHTMLPart *w = new KHTMLPart(); +TDEHTMLPart *w = new TDEHTMLPart(); w->openUrl(url); w->view()->resize(500, 400); w->show(); @endcode -For more information, see the documentation for KHTMLPart. +For more information, see the documentation for TDEHTMLPart. -Note that using KHTMLPart may introduce security vulnerabilities +Note that using TDEHTMLPart may introduce security vulnerabilities and unnecessary bloat to your application. Qt's text widgets are rich-text capable, and will interpret a limited subset of HTML. @@ -30,7 +30,7 @@ George Staikos \
      Allan Sandfeld Jensen \
      Germain Garand \
      Maksim Orlovich \
      -KHTML has also heavily benefited from the work of Apple Computer, Inc. +TDEHTML has also heavily benefited from the work of Apple Computer, Inc. @maintainers Allan Sandfeld Jensen
      Germain Garand
      @@ -42,5 +42,5 @@ Maksim Orlovich */ // DOXYGEN_REFERENCES = tdecore tdeui kio tdeparts kjs // DOXYGEN_EXCLUDE = test*.* html rendering xml misc ecma css imload pics test -// DOXYGEN_SET_PROJECT_NAME = KHTML +// DOXYGEN_SET_PROJECT_NAME = TDEHTML // vim:ts=4:sw=4:expandtab:filetype=doxygen diff --git a/tdehtml/README.HTMLWidget b/tdehtml/README.HTMLWidget index 2a8900ee2..cae4a3c58 100644 --- a/tdehtml/README.HTMLWidget +++ b/tdehtml/README.HTMLWidget @@ -43,7 +43,7 @@ You can add the widget to your program by doing something like: . . - KHTMLWidget *view = new KHTMLWidget( parent, "Name" ); + TDEHTMLWidget *view = new TDEHTMLWidget( parent, "Name" ); view->show(); view->begin( "file:/tmp/test.html" ); diff --git a/tdehtml/css/css_renderstyledeclarationimpl.cpp b/tdehtml/css/css_renderstyledeclarationimpl.cpp index 95c1c95d9..00e6f5382 100644 --- a/tdehtml/css/css_renderstyledeclarationimpl.cpp +++ b/tdehtml/css/css_renderstyledeclarationimpl.cpp @@ -41,8 +41,8 @@ static const int computedProperties[] = { CSS_PROP_BACKGROUND_POSITION_Y, CSS_PROP_BORDER_COLLAPSE, CSS_PROP_BORDER_SPACING, - CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING, - CSS_PROP__KHTML_BORDER_VERTICAL_SPACING, + CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING, + CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING, CSS_PROP_BORDER_TOP_COLOR, CSS_PROP_BORDER_RIGHT_COLOR, CSS_PROP_BORDER_BOTTOM_COLOR, @@ -80,10 +80,10 @@ static const int computedProperties[] = { CSS_PROP_MARGIN_RIGHT, CSS_PROP_MARGIN_BOTTOM, CSS_PROP_MARGIN_LEFT, - CSS_PROP__KHTML_MARQUEE_DIRECTION, - CSS_PROP__KHTML_MARQUEE_INCREMENT, - CSS_PROP__KHTML_MARQUEE_REPETITION, - CSS_PROP__KHTML_MARQUEE_STYLE, + CSS_PROP__TDEHTML_MARQUEE_DIRECTION, + CSS_PROP__TDEHTML_MARQUEE_INCREMENT, + CSS_PROP__TDEHTML_MARQUEE_REPETITION, + CSS_PROP__TDEHTML_MARQUEE_STYLE, CSS_PROP_MAX_HEIGHT, CSS_PROP_MAX_WIDTH, CSS_PROP_MIN_HEIGHT, @@ -137,7 +137,7 @@ static CSSValueImpl *valueForBorderStyle(EBorderStyle style) { switch (style) { case tdehtml::BNATIVE: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_NATIVE); + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_NATIVE); case tdehtml::BNONE: return new CSSPrimitiveValueImpl(CSS_VAL_NONE); case tdehtml::BHIDDEN: @@ -176,12 +176,12 @@ static CSSValueImpl *valueForTextAlign(ETextAlign align) return new CSSPrimitiveValueImpl(CSS_VAL_CENTER); case tdehtml::JUSTIFY: return new CSSPrimitiveValueImpl(CSS_VAL_JUSTIFY); - case tdehtml::KHTML_LEFT: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_LEFT); - case tdehtml::KHTML_RIGHT: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_RIGHT); - case tdehtml::KHTML_CENTER: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_CENTER); + case tdehtml::TDEHTML_LEFT: + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_LEFT); + case tdehtml::TDEHTML_RIGHT: + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_RIGHT); + case tdehtml::TDEHTML_CENTER: + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_CENTER); } Q_ASSERT( 0 ); return 0; @@ -440,10 +440,10 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) "px"); return new CSSPrimitiveValueImpl(string, CSSPrimitiveValue::CSS_STRING); } - case CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING: + case CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING: return new CSSPrimitiveValueImpl(style->borderHorizontalSpacing(), CSSPrimitiveValue::CSS_PX); - case CSS_PROP__KHTML_BORDER_VERTICAL_SPACING: + case CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING: return new CSSPrimitiveValueImpl(style->borderVerticalSpacing(), CSSPrimitiveValue::CSS_PX); case CSS_PROP_BORDER_TOP_COLOR: @@ -614,9 +614,9 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) case FRIGHT: return new CSSPrimitiveValueImpl(CSS_VAL_RIGHT); case FLEFT_ALIGN: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_LEFT); + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_LEFT); case FRIGHT_ALIGN: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_RIGHT); + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_RIGHT); } } case CSS_PROP_FONT_FAMILY: @@ -706,10 +706,10 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) return valueForLength(style->marginBottom(), renderer->contentHeight()); case CSS_PROP_MARGIN_LEFT: return valueForLength(style->marginLeft(), renderer->contentWidth()); - case CSS_PROP__KHTML_MARQUEE: + case CSS_PROP__TDEHTML_MARQUEE: // FIXME: unimplemented break; - case CSS_PROP__KHTML_MARQUEE_DIRECTION: + case CSS_PROP__TDEHTML_MARQUEE_DIRECTION: switch (style->marqueeDirection()) { case MFORWARD: return new CSSPrimitiveValueImpl(CSS_VAL_FORWARDS); @@ -728,16 +728,16 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) } Q_ASSERT(0); return 0; - case CSS_PROP__KHTML_MARQUEE_INCREMENT: + case CSS_PROP__TDEHTML_MARQUEE_INCREMENT: return valueForLength(style->marqueeIncrement(), renderer->contentWidth()); - case CSS_PROP__KHTML_MARQUEE_REPETITION: + case CSS_PROP__TDEHTML_MARQUEE_REPETITION: if (style->marqueeLoopCount() < 0) return new CSSPrimitiveValueImpl(CSS_VAL_INFINITE); return new CSSPrimitiveValueImpl(style->marqueeLoopCount(), CSSPrimitiveValue::CSS_NUMBER); - case CSS_PROP__KHTML_MARQUEE_SPEED: + case CSS_PROP__TDEHTML_MARQUEE_SPEED: // FIXME: unimplemented break; - case CSS_PROP__KHTML_MARQUEE_STYLE: + case CSS_PROP__TDEHTML_MARQUEE_STYLE: switch (style->marqueeBehavior()) { case MNONE: return new CSSPrimitiveValueImpl(CSS_VAL_NONE); @@ -960,7 +960,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) case BOTTOM: return new CSSPrimitiveValueImpl(CSS_VAL_BOTTOM); case BASELINE_MIDDLE: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_BASELINE_MIDDLE); + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_BASELINE_MIDDLE); case LENGTH: return valueForLength(style->verticalAlignLength(), renderer->contentWidth()); } @@ -991,8 +991,8 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) return new CSSPrimitiveValueImpl(CSS_VAL_PRE_LINE); case NOWRAP: return new CSSPrimitiveValueImpl(CSS_VAL_NOWRAP); - case KHTML_NOWRAP: - return new CSSPrimitiveValueImpl(CSS_VAL__KHTML_NOWRAP); + case TDEHTML_NOWRAP: + return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_NOWRAP); } Q_ASSERT(0); break; @@ -1060,9 +1060,9 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) break; case CSS_PROP_SCROLLBAR_ARROW_COLOR: break; - case CSS_PROP__KHTML_FLOW_MODE: + case CSS_PROP__TDEHTML_FLOW_MODE: break; - case CSS_PROP__KHTML_USER_INPUT: + case CSS_PROP__TDEHTML_USER_INPUT: break; default: Q_ASSERT( 0 ); diff --git a/tdehtml/css/css_valueimpl.cpp b/tdehtml/css/css_valueimpl.cpp index 0da65c4b6..94cca8840 100644 --- a/tdehtml/css/css_valueimpl.cpp +++ b/tdehtml/css/css_valueimpl.cpp @@ -891,7 +891,7 @@ FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string) parsedFontName.replace(braceReg, TQString()); #ifndef APPLE_CHANGES - const TQString &available = KHTMLSettings::availableFamilies(); + const TQString &available = TDEHTMLSettings::availableFamilies(); parsedFontName = parsedFontName.lower(); // kdDebug(0) << "searching for face '" << parsedFontName << "'" << endl; diff --git a/tdehtml/css/csshelper.h b/tdehtml/css/csshelper.h index 772a9eba1..5bc5194d0 100644 --- a/tdehtml/css/csshelper.h +++ b/tdehtml/css/csshelper.h @@ -28,7 +28,7 @@ #include "dom/dom_string.h" class TQPaintDeviceMetrics; -class KHTMLSettings; +class TDEHTMLSettings; namespace DOM { diff --git a/tdehtml/css/cssparser.cpp b/tdehtml/css/cssparser.cpp index b994ad773..b33151b59 100644 --- a/tdehtml/css/cssparser.cpp +++ b/tdehtml/css/cssparser.cpp @@ -533,7 +533,7 @@ bool CSSParser::parseValue( int propId, bool important ) * correctly and allows optimization in tdehtml::applyRule(..) */ case CSS_PROP_CAPTION_SIDE: // top | bottom | left | right | inherit - // Left and right were deprecated in CSS 2.1 and never supported by KHTML + // Left and right were deprecated in CSS 2.1 and never supported by TDEHTML if ( /* id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || */ id == CSS_VAL_TOP || id == CSS_VAL_BOTTOM) valid_primitive = true; @@ -567,7 +567,7 @@ bool CSSParser::parseValue( int propId, bool important ) // upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha | // upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | // katakana | hiragana-iroha | katakana-iroha | none | inherit - if ((id >= CSS_VAL_DISC && id <= CSS_VAL__KHTML_CLOSE_QUOTE) || id == CSS_VAL_NONE) + if ((id >= CSS_VAL_DISC && id <= CSS_VAL__TDEHTML_CLOSE_QUOTE) || id == CSS_VAL_NONE) valid_primitive = true; break; @@ -590,8 +590,8 @@ bool CSSParser::parseValue( int propId, bool important ) break; case CSS_PROP_FLOAT: // left | right | none | tdehtml_left | tdehtml_right | inherit + center for buggy CSS - if ( id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || id == CSS_VAL__KHTML_LEFT || - id == CSS_VAL__KHTML_RIGHT ||id == CSS_VAL_NONE || id == CSS_VAL_CENTER) + if ( id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || id == CSS_VAL__TDEHTML_LEFT || + id == CSS_VAL__TDEHTML_RIGHT ||id == CSS_VAL_NONE || id == CSS_VAL_CENTER) valid_primitive = true; break; @@ -603,7 +603,7 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_TEXT_ALIGN: // left | right | center | justify | tdehtml_left | tdehtml_right | tdehtml_center | | inherit - if ( ( id >= CSS_VAL__KHTML_AUTO && id <= CSS_VAL__KHTML_CENTER ) || + if ( ( id >= CSS_VAL__TDEHTML_AUTO && id <= CSS_VAL__TDEHTML_CENTER ) || value->unit == CSSPrimitiveValue::CSS_STRING ) valid_primitive = true; break; @@ -613,7 +613,7 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_BORDER_RIGHT_STYLE: // Defined as: none | hidden | dotted | dashed | case CSS_PROP_BORDER_BOTTOM_STYLE: // solid | double | groove | ridge | inset | outset | -tdehtml-native case CSS_PROP_BORDER_LEFT_STYLE: //// - if (id >= CSS_VAL__KHTML_NATIVE && id <= CSS_VAL_DOUBLE) + if (id >= CSS_VAL__TDEHTML_NATIVE && id <= CSS_VAL_DOUBLE) valid_primitive = true; break; @@ -636,8 +636,8 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_BORDER_SPACING: { - const int properties[2] = { CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING, - CSS_PROP__KHTML_BORDER_VERTICAL_SPACING }; + const int properties[2] = { CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING, + CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING }; if (num == 1) { ShorthandScope scope(this, CSS_PROP_BORDER_SPACING); if (!parseValue(properties[0], important)) return false; @@ -653,8 +653,8 @@ bool CSSParser::parseValue( int propId, bool important ) } return false; } - case CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING: - case CSS_PROP__KHTML_BORDER_VERTICAL_SPACING: + case CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING: + case CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING: valid_primitive = validUnit(value, FLength|FNonNeg, strict&(!nonCSSHint)); break; @@ -682,10 +682,10 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_BORDER_BOTTOM_COLOR: // | inherit case CSS_PROP_BORDER_LEFT_COLOR: // | inherit case CSS_PROP_COLOR: // | inherit - if ( id == CSS_VAL__KHTML_TEXT || id == CSS_VAL_MENU || + if ( id == CSS_VAL__TDEHTML_TEXT || id == CSS_VAL_MENU || (id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT ) || id == CSS_VAL_TRANSPARENT || - (id >= CSS_VAL_GREY && id < CSS_VAL__KHTML_TEXT && (nonCSSHint|!strict) ) ) { + (id >= CSS_VAL_GREY && id < CSS_VAL__TDEHTML_TEXT && (nonCSSHint|!strict) ) ) { valid_primitive = true; } else { parsedValue = parseColor(); @@ -707,13 +707,13 @@ bool CSSParser::parseValue( int propId, bool important ) break; case CSS_PROP_BACKGROUND_ATTACHMENT: - case CSS_PROP__KHTML_BACKGROUND_CLIP: + case CSS_PROP__TDEHTML_BACKGROUND_CLIP: case CSS_PROP_BACKGROUND_IMAGE: - case CSS_PROP__KHTML_BACKGROUND_ORIGIN: + case CSS_PROP__TDEHTML_BACKGROUND_ORIGIN: case CSS_PROP_BACKGROUND_POSITION: case CSS_PROP_BACKGROUND_POSITION_X: case CSS_PROP_BACKGROUND_POSITION_Y: - case CSS_PROP__KHTML_BACKGROUND_SIZE: + case CSS_PROP__TDEHTML_BACKGROUND_SIZE: case CSS_PROP_BACKGROUND_REPEAT: { CSSValueImpl *val1 = 0, *val2 = 0; int propId1, propId2; @@ -769,7 +769,7 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_PADDING_RIGHT: // | inherit case CSS_PROP_PADDING_BOTTOM: // Which is defined as case CSS_PROP_PADDING_LEFT: // | - case CSS_PROP__KHTML_PADDING_START: + case CSS_PROP__TDEHTML_PADDING_START: valid_primitive = ( !id && validUnit( value, FLength|FPercent|FNonNeg, strict&(!nonCSSHint) ) ); break; @@ -807,7 +807,7 @@ bool CSSParser::parseValue( int propId, bool important ) // baseline | sub | super | top | text-top | middle | bottom | text-bottom | // | | inherit - if ( id >= CSS_VAL_BASELINE && id <= CSS_VAL__KHTML_BASELINE_MIDDLE ) + if ( id >= CSS_VAL_BASELINE && id <= CSS_VAL__TDEHTML_BASELINE_MIDDLE ) valid_primitive = true; else valid_primitive = ( !id && validUnit( value, FLength|FPercent, strict&(!nonCSSHint) ) ); @@ -830,7 +830,7 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_MARGIN_RIGHT: // Which is defined as case CSS_PROP_MARGIN_BOTTOM: // | | auto | inherit case CSS_PROP_MARGIN_LEFT: //// - case CSS_PROP__KHTML_MARGIN_START: + case CSS_PROP__TDEHTML_MARGIN_START: if ( id == CSS_VAL_AUTO ) valid_primitive = true; else @@ -912,8 +912,8 @@ bool CSSParser::parseValue( int propId, bool important ) valid_primitive = true; break; - case CSS_PROP__KHTML_FLOW_MODE: - if ( id == CSS_VAL__KHTML_NORMAL || id == CSS_VAL__KHTML_AROUND_FLOATS ) + case CSS_PROP__TDEHTML_FLOW_MODE: + if ( id == CSS_VAL__TDEHTML_NORMAL || id == CSS_VAL__TDEHTML_AROUND_FLOATS ) valid_primitive = true; break; @@ -934,41 +934,41 @@ bool CSSParser::parseValue( int propId, bool important ) case CSS_PROP_OPACITY: valid_primitive = validUnit(value, FNumber, strict); break; - case CSS_PROP__KHTML_USER_INPUT: // none | enabled | disabled | inherit + case CSS_PROP__TDEHTML_USER_INPUT: // none | enabled | disabled | inherit if ( id == CSS_VAL_NONE || id == CSS_VAL_ENABLED || id == CSS_VAL_DISABLED ) valid_primitive = true; -// kdDebug(6080) << "CSS_PROP__KHTML_USER_INPUT: " << valid_primitive << endl; +// kdDebug(6080) << "CSS_PROP__TDEHTML_USER_INPUT: " << valid_primitive << endl; break; - case CSS_PROP__KHTML_MARQUEE: { - const int properties[5] = { CSS_PROP__KHTML_MARQUEE_DIRECTION, CSS_PROP__KHTML_MARQUEE_INCREMENT, - CSS_PROP__KHTML_MARQUEE_REPETITION, - CSS_PROP__KHTML_MARQUEE_STYLE, CSS_PROP__KHTML_MARQUEE_SPEED }; + case CSS_PROP__TDEHTML_MARQUEE: { + const int properties[5] = { CSS_PROP__TDEHTML_MARQUEE_DIRECTION, CSS_PROP__TDEHTML_MARQUEE_INCREMENT, + CSS_PROP__TDEHTML_MARQUEE_REPETITION, + CSS_PROP__TDEHTML_MARQUEE_STYLE, CSS_PROP__TDEHTML_MARQUEE_SPEED }; return parseShortHand(propId, properties, 5, important); } - case CSS_PROP__KHTML_MARQUEE_DIRECTION: + case CSS_PROP__TDEHTML_MARQUEE_DIRECTION: if (id == CSS_VAL_FORWARDS || id == CSS_VAL_BACKWARDS || id == CSS_VAL_AHEAD || id == CSS_VAL_REVERSE || id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || id == CSS_VAL_DOWN || id == CSS_VAL_UP || id == CSS_VAL_AUTO) valid_primitive = true; break; - case CSS_PROP__KHTML_MARQUEE_INCREMENT: + case CSS_PROP__TDEHTML_MARQUEE_INCREMENT: if (id == CSS_VAL_SMALL || id == CSS_VAL_LARGE || id == CSS_VAL_MEDIUM) valid_primitive = true; else valid_primitive = validUnit(value, FLength|FPercent, strict&(!nonCSSHint)); break; - case CSS_PROP__KHTML_MARQUEE_STYLE: + case CSS_PROP__TDEHTML_MARQUEE_STYLE: if (id == CSS_VAL_NONE || id == CSS_VAL_SLIDE || id == CSS_VAL_SCROLL || id == CSS_VAL_ALTERNATE || id == CSS_VAL_UNFURL) valid_primitive = true; break; - case CSS_PROP__KHTML_MARQUEE_REPETITION: + case CSS_PROP__TDEHTML_MARQUEE_REPETITION: if (id == CSS_VAL_INFINITE) valid_primitive = true; else valid_primitive = validUnit(value, FInteger|FNonNeg, strict&(!nonCSSHint)); break; - case CSS_PROP__KHTML_MARQUEE_SPEED: + case CSS_PROP__TDEHTML_MARQUEE_SPEED: if (id == CSS_VAL_NORMAL || id == CSS_VAL_SLOW || id == CSS_VAL_FAST) valid_primitive = true; else @@ -1137,11 +1137,11 @@ bool CSSParser::parseBackgroundShorthand(bool important) { // Position must come before color in this array because a plain old "0" is a legal color // in quirks mode but it's usually the X coordinate of a position. - // FIXME: Add CSS_PROP__KHTML_BACKGROUND_SIZE to the shorthand. + // FIXME: Add CSS_PROP__TDEHTML_BACKGROUND_SIZE to the shorthand. const int numProperties = 7; const int properties[numProperties] = { CSS_PROP_BACKGROUND_IMAGE, CSS_PROP_BACKGROUND_REPEAT, - CSS_PROP_BACKGROUND_ATTACHMENT, CSS_PROP_BACKGROUND_POSITION, CSS_PROP__KHTML_BACKGROUND_CLIP, - CSS_PROP__KHTML_BACKGROUND_ORIGIN, CSS_PROP_BACKGROUND_COLOR }; + CSS_PROP_BACKGROUND_ATTACHMENT, CSS_PROP_BACKGROUND_POSITION, CSS_PROP__TDEHTML_BACKGROUND_CLIP, + CSS_PROP__TDEHTML_BACKGROUND_ORIGIN, CSS_PROP_BACKGROUND_COLOR }; ShorthandScope scope(this, CSS_PROP_BACKGROUND); @@ -1427,7 +1427,7 @@ CSSValueImpl* CSSParser::parseCounterContent(ValueList *args, bool counters) if (i->unit != Value::Operator || i->iValue != ',') goto invalid; i = args->next(); if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid; - if (i->id < CSS_VAL_DISC || i->id > CSS_VAL__KHTML_CLOSE_QUOTE) goto invalid; + if (i->id < CSS_VAL_DISC || i->id > CSS_VAL__TDEHTML_CLOSE_QUOTE) goto invalid; counter->m_listStyle = i->id - CSS_VAL_DISC; } return new CSSPrimitiveValueImpl(counter); @@ -1439,9 +1439,9 @@ invalid: CSSValueImpl* CSSParser::parseBackgroundColor() { int id = valueList->current()->id; - if (id == CSS_VAL__KHTML_TEXT || id == CSS_VAL_TRANSPARENT || + if (id == CSS_VAL__TDEHTML_TEXT || id == CSS_VAL_TRANSPARENT || (id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT) || id == CSS_VAL_MENU || - (id >= CSS_VAL_GREY && id < CSS_VAL__KHTML_TEXT && !strict)) + (id >= CSS_VAL_GREY && id < CSS_VAL__TDEHTML_TEXT && !strict)) return new CSSPrimitiveValueImpl(id); return parseColor(); } @@ -1615,8 +1615,8 @@ bool CSSParser::parseBackgroundProperty(int propId, int& propId1, int& propId2, if (currValue) valueList->next(); break; - case CSS_PROP__KHTML_BACKGROUND_CLIP: - case CSS_PROP__KHTML_BACKGROUND_ORIGIN: + case CSS_PROP__TDEHTML_BACKGROUND_CLIP: + case CSS_PROP__TDEHTML_BACKGROUND_ORIGIN: if (val->id == CSS_VAL_BORDER || val->id == CSS_VAL_PADDING || val->id == CSS_VAL_CONTENT) { currValue = new CSSPrimitiveValueImpl(val->id); valueList->next(); @@ -1646,7 +1646,7 @@ bool CSSParser::parseBackgroundProperty(int propId, int& propId1, int& propId2, valueList->next(); } break; - case CSS_PROP__KHTML_BACKGROUND_SIZE: + case CSS_PROP__TDEHTML_BACKGROUND_SIZE: currValue = parseBackgroundSize(); if (currValue) valueList->next(); @@ -2268,7 +2268,7 @@ bool CSSParser::parseShadow(int propId, bool important) // The only other type of value that's ok is a color value. CSSPrimitiveValueImpl* parsedColor = 0; bool isColor = (val->id >= CSS_VAL_AQUA && val->id <= CSS_VAL_WINDOWTEXT || val->id == CSS_VAL_MENU || - (val->id >= CSS_VAL_GREY && val->id <= CSS_VAL__KHTML_TEXT && !strict)); + (val->id >= CSS_VAL_GREY && val->id <= CSS_VAL__TDEHTML_TEXT && !strict)); if (!context.allowColor) return context.failed(); diff --git a/tdehtml/css/cssproperties.c b/tdehtml/css/cssproperties.c index da5208412..384982aba 100644 --- a/tdehtml/css/cssproperties.c +++ b/tdehtml/css/cssproperties.c @@ -295,7 +295,7 @@ findProp (register const char *str, register unsigned int len) #line 104 "cssproperties.gperf" {"text-indent", CSS_PROP_TEXT_INDENT}, #line 69 "cssproperties.gperf" - {"-tdehtml-margin-start", CSS_PROP__KHTML_MARGIN_START}, + {"-tdehtml-margin-start", CSS_PROP__TDEHTML_MARGIN_START}, #line 14 "cssproperties.gperf" {"background-color", CSS_PROP_BACKGROUND_COLOR}, #line 100 "cssproperties.gperf" @@ -305,7 +305,7 @@ findProp (register const char *str, register unsigned int len) #line 47 "cssproperties.gperf" {"counter-reset", CSS_PROP_COUNTER_RESET}, #line 93 "cssproperties.gperf" - {"-tdehtml-padding-start", CSS_PROP__KHTML_PADDING_START}, + {"-tdehtml-padding-start", CSS_PROP__TDEHTML_PADDING_START}, #line 15 "cssproperties.gperf" {"background-image", CSS_PROP_BACKGROUND_IMAGE}, #line 96 "cssproperties.gperf" @@ -319,11 +319,11 @@ findProp (register const char *str, register unsigned int len) #line 52 "cssproperties.gperf" {"float", CSS_PROP_FLOAT}, #line 21 "cssproperties.gperf" - {"-tdehtml-background-clip", CSS_PROP__KHTML_BACKGROUND_CLIP}, + {"-tdehtml-background-clip", CSS_PROP__TDEHTML_BACKGROUND_CLIP}, #line 70 "cssproperties.gperf" - {"-tdehtml-marquee", CSS_PROP__KHTML_MARQUEE}, + {"-tdehtml-marquee", CSS_PROP__TDEHTML_MARQUEE}, #line 27 "cssproperties.gperf" - {"-tdehtml-border-vertical-spacing", CSS_PROP__KHTML_BORDER_VERTICAL_SPACING}, + {"-tdehtml-border-vertical-spacing", CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING}, #line 46 "cssproperties.gperf" {"counter-increment", CSS_PROP_COUNTER_INCREMENT}, #line 128 "cssproperties.gperf" @@ -337,7 +337,7 @@ findProp (register const char *str, register unsigned int len) #line 31 "cssproperties.gperf" {"border-left-color", CSS_PROP_BORDER_LEFT_COLOR}, #line 22 "cssproperties.gperf" - {"-tdehtml-background-origin", CSS_PROP__KHTML_BACKGROUND_ORIGIN}, + {"-tdehtml-background-origin", CSS_PROP__TDEHTML_BACKGROUND_ORIGIN}, #line 17 "cssproperties.gperf" {"background-attachment", CSS_PROP_BACKGROUND_ATTACHMENT}, #line 126 "cssproperties.gperf" @@ -353,7 +353,7 @@ findProp (register const char *str, register unsigned int len) #line 68 "cssproperties.gperf" {"margin-left", CSS_PROP_MARGIN_LEFT}, #line 142 "cssproperties.gperf" - {"-tdehtml-user-input", CSS_PROP__KHTML_USER_INPUT}, + {"-tdehtml-user-input", CSS_PROP__TDEHTML_USER_INPUT}, #line 79 "cssproperties.gperf" {"min-width", CSS_PROP_MIN_WIDTH}, #line 127 "cssproperties.gperf" @@ -361,13 +361,13 @@ findProp (register const char *str, register unsigned int len) #line 92 "cssproperties.gperf" {"padding-left", CSS_PROP_PADDING_LEFT}, #line 71 "cssproperties.gperf" - {"-tdehtml-marquee-direction", CSS_PROP__KHTML_MARQUEE_DIRECTION}, + {"-tdehtml-marquee-direction", CSS_PROP__TDEHTML_MARQUEE_DIRECTION}, #line 73 "cssproperties.gperf" - {"-tdehtml-marquee-repetition", CSS_PROP__KHTML_MARQUEE_REPETITION}, + {"-tdehtml-marquee-repetition", CSS_PROP__TDEHTML_MARQUEE_REPETITION}, #line 95 "cssproperties.gperf" {"page-break-before", CSS_PROP_PAGE_BREAK_BEFORE}, #line 74 "cssproperties.gperf" - {"-tdehtml-marquee-speed", CSS_PROP__KHTML_MARQUEE_SPEED}, + {"-tdehtml-marquee-speed", CSS_PROP__TDEHTML_MARQUEE_SPEED}, #line 94 "cssproperties.gperf" {"page-break-after", CSS_PROP_PAGE_BREAK_AFTER}, #line 81 "cssproperties.gperf" @@ -383,7 +383,7 @@ findProp (register const char *str, register unsigned int len) #line 134 "cssproperties.gperf" {"scrollbar-face-color", CSS_PROP_SCROLLBAR_FACE_COLOR}, #line 72 "cssproperties.gperf" - {"-tdehtml-marquee-increment", CSS_PROP__KHTML_MARQUEE_INCREMENT}, + {"-tdehtml-marquee-increment", CSS_PROP__TDEHTML_MARQUEE_INCREMENT}, #line 116 "cssproperties.gperf" {"word-spacing", CSS_PROP_WORD_SPACING}, #line 111 "cssproperties.gperf" @@ -405,13 +405,13 @@ findProp (register const char *str, register unsigned int len) #line 32 "cssproperties.gperf" {"border-top-style", CSS_PROP_BORDER_TOP_STYLE}, #line 26 "cssproperties.gperf" - {"-tdehtml-border-horizontal-spacing", CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING}, + {"-tdehtml-border-horizontal-spacing", CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING}, #line 33 "cssproperties.gperf" {"border-right-style", CSS_PROP_BORDER_RIGHT_STYLE}, #line 34 "cssproperties.gperf" {"border-bottom-style", CSS_PROP_BORDER_BOTTOM_STYLE}, #line 23 "cssproperties.gperf" - {"-tdehtml-background-size", CSS_PROP__KHTML_BACKGROUND_SIZE}, + {"-tdehtml-background-size", CSS_PROP__TDEHTML_BACKGROUND_SIZE}, #line 135 "cssproperties.gperf" {"scrollbar-shadow-color", CSS_PROP_SCROLLBAR_SHADOW_COLOR}, #line 129 "cssproperties.gperf" @@ -435,7 +435,7 @@ findProp (register const char *str, register unsigned int len) #line 84 "cssproperties.gperf" {"outline-style", CSS_PROP_OUTLINE_STYLE}, #line 141 "cssproperties.gperf" - {"-tdehtml-flow-mode", CSS_PROP__KHTML_FLOW_MODE}, + {"-tdehtml-flow-mode", CSS_PROP__TDEHTML_FLOW_MODE}, #line 87 "cssproperties.gperf" {"overflow-x", CSS_PROP_OVERFLOW_X}, #line 113 "cssproperties.gperf" @@ -449,7 +449,7 @@ findProp (register const char *str, register unsigned int len) #line 83 "cssproperties.gperf" {"outline-offset", CSS_PROP_OUTLINE_OFFSET}, #line 75 "cssproperties.gperf" - {"-tdehtml-marquee-style", CSS_PROP__KHTML_MARQUEE_STYLE}, + {"-tdehtml-marquee-style", CSS_PROP__TDEHTML_MARQUEE_STYLE}, #line 55 "cssproperties.gperf" {"font-style", CSS_PROP_FONT_STYLE}, #line 35 "cssproperties.gperf" diff --git a/tdehtml/css/cssproperties.h b/tdehtml/css/cssproperties.h index be92d93d4..c06431c62 100644 --- a/tdehtml/css/cssproperties.h +++ b/tdehtml/css/cssproperties.h @@ -15,13 +15,13 @@ DOM::DOMString getPropertyName(unsigned short id) KDE_NO_EXPORT; #define CSS_PROP_BACKGROUND_POSITION 5 #define CSS_PROP_BACKGROUND_POSITION_X 6 #define CSS_PROP_BACKGROUND_POSITION_Y 7 -#define CSS_PROP__KHTML_BACKGROUND_CLIP 8 -#define CSS_PROP__KHTML_BACKGROUND_ORIGIN 9 -#define CSS_PROP__KHTML_BACKGROUND_SIZE 10 +#define CSS_PROP__TDEHTML_BACKGROUND_CLIP 8 +#define CSS_PROP__TDEHTML_BACKGROUND_ORIGIN 9 +#define CSS_PROP__TDEHTML_BACKGROUND_SIZE 10 #define CSS_PROP_BORDER_COLLAPSE 11 #define CSS_PROP_BORDER_SPACING 12 -#define CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING 13 -#define CSS_PROP__KHTML_BORDER_VERTICAL_SPACING 14 +#define CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING 13 +#define CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING 14 #define CSS_PROP_BORDER_TOP_COLOR 15 #define CSS_PROP_BORDER_RIGHT_COLOR 16 #define CSS_PROP_BORDER_BOTTOM_COLOR 17 @@ -63,13 +63,13 @@ DOM::DOMString getPropertyName(unsigned short id) KDE_NO_EXPORT; #define CSS_PROP_MARGIN_RIGHT 53 #define CSS_PROP_MARGIN_BOTTOM 54 #define CSS_PROP_MARGIN_LEFT 55 -#define CSS_PROP__KHTML_MARGIN_START 56 -#define CSS_PROP__KHTML_MARQUEE 57 -#define CSS_PROP__KHTML_MARQUEE_DIRECTION 58 -#define CSS_PROP__KHTML_MARQUEE_INCREMENT 59 -#define CSS_PROP__KHTML_MARQUEE_REPETITION 60 -#define CSS_PROP__KHTML_MARQUEE_SPEED 61 -#define CSS_PROP__KHTML_MARQUEE_STYLE 62 +#define CSS_PROP__TDEHTML_MARGIN_START 56 +#define CSS_PROP__TDEHTML_MARQUEE 57 +#define CSS_PROP__TDEHTML_MARQUEE_DIRECTION 58 +#define CSS_PROP__TDEHTML_MARQUEE_INCREMENT 59 +#define CSS_PROP__TDEHTML_MARQUEE_REPETITION 60 +#define CSS_PROP__TDEHTML_MARQUEE_SPEED 61 +#define CSS_PROP__TDEHTML_MARQUEE_STYLE 62 #define CSS_PROP_MAX_HEIGHT 63 #define CSS_PROP_MAX_WIDTH 64 #define CSS_PROP_MIN_HEIGHT 65 @@ -87,7 +87,7 @@ DOM::DOMString getPropertyName(unsigned short id) KDE_NO_EXPORT; #define CSS_PROP_PADDING_RIGHT 77 #define CSS_PROP_PADDING_BOTTOM 78 #define CSS_PROP_PADDING_LEFT 79 -#define CSS_PROP__KHTML_PADDING_START 80 +#define CSS_PROP__TDEHTML_PADDING_START 80 #define CSS_PROP_PAGE_BREAK_AFTER 81 #define CSS_PROP_PAGE_BREAK_BEFORE 82 #define CSS_PROP_PAGE_BREAK_INSIDE 83 @@ -135,8 +135,8 @@ DOM::DOMString getPropertyName(unsigned short id) KDE_NO_EXPORT; #define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 125 #define CSS_PROP_SCROLLBAR_TRACK_COLOR 126 #define CSS_PROP_SCROLLBAR_ARROW_COLOR 127 -#define CSS_PROP__KHTML_FLOW_MODE 128 -#define CSS_PROP__KHTML_USER_INPUT 129 +#define CSS_PROP__TDEHTML_FLOW_MODE 128 +#define CSS_PROP__TDEHTML_USER_INPUT 129 #define CSS_PROP_MAX CSS_PROP_Z_INDEX #define CSS_PROP_TOTAL 130 diff --git a/tdehtml/css/cssstyleselector.cpp b/tdehtml/css/cssstyleselector.cpp index 04b66e40a..2a1fb5477 100644 --- a/tdehtml/css/cssstyleselector.cpp +++ b/tdehtml/css/cssstyleselector.cpp @@ -211,7 +211,7 @@ static PseudoState pseudoState; CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet, StyleSheetListImpl *styleSheets, const KURL &url, bool _strictParsing ) { - KHTMLView* view = doc->view(); + TDEHTMLView* view = doc->view(); init(view ? view->part()->settings() : 0, doc); @@ -273,14 +273,14 @@ CSSStyleSelector::CSSStyleSelector( CSSStyleSheetImpl *sheet ) { init(0L, 0L); - KHTMLView *view = sheet->doc()->view(); + TDEHTMLView *view = sheet->doc()->view(); m_medium = view ? view->mediaType() : "screen"; authorStyle = new CSSStyleSelectorList(); authorStyle->append( sheet, m_medium ); } -void CSSStyleSelector::init(const KHTMLSettings* _settings, DocumentImpl* doc) +void CSSStyleSelector::init(const TDEHTMLSettings* _settings, DocumentImpl* doc) { element = 0; settings = _settings; @@ -308,12 +308,12 @@ CSSStyleSelector::~CSSStyleSelector() void CSSStyleSelector::addSheet( CSSStyleSheetImpl *sheet ) { - KHTMLView *view = sheet->doc()->view(); + TDEHTMLView *view = sheet->doc()->view(); m_medium = view ? view->mediaType() : "screen"; authorStyle->append( sheet, m_medium ); } -void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *doc) +void CSSStyleSelector::loadDefaultStyle(const TDEHTMLSettings *s, DocumentImpl *doc) { if(s_defaultStyle) return; @@ -883,9 +883,9 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded cleanpath( u ); } //completeURL( attr.string() ); - bool contains = KHTMLFactory::vLinks()->contains( u ); + bool contains = TDEHTMLFactory::vLinks()->contains( u ); if ( !contains && u.contains('/')==2 ) - contains = KHTMLFactory::vLinks()->contains( u+'/' ); + contains = TDEHTMLFactory::vLinks()->contains( u+'/' ); return contains ? PseudoVisited : PseudoLink; } @@ -2136,9 +2136,9 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) (!parentNode && value->cssValueType() == CSSValue::CSS_INHERIT); // These properties are used to set the correct margins/padding on RTL lists. - if (id == CSS_PROP__KHTML_MARGIN_START) + if (id == CSS_PROP__TDEHTML_MARGIN_START) id = style->direction() == LTR ? CSS_PROP_MARGIN_LEFT : CSS_PROP_MARGIN_RIGHT; - else if (id == CSS_PROP__KHTML_PADDING_START) + else if (id == CSS_PROP__TDEHTML_PADDING_START) id = style->direction() == LTR ? CSS_PROP_PADDING_LEFT : CSS_PROP_PADDING_RIGHT; // What follows is a list that maps the CSS properties into their corresponding front-end @@ -2150,16 +2150,16 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) case CSS_PROP_BACKGROUND_ATTACHMENT: HANDLE_BACKGROUND_VALUE(backgroundAttachment, BackgroundAttachment, value) break; - case CSS_PROP__KHTML_BACKGROUND_CLIP: + case CSS_PROP__TDEHTML_BACKGROUND_CLIP: HANDLE_BACKGROUND_VALUE(backgroundClip, BackgroundClip, value) break; - case CSS_PROP__KHTML_BACKGROUND_ORIGIN: + case CSS_PROP__TDEHTML_BACKGROUND_ORIGIN: HANDLE_BACKGROUND_VALUE(backgroundOrigin, BackgroundOrigin, value) break; case CSS_PROP_BACKGROUND_REPEAT: HANDLE_BACKGROUND_VALUE(backgroundRepeat, BackgroundRepeat, value) break; - case CSS_PROP__KHTML_BACKGROUND_SIZE: + case CSS_PROP__TDEHTML_BACKGROUND_SIZE: HANDLE_BACKGROUND_VALUE(backgroundSize, BackgroundSize, value) break; case CSS_PROP_BORDER_COLLAPSE: @@ -2181,27 +2181,27 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) case CSS_PROP_BORDER_TOP_STYLE: HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderTopStyle, BorderTopStyle, BorderStyle) if (!primitiveValue) return; - style->setBorderTopStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE)); + style->setBorderTopStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__TDEHTML_NATIVE)); break; case CSS_PROP_BORDER_RIGHT_STYLE: HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderRightStyle, BorderRightStyle, BorderStyle) if (!primitiveValue) return; - style->setBorderRightStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE)); + style->setBorderRightStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__TDEHTML_NATIVE)); break; case CSS_PROP_BORDER_BOTTOM_STYLE: HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderBottomStyle, BorderBottomStyle, BorderStyle) if (!primitiveValue) return; - style->setBorderBottomStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE)); + style->setBorderBottomStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__TDEHTML_NATIVE)); break; case CSS_PROP_BORDER_LEFT_STYLE: HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderLeftStyle, BorderLeftStyle, BorderStyle) if (!primitiveValue) return; - style->setBorderLeftStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE)); + style->setBorderLeftStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__TDEHTML_NATIVE)); break; case CSS_PROP_OUTLINE_STYLE: HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(outlineStyle, OutlineStyle, BorderStyle) if (!primitiveValue) return; - style->setOutlineStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE)); + style->setOutlineStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__TDEHTML_NATIVE)); break; case CSS_PROP_CAPTION_SIDE: { @@ -2279,11 +2279,11 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) EFloat f; switch(primitiveValue->getIdent()) { - case CSS_VAL__KHTML_LEFT: + case CSS_VAL__TDEHTML_LEFT: f = FLEFT_ALIGN; break; case CSS_VAL_LEFT: f = FLEFT; break; - case CSS_VAL__KHTML_RIGHT: + case CSS_VAL__TDEHTML_RIGHT: f = FRIGHT_ALIGN; break; case CSS_VAL_RIGHT: f = FRIGHT; break; @@ -2659,8 +2659,8 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) EWhiteSpace s; switch(primitiveValue->getIdent()) { - case CSS_VAL__KHTML_NOWRAP: - s = KHTML_NOWRAP; + case CSS_VAL__TDEHTML_NOWRAP: + s = TDEHTML_NOWRAP; break; case CSS_VAL_NOWRAP: s = NOWRAP; @@ -2700,14 +2700,14 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setBorderVerticalSpacing(parentStyle->borderVerticalSpacing()); break; } - case CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING: { + case CSS_PROP__TDEHTML_BORDER_HORIZONTAL_SPACING: { HANDLE_INHERIT_AND_INITIAL(borderHorizontalSpacing, BorderHorizontalSpacing) if (!primitiveValue) break; short spacing = primitiveValue->computeLength(style, paintDeviceMetrics); style->setBorderHorizontalSpacing(spacing); break; } - case CSS_PROP__KHTML_BORDER_VERTICAL_SPACING: { + case CSS_PROP__TDEHTML_BORDER_VERTICAL_SPACING: { HANDLE_INHERIT_AND_INITIAL(borderVerticalSpacing, BorderVerticalSpacing) if (!primitiveValue) break; short spacing = primitiveValue->computeLength(style, paintDeviceMetrics); @@ -2759,7 +2759,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) return; int ident = primitiveValue->getIdent(); if ( ident ) { - if ( ident == CSS_VAL__KHTML_TEXT ) + if ( ident == CSS_VAL__TDEHTML_TEXT ) col = element->getDocument()->textColor(); // ### should be eliminated else if ( ident == CSS_VAL_TRANSPARENT @@ -3152,7 +3152,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) align = SUB; break; case CSS_VAL_SUPER: align = SUPER; break; - case CSS_VAL__KHTML_BASELINE_MIDDLE: + case CSS_VAL__TDEHTML_BASELINE_MIDDLE: align = BASELINE_MIDDLE; break; default: return; @@ -3210,7 +3210,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) case CSS_VAL_LARGE: size = int( fontSizes[4] ); break; case CSS_VAL_X_LARGE: size = int( fontSizes[5] ); break; case CSS_VAL_XX_LARGE: size = int( fontSizes[6] ); break; - case CSS_VAL__KHTML_XXX_LARGE: size = int( fontSizes[7] ); break; + case CSS_VAL__TDEHTML_XXX_LARGE: size = int( fontSizes[7] ); break; case CSS_VAL_LARGER: size = nextFontSize(fontSizes, oldSize, false); break; @@ -3326,7 +3326,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) HANDLE_INHERIT_AND_INITIAL(textAlign, TextAlign) if (!primitiveValue) return; if (primitiveValue->getIdent()) - style->setTextAlign( (ETextAlign) (primitiveValue->getIdent() - CSS_VAL__KHTML_AUTO) ); + style->setTextAlign( (ETextAlign) (primitiveValue->getIdent() - CSS_VAL__TDEHTML_AUTO) ); return; } @@ -3581,15 +3581,15 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setTextDecoration(t); break; } - case CSS_PROP__KHTML_FLOW_MODE: + case CSS_PROP__TDEHTML_FLOW_MODE: HANDLE_INHERIT_AND_INITIAL(flowAroundFloats, FlowAroundFloats) if (!primitiveValue) return; if (primitiveValue->getIdent()) { - style->setFlowAroundFloats( primitiveValue->getIdent() == CSS_VAL__KHTML_AROUND_FLOATS ); + style->setFlowAroundFloats( primitiveValue->getIdent() == CSS_VAL__TDEHTML_AROUND_FLOATS ); return; } break; - case CSS_PROP__KHTML_USER_INPUT: { + case CSS_PROP__TDEHTML_USER_INPUT: { if(value->cssValueType() == CSSValue::CSS_INHERIT) { if(!parentNode) return; @@ -3843,7 +3843,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) // Clamp opacity to the range 0-1 style->setOpacity(kMin(1.0f, kMax(0.0f, (float)primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER)))); break; - case CSS_PROP__KHTML_MARQUEE: + case CSS_PROP__TDEHTML_MARQUEE: if (value->cssValueType() != CSSValue::CSS_INHERIT || !parentNode) return; style->setMarqueeDirection(parentStyle->marqueeDirection()); style->setMarqueeIncrement(parentStyle->marqueeIncrement()); @@ -3851,7 +3851,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setMarqueeLoopCount(parentStyle->marqueeLoopCount()); style->setMarqueeBehavior(parentStyle->marqueeBehavior()); break; - case CSS_PROP__KHTML_MARQUEE_REPETITION: { + case CSS_PROP__TDEHTML_MARQUEE_REPETITION: { HANDLE_INHERIT_AND_INITIAL(marqueeLoopCount, MarqueeLoopCount) if (!primitiveValue) return; if (primitiveValue->getIdent() == CSS_VAL_INFINITE) @@ -3860,7 +3860,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setMarqueeLoopCount((int)(primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER))); break; } - case CSS_PROP__KHTML_MARQUEE_SPEED: { + case CSS_PROP__TDEHTML_MARQUEE_SPEED: { HANDLE_INHERIT_AND_INITIAL(marqueeSpeed, MarqueeSpeed) if (!primitiveValue) return; if (primitiveValue->getIdent()) { @@ -3885,7 +3885,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setMarqueeSpeed(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER))); break; } - case CSS_PROP__KHTML_MARQUEE_INCREMENT: { + case CSS_PROP__TDEHTML_MARQUEE_INCREMENT: { HANDLE_INHERIT_AND_INITIAL(marqueeIncrement, MarqueeIncrement) if (!primitiveValue) return; if (primitiveValue->getIdent()) { @@ -3910,7 +3910,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) } break; } - case CSS_PROP__KHTML_MARQUEE_STYLE: { + case CSS_PROP__TDEHTML_MARQUEE_STYLE: { HANDLE_INHERIT_AND_INITIAL(marqueeBehavior, MarqueeBehavior) if (!primitiveValue || !primitiveValue->getIdent()) return; switch (primitiveValue->getIdent()) @@ -3933,7 +3933,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) } break; } - case CSS_PROP__KHTML_MARQUEE_DIRECTION: { + case CSS_PROP__TDEHTML_MARQUEE_DIRECTION: { HANDLE_INHERIT_AND_INITIAL(marqueeDirection, MarqueeDirection) if (!primitiveValue || !primitiveValue->getIdent()) return; switch (primitiveValue->getIdent()) diff --git a/tdehtml/css/cssstyleselector.h b/tdehtml/css/cssstyleselector.h index ad6903de7..f826c0323 100644 --- a/tdehtml/css/cssstyleselector.h +++ b/tdehtml/css/cssstyleselector.h @@ -30,10 +30,10 @@ #include "dom/dom_string.h" #include "xml/dom_restyler.h" -class KHTMLSettings; -class KHTMLView; -class KHTMLPart; -class KHTMLFactory; +class TDEHTMLSettings; +class TDEHTMLView; +class TDEHTMLPart; +class TDEHTMLFactory; class KURL; namespace DOM { @@ -127,7 +127,7 @@ namespace tdehtml KDE_EXPORT static void clear(); static void reparseConfiguration(); - static void loadDefaultStyle(const KHTMLSettings *s, DOM::DocumentImpl *doc); + static void loadDefaultStyle(const TDEHTMLSettings *s, DOM::DocumentImpl *doc); RenderStyle *styleForElement(DOM::ElementImpl *e); @@ -189,7 +189,7 @@ namespace tdehtml public: private: - void init(const KHTMLSettings* settings, DOM::DocumentImpl* doc); + void init(const TDEHTMLSettings* settings, DOM::DocumentImpl* doc); void mapBackgroundAttachment(BackgroundLayer* layer, DOM::CSSValueImpl* value); void mapBackgroundClip(BackgroundLayer* layer, DOM::CSSValueImpl* value); @@ -246,9 +246,9 @@ public: RenderStyle *parentStyle; DOM::ElementImpl *element; DOM::NodeImpl *parentNode; - KHTMLView *view; - KHTMLPart *part; - const KHTMLSettings *settings; + TDEHTMLView *view; + TDEHTMLPart *part; + const TDEHTMLSettings *settings; TQPaintDeviceMetrics *paintDeviceMetrics; TQValueVector m_fontSizes; TQValueVector m_fixedFontSizes; diff --git a/tdehtml/css/cssvalues.c b/tdehtml/css/cssvalues.c index 28ceede3d..1cd8075e8 100644 --- a/tdehtml/css/cssvalues.c +++ b/tdehtml/css/cssvalues.c @@ -597,9 +597,9 @@ findValue (register const char *str, register unsigned int len) #line 35 "cssvalues.gperf" {"small-caps", CSS_VAL_SMALL_CAPS}, #line 122 "cssvalues.gperf" - {"-tdehtml-text", CSS_VAL__KHTML_TEXT}, + {"-tdehtml-text", CSS_VAL__TDEHTML_TEXT}, #line 141 "cssvalues.gperf" - {"-tdehtml-left", CSS_VAL__KHTML_LEFT}, + {"-tdehtml-left", CSS_VAL__TDEHTML_LEFT}, #line 97 "cssvalues.gperf" {"background", CSS_VAL_BACKGROUND}, #line 178 "cssvalues.gperf" @@ -615,9 +615,9 @@ findValue (register const char *str, register unsigned int len) #line 198 "cssvalues.gperf" {"table-caption", CSS_VAL_TABLE_CAPTION}, #line 154 "cssvalues.gperf" - {"-tdehtml-lao", CSS_VAL__KHTML_LAO}, + {"-tdehtml-lao", CSS_VAL__TDEHTML_LAO}, #line 143 "cssvalues.gperf" - {"-tdehtml-center", CSS_VAL__KHTML_CENTER}, + {"-tdehtml-center", CSS_VAL__TDEHTML_CENTER}, #line 54 "cssvalues.gperf" {"x-large", CSS_VAL_X_LARGE}, #line 30 "cssvalues.gperf" @@ -625,29 +625,29 @@ findValue (register const char *str, register unsigned int len) #line 203 "cssvalues.gperf" {"progress", CSS_VAL_PROGRESS}, #line 16 "cssvalues.gperf" - {"-tdehtml-native", CSS_VAL__KHTML_NATIVE}, + {"-tdehtml-native", CSS_VAL__TDEHTML_NATIVE}, #line 177 "cssvalues.gperf" {"hiragana", CSS_VAL_HIRAGANA}, #line 171 "cssvalues.gperf" {"lower-greek", CSS_VAL_LOWER_GREEK}, #line 150 "cssvalues.gperf" - {"-tdehtml-diamond", CSS_VAL__KHTML_DIAMOND}, + {"-tdehtml-diamond", CSS_VAL__TDEHTML_DIAMOND}, #line 224 "cssvalues.gperf" {"no-close-quote", CSS_VAL_NO_CLOSE_QUOTE}, #line 61 "cssvalues.gperf" {"ultra-condensed", CSS_VAL_ULTRA_CONDENSED}, #line 158 "cssvalues.gperf" - {"-tdehtml-tibetan", CSS_VAL__KHTML_TIBETAN}, + {"-tdehtml-tibetan", CSS_VAL__TDEHTML_TIBETAN}, #line 124 "cssvalues.gperf" {"repeat-x", CSS_VAL_REPEAT_X}, #line 266 "cssvalues.gperf" - {"-tdehtml-normal", CSS_VAL__KHTML_NORMAL}, + {"-tdehtml-normal", CSS_VAL__TDEHTML_NORMAL}, #line 113 "cssvalues.gperf" {"threeddarkshadow", CSS_VAL_THREEDDARKSHADOW}, #line 219 "cssvalues.gperf" {"uppercase", CSS_VAL_UPPERCASE}, #line 136 "cssvalues.gperf" - {"-tdehtml-auto", CSS_VAL__KHTML_AUTO}, + {"-tdehtml-auto", CSS_VAL__TDEHTML_AUTO}, #line 163 "cssvalues.gperf" {"georgian", CSS_VAL_GEORGIAN}, #line 229 "cssvalues.gperf" @@ -657,13 +657,13 @@ findValue (register const char *str, register unsigned int len) #line 109 "cssvalues.gperf" {"infobackground", CSS_VAL_INFOBACKGROUND}, #line 157 "cssvalues.gperf" - {"-tdehtml-thai", CSS_VAL__KHTML_THAI}, + {"-tdehtml-thai", CSS_VAL__TDEHTML_THAI}, #line 226 "cssvalues.gperf" {"open-quote", CSS_VAL_OPEN_QUOTE}, #line 173 "cssvalues.gperf" {"lower-alpha", CSS_VAL_LOWER_ALPHA}, #line 156 "cssvalues.gperf" - {"-tdehtml-urdu", CSS_VAL__KHTML_URDU}, + {"-tdehtml-urdu", CSS_VAL__TDEHTML_URDU}, #line 223 "cssvalues.gperf" {"close-quote", CSS_VAL_CLOSE_QUOTE}, #line 104 "cssvalues.gperf" @@ -671,13 +671,13 @@ findValue (register const char *str, register unsigned int len) #line 225 "cssvalues.gperf" {"no-open-quote", CSS_VAL_NO_OPEN_QUOTE}, #line 231 "cssvalues.gperf" - {"-tdehtml-nowrap", CSS_VAL__KHTML_NOWRAP}, + {"-tdehtml-nowrap", CSS_VAL__TDEHTML_NOWRAP}, #line 67 "cssvalues.gperf" {"extra-expanded", CSS_VAL_EXTRA_EXPANDED}, #line 105 "cssvalues.gperf" {"highlighttext", CSS_VAL_HIGHLIGHTTEXT}, #line 155 "cssvalues.gperf" - {"-tdehtml-persian", CSS_VAL__KHTML_PERSIAN}, + {"-tdehtml-persian", CSS_VAL__TDEHTML_PERSIAN}, #line 116 "cssvalues.gperf" {"threedlightshadow", CSS_VAL_THREEDLIGHTSHADOW}, #line 96 "cssvalues.gperf" @@ -691,13 +691,13 @@ findValue (register const char *str, register unsigned int len) #line 251 "cssvalues.gperf" {"line-through", CSS_VAL_LINE_THROUGH}, #line 142 "cssvalues.gperf" - {"-tdehtml-right", CSS_VAL__KHTML_RIGHT}, + {"-tdehtml-right", CSS_VAL__TDEHTML_RIGHT}, #line 160 "cssvalues.gperf" {"upper-roman", CSS_VAL_UPPER_ROMAN}, #line 135 "cssvalues.gperf" - {"-tdehtml-baseline-middle", CSS_VAL__KHTML_BASELINE_MIDDLE}, + {"-tdehtml-baseline-middle", CSS_VAL__TDEHTML_BASELINE_MIDDLE}, #line 153 "cssvalues.gperf" - {"-tdehtml-arabic-indic", CSS_VAL__KHTML_ARABIC_INDIC}, + {"-tdehtml-arabic-indic", CSS_VAL__TDEHTML_ARABIC_INDIC}, #line 152 "cssvalues.gperf" {"decimal-leading-zero", CSS_VAL_DECIMAL_LEADING_ZERO}, #line 115 "cssvalues.gperf" @@ -707,13 +707,13 @@ findValue (register const char *str, register unsigned int len) #line 99 "cssvalues.gperf" {"buttonhighlight", CSS_VAL_BUTTONHIGHLIGHT}, #line 56 "cssvalues.gperf" - {"-tdehtml-xxx-large", CSS_VAL__KHTML_XXX_LARGE}, + {"-tdehtml-xxx-large", CSS_VAL__TDEHTML_XXX_LARGE}, #line 267 "cssvalues.gperf" - {"-tdehtml-around-floats", CSS_VAL__KHTML_AROUND_FLOATS}, + {"-tdehtml-around-floats", CSS_VAL__TDEHTML_AROUND_FLOATS}, #line 191 "cssvalues.gperf" {"table-row-group", CSS_VAL_TABLE_ROW_GROUP}, #line 182 "cssvalues.gperf" - {"-tdehtml-close-quote", CSS_VAL__KHTML_CLOSE_QUOTE}, + {"-tdehtml-close-quote", CSS_VAL__TDEHTML_CLOSE_QUOTE}, #line 179 "cssvalues.gperf" {"hiragana-iroha", CSS_VAL_HIRAGANA_IROHA}, #line 193 "cssvalues.gperf" @@ -723,23 +723,23 @@ findValue (register const char *str, register unsigned int len) #line 175 "cssvalues.gperf" {"upper-alpha", CSS_VAL_UPPER_ALPHA}, #line 181 "cssvalues.gperf" - {"-tdehtml-open-quote", CSS_VAL__KHTML_OPEN_QUOTE}, + {"-tdehtml-open-quote", CSS_VAL__TDEHTML_OPEN_QUOTE}, #line 165 "cssvalues.gperf" - {"-tdehtml-japanese-formal", CSS_VAL__KHTML_JAPANESE_FORMAL}, + {"-tdehtml-japanese-formal", CSS_VAL__TDEHTML_JAPANESE_FORMAL}, #line 166 "cssvalues.gperf" - {"-tdehtml-japanese-informal", CSS_VAL__KHTML_JAPANESE_INFORMAL}, + {"-tdehtml-japanese-informal", CSS_VAL__TDEHTML_JAPANESE_INFORMAL}, #line 192 "cssvalues.gperf" {"table-header-group", CSS_VAL_TABLE_HEADER_GROUP}, #line 169 "cssvalues.gperf" - {"-tdehtml-trad-chinese-formal", CSS_VAL__KHTML_TRAD_CHINESE_FORMAL}, + {"-tdehtml-trad-chinese-formal", CSS_VAL__TDEHTML_TRAD_CHINESE_FORMAL}, #line 170 "cssvalues.gperf" - {"-tdehtml-trad-chinese-informal", CSS_VAL__KHTML_TRAD_CHINESE_INFORMAL}, + {"-tdehtml-trad-chinese-informal", CSS_VAL__TDEHTML_TRAD_CHINESE_INFORMAL}, #line 167 "cssvalues.gperf" - {"-tdehtml-simp-chinese-formal", CSS_VAL__KHTML_SIMP_CHINESE_FORMAL}, + {"-tdehtml-simp-chinese-formal", CSS_VAL__TDEHTML_SIMP_CHINESE_FORMAL}, #line 168 "cssvalues.gperf" - {"-tdehtml-simp-chinese-informal", CSS_VAL__KHTML_SIMP_CHINESE_INFORMAL}, + {"-tdehtml-simp-chinese-informal", CSS_VAL__TDEHTML_SIMP_CHINESE_INFORMAL}, #line 172 "cssvalues.gperf" - {"-tdehtml-upper-greek", CSS_VAL__KHTML_UPPER_GREEK} + {"-tdehtml-upper-greek", CSS_VAL__TDEHTML_UPPER_GREEK} }; static const short lookup[] = diff --git a/tdehtml/css/cssvalues.h b/tdehtml/css/cssvalues.h index 36a365754..12d606acc 100644 --- a/tdehtml/css/cssvalues.h +++ b/tdehtml/css/cssvalues.h @@ -11,7 +11,7 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_MIN 1 #define CSS_VAL_INHERIT 1 #define CSS_VAL_INITIAL 2 -#define CSS_VAL__KHTML_NATIVE 3 +#define CSS_VAL__TDEHTML_NATIVE 3 #define CSS_VAL_NONE 4 #define CSS_VAL_HIDDEN 5 #define CSS_VAL_INSET 6 @@ -51,7 +51,7 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_LARGE 40 #define CSS_VAL_X_LARGE 41 #define CSS_VAL_XX_LARGE 42 -#define CSS_VAL__KHTML_XXX_LARGE 43 +#define CSS_VAL__TDEHTML_XXX_LARGE 43 #define CSS_VAL_SMALLER 44 #define CSS_VAL_LARGER 45 #define CSS_VAL_WIDER 46 @@ -117,7 +117,7 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_WINDOWFRAME 106 #define CSS_VAL_WINDOWTEXT 107 #define CSS_VAL_GREY 108 -#define CSS_VAL__KHTML_TEXT 109 +#define CSS_VAL__TDEHTML_TEXT 109 #define CSS_VAL_REPEAT 110 #define CSS_VAL_REPEAT_X 111 #define CSS_VAL_REPEAT_Y 112 @@ -130,44 +130,44 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_TEXT_BOTTOM 119 #define CSS_VAL_TOP 120 #define CSS_VAL_BOTTOM 121 -#define CSS_VAL__KHTML_BASELINE_MIDDLE 122 -#define CSS_VAL__KHTML_AUTO 123 +#define CSS_VAL__TDEHTML_BASELINE_MIDDLE 122 +#define CSS_VAL__TDEHTML_AUTO 123 #define CSS_VAL_LEFT 124 #define CSS_VAL_RIGHT 125 #define CSS_VAL_CENTER 126 #define CSS_VAL_JUSTIFY 127 -#define CSS_VAL__KHTML_LEFT 128 -#define CSS_VAL__KHTML_RIGHT 129 -#define CSS_VAL__KHTML_CENTER 130 +#define CSS_VAL__TDEHTML_LEFT 128 +#define CSS_VAL__TDEHTML_RIGHT 129 +#define CSS_VAL__TDEHTML_CENTER 130 #define CSS_VAL_OUTSIDE 131 #define CSS_VAL_INSIDE 132 #define CSS_VAL_DISC 133 #define CSS_VAL_CIRCLE 134 #define CSS_VAL_SQUARE 135 #define CSS_VAL_BOX 136 -#define CSS_VAL__KHTML_DIAMOND 137 +#define CSS_VAL__TDEHTML_DIAMOND 137 #define CSS_VAL_DECIMAL 138 #define CSS_VAL_DECIMAL_LEADING_ZERO 139 -#define CSS_VAL__KHTML_ARABIC_INDIC 140 -#define CSS_VAL__KHTML_LAO 141 -#define CSS_VAL__KHTML_PERSIAN 142 -#define CSS_VAL__KHTML_URDU 143 -#define CSS_VAL__KHTML_THAI 144 -#define CSS_VAL__KHTML_TIBETAN 145 +#define CSS_VAL__TDEHTML_ARABIC_INDIC 140 +#define CSS_VAL__TDEHTML_LAO 141 +#define CSS_VAL__TDEHTML_PERSIAN 142 +#define CSS_VAL__TDEHTML_URDU 143 +#define CSS_VAL__TDEHTML_THAI 144 +#define CSS_VAL__TDEHTML_TIBETAN 145 #define CSS_VAL_LOWER_ROMAN 146 #define CSS_VAL_UPPER_ROMAN 147 #define CSS_VAL_HEBREW 148 #define CSS_VAL_ARMENIAN 149 #define CSS_VAL_GEORGIAN 150 #define CSS_VAL_CJK_IDEOGRAPHIC 151 -#define CSS_VAL__KHTML_JAPANESE_FORMAL 152 -#define CSS_VAL__KHTML_JAPANESE_INFORMAL 153 -#define CSS_VAL__KHTML_SIMP_CHINESE_FORMAL 154 -#define CSS_VAL__KHTML_SIMP_CHINESE_INFORMAL 155 -#define CSS_VAL__KHTML_TRAD_CHINESE_FORMAL 156 -#define CSS_VAL__KHTML_TRAD_CHINESE_INFORMAL 157 +#define CSS_VAL__TDEHTML_JAPANESE_FORMAL 152 +#define CSS_VAL__TDEHTML_JAPANESE_INFORMAL 153 +#define CSS_VAL__TDEHTML_SIMP_CHINESE_FORMAL 154 +#define CSS_VAL__TDEHTML_SIMP_CHINESE_INFORMAL 155 +#define CSS_VAL__TDEHTML_TRAD_CHINESE_FORMAL 156 +#define CSS_VAL__TDEHTML_TRAD_CHINESE_INFORMAL 157 #define CSS_VAL_LOWER_GREEK 158 -#define CSS_VAL__KHTML_UPPER_GREEK 159 +#define CSS_VAL__TDEHTML_UPPER_GREEK 159 #define CSS_VAL_LOWER_ALPHA 160 #define CSS_VAL_LOWER_LATIN 161 #define CSS_VAL_UPPER_ALPHA 162 @@ -176,8 +176,8 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_KATAKANA 165 #define CSS_VAL_HIRAGANA_IROHA 166 #define CSS_VAL_KATAKANA_IROHA 167 -#define CSS_VAL__KHTML_OPEN_QUOTE 168 -#define CSS_VAL__KHTML_CLOSE_QUOTE 169 +#define CSS_VAL__TDEHTML_OPEN_QUOTE 168 +#define CSS_VAL__TDEHTML_CLOSE_QUOTE 169 #define CSS_VAL_INLINE 170 #define CSS_VAL_BLOCK 171 #define CSS_VAL_LIST_ITEM 172 @@ -226,7 +226,7 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_PRE 215 #define CSS_VAL_PRE_WRAP 216 #define CSS_VAL_PRE_LINE 217 -#define CSS_VAL__KHTML_NOWRAP 218 +#define CSS_VAL__TDEHTML_NOWRAP 218 #define CSS_VAL_BREAK_WORD 219 #define CSS_VAL_ABOVE 220 #define CSS_VAL_ABSOLUTE 221 @@ -261,8 +261,8 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT; #define CSS_VAL_THICK 250 #define CSS_VAL_THIN 251 #define CSS_VAL_UNDERLINE 252 -#define CSS_VAL__KHTML_NORMAL 253 -#define CSS_VAL__KHTML_AROUND_FLOATS 254 +#define CSS_VAL__TDEHTML_NORMAL 253 +#define CSS_VAL__TDEHTML_AROUND_FLOATS 254 #define CSS_VAL_BORDER_BOX 255 #define CSS_VAL_CONTENT_BOX 256 #define CSS_VAL_ENABLED 257 diff --git a/tdehtml/css/cssvalues.in b/tdehtml/css/cssvalues.in index b85d49f17..30ed44475 100644 --- a/tdehtml/css/cssvalues.in +++ b/tdehtml/css/cssvalues.in @@ -350,16 +350,16 @@ thick thin underline # -# CSS_PROP__KHTML_FLOW_MODE +# CSS_PROP__TDEHTML_FLOW_MODE -tdehtml-normal -tdehtml-around-floats # CSS3 Values -# CSS_PROP__KHTML_BOX_SIZING +# CSS_PROP__TDEHTML_BOX_SIZING border-box content-box -# CSS_PROP__KHTML_USER_INPUT +# CSS_PROP__TDEHTML_USER_INPUT enabled disabled #none diff --git a/tdehtml/css/parser.cpp b/tdehtml/css/parser.cpp index f88b7d002..3e8ee89fd 100644 --- a/tdehtml/css/parser.cpp +++ b/tdehtml/css/parser.cpp @@ -81,9 +81,9 @@ FONT_FACE_SYM = 273, CHARSET_SYM = 274, NAMESPACE_SYM = 275, - KHTML_RULE_SYM = 276, - KHTML_DECLS_SYM = 277, - KHTML_VALUE_SYM = 278, + TDEHTML_RULE_SYM = 276, + TDEHTML_DECLS_SYM = 277, + TDEHTML_VALUE_SYM = 278, IMPORTANT_SYM = 279, QEMS = 280, EMS = 281, @@ -129,9 +129,9 @@ #define FONT_FACE_SYM 273 #define CHARSET_SYM 274 #define NAMESPACE_SYM 275 -#define KHTML_RULE_SYM 276 -#define KHTML_DECLS_SYM 277 -#define KHTML_VALUE_SYM 278 +#define TDEHTML_RULE_SYM 276 +#define TDEHTML_DECLS_SYM 277 +#define TDEHTML_VALUE_SYM 278 #define IMPORTANT_SYM 279 #define QEMS 280 #define EMS 281 @@ -589,7 +589,7 @@ static const char *const yytname[] = "INCLUDES", "DASHMATCH", "BEGINSWITH", "ENDSWITH", "CONTAINS", "STRING", "IDENT", "NTH", "HASH", "':'", "'.'", "'['", "'*'", "'|'", "IMPORT_SYM", "PAGE_SYM", "MEDIA_SYM", "FONT_FACE_SYM", "CHARSET_SYM", "NAMESPACE_SYM", - "KHTML_RULE_SYM", "KHTML_DECLS_SYM", "KHTML_VALUE_SYM", "IMPORTANT_SYM", + "TDEHTML_RULE_SYM", "TDEHTML_DECLS_SYM", "TDEHTML_VALUE_SYM", "IMPORTANT_SYM", "QEMS", "EMS", "EXS", "PXS", "CMS", "MMS", "INS", "PTS", "PCS", "DEGS", "RADS", "GRADS", "MSECS", "SECS", "HERZ", "KHERZ", "DIMEN", "PERCENTAGE", "FLOAT", "INTEGER", "URI", "FUNCTION", "NOTFUNCTION", "UNICODERANGE", diff --git a/tdehtml/css/parser.h b/tdehtml/css/parser.h index e3375db66..2920fd9de 100644 --- a/tdehtml/css/parser.h +++ b/tdehtml/css/parser.h @@ -48,9 +48,9 @@ FONT_FACE_SYM = 273, CHARSET_SYM = 274, NAMESPACE_SYM = 275, - KHTML_RULE_SYM = 276, - KHTML_DECLS_SYM = 277, - KHTML_VALUE_SYM = 278, + TDEHTML_RULE_SYM = 276, + TDEHTML_DECLS_SYM = 277, + TDEHTML_VALUE_SYM = 278, IMPORTANT_SYM = 279, QEMS = 280, EMS = 281, @@ -96,9 +96,9 @@ #define FONT_FACE_SYM 273 #define CHARSET_SYM 274 #define NAMESPACE_SYM 275 -#define KHTML_RULE_SYM 276 -#define KHTML_DECLS_SYM 277 -#define KHTML_VALUE_SYM 278 +#define TDEHTML_RULE_SYM 276 +#define TDEHTML_DECLS_SYM 277 +#define TDEHTML_VALUE_SYM 278 #define IMPORTANT_SYM 279 #define QEMS 280 #define EMS 281 diff --git a/tdehtml/css/parser.y b/tdehtml/css/parser.y index bb6f915f9..6d8b18e9a 100644 --- a/tdehtml/css/parser.y +++ b/tdehtml/css/parser.y @@ -164,9 +164,9 @@ static int cssyylex( YYSTYPE *yylval ) { %token FONT_FACE_SYM %token CHARSET_SYM %token NAMESPACE_SYM -%token KHTML_RULE_SYM -%token KHTML_DECLS_SYM -%token KHTML_VALUE_SYM +%token TDEHTML_RULE_SYM +%token TDEHTML_DECLS_SYM +%token TDEHTML_VALUE_SYM %token IMPORTANT_SYM @@ -261,20 +261,20 @@ stylesheet: ; tdehtml_rule: - KHTML_RULE_SYM '{' maybe_space ruleset maybe_space '}' { + TDEHTML_RULE_SYM '{' maybe_space ruleset maybe_space '}' { CSSParser *p = static_cast(parser); p->rule = $4; } ; tdehtml_decls: - KHTML_DECLS_SYM declaration_block { + TDEHTML_DECLS_SYM declaration_block { /* can be empty */ } ; tdehtml_value: - KHTML_VALUE_SYM '{' maybe_space expr '}' { + TDEHTML_VALUE_SYM '{' maybe_space expr '}' { CSSParser *p = static_cast(parser); if ( $4 ) { p->valueList = $4; diff --git a/tdehtml/css/tokenizer.cpp b/tdehtml/css/tokenizer.cpp index 493a98032..48fd174d1 100644 --- a/tdehtml/css/tokenizer.cpp +++ b/tdehtml/css/tokenizer.cpp @@ -756,17 +756,17 @@ YY_RULE_SETUP case 20: YY_RULE_SETUP #line 53 "tokenizer.flex" -{yyTok = KHTML_RULE_SYM; return yyTok; } +{yyTok = TDEHTML_RULE_SYM; return yyTok; } YY_BREAK case 21: YY_RULE_SETUP #line 54 "tokenizer.flex" -{yyTok = KHTML_DECLS_SYM; return yyTok; } +{yyTok = TDEHTML_DECLS_SYM; return yyTok; } YY_BREAK case 22: YY_RULE_SETUP #line 55 "tokenizer.flex" -{yyTok = KHTML_VALUE_SYM; return yyTok; } +{yyTok = TDEHTML_VALUE_SYM; return yyTok; } YY_BREAK case 23: YY_RULE_SETUP diff --git a/tdehtml/css/tokenizer.flex b/tdehtml/css/tokenizer.flex index 76fcadb7c..330d13042 100644 --- a/tdehtml/css/tokenizer.flex +++ b/tdehtml/css/tokenizer.flex @@ -50,9 +50,9 @@ nth (-?[0-9]*n[\+-][0-9]+)|(-?[0-9]*n) "@font-face" {yyTok = FONT_FACE_SYM; return yyTok;} "@charset" {yyTok = CHARSET_SYM; return yyTok;} "@namespace" {yyTok = NAMESPACE_SYM; return yyTok; } -"@-tdehtml-rule" {yyTok = KHTML_RULE_SYM; return yyTok; } -"@-tdehtml-decls" {yyTok = KHTML_DECLS_SYM; return yyTok; } -"@-tdehtml-value" {yyTok = KHTML_VALUE_SYM; return yyTok; } +"@-tdehtml-rule" {yyTok = TDEHTML_RULE_SYM; return yyTok; } +"@-tdehtml-decls" {yyTok = TDEHTML_DECLS_SYM; return yyTok; } +"@-tdehtml-value" {yyTok = TDEHTML_VALUE_SYM; return yyTok; } "!"{w}"important" {yyTok = IMPORTANT_SYM; return yyTok;} diff --git a/tdehtml/design.h b/tdehtml/design.h index 86dbec911..f287a5ef9 100644 --- a/tdehtml/design.h +++ b/tdehtml/design.h @@ -36,7 +36,7 @@ * If you want to add to your application a widget that only needs simple text * browsing, you can also use the KTextBrowser widget in tdeui. * - * KHTMLPart : + * TDEHTMLPart : * The main part/widget for using tdehtml. * * DOM : diff --git a/tdehtml/dom/css_rule.h b/tdehtml/dom/css_rule.h index 5f27e8f8a..9059eecd7 100644 --- a/tdehtml/dom/css_rule.h +++ b/tdehtml/dom/css_rule.h @@ -49,7 +49,7 @@ class CSSRuleImpl; * interface. * */ -class KHTML_EXPORT CSSRule +class TDEHTML_EXPORT CSSRule { public: CSSRule(); @@ -72,7 +72,7 @@ public: MEDIA_RULE = 4, FONT_FACE_RULE = 5, PAGE_RULE = 6, - QUIRKS_RULE = 100 // KHTML CSS Extension + QUIRKS_RULE = 100 // TDEHTML CSS Extension }; /** @@ -146,7 +146,7 @@ class CSSCharsetRuleImpl; * be used to define the encoding of the style sheet. * */ -class KHTML_EXPORT CSSCharsetRule : public CSSRule +class TDEHTML_EXPORT CSSCharsetRule : public CSSRule { public: CSSCharsetRule(); @@ -190,7 +190,7 @@ class CSSFontFaceRuleImpl; * rule is used to hold a set of font descriptions. * */ -class KHTML_EXPORT CSSFontFaceRule : public CSSRule +class TDEHTML_EXPORT CSSFontFaceRule : public CSSRule { public: CSSFontFaceRule(); @@ -220,7 +220,7 @@ class CSSImportRuleImpl; * rule is used to import style rules from other style sheets. * */ -class KHTML_EXPORT CSSImportRule : public CSSRule +class TDEHTML_EXPORT CSSImportRule : public CSSRule { public: CSSImportRule(); @@ -267,7 +267,7 @@ class CSSMediaRuleImpl; * can be used to delimit style rules for specific media types. * */ -class KHTML_EXPORT CSSMediaRule : public CSSRule +class TDEHTML_EXPORT CSSMediaRule : public CSSRule { public: CSSMediaRule(); @@ -359,7 +359,7 @@ class CSSPageRuleImpl; * page box for paged media. * */ -class KHTML_EXPORT CSSPageRule : public CSSRule +class TDEHTML_EXPORT CSSPageRule : public CSSRule { public: CSSPageRule(); @@ -408,7 +408,7 @@ class CSSStyleRuleImpl; * in a CSS style sheet. * */ -class KHTML_EXPORT CSSStyleRule : public CSSRule +class TDEHTML_EXPORT CSSStyleRule : public CSSRule { public: CSSStyleRule(); @@ -458,7 +458,7 @@ class CSSUnknownRuleImpl; * not supported by this user agent. * */ -class KHTML_EXPORT CSSUnknownRule : public CSSRule +class TDEHTML_EXPORT CSSUnknownRule : public CSSRule { public: CSSUnknownRule(); @@ -481,7 +481,7 @@ class StyleListImpl; * of an ordered collection of CSS rules. * */ -class KHTML_EXPORT CSSRuleList +class TDEHTML_EXPORT CSSRuleList { public: CSSRuleList(); diff --git a/tdehtml/dom/css_stylesheet.h b/tdehtml/dom/css_stylesheet.h index d220ffa76..884c6bec5 100644 --- a/tdehtml/dom/css_stylesheet.h +++ b/tdehtml/dom/css_stylesheet.h @@ -55,7 +55,7 @@ class DocumentImpl; * instruction . * */ -class KHTML_EXPORT StyleSheet +class TDEHTML_EXPORT StyleSheet { public: StyleSheet(); @@ -170,7 +170,7 @@ protected: * This exception is raised when a specific CSS operation is impossible * to perform. */ -class KHTML_EXPORT CSSException +class TDEHTML_EXPORT CSSException { public: CSSException(unsigned short _code) { code = _code; } @@ -204,7 +204,7 @@ class CSSRuleList; * content type is "text/css". * */ -class KHTML_EXPORT CSSStyleSheet : public StyleSheet +class TDEHTML_EXPORT CSSStyleSheet : public StyleSheet { public: CSSStyleSheet(); @@ -306,7 +306,7 @@ class StyleSheet; * abstraction of an ordered collection of style sheets. * */ -class KHTML_EXPORT StyleSheetList +class TDEHTML_EXPORT StyleSheetList { public: StyleSheetList(); @@ -360,7 +360,7 @@ class CSSStyleSheet; * strings. * */ -class KHTML_EXPORT MediaList +class TDEHTML_EXPORT MediaList { public: MediaList(); @@ -444,7 +444,7 @@ protected: class LinkStyleImpl; -class KHTML_EXPORT LinkStyle +class TDEHTML_EXPORT LinkStyle { public: LinkStyle(); @@ -466,7 +466,7 @@ protected: class DocumentStyleImpl; -class KHTML_EXPORT DocumentStyle +class TDEHTML_EXPORT DocumentStyle { public: DocumentStyle(); diff --git a/tdehtml/dom/css_value.h b/tdehtml/dom/css_value.h index 5d4a043c7..e2028feac 100644 --- a/tdehtml/dom/css_value.h +++ b/tdehtml/dom/css_value.h @@ -57,7 +57,7 @@ class CSSValue; * interface. * */ -class KHTML_EXPORT CSSStyleDeclaration +class TDEHTML_EXPORT CSSStyleDeclaration { public: CSSStyleDeclaration(); @@ -240,7 +240,7 @@ class CSSValueImpl; * complexe value. * */ -class KHTML_EXPORT CSSValue +class TDEHTML_EXPORT CSSValue { public: CSSValue(); @@ -313,7 +313,7 @@ class CSSValue; * of an ordered collection of CSS values. * */ -class KHTML_EXPORT CSSValueList : public CSSValue +class TDEHTML_EXPORT CSSValueList : public CSSValue { public: CSSValueList(); @@ -370,7 +370,7 @@ class Rect; * \c CSSStyleDeclaration interface. * */ -class KHTML_EXPORT CSSPrimitiveValue : public CSSValue +class TDEHTML_EXPORT CSSPrimitiveValue : public CSSValue { public: CSSPrimitiveValue(); @@ -588,7 +588,7 @@ public: * interface modify the style property. * */ -class KHTML_EXPORT RGBColor +class TDEHTML_EXPORT RGBColor { public: RGBColor(); @@ -639,7 +639,7 @@ class RectImpl; * interface modify the style property. * */ -class KHTML_EXPORT Rect +class TDEHTML_EXPORT Rect { friend class CSSPrimitiveValue; public: @@ -696,7 +696,7 @@ class CounterImpl; * made through this interface modify the style property. * */ -class KHTML_EXPORT Counter +class TDEHTML_EXPORT Counter { friend class CSSPrimitiveValue; public: diff --git a/tdehtml/dom/dom2_events.h b/tdehtml/dom/dom2_events.h index 285a0c10e..3b68eafaa 100644 --- a/tdehtml/dom/dom2_events.h +++ b/tdehtml/dom/dom2_events.h @@ -61,7 +61,7 @@ class MutationEventImpl; * add them manually. * */ -class KHTML_EXPORT EventListener : public DomShared { +class TDEHTML_EXPORT EventListener : public DomShared { public: EventListener(); virtual ~EventListener(); @@ -108,7 +108,7 @@ protected: * implemented by the object passed to the event listener. * */ -class KHTML_EXPORT Event { +class TDEHTML_EXPORT Event { friend class Document; friend class NodeImpl; friend class DocumentImpl; @@ -259,7 +259,7 @@ protected: * descriptions. * */ -class KHTML_EXPORT EventException +class TDEHTML_EXPORT EventException { public: EventException(unsigned short _code); @@ -291,7 +291,7 @@ public: * with User Interface events. * */ -class KHTML_EXPORT UIEvent : public Event { +class TDEHTML_EXPORT UIEvent : public Event { public: UIEvent(); UIEvent(const UIEvent &other); @@ -396,7 +396,7 @@ protected: * obtain notification of mouse events which occur within its descendent elements. * */ -class KHTML_EXPORT MouseEvent : public UIEvent { +class TDEHTML_EXPORT MouseEvent : public UIEvent { public: MouseEvent(); MouseEvent(const MouseEvent &other); @@ -552,7 +552,7 @@ protected: * as specified in current DOM3 Events revision. This is doing heavy emulation * at the moment */ -class KHTML_EXPORT TextEvent : public UIEvent { +class TDEHTML_EXPORT TextEvent : public UIEvent { public: TextEvent(); TextEvent(const TextEvent &other); @@ -735,7 +735,7 @@ protected: * associated with Mutation events. * */ -class KHTML_EXPORT MutationEvent : public Event { +class TDEHTML_EXPORT MutationEvent : public Event { public: MutationEvent(); MutationEvent(const MutationEvent &other); diff --git a/tdehtml/dom/dom2_range.h b/tdehtml/dom/dom2_range.h index 290f4f48c..1f69b4a99 100644 --- a/tdehtml/dom/dom2_range.h +++ b/tdehtml/dom/dom2_range.h @@ -44,7 +44,7 @@ class RangeImpl; class DOMException; // Introduced in DOM Level 2: -class KHTML_EXPORT RangeException { +class TDEHTML_EXPORT RangeException { public: RangeException(unsigned short _code) { code = _code; } RangeException(const RangeException &other) { code = other.code; } @@ -67,7 +67,7 @@ public: }; -class KHTML_EXPORT Range +class TDEHTML_EXPORT Range { friend class DocumentImpl; friend class Document; diff --git a/tdehtml/dom/dom2_traversal.h b/tdehtml/dom/dom2_traversal.h index ea3d3521b..a1fc86bb3 100644 --- a/tdehtml/dom/dom2_traversal.h +++ b/tdehtml/dom/dom2_traversal.h @@ -57,7 +57,7 @@ class CustomNodeFilterImpl; * interface. * */ -class KHTML_EXPORT NodeIterator +class TDEHTML_EXPORT NodeIterator { friend class NodeIteratorImpl; friend class Document; @@ -181,7 +181,7 @@ protected: * an instance of it to the NodeFilter. For more details see the * CustomNodeFilter class */ -class KHTML_EXPORT NodeFilter +class TDEHTML_EXPORT NodeFilter { friend class NodeIterator; friend class NodeIteratorImpl; @@ -292,7 +292,7 @@ protected: * */ -class KHTML_EXPORT CustomNodeFilter : public DomShared { +class TDEHTML_EXPORT CustomNodeFilter : public DomShared { public: CustomNodeFilter(); virtual ~CustomNodeFilter(); @@ -336,7 +336,7 @@ protected: * how deeply nested the structure of the original document. * */ -class KHTML_EXPORT TreeWalker +class TDEHTML_EXPORT TreeWalker { friend class Document; friend class TreeWalkerImpl; diff --git a/tdehtml/dom/dom2_views.h b/tdehtml/dom/dom2_views.h index 6f326aaa3..dcba1cb40 100644 --- a/tdehtml/dom/dom2_views.h +++ b/tdehtml/dom/dom2_views.h @@ -38,7 +38,7 @@ class DOMString; * A base interface that all views shall derive from. * */ -class KHTML_EXPORT AbstractView { +class TDEHTML_EXPORT AbstractView { friend class Event; friend class UIEvent; friend class MouseEvent; diff --git a/tdehtml/dom/dom_doc.cpp b/tdehtml/dom/dom_doc.cpp index 0ff123444..b38a01401 100644 --- a/tdehtml/dom/dom_doc.cpp +++ b/tdehtml/dom/dom_doc.cpp @@ -438,7 +438,7 @@ void Document::setSelectedStylesheetSet(const DOMString& s) } -KHTMLView *Document::view() const +TDEHTMLView *Document::view() const { if (!impl) return 0; diff --git a/tdehtml/dom/dom_doc.h b/tdehtml/dom/dom_doc.h index 9a5331295..cef6692c5 100644 --- a/tdehtml/dom/dom_doc.h +++ b/tdehtml/dom/dom_doc.h @@ -32,8 +32,8 @@ #include #include -class KHTMLView; -class KHTMLPart; +class TDEHTMLView; +class TDEHTMLPart; namespace DOM { @@ -74,7 +74,7 @@ class HTMLDocument; * DOM Level 2 and newer provide means for creating documents directly, * which was not possible with DOM Level 1. */ -class KHTML_EXPORT DOMImplementation +class TDEHTML_EXPORT DOMImplementation { friend class Document; public: @@ -242,10 +242,10 @@ protected: * context they were created. * */ -class KHTML_EXPORT Document : public Node +class TDEHTML_EXPORT Document : public Node { - friend class ::KHTMLView; - friend class ::KHTMLPart; + friend class ::TDEHTMLView; + friend class ::TDEHTMLPart; friend class AbstractView; friend class DOMImplementation; friend class HTMLFrameElement; @@ -786,9 +786,9 @@ public: void removeStyleSheet(const StyleSheet &sheet); /** - * @return The KHTML view widget of this document. + * @return The TDEHTML view widget of this document. */ - KHTMLView *view() const; + TDEHTMLView *view() const; /** * Introduced in DOM Level 2 @@ -988,7 +988,7 @@ class DocumentFragmentImpl; * \c insertBefore() and \c appendChild() . * */ -class KHTML_EXPORT DocumentFragment : public Node +class TDEHTML_EXPORT DocumentFragment : public Node { friend class Document; friend class HTMLElementImpl; @@ -1025,7 +1025,7 @@ class DOMString; * nodes. * */ -class KHTML_EXPORT DocumentType : public Node +class TDEHTML_EXPORT DocumentType : public Node { friend class Document; friend class DOMImplementation; diff --git a/tdehtml/dom/dom_element.h b/tdehtml/dom/dom_element.h index d3313628e..8df181c17 100644 --- a/tdehtml/dom/dom_element.h +++ b/tdehtml/dom/dom_element.h @@ -86,7 +86,7 @@ class DocumentImpl; * unknown, there are no tokenized attribute values. * */ -class KHTML_EXPORT Attr : public Node +class TDEHTML_EXPORT Attr : public Node { friend class Element; friend class Document; @@ -207,7 +207,7 @@ class DOMString; * access an attribute value can safely be used as a convenience. * */ -class KHTML_EXPORT Element : public Node +class TDEHTML_EXPORT Element : public Node { friend class Document; friend class HTMLDocument; @@ -579,7 +579,7 @@ public: bool isHTMLElement() const; /** - * KHTML extension to DOM + * TDEHTML extension to DOM * This method returns the associated form element. * returns null if this element is not a form-like element * or if this elment is not in the scope of a form element. diff --git a/tdehtml/dom/dom_exception.h b/tdehtml/dom/dom_exception.h index cef032206..f4c4b4e75 100644 --- a/tdehtml/dom/dom_exception.h +++ b/tdehtml/dom/dom_exception.h @@ -54,7 +54,7 @@ namespace DOM { * the corresponding method descriptions. * */ -class KHTML_EXPORT DOMException +class TDEHTML_EXPORT DOMException { public: DOMException(unsigned short _code) { code = _code; } diff --git a/tdehtml/dom/dom_misc.h b/tdehtml/dom/dom_misc.h index 4cded0f00..494ab2704 100644 --- a/tdehtml/dom/dom_misc.h +++ b/tdehtml/dom/dom_misc.h @@ -33,7 +33,7 @@ namespace DOM { * Other objects should overload deleteMe() to fit their needs. The default * implementation deletes the object if the ref count drops to 0. */ -class KHTML_EXPORT DomShared +class TDEHTML_EXPORT DomShared { public: DomShared() : _ref( 0 ) {} diff --git a/tdehtml/dom/dom_node.h b/tdehtml/dom/dom_node.h index 594aa5e3e..b87997547 100644 --- a/tdehtml/dom/dom_node.h +++ b/tdehtml/dom/dom_node.h @@ -63,7 +63,7 @@ class Event; * imply that the DOM specifies an order to these Nodes. * */ -class KHTML_EXPORT NamedNodeMap +class TDEHTML_EXPORT NamedNodeMap { public: NamedNodeMap(); @@ -271,7 +271,7 @@ class NodeImpl; * mechanisms to get and set the relevant information. * */ -class KHTML_EXPORT Node +class TDEHTML_EXPORT Node { friend class NamedNodeMap; friend class NodeList; @@ -775,7 +775,7 @@ public: * * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. - * Note: KHTML will also raise this if setContent is called on things + * Note: TDEHTML will also raise this if setContent is called on things * that do not have child nodes. * * @since 3.5.7 @@ -928,7 +928,7 @@ class NodeListImpl; * integral index, starting from 0. * */ -class KHTML_EXPORT NodeList +class TDEHTML_EXPORT NodeList { friend class Element; friend class Node; diff --git a/tdehtml/dom/dom_string.h b/tdehtml/dom/dom_string.h index 3d4706b5a..a82d1018b 100644 --- a/tdehtml/dom/dom_string.h +++ b/tdehtml/dom/dom_string.h @@ -40,10 +40,10 @@ class DOMStringImpl; * that modifications to one instance will also modify all others. If you * wish to get a DOMString that is independent, use copy(). */ -class KHTML_EXPORT DOMString +class TDEHTML_EXPORT DOMString { friend class CharacterDataImpl; - friend KHTML_EXPORT bool operator==( const DOMString &a, const char *b ); + friend TDEHTML_EXPORT bool operator==( const DOMString &a, const char *b ); public: /** * default constructor. Gives an empty DOMString @@ -128,17 +128,17 @@ inline kndbgstream &operator<<(kndbgstream &stream, const DOMString &) { } #endif -KHTML_EXPORT bool operator==( const DOMString &a, const DOMString &b ); -KHTML_EXPORT bool operator==( const DOMString &a, const TQString &b ); -KHTML_EXPORT bool operator==( const DOMString &a, const char *b ); +TDEHTML_EXPORT bool operator==( const DOMString &a, const DOMString &b ); +TDEHTML_EXPORT bool operator==( const DOMString &a, const TQString &b ); +TDEHTML_EXPORT bool operator==( const DOMString &a, const char *b ); inline bool operator!=( const DOMString &a, const DOMString &b ) { return !(a==b); } inline bool operator!=( const DOMString &a, const TQString &b ) { return !(a==b); } inline bool operator!=( const DOMString &a, const char *b ) { return !(a==b); } inline bool strcmp( const DOMString &a, const DOMString &b ) { return a != b; } // returns false when equal, true otherwise (ignoring case) -KHTML_EXPORT bool strcasecmp( const DOMString &a, const DOMString &b ); -KHTML_EXPORT bool strcasecmp( const DOMString& a, const char* b ); +TDEHTML_EXPORT bool strcasecmp( const DOMString &a, const DOMString &b ); +TDEHTML_EXPORT bool strcasecmp( const DOMString& a, const char* b ); } #endif diff --git a/tdehtml/dom/dom_text.h b/tdehtml/dom/dom_text.h index c6f92fb1d..bc84f5902 100644 --- a/tdehtml/dom/dom_text.h +++ b/tdehtml/dom/dom_text.h @@ -46,7 +46,7 @@ class CharacterDataImpl; * offsets in this interface start from 0. * */ -class KHTML_EXPORT CharacterData : public Node +class TDEHTML_EXPORT CharacterData : public Node { friend class CharacterDataImpl; @@ -220,7 +220,7 @@ class CommentImpl; * the full SGML comment structure. * */ -class KHTML_EXPORT Comment : public CharacterData +class TDEHTML_EXPORT Comment : public CharacterData { friend class Document; friend class TextImpl; @@ -266,7 +266,7 @@ class TextImpl; * \c XPointers. * */ -class KHTML_EXPORT Text : public CharacterData +class TDEHTML_EXPORT Text : public CharacterData { friend class Document; friend class TextImpl; diff --git a/tdehtml/dom/dom_xml.h b/tdehtml/dom/dom_xml.h index 12e70d9e5..b2ef9f8e6 100644 --- a/tdehtml/dom/dom_xml.h +++ b/tdehtml/dom/dom_xml.h @@ -63,7 +63,7 @@ class ProcessingInstructionImpl; * merged by use of the Element.normalize() method. * */ -class KHTML_EXPORT CDATASection : public Text +class TDEHTML_EXPORT CDATASection : public Text { friend class Document; public: @@ -121,7 +121,7 @@ class DOMString; * An \c Entity node does not have any parent. * */ -class KHTML_EXPORT Entity : public Node +class TDEHTML_EXPORT Entity : public Node { public: Entity(); @@ -185,7 +185,7 @@ protected: * evaluation. * */ -class KHTML_EXPORT EntityReference : public Node +class TDEHTML_EXPORT EntityReference : public Node { friend class Document; public: @@ -219,7 +219,7 @@ class DOMString; * A \c Notation node does not have any parent. * */ -class KHTML_EXPORT Notation : public Node +class TDEHTML_EXPORT Notation : public Node { public: Notation(); @@ -256,7 +256,7 @@ protected: * processor-specific information in the text of the document. * */ -class KHTML_EXPORT ProcessingInstruction : public Node +class TDEHTML_EXPORT ProcessingInstruction : public Node { friend class Document; public: diff --git a/tdehtml/dom/html_base.h b/tdehtml/dom/html_base.h index c7ed878ce..1ff3fb825 100644 --- a/tdehtml/dom/html_base.h +++ b/tdehtml/dom/html_base.h @@ -47,7 +47,7 @@ class DOMString; * BODY element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLBodyElement : public HTMLElement +class TDEHTML_EXPORT HTMLBodyElement : public HTMLElement { public: HTMLBodyElement(); @@ -160,7 +160,7 @@ class DOMString; * FRAME element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLFrameElement : public HTMLElement +class TDEHTML_EXPORT HTMLFrameElement : public HTMLElement { public: HTMLFrameElement(); @@ -306,7 +306,7 @@ class DOMString; * FRAMESET element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLFrameSetElement : public HTMLElement +class TDEHTML_EXPORT HTMLFrameSetElement : public HTMLElement { public: HTMLFrameSetElement(); @@ -359,7 +359,7 @@ class HTMLIFrameElementImpl; * IFRAME element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLIFrameElement : public HTMLElement +class TDEHTML_EXPORT HTMLIFrameElement : public HTMLElement { public: HTMLIFrameElement(); @@ -533,7 +533,7 @@ class DOMString; * HEAD element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLHeadElement : public HTMLElement +class TDEHTML_EXPORT HTMLHeadElement : public HTMLElement { public: HTMLHeadElement(); @@ -574,7 +574,7 @@ class DOMString; * HTML element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLHtmlElement : public HTMLElement +class TDEHTML_EXPORT HTMLHtmlElement : public HTMLElement { public: HTMLHtmlElement(); diff --git a/tdehtml/dom/html_block.h b/tdehtml/dom/html_block.h index 4283bafa2..fc3963716 100644 --- a/tdehtml/dom/html_block.h +++ b/tdehtml/dom/html_block.h @@ -47,7 +47,7 @@ class DOMString; * BLOCKQUOTE element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLBlockquoteElement : public HTMLElement +class TDEHTML_EXPORT HTMLBlockquoteElement : public HTMLElement { public: HTMLBlockquoteElement(); @@ -88,7 +88,7 @@ class DOMString; * DIV element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLDivElement : public HTMLElement +class TDEHTML_EXPORT HTMLDivElement : public HTMLElement { public: HTMLDivElement(); @@ -130,7 +130,7 @@ class DOMString; * HR element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLHRElement : public HTMLElement +class TDEHTML_EXPORT HTMLHRElement : public HTMLElement { public: HTMLHRElement(); @@ -214,7 +214,7 @@ class DOMString; * H1 element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLHeadingElement : public HTMLElement +class TDEHTML_EXPORT HTMLHeadingElement : public HTMLElement { public: HTMLHeadingElement(); @@ -255,7 +255,7 @@ class DOMString; * element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLParagraphElement : public HTMLElement +class TDEHTML_EXPORT HTMLParagraphElement : public HTMLElement { public: HTMLParagraphElement(); @@ -296,7 +296,7 @@ class HTMLPreElementImpl; * PRE element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLPreElement : public HTMLElement +class TDEHTML_EXPORT HTMLPreElement : public HTMLElement { public: HTMLPreElement(); @@ -334,7 +334,7 @@ class HTMLLayerElementImpl; * Behaves mostly like absolute positioned DIV-blocks. * */ -class KHTML_EXPORT HTMLLayerElement : public HTMLElement +class TDEHTML_EXPORT HTMLLayerElement : public HTMLElement { public: HTMLLayerElement(); diff --git a/tdehtml/dom/html_document.cpp b/tdehtml/dom/html_document.cpp index c24bf65f7..0d0af0ab9 100644 --- a/tdehtml/dom/html_document.cpp +++ b/tdehtml/dom/html_document.cpp @@ -39,7 +39,7 @@ HTMLDocument::HTMLDocument() : Document(false) // create the impl here } -HTMLDocument::HTMLDocument(KHTMLView *parent) +HTMLDocument::HTMLDocument(TDEHTMLView *parent) : Document(false) // create the impl here { impl = DOMImplementationImpl::instance()->createHTMLDocument(parent); diff --git a/tdehtml/dom/html_document.h b/tdehtml/dom/html_document.h index aa53de96c..98a027297 100644 --- a/tdehtml/dom/html_document.h +++ b/tdehtml/dom/html_document.h @@ -35,8 +35,8 @@ #include -class KHTMLView; -class KHTMLPart; +class TDEHTMLView; +class TDEHTMLPart; namespace DOM { @@ -70,10 +70,10 @@ class HTMLElement; * * */ -class KHTML_EXPORT HTMLDocument : public Document +class TDEHTML_EXPORT HTMLDocument : public Document { - friend class ::KHTMLView; - friend class ::KHTMLPart; + friend class ::TDEHTMLView; + friend class ::TDEHTMLPart; friend class DOMImplementation; public: HTMLDocument(); @@ -82,7 +82,7 @@ public: * Rendering information (like sizes, etc...) is only created if * parent != 0 */ - HTMLDocument(KHTMLView *parent); + HTMLDocument(TDEHTMLView *parent); HTMLDocument(const HTMLDocument &other); HTMLDocument(const Node &other) : Document(false) {(*this)=other;} diff --git a/tdehtml/dom/html_element.h b/tdehtml/dom/html_element.h index 1329793b2..719223777 100644 --- a/tdehtml/dom/html_element.h +++ b/tdehtml/dom/html_element.h @@ -32,7 +32,7 @@ #include #include -class KHTMLView; +class TDEHTMLView; namespace DOM { @@ -66,10 +66,10 @@ class HTMLCollection; * interface is reserved for future usage. * */ -class KHTML_EXPORT HTMLElement : public Element +class TDEHTML_EXPORT HTMLElement : public Element { friend class HTMLDocument; - friend class ::KHTMLView; + friend class ::TDEHTMLView; friend class HTMLTableElement; friend class HTMLTableRowElement; friend class HTMLTableSectionElement; diff --git a/tdehtml/dom/html_form.h b/tdehtml/dom/html_form.h index 0623e421b..d0e20da73 100644 --- a/tdehtml/dom/html_form.h +++ b/tdehtml/dom/html_form.h @@ -47,7 +47,7 @@ class DOMString; * BUTTON element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLButtonElement : public HTMLElement +class TDEHTML_EXPORT HTMLButtonElement : public HTMLElement { public: HTMLButtonElement(); @@ -169,7 +169,7 @@ class HTMLFieldSetElementImpl; * FIELDSET element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLFieldSetElement : public HTMLElement +class TDEHTML_EXPORT HTMLFieldSetElement : public HTMLElement { public: HTMLFieldSetElement(); @@ -203,7 +203,7 @@ class HTMLFormElementImpl; * FORM element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLFormElement : public HTMLElement +class TDEHTML_EXPORT HTMLFormElement : public HTMLElement { friend class HTMLButtonElement; friend class HTMLFieldSetElement; @@ -346,7 +346,7 @@ class HTMLInputElementImpl; * INPUT element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLInputElement : public HTMLElement +class TDEHTML_EXPORT HTMLInputElement : public HTMLElement { public: HTMLInputElement(); @@ -707,7 +707,7 @@ class HTMLLabelElementImpl; * LABEL element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLLabelElement : public HTMLElement +class TDEHTML_EXPORT HTMLLabelElement : public HTMLElement { public: HTMLLabelElement(); @@ -762,7 +762,7 @@ class HTMLLegendElementImpl; * LEGEND element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLLegendElement : public HTMLElement +class TDEHTML_EXPORT HTMLLegendElement : public HTMLElement { public: HTMLLegendElement(); @@ -821,7 +821,7 @@ class HTMLOptGroupElementImpl; * OPTGROUP element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLOptGroupElement : public HTMLElement +class TDEHTML_EXPORT HTMLOptGroupElement : public HTMLElement { public: HTMLOptGroupElement(); @@ -875,7 +875,7 @@ class HTMLSelectElementImpl; * SELECT element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLSelectElement : public HTMLElement +class TDEHTML_EXPORT HTMLSelectElement : public HTMLElement { public: HTMLSelectElement(); @@ -1051,7 +1051,7 @@ class HTMLTextAreaElementImpl; * TEXTAREA element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTextAreaElement : public HTMLElement +class TDEHTML_EXPORT HTMLTextAreaElement : public HTMLElement { public: HTMLTextAreaElement(); @@ -1266,7 +1266,7 @@ class HTMLOptionElementImpl; * OPTION element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLOptionElement : public HTMLElement +class TDEHTML_EXPORT HTMLOptionElement : public HTMLElement { public: HTMLOptionElement(); @@ -1386,7 +1386,7 @@ class HTMLFormElement; * deprecated in HTML 4.0. * */ -class KHTML_EXPORT HTMLIsIndexElement : public HTMLElement +class TDEHTML_EXPORT HTMLIsIndexElement : public HTMLElement { public: HTMLIsIndexElement(); diff --git a/tdehtml/dom/html_head.h b/tdehtml/dom/html_head.h index e8dc52d21..08bd1bc1c 100644 --- a/tdehtml/dom/html_head.h +++ b/tdehtml/dom/html_head.h @@ -43,7 +43,7 @@ class DOMString; * BASE element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLBaseElement : public HTMLElement +class TDEHTML_EXPORT HTMLBaseElement : public HTMLElement { public: HTMLBaseElement(); @@ -98,7 +98,7 @@ class HTMLLinkElementImpl; * LINK element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLLinkElement : public HTMLElement +class TDEHTML_EXPORT HTMLLinkElement : public HTMLElement { public: HTMLLinkElement(); @@ -253,7 +253,7 @@ class HTMLMetaElementImpl; * META element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLMetaElement : public HTMLElement +class TDEHTML_EXPORT HTMLMetaElement : public HTMLElement { public: HTMLMetaElement(); @@ -332,7 +332,7 @@ class HTMLScriptElementImpl; * SCRIPT element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLScriptElement : public HTMLElement +class TDEHTML_EXPORT HTMLScriptElement : public HTMLElement { public: HTMLScriptElement(); @@ -446,7 +446,7 @@ class HTMLStyleElementImpl; * STYLE element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLStyleElement : public HTMLElement +class TDEHTML_EXPORT HTMLStyleElement : public HTMLElement { public: HTMLStyleElement(); @@ -519,7 +519,7 @@ class HTMLTitleElementImpl; * TITLE element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTitleElement : public HTMLElement +class TDEHTML_EXPORT HTMLTitleElement : public HTMLElement { public: HTMLTitleElement(); diff --git a/tdehtml/dom/html_image.h b/tdehtml/dom/html_image.h index 9f30aaa14..8258d7a63 100644 --- a/tdehtml/dom/html_image.h +++ b/tdehtml/dom/html_image.h @@ -44,7 +44,7 @@ class DOMString; * AREA element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLAreaElement : public HTMLElement +class TDEHTML_EXPORT HTMLAreaElement : public HTMLElement { public: HTMLAreaElement(); @@ -182,7 +182,7 @@ class HTMLImageElementImpl; * IMG element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLImageElement : public HTMLElement +class TDEHTML_EXPORT HTMLImageElement : public HTMLElement { public: HTMLImageElement(); @@ -390,7 +390,7 @@ class DOMString; * MAP element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLMapElement : public HTMLElement +class TDEHTML_EXPORT HTMLMapElement : public HTMLElement { public: HTMLMapElement(); diff --git a/tdehtml/dom/html_inline.h b/tdehtml/dom/html_inline.h index f92ed6917..322282d1f 100644 --- a/tdehtml/dom/html_inline.h +++ b/tdehtml/dom/html_inline.h @@ -44,7 +44,7 @@ class DOMString; * element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLAnchorElement : public HTMLElement +class TDEHTML_EXPORT HTMLAnchorElement : public HTMLElement { public: HTMLAnchorElement(); @@ -256,7 +256,7 @@ class HTMLBRElementImpl; * element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLBRElement : public HTMLElement +class TDEHTML_EXPORT HTMLBRElement : public HTMLElement { public: HTMLBRElement(); @@ -299,7 +299,7 @@ class DOMString; * deprecated in HTML 4.0. * */ -class KHTML_EXPORT HTMLFontElement : public HTMLElement +class TDEHTML_EXPORT HTMLFontElement : public HTMLElement { public: HTMLFontElement(); @@ -369,7 +369,7 @@ class DOMString; * DEL element definitions in HTML 4.0. * */ -class KHTML_EXPORT HTMLModElement : public HTMLElement +class TDEHTML_EXPORT HTMLModElement : public HTMLElement { public: HTMLModElement(); @@ -427,7 +427,7 @@ class HTMLQuoteElementImpl; * element. To resolve ambiquities, we use this one for the \c Q * element only. */ -class KHTML_EXPORT HTMLQuoteElement : public HTMLElement +class TDEHTML_EXPORT HTMLQuoteElement : public HTMLElement { public: HTMLQuoteElement(); diff --git a/tdehtml/dom/html_list.h b/tdehtml/dom/html_list.h index 34c081cb5..59328ec26 100644 --- a/tdehtml/dom/html_list.h +++ b/tdehtml/dom/html_list.h @@ -49,7 +49,7 @@ class DOMString; * DL element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLDListElement : public HTMLElement +class TDEHTML_EXPORT HTMLDListElement : public HTMLElement { public: HTMLDListElement(); @@ -89,7 +89,7 @@ public: * in HTML 4.0. * */ -class KHTML_EXPORT HTMLDirectoryElement : public HTMLElement +class TDEHTML_EXPORT HTMLDirectoryElement : public HTMLElement { public: HTMLDirectoryElement(); @@ -128,7 +128,7 @@ public: * LI element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLLIElement : public HTMLElement +class TDEHTML_EXPORT HTMLLIElement : public HTMLElement { public: HTMLLIElement(); @@ -183,7 +183,7 @@ public: * deprecated in HTML 4.0. * */ -class KHTML_EXPORT HTMLMenuElement : public HTMLElement +class TDEHTML_EXPORT HTMLMenuElement : public HTMLElement { public: HTMLMenuElement(); @@ -223,7 +223,7 @@ public: * OL element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLOListElement : public HTMLElement +class TDEHTML_EXPORT HTMLOListElement : public HTMLElement { public: HTMLOListElement(); @@ -291,7 +291,7 @@ public: * UL element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLUListElement : public HTMLElement +class TDEHTML_EXPORT HTMLUListElement : public HTMLElement { public: HTMLUListElement(); diff --git a/tdehtml/dom/html_misc.h b/tdehtml/dom/html_misc.h index 643e5caf6..9cb6dc976 100644 --- a/tdehtml/dom/html_misc.h +++ b/tdehtml/dom/html_misc.h @@ -45,7 +45,7 @@ class HTMLCollectionImpl; * deprecated in HTML 4.0. * */ -class KHTML_EXPORT HTMLBaseFontElement : public HTMLElement +class TDEHTML_EXPORT HTMLBaseFontElement : public HTMLElement { public: HTMLBaseFontElement(); @@ -123,7 +123,7 @@ public: * automatically updated when the underlying document is changed. * */ -class KHTML_EXPORT HTMLCollection +class TDEHTML_EXPORT HTMLCollection { friend class HTMLDocument; friend class HTMLSelectElement; @@ -201,7 +201,7 @@ protected: HTMLCollectionImpl *impl; }; -class KHTML_EXPORT HTMLFormCollection : public HTMLCollection +class TDEHTML_EXPORT HTMLFormCollection : public HTMLCollection { friend class HTMLFormElement; protected: @@ -211,7 +211,7 @@ protected: /** @internal. Not part of the public API */ -class KHTML_EXPORT HTMLMappedNameCollection : public HTMLCollection +class TDEHTML_EXPORT HTMLMappedNameCollection : public HTMLCollection { public: HTMLMappedNameCollection(NodeImpl *base, int type, const DOMString &name ); diff --git a/tdehtml/dom/html_object.h b/tdehtml/dom/html_object.h index 9195a40f7..56c592fa3 100644 --- a/tdehtml/dom/html_object.h +++ b/tdehtml/dom/html_object.h @@ -47,7 +47,7 @@ class HTMLAppletElementImpl; * deprecated in HTML 4.0. * */ -class KHTML_EXPORT HTMLAppletElement : public HTMLElement +class TDEHTML_EXPORT HTMLAppletElement : public HTMLElement { public: HTMLAppletElement(); @@ -255,7 +255,7 @@ class HTMLObjectElementImpl; * OBJECT element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLObjectElement : public HTMLElement +class TDEHTML_EXPORT HTMLObjectElement : public HTMLElement { public: HTMLObjectElement(); @@ -554,7 +554,7 @@ class HTMLParamElementImpl; * PARAM element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLParamElement : public HTMLElement +class TDEHTML_EXPORT HTMLParamElement : public HTMLElement { public: HTMLParamElement(); diff --git a/tdehtml/dom/html_table.h b/tdehtml/dom/html_table.h index 6b9a2d99d..fdc1119cb 100644 --- a/tdehtml/dom/html_table.h +++ b/tdehtml/dom/html_table.h @@ -44,7 +44,7 @@ class DOMString; * CAPTION element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTableCaptionElement : public HTMLElement +class TDEHTML_EXPORT HTMLTableCaptionElement : public HTMLElement { friend class HTMLTableElement; @@ -88,7 +88,7 @@ class HTMLTableCellElementImpl; * TD element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTableCellElement : public HTMLElement +class TDEHTML_EXPORT HTMLTableCellElement : public HTMLElement { friend class HTMLTableElement; @@ -319,7 +319,7 @@ class HTMLTableColElementImpl; * COL element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTableColElement : public HTMLElement +class TDEHTML_EXPORT HTMLTableColElement : public HTMLElement { friend class HTMLTableElement; @@ -438,7 +438,7 @@ class DOMString; * TABLE element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTableElement : public HTMLElement +class TDEHTML_EXPORT HTMLTableElement : public HTMLElement { public: HTMLTableElement(); @@ -722,7 +722,7 @@ class DOMString; * TR element definition in HTML 4.0. * */ -class KHTML_EXPORT HTMLTableRowElement : public HTMLElement +class TDEHTML_EXPORT HTMLTableRowElement : public HTMLElement { friend class HTMLTableElement; @@ -892,7 +892,7 @@ class DOMString; * elements. * */ -class KHTML_EXPORT HTMLTableSectionElement : public HTMLElement +class TDEHTML_EXPORT HTMLTableSectionElement : public HTMLElement { friend class HTMLTableElement; diff --git a/tdehtml/domtreeview.cpp b/tdehtml/domtreeview.cpp index 7482c7b81..5bff83e72 100644 --- a/tdehtml/domtreeview.cpp +++ b/tdehtml/domtreeview.cpp @@ -19,7 +19,7 @@ #include "domtreeview.moc" #include "xml/dom_nodeimpl.h" -DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name) +DOMTreeView::DOMTreeView(TQWidget *parent, TDEHTMLPart *currentpart, const char * name) : KListView(parent, name) { setCaption(name); setRootIsDecorated(true); diff --git a/tdehtml/domtreeview.h b/tdehtml/domtreeview.h index ef3d45c44..93baa8f61 100644 --- a/tdehtml/domtreeview.h +++ b/tdehtml/domtreeview.h @@ -28,7 +28,7 @@ class DOMTreeView : public KListView { Q_OBJECT public: - DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0); + DOMTreeView(TQWidget *parent, TDEHTMLPart *part, const char * name = 0); ~DOMTreeView(); void recursive(const DOM::Node &pNode, const DOM::Node &node); @@ -47,7 +47,7 @@ class DOMTreeView : public KListView TQPtrDict m_nodedict; DOM::Node document; - KHTMLPart *part; + TDEHTMLPart *part; }; diff --git a/tdehtml/ecma/README b/tdehtml/ecma/README index 4c341699a..f44d663a0 100644 --- a/tdehtml/ecma/README +++ b/tdehtml/ecma/README @@ -1,7 +1,7 @@ This module contains the ECMAScript a.k.a. JavaScript language bindings for -the KHTML Part. +the TDEHTML Part. -The module is loaded into KHTML's address space on demand. +The module is loaded into TDEHTML's address space on demand. To test the non-HTML DOM functions you may compile a little interactive interpreter called 'testecma' with 'make check' (see testecma.cpp for diff --git a/tdehtml/ecma/kjs_binding.cpp b/tdehtml/ecma/kjs_binding.cpp index 09961fbb5..d9f0b7b25 100644 --- a/tdehtml/ecma/kjs_binding.cpp +++ b/tdehtml/ecma/kjs_binding.cpp @@ -232,7 +232,7 @@ bool ScriptInterpreter::isWindowOpenAllowed() const bool eventOk = ( // mouse events id == DOM::EventImpl::CLICK_EVENT || id == DOM::EventImpl::MOUSEUP_EVENT || id == DOM::EventImpl::MOUSEDOWN_EVENT || - id == DOM::EventImpl::KHTML_ECMA_CLICK_EVENT || id == DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT || + id == DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT || id == DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT || // keyboard events id == DOM::EventImpl::KEYDOWN_EVENT || id == DOM::EventImpl::KEYPRESS_EVENT || id == DOM::EventImpl::KEYUP_EVENT || diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp index 47921fb2a..ec794b8d2 100644 --- a/tdehtml/ecma/kjs_debugwin.cpp +++ b/tdehtml/ecma/kjs_debugwin.cpp @@ -249,12 +249,12 @@ KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0; TQString SourceFile::getCode() { if (interpreter) { - KHTMLPart *part = ::tqqt_cast(static_cast(interpreter)->part()); - if (part && url == part->url().url() && KHTMLPageCache::self()->isValid(part->cacheId())) { + TDEHTMLPart *part = ::tqqt_cast(static_cast(interpreter)->part()); + if (part && url == part->url().url() && TDEHTMLPageCache::self()->isValid(part->cacheId())) { Decoder *decoder = part->createDecoder(); TQByteArray data; TQDataStream stream(data,IO_WriteOnly); - KHTMLPageCache::self()->saveData(part->cacheId(),&stream); + TDEHTMLPageCache::self()->saveData(part->cacheId(),&stream); TQString str; if (data.size() == 0) str = ""; @@ -721,7 +721,7 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId, KParts::ReadOnlyPart *part = static_cast(exec->interpreter())->part(); if (m_nextSourceUrl == part->url().url()) { // Only store the code here if it's not from the part's html page... in that - // case we can get it from KHTMLPageCache + // case we can get it from TDEHTMLPageCache code = TQString::null; } @@ -805,7 +805,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch return true; KParts::ReadOnlyPart *part = static_cast(exec->interpreter())->part(); - KHTMLPart *tdehtmlpart = ::tqqt_cast(part); + TDEHTMLPart *tdehtmlpart = ::tqqt_cast(part); if (tdehtmlpart && !tdehtmlpart->settings()->isJavaScriptErrorReportingEnabled()) return true; diff --git a/tdehtml/ecma/kjs_dom.cpp b/tdehtml/ecma/kjs_dom.cpp index 71e91d7ef..77d4983da 100644 --- a/tdehtml/ecma/kjs_dom.cpp +++ b/tdehtml/ecma/kjs_dom.cpp @@ -265,11 +265,11 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const case OnChange: return getListener(DOM::EventImpl::CHANGE_EVENT); case OnClick: - return getListener(DOM::EventImpl::KHTML_ECMA_CLICK_EVENT); + return getListener(DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT); case OnDblClick: - return getListener(DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT); + return getListener(DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT); case OnDragDrop: - return getListener(DOM::EventImpl::KHTML_DRAGDROP_EVENT); + return getListener(DOM::EventImpl::TDEHTML_DRAGDROP_EVENT); case OnError: return getListener(DOM::EventImpl::ERROR_EVENT); case OnFocus: @@ -293,7 +293,7 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const case OnMouseUp: return getListener(DOM::EventImpl::MOUSEUP_EVENT); case OnMove: - return getListener(DOM::EventImpl::KHTML_MOVE_EVENT); + return getListener(DOM::EventImpl::TDEHTML_MOVE_EVENT); case OnReset: return getListener(DOM::EventImpl::RESET_EVENT); case OnResize: @@ -409,13 +409,13 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i setListener(exec,DOM::EventImpl::CHANGE_EVENT,value); break; case OnClick: - setListener(exec,DOM::EventImpl::KHTML_ECMA_CLICK_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT,value); break; case OnDblClick: - setListener(exec,DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT,value); break; case OnDragDrop: - setListener(exec,DOM::EventImpl::KHTML_DRAGDROP_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_DRAGDROP_EVENT,value); break; case OnError: setListener(exec,DOM::EventImpl::ERROR_EVENT,value); @@ -451,7 +451,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i setListener(exec,DOM::EventImpl::MOUSEUP_EVENT,value); break; case OnMove: - setListener(exec,DOM::EventImpl::KHTML_MOVE_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_MOVE_EVENT,value); break; case OnReset: setListener(exec,DOM::EventImpl::RESET_EVENT,value); @@ -949,7 +949,7 @@ Value DOMDocument::getValueProperty(ExecState *exec, int token) const return getDOMStyleSheetList(exec, doc.styleSheets(), doc); case DOMDocument::DefaultView: // DOM2 { - KHTMLView *view = node.handle()->getDocument()->view(); + TDEHTMLView *view = node.handle()->getDocument()->view(); if (view) return Window::retrieve(view->part()); return getDOMAbstractView(exec, doc.defaultView()); @@ -963,7 +963,7 @@ Value DOMDocument::getValueProperty(ExecState *exec, int token) const DOM::DocumentImpl* docimpl = node.handle()->getDocument(); if ( docimpl && docimpl->view() ) { - KHTMLPart* part = docimpl->view()->part(); + TDEHTMLPart* part = docimpl->view()->part(); if ( part ) { if (part->d->m_bComplete) return String("complete"); if (docimpl->parsing()) return String("loading"); @@ -1088,7 +1088,7 @@ Value DOMDocumentProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List Window* active = Window::retrieveActive(exec); // Complete the URL using the "active part" (running interpreter). We do this for the security // check and to make sure we load exactly the same url as we have verified to be safe - KHTMLPart *tdehtmlpart = ::tqqt_cast(active->part()); + TDEHTMLPart *tdehtmlpart = ::tqqt_cast(active->part()); if (tdehtmlpart) { // Security: only allow documents to be loaded from the same host TQString dstUrl = tdehtmlpart->htmlDocument().completeURL(s).string(); @@ -1274,7 +1274,7 @@ Value DOMDOMImplementationProtoFunc::tryCall(ExecState *exec, Object &thisObj, c case DOMDOMImplementation::CreateDocument: { // DOM2 // Initially set the URL to document of the creator... this is so that it resides in the same // host/domain for security checks. The URL will be updated if Document.load() is called. - KHTMLPart *part = ::tqqt_cast(static_cast(exec->interpreter())->part()); + TDEHTMLPart *part = ::tqqt_cast(static_cast(exec->interpreter())->part()); if (part) { Document doc = implementation.createDocument(args[0].toString(exec).string(),args[1].toString(exec).string(),toNode(args[2])); KURL url = static_cast(part->document().handle())->URL(); @@ -1526,7 +1526,7 @@ bool checkNodeSecurity(ExecState *exec, const DOM::Node& n) // Check to see if the currently executing interpreter is allowed to access the specified node if (n.isNull()) return true; - KHTMLView *view = n.handle()->getDocument()->view(); + TDEHTMLView *view = n.handle()->getDocument()->view(); Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L; if ( !win || !win->isSafeScript(exec) ) return false; diff --git a/tdehtml/ecma/kjs_events.cpp b/tdehtml/ecma/kjs_events.cpp index 7b6ff3cc1..acf88f89a 100644 --- a/tdehtml/ecma/kjs_events.cpp +++ b/tdehtml/ecma/kjs_events.cpp @@ -63,7 +63,7 @@ void JSEventListener::handleEvent(DOM::Event &evt) if (KJSDebugWin::debugWindow() && KJSDebugWin::debugWindow()->inSession()) return; #endif - KHTMLPart *part = ::tqqt_cast(static_cast(win.imp())->part()); + TDEHTMLPart *part = ::tqqt_cast(static_cast(win.imp())->part()); KJSProxy *proxy = 0L; if (part) proxy = part->jScript(); @@ -163,7 +163,7 @@ Object JSLazyEventListener::listenerObj() const void JSLazyEventListener::parseCode() const { if (!parsed) { - KHTMLPart *part = ::tqqt_cast(static_cast(win.imp())->part()); + TDEHTMLPart *part = ::tqqt_cast(static_cast(win.imp())->part()); KJSProxy *proxy = 0L; if (part) proxy = part->jScript(); diff --git a/tdehtml/ecma/kjs_html.cpp b/tdehtml/ecma/kjs_html.cpp index 37fd70754..8a63ba943 100644 --- a/tdehtml/ecma/kjs_html.cpp +++ b/tdehtml/ecma/kjs_html.cpp @@ -98,7 +98,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List case HTMLDocument::Open: if (args.size() >= 3) // IE extension for document.open: it means window.open if it has 3 args or more { - KHTMLView *view = static_cast(doc.handle())->view(); + TDEHTMLView *view = static_cast(doc.handle())->view(); if ( view && view->part() ) { Window* win = Window::retrieveWindow(view->part()); if( win ) { @@ -133,7 +133,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List case HTMLDocument::GetSelection: { // NS4 and Mozilla specific. IE uses document.selection.createRange() // http://docs.sun.com/source/816-6408-10/document.htm#1195981 - KHTMLView *view = static_cast(doc.handle())->view(); + TDEHTMLView *view = static_cast(doc.handle())->view(); if ( view && view->part() ) return String(view->part()->selectedText()); else @@ -199,7 +199,7 @@ bool KJS::HTMLDocument::hasProperty(ExecState *exec, const Identifier &p) const #endif DOM::HTMLDocument doc = static_cast(node); DOM::DocumentImpl* docImpl = static_cast(doc.handle()); - KHTMLView *view = docImpl->view(); + TDEHTMLView *view = docImpl->view(); Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L; if ( !win || !win->isSafeScript(exec) ) return false; @@ -210,7 +210,7 @@ bool KJS::HTMLDocument::hasProperty(ExecState *exec, const Identifier &p) const if ( view && view->part() ) { - KHTMLPart *kp = view->part()->findFrame( p.qstring() ); + TDEHTMLPart *kp = view->part()->findFrame( p.qstring() ); if (kp) return true; } @@ -226,7 +226,7 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName) DOM::HTMLDocument doc = static_cast(node); DOM::DocumentImpl* docImpl = static_cast(doc.handle()); - KHTMLView *view = docImpl->view(); + TDEHTMLView *view = docImpl->view(); Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L; if ( !win || !win->isSafeScript(exec) ) @@ -261,7 +261,7 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName) { // ###### TODO return a collection in case several frames have the same name // (IE does that). Hard to do with findFrame :} - KHTMLPart *kp = view->part()->findFrame( propertyName.qstring() ); + TDEHTMLPart *kp = view->part()->findFrame( propertyName.qstring() ); if (kp) return Window::retrieve(kp); } @@ -356,7 +356,7 @@ void KJS::HTMLDocument::tryPut(ExecState *exec, const Identifier &propertyName, #ifdef KJS_VERBOSE kdDebug(6070) << "KJS::HTMLDocument::tryPut " << propertyName.qstring() << endl; #endif - KHTMLView *view = static_cast(node.handle())->view(); + TDEHTMLView *view = static_cast(node.handle())->view(); Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L; if ( !win || !win->isSafeScript(exec) ) @@ -394,7 +394,7 @@ void KJS::HTMLDocument::putValueProperty(ExecState *exec, int token, const Value break; case Location: { - KHTMLView *view = static_cast(doc.handle())->view(); + TDEHTMLView *view = static_cast(doc.handle())->view(); if ( view ) Window::retrieveWindow(view->part())->goURL(exec, value.toString(exec).qstring(), false /*don't lock history*/); break; @@ -1127,7 +1127,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const static KParts::LiveConnectExtension *getLiveConnectExtension(const DOM::HTMLElement & element) { DOM::HTMLDocument doc = element.ownerDocument(); - KHTMLView *view = static_cast(doc.handle())->view(); + TDEHTMLView *view = static_cast(doc.handle())->view(); if (view && element.handle()) return view->part()->liveConnectExtension(static_cast(element.handle()->renderer())); return 0L; @@ -1870,7 +1870,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const case FrameContentDocument: return checkNodeSecurity(exec,frameElement.contentDocument()) ? getDOMNode(exec, frameElement.contentDocument()) : Undefined(); case FrameContentWindow: { - KHTMLPart* part = static_cast(frameElement.handle())->contentPart(); + TDEHTMLPart* part = static_cast(frameElement.handle())->contentPart(); if (part) { Window *w = Window::retrieveWindow(part); if (w) @@ -1905,7 +1905,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const case IFrameContentDocument: return checkNodeSecurity(exec,iFrame.contentDocument()) ? getDOMNode(exec, iFrame.contentDocument()) : Undefined(); case IFrameContentWindow: { - KHTMLPart* part = static_cast(iFrame.handle())->contentPart(); + TDEHTMLPart* part = static_cast(iFrame.handle())->contentPart(); if (part) { Window *w = Window::retrieveWindow(part); if (w) @@ -2123,14 +2123,14 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const DOM::HTMLDocument doc = element.ownerDocument(); - KHTMLView *view = static_cast(doc.handle())->view(); - KHTMLSettings::KJSWindowOpenPolicy policy = KHTMLSettings::KJSWindowOpenAllow; + TDEHTMLView *view = static_cast(doc.handle())->view(); + TDEHTMLSettings::KJSWindowOpenPolicy policy = TDEHTMLSettings::KJSWindowOpenAllow; if (view) policy = view->part()->settings()->windowOpenPolicy(view->part()->url().host()); bool block = false; - if ( policy != KHTMLSettings::KJSWindowOpenAllow ) { + if ( policy != TDEHTMLSettings::KJSWindowOpenAllow ) { block = true; // if this is a form without a target, or a special target, don't block @@ -2146,7 +2146,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const if (!view->part()->url().host().isEmpty()) caption = view->part()->url().host() + " - "; // search all (possibly nested) framesets - KHTMLPart *currentPart = view->part()->parentPart(); + TDEHTMLPart *currentPart = view->part()->parentPart(); while( currentPart != 0L ) { if( currentPart->frameExists( form.target().string() ) ) block = false; @@ -2154,7 +2154,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const } } - if ( block && policy == KHTMLSettings::KJSWindowOpenAsk && view ) { + if ( block && policy == TDEHTMLSettings::KJSWindowOpenAsk && view ) { if (view && view->part()) emit view->part()->browserExtension()->requestFocus(view->part()); caption += i18n( "Confirmation: JavaScript Popup" ); @@ -2167,7 +2167,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const caption, i18n("Allow"), i18n("Do Not Allow") ) == KMessageBox::Yes ) block = false; - } else if ( block && policy == KHTMLSettings::KJSWindowOpenSmart ) { + } else if ( block && policy == TDEHTMLSettings::KJSWindowOpenSmart ) { if( static_cast(exec->interpreter())->isWindowOpenAllowed() ) { // This submission has been triggered by the user block = false; diff --git a/tdehtml/ecma/kjs_mozilla.cpp b/tdehtml/ecma/kjs_mozilla.cpp index 216fde26e..6fc7688dd 100644 --- a/tdehtml/ecma/kjs_mozilla.cpp +++ b/tdehtml/ecma/kjs_mozilla.cpp @@ -40,7 +40,7 @@ const ClassInfo MozillaSidebarExtension::info = { "sidebar", 0, &MozillaSidebarE } IMPLEMENT_PROTOFUNC_DOM(MozillaSidebarExtensionFunc) -MozillaSidebarExtension::MozillaSidebarExtension(ExecState *exec, KHTMLPart *p) +MozillaSidebarExtension::MozillaSidebarExtension(ExecState *exec, TDEHTMLPart *p) : ObjectImp(exec->interpreter()->builtinObjectPrototype()), m_part(p) { } Value MozillaSidebarExtension::get(ExecState *exec, const Identifier &propertyName) const @@ -66,7 +66,7 @@ Value MozillaSidebarExtensionFunc::tryCall(ExecState *exec, Object &thisObj, con KJS_CHECK_THIS( KJS::MozillaSidebarExtension, thisObj ); MozillaSidebarExtension *mse = static_cast(thisObj.imp()); - KHTMLPart *part = mse->part(); + TDEHTMLPart *part = mse->part(); if (!part) return Undefined(); diff --git a/tdehtml/ecma/kjs_mozilla.h b/tdehtml/ecma/kjs_mozilla.h index 220094f63..112af1315 100644 --- a/tdehtml/ecma/kjs_mozilla.h +++ b/tdehtml/ecma/kjs_mozilla.h @@ -23,21 +23,21 @@ #include -class KHTMLPart; +class TDEHTMLPart; namespace KJS { class MozillaSidebarExtension : public ObjectImp { public: - MozillaSidebarExtension(ExecState *exec, KHTMLPart *p); + MozillaSidebarExtension(ExecState *exec, TDEHTMLPart *p); virtual Value get(ExecState *exec, const Identifier &propertyName) const; Value getValueProperty(ExecState *exec, int token) const; virtual const ClassInfo* classInfo() const { return &info; } static const ClassInfo info; enum { addPanel }; - KHTMLPart *part() const { return m_part; } + TDEHTMLPart *part() const { return m_part; } private: - KHTMLPart *m_part; + TDEHTMLPart *m_part; }; } // namespace diff --git a/tdehtml/ecma/kjs_navigator.cpp b/tdehtml/ecma/kjs_navigator.cpp index 22d5f9cb7..5934afd3e 100644 --- a/tdehtml/ecma/kjs_navigator.cpp +++ b/tdehtml/ecma/kjs_navigator.cpp @@ -165,7 +165,7 @@ const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 }; */ IMPLEMENT_PROTOFUNC_DOM(NavigatorFunc) -Navigator::Navigator(ExecState *exec, KHTMLPart *p) +Navigator::Navigator(ExecState *exec, TDEHTMLPart *p) : ObjectImp(exec->interpreter()->builtinObjectPrototype()), m_part(p) { } Value Navigator::get(ExecState *exec, const Identifier &propertyName) const diff --git a/tdehtml/ecma/kjs_navigator.h b/tdehtml/ecma/kjs_navigator.h index ccd1ba63b..9298b3761 100644 --- a/tdehtml/ecma/kjs_navigator.h +++ b/tdehtml/ecma/kjs_navigator.h @@ -23,13 +23,13 @@ #include -class KHTMLPart; +class TDEHTMLPart; namespace KJS { class Navigator : public ObjectImp { public: - Navigator(ExecState *exec, KHTMLPart *p); + Navigator(ExecState *exec, TDEHTMLPart *p); virtual Value get(ExecState *exec, const Identifier &propertyName) const; Value getValueProperty(ExecState *exec, int token) const; virtual const ClassInfo* classInfo() const { return &info; } @@ -37,9 +37,9 @@ namespace KJS { enum { AppCodeName, AppName, AppVersion, Language, UserAgent, UserLanguage, Platform, _Plugins, _MimeTypes, Product, ProductSub, Vendor, CookieEnabled, JavaEnabled, BrowserLanguage, CpuClass }; - KHTMLPart *part() const { return m_part; } + TDEHTMLPart *part() const { return m_part; } private: - KHTMLPart *m_part; + TDEHTMLPart *m_part; }; // Hashtable enums diff --git a/tdehtml/ecma/kjs_proxy.cpp b/tdehtml/ecma/kjs_proxy.cpp index cc7afa00a..578cd30f0 100644 --- a/tdehtml/ecma/kjs_proxy.cpp +++ b/tdehtml/ecma/kjs_proxy.cpp @@ -355,7 +355,7 @@ void KJSProxyImpl::applyUserAgent() // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 && userAgent.find(TQString::fromLatin1("compatible")) == -1 && - userAgent.find(TQString::fromLatin1("KHTML")) == -1) + userAgent.find(TQString::fromLatin1("TDEHTML")) == -1) { m_script->setCompatMode(Interpreter::NetscapeCompat); #ifdef KJS_VERBOSE @@ -365,8 +365,8 @@ void KJSProxyImpl::applyUserAgent() } // Helper method, so that all classes which need jScript() don't need to be added -// as friend to KHTMLPart -KJSProxy * KJSProxy::proxy( KHTMLPart *part ) +// as friend to TDEHTMLPart +KJSProxy * KJSProxy::proxy( TDEHTMLPart *part ) { return part->jScript(); } @@ -402,7 +402,7 @@ void KJSCPUGuard::stop() bool KJSCPUGuard::confirmTerminate() { kdDebug(6070) << "alarmhandler" << endl; - return KMessageBox::warningYesNo(0L, i18n("A script on this page is causing KHTML to freeze. If it continues to run, other applications may become less responsive.\nDo you want to abort the script?"), i18n("JavaScript"), i18n("&Abort"), KStdGuiItem::cont(), "kjscupguard_alarmhandler") == KMessageBox::Yes; + return KMessageBox::warningYesNo(0L, i18n("A script on this page is causing TDEHTML to freeze. If it continues to run, other applications may become less responsive.\nDo you want to abort the script?"), i18n("JavaScript"), i18n("&Abort"), KStdGuiItem::cont(), "kjscupguard_alarmhandler") == KMessageBox::Yes; } void KJSCPUGuard::alarmHandler(int) { diff --git a/tdehtml/ecma/kjs_proxy.h b/tdehtml/ecma/kjs_proxy.h index 5ea2d5bf6..bac9e9579 100644 --- a/tdehtml/ecma/kjs_proxy.h +++ b/tdehtml/ecma/kjs_proxy.h @@ -26,7 +26,7 @@ #include #include -class KHTMLPart; +class TDEHTMLPart; namespace DOM { class Node; @@ -72,8 +72,8 @@ public: tdehtml::ChildFrame *m_frame; int m_handlerLineno; - // Helper method, to access the private KHTMLPart::jScript() - static KJSProxy *proxy( KHTMLPart *part ); + // Helper method, to access the private TDEHTMLPart::jScript() + static KJSProxy *proxy( TDEHTMLPart *part ); }; class KJSCPUGuard { diff --git a/tdehtml/ecma/kjs_traversal.cpp b/tdehtml/ecma/kjs_traversal.cpp index b8b9e824a..a01d469de 100644 --- a/tdehtml/ecma/kjs_traversal.cpp +++ b/tdehtml/ecma/kjs_traversal.cpp @@ -302,11 +302,11 @@ JSNodeFilter::~JSNodeFilter() short JSNodeFilter::acceptNode(const DOM::Node &n) { - KHTMLView *view = static_cast( n.handle()->docPtr() )->view(); + TDEHTMLView *view = static_cast( n.handle()->docPtr() )->view(); if (!view) return DOM::NodeFilter::FILTER_REJECT; - KHTMLPart *part = view->part(); + TDEHTMLPart *part = view->part(); KJSProxy *proxy = part->jScript(); if (proxy) { ExecState *exec = proxy->interpreter()->globalExec(); diff --git a/tdehtml/ecma/kjs_window.cpp b/tdehtml/ecma/kjs_window.cpp index 767c7607f..1d38de27e 100644 --- a/tdehtml/ecma/kjs_window.cpp +++ b/tdehtml/ecma/kjs_window.cpp @@ -77,7 +77,7 @@ namespace KJS { class History : public ObjectImp { friend class HistoryFunc; public: - History(ExecState *exec, KHTMLPart *p) + History(ExecState *exec, TDEHTMLPart *p) : ObjectImp(exec->interpreter()->builtinObjectPrototype()), part(p) { } virtual Value get(ExecState *exec, const Identifier &propertyName) const; Value getValueProperty(ExecState *exec, int token) const; @@ -85,31 +85,31 @@ namespace KJS { static const ClassInfo info; enum { Back, Forward, Go, Length }; private: - TQGuardedPtr part; + TQGuardedPtr part; }; class External : public ObjectImp { friend class ExternalFunc; public: - External(ExecState *exec, KHTMLPart *p) + External(ExecState *exec, TDEHTMLPart *p) : ObjectImp(exec->interpreter()->builtinObjectPrototype()), part(p) { } virtual Value get(ExecState *exec, const Identifier &propertyName) const; virtual const ClassInfo* classInfo() const { return &info; } static const ClassInfo info; enum { AddFavorite }; private: - TQGuardedPtr part; + TQGuardedPtr part; }; class FrameArray : public ObjectImp { public: - FrameArray(ExecState *exec, KHTMLPart *p) + FrameArray(ExecState *exec, TDEHTMLPart *p) : ObjectImp(exec->interpreter()->builtinObjectPrototype()), part(p) { } virtual Value get(ExecState *exec, const Identifier &propertyName) const; virtual Value call(ExecState *exec, Object &thisObj, const List &args); virtual bool implementsCall() const { return true; } private: - TQGuardedPtr part; + TQGuardedPtr part; }; #ifdef Q_WS_QWS @@ -421,7 +421,7 @@ Window *Window::retrieveWindow(KParts::ReadOnlyPart *p) Object obj = Object::dynamicCast( retrieve( p ) ); #ifndef NDEBUG // obj should never be null, except when javascript has been disabled in that part. - KHTMLPart *part = ::tqqt_cast(p); + TDEHTMLPart *part = ::tqqt_cast(p); if ( part && part->jScriptEnabled() ) { assert( obj.isValid() ); @@ -448,10 +448,10 @@ Window *Window::retrieveActive(ExecState *exec) Value Window::retrieve(KParts::ReadOnlyPart *p) { assert(p); - KHTMLPart * part = ::tqqt_cast(p); + TDEHTMLPart * part = ::tqqt_cast(p); KJSProxy *proxy = 0L; if (!part) { - part = ::tqqt_cast(p->parent()); + part = ::tqqt_cast(p->parent()); if (part) proxy = part->framejScript(p); } else @@ -478,7 +478,7 @@ Location *Window::location() const ObjectImp* Window::frames( ExecState* exec ) const { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (part) return m_frames ? m_frames : (const_cast(this)->m_frames = new FrameArray(exec, part)); @@ -516,7 +516,7 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const if (Lookup::findEntry(&WindowTable, p)) return true; - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part) return false; @@ -585,7 +585,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const } const HashEntry* entry = Lookup::findEntry(&WindowTable, p); - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); // properties that work on all windows if (entry) { @@ -604,7 +604,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const } if (!part) return Undefined(); - // KHTMLPart next + // TDEHTMLPart next switch(entry->value) { case Frames: return Value(frames(exec)); @@ -614,9 +614,9 @@ Value Window::get(ExecState *exec, const Identifier &p) const else // doesn't work yet return retrieve(part->opener()); case Parent: - return retrieve(part->parentPart() ? part->parentPart() : (KHTMLPart*)part); + return retrieve(part->parentPart() ? part->parentPart() : (TDEHTMLPart*)part); case Top: { - KHTMLPart *p = part; + TDEHTMLPart *p = part; while (p->parentPart()) p = p->parentPart(); return retrieve(p); @@ -638,7 +638,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const break; } } else if (!part) { - // not a KHTMLPart + // not a TDEHTMLPart TQString rvalue; KParts::LiveConnectExtension::Type rtype; unsigned long robjid; @@ -948,11 +948,11 @@ Value Window::get(ExecState *exec, const Identifier &p) const case Onchange: return getListener(exec,DOM::EventImpl::CHANGE_EVENT); case Onclick: - return getListener(exec,DOM::EventImpl::KHTML_ECMA_CLICK_EVENT); + return getListener(exec,DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT); case Ondblclick: - return getListener(exec,DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT); + return getListener(exec,DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT); case Ondragdrop: - return getListener(exec,DOM::EventImpl::KHTML_DRAGDROP_EVENT); + return getListener(exec,DOM::EventImpl::TDEHTML_DRAGDROP_EVENT); case Onerror: return getListener(exec,DOM::EventImpl::ERROR_EVENT); case Onfocus: @@ -976,7 +976,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const case Onmouseup: return getListener(exec,DOM::EventImpl::MOUSEUP_EVENT); case Onmove: - return getListener(exec,DOM::EventImpl::KHTML_MOVE_EVENT); + return getListener(exec,DOM::EventImpl::TDEHTML_MOVE_EVENT); case Onreset: return getListener(exec,DOM::EventImpl::RESET_EVENT); case Onresize: @@ -1085,12 +1085,12 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v default: break; } - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (part) { switch( entry->value ) { case Status: { if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host()) - == KHTMLSettings::KJSWindowStatusAllow) { + == TDEHTMLSettings::KJSWindowStatusAllow) { String s = value.toString(exec); part->setJSStatusBarText(s.value().qstring()); } @@ -1098,7 +1098,7 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v } case DefaultStatus: { if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host()) - == KHTMLSettings::KJSWindowStatusAllow) { + == TDEHTMLSettings::KJSWindowStatusAllow) { String s = value.toString(exec); part->setJSDefaultStatusBarText(s.value().qstring()); } @@ -1118,15 +1118,15 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v return; case Onclick: if (isSafeScript(exec)) - setListener(exec,DOM::EventImpl::KHTML_ECMA_CLICK_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_ECMA_CLICK_EVENT,value); return; case Ondblclick: if (isSafeScript(exec)) - setListener(exec,DOM::EventImpl::KHTML_ECMA_DBLCLICK_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT,value); return; case Ondragdrop: if (isSafeScript(exec)) - setListener(exec,DOM::EventImpl::KHTML_DRAGDROP_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_DRAGDROP_EVENT,value); return; case Onerror: if (isSafeScript(exec)) @@ -1174,7 +1174,7 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v return; case Onmove: if (isSafeScript(exec)) - setListener(exec,DOM::EventImpl::KHTML_MOVE_EVENT,value); + setListener(exec,DOM::EventImpl::TDEHTML_MOVE_EVENT,value); return; case Onreset: if (isSafeScript(exec)) @@ -1222,7 +1222,7 @@ bool Window::toBoolean(ExecState *) const DOM::AbstractView Window::toAbstractView() const { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part) return DOM::AbstractView(); return part->document().defaultView(); @@ -1240,9 +1240,9 @@ void Window::closeNow() if (m_frame.isNull() || m_frame->m_part.isNull()) { kdDebug(6070) << k_funcinfo << "part is deleted already" << endl; } else { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part) { - kdDebug(6070) << "closeNow on non KHTML part" << endl; + kdDebug(6070) << "closeNow on non TDEHTML part" << endl; } else { //kdDebug(6070) << k_funcinfo << " -> closing window" << endl; // We want to make sure that window.open won't find this part by name. @@ -1288,9 +1288,9 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const if ( activePart == m_frame->m_part ) // Not calling from another frame, no problem. return true; - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part) - return true; // not a KHTMLPart + return true; // not a TDEHTMLPart if ( part->document().isNull() ) return true; // allow to access a window that was just created (e.g. with window.open("about:blank")) @@ -1301,11 +1301,11 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const return false; } - KHTMLPart *activeKHTMLPart = ::tqqt_cast(activePart); - if (!activeKHTMLPart) - return true; // not a KHTMLPart + TDEHTMLPart *activeTDEHTMLPart = ::tqqt_cast(activePart); + if (!activeTDEHTMLPart) + return true; // not a TDEHTMLPart - DOM::HTMLDocument actDocument = activeKHTMLPart->htmlDocument(); + DOM::HTMLDocument actDocument = activeTDEHTMLPart->htmlDocument(); if ( actDocument.isNull() ) { kdDebug(6070) << "Window::isSafeScript: active part has no document!" << endl; return false; @@ -1327,7 +1327,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const void Window::setListener(ExecState *exec, int eventId, Value func) { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part || !isSafeScript(exec)) return; DOM::DocumentImpl *doc = static_cast(part->htmlDocument().handle()); @@ -1339,7 +1339,7 @@ void Window::setListener(ExecState *exec, int eventId, Value func) Value Window::getListener(ExecState *exec, int eventId) const { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part || !isSafeScript(exec)) return Undefined(); DOM::DocumentImpl *doc = static_cast(part->htmlDocument().handle()); @@ -1357,7 +1357,7 @@ Value Window::getListener(ExecState *exec, int eventId) const JSEventListener *Window::getJSEventListener(const Value& val, bool html) { // This function is so hot that it's worth coding it directly with imps. - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part || val.type() != ObjectType) return 0; @@ -1433,8 +1433,8 @@ void Window::setCurrentEvent( DOM::Event *evt ) void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory) { Window* active = Window::retrieveActive(exec); - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); - KHTMLPart *active_part = ::tqqt_cast(active->part()); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *active_part = ::tqqt_cast(active->part()); // Complete the URL using the "active part" (running interpreter) if (active_part && part) { if (url[0] == TQChar('#')) { @@ -1470,7 +1470,7 @@ void Window::delayedGoHistory( int steps ) void Window::goHistory( int steps ) { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if(!part) // TODO history readonlypart return; @@ -1488,7 +1488,7 @@ void Window::goHistory( int steps ) void KJS::Window::resizeTo(TQWidget* tl, int width, int height) { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if(!part) // TODO resizeTo readonlypart return; @@ -1531,10 +1531,10 @@ void KJS::Window::resizeTo(TQWidget* tl, int width, int height) Value Window::openWindow(ExecState *exec, const List& args) { - KHTMLPart *part = ::tqqt_cast(m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(m_frame->m_part); if (!part) return Undefined(); - KHTMLView *widget = part->view(); + TDEHTMLView *widget = part->view(); Value v = args[0]; TQString str; if (v.isValid() && !v.isA(UndefinedType)) @@ -1544,7 +1544,7 @@ Value Window::openWindow(ExecState *exec, const List& args) KURL url; if (!str.isEmpty()) { - KHTMLPart* p = ::tqqt_cast(Window::retrieveActive(exec)->m_frame->m_part); + TDEHTMLPart* p = ::tqqt_cast(Window::retrieveActive(exec)->m_frame->m_part); if ( p ) url = p->htmlDocument().completeURL(str).string(); if ( !p || @@ -1552,9 +1552,9 @@ Value Window::openWindow(ExecState *exec, const List& args) return Undefined(); } - KHTMLSettings::KJSWindowOpenPolicy policy = + TDEHTMLSettings::KJSWindowOpenPolicy policy = part->settings()->windowOpenPolicy(part->url().host()); - if ( policy == KHTMLSettings::KJSWindowOpenAsk ) { + if ( policy == TDEHTMLSettings::KJSWindowOpenAsk ) { emit part->browserExtension()->requestFocus(part); TQString caption; if (!part->url().host().isEmpty()) @@ -1568,12 +1568,12 @@ Value Window::openWindow(ExecState *exec, const List& args) i18n( "This site is requesting to open

      %1

      in a new browser window via JavaScript.
      " "Do you want to allow this?
      ").arg(KStringHandler::csqueeze(url.htmlURL(), 100)), caption, i18n("Allow"), i18n("Do Not Allow") ) == KMessageBox::Yes ) - policy = KHTMLSettings::KJSWindowOpenAllow; - } else if ( policy == KHTMLSettings::KJSWindowOpenSmart ) + policy = TDEHTMLSettings::KJSWindowOpenAllow; + } else if ( policy == TDEHTMLSettings::KJSWindowOpenSmart ) { // window.open disabled unless from a key/mouse event if (static_cast(exec->interpreter())->isWindowOpenAllowed()) - policy = KHTMLSettings::KJSWindowOpenAllow; + policy = TDEHTMLSettings::KJSWindowOpenAllow; } TQString frameName = args.size() > 1 ? args[1].toString(exec).qstring() : TQString("_blank"); @@ -1587,7 +1587,7 @@ Value Window::openWindow(ExecState *exec, const List& args) features = features.mid(1, features.length()-2); } - if ( policy != KHTMLSettings::KJSWindowOpenAllow ) { + if ( policy != TDEHTMLSettings::KJSWindowOpenAllow ) { if ( url.isEmpty() ) part->setSuppressedPopupIndicator(true, 0); else { @@ -1602,8 +1602,8 @@ Value Window::openWindow(ExecState *exec, const List& args) Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features) { - KHTMLPart *p = ::tqqt_cast(m_frame->m_part); - KHTMLView *widget = p->view(); + TDEHTMLPart *p = ::tqqt_cast(m_frame->m_part); + TDEHTMLView *widget = p->view(); KParts::WindowArgs winargs; // scan feature argument @@ -1703,8 +1703,8 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString // request window (new or existing if framename is set) KParts::ReadOnlyPart *newPart = 0L; emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart); - if (newPart && ::tqqt_cast(newPart)) { - KHTMLPart *tdehtmlpart = static_cast(newPart); + if (newPart && ::tqqt_cast(newPart)) { + TDEHTMLPart *tdehtmlpart = static_cast(newPart); //tqDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window); tdehtmlpart->setOpener(p); tdehtmlpart->setOpenedByJS(true); @@ -1735,7 +1735,7 @@ void Window::forgetSuppressedWindows() void Window::showSuppressedWindows() { - KHTMLPart *part = ::tqqt_cast( m_frame->m_part ); + TDEHTMLPart *part = ::tqqt_cast( m_frame->m_part ); KJS::Interpreter *interpreter = part->jScript()->interpreter(); ExecState *exec = interpreter->globalExec(); @@ -1760,11 +1760,11 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) Window *window = static_cast(thisObj.imp()); TQString str, str2; - KHTMLPart *part = ::tqqt_cast(window->m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(window->m_frame->m_part); if (!part) return Undefined(); - KHTMLView *widget = part->view(); + TDEHTMLView *widget = part->view(); Value v = args[0]; UString s; if (v.isValid() && !v.isA(UndefinedType)) { @@ -1894,9 +1894,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) window->goURL(exec, args[0].toString(exec).qstring(), false /*don't lock history*/); return Undefined(); case Window::Focus: { - KHTMLSettings::KJSWindowFocusPolicy policy = + TDEHTMLSettings::KJSWindowFocusPolicy policy = part->settings()->windowFocusPolicy(part->url().host()); - if(policy == KHTMLSettings::KJSWindowFocusAllow && widget) { + if(policy == TDEHTMLSettings::KJSWindowFocusAllow && widget) { widget->topLevelWidget()->raise(); KWin::deIconifyWindow( widget->topLevelWidget()->winId() ); widget->setActiveWindow(); @@ -1944,9 +1944,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) widget->setContentsPos(args[0].toInt32(exec), args[1].toInt32(exec)); return Undefined(); case Window::MoveBy: { - KHTMLSettings::KJSWindowMovePolicy policy = + TDEHTMLSettings::KJSWindowMovePolicy policy = part->settings()->windowMovePolicy(part->url().host()); - if(policy == KHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget) + if(policy == TDEHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget) { KParts::BrowserExtension *ext = part->browserExtension(); if (ext) { @@ -1964,9 +1964,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) return Undefined(); } case Window::MoveTo: { - KHTMLSettings::KJSWindowMovePolicy policy = + TDEHTMLSettings::KJSWindowMovePolicy policy = part->settings()->windowMovePolicy(part->url().host()); - if(policy == KHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget) + if(policy == TDEHTMLSettings::KJSWindowMoveAllow && args.size() == 2 && widget) { KParts::BrowserExtension *ext = part->browserExtension(); if (ext) { @@ -1984,9 +1984,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) return Undefined(); } case Window::ResizeBy: { - KHTMLSettings::KJSWindowResizePolicy policy = + TDEHTMLSettings::KJSWindowResizePolicy policy = part->settings()->windowResizePolicy(part->url().host()); - if(policy == KHTMLSettings::KJSWindowResizeAllow + if(policy == TDEHTMLSettings::KJSWindowResizeAllow && args.size() == 2 && widget) { TQWidget * tl = widget->topLevelWidget(); @@ -1998,9 +1998,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) return Undefined(); } case Window::ResizeTo: { - KHTMLSettings::KJSWindowResizePolicy policy = + TDEHTMLSettings::KJSWindowResizePolicy policy = part->settings()->windowResizePolicy(part->url().host()); - if(policy == KHTMLSettings::KJSWindowResizeAllow + if(policy == TDEHTMLSettings::KJSWindowResizeAllow && args.size() == 2 && widget) { TQWidget * tl = widget->topLevelWidget(); @@ -2114,7 +2114,7 @@ ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _inte bool ScheduledAction::execute(Window *window) { - KHTMLPart *part = ::tqqt_cast(window->m_frame->m_part); + TDEHTMLPart *part = ::tqqt_cast(window->m_frame->m_part); if (!part || !part->jScriptEnabled()) return false; ScriptInterpreter *interpreter = static_cast(part->jScript()->interpreter()); @@ -2432,7 +2432,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const if (node) { if (node->id() == ID_FRAME || node->id() == ID_IFRAME) { //Return the Window object. - KHTMLPart* part = static_cast(node)->contentPart(); + TDEHTMLPart* part = static_cast(node)->contentPart(); if (part) return Value(Window::retrieveWindow(part)); else @@ -2590,7 +2590,7 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att TQString str = v.toString(exec).qstring(); switch (entry->value) { case Href: { - KHTMLPart* p =::tqqt_cast(Window::retrieveActive(exec)->part()); + TDEHTMLPart* p =::tqqt_cast(Window::retrieveActive(exec)->part()); if ( p ) url = p->htmlDocument().completeURL( str ).string(); else @@ -2681,7 +2681,7 @@ Value LocationFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) id == Location::Replace); break; case Location::Reload: { - KHTMLPart *tdehtmlpart = ::tqqt_cast(part); + TDEHTMLPart *tdehtmlpart = ::tqqt_cast(part); if (tdehtmlpart) tdehtmlpart->scheduleRedirection(-1, part->url().url(), true/*lock history*/); else @@ -2714,11 +2714,11 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) KJS_CHECK_THIS( External, thisObj ); External *external = static_cast(thisObj.imp()); - KHTMLPart *part = external->part; + TDEHTMLPart *part = external->part; if (!part) return Undefined(); - KHTMLView *widget = part->view(); + TDEHTMLView *widget = part->view(); switch (id) { case External::AddFavorite: diff --git a/tdehtml/ecma/kjs_window.h b/tdehtml/ecma/kjs_window.h index b9142f983..c30871692 100644 --- a/tdehtml/ecma/kjs_window.h +++ b/tdehtml/ecma/kjs_window.h @@ -32,8 +32,8 @@ #include "kjs_views.h" class TQTimer; -class KHTMLView; -class KHTMLPart; +class TDEHTMLView; +class TDEHTMLPart; namespace KParts { class ReadOnlyPart; @@ -64,13 +64,13 @@ namespace KJS { virtual Value get(ExecState *exec, const Identifier &propertyName) const; Value getValueProperty(ExecState *exec, int token) const; private: - KHTMLView *view; + TDEHTMLView *view; virtual const ClassInfo* classInfo() const { return &info; } static const ClassInfo info; }; class KDE_EXPORT Window : public ObjectImp { - friend TQGuardedPtr getInstance(); + friend TQGuardedPtr getInstance(); friend class Location; friend class WindowFunc; friend class WindowQObject; @@ -293,14 +293,14 @@ namespace KJS { class Konqueror : public ObjectImp { friend class KonquerorFunc; public: - Konqueror(KHTMLPart *p) : part(p) { } + Konqueror(TDEHTMLPart *p) : part(p) { } virtual Value get(ExecState *exec, const Identifier &propertyName) const; virtual bool hasProperty(ExecState *exec, const Identifier &p) const; virtual UString toString(ExecState *exec) const; virtual const ClassInfo* classInfo() const { return &info; } static const ClassInfo info; private: - KHTMLPart *part; + TDEHTMLPart *part; }; #endif diff --git a/tdehtml/ecma/testecma.cpp b/tdehtml/ecma/testecma.cpp index 44cd7ecb0..3bd4bb88d 100644 --- a/tdehtml/ecma/testecma.cpp +++ b/tdehtml/ecma/testecma.cpp @@ -19,7 +19,7 @@ /** * An interactive interpreter to test the ECMA Script language bindings - * for the DOM of KHTML. + * for the DOM of TDEHTML. * The 'document' property is preset to an instance of Document and serves * as an entrypoint. * diff --git a/tdehtml/ecma/xmlhttprequest.cpp b/tdehtml/ecma/xmlhttprequest.cpp index bfaa91231..d95fe5e58 100644 --- a/tdehtml/ecma/xmlhttprequest.cpp +++ b/tdehtml/ecma/xmlhttprequest.cpp @@ -725,7 +725,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L } TQString method = args[0].toString(exec).qstring(); - KHTMLPart *part = ::tqqt_cast(Window::retrieveActive(exec)->part()); + TDEHTMLPart *part = ::tqqt_cast(Window::retrieveActive(exec)->part()); if (!part) return Undefined(); KURL url = KURL(part->document().completeURL(args[1].toString(exec).qstring()).string()); diff --git a/tdehtml/html/html_baseimpl.cpp b/tdehtml/html/html_baseimpl.cpp index 7ac3d93c9..16ca7a23b 100644 --- a/tdehtml/html/html_baseimpl.cpp +++ b/tdehtml/html/html_baseimpl.cpp @@ -85,7 +85,7 @@ void HTMLBodyElementImpl::parseAttribute(AttributeImpl *attr) break; } case ATTR_MARGINWIDTH: { - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if (w) w->setMarginWidth( -1 ); // unset this, so it doesn't override the setting here addCSSLength(CSS_PROP_MARGIN_RIGHT, attr->value() ); @@ -95,7 +95,7 @@ void HTMLBodyElementImpl::parseAttribute(AttributeImpl *attr) addCSSLength(CSS_PROP_MARGIN_LEFT, attr->value() ); break; case ATTR_MARGINHEIGHT: { - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if (w) w->setMarginHeight( -1 ); // unset this, so it doesn't override the setting here addCSSLength(CSS_PROP_MARGIN_BOTTOM, attr->value()); @@ -185,7 +185,7 @@ void HTMLBodyElementImpl::insertedIntoDocument() { HTMLElementImpl::insertedIntoDocument(); - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if(w && w->marginWidth() != -1) { TQString s; s.sprintf( "%d", w->marginWidth() ); @@ -351,7 +351,7 @@ void HTMLFrameElementImpl::attach() if (!m_render) return; - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if (w) { // we need a unique name for every frame in the frameset. Hope that's unique enough. if(name.isEmpty() || w->part()->frameExists( name.string() ) ) @@ -380,9 +380,9 @@ void HTMLFrameElementImpl::setLocation( const DOMString& str ) return; // load the frame contents - KHTMLView *w = getDocument()->view(); + TDEHTMLView *w = getDocument()->view(); if (w) { - KHTMLPart *part = w->part()->findFrame( name.string() ); + TDEHTMLPart *part = w->part()->findFrame( name.string() ); if ( part ) { part->openURL( KURL( getDocument()->completeURL( url.string() ) ) ); } else { @@ -414,20 +414,20 @@ DocumentImpl* HTMLFrameElementImpl::contentDocument() const RenderPart* render = static_cast( m_render ); - if(render->widget() && ::tqqt_cast( render->widget()) ) - return static_cast( render->widget() )->part()->xmlDocImpl(); + if(render->widget() && ::tqqt_cast( render->widget()) ) + return static_cast( render->widget() )->part()->xmlDocImpl(); return 0; } -KHTMLPart* HTMLFrameElementImpl::contentPart() const +TDEHTMLPart* HTMLFrameElementImpl::contentPart() const { if ( !m_render ) return 0; RenderPart* render = static_cast( m_render ); - if(render->widget() && ::tqqt_cast( render->widget()) ) - return static_cast( render->widget() )->part(); + if(render->widget() && ::tqqt_cast( render->widget()) ) + return static_cast( render->widget() )->part(); return 0; } @@ -688,7 +688,7 @@ void HTMLIFrameElementImpl::attach() if (m_render) { // we need a unique name for every frame in the frameset. Hope that's unique enough. - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if(w && (name.isEmpty() || w->part()->frameExists( name.string() ))) name = DOMString(w->part()->requestFrameName()); diff --git a/tdehtml/html/html_baseimpl.h b/tdehtml/html/html_baseimpl.h index 0aff3e8e1..8d7205732 100644 --- a/tdehtml/html/html_baseimpl.h +++ b/tdehtml/html/html_baseimpl.h @@ -33,8 +33,8 @@ #include -class KHTMLView; -class KHTMLPart; +class TDEHTMLView; +class TDEHTMLPart; namespace tdehtml { class RenderFrameSet; @@ -96,7 +96,7 @@ public: virtual void setFocus(bool); DocumentImpl* contentDocument() const; - KHTMLPart* contentPart() const; + TDEHTMLPart* contentPart() const; DOMString url; DOMString name; diff --git a/tdehtml/html/html_blockimpl.cpp b/tdehtml/html/html_blockimpl.cpp index 3e4585c41..47ceaa9fa 100644 --- a/tdehtml/html/html_blockimpl.cpp +++ b/tdehtml/html/html_blockimpl.cpp @@ -45,11 +45,11 @@ void HTMLDivElementImpl::parseAttribute(AttributeImpl *attr) { DOMString v = attr->value().lower(); if ( strcmp( v, "middle" ) == 0 || strcmp( v, "center" ) == 0 ) - addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_CENTER); + addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__TDEHTML_CENTER); else if (strcmp(v, "left") == 0) - addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_LEFT); + addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__TDEHTML_LEFT); else if (strcmp(v, "right") == 0) - addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_RIGHT); + addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__TDEHTML_RIGHT); else addCSSProperty(CSS_PROP_TEXT_ALIGN, v); break; @@ -214,37 +214,37 @@ void HTMLMarqueeElementImpl::parseAttribute(AttributeImpl *attr) break; case ATTR_SCROLLAMOUNT: if (!attr->value().isEmpty()) - addCSSLength(CSS_PROP__KHTML_MARQUEE_INCREMENT, attr->value()); + addCSSLength(CSS_PROP__TDEHTML_MARQUEE_INCREMENT, attr->value()); else - removeCSSProperty(CSS_PROP__KHTML_MARQUEE_INCREMENT); + removeCSSProperty(CSS_PROP__TDEHTML_MARQUEE_INCREMENT); break; case ATTR_SCROLLDELAY: if (!attr->value().isEmpty()) - addCSSLength(CSS_PROP__KHTML_MARQUEE_SPEED, attr->value(), true); + addCSSLength(CSS_PROP__TDEHTML_MARQUEE_SPEED, attr->value(), true); else - removeCSSProperty(CSS_PROP__KHTML_MARQUEE_SPEED); + removeCSSProperty(CSS_PROP__TDEHTML_MARQUEE_SPEED); break; case ATTR_LOOP: if (!attr->value().isEmpty()) { if (attr->value() == "-1" || strcasecmp(attr->value(), "infinite") == 0) - addCSSProperty(CSS_PROP__KHTML_MARQUEE_REPETITION, CSS_VAL_INFINITE); + addCSSProperty(CSS_PROP__TDEHTML_MARQUEE_REPETITION, CSS_VAL_INFINITE); else - addCSSLength(CSS_PROP__KHTML_MARQUEE_REPETITION, attr->value().lower(), true); + addCSSLength(CSS_PROP__TDEHTML_MARQUEE_REPETITION, attr->value().lower(), true); } else - removeCSSProperty(CSS_PROP__KHTML_MARQUEE_REPETITION); + removeCSSProperty(CSS_PROP__TDEHTML_MARQUEE_REPETITION); break; case ATTR_BEHAVIOR: if (!attr->value().isEmpty()) - addCSSProperty(CSS_PROP__KHTML_MARQUEE_STYLE, attr->value().lower()); + addCSSProperty(CSS_PROP__TDEHTML_MARQUEE_STYLE, attr->value().lower()); else - removeCSSProperty(CSS_PROP__KHTML_MARQUEE_STYLE); + removeCSSProperty(CSS_PROP__TDEHTML_MARQUEE_STYLE); break; case ATTR_DIRECTION: if (!attr->value().isEmpty()) - addCSSProperty(CSS_PROP__KHTML_MARQUEE_DIRECTION, attr->value().lower()); + addCSSProperty(CSS_PROP__TDEHTML_MARQUEE_DIRECTION, attr->value().lower()); else - removeCSSProperty(CSS_PROP__KHTML_MARQUEE_DIRECTION); + removeCSSProperty(CSS_PROP__TDEHTML_MARQUEE_DIRECTION); break; case ATTR_TRUESPEED: m_minimumDelay = attr->val() ? 0 : defaultMinimumDelay; diff --git a/tdehtml/html/html_documentimpl.cpp b/tdehtml/html/html_documentimpl.cpp index 3aa70c196..21c3e12c5 100644 --- a/tdehtml/html/html_documentimpl.cpp +++ b/tdehtml/html/html_documentimpl.cpp @@ -69,7 +69,7 @@ using namespace DOM; using namespace tdehtml; -HTMLDocumentImpl::HTMLDocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v) +HTMLDocumentImpl::HTMLDocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v) : DocumentImpl(_implementation, v) { // kdDebug( 6090 ) << "HTMLDocumentImpl constructor this = " << this << endl; @@ -78,12 +78,12 @@ HTMLDocumentImpl::HTMLDocumentImpl(DOMImplementationImpl *_implementation, KHTML m_doAutoFill = false; /* dynamic history stuff to be fixed later (pfeiffer) - connect( KHTMLFactory::vLinks(), TQT_SIGNAL( removed( const TQString& )), + connect( TDEHTMLFactory::vLinks(), TQT_SIGNAL( removed( const TQString& )), TQT_SLOT( slotHistoryChanged() )); */ - connect( KHTMLFactory::vLinks(), TQT_SIGNAL( inserted( const TQString& ) ), + connect( TDEHTMLFactory::vLinks(), TQT_SIGNAL( inserted( const TQString& ) ), TQT_SLOT( slotHistoryChanged() )); - connect( KHTMLFactory::vLinks(), TQT_SIGNAL( cleared()), + connect( TDEHTMLFactory::vLinks(), TQT_SIGNAL( cleared()), TQT_SLOT( slotHistoryChanged() )); } @@ -108,7 +108,7 @@ DOMString HTMLDocumentImpl::lastModified() const DOMString HTMLDocumentImpl::cookie() const { long windowId = 0; - KHTMLView *v = view (); + TDEHTMLView *v = view (); if ( v && v->topLevelWidget() ) windowId = v->topLevelWidget()->winId(); @@ -140,7 +140,7 @@ DOMString HTMLDocumentImpl::cookie() const void HTMLDocumentImpl::setCookie( const DOMString & value ) { long windowId = 0; - KHTMLView *v = view (); + TDEHTMLView *v = view (); if ( v && v->topLevelWidget() ) windowId = v->topLevelWidget()->winId(); diff --git a/tdehtml/html/html_documentimpl.h b/tdehtml/html/html_documentimpl.h index 0aea47b8b..92f163076 100644 --- a/tdehtml/html/html_documentimpl.h +++ b/tdehtml/html/html_documentimpl.h @@ -29,7 +29,7 @@ #include -class KHTMLView; +class TDEHTMLView; class TQString; namespace DOM { @@ -45,7 +45,7 @@ class HTMLDocumentImpl : public DOM::DocumentImpl { Q_OBJECT public: - HTMLDocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v = 0); + HTMLDocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v = 0); ~HTMLDocumentImpl(); virtual bool isHTMLDocument() const { return true; } diff --git a/tdehtml/html/html_elementimpl.cpp b/tdehtml/html/html_elementimpl.cpp index c18f19ea0..1d7995501 100644 --- a/tdehtml/html/html_elementimpl.cpp +++ b/tdehtml/html/html_elementimpl.cpp @@ -212,11 +212,11 @@ void HTMLElementImpl::parseAttribute(AttributeImpl *attr) break; // standard events case ATTR_ONCLICK: - setHTMLEventListener(EventImpl::KHTML_ECMA_CLICK_EVENT, + setHTMLEventListener(EventImpl::TDEHTML_ECMA_CLICK_EVENT, getDocument()->createHTMLEventListener(attr->value().string(), "onclick", this)); break; case ATTR_ONDBLCLICK: - setHTMLEventListener(EventImpl::KHTML_ECMA_DBLCLICK_EVENT, + setHTMLEventListener(EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT, getDocument()->createHTMLEventListener(attr->value().string(), "ondblclick", this)); break; case ATTR_ONMOUSEDOWN: @@ -640,7 +640,7 @@ void HTMLElementImpl::addHTMLAlignment( DOMString alignment ) } else if ( strcasecmp( alignment, "top" ) == 0 ) { propvalign = CSS_VAL_TOP; } else if ( strcasecmp( alignment, "middle" ) == 0 ) { - propvalign = CSS_VAL__KHTML_BASELINE_MIDDLE; + propvalign = CSS_VAL__TDEHTML_BASELINE_MIDDLE; } else if ( strcasecmp( alignment, "center" ) == 0 ) { propvalign = CSS_VAL_MIDDLE; } else if ( strcasecmp( alignment, "bottom" ) == 0 ) { diff --git a/tdehtml/html/html_formimpl.cpp b/tdehtml/html/html_formimpl.cpp index 7e2776ad5..3f8384a97 100644 --- a/tdehtml/html/html_formimpl.cpp +++ b/tdehtml/html/html_formimpl.cpp @@ -53,7 +53,7 @@ #include #include #include -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET #include #endif #include @@ -223,7 +223,7 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok) for(unsigned int i=0; i < strLength; ++i) if(str[i].latin1() == ',') str[i] = space; const TQStringList charsets = TQStringList::split(' ', str); TQTextCodec* codec = 0; - KHTMLView *view = getDocument()->view(); + TDEHTMLView *view = getDocument()->view(); { TQStringList::ConstIterator it = charsets.begin(); const TQStringList::ConstIterator itEnd = charsets.end(); @@ -425,7 +425,7 @@ static TQString calculateAutoFillKey(const HTMLFormElementImpl& e) void HTMLFormElementImpl::doAutoFill() { -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET const TQString key = calculateAutoFillKey(*this); if (KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), @@ -435,12 +435,12 @@ void HTMLFormElementImpl::doAutoFill() // assert(view()) getDocument()->view()->part()->openWallet(this); -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } void HTMLFormElementImpl::walletOpened(KWallet::Wallet *w) { -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET assert(w); const TQString key = calculateAutoFillKey(*this); if (!w->hasFolder(KWallet::Wallet::FormDataFolder())) { @@ -463,7 +463,7 @@ void HTMLFormElementImpl::walletOpened(KWallet::Wallet *w) { } } } -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } void HTMLFormElementImpl::submitFromKeyboard() @@ -505,8 +505,8 @@ void HTMLFormElementImpl::submitFromKeyboard() void HTMLFormElementImpl::gatherWalletData() { -#ifndef KHTML_NO_WALLET - KHTMLView* const view = getDocument()->view(); +#ifndef TDEHTML_NO_WALLET + TDEHTMLView* const view = getDocument()->view(); // check if we have any password input's m_walletMap.clear(); m_havePassword = false; @@ -529,13 +529,13 @@ void HTMLFormElementImpl::gatherWalletData() m_haveTextarea = true; } } -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } bool HTMLFormElementImpl::prepareSubmit() { - KHTMLView* const view = getDocument()->view(); + TDEHTMLView* const view = getDocument()->view(); if(m_insubmit || !view || !view->part() || view->part()->onlyLocalReferences()) return m_insubmit; @@ -569,7 +569,7 @@ void HTMLFormElementImpl::submit( ) #endif bool ok; - KHTMLView* const view = getDocument()->view(); + TDEHTMLView* const view = getDocument()->view(); const TQByteArray form_data = formData(ok); const KURL formUrl(getDocument()->URL()); @@ -577,7 +577,7 @@ void HTMLFormElementImpl::submit( ) if (m_walletMap.isEmpty()) { gatherWalletData(); } -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET if (m_havePassword && !m_haveTextarea && KWallet::Wallet::isEnabled()) { const TQString key = calculateAutoFillKey(*this); const bool doesnotexist = KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::FormDataFolder(), key); @@ -630,7 +630,7 @@ void HTMLFormElementImpl::submit( ) } } } -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET const DOMString url(tdehtml::parseURL(getAttribute(ATTR_ACTION))); if(m_post) { @@ -652,7 +652,7 @@ void HTMLFormElementImpl::submit( ) void HTMLFormElementImpl::reset( ) { - KHTMLView* const view = getDocument()->view(); + TDEHTMLView* const view = getDocument()->view(); if(m_inreset || !view || !view->part()) return; m_inreset = true; @@ -991,9 +991,9 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt) if (evt->target()==this && !m_disabled) { // Report focus in/out changes to the browser extension (editable widgets only) - KHTMLView* const view = getDocument()->view(); + TDEHTMLView* const view = getDocument()->view(); if (view && evt->id() == EventImpl::DOMFOCUSIN_EVENT && isEditable() && m_render && m_render->isWidget()) { - KHTMLPartBrowserExtension *ext = static_cast(view->part()->browserExtension()); + TDEHTMLPartBrowserExtension *ext = static_cast(view->part()->browserExtension()); TQWidget* const widget = static_cast(m_render)->widget(); if (ext) ext->editableWidgetFocused(widget); @@ -1038,7 +1038,7 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt) if (view && evt->id() == EventImpl::DOMFOCUSOUT_EVENT && isEditable() && m_render && m_render->isWidget()) { - KHTMLPartBrowserExtension* const ext = static_cast(view->part()->browserExtension()); + TDEHTMLPartBrowserExtension* const ext = static_cast(view->part()->browserExtension()); TQWidget* const widget = static_cast(m_render)->widget(); if (ext) ext->editableWidgetBlurred(widget); @@ -1772,7 +1772,7 @@ void HTMLInputElementImpl::defaultEventHandler(EventImpl *evt) m_render->absolutePosition(offsetX,offsetY); xPos = me->clientX()-offsetX; yPos = me->clientY()-offsetY; - KHTMLView* v = getDocument()->view(); + TDEHTMLView* v = getDocument()->view(); if ( v ) { xPos += v->contentsX(); yPos += v->contentsY(); diff --git a/tdehtml/html/html_formimpl.h b/tdehtml/html/html_formimpl.h index 6a909368a..8fe0ef1dd 100644 --- a/tdehtml/html/html_formimpl.h +++ b/tdehtml/html/html_formimpl.h @@ -34,7 +34,7 @@ #include #include -class KHTMLView; +class TDEHTMLView; class TQTextCodec; namespace tdehtml diff --git a/tdehtml/html/html_headimpl.cpp b/tdehtml/html/html_headimpl.cpp index 2bc0ae99f..347f8c262 100644 --- a/tdehtml/html/html_headimpl.cpp +++ b/tdehtml/html/html_headimpl.cpp @@ -175,7 +175,7 @@ void HTMLLinkElementImpl::process() TQString type = getAttribute(ATTR_TYPE).string().lower(); TQString rel = getAttribute(ATTR_REL).string().lower(); - KHTMLPart* part = getDocument()->view() ? getDocument()->view()->part() : 0; + TDEHTMLPart* part = getDocument()->view() ? getDocument()->view()->part() : 0; // IE extension: location of small icon for locationbar / bookmarks // Uses both "shortcut icon" and "icon" @@ -408,7 +408,7 @@ void HTMLScriptElementImpl::evaluateScript(const TQString &URL, const DOMString if (m_evaluated) return; - KHTMLPart *part = getDocument()->part(); + TDEHTMLPart *part = getDocument()->part(); if (part) { KJSProxy *proxy = KJSProxy::proxy(part); if (proxy) { diff --git a/tdehtml/html/html_headimpl.h b/tdehtml/html/html_headimpl.h index ee9c2ad8b..8563de6a8 100644 --- a/tdehtml/html/html_headimpl.h +++ b/tdehtml/html/html_headimpl.h @@ -28,7 +28,7 @@ #include "misc/loader_client.h" #include "css/css_stylesheetimpl.h" -class KHTMLView; +class TDEHTMLView; namespace tdehtml { class CachedCSSStyleSheet; diff --git a/tdehtml/html/html_inlineimpl.cpp b/tdehtml/html/html_inlineimpl.cpp index 829b10f7b..f403a2385 100644 --- a/tdehtml/html/html_inlineimpl.cpp +++ b/tdehtml/html/html_inlineimpl.cpp @@ -98,7 +98,7 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt) tdehtml::RenderImage *r = static_cast(img->renderer()); if(r && e) { - KHTMLView* v = getDocument()->view(); + TDEHTMLView* v = getDocument()->view(); int x = e->clientX(); int y = e->clientY(); int absx = 0; @@ -276,7 +276,7 @@ void HTMLFontElementImpl::parseAttribute(AttributeImpl *attr) case 6: size = CSS_VAL_XX_LARGE; break; default: if (num > 6) - size = CSS_VAL__KHTML_XXX_LARGE; + size = CSS_VAL__TDEHTML_XXX_LARGE; else size = CSS_VAL_XX_SMALL; } diff --git a/tdehtml/html/html_objectimpl.cpp b/tdehtml/html/html_objectimpl.cpp index b224ad687..f2cf8c1db 100644 --- a/tdehtml/html/html_objectimpl.cpp +++ b/tdehtml/html/html_objectimpl.cpp @@ -265,7 +265,7 @@ void HTMLAppletElementImpl::parseAttribute(AttributeImpl *attr) void HTMLAppletElementImpl::attach() { - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); #ifndef Q_WS_QWS // FIXME? DOMString codeBase = getAttribute( ATTR_CODEBASE ); @@ -346,7 +346,7 @@ void HTMLEmbedElementImpl::parseAttribute(AttributeImpl *attr) void HTMLEmbedElementImpl::attach() { - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if (!w || !w->part()->pluginsEnabled()) m_renderAlternative = true; @@ -422,14 +422,14 @@ DocumentImpl* HTMLObjectElementImpl::contentDocument() const if ( !m_render ) return 0; if ( !m_render->isWidget() ) return 0; TQWidget* widget = static_cast( m_render )->widget(); - if( widget && ::tqqt_cast( widget ) ) - return static_cast( widget )->part()->xmlDocImpl(); + if( widget && ::tqqt_cast( widget ) ) + return static_cast( widget )->part()->xmlDocImpl(); return 0; } void HTMLObjectElementImpl::attach() { - KHTMLView* w = getDocument()->view(); + TDEHTMLView* w = getDocument()->view(); if (!w || !w->part()->pluginsEnabled()) m_renderAlternative = true; diff --git a/tdehtml/html/html_objectimpl.h b/tdehtml/html/html_objectimpl.h index cc91935ca..d10e66356 100644 --- a/tdehtml/html/html_objectimpl.h +++ b/tdehtml/html/html_objectimpl.h @@ -28,7 +28,7 @@ #include #include -class KHTMLView; +class TDEHTMLView; // ------------------------------------------------------------------------- namespace DOM { diff --git a/tdehtml/html/html_tableimpl.cpp b/tdehtml/html/html_tableimpl.cpp index 3fc4ba757..71fe14773 100644 --- a/tdehtml/html/html_tableimpl.cpp +++ b/tdehtml/html/html_tableimpl.cpp @@ -63,7 +63,7 @@ HTMLTableElementImpl::HTMLTableElementImpl(DocumentImpl *doc) // only difference to 100% correct is that in strict mode elements are propagated into tables. if ( getDocument()->parseMode() < DocumentImpl::Transitional ) { addCSSProperty( CSS_PROP_FONT_SIZE, CSS_VAL_MEDIUM ); - addCSSProperty( CSS_PROP_COLOR, CSS_VAL__KHTML_TEXT ); + addCSSProperty( CSS_PROP_COLOR, CSS_VAL__TDEHTML_TEXT ); } } @@ -627,13 +627,13 @@ void HTMLTablePartElementImpl::parseAttribute(AttributeImpl *attr) { DOMString v = attr->value(); if ( strcasecmp( attr->value(), "middle" ) == 0 || strcasecmp( attr->value(), "center" ) == 0 ) - addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_CENTER); + addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__TDEHTML_CENTER); else if (strcasecmp(attr->value(), "absmiddle") == 0) addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL_CENTER); else if (strcasecmp(attr->value(), "left") == 0) - addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_LEFT); + addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__TDEHTML_LEFT); else if (strcasecmp(attr->value(), "right") == 0) - addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_RIGHT); + addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__TDEHTML_RIGHT); else addCSSProperty(CSS_PROP_TEXT_ALIGN, v); break; @@ -881,7 +881,7 @@ void HTMLTableCellElementImpl::parseAttribute(AttributeImpl *attr) break; case ATTR_NOWRAP: if (attr->val() != 0) - addCSSProperty(CSS_PROP_WHITE_SPACE, CSS_VAL__KHTML_NOWRAP); + addCSSProperty(CSS_PROP_WHITE_SPACE, CSS_VAL__TDEHTML_NOWRAP); else removeCSSProperty(CSS_PROP_WHITE_SPACE); break; diff --git a/tdehtml/html/htmlparser.cpp b/tdehtml/html/htmlparser.cpp index 144a9addd..f7cc1daaf 100644 --- a/tdehtml/html/htmlparser.cpp +++ b/tdehtml/html/htmlparser.cpp @@ -125,7 +125,7 @@ public: * */ -KHTMLParser::KHTMLParser( KHTMLView *_parent, DocumentImpl *doc) +TDEHTMLParser::TDEHTMLParser( TDEHTMLView *_parent, DocumentImpl *doc) { //kdDebug( 6035 ) << "parser constructor" << endl; #if SPEED_DEBUG > 0 @@ -144,7 +144,7 @@ KHTMLParser::KHTMLParser( KHTMLView *_parent, DocumentImpl *doc) reset(); } -KHTMLParser::KHTMLParser( DOM::DocumentFragmentImpl *i, DocumentImpl *doc ) +TDEHTMLParser::TDEHTMLParser( DOM::DocumentFragmentImpl *i, DocumentImpl *doc ) { HTMLWidget = 0; document = doc; @@ -161,7 +161,7 @@ KHTMLParser::KHTMLParser( DOM::DocumentFragmentImpl *i, DocumentImpl *doc ) inBody = true; } -KHTMLParser::~KHTMLParser() +TDEHTMLParser::~TDEHTMLParser() { #if SPEED_DEBUG > 0 kdDebug( ) << "TIME: parsing time was = " << qt.elapsed() << endl; @@ -175,7 +175,7 @@ KHTMLParser::~KHTMLParser() delete isindex; } -void KHTMLParser::reset() +void TDEHTMLParser::reset() { setCurrent ( document ); @@ -201,7 +201,7 @@ void KHTMLParser::reset() discard_until = 0; } -void KHTMLParser::parseToken(Token *t) +void TDEHTMLParser::parseToken(Token *t) { if (t->tid > 2*ID_CLOSE_TAG) { @@ -310,7 +310,7 @@ static bool isTableRelatedTag(int id) id == ID_TH); } -bool KHTMLParser::insertNode(NodeImpl *n, bool flat) +bool TDEHTMLParser::insertNode(NodeImpl *n, bool flat) { int id = n->id(); @@ -821,7 +821,7 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat) } -NodeImpl *KHTMLParser::getElement(Token* t) +NodeImpl *TDEHTMLParser::getElement(Token* t) { NodeImpl *n = 0; @@ -911,11 +911,11 @@ NodeImpl *KHTMLParser::getElement(Token* t) break; case ID_INPUT: if ( t->attrs && - KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() && - KHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled() && + TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() && + TDEHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled() && !strcasecmp( t->attrs->getValue( ATTR_TYPE ), "image" ) ) { - if (KHTMLFactory::defaultHTMLSettings()->isAdFiltered( doc()->completeURL( tdehtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() ) )) + if (TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered( doc()->completeURL( tdehtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() ) )) return 0; } n = new HTMLInputElementImpl(document, form); @@ -1038,11 +1038,11 @@ NodeImpl *KHTMLParser::getElement(Token* t) // images case ID_IMG: if (t->attrs&& - KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()&& - KHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled()) + TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()&& + TDEHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled()) { TQString url = doc()->completeURL( tdehtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() ); - if (KHTMLFactory::defaultHTMLSettings()->isAdFiltered(url)) + if (TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered(url)) return 0; } n = new HTMLImageElementImpl(document, form); @@ -1200,7 +1200,7 @@ NodeImpl *KHTMLParser::getElement(Token* t) return n; } -void KHTMLParser::processCloseTag(Token *t) +void TDEHTMLParser::processCloseTag(Token *t) { // support for really broken html. Can't believe I'm supporting such crap (lars) switch(t->tid) @@ -1244,7 +1244,7 @@ void KHTMLParser::processCloseTag(Token *t) #endif } -bool KHTMLParser::isResidualStyleTag(int _id) +bool TDEHTMLParser::isResidualStyleTag(int _id) { switch (_id) { case ID_A: @@ -1274,7 +1274,7 @@ bool KHTMLParser::isResidualStyleTag(int _id) } } -bool KHTMLParser::isAffectedByResidualStyle(int _id) +bool TDEHTMLParser::isAffectedByResidualStyle(int _id) { if (isResidualStyleTag(_id)) return true; @@ -1304,7 +1304,7 @@ bool KHTMLParser::isAffectedByResidualStyle(int _id) } } -void KHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem) +void TDEHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem) { // Find the element that crosses over to a higher level. // ### For now, if there is more than one, we will only make sure we close the residual style. @@ -1487,7 +1487,7 @@ void KHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem) // if it becomes necessary to do so. } -void KHTMLParser::reopenResidualStyleTags(HTMLStackElem* elem, DOM::NodeImpl* malformedTableParent) +void TDEHTMLParser::reopenResidualStyleTags(HTMLStackElem* elem, DOM::NodeImpl* malformedTableParent) { // Loop for each tag that needs to be reopened. while (elem) { @@ -1525,7 +1525,7 @@ void KHTMLParser::reopenResidualStyleTags(HTMLStackElem* elem, DOM::NodeImpl* ma } } -void KHTMLParser::pushBlock(int _id, int _level) +void TDEHTMLParser::pushBlock(int _id, int _level) { HTMLStackElem *Elem = new HTMLStackElem(_id, _level, current, m_inline, blockStack); @@ -1533,7 +1533,7 @@ void KHTMLParser::pushBlock(int _id, int _level) addForbidden(_id, forbiddenTag); } -void KHTMLParser::popBlock( int _id ) +void TDEHTMLParser::popBlock( int _id ) { HTMLStackElem *Elem = blockStack; int maxLevel = 0; @@ -1619,7 +1619,7 @@ void KHTMLParser::popBlock( int _id ) reopenResidualStyleTags(residualStyleStack, malformedTableParent); } -void KHTMLParser::popOneBlock(bool delBlock) +void TDEHTMLParser::popOneBlock(bool delBlock) { HTMLStackElem *Elem = blockStack; @@ -1661,20 +1661,20 @@ void KHTMLParser::popOneBlock(bool delBlock) delete Elem; } -void KHTMLParser::popInlineBlocks() +void TDEHTMLParser::popInlineBlocks() { while(blockStack && current->isInline() && current->id() != ID_FONT) popOneBlock(); } -void KHTMLParser::freeBlock() +void TDEHTMLParser::freeBlock() { while (blockStack) popOneBlock(); blockStack = 0; } -void KHTMLParser::createHead() +void TDEHTMLParser::createHead() { if(head || !doc()->firstChild()) return; @@ -1692,7 +1692,7 @@ void KHTMLParser::createHead() } } -NodeImpl *KHTMLParser::handleIsindex( Token *t ) +NodeImpl *TDEHTMLParser::handleIsindex( Token *t ) { NodeImpl *n; HTMLFormElementImpl *myform = form; @@ -1718,7 +1718,7 @@ NodeImpl *KHTMLParser::handleIsindex( Token *t ) return n; } -void KHTMLParser::startBody() +void TDEHTMLParser::startBody() { if(inBody) return; diff --git a/tdehtml/html/htmlparser.h b/tdehtml/html/htmlparser.h index 660ced9e9..79f2b14c7 100644 --- a/tdehtml/html/htmlparser.h +++ b/tdehtml/html/htmlparser.h @@ -44,7 +44,7 @@ #include "html/html_documentimpl.h" #include "html/RefPtr.h" -class KHTMLView; +class TDEHTMLView; class HTMLStackElem; namespace DOM { @@ -66,12 +66,12 @@ class Token; * The parser for html. It receives a stream of tokens from the HTMLTokenizer, and * builds up the Document structure form it. */ -class KHTMLParser +class TDEHTMLParser { public: - KHTMLParser( KHTMLView *w, DOM::DocumentImpl *i ); - KHTMLParser( DOM::DocumentFragmentImpl *frag, DOM::DocumentImpl *doc ); - virtual ~KHTMLParser(); + TDEHTMLParser( TDEHTMLView *w, DOM::DocumentImpl *i ); + TDEHTMLParser( DOM::DocumentFragmentImpl *frag, DOM::DocumentImpl *doc ); + virtual ~TDEHTMLParser(); /** * parses one token delivered by the tokenizer @@ -92,7 +92,7 @@ public: protected: - KHTMLView *HTMLWidget; + TDEHTMLView *HTMLWidget; DOM::DocumentImpl *document; /* diff --git a/tdehtml/html/htmltokenizer.cpp b/tdehtml/html/htmltokenizer.cpp index 83bfd4bd5..62d3ffab6 100644 --- a/tdehtml/html/htmltokenizer.cpp +++ b/tdehtml/html/htmltokenizer.cpp @@ -69,9 +69,9 @@ static const char styleEnd [] = "deref(this); if ( buffer ) - KHTML_DELETE_QCHAR_VEC(buffer); + TDEHTML_DELETE_QCHAR_VEC(buffer); buffer = dest = 0; size = 0; if ( scriptCode ) - KHTML_DELETE_QCHAR_VEC(scriptCode); + TDEHTML_DELETE_QCHAR_VEC(scriptCode); scriptCode = 0; scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0; @@ -186,7 +186,7 @@ void HTMLTokenizer::begin() onHold = false; reset(); size = 254; - buffer = KHTML_ALLOC_QCHAR_VEC( 255 ); + buffer = TDEHTML_ALLOC_QCHAR_VEC( 255 ); dest = buffer; tag = NoTag; pending = NonePending; @@ -1578,10 +1578,10 @@ void HTMLTokenizer::end() processToken(); if(buffer) - KHTML_DELETE_QCHAR_VEC(buffer); + TDEHTML_DELETE_QCHAR_VEC(buffer); if(scriptCode) - KHTML_DELETE_QCHAR_VEC(scriptCode); + TDEHTML_DELETE_QCHAR_VEC(scriptCode); scriptCode = 0; scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0; @@ -1621,7 +1621,7 @@ void HTMLTokenizer::finish() pos = TQConstString(scriptCode, scriptCodeSize).string().find('>'); food.setUnicode(scriptCode+pos+1, scriptCodeSize-pos-1); // deep copy } - KHTML_DELETE_QCHAR_VEC(scriptCode); + TDEHTML_DELETE_QCHAR_VEC(scriptCode); scriptCode = 0; scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0; if (script) @@ -1720,7 +1720,7 @@ void HTMLTokenizer::enlargeBuffer(int len) int newsize = kMax(size*2, size+len); int oldoffs = (dest - buffer); - buffer = KHTML_REALLOC_QCHAR_VEC(buffer, newsize); + buffer = TDEHTML_REALLOC_QCHAR_VEC(buffer, newsize); dest = buffer + oldoffs; size = newsize; } @@ -1728,7 +1728,7 @@ void HTMLTokenizer::enlargeBuffer(int len) void HTMLTokenizer::enlargeScriptBuffer(int len) { int newsize = kMax(scriptCodeMaxSize*2, scriptCodeMaxSize+len); - scriptCode = KHTML_REALLOC_QCHAR_VEC(scriptCode, newsize); + scriptCode = TDEHTML_REALLOC_QCHAR_VEC(scriptCode, newsize); scriptCodeMaxSize = newsize; } diff --git a/tdehtml/html/htmltokenizer.h b/tdehtml/html/htmltokenizer.h index 5222647d4..a79f65edf 100644 --- a/tdehtml/html/htmltokenizer.h +++ b/tdehtml/html/htmltokenizer.h @@ -41,7 +41,7 @@ #include "xml/dom_docimpl.h" class KCharsets; -class KHTMLView; +class TDEHTMLView; namespace DOM { class DocumentImpl; @@ -50,7 +50,7 @@ namespace DOM { namespace tdehtml { class CachedScript; - class KHTMLParser; + class TDEHTMLParser; /** * @internal @@ -120,9 +120,9 @@ namespace tdehtml { class HTMLTokenizer : public Tokenizer, public CachedObjectClient { - friend class KHTMLParser; + friend class TDEHTMLParser; public: - HTMLTokenizer(DOM::DocumentImpl *, KHTMLView * = 0); + HTMLTokenizer(DOM::DocumentImpl *, TDEHTMLView * = 0); HTMLTokenizer(DOM::DocumentImpl *, DOM::DocumentFragmentImpl *frag); virtual ~HTMLTokenizer(); @@ -347,9 +347,9 @@ protected: tdehtml::TokenizerString src; KCharsets *charsets; - KHTMLParser *parser; + TDEHTMLParser *parser; - KHTMLView *view; + TDEHTMLView *view; }; } // namespace diff --git a/tdehtml/htmlpageinfo.ui b/tdehtml/htmlpageinfo.ui index 5dd21cd6f..2315771ae 100644 --- a/tdehtml/htmlpageinfo.ui +++ b/tdehtml/htmlpageinfo.ui @@ -1,5 +1,5 @@ -KHTMLInfoDlg +TDEHTMLInfoDlg A dialog to display the HTTP headers for a given page. George Staikos <staikos@kde.org> diff --git a/tdehtml/java/kjavaappletcontext.h b/tdehtml/java/kjavaappletcontext.h index 119699f23..8ccedfe38 100644 --- a/tdehtml/java/kjavaappletcontext.h +++ b/tdehtml/java/kjavaappletcontext.h @@ -30,7 +30,7 @@ * @short Provides a context for KJavaAppletWidgets * * Applets run in a context- (see the Java documentation for more information - * on contexts). Currently, each document in KHTML creates one context, in + * on contexts). Currently, each document in TDEHTML creates one context, in * which multiple applets can run. * * @author Richard J. Moore, rich@kde.org @@ -112,12 +112,12 @@ signals: void showStatus ( const TQString& txt ); /** - * Signals the KHTML Part to show a url in a given target + * Signals the TDEHTML Part to show a url in a given target */ void showDocument( const TQString& url, const TQString& target ); /** - * Signals the KHTML Part an applet is loaded + * Signals the TDEHTML Part an applet is loaded **/ void appletLoaded(); diff --git a/tdehtml/java/kjavaappletviewer.cpp b/tdehtml/java/kjavaappletviewer.cpp index 194a6324a..913678092 100644 --- a/tdehtml/java/kjavaappletviewer.cpp +++ b/tdehtml/java/kjavaappletviewer.cpp @@ -241,15 +241,15 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, kdDebug(6100) << "name=" << name << " value=" << value << endl; if (!name.isEmpty()) { const TQString name_lower = name.lower (); - if (name == "__KHTML__PLUGINBASEURL") { + if (name == "__TDEHTML__PLUGINBASEURL") { baseurl = KURL (KURL (value), TQString (".")).url (); - } else if (name == "__KHTML__CODEBASE") + } else if (name == "__TDEHTML__CODEBASE") tdehtml_codebase = value; else if (name_lower == TQString::fromLatin1("codebase") || name_lower == TQString::fromLatin1("java_codebase")) { if (!value.isEmpty ()) codebase = value; - } else if (name == "__KHTML__CLASSID") + } else if (name == "__TDEHTML__CLASSID") //else if (name.lower()==TQString::fromLatin1("classid")) classid = value; else if (name_lower == TQString::fromLatin1("code") || @@ -267,7 +267,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, width = value.toInt(); else if (name_lower == TQString::fromLatin1("height")) height = value.toInt(); - if (!name.startsWith ("__KHTML__")) { + if (!name.startsWith ("__TDEHTML__")) { applet->setParameter (name, value); } } diff --git a/tdehtml/misc/decoder.h b/tdehtml/misc/decoder.h index 2fcda7904..163e44ca7 100644 --- a/tdehtml/misc/decoder.h +++ b/tdehtml/misc/decoder.h @@ -19,8 +19,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef KHTMLDECODER_H -#define KHTMLDECODER_H +#ifndef TDEHTMLDECODER_H +#define TDEHTMLDECODER_H #include class TQTextCodec; diff --git a/tdehtml/misc/htmltags.h b/tdehtml/misc/htmltags.h index a2fb0fe55..d8fbb3236 100644 --- a/tdehtml/misc/htmltags.h +++ b/tdehtml/misc/htmltags.h @@ -1,8 +1,8 @@ /* This file is automatically generated from htmltags.in by maketags, do not edit */ /* Copyright 1999 Lars Knoll */ -#ifndef KHTML_TAGS_H -#define KHTML_TAGS_H +#ifndef TDEHTML_TAGS_H +#define TDEHTML_TAGS_H #include "dom/dom_string.h" #include diff --git a/tdehtml/misc/loader.cpp b/tdehtml/misc/loader.cpp index 5cd18f29b..6f19d01aa 100644 --- a/tdehtml/misc/loader.cpp +++ b/tdehtml/misc/loader.cpp @@ -486,7 +486,7 @@ CachedImage::CachedImage(DocLoader* dl, const DOMString &url, TDEIO::CacheContro setAccept( acceptHeader ); m_showAnimations = dl->showAnimations(); - if ( KHTMLFactory::defaultHTMLSettings()->isAdFiltered( url.string() ) ) { + if ( TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered( url.string() ) ) { m_wasBlocked = true; CachedObject::finish(); } @@ -735,13 +735,13 @@ void CachedImage::movieStatus(int status) } if((status == TQMovie::EndOfMovie && (!m || m->frameNumber() <= 1)) || - ((status == TQMovie::EndOfLoop) && (m_showAnimations == KHTMLSettings::KAnimationLoopOnce)) || - ((status == TQMovie::EndOfFrame) && (m_showAnimations == KHTMLSettings::KAnimationDisabled)) + ((status == TQMovie::EndOfLoop) && (m_showAnimations == TDEHTMLSettings::KAnimationLoopOnce)) || + ((status == TQMovie::EndOfFrame) && (m_showAnimations == TDEHTMLSettings::KAnimationDisabled)) ) { if(imgSource) { - setShowAnimations( KHTMLSettings::KAnimationDisabled ); + setShowAnimations( TDEHTMLSettings::KAnimationDisabled ); // monochrome alphamasked images are usually about 10000 times // faster to draw, so this is worth the hack @@ -779,10 +779,10 @@ void CachedImage::movieResize(const TQSize& /*s*/) do_notify(m->framePixmap(), TQRect()); } -void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimations ) +void CachedImage::setShowAnimations( TDEHTMLSettings::KAnimationAdvice showAnimations ) { m_showAnimations = showAnimations; - if ( (m_showAnimations == KHTMLSettings::KAnimationDisabled) && imgSource ) { + if ( (m_showAnimations == TDEHTMLSettings::KAnimationDisabled) && imgSource ) { imgSource->cleanBuffer(); delete p; p = new TQPixmap(m->framePixmap()); @@ -941,13 +941,13 @@ Request::~Request() // ------------------------------------------------------------------------------------------ -DocLoader::DocLoader(KHTMLPart* part, DocumentImpl* doc) +DocLoader::DocLoader(TDEHTMLPart* part, DocumentImpl* doc) { m_cachePolicy = TDEIO::CC_Verify; m_expireDate = 0; m_creationDate = time(0); m_bautoloadImages = true; - m_showAnimations = KHTMLSettings::KAnimationEnabled; + m_showAnimations = TDEHTMLSettings::KAnimationEnabled; m_part = part; m_doc = doc; @@ -1052,8 +1052,8 @@ CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, co CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const TQString& charset) { DOCLOADER_SECCHECK(true); - if ( ! KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(fullURL.host()) || - KHTMLFactory::defaultHTMLSettings()->isAdFiltered(fullURL.url())) + if ( ! TDEHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(fullURL.host()) || + TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered(fullURL.url())) return 0L; CachedScript* s = Cache::requestObject( this, fullURL, 0 ); @@ -1086,7 +1086,7 @@ void DocLoader::setAutoloadImages( bool enable ) } } -void DocLoader::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimations ) +void DocLoader::setShowAnimations( TDEHTMLSettings::KAnimationAdvice showAnimations ) { if ( showAnimations == m_showAnimations ) return; m_showAnimations = showAnimations; @@ -1162,7 +1162,7 @@ void Loader::servePendingRequests() { job->addMetaData( "referrer", req->m_docLoader->doc()->URL().url() ); - KHTMLPart *part = req->m_docLoader->part(); + TDEHTMLPart *part = req->m_docLoader->part(); if (part ) { job->addMetaData( "cross-domain", part->toplevelURL().url() ); @@ -1356,7 +1356,7 @@ void Cache::init() nullPixmap = new TQPixmap; if ( !brokenPixmap ) - brokenPixmap = new TQPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState)); + brokenPixmap = new TQPixmap(TDEHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState)); if ( !blockedPixmap ) { blockedPixmap = new TQPixmap(); diff --git a/tdehtml/misc/loader.h b/tdehtml/misc/loader.h index fa00b4ffb..f885ec33e 100644 --- a/tdehtml/misc/loader.h +++ b/tdehtml/misc/loader.h @@ -55,7 +55,7 @@ #include class TQMovie; -class KHTMLPart; +class TDEHTMLPart; namespace TDEIO { class Job; @@ -183,7 +183,7 @@ namespace tdehtml CachedObject* m_next; CachedObject* m_prev; friend class Cache; - friend class ::KHTMLPart; + friend class ::TDEHTMLPart; }; @@ -286,7 +286,7 @@ namespace tdehtml const TQString& suggestedTitle() const { return m_suggestedFilename; } #endif - void setShowAnimations( KHTMLSettings::KAnimationAdvice ); + void setShowAnimations( TDEHTMLSettings::KAnimationAdvice ); void pauseAnimations(); void resumeAnimations(); @@ -331,10 +331,10 @@ namespace tdehtml bool typeChecked : 1; bool isFullyTransparent : 1; bool monochrome : 1; - KHTMLSettings::KAnimationAdvice m_showAnimations : 2; + TDEHTMLSettings::KAnimationAdvice m_showAnimations : 2; friend class Cache; - friend class ::KHTMLPart; + friend class ::TDEHTMLPart; }; /** @@ -345,7 +345,7 @@ namespace tdehtml class DocLoader { public: - DocLoader(KHTMLPart*, DOM::DocumentImpl*); + DocLoader(TDEHTMLPart*, DOM::DocumentImpl*); ~DocLoader(); CachedImage *requestImage( const DOM::DOMString &url); @@ -355,16 +355,16 @@ namespace tdehtml bool autoloadImages() const { return m_bautoloadImages; } TDEIO::CacheControl cachePolicy() const { return m_cachePolicy; } - KHTMLSettings::KAnimationAdvice showAnimations() const { return m_showAnimations; } + TDEHTMLSettings::KAnimationAdvice showAnimations() const { return m_showAnimations; } time_t expireDate() const { return m_expireDate; } - KHTMLPart* part() const { return m_part; } + TDEHTMLPart* part() const { return m_part; } DOM::DocumentImpl* doc() const { return m_doc; } void setCacheCreationDate( time_t ); void setExpireDate( time_t, bool relative ); void setAutoloadImages( bool ); void setCachePolicy( TDEIO::CacheControl cachePolicy ) { m_cachePolicy = cachePolicy; } - void setShowAnimations( KHTMLSettings::KAnimationAdvice ); + void setShowAnimations( TDEHTMLSettings::KAnimationAdvice ); void pauseAnimations(); void resumeAnimations(); void insertCachedObject( CachedObject* o ) const; @@ -375,7 +375,7 @@ namespace tdehtml friend class Cache; friend class DOM::DocumentImpl; - friend class ::KHTMLPart; + friend class ::TDEHTMLPart; TQStringList m_reloadedURLs; mutable TQPtrDict m_docObjects; @@ -383,8 +383,8 @@ namespace tdehtml time_t m_creationDate; TDEIO::CacheControl m_cachePolicy; bool m_bautoloadImages : 1; - KHTMLSettings::KAnimationAdvice m_showAnimations : 2; - KHTMLPart* m_part; + TDEHTMLSettings::KAnimationAdvice m_showAnimations : 2; + TDEHTMLPart* m_part; DOM::DocumentImpl* m_doc; }; diff --git a/tdehtml/misc/maketags b/tdehtml/misc/maketags index a460cf8e4..b2b472892 100644 --- a/tdehtml/misc/maketags +++ b/tdehtml/misc/maketags @@ -37,8 +37,8 @@ print header < diff --git a/tdehtml/misc/stringit.h b/tdehtml/misc/stringit.h index a93a59e4d..74cdd471e 100644 --- a/tdehtml/misc/stringit.h +++ b/tdehtml/misc/stringit.h @@ -23,8 +23,8 @@ // // KDE HTML Widget -- String class -#ifndef KHTMLSTRING_H -#define KHTMLSTRING_H +#ifndef TDEHTMLSTRING_H +#define TDEHTMLSTRING_H #include "dom/dom_string.h" diff --git a/tdehtml/rendering/bidi.cpp b/tdehtml/rendering/bidi.cpp index a79ac9854..7916a9c4f 100644 --- a/tdehtml/rendering/bidi.cpp +++ b/tdehtml/rendering/bidi.cpp @@ -618,7 +618,7 @@ InlineFlowBox* RenderBlock::createLineBoxes(RenderObject* obj) { // See if we have an unconstructed line box for this object that is also // the last item on the line. - KHTMLAssert(obj->isInlineFlow() || obj == this); + TDEHTMLAssert(obj->isInlineFlow() || obj == this); RenderFlow* flow = static_cast(obj); // Get the last box we made for this render object. @@ -633,7 +633,7 @@ InlineFlowBox* RenderBlock::createLineBoxes(RenderObject* obj) // We need to make a new box for this render object. Once // made, we need to place it at the end of the current line. InlineBox* newBox = obj->createInlineBox(false, obj == this); - KHTMLAssert(newBox->isInlineFlowBox()); + TDEHTMLAssert(newBox->isInlineFlowBox()); box = static_cast(newBox); box->setFirstLineStyleBit(m_firstLine); @@ -673,7 +673,7 @@ InlineFlowBox* RenderBlock::constructLine(const BidiIterator &/*start*/, const B // We should have a root inline box. It should be unconstructed and // be the last continuation of our line list. - KHTMLAssert(lastLineBox() && !lastLineBox()->isConstructed()); + TDEHTMLAssert(lastLineBox() && !lastLineBox()->isConstructed()); // Set bits on our inline flow boxes that indicate which sides should // paint borders/margins/padding. This knowledge will ultimately be used when @@ -719,7 +719,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi int availableWidth = lineWidth(m_height); switch(style()->textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: numSpaces = 0; break; case JUSTIFY: @@ -732,12 +732,12 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi if (bidi.context->basicDir == TQChar::DirL) break; case RIGHT: - case KHTML_RIGHT: + case TDEHTML_RIGHT: x += availableWidth - totWidth; numSpaces = 0; break; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: int xd = (availableWidth - totWidth)/2; x += xd >0 ? xd : 0; numSpaces = 0; @@ -756,7 +756,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi spaces++; } - KHTMLAssert(spaces <= numSpaces); + TDEHTMLAssert(spaces <= numSpaces); // Only justify text with white-space: normal. if (r->obj->style()->whiteSpace() == NORMAL) { @@ -1986,7 +1986,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi } } } else - KHTMLAssert( false ); + TDEHTMLAssert( false ); InlineMinMaxIterator savedIt = lastIt; lastIt = it; diff --git a/tdehtml/rendering/font.cpp b/tdehtml/rendering/font.cpp index 3ace5ddd1..b7632fc8d 100644 --- a/tdehtml/rendering/font.cpp +++ b/tdehtml/rendering/font.cpp @@ -417,7 +417,7 @@ bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font) void Font::update( TQPaintDeviceMetrics* devMetrics ) const { - f.setFamily( fontDef.family.isEmpty() ? KHTMLFactory::defaultHTMLSettings()->stdFontName() : fontDef.family ); + f.setFamily( fontDef.family.isEmpty() ? TDEHTMLFactory::defaultHTMLSettings()->stdFontName() : fontDef.family ); f.setItalic( fontDef.italic ); f.setWeight( fontDef.weight ); diff --git a/tdehtml/rendering/font.h b/tdehtml/rendering/font.h index 81110e0d0..e34f54207 100644 --- a/tdehtml/rendering/font.h +++ b/tdehtml/rendering/font.h @@ -22,8 +22,8 @@ * */ -#ifndef KHTMLFONT_H -#define KHTMLFONT_H +#ifndef TDEHTMLFONT_H +#define TDEHTMLFONT_H #include #include diff --git a/tdehtml/rendering/render_applet.cpp b/tdehtml/rendering/render_applet.cpp index 1b65ca8de..d14a93553 100644 --- a/tdehtml/rendering/render_applet.cpp +++ b/tdehtml/rendering/render_applet.cpp @@ -48,9 +48,9 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, const TQMapgetDocument()->view(); + TDEHTMLView *_view = applet->getDocument()->view(); if ( _view ) { - KHTMLPart *part = _view->part(); + TDEHTMLPart *part = _view->part(); context = part->createJavaContext(); } @@ -89,8 +89,8 @@ void RenderApplet::layout() { //kdDebug(6100) << "RenderApplet::layout" << endl; - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); calcWidth(); calcHeight(); diff --git a/tdehtml/rendering/render_applet.h b/tdehtml/rendering/render_applet.h index 24907edaa..62d023728 100644 --- a/tdehtml/rendering/render_applet.h +++ b/tdehtml/rendering/render_applet.h @@ -28,7 +28,7 @@ #include #include -class KHTMLView; +class TDEHTMLView; namespace DOM { class HTMLElementImpl; diff --git a/tdehtml/rendering/render_arena.cpp b/tdehtml/rendering/render_arena.cpp index 14c55ef89..d3fe1676e 100644 --- a/tdehtml/rendering/render_arena.cpp +++ b/tdehtml/rendering/render_arena.cpp @@ -43,7 +43,7 @@ using namespace tdehtml; namespace tdehtml { //#ifdef NDEBUG -#define KHTML_USE_ARENA_ALLOCATOR +#define TDEHTML_USE_ARENA_ALLOCATOR //#endif typedef struct { @@ -78,7 +78,7 @@ RenderArena::~RenderArena() void* RenderArena::allocate(size_t size) { -#ifndef KHTML_USE_ARENA_ALLOCATOR +#ifndef TDEHTML_USE_ARENA_ALLOCATOR // Use standard malloc so that memory debugging tools work. void *block = ::malloc(sizeof(RenderArenaDebugHeader) + size); RenderArenaDebugHeader *header = (RenderArenaDebugHeader *)block; @@ -89,10 +89,10 @@ void* RenderArena::allocate(size_t size) void* result = 0; // Ensure we have correct alignment for pointers. Important for Tru64 - size = KHTML_ROUNDUP(size, sizeof(void*)); + size = TDEHTML_ROUNDUP(size, sizeof(void*)); // Check recyclers first - if (size < KHTML_MAX_RECYCLED_SIZE) { + if (size < TDEHTML_MAX_RECYCLED_SIZE) { const int index = size >> 2; result = m_recyclers[index]; @@ -117,7 +117,7 @@ void* RenderArena::allocate(size_t size) void RenderArena::free(size_t size, void* ptr) { -#ifndef KHTML_USE_ARENA_ALLOCATOR +#ifndef TDEHTML_USE_ARENA_ALLOCATOR // Use standard free so that memory debugging tools work. assert(this); RenderArenaDebugHeader *header = (RenderArenaDebugHeader *)ptr - 1; @@ -131,10 +131,10 @@ void RenderArena::free(size_t size, void* ptr) #endif // Ensure we have correct alignment for pointers. Important for Tru64 - size = KHTML_ROUNDUP(size, sizeof(void*)); + size = TDEHTML_ROUNDUP(size, sizeof(void*)); // See if it's a size that we recycle - if (size < KHTML_MAX_RECYCLED_SIZE) { + if (size < TDEHTML_MAX_RECYCLED_SIZE) { const int index = size >> 2; void* currentTop = m_recyclers[index]; m_recyclers[index] = ptr; diff --git a/tdehtml/rendering/render_arena.h b/tdehtml/rendering/render_arena.h index 1beab6fed..a0b00ab81 100644 --- a/tdehtml/rendering/render_arena.h +++ b/tdehtml/rendering/render_arena.h @@ -43,8 +43,8 @@ namespace tdehtml { -#define KHTML_MAX_RECYCLED_SIZE 400 -#define KHTML_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) +#define TDEHTML_MAX_RECYCLED_SIZE 400 +#define TDEHTML_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) class RenderArena: public Shared { public: @@ -61,7 +61,7 @@ private: // The recycler array is sparse with the indices being multiples of 4, // i.e., 0, 4, 8, 12, 16, 20, ... - void* m_recyclers[KHTML_MAX_RECYCLED_SIZE >> 2]; + void* m_recyclers[TDEHTML_MAX_RECYCLED_SIZE >> 2]; }; diff --git a/tdehtml/rendering/render_block.cpp b/tdehtml/rendering/render_block.cpp index 3c6c79543..82d99cf41 100644 --- a/tdehtml/rendering/render_block.cpp +++ b/tdehtml/rendering/render_block.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) @@ -279,7 +279,7 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi // needed in cases of things like anonymous tables. if (beforeChild && beforeChild->parent() != this) { - KHTMLAssert(beforeChild->parent()); + TDEHTMLAssert(beforeChild->parent()); // In the special case where we are prepending a block-level element before // something contained inside an anonymous block, we can just prepend it before @@ -317,8 +317,8 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi if (beforeChild && beforeChild->parent() != this) { beforeChild = beforeChild->parent(); - KHTMLAssert(beforeChild->isAnonymousBlock()); - KHTMLAssert(beforeChild->parent() == this); + TDEHTMLAssert(beforeChild->isAnonymousBlock()); + TDEHTMLAssert(beforeChild->parent() == this); } } else if (!m_childrenInline && !newChild->isFloatingOrPositioned()) @@ -421,8 +421,8 @@ void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint) // means that we cannot coalesce inlines before |insertionPoint| with inlines following // |insertionPoint|, because the new child is going to be inserted in between the inlines, // splitting them. - KHTMLAssert(isReplacedBlock() || !isInline()); - KHTMLAssert(!insertionPoint || insertionPoint->parent() == this); + TDEHTMLAssert(isReplacedBlock() || !isInline()); + TDEHTMLAssert(!insertionPoint || insertionPoint->parent() == this); m_childrenInline = false; @@ -454,8 +454,8 @@ void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint) void RenderBlock::makePageBreakAvoidBlocks() { - KHTMLAssert(!childrenInline()); - KHTMLAssert(canvas()->pagedMode()); + TDEHTMLAssert(!childrenInline()); + TDEHTMLAssert(canvas()->pagedMode()); RenderObject *breakAfter = firstChild(); RenderObject *breakBefore = breakAfter ? breakAfter->nextSibling() : 0; @@ -620,8 +620,8 @@ void RenderBlock::layoutBlock(bool relayoutChildren) // kdDebug( 6040 ) << renderName() << " " << this << "::layoutBlock() start" << endl; // TQTime t; // t.start(); - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); if (canvas()->pagedMode()) relayoutChildren = true; @@ -737,7 +737,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren) // Check for an overhanging float first. // FIXME: This needs to look at the last flow, not the last child. if (lastChild() && lastChild()->hasOverhangingFloats() && !lastChild()->hasOverflowClip()) { - KHTMLAssert(lastChild()->isRenderBlock()); + TDEHTMLAssert(lastChild()->isRenderBlock()); m_height = lastChild()->yPos() + static_cast(lastChild())->floatBottom(); m_height += borderBottom() + paddingBottom(); } @@ -950,7 +950,7 @@ void RenderBlock::insertCompactIfNeeded(RenderObject* child, CompactInfo& compac int compactYPos = child->yPos() + child->borderTop() + child->paddingTop() - compactChild->paddingTop() - compactChild->borderTop(); int adj = 0; - KHTMLAssert(child->isRenderBlock()); + TDEHTMLAssert(child->isRenderBlock()); InlineRunBox *b = static_cast(child)->firstLineBox(); InlineRunBox *c = static_cast(compactChild)->firstLineBox(); if (b && c) { @@ -1162,8 +1162,8 @@ void RenderBlock::clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInf bool RenderBlock::canClear(RenderObject *child, PageBreakLevel level) { - KHTMLAssert(child->parent() && child->parent() == this); - KHTMLAssert(canvas()->pagedMode()); + TDEHTMLAssert(child->parent() && child->parent() == this); + TDEHTMLAssert(canvas()->pagedMode()); // Positioned elements cannot be moved. Only normal flow and floating. if (child->isPositioned() || child->isRelPositioned()) return false; @@ -1190,8 +1190,8 @@ bool RenderBlock::canClear(RenderObject *child, PageBreakLevel level) void RenderBlock::clearPageBreak(RenderObject* child, int pageBottom) { - KHTMLAssert(child->parent() && child->parent() == this); - KHTMLAssert(canvas()->pagedMode()); + TDEHTMLAssert(child->parent() && child->parent() == this); + TDEHTMLAssert(canvas()->pagedMode()); if (child->yPos() >= pageBottom) return; @@ -1257,7 +1257,7 @@ void RenderBlock::determineHorizontalPosition(RenderObject* child) // to shift over as necessary to dodge any floats that might get in the way. if (child->flowAroundFloats()) { int leftOff = leftOffset(m_height); - if (style()->textAlign() != KHTML_CENTER && !child->style()->marginLeft().isVariable()) { + if (style()->textAlign() != TDEHTML_CENTER && !child->style()->marginLeft().isVariable()) { if (child->marginLeft() < 0) leftOff += child->marginLeft(); chPos = kMax(chPos, leftOff); // Let the float sit in the child's margin if it can fit. @@ -1281,7 +1281,7 @@ void RenderBlock::determineHorizontalPosition(RenderObject* child) int chPos = xPos - (child->width() + child->marginRight()); if (child->flowAroundFloats()) { int rightOff = rightOffset(m_height); - if (style()->textAlign() != KHTML_CENTER && !child->style()->marginRight().isVariable()) { + if (style()->textAlign() != TDEHTML_CENTER && !child->style()->marginRight().isVariable()) { if (child->marginRight() < 0) rightOff -= child->marginRight(); chPos = kMin(chPos, rightOff - child->width()); // Let the float sit in the child's margin if it can fit. @@ -1789,7 +1789,7 @@ void RenderBlock::insertFloatingObject(RenderObject *o) else { // We should never get here, as insertFloatingObject() should only ever be called with floating // objects. - KHTMLAssert(false); + TDEHTMLAssert(false); newObj = 0; // keep gcc's uninitialized variable warnings happy } @@ -2568,7 +2568,7 @@ bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, void RenderBlock::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << "(RenderBlock)::calcMinMaxWidth() this=" << this << endl; diff --git a/tdehtml/rendering/render_block.h b/tdehtml/rendering/render_block.h index 84fd15a0b..36d3f6cc4 100644 --- a/tdehtml/rendering/render_block.h +++ b/tdehtml/rendering/render_block.h @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) diff --git a/tdehtml/rendering/render_box.cpp b/tdehtml/rendering/render_box.cpp index 4cf7080c7..d138d3ee2 100644 --- a/tdehtml/rendering/render_box.cpp +++ b/tdehtml/rendering/render_box.cpp @@ -119,7 +119,7 @@ static inline bool overflowAppliesTo(RenderObject* o) // css 2.1-11.1.1 // 1) overflow only applies to non-replaced block-level elements, table cells, and inline-block elements if (o->isRenderBlock() || o->isTableRow() || o->isTableSection()) - // 2) overflow on root applies to the viewport (cf. KHTMLView::layout) + // 2) overflow on root applies to the viewport (cf. TDEHTMLView::layout) if (!o->isRoot()) // 3) overflow on body may apply to the viewport... if (!o->isBody() @@ -995,7 +995,7 @@ void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw { if ( (ml.isVariable() && mr.isVariable() && m_widthstyle()->textAlign() == KHTML_CENTER) ) + containingBlock()->style()->textAlign() == TDEHTML_CENTER) ) { m_marginLeft = (cw - m_width)/2; if (m_marginLeft<0) m_marginLeft=0; @@ -1003,14 +1003,14 @@ void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw } else if ( (mr.isVariable() && m_widthstyle()->direction() == RTL && - containingBlock()->style()->textAlign() == KHTML_LEFT)) + containingBlock()->style()->textAlign() == TDEHTML_LEFT)) { m_marginLeft = ml.width(cw); m_marginRight = cw - m_width - m_marginLeft; } else if ( (ml.isVariable() && m_widthstyle()->direction() == LTR && - containingBlock()->style()->textAlign() == KHTML_RIGHT)) + containingBlock()->style()->textAlign() == TDEHTML_RIGHT)) { m_marginRight = mr.width(cw); m_marginLeft = cw - m_width - m_marginRight; @@ -2295,15 +2295,15 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width // ### regard direction switch (s->textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: case TAAUTO: // ### find out what this does case JUSTIFY: break; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: _x += contentWidth() / 2; break; - case KHTML_RIGHT: + case TDEHTML_RIGHT: case RIGHT: _x += contentWidth(); break; diff --git a/tdehtml/rendering/render_canvas.cpp b/tdehtml/rendering/render_canvas.cpp index 53dc32162..a3dc548b2 100644 --- a/tdehtml/rendering/render_canvas.cpp +++ b/tdehtml/rendering/render_canvas.cpp @@ -36,7 +36,7 @@ using namespace tdehtml; //#define BOX_DEBUG //#define SPEED_DEBUG -RenderCanvas::RenderCanvas(DOM::NodeImpl* node, KHTMLView *view) +RenderCanvas::RenderCanvas(DOM::NodeImpl* node, TDEHTMLView *view) : RenderBlock(node) { // init RenderObject attributes @@ -103,7 +103,7 @@ void RenderCanvas::calcHeight() void RenderCanvas::calcWidth() { - // the width gets set by KHTMLView::print when printing to a printer. + // the width gets set by TDEHTMLView::print when printing to a printer. if(m_pagedMode || !m_view) { m_width = m_rootWidth; @@ -125,7 +125,7 @@ void RenderCanvas::calcWidth() void RenderCanvas::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); RenderBlock::calcMinMaxWidth(); @@ -271,7 +271,7 @@ bool RenderCanvas::needsFullRepaint() const void RenderCanvas::repaintViewRectangle(int x, int y, int w, int h, bool asap) { - KHTMLAssert( view() ); + TDEHTMLAssert( view() ); view()->scheduleRepaint( x, y, w, h, asap ); } diff --git a/tdehtml/rendering/render_canvas.h b/tdehtml/rendering/render_canvas.h index 8495b87bc..6c05a4945 100644 --- a/tdehtml/rendering/render_canvas.h +++ b/tdehtml/rendering/render_canvas.h @@ -25,7 +25,7 @@ #include "render_block.h" -class KHTMLView; +class TDEHTMLView; class TQScrollView; namespace tdehtml { @@ -42,7 +42,7 @@ enum CanvasMode { class RenderCanvas : public RenderBlock { public: - RenderCanvas(DOM::NodeImpl* node, KHTMLView *view); + RenderCanvas(DOM::NodeImpl* node, TDEHTMLView *view); ~RenderCanvas(); virtual const char *renderName() const { return "RenderCanvas"; } @@ -59,7 +59,7 @@ public: int docHeight() const; int docWidth() const; - KHTMLView *view() const { return m_view; } + TDEHTMLView *view() const { return m_view; } virtual void repaint(Priority p=NormalPriority); virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); @@ -145,7 +145,7 @@ protected: virtual TQRect viewRect() const; - KHTMLView *m_view; + TDEHTMLView *m_view; RenderObject* m_selectionStart; RenderObject* m_selectionEnd; diff --git a/tdehtml/rendering/render_container.cpp b/tdehtml/rendering/render_container.cpp index b91bc91df..bf0cd37ec 100644 --- a/tdehtml/rendering/render_container.cpp +++ b/tdehtml/rendering/render_container.cpp @@ -127,7 +127,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild break; case NONE: // RenderHtml and some others can have display:none - // KHTMLAssert(false); + // TDEHTMLAssert(false); break; } } @@ -167,7 +167,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild) { - KHTMLAssert(oldChild->parent() == this); + TDEHTMLAssert(oldChild->parent() == this); // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or // that a positioned child got yanked). We also repaint, so that the area exposed when the child @@ -465,7 +465,7 @@ void RenderContainer::updateReplacedContent() void RenderContainer::appendChildNode(RenderObject* newChild) { - KHTMLAssert(newChild->parent() == 0); + TDEHTMLAssert(newChild->parent() == 0); newChild->setParent(this); RenderObject* lChild = lastChild(); @@ -499,10 +499,10 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC return; } - KHTMLAssert(!child->parent()); + TDEHTMLAssert(!child->parent()); while ( beforeChild->parent() != this && beforeChild->parent()->isAnonymousBlock() ) beforeChild = beforeChild->parent(); - KHTMLAssert(beforeChild->parent() == this); + TDEHTMLAssert(beforeChild->parent() == this); if(beforeChild == firstChild()) setFirstChild(child); @@ -526,8 +526,8 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC void RenderContainer::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); const bool pagedMode = canvas()->pagedMode(); RenderObject *child = firstChild(); while( child ) { diff --git a/tdehtml/rendering/render_flow.cpp b/tdehtml/rendering/render_flow.cpp index 71456d0a8..272ceb2db 100644 --- a/tdehtml/rendering/render_flow.cpp +++ b/tdehtml/rendering/render_flow.cpp @@ -289,7 +289,7 @@ void RenderFlow::repaint(Priority prior) for (RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isInlineFlow() && inlineFlow != cb; inlineFlow = inlineFlow->parent()) { if (inlineFlow->style() && inlineFlow->style()->position() == RELATIVE && inlineFlow->layer()) { - KHTMLAssert(inlineFlow->isBox()); + TDEHTMLAssert(inlineFlow->isBox()); static_cast(inlineFlow)->relativePositionOffset(left, top); } } diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 2872a0e6c..5c8249b6b 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -83,8 +83,8 @@ void RenderFormElement::updateFromElement() void RenderFormElement::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); // minimum height m_height = 0; @@ -103,13 +103,13 @@ TQ_Alignment RenderFormElement::textAlignment() const { switch (style()->textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: return Qt::AlignLeft; case RIGHT: - case KHTML_RIGHT: + case TDEHTML_RIGHT: return Qt::AlignRight; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: return Qt::AlignHCenter; case JUSTIFY: // Just fall into the auto code for justify. @@ -152,7 +152,7 @@ RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element) void RenderCheckBox::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast( m_widget ); TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ), @@ -204,7 +204,7 @@ void RenderRadioButton::updateFromElement() void RenderRadioButton::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast( m_widget ); TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), @@ -251,7 +251,7 @@ TQString RenderSubmitButton::rawText() void RenderSubmitButton::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TQString raw = rawText(); TQPushButton* pb = static_cast(m_widget); @@ -307,7 +307,7 @@ RenderResetButton::RenderResetButton(HTMLInputElementImpl *element) // ------------------------------------------------------------------------------- -LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view, TQWidget* parent) +LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* view, TQWidget* parent) : KLineEdit(parent, "__tdehtml"), m_input(input), m_view(view), m_spell(0) { setMouseTracking(true); @@ -532,7 +532,7 @@ void RenderLineEdit::handleFocusOut() void RenderLineEdit::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); const TQFontMetrics &fm = style()->fontMetrics(); TQSize s; @@ -797,7 +797,7 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element) void RenderFileButton::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); const TQFontMetrics &fm = style()->fontMetrics(); int size = element()->size(); @@ -1032,7 +1032,7 @@ void RenderSelect::updateFromElement() static_cast(m_widget)->insertItem(text, listIndex); } else - KHTMLAssert(false); + TDEHTMLAssert(false); m_selectionChanged = true; } @@ -1058,7 +1058,7 @@ void RenderSelect::updateFromElement() void RenderSelect::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); if (m_optionsChanged) updateFromElement(); @@ -1074,8 +1074,8 @@ void RenderSelect::calcMinMaxWidth() void RenderSelect::layout( ) { - KHTMLAssert(needsLayout()); - KHTMLAssert(minMaxKnown()); + TDEHTMLAssert(needsLayout()); + TDEHTMLAssert(minMaxKnown()); // ### maintain selection properly between type/size changes, and work // out how to handle multiselect->singleselect (probably just select @@ -1137,7 +1137,7 @@ void RenderSelect::slotSelected(int index) // emitted by the combobox only { if ( m_ignoreSelectEvents ) return; - KHTMLAssert( !m_useListBox ); + TDEHTMLAssert( !m_useListBox ); TQMemArray listItems = element()->listItems(); if(index >= 0 && index < int(listItems.size())) @@ -1561,7 +1561,7 @@ void TextAreaWidget::slotFind() if ( m_findDlg ) { KWin::activateWindow( m_findDlg->winId() ); } else { - m_findDlg = new KFindDialog(false, this, "KHTML Text Area Find Dialog"); + m_findDlg = new KFindDialog(false, this, "TDEHTML Text Area Find Dialog"); connect( m_findDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoFind()) ); } m_findDlg->show(); @@ -1576,7 +1576,7 @@ void TextAreaWidget::slotReplace() if ( m_repDlg ) { KWin::activateWindow( m_repDlg->winId() ); } else { - m_repDlg = new KReplaceDialog(this, "KHTMLText Area Replace Dialog", 0, + m_repDlg = new KReplaceDialog(this, "TDEHTMLText Area Replace Dialog", 0, TQStringList(), TQStringList(), false); connect( m_repDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoReplace()) ); } @@ -1614,7 +1614,7 @@ RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element) TextAreaWidget *edit = new TextAreaWidget(element->wrap(), view()); setQWidget(edit); - const KHTMLSettings *settings = view()->part()->settings(); + const TDEHTMLSettings *settings = view()->part()->settings(); edit->setCheckSpellingEnabled( settings->autoSpellCheck() ); edit->setTabChangesFocus( ! settings->allowTabulation() ); @@ -1645,7 +1645,7 @@ void RenderTextArea::handleFocusOut() void RenderTextArea::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TextAreaWidget* w = static_cast(m_widget); const TQFontMetrics &m = style()->fontMetrics(); @@ -1680,7 +1680,7 @@ void RenderTextArea::setStyle(RenderStyle* _style) void RenderTextArea::layout() { - KHTMLAssert( needsLayout() ); + TDEHTMLAssert( needsLayout() ); RenderFormElement::layout(); diff --git a/tdehtml/rendering/render_form.h b/tdehtml/rendering/render_form.h index d1611c1e0..d4508e6bc 100644 --- a/tdehtml/rendering/render_form.h +++ b/tdehtml/rendering/render_form.h @@ -45,7 +45,7 @@ class QListboxItem; #include #include "dom/dom_misc.h" -class KHTMLPartBrowserExtension; +class TDEHTMLPartBrowserExtension; class KSpell; class KFindDialog; class KReplaceDialog; @@ -256,7 +256,7 @@ class LineEditWidget : public KLineEdit Q_OBJECT public: LineEditWidget(DOM::HTMLInputElementImpl* input, - KHTMLView* view, TQWidget* parent); + TDEHTMLView* view, TQWidget* parent); ~LineEditWidget(); void highLightWord( unsigned int length, unsigned int pos ); @@ -280,7 +280,7 @@ private: EditHistory }; DOM::HTMLInputElementImpl* m_input; - KHTMLView* m_view; + TDEHTMLView* m_view; KSpell *m_spell; KAction *m_spellAction; }; diff --git a/tdehtml/rendering/render_frames.cpp b/tdehtml/rendering/render_frames.cpp index 03d55fbfd..66e2fda75 100644 --- a/tdehtml/rendering/render_frames.cpp +++ b/tdehtml/rendering/render_frames.cpp @@ -101,11 +101,11 @@ bool RenderFrameSet::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _t void RenderFrameSet::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); if ( !parent()->isFrameSet() ) { - KHTMLView* view = canvas()->view(); + TDEHTMLView* view = canvas()->view(); m_width = view ? view->visibleWidth() : 0; m_height = view ? view->visibleHeight() : 0; } @@ -545,7 +545,7 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt ) setNeedsLayout(true); } - KHTMLView *view = canvas()->view(); + TDEHTMLView *view = canvas()->view(); if ((m_resizing || evt->id() == EventImpl::MOUSEUP_EVENT) && view) { TQPainter paint( view ); paint.setPen( Qt::gray ); @@ -635,7 +635,7 @@ void RenderPart::setWidget( TQWidget *widget ) setQWidget( widget ); widget->setFocusPolicy(TQ_WheelFocus); - if(widget->inherits("KHTMLView")) + if(widget->inherits("TDEHTMLView")) connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) ); setNeedsLayoutAndMinMaxRecalc(); @@ -683,11 +683,11 @@ void RenderFrame::slotViewCleared() view->setFrameStyle(TQFrame::NoFrame); view->setVScrollBarMode(element()->scrolling ); view->setHScrollBarMode(element()->scrolling ); - if(view->inherits("KHTMLView")) { + if(view->inherits("TDEHTMLView")) { #ifdef DEBUG_LAYOUT - kdDebug(6031) << "frame is a KHTMLview!" << endl; + kdDebug(6031) << "frame is a TDEHTMLview!" << endl; #endif - KHTMLView *htmlView = static_cast(view); + TDEHTMLView *htmlView = static_cast(view); if(element()->marginWidth != -1) htmlView->setMarginWidth(element()->marginWidth); if(element()->marginHeight != -1) htmlView->setMarginHeight(element()->marginHeight); } @@ -706,7 +706,7 @@ RenderPartObject::RenderPartObject( DOM::HTMLElementImpl* element ) void RenderPartObject::updateWidget() { TQString url; - KHTMLPart *part = m_view->part(); + TDEHTMLPart *part = m_view->part(); setNeedsLayoutAndMinMaxRecalc(); @@ -754,8 +754,8 @@ void RenderPartObject::updateWidget() } } } - params.append( TQString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") ); - params.append( TQString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url())); + params.append( TQString::fromLatin1("__TDEHTML__PLUGINEMBED=\"YES\"") ); + params.append( TQString::fromLatin1("__TDEHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url())); HTMLEmbedElementImpl *embed = 0; TQString classId; @@ -775,8 +775,8 @@ void RenderPartObject::updateWidget() } classId = objbase->classId; - params.append( TQString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) ); - params.append( TQString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) ); + params.append( TQString::fromLatin1("__TDEHTML__CLASSID=\"%1\"").arg( classId ) ); + params.append( TQString::fromLatin1("__TDEHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) ); if (!objbase->getAttribute(ATTR_WIDTH).isEmpty()) params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) ); else if (embed && !embed->getAttribute(ATTR_WIDTH).isEmpty()) { @@ -857,7 +857,7 @@ void RenderPartObject::close() bool RenderPartObject::partLoadingErrorNotify( tdehtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType ) { - KHTMLPart *part = static_cast(m_view)->part(); + TDEHTMLPart *part = static_cast(m_view)->part(); kdDebug(6031) << "RenderPartObject::partLoadingErrorNotify serviceType=" << serviceType << endl; // Check if we just tried with e.g. nsplugin // and fallback to the activexhandler if there is a classid @@ -925,7 +925,7 @@ void RenderPartObject::slotPartLoadingErrorNotify() // prepare for the local eventloop in KMessageBox ref(); - KHTMLPart *part = static_cast(m_view)->part(); + TDEHTMLPart *part = static_cast(m_view)->part(); KParts::BrowserExtension *ext = part->browserExtension(); if( embed && !embed->pluginPage.isEmpty() && ext ) { // Prepare the mimetype to show in the question (comment if available, name as fallback) @@ -976,8 +976,8 @@ void RenderPartObject::slotPartLoadingErrorNotify() void RenderPartObject::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); calcWidth(); calcHeight(); @@ -1009,11 +1009,11 @@ void RenderPartObject::slotViewCleared() view->setFrameStyle(frameStyle); view->setVScrollBarMode(scroll ); view->setHScrollBarMode(scroll ); - if(view->inherits("KHTMLView")) { + if(view->inherits("TDEHTMLView")) { #ifdef DEBUG_LAYOUT - kdDebug(6031) << "frame is a KHTMLview!" << endl; + kdDebug(6031) << "frame is a TDEHTMLview!" << endl; #endif - KHTMLView *htmlView = static_cast(view); + TDEHTMLView *htmlView = static_cast(view); htmlView->setIgnoreWheelEvents( element()->id() == ID_IFRAME ); if(marginw != -1) htmlView->setMarginWidth(marginw); if(marginh != -1) htmlView->setMarginHeight(marginh); diff --git a/tdehtml/rendering/render_frames.h b/tdehtml/rendering/render_frames.h index 79171c747..49d1e8dc1 100644 --- a/tdehtml/rendering/render_frames.h +++ b/tdehtml/rendering/render_frames.h @@ -26,7 +26,7 @@ #include "rendering/render_replaced.h" #include "xml/dom_nodeimpl.h" #include "html/html_baseimpl.h" -class KHTMLView; +class TDEHTMLView; namespace DOM { @@ -102,7 +102,7 @@ public: virtual void setWidget( TQWidget *widget ); /** - * Called by KHTMLPart to notify the frame object that loading the + * Called by TDEHTMLPart to notify the frame object that loading the * part was not successfuly. (called either asyncroniously after a * after the servicetype of the given url (the one passed with requestObject) * has been determined or syncroniously from within requestObject) diff --git a/tdehtml/rendering/render_generated.cpp b/tdehtml/rendering/render_generated.cpp index 2b793e504..d8e7a1be1 100644 --- a/tdehtml/rendering/render_generated.cpp +++ b/tdehtml/rendering/render_generated.cpp @@ -38,7 +38,7 @@ RenderCounterBase::RenderCounterBase(DOM::NodeImpl* node) void RenderCounterBase::layout() { - KHTMLAssert( needsLayout() ); + TDEHTMLAssert( needsLayout() ); if ( !minMaxKnown() ) calcMinMaxWidth(); @@ -48,7 +48,7 @@ void RenderCounterBase::layout() void RenderCounterBase::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); generateContent(); diff --git a/tdehtml/rendering/render_image.cpp b/tdehtml/rendering/render_image.cpp index d382c9bd1..97c2641ba 100644 --- a/tdehtml/rendering/render_image.cpp +++ b/tdehtml/rendering/render_image.cpp @@ -64,7 +64,7 @@ RenderImage::RenderImage(NodeImpl *_element) m_selectionState = SelectionNone; berrorPic = false; - const KHTMLSettings *settings = _element->getDocument()->view()->part()->settings(); + const TDEHTMLSettings *settings = _element->getDocument()->view()->part()->settings(); bUnfinishedImageFrame = settings->unfinishedImageFrame(); setIntrinsicWidth( 0 ); @@ -378,8 +378,8 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty) void RenderImage::layout() { - KHTMLAssert( needsLayout()); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout()); + TDEHTMLAssert( minMaxKnown() ); short oldwidth = m_width; int oldheight = m_height; diff --git a/tdehtml/rendering/render_inline.cpp b/tdehtml/rendering/render_inline.cpp index 96841eb43..aee43a817 100644 --- a/tdehtml/rendering/render_inline.cpp +++ b/tdehtml/rendering/render_inline.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) @@ -760,7 +760,7 @@ void RenderInline::paintOutlinePath(TQPainter *p, int tx, int ty, const TQPoint void RenderInline::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << "(RenderInline)::calcMinMaxWidth() this=" << this << endl; diff --git a/tdehtml/rendering/render_inline.h b/tdehtml/rendering/render_inline.h index 97392999e..ab854543d 100644 --- a/tdehtml/rendering/render_inline.h +++ b/tdehtml/rendering/render_inline.h @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) diff --git a/tdehtml/rendering/render_list.cpp b/tdehtml/rendering/render_list.cpp index 08ee1a88b..5af983a72 100644 --- a/tdehtml/rendering/render_list.cpp +++ b/tdehtml/rendering/render_list.cpp @@ -180,8 +180,8 @@ short RenderListItem::marginRight() const void RenderListItem::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); updateMarkerLocation(); RenderBlock::layout(); @@ -369,7 +369,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty) void RenderListMarker::layout() { - KHTMLAssert( needsLayout() ); + TDEHTMLAssert( needsLayout() ); if ( !minMaxKnown() ) calcMinMaxWidth(); @@ -392,7 +392,7 @@ void RenderListMarker::setPixmap( const TQPixmap &p, const TQRect& r, CachedImag void RenderListMarker::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); m_markerWidth = m_width = 0; @@ -541,7 +541,7 @@ void RenderListMarker::calcMinMaxWidth() case LNONE: break; default: - KHTMLAssert(false); + TDEHTMLAssert(false); } m_markerWidth = fm.width(m_item) + fm.width(TQString::fromLatin1(". ")); } diff --git a/tdehtml/rendering/render_object.cpp b/tdehtml/rendering/render_object.cpp index a3eb1565e..1d16057a2 100644 --- a/tdehtml/rendering/render_object.cpp +++ b/tdehtml/rendering/render_object.cpp @@ -256,12 +256,12 @@ bool RenderObject::isHTMLMarquee() const void RenderObject::addChild(RenderObject* , RenderObject *) { - KHTMLAssert(0); + TDEHTMLAssert(0); } RenderObject* RenderObject::removeChildNode(RenderObject* ) { - KHTMLAssert(0); + TDEHTMLAssert(0); return 0; } @@ -273,12 +273,12 @@ void RenderObject::removeChild(RenderObject *o ) void RenderObject::appendChildNode(RenderObject*) { - KHTMLAssert(0); + TDEHTMLAssert(0); } void RenderObject::insertChildNode(RenderObject*, RenderObject*) { - KHTMLAssert(0); + TDEHTMLAssert(0); } RenderObject *RenderObject::nextRenderer() const @@ -1369,7 +1369,7 @@ bool RenderObject::attemptDirectLayerTranslation() // When the difference between two successive styles is only 'Position' // we may attempt to save a layout by directly updating the object position. - KHTMLAssert( m_style->position() != STATIC ); + TDEHTMLAssert( m_style->position() != STATIC ); if (!layer()) return false; setInline(m_style->isDisplayInlineType()); @@ -1444,7 +1444,7 @@ void RenderObject::setOverhangingContents(bool p) if (p) { m_overhangingContents = true; - KHTMLAssert( cb != this || isCanvas()); + TDEHTMLAssert( cb != this || isCanvas()); if (cb && cb != this) cb->setOverhangingContents(); } @@ -1464,7 +1464,7 @@ void RenderObject::setOverhangingContents(bool p) else { m_overhangingContents = false; - KHTMLAssert( cb != this ); + TDEHTMLAssert( cb != this ); if (cb && cb != this) cb->setOverhangingContents(false); } @@ -1935,7 +1935,7 @@ void RenderObject::invalidateVerticalPositions() void RenderObject::recalcMinMaxWidths() { - KHTMLAssert( m_recalcMinMax ); + TDEHTMLAssert( m_recalcMinMax ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << " recalcMinMaxWidths() this=" << this <(this)->view(); + TDEHTMLView *view = static_cast(this)->view(); if ( view ) view->scheduleRelayout(clippedObj); } @@ -1986,7 +1986,7 @@ void RenderObject::removeLeftoverAnonymousBoxes() InlineBox* RenderObject::createInlineBox(bool /*makePlaceHolderBox*/, bool /*isRootLineBox*/) { - KHTMLAssert(false); + TDEHTMLAssert(false); return 0; } diff --git a/tdehtml/rendering/render_object.h b/tdehtml/rendering/render_object.h index 9dd064932..8d066201c 100644 --- a/tdehtml/rendering/render_object.h +++ b/tdehtml/rendering/render_object.h @@ -43,17 +43,17 @@ class TQPainter; class TQTextStream; class CSSStyle; -class KHTMLView; +class TDEHTMLView; #ifndef NDEBUG -#define KHTMLAssert( x ) if( !(x) ) { \ +#define TDEHTMLAssert( x ) if( !(x) ) { \ const RenderObject *o = this; while( o->parent() ) o = o->parent(); \ o->printTree(); \ tqDebug(" this object = %p, %s", (void*) this, kdBacktrace().latin1() ); \ assert( x ); \ } #else -#define KHTMLAssert( x ) +#define TDEHTMLAssert( x ) #endif /* diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp index 42fce027e..5a96d06f0 100644 --- a/tdehtml/rendering/render_replaced.cpp +++ b/tdehtml/rendering/render_replaced.cpp @@ -64,7 +64,7 @@ RenderReplaced::RenderReplaced(DOM::NodeImpl* node) void RenderReplaced::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown()); + TDEHTMLAssert( !minMaxKnown()); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << "RenderReplaced::calcMinMaxWidth() known=" << minMaxKnown() << endl; @@ -102,7 +102,7 @@ RenderWidget::RenderWidget(DOM::NodeImpl* node) m_arena.reset(renderArena()); m_resizePending = false; m_discardResizes = false; - m_isKHTMLWidget = false; + m_isTDEHTMLWidget = false; m_needsMask = false; // this is no real reference counting, its just there @@ -131,7 +131,7 @@ void RenderWidget::detach() RenderWidget::~RenderWidget() { - KHTMLAssert( refCount() <= 0 ); + TDEHTMLAssert( refCount() <= 0 ); if(m_widget) { m_widget->hide(); @@ -157,7 +157,7 @@ void RenderWidget::resizeWidget( int w, int h ) w = kMin( w, 2000 ); if (m_widget->width() != w || m_widget->height() != h) { - m_resizePending = isKHTMLWidget(); + m_resizePending = isTDEHTMLWidget(); ref(); element()->ref(); TQApplication::postEvent( this, new TQWidgetResizeEvent( w, h ) ); @@ -185,8 +185,8 @@ bool RenderWidget::event( TQEvent *e ) m_widget->resize( re->w, re->h ); repaint(); } - // eat all events - except if this is a frame (in which case KHTMLView handles it all) - if ( ::tqqt_cast( m_widget ) ) + // eat all events - except if this is a frame (in which case TDEHTMLView handles it all) + if ( ::tqqt_cast( m_widget ) ) return TQObject::event( e ); return true; } @@ -212,7 +212,7 @@ void RenderWidget::setQWidget(TQWidget *widget) connect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed())); m_widget->installEventFilter(this); - if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast(m_widget)) + if ( (m_isTDEHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast(m_widget)) m_widget->setBackgroundMode( TQWidget::NoBackground ); if (m_widget->focusPolicy() > TQ_StrongFocus) @@ -236,12 +236,12 @@ void RenderWidget::setQWidget(TQWidget *widget) void RenderWidget::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); if ( m_widget ) { resizeWidget( m_width-borderLeft()-borderRight()-paddingLeft()-paddingRight(), m_height-borderTop()-borderBottom()-paddingTop()-paddingBottom() ); - if (!isKHTMLWidget() && !isFrame() && !m_needsMask) { + if (!isTDEHTMLWidget() && !isFrame() && !m_needsMask) { m_needsMask = true; RenderLayer* rl = enclosingStackingContext(); RenderLayer* el = enclosingLayer(); @@ -277,7 +277,7 @@ void RenderWidget::updateFromElement() int lowlightVal = 100 + (2*contrast_+4)*10; if (backgroundColor.isValid()) { - if (!isKHTMLWidget()) + if (!isTDEHTMLWidget()) widget()->setEraseColor(backgroundColor ); for ( int i = 0; i < TQPalette::NColorGroups; ++i ) { pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Background, backgroundColor ); @@ -398,11 +398,11 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty) int xPos = _tx+borderLeft()+paddingLeft(); int yPos = _ty+borderTop()+paddingTop(); - bool tdehtmlw = isKHTMLWidget(); + bool tdehtmlw = isTDEHTMLWidget(); int childw = m_widget->width(); int childh = m_widget->height(); - if ( (childw == 2000 || childh == 3072) && m_widget->inherits( "KHTMLView" ) ) { - KHTMLView *vw = static_cast(m_widget); + if ( (childw == 2000 || childh == 3072) && m_widget->inherits( "TDEHTMLView" ) ) { + TDEHTMLView *vw = static_cast(m_widget); int cy = m_view->contentsY(); int ch = m_view->visibleHeight(); @@ -612,8 +612,8 @@ void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty) bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e) { - // no special event processing if this is a frame (in which case KHTMLView handles it all) - if ( ::tqqt_cast( m_widget ) ) + // no special event processing if this is a frame (in which case TDEHTMLView handles it all) + if ( ::tqqt_cast( m_widget ) ) return false; if ( !element() ) return true; @@ -655,14 +655,14 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e) //kdDebug(6000) << "RenderWidget::eventFilter captures FocusIn" << endl; element()->getDocument()->setFocusNode(element()); // if ( isEditable() ) { -// KHTMLPartBrowserExtension *ext = static_cast( element()->view->part()->browserExtension() ); +// TDEHTMLPartBrowserExtension *ext = static_cast( element()->view->part()->browserExtension() ); // if ( ext ) ext->editableWidgetFocused( m_widget ); // } break; case TQEvent::KeyPress: case TQEvent::KeyRelease: // TODO this seems wrong - Qt events are not correctly translated to DOM ones, - // like in KHTMLView::dispatchKeyEvent() + // like in TDEHTMLView::dispatchKeyEvent() if (element()->dispatchKeyEvent(TQT_TQKEYEVENT(e),false)) filtered = true; break; @@ -837,13 +837,13 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev) const KeyEventBaseImpl& domKeyEv = static_cast(ev); if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break; - // See KHTMLView::dispatchKeyEvent: autorepeat is just keypress in the DOM + // See TDEHTMLView::dispatchKeyEvent: autorepeat is just keypress in the DOM // but it's keyrelease+keypress in Qt. So here we do the inverse mapping as - // the one done in KHTMLView: generate two events for one DOM auto-repeat keypress. + // the one done in TDEHTMLView: generate two events for one DOM auto-repeat keypress. // Similarly, DOM keypress events with non-autorepeat Qt event do nothing here, // because the matching Qt keypress event was already sent from DOM keydown event. - // Reverse drawing as the one in KHTMLView: + // Reverse drawing as the one in TDEHTMLView: // DOM: Down Press | Press | Up // Qt: (nothing) Press | Release(autorepeat) + Press(autorepeat) | Release // diff --git a/tdehtml/rendering/render_replaced.h b/tdehtml/rendering/render_replaced.h index c1369bfc0..3d8a68f9c 100644 --- a/tdehtml/rendering/render_replaced.h +++ b/tdehtml/rendering/render_replaced.h @@ -26,7 +26,7 @@ #include #include -class KHTMLView; +class TDEHTMLView; class TQWidget; namespace DOM @@ -100,7 +100,7 @@ public: virtual void updateFromElement(); TQWidget *widget() const { return m_widget; } - KHTMLView* view() const { return m_view; } + TDEHTMLView* view() const { return m_view; } void deref(); @@ -119,7 +119,7 @@ public: public slots: void slotWidgetDestructed(); - bool isKHTMLWidget() const { return m_isKHTMLWidget; } + bool isTDEHTMLWidget() const { return m_isTDEHTMLWidget; } protected: virtual bool canHaveBorder() const { return false; } @@ -134,7 +134,7 @@ protected: void resizeWidget( int w, int h ); TQWidget *m_widget; - KHTMLView* m_view; + TDEHTMLView* m_view; //Because we mess with normal detach due to ref/deref, //we need to keep track of the arena ourselves @@ -143,7 +143,7 @@ protected: bool m_resizePending; bool m_discardResizes; - bool m_isKHTMLWidget; + bool m_isTDEHTMLWidget; bool m_needsMask; public: diff --git a/tdehtml/rendering/render_style.h b/tdehtml/rendering/render_style.h index 6e1b9cbc8..28b6b999d 100644 --- a/tdehtml/rendering/render_style.h +++ b/tdehtml/rendering/render_style.h @@ -719,11 +719,11 @@ class StyleCSS3InheritedData : public Shared // enum EWhiteSpace { - NORMAL, PRE, NOWRAP, PRE_WRAP, PRE_LINE, KHTML_NOWRAP + NORMAL, PRE, NOWRAP, PRE_WRAP, PRE_LINE, TDEHTML_NOWRAP }; enum ETextAlign { - TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, KHTML_LEFT, KHTML_RIGHT, KHTML_CENTER + TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, TDEHTML_LEFT, TDEHTML_RIGHT, TDEHTML_CENTER }; enum ETextTransform { diff --git a/tdehtml/rendering/render_table.cpp b/tdehtml/rendering/render_table.cpp index ef7fe1031..8a75c73f2 100644 --- a/tdehtml/rendering/render_table.cpp +++ b/tdehtml/rendering/render_table.cpp @@ -265,9 +265,9 @@ void RenderTable::calcWidth() void RenderTable::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); - KHTMLAssert( !needSectionRecalc ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( !needSectionRecalc ); if (posChildNeedsLayout() && !normalChildNeedsLayout() && !selfNeedsLayout()) { // All we have to is lay out our positioned objects. @@ -531,7 +531,7 @@ void RenderTable::paintBoxDecorations(PaintInfo &pI, int _tx, int _ty) void RenderTable::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); if ( needSectionRecalc ) recalcSections(); @@ -567,7 +567,7 @@ void RenderTable::splitColumn( int pos, int firstSpan ) columns.resize( oldSize + 1 ); int oldSpan = columns[pos].span; // tqDebug("splitColumn( %d,%d ), oldSize=%d, oldSpan=%d", pos, firstSpan, oldSize, oldSpan ); - KHTMLAssert( oldSpan > firstSpan ); + TDEHTMLAssert( oldSpan > firstSpan ); columns[pos].span = firstSpan; memmove( columns.data()+pos+1, columns.data()+pos, (oldSize-pos)*sizeof(ColumnStruct) ); columns[pos+1].span = oldSpan - firstSpan; @@ -1040,7 +1040,7 @@ void RenderTableSection::addChild(RenderObject *child, RenderObject *beforeChild cCol = 0; ensureRows( cRow+1 ); - KHTMLAssert( child->isTableRow() ); + TDEHTMLAssert( child->isTableRow() ); grid[cRow].rowRenderer = static_cast(child); if (!beforeChild) { @@ -2084,8 +2084,8 @@ void RenderTableRow::addChild(RenderObject *child, RenderObject *beforeChild) void RenderTableRow::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); RenderObject *child = firstChild(); const bool pagedMode = canvas()->pagedMode(); @@ -2176,7 +2176,7 @@ void RenderTableRow::paintRow( PaintInfo& pI, int tx, int ty, int w, int h ) void RenderTableRow::paint(PaintInfo& i, int tx, int ty) { - KHTMLAssert(layer()); + TDEHTMLAssert(layer()); if (!layer()) return; @@ -2260,7 +2260,7 @@ Length RenderTableCell::styleOrColWidth() void RenderTableCell::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << "(TableCell)::calcMinMaxWidth() known=" << minMaxKnown() << endl; #endif @@ -2365,7 +2365,7 @@ void RenderTableCell::setStyle( RenderStyle *newStyle ) RenderBlock::setStyle( newStyle ); setShouldPaintBackgroundOrBorder(true); - if (newStyle->whiteSpace() == KHTML_NOWRAP) { + if (newStyle->whiteSpace() == TDEHTML_NOWRAP) { // Figure out if we are really nowrapping or if we should just // use normal instead. If the width of the cell is fixed, then // we don't actually use NOWRAP. diff --git a/tdehtml/rendering/render_text.cpp b/tdehtml/rendering/render_text.cpp index 9090e1631..d125b04c6 100644 --- a/tdehtml/rendering/render_text.cpp +++ b/tdehtml/rendering/render_text.cpp @@ -691,7 +691,7 @@ RenderText::RenderText(DOM::NodeImpl* node, DOMStringImpl *_str) m_maxWidth = -1; str = _str; if(str) str->ref(); - KHTMLAssert(!str || !str->l || str->s); + TDEHTMLAssert(!str || !str->l || str->s); m_selectionState = SelectionNone; m_hasReturn = true; @@ -723,7 +723,7 @@ void RenderText::setStyle(RenderStyle *_style) RenderText::~RenderText() { - KHTMLAssert(m_lines.count() == 0); + TDEHTMLAssert(m_lines.count() == 0); if(str) str->deref(); } @@ -745,7 +745,7 @@ void RenderText::deleteInlineBoxes(RenderArena* arena) } } - KHTMLAssert(m_lines.count() == 0); + TDEHTMLAssert(m_lines.count() == 0); } bool RenderText::isTextFragment() const @@ -1009,12 +1009,12 @@ bool RenderText::posOfChar(int chr, int &x, int &y) void RenderText::paint( PaintInfo& /*pI*/, int /*tx*/, int /*ty*/) { - KHTMLAssert( false ); + TDEHTMLAssert( false ); } void RenderText::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); // ### calc Min and Max width... m_minWidth = m_beginMinWidth = m_endMinWidth = 0; @@ -1213,8 +1213,8 @@ void RenderText::setText(DOMStringImpl *text, bool force) // ### what should happen if we change the text of a // RenderBR object ? - KHTMLAssert(!isBR() || (str->l == 1 && (*str->s) == '\n')); - KHTMLAssert(!str->l || str->s); + TDEHTMLAssert(!isBR() || (str->l == 1 && (*str->s) == '\n')); + TDEHTMLAssert(!str->l || str->s); setNeedsLayoutAndMinMaxRecalc(); #ifdef BIDI_DEBUG @@ -1251,7 +1251,7 @@ short RenderText::baselinePosition( bool firstLine ) const InlineBox* RenderText::createInlineBox(bool, bool isRootLineBox) { - KHTMLAssert( !isRootLineBox ); + TDEHTMLAssert( !isRootLineBox ); return new (renderArena()) InlineTextBox(this); } @@ -1260,7 +1260,7 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse) //kdDebug(6040) << "position: from="<textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: case TAAUTO: // ### find out what this does case JUSTIFY: break; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: _x += cb->contentWidth() / 2; break; - case KHTML_RIGHT: + case TDEHTML_RIGHT: case RIGHT: _x += cb->contentWidth(); break; @@ -1128,7 +1128,7 @@ static inline bool isDescendant(RenderObject *r, RenderObject *cb) * or at the end. * @param fromEnd begin search from end (default: begin from beginning) */ -static bool containsEditableElement(KHTMLPart *part, RenderBlock *cb, +static bool containsEditableElement(TDEHTMLPart *part, RenderBlock *cb, RenderTable *&table, bool fromEnd = false) { RenderObject *r = cb; @@ -1185,7 +1185,7 @@ static bool containsEditableElement(KHTMLPart *part, RenderBlock *cb, * @param fromEnd begin search from end (default: begin from beginning) * @param start object after which to begin search. */ -static bool containsEditableChildElement(KHTMLPart *part, RenderBlock *cb, +static bool containsEditableChildElement(TDEHTMLPart *part, RenderBlock *cb, RenderTable *&table, bool fromEnd, RenderObject *start) { int state = 0; @@ -1242,7 +1242,7 @@ static bool containsEditableChildElement(KHTMLPart *part, RenderBlock *cb, // == class LinearDocument implementation -LinearDocument::LinearDocument(KHTMLPart *part, NodeImpl *node, long offset, +LinearDocument::LinearDocument(TDEHTMLPart *part, NodeImpl *node, long offset, CaretAdvancePolicy advancePolicy, ElementImpl *baseElem) : node(node), offset(offset), m_part(part), advPol(advancePolicy), base(0) @@ -2052,7 +2052,7 @@ TableRowIterator &TableRowIterator::operator --() // == class ErgonomicEditableLineIterator implementation // some decls -static RenderTableCell *findNearestTableCellInRow(KHTMLPart *part, int x, +static RenderTableCell *findNearestTableCellInRow(TDEHTMLPart *part, int x, RenderTableSection::RowStruct *row, bool fromEnd); /** finds the cell corresponding to absolute x-coordinate @p x in the given @@ -2068,7 +2068,7 @@ static RenderTableCell *findNearestTableCellInRow(KHTMLPart *part, int x, * beginning * @return the cell, or 0 if no editable cell was found. */ -static inline RenderTableCell *findNearestTableCell(KHTMLPart *part, int x, +static inline RenderTableCell *findNearestTableCell(TDEHTMLPart *part, int x, TableRowIterator &it, bool fromEnd) { RenderTableCell *result = 0; @@ -2096,7 +2096,7 @@ static inline RenderTableCell *findNearestTableCell(KHTMLPart *part, int x, * @param fromEnd @p true, begin from end (applies only to nested tables) * @return the found cell or 0 if no editable cell was found */ -static RenderTableCell *findNearestTableCellInRow(KHTMLPart *part, int x, +static RenderTableCell *findNearestTableCellInRow(TDEHTMLPart *part, int x, RenderTableSection::RowStruct *row, bool fromEnd) { // First pass. Find spatially nearest cell. diff --git a/tdehtml/tdehtml_caret_p.h b/tdehtml/tdehtml_caret_p.h index 729f4d8ba..6d85a76b2 100644 --- a/tdehtml/tdehtml_caret_p.h +++ b/tdehtml/tdehtml_caret_p.h @@ -18,8 +18,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef KHTML_CARET_P_H -#define KHTML_CARET_P_H +#ifndef TDEHTML_CARET_P_H +#define TDEHTML_CARET_P_H #include "rendering/render_table.h" @@ -68,7 +68,7 @@ struct CaretViewContext { bool displayed; // true if caret is to be displayed at all. bool caretMoved; // set to true once caret has been moved in page // how to display the caret when view is not focused - KHTMLPart::CaretDisplayPolicy displayNonFocused; + TDEHTMLPart::CaretDisplayPolicy displayNonFocused; /** For natural traversal of lines, the original x position is saved, and * the actual x is set to the first character whose x position is @@ -83,7 +83,7 @@ struct CaretViewContext { // corresponding release event CaretViewContext() : freqTimerId(-1), x(0), y(0), width(1), height(16), visible(true), displayed(false), caretMoved(false), - displayNonFocused(KHTMLPart::CaretInvisible), origX(0), + displayNonFocused(TDEHTMLPart::CaretInvisible), origX(0), keyReleasePending(false) {} }; @@ -650,7 +650,7 @@ public: * cannot serve as a base (to see if this is the case, check whether * LinearDocument::baseFlow()->element() != base) */ - LinearDocument(KHTMLPart *part, DOM::NodeImpl *node, long offset, + LinearDocument(TDEHTMLPart *part, DOM::NodeImpl *node, long offset, CaretAdvancePolicy advancePolicy, DOM::ElementImpl *baseElem); virtual ~LinearDocument(); @@ -730,7 +730,7 @@ protected: Iterator _preBegin; Iterator _end; - KHTMLPart *m_part; + TDEHTMLPart *m_part; CaretAdvancePolicy advPol; RenderObject *base; @@ -754,7 +754,7 @@ protected: * @since 3.3 */ class EditableCaretBoxIterator : public CaretBoxIterator { - KHTMLPart *m_part; + TDEHTMLPart *m_part; bool adjacent; CaretAdvancePolicy advpol; // caret advance policy diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp index 4127e7762..5803b1ca3 100644 --- a/tdehtml/tdehtml_ext.cpp +++ b/tdehtml/tdehtml_ext.cpp @@ -70,7 +70,7 @@ #include "tdehtmlpart_p.h" -KHTMLPartBrowserExtension::KHTMLPartBrowserExtension( KHTMLPart *parent, const char *name ) +TDEHTMLPartBrowserExtension::TDEHTMLPartBrowserExtension( TDEHTMLPart *parent, const char *name ) : KParts::BrowserExtension( parent, name ) { m_part = parent; @@ -83,29 +83,29 @@ KHTMLPartBrowserExtension::KHTMLPartBrowserExtension( KHTMLPart *parent, const c m_connectedToClipboard = false; } -int KHTMLPartBrowserExtension::xOffset() +int TDEHTMLPartBrowserExtension::xOffset() { return m_part->view()->contentsX(); } -int KHTMLPartBrowserExtension::yOffset() +int TDEHTMLPartBrowserExtension::yOffset() { return m_part->view()->contentsY(); } -void KHTMLPartBrowserExtension::saveState( TQDataStream &stream ) +void TDEHTMLPartBrowserExtension::saveState( TQDataStream &stream ) { //kdDebug( 6050 ) << "saveState!" << endl; m_part->saveState( stream ); } -void KHTMLPartBrowserExtension::restoreState( TQDataStream &stream ) +void TDEHTMLPartBrowserExtension::restoreState( TQDataStream &stream ) { //kdDebug( 6050 ) << "restoreState!" << endl; m_part->restoreState( stream ); } -void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget ) +void TDEHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget ) { m_editableFormWidget = widget; updateEditActions(); @@ -124,7 +124,7 @@ void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget ) editableWidgetFocused(); } -void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ ) +void TDEHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ ) { TQWidget *oldWidget = m_editableFormWidget; @@ -150,13 +150,13 @@ void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ ) editableWidgetBlurred(); } -void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *proxy ) +void TDEHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *proxy ) { if ( m_extensionProxy ) { disconnect( m_extensionProxy, TQT_SIGNAL( enableAction( const char *, bool ) ), this, TQT_SLOT( extensionProxyActionEnabled( const char *, bool ) ) ); - if ( m_extensionProxy->inherits( "KHTMLPartBrowserExtension" ) ) + if ( m_extensionProxy->inherits( "TDEHTMLPartBrowserExtension" ) ) { disconnect( m_extensionProxy, TQT_SIGNAL( editableWidgetFocused() ), this, TQT_SLOT( extensionProxyEditableWidgetFocused() ) ); @@ -171,7 +171,7 @@ void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *pro { connect( m_extensionProxy, TQT_SIGNAL( enableAction( const char *, bool ) ), this, TQT_SLOT( extensionProxyActionEnabled( const char *, bool ) ) ); - if ( m_extensionProxy->inherits( "KHTMLPartBrowserExtension" ) ) + if ( m_extensionProxy->inherits( "TDEHTMLPartBrowserExtension" ) ) { connect( m_extensionProxy, TQT_SIGNAL( editableWidgetFocused() ), this, TQT_SLOT( extensionProxyEditableWidgetFocused() ) ); @@ -190,7 +190,7 @@ void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *pro } } -void KHTMLPartBrowserExtension::cut() +void TDEHTMLPartBrowserExtension::cut() { if ( m_extensionProxy ) { @@ -207,7 +207,7 @@ void KHTMLPartBrowserExtension::cut() static_cast( &(*m_editableFormWidget) )->cut(); } -void KHTMLPartBrowserExtension::copy() +void TDEHTMLPartBrowserExtension::copy() { if ( m_extensionProxy ) { @@ -215,7 +215,7 @@ void KHTMLPartBrowserExtension::copy() return; } - kdDebug( 6050 ) << "************! KHTMLPartBrowserExtension::copy()" << endl; + kdDebug( 6050 ) << "************! TDEHTMLPartBrowserExtension::copy()" << endl; if ( !m_editableFormWidget ) { // get selected text and paste to the clipboard @@ -261,7 +261,7 @@ void KHTMLPartBrowserExtension::copy() } } -void KHTMLPartBrowserExtension::searchProvider() +void TDEHTMLPartBrowserExtension::searchProvider() { // action name is of form "previewProvider[:]" const TQString searchProviderPrefix = TQString( TQT_TQOBJECT_CONST(sender())->name() ).mid( 14 ); @@ -285,7 +285,7 @@ void KHTMLPartBrowserExtension::searchProvider() emit m_part->browserExtension()->openURLRequest( data.uri(), args ); } -void KHTMLPartBrowserExtension::openSelection() +void TDEHTMLPartBrowserExtension::openSelection() { KParts::URLArgs args; args.frameName = "_blank"; @@ -293,7 +293,7 @@ void KHTMLPartBrowserExtension::openSelection() emit m_part->browserExtension()->openURLRequest( m_part->selectedText(), args ); } -void KHTMLPartBrowserExtension::paste() +void TDEHTMLPartBrowserExtension::paste() { if ( m_extensionProxy ) { @@ -310,7 +310,7 @@ void KHTMLPartBrowserExtension::paste() static_cast( &(*m_editableFormWidget) )->paste(); } -void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method ) +void TDEHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method ) { if ( !m_extensionProxy ) return; @@ -323,7 +323,7 @@ void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method ) m_extensionProxy->tqt_invoke( slot, o ); } -void KHTMLPartBrowserExtension::updateEditActions() +void TDEHTMLPartBrowserExtension::updateEditActions() { if ( !m_editableFormWidget ) { @@ -354,15 +354,15 @@ void KHTMLPartBrowserExtension::updateEditActions() enableAction( "cut", hasSelection ); } -void KHTMLPartBrowserExtension::extensionProxyEditableWidgetFocused() { +void TDEHTMLPartBrowserExtension::extensionProxyEditableWidgetFocused() { editableWidgetFocused(); } -void KHTMLPartBrowserExtension::extensionProxyEditableWidgetBlurred() { +void TDEHTMLPartBrowserExtension::extensionProxyEditableWidgetBlurred() { editableWidgetBlurred(); } -void KHTMLPartBrowserExtension::extensionProxyActionEnabled( const char *action, bool enable ) +void TDEHTMLPartBrowserExtension::extensionProxyActionEnabled( const char *action, bool enable ) { // only forward enableAction calls for actions we actually do forward if ( strcmp( action, "cut" ) == 0 || @@ -372,17 +372,17 @@ void KHTMLPartBrowserExtension::extensionProxyActionEnabled( const char *action, } } -void KHTMLPartBrowserExtension::reparseConfiguration() +void TDEHTMLPartBrowserExtension::reparseConfiguration() { m_part->reparseConfiguration(); } -void KHTMLPartBrowserExtension::print() +void TDEHTMLPartBrowserExtension::print() { m_part->view()->print(); } -void KHTMLPartBrowserExtension::disableScrolling() +void TDEHTMLPartBrowserExtension::disableScrolling() { TQScrollView *scrollView = m_part->view(); if (scrollView) { @@ -391,10 +391,10 @@ void KHTMLPartBrowserExtension::disableScrolling() } } -class KHTMLPopupGUIClient::KHTMLPopupGUIClientPrivate +class TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClientPrivate { public: - KHTMLPart *m_tdehtml; + TDEHTMLPart *m_tdehtml; KURL m_url; KURL m_imageURL; TQPixmap m_pixmap; @@ -402,10 +402,10 @@ public: }; -KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *tdehtml, const TQString &doc, const KURL &url ) +TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQString &doc, const KURL &url ) : TQObject( tdehtml ) { - d = new KHTMLPopupGUIClientPrivate; + d = new TDEHTMLPopupGUIClientPrivate; d->m_tdehtml = tdehtml; d->m_url = url; bool isImage = false; @@ -556,7 +556,7 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *tdehtml, const TQString &do new KAction( i18n( "Reload Frame" ), 0, this, TQT_SLOT( slotReloadFrame() ), actionCollection(), "reloadframe" ); - if ( KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() ) { + if ( TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() ) { if ( tdehtml->d->m_frame->m_type == tdehtml::ChildFrame::IFrame ) new KAction( i18n( "Block IFrame..." ), 0, this, TQT_SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" ); } @@ -618,7 +618,7 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *tdehtml, const TQString &do new KAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, TQT_SLOT( slotViewImage() ), actionCollection(), "viewimage" ); - if (KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()) + if (TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()) { new KAction( i18n( "Block Image..." ), 0, this, TQT_SLOT( slotBlockImage() ), actionCollection(), "blockimage" ); @@ -641,19 +641,19 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *tdehtml, const TQString &do menu.insertBefore( domDocument().createElement( "separator" ), menu.firstChild() ); } -KHTMLPopupGUIClient::~KHTMLPopupGUIClient() +TDEHTMLPopupGUIClient::~TDEHTMLPopupGUIClient() { delete d; } -void KHTMLPopupGUIClient::slotSaveLinkAs() +void TDEHTMLPopupGUIClient::slotSaveLinkAs() { TDEIO::MetaData metaData; metaData["referrer"] = d->m_tdehtml->referrer(); saveURL( d->m_tdehtml->widget(), i18n( "Save Link As" ), d->m_url, metaData ); } -void KHTMLPopupGUIClient::slotSendImage() +void TDEHTMLPopupGUIClient::slotSendImage() { TQStringList urls; urls.append( d->m_imageURL.url()); @@ -666,21 +666,21 @@ void KHTMLPopupGUIClient::slotSendImage() } -void KHTMLPopupGUIClient::slotSaveImageAs() +void TDEHTMLPopupGUIClient::slotSaveImageAs() { TDEIO::MetaData metaData; metaData["referrer"] = d->m_tdehtml->referrer(); saveURL( d->m_tdehtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData, TQString::null, 0, d->m_suggestedFilename ); } -void KHTMLPopupGUIClient::slotBlockHost() +void TDEHTMLPopupGUIClient::slotBlockHost() { TQString name=d->m_imageURL.protocol()+"://"+d->m_imageURL.host()+"/*"; - KHTMLFactory::defaultHTMLSettings()->addAdFilter( name ); + TDEHTMLFactory::defaultHTMLSettings()->addAdFilter( name ); d->m_tdehtml->reparseConfiguration(); } -void KHTMLPopupGUIClient::slotBlockImage() +void TDEHTMLPopupGUIClient::slotBlockImage() { bool ok = false; @@ -689,12 +689,12 @@ void KHTMLPopupGUIClient::slotBlockImage() d->m_imageURL.url(), &ok); if ( ok ) { - KHTMLFactory::defaultHTMLSettings()->addAdFilter( url ); + TDEHTMLFactory::defaultHTMLSettings()->addAdFilter( url ); d->m_tdehtml->reparseConfiguration(); } } -void KHTMLPopupGUIClient::slotBlockIFrame() +void TDEHTMLPopupGUIClient::slotBlockIFrame() { bool ok = false; TQString url = KInputDialog::getText( i18n( "Add URL to Filter"), @@ -702,12 +702,12 @@ void KHTMLPopupGUIClient::slotBlockIFrame() d->m_tdehtml->url().url(), &ok ); if ( ok ) { - KHTMLFactory::defaultHTMLSettings()->addAdFilter( url ); + TDEHTMLFactory::defaultHTMLSettings()->addAdFilter( url ); d->m_tdehtml->reparseConfiguration(); } } -void KHTMLPopupGUIClient::slotCopyLinkLocation() +void TDEHTMLPopupGUIClient::slotCopyLinkLocation() { KURL safeURL(d->m_url); safeURL.setPass(TQString::null); @@ -722,12 +722,12 @@ void KHTMLPopupGUIClient::slotCopyLinkLocation() #endif } -void KHTMLPopupGUIClient::slotStopAnimations() +void TDEHTMLPopupGUIClient::slotStopAnimations() { d->m_tdehtml->stopAnimations(); } -void KHTMLPopupGUIClient::slotCopyImage() +void TDEHTMLPopupGUIClient::slotCopyImage() { #ifndef QT_NO_MIMECLIPBOARD KURL safeURL(d->m_imageURL); @@ -748,7 +748,7 @@ void KHTMLPopupGUIClient::slotCopyImage() #endif } -void KHTMLPopupGUIClient::slotCopyImageLocation() +void TDEHTMLPopupGUIClient::slotCopyImageLocation() { KURL safeURL(d->m_imageURL); safeURL.setPass(TQString::null); @@ -763,12 +763,12 @@ void KHTMLPopupGUIClient::slotCopyImageLocation() #endif } -void KHTMLPopupGUIClient::slotViewImage() +void TDEHTMLPopupGUIClient::slotViewImage() { d->m_tdehtml->browserExtension()->createNewWindow(d->m_imageURL); } -void KHTMLPopupGUIClient::slotReloadFrame() +void TDEHTMLPopupGUIClient::slotReloadFrame() { KParts::URLArgs args( d->m_tdehtml->browserExtension()->urlArgs() ); args.reload = true; @@ -779,7 +779,7 @@ void KHTMLPopupGUIClient::slotReloadFrame() d->m_tdehtml->openURL( d->m_tdehtml->url() ); } -void KHTMLPopupGUIClient::slotFrameInWindow() +void TDEHTMLPopupGUIClient::slotFrameInWindow() { KParts::URLArgs args( d->m_tdehtml->browserExtension()->urlArgs() ); args.metaData()["referrer"] = d->m_tdehtml->pageReferrer(); @@ -787,7 +787,7 @@ void KHTMLPopupGUIClient::slotFrameInWindow() emit d->m_tdehtml->browserExtension()->createNewWindow( d->m_tdehtml->url(), args ); } -void KHTMLPopupGUIClient::slotFrameInTop() +void TDEHTMLPopupGUIClient::slotFrameInTop() { KParts::URLArgs args( d->m_tdehtml->browserExtension()->urlArgs() ); args.metaData()["referrer"] = d->m_tdehtml->pageReferrer(); @@ -795,7 +795,7 @@ void KHTMLPopupGUIClient::slotFrameInTop() emit d->m_tdehtml->browserExtension()->openURLRequest( d->m_tdehtml->url(), args ); } -void KHTMLPopupGUIClient::slotFrameInTab() +void TDEHTMLPopupGUIClient::slotFrameInTab() { KParts::URLArgs args( d->m_tdehtml->browserExtension()->urlArgs() ); args.metaData()["referrer"] = d->m_tdehtml->pageReferrer(); @@ -803,7 +803,7 @@ void KHTMLPopupGUIClient::slotFrameInTab() emit d->m_tdehtml->browserExtension()->createNewWindow( d->m_tdehtml->url(), args ); } -void KHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption, +void TDEHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption, const KURL &url, const TQMap &metadata, const TQString &filter, long cacheId, @@ -834,21 +834,21 @@ void KHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption, saveURL(url, destURL, metadata, cacheId); } -void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, +void TDEHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, const TQMap &metadata, long cacheId ) { if ( destURL.isValid() ) { bool saved = false; - if (KHTMLPageCache::self()->isComplete(cacheId)) + if (TDEHTMLPageCache::self()->isComplete(cacheId)) { if (destURL.isLocalFile()) { KSaveFile destFile(destURL.path()); if (destFile.status() == 0) { - KHTMLPageCache::self()->saveData(cacheId, destFile.dataStream()); + TDEHTMLPageCache::self()->saveData(cacheId, destFile.dataStream()); saved = true; } } @@ -858,7 +858,7 @@ void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, KTempFile destFile; if (destFile.status() == 0) { - KHTMLPageCache::self()->saveData(cacheId, destFile.dataStream()); + TDEHTMLPageCache::self()->saveData(cacheId, destFile.dataStream()); destFile.close(); KURL url2 = KURL(); url2.setPath(destFile.name()); @@ -917,37 +917,37 @@ void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, } } -KHTMLPartBrowserHostExtension::KHTMLPartBrowserHostExtension( KHTMLPart *part ) +TDEHTMLPartBrowserHostExtension::TDEHTMLPartBrowserHostExtension( TDEHTMLPart *part ) : KParts::BrowserHostExtension( part ) { m_part = part; } -KHTMLPartBrowserHostExtension::~KHTMLPartBrowserHostExtension() +TDEHTMLPartBrowserHostExtension::~TDEHTMLPartBrowserHostExtension() { } -TQStringList KHTMLPartBrowserHostExtension::frameNames() const +TQStringList TDEHTMLPartBrowserHostExtension::frameNames() const { return m_part->frameNames(); } -const TQPtrList KHTMLPartBrowserHostExtension::frames() const +const TQPtrList TDEHTMLPartBrowserHostExtension::frames() const { return m_part->frames(); } -bool KHTMLPartBrowserHostExtension::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs ) +bool TDEHTMLPartBrowserHostExtension::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs ) { return m_part->openURLInFrame( url, urlArgs ); } -void KHTMLPartBrowserHostExtension::virtual_hook( int id, void *data ) +void TDEHTMLPartBrowserHostExtension::virtual_hook( int id, void *data ) { if (id == VIRTUAL_FIND_FRAME_PARENT) { FindFrameParentParams *param = static_cast(data); - KHTMLPart *parentPart = m_part->findFrameParent(param->callingPart, param->frame); + TDEHTMLPart *parentPart = m_part->findFrameParent(param->callingPart, param->frame); if (parentPart) param->parent = parentPart->browserHostExtension(); return; @@ -961,19 +961,19 @@ extern const int KDE_NO_EXPORT fastZoomSizes[]; extern const int KDE_NO_EXPORT fastZoomSizeCount; // BCI: remove in KDE 4 -KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) +TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KAction( text, icon, 0, receiver, slot, parent, name ) { init(part, direction); } -KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) +TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KAction( text, icon, cut, receiver, slot, parent, name ) { init(part, direction); } -void KHTMLZoomFactorAction::init(KHTMLPart *part, bool direction) +void TDEHTMLZoomFactorAction::init(TDEHTMLPart *part, bool direction) { m_direction = direction; m_part = part; @@ -999,12 +999,12 @@ void KHTMLZoomFactorAction::init(KHTMLPart *part, bool direction) connect( m_popup, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) ); } -KHTMLZoomFactorAction::~KHTMLZoomFactorAction() +TDEHTMLZoomFactorAction::~TDEHTMLZoomFactorAction() { delete m_popup; } -int KHTMLZoomFactorAction::plug( TQWidget *w, int index ) +int TDEHTMLZoomFactorAction::plug( TQWidget *w, int index ) { int containerId = KAction::plug( w, index ); if ( containerId == -1 || !w->inherits( "KToolBar" ) ) @@ -1018,7 +1018,7 @@ int KHTMLZoomFactorAction::plug( TQWidget *w, int index ) return containerId; } -void KHTMLZoomFactorAction::slotActivated( int id ) +void TDEHTMLZoomFactorAction::slotActivated( int id ) { int idx = m_popup->indexOf( id ); diff --git a/tdehtml/tdehtml_ext.h b/tdehtml/tdehtml_ext.h index 5a8f00e70..c6db763b9 100644 --- a/tdehtml/tdehtml_ext.h +++ b/tdehtml/tdehtml_ext.h @@ -35,16 +35,16 @@ #include /** - * This is the BrowserExtension for a KHTMLPart document. Please see the KParts documentation for + * This is the BrowserExtension for a TDEHTMLPart document. Please see the KParts documentation for * more information about the BrowserExtension. */ -class KHTMLPartBrowserExtension : public KParts::BrowserExtension +class TDEHTMLPartBrowserExtension : public KParts::BrowserExtension { Q_OBJECT - friend class KHTMLPart; - friend class KHTMLView; + friend class TDEHTMLPart; + friend class TDEHTMLView; public: - KHTMLPartBrowserExtension( KHTMLPart *parent, const char *name = 0L ); + TDEHTMLPartBrowserExtension( TDEHTMLPart *parent, const char *name = 0L ); virtual int xOffset(); virtual int yOffset(); @@ -84,17 +84,17 @@ signals: private: void callExtensionProxyMethod( const char *method ); - KHTMLPart *m_part; + TDEHTMLPart *m_part; TQGuardedPtr m_editableFormWidget; TQGuardedPtr m_extensionProxy; bool m_connectedToClipboard; }; -class KHTMLPartBrowserHostExtension : public KParts::BrowserHostExtension +class TDEHTMLPartBrowserHostExtension : public KParts::BrowserHostExtension { public: - KHTMLPartBrowserHostExtension( KHTMLPart *part ); - virtual ~KHTMLPartBrowserHostExtension(); + TDEHTMLPartBrowserHostExtension( TDEHTMLPart *part ); + virtual ~TDEHTMLPartBrowserHostExtension(); virtual TQStringList frameNames() const; @@ -105,19 +105,19 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - KHTMLPart *m_part; + TDEHTMLPart *m_part; }; /** * @internal * INTERNAL class. *NOT* part of the public API. */ -class KHTMLPopupGUIClient : public TQObject, public KXMLGUIClient +class TDEHTMLPopupGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT public: - KHTMLPopupGUIClient( KHTMLPart *tdehtml, const TQString &doc, const KURL &url ); - virtual ~KHTMLPopupGUIClient(); + TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQString &doc, const KURL &url ); + virtual ~TDEHTMLPopupGUIClient(); static void saveURL( TQWidget *parent, const TQString &caption, const KURL &url, const TQMap &metaData = TDEIO::MetaData(), @@ -145,20 +145,20 @@ private slots: void slotBlockIFrame(); private: - class KHTMLPopupGUIClientPrivate; - KHTMLPopupGUIClientPrivate *d; + class TDEHTMLPopupGUIClientPrivate; + TDEHTMLPopupGUIClientPrivate *d; }; -class KHTMLZoomFactorAction : public KAction +class TDEHTMLZoomFactorAction : public KAction { Q_OBJECT public: //BCI: remove in KDE 4 - KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); - KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, + TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); + TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const KShortcut& cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); - virtual ~KHTMLZoomFactorAction(); + virtual ~TDEHTMLZoomFactorAction(); virtual int plug( TQWidget *widget, int index ); @@ -167,11 +167,11 @@ private slots: protected slots: void slotActivated() { KAction::slotActivated(); } private: - void init(KHTMLPart *part, bool direction); + void init(TDEHTMLPart *part, bool direction); private: TQPopupMenu *m_popup; bool m_direction; - KHTMLPart *m_part; + TDEHTMLPart *m_part; }; #endif diff --git a/tdehtml/tdehtml_factory.cpp b/tdehtml/tdehtml_factory.cpp index 9d0ec6d36..103945736 100644 --- a/tdehtml/tdehtml_factory.cpp +++ b/tdehtml/tdehtml_factory.cpp @@ -37,40 +37,40 @@ #include -template class TQPtrList; +template class TQPtrList; extern "C" KDE_EXPORT void *init_libtdehtml() { // We can't use a plain self() here, because that would // return the global factory, which might already exist // at the time init_libtdehtml is called! As soon as someone - // does new KHTMLPart() in his application and loads up + // does new TDEHTMLPart() in his application and loads up // an html document into that part which either embeds - // embeds another KHTMLPart instance via or + // embeds another TDEHTMLPart instance via or // as html frame, then we cannot return self(), as // what we return here is what the KLibLoader deletes // in the end, and we don't want the libloader to // delete our global instance. Anyway, the new - // KHTMLFactory we create here is very cheap :) + // TDEHTMLFactory we create here is very cheap :) // (Simon) - return new KHTMLFactory( true ); + return new TDEHTMLFactory( true ); } -KHTMLFactory *KHTMLFactory::s_self = 0; -unsigned long int KHTMLFactory::s_refcnt = 0; -TDEInstance *KHTMLFactory::s_instance = 0; -TDEAboutData *KHTMLFactory::s_about = 0; -KHTMLSettings *KHTMLFactory::s_settings = 0; -TQPtrList *KHTMLFactory::s_parts = 0; -TQString *KHTMLSettings::avFamilies = 0; +TDEHTMLFactory *TDEHTMLFactory::s_self = 0; +unsigned long int TDEHTMLFactory::s_refcnt = 0; +TDEInstance *TDEHTMLFactory::s_instance = 0; +TDEAboutData *TDEHTMLFactory::s_about = 0; +TDEHTMLSettings *TDEHTMLFactory::s_settings = 0; +TQPtrList *TDEHTMLFactory::s_parts = 0; +TQString *TDEHTMLSettings::avFamilies = 0; -KHTMLFactory::KHTMLFactory( bool clone ) +TDEHTMLFactory::TDEHTMLFactory( bool clone ) { if ( clone ) ref(); } -KHTMLFactory::~KHTMLFactory() +TDEHTMLFactory::~TDEHTMLFactory() { if ( s_self == this ) { @@ -79,7 +79,7 @@ KHTMLFactory::~KHTMLFactory() delete s_instance; delete s_about; delete s_settings; - delete KHTMLSettings::avFamilies; + delete TDEHTMLSettings::avFamilies; if ( s_parts ) { assert( s_parts->isEmpty() ); @@ -90,7 +90,7 @@ KHTMLFactory::~KHTMLFactory() s_about = 0; s_settings = 0; s_parts = 0; - KHTMLSettings::avFamilies = 0; + TDEHTMLSettings::avFamilies = 0; // clean up static data tdehtml::CSSStyleSelector::clear(); @@ -103,16 +103,16 @@ KHTMLFactory::~KHTMLFactory() deref(); } -KParts::Part *KHTMLFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList & ) +KParts::Part *TDEHTMLFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList & ) { - KHTMLPart::GUIProfile prof = KHTMLPart::DefaultGUI; + TDEHTMLPart::GUIProfile prof = TDEHTMLPart::DefaultGUI; if ( strcmp( className, "Browser/View" ) == 0 ) - prof = KHTMLPart::BrowserViewGUI; + prof = TDEHTMLPart::BrowserViewGUI; - return new KHTMLPart( parentWidget, widgetName, parent, name, prof ); + return new TDEHTMLPart( parentWidget, widgetName, parent, name, prof ); } -void KHTMLFactory::ref() +void TDEHTMLFactory::ref() { if ( !s_refcnt && !s_self ) { @@ -125,14 +125,14 @@ void KHTMLFactory::ref() // well, perhaps I'm wrong here, but as I'm unsure I try to stay on the // safe side ;-) -> let's use a simple reference counting scheme // (Simon) - s_self = new KHTMLFactory; + s_self = new TDEHTMLFactory; tdehtml::Cache::init(); } s_refcnt++; } -void KHTMLFactory::deref() +void TDEHTMLFactory::deref() { if ( !--s_refcnt && s_self ) { @@ -141,10 +141,10 @@ void KHTMLFactory::deref() } } -void KHTMLFactory::registerPart( KHTMLPart *part ) +void TDEHTMLFactory::registerPart( TDEHTMLPart *part ) { if ( !s_parts ) - s_parts = new TQPtrList; + s_parts = new TQPtrList; if ( !s_parts->containsRef( part ) ) { @@ -153,7 +153,7 @@ void KHTMLFactory::registerPart( KHTMLPart *part ) } } -void KHTMLFactory::deregisterPart( KHTMLPart *part ) +void TDEHTMLFactory::deregisterPart( TDEHTMLPart *part ) { assert( s_parts ); @@ -168,13 +168,13 @@ void KHTMLFactory::deregisterPart( KHTMLPart *part ) } } -TDEInstance *KHTMLFactory::instance() +TDEInstance *TDEHTMLFactory::instance() { assert( s_self ); if ( !s_instance ) { - s_about = new TDEAboutData( "tdehtml", I18N_NOOP( "KHTML" ), "4.0", + s_about = new TDEAboutData( "tdehtml", I18N_NOOP( "TDEHTML" ), "4.0", I18N_NOOP( "Embeddable HTML component" ), TDEAboutData::License_LGPL ); s_about->addAuthor( "Lars Knoll", 0, "knoll@kde.org" ); @@ -193,11 +193,11 @@ TDEInstance *KHTMLFactory::instance() return s_instance; } -KHTMLSettings *KHTMLFactory::defaultHTMLSettings() +TDEHTMLSettings *TDEHTMLFactory::defaultHTMLSettings() { assert( s_self ); if ( !s_settings ) - s_settings = new KHTMLSettings(); + s_settings = new TDEHTMLSettings(); return s_settings; } diff --git a/tdehtml/tdehtml_factory.h b/tdehtml/tdehtml_factory.h index 2177a2602..3ad2aff8c 100644 --- a/tdehtml/tdehtml_factory.h +++ b/tdehtml/tdehtml_factory.h @@ -28,33 +28,33 @@ class TDEInstance; class TDEAboutData; class HistoryProvider; -class KHTMLSettings; -class KHTMLPart; +class TDEHTMLSettings; +class TDEHTMLPart; namespace DOM { class DocumentImpl; } -class KDE_EXPORT KHTMLFactory : public KParts::Factory +class KDE_EXPORT TDEHTMLFactory : public KParts::Factory { Q_OBJECT friend class DOM::DocumentImpl; - friend class KHTMLViewPrivate; + friend class TDEHTMLViewPrivate; public: - KHTMLFactory( bool clone = false ); - virtual ~KHTMLFactory(); + TDEHTMLFactory( bool clone = false ); + virtual ~TDEHTMLFactory(); virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList &args ); - static void registerPart( KHTMLPart *part ); - static void deregisterPart( KHTMLPart *part ); + static void registerPart( TDEHTMLPart *part ); + static void deregisterPart( TDEHTMLPart *part ); - static TQPtrList *partList() { return s_parts; } + static TQPtrList *partList() { return s_parts; } static TDEInstance *instance(); - static KHTMLSettings *defaultHTMLSettings(); + static TDEHTMLSettings *defaultHTMLSettings(); // list of visited URLs static KParts::HistoryProvider *vLinks() { @@ -66,11 +66,11 @@ protected: static void deref(); private: static unsigned long s_refcnt; - static KHTMLFactory *s_self; + static TDEHTMLFactory *s_self; static TDEInstance *s_instance; static TDEAboutData *s_about; - static KHTMLSettings *s_settings; - static TQPtrList *s_parts; + static TDEHTMLSettings *s_settings; + static TQPtrList *s_parts; }; #endif diff --git a/tdehtml/tdehtml_iface.cc b/tdehtml/tdehtml_iface.cc index 1ceb6b5d4..4bb4afd89 100644 --- a/tdehtml/tdehtml_iface.cc +++ b/tdehtml/tdehtml_iface.cc @@ -26,127 +26,127 @@ #include #include -KHTMLPartIface::KHTMLPartIface( KHTMLPart *_part ) +TDEHTMLPartIface::TDEHTMLPartIface( TDEHTMLPart *_part ) : DCOPObject( _part->dcopObjectId() ), part(_part) { } -KHTMLPartIface::~KHTMLPartIface() +TDEHTMLPartIface::~TDEHTMLPartIface() { } -KURL KHTMLPartIface::url() const +KURL TDEHTMLPartIface::url() const { return part->url(); } -void KHTMLPartIface::setJScriptEnabled( bool enable ) +void TDEHTMLPartIface::setJScriptEnabled( bool enable ) { part->setJScriptEnabled(enable); } -bool KHTMLPartIface::jScriptEnabled() const +bool TDEHTMLPartIface::jScriptEnabled() const { return part->jScriptEnabled(); } -bool KHTMLPartIface::closeURL() +bool TDEHTMLPartIface::closeURL() { return part->closeURL(); } -bool KHTMLPartIface::metaRefreshEnabled() const +bool TDEHTMLPartIface::metaRefreshEnabled() const { return part->metaRefreshEnabled(); } -void KHTMLPartIface::setDNDEnabled( bool b ) +void TDEHTMLPartIface::setDNDEnabled( bool b ) { part->setDNDEnabled(b); } -bool KHTMLPartIface::dndEnabled() const +bool TDEHTMLPartIface::dndEnabled() const { return part->dndEnabled(); } -void KHTMLPartIface::setJavaEnabled( bool enable ) +void TDEHTMLPartIface::setJavaEnabled( bool enable ) { part->setJavaEnabled( enable ); } -bool KHTMLPartIface::javaEnabled() const +bool TDEHTMLPartIface::javaEnabled() const { return part->javaEnabled(); } -void KHTMLPartIface::setPluginsEnabled( bool enable ) +void TDEHTMLPartIface::setPluginsEnabled( bool enable ) { part->setPluginsEnabled( enable ); } -bool KHTMLPartIface::pluginsEnabled() const +bool TDEHTMLPartIface::pluginsEnabled() const { return part->pluginsEnabled(); } -void KHTMLPartIface::setAutoloadImages( bool enable ) +void TDEHTMLPartIface::setAutoloadImages( bool enable ) { part->setAutoloadImages( enable ); } -bool KHTMLPartIface::autoloadImages() const +bool TDEHTMLPartIface::autoloadImages() const { return part->autoloadImages(); } -void KHTMLPartIface::setOnlyLocalReferences(bool enable) +void TDEHTMLPartIface::setOnlyLocalReferences(bool enable) { part->setOnlyLocalReferences(enable); } -void KHTMLPartIface::setMetaRefreshEnabled( bool enable ) +void TDEHTMLPartIface::setMetaRefreshEnabled( bool enable ) { part->setMetaRefreshEnabled(enable); } -bool KHTMLPartIface::onlyLocalReferences() const +bool TDEHTMLPartIface::onlyLocalReferences() const { return part->onlyLocalReferences(); } -bool KHTMLPartIface::setEncoding( const TQString &name ) +bool TDEHTMLPartIface::setEncoding( const TQString &name ) { return part->setEncoding(name); } -TQString KHTMLPartIface::encoding() const +TQString TDEHTMLPartIface::encoding() const { return part->encoding(); } -void KHTMLPartIface::setFixedFont( const TQString &name ) +void TDEHTMLPartIface::setFixedFont( const TQString &name ) { part->setFixedFont(name); } -bool KHTMLPartIface::gotoAnchor( const TQString &name ) +bool TDEHTMLPartIface::gotoAnchor( const TQString &name ) { return part->gotoAnchor(name); } -bool KHTMLPartIface::nextAnchor() +bool TDEHTMLPartIface::nextAnchor() { return part->nextAnchor(); } -bool KHTMLPartIface::prevAnchor() +bool TDEHTMLPartIface::prevAnchor() { return part->prevAnchor(); } -void KHTMLPartIface::activateNode() +void TDEHTMLPartIface::activateNode() { KParts::ReadOnlyPart* p = part->currentFrame(); if ( p && p->widget() ) { @@ -155,37 +155,37 @@ void KHTMLPartIface::activateNode() } } -void KHTMLPartIface::selectAll() +void TDEHTMLPartIface::selectAll() { part->selectAll(); } -TQString KHTMLPartIface::lastModified() const +TQString TDEHTMLPartIface::lastModified() const { return part->lastModified(); } -void KHTMLPartIface::debugRenderTree() +void TDEHTMLPartIface::debugRenderTree() { part->slotDebugRenderTree(); } -void KHTMLPartIface::debugDOMTree() +void TDEHTMLPartIface::debugDOMTree() { part->slotDebugDOMTree(); } -void KHTMLPartIface::stopAnimations() +void TDEHTMLPartIface::stopAnimations() { part->slotStopAnimations(); } -void KHTMLPartIface::viewDocumentSource() +void TDEHTMLPartIface::viewDocumentSource() { part->slotViewDocumentSource(); } -void KHTMLPartIface::saveBackground(const TQString &destination) +void TDEHTMLPartIface::saveBackground(const TQString &destination) { KURL back = part->backgroundURL(); if (back.isEmpty()) @@ -193,10 +193,10 @@ void KHTMLPartIface::saveBackground(const TQString &destination) TDEIO::MetaData metaData; metaData["referrer"] = part->referrer(); - KHTMLPopupGUIClient::saveURL( back, KURL( destination ), metaData ); + TDEHTMLPopupGUIClient::saveURL( back, KURL( destination ), metaData ); } -void KHTMLPartIface::saveDocument(const TQString &destination) +void TDEHTMLPartIface::saveDocument(const TQString &destination) { KURL srcURL( part->url() ); @@ -205,29 +205,29 @@ void KHTMLPartIface::saveDocument(const TQString &destination) TDEIO::MetaData metaData; // Referrer unknown? - KHTMLPopupGUIClient::saveURL( srcURL, KURL( destination ), metaData, part->cacheId() ); + TDEHTMLPopupGUIClient::saveURL( srcURL, KURL( destination ), metaData, part->cacheId() ); } -void KHTMLPartIface::setUserStyleSheet(const TQString &styleSheet) +void TDEHTMLPartIface::setUserStyleSheet(const TQString &styleSheet) { part->setUserStyleSheet(styleSheet); } -TQString KHTMLPartIface::selectedText() const +TQString TDEHTMLPartIface::selectedText() const { return part->selectedText(); } -void KHTMLPartIface::viewFrameSource() +void TDEHTMLPartIface::viewFrameSource() { part->slotViewFrameSource(); } -TQString KHTMLPartIface::evalJS(const TQString &script) +TQString TDEHTMLPartIface::evalJS(const TQString &script) { return part->executeScript(DOM::Node(), script).toString(); } -void KHTMLPartIface::print( bool quick ) { +void TDEHTMLPartIface::print( bool quick ) { part->view()->print( quick ); } diff --git a/tdehtml/tdehtml_iface.h b/tdehtml/tdehtml_iface.h index d4c34940b..4ca0a3e06 100644 --- a/tdehtml/tdehtml_iface.h +++ b/tdehtml/tdehtml_iface.h @@ -24,19 +24,19 @@ #include #include -class KHTMLPart; +class TDEHTMLPart; /** - * DCOP interface for KHTML + * DCOP interface for TDEHTML */ -class KHTMLPartIface : public DCOPObject +class TDEHTMLPartIface : public DCOPObject { K_DCOP public: - KHTMLPartIface( KHTMLPart * ); - virtual ~KHTMLPartIface(); + TDEHTMLPartIface( TDEHTMLPart * ); + virtual ~TDEHTMLPartIface(); k_dcop: /** @@ -235,7 +235,7 @@ k_dcop: void stopAnimations(); private: - KHTMLPart *part; + TDEHTMLPart *part; }; #endif diff --git a/tdehtml/tdehtml_pagecache.cpp b/tdehtml/tdehtml_pagecache.cpp index bde26c9de..c2e0a89e1 100644 --- a/tdehtml/tdehtml_pagecache.cpp +++ b/tdehtml/tdehtml_pagecache.cpp @@ -32,18 +32,18 @@ #include // We keep 12 pages in memory. -#ifndef KHTML_PAGE_CACHE_SIZE -#define KHTML_PAGE_CACHE_SIZE 12 +#ifndef TDEHTML_PAGE_CACHE_SIZE +#define TDEHTML_PAGE_CACHE_SIZE 12 #endif -template class TQPtrList; -class KHTMLPageCacheEntry +template class TQPtrList; +class TDEHTMLPageCacheEntry { - friend class KHTMLPageCache; + friend class TDEHTMLPageCache; public: - KHTMLPageCacheEntry(long id); + TDEHTMLPageCacheEntry(long id); - ~KHTMLPageCacheEntry(); + ~TDEHTMLPageCacheEntry(); void addData(const TQByteArray &data); @@ -52,7 +52,7 @@ public: bool isComplete() { return m_complete; } - KHTMLPageCacheDelivery *fetchData(TQObject *recvObj, const char *recvSlot); + TDEHTMLPageCacheDelivery *fetchData(TQObject *recvObj, const char *recvSlot); private: long m_id; bool m_complete; @@ -60,38 +60,38 @@ private: KTempFile *m_file; }; -class KHTMLPageCachePrivate +class TDEHTMLPageCachePrivate { public: long newId; - TQIntDict dict; - TQPtrList delivery; - TQPtrList expireQueue; + TQIntDict dict; + TQPtrList delivery; + TQPtrList expireQueue; bool deliveryActive; }; -KHTMLPageCacheEntry::KHTMLPageCacheEntry(long id) : m_id(id), m_complete(false) +TDEHTMLPageCacheEntry::TDEHTMLPageCacheEntry(long id) : m_id(id), m_complete(false) { TQString path = locateLocal("tmp", "tdehtmlcache"); m_file = new KTempFile(path); m_file->unlink(); } -KHTMLPageCacheEntry::~KHTMLPageCacheEntry() +TDEHTMLPageCacheEntry::~TDEHTMLPageCacheEntry() { delete m_file; } void -KHTMLPageCacheEntry::addData(const TQByteArray &data) +TDEHTMLPageCacheEntry::addData(const TQByteArray &data) { if (m_file->status() == 0) m_file->dataStream()->writeRawBytes(data.data(), data.size()); } void -KHTMLPageCacheEntry::endData() +TDEHTMLPageCacheEntry::endData() { m_complete = true; if ( m_file->status() == 0) { @@ -101,38 +101,38 @@ KHTMLPageCacheEntry::endData() } -KHTMLPageCacheDelivery * -KHTMLPageCacheEntry::fetchData(TQObject *recvObj, const char *recvSlot) +TDEHTMLPageCacheDelivery * +TDEHTMLPageCacheEntry::fetchData(TQObject *recvObj, const char *recvSlot) { // Duplicate fd so that entry can be safely deleted while delivering the data. int fd = dup(m_file->handle()); lseek(fd, 0, SEEK_SET); - KHTMLPageCacheDelivery *delivery = new KHTMLPageCacheDelivery(fd); + TDEHTMLPageCacheDelivery *delivery = new TDEHTMLPageCacheDelivery(fd); recvObj->connect(delivery, TQT_SIGNAL(emitData(const TQByteArray&)), recvSlot); delivery->recvObj = recvObj; return delivery; } -static KStaticDeleter pageCacheDeleter; +static KStaticDeleter pageCacheDeleter; -KHTMLPageCache *KHTMLPageCache::_self = 0; +TDEHTMLPageCache *TDEHTMLPageCache::_self = 0; -KHTMLPageCache * -KHTMLPageCache::self() +TDEHTMLPageCache * +TDEHTMLPageCache::self() { if (!_self) - _self = pageCacheDeleter.setObject(_self, new KHTMLPageCache); + _self = pageCacheDeleter.setObject(_self, new TDEHTMLPageCache); return _self; } -KHTMLPageCache::KHTMLPageCache() +TDEHTMLPageCache::TDEHTMLPageCache() { - d = new KHTMLPageCachePrivate; + d = new TDEHTMLPageCachePrivate; d->newId = 1; d->deliveryActive = false; } -KHTMLPageCache::~KHTMLPageCache() +TDEHTMLPageCache::~TDEHTMLPageCache() { d->delivery.setAutoDelete(true); d->dict.setAutoDelete(true); @@ -140,14 +140,14 @@ KHTMLPageCache::~KHTMLPageCache() } long -KHTMLPageCache::createCacheEntry() +TDEHTMLPageCache::createCacheEntry() { - KHTMLPageCacheEntry *entry = new KHTMLPageCacheEntry(d->newId); + TDEHTMLPageCacheEntry *entry = new TDEHTMLPageCacheEntry(d->newId); d->dict.insert(d->newId, entry); d->expireQueue.append(entry); - if (d->expireQueue.count() > KHTML_PAGE_CACHE_SIZE) + if (d->expireQueue.count() > TDEHTML_PAGE_CACHE_SIZE) { - KHTMLPageCacheEntry *entry = d->expireQueue.take(0); + TDEHTMLPageCacheEntry *entry = d->expireQueue.take(0); d->dict.remove(entry->m_id); delete entry; } @@ -155,25 +155,25 @@ KHTMLPageCache::createCacheEntry() } void -KHTMLPageCache::addData(long id, const TQByteArray &data) +TDEHTMLPageCache::addData(long id, const TQByteArray &data) { - KHTMLPageCacheEntry *entry = d->dict.find(id); + TDEHTMLPageCacheEntry *entry = d->dict.find(id); if (entry) entry->addData(data); } void -KHTMLPageCache::endData(long id) +TDEHTMLPageCache::endData(long id) { - KHTMLPageCacheEntry *entry = d->dict.find(id); + TDEHTMLPageCacheEntry *entry = d->dict.find(id); if (entry) entry->endData(); } void -KHTMLPageCache::cancelEntry(long id) +TDEHTMLPageCache::cancelEntry(long id) { - KHTMLPageCacheEntry *entry = d->dict.take(id); + TDEHTMLPageCacheEntry *entry = d->dict.take(id); if (entry) { d->expireQueue.removeRef(entry); @@ -182,24 +182,24 @@ KHTMLPageCache::cancelEntry(long id) } bool -KHTMLPageCache::isValid(long id) +TDEHTMLPageCache::isValid(long id) { return (d->dict.find(id) != 0); } bool -KHTMLPageCache::isComplete(long id) +TDEHTMLPageCache::isComplete(long id) { - KHTMLPageCacheEntry *entry = d->dict.find(id); + TDEHTMLPageCacheEntry *entry = d->dict.find(id); if (entry) return entry->isComplete(); return false; } void -KHTMLPageCache::fetchData(long id, TQObject *recvObj, const char *recvSlot) +TDEHTMLPageCache::fetchData(long id, TQObject *recvObj, const char *recvSlot) { - KHTMLPageCacheEntry *entry = d->dict.find(id); + TDEHTMLPageCacheEntry *entry = d->dict.find(id); if (!entry || !entry->isComplete()) return; // Make this entry the most recent entry. @@ -215,10 +215,10 @@ KHTMLPageCache::fetchData(long id, TQObject *recvObj, const char *recvSlot) } void -KHTMLPageCache::cancelFetch(TQObject *recvObj) +TDEHTMLPageCache::cancelFetch(TQObject *recvObj) { - KHTMLPageCacheDelivery *next; - for(KHTMLPageCacheDelivery* delivery = d->delivery.first(); + TDEHTMLPageCacheDelivery *next; + for(TDEHTMLPageCacheDelivery* delivery = d->delivery.first(); delivery; delivery = next) { @@ -232,14 +232,14 @@ KHTMLPageCache::cancelFetch(TQObject *recvObj) } void -KHTMLPageCache::sendData() +TDEHTMLPageCache::sendData() { if (d->delivery.isEmpty()) { d->deliveryActive = false; return; } - KHTMLPageCacheDelivery *delivery = d->delivery.take(0); + TDEHTMLPageCacheDelivery *delivery = d->delivery.take(0); assert(delivery); char buf[8192]; @@ -269,9 +269,9 @@ KHTMLPageCache::sendData() } void -KHTMLPageCache::saveData(long id, TQDataStream *str) +TDEHTMLPageCache::saveData(long id, TQDataStream *str) { - KHTMLPageCacheEntry *entry = d->dict.find(id); + TDEHTMLPageCacheEntry *entry = d->dict.find(id); assert(entry); int fd = entry->m_file->handle(); @@ -305,7 +305,7 @@ KHTMLPageCache::saveData(long id, TQDataStream *str) lseek(fd, pos, SEEK_SET); } -KHTMLPageCacheDelivery::~KHTMLPageCacheDelivery() +TDEHTMLPageCacheDelivery::~TDEHTMLPageCacheDelivery() { close(fd); } diff --git a/tdehtml/tdehtml_pagecache.h b/tdehtml/tdehtml_pagecache.h index e2992faa4..fbafa171d 100644 --- a/tdehtml/tdehtml_pagecache.h +++ b/tdehtml/tdehtml_pagecache.h @@ -25,7 +25,7 @@ #include #include -class KHTMLPageCachePrivate; +class TDEHTMLPageCachePrivate; /** * Singleton Object that handles a binary cache on top of @@ -38,7 +38,7 @@ class KHTMLPageCachePrivate; * * It operates completely independent from the kio_http cache. */ -class KHTMLPageCache : public TQObject +class TDEHTMLPageCache : public TQObject { Q_OBJECT public: @@ -47,8 +47,8 @@ public: * @return returns a pointer to the cache, if it exists. * creates a new cache otherwise. */ - static KHTMLPageCache *self(); - ~KHTMLPageCache(); + static TDEHTMLPageCache *self(); + ~TDEHTMLPageCache(); /** * Create a new cache entry. @@ -106,21 +106,21 @@ private slots: void sendData(); private: - KHTMLPageCache(); + TDEHTMLPageCache(); - static KHTMLPageCache *_self; + static TDEHTMLPageCache *_self; - KHTMLPageCachePrivate *d; + TDEHTMLPageCachePrivate *d; }; -class KHTMLPageCacheDelivery : public TQObject +class TDEHTMLPageCacheDelivery : public TQObject { - friend class KHTMLPageCache; + friend class TDEHTMLPageCache; Q_OBJECT public: - KHTMLPageCacheDelivery(int _fd) + TDEHTMLPageCacheDelivery(int _fd) : fd(_fd) { } - ~KHTMLPageCacheDelivery(); + ~TDEHTMLPageCacheDelivery(); signals: void emitData(const TQByteArray &data); diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index 2ebd55df8..47d9de509 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -125,7 +125,7 @@ namespace tdehtml { class PartStyleSheetLoader : public CachedObjectClient { public: - PartStyleSheetLoader(KHTMLPart *part, DOM::DOMString url, DocLoader* dl) + PartStyleSheetLoader(TDEHTMLPart *part, DOM::DOMString url, DocLoader* dl) { m_part = part; m_cachedSheet = dl->requestStyleSheet(url, TQString(), "text/css", @@ -147,7 +147,7 @@ namespace tdehtml { virtual void error( int, const TQString& ) { delete this; } - TQGuardedPtr m_part; + TQGuardedPtr m_part; tdehtml::CachedCSSStyleSheet *m_cachedSheet; }; } @@ -178,7 +178,7 @@ void tdehtml::ChildFrame::liveConnectEvent(const unsigned long, const TQString & script += ")"; kdDebug(6050) << "tdehtml::ChildFrame::liveConnectEvent " << script << endl; - KHTMLPart * part = ::tqqt_cast(m_part->parent()); + TDEHTMLPart * part = ::tqqt_cast(m_part->parent()); if (!part) return; if (!m_jscript) @@ -191,7 +191,7 @@ void tdehtml::ChildFrame::liveConnectEvent(const unsigned long, const TQString & part->executeScript(m_frame->element(), script); } -KHTMLFrameList::Iterator KHTMLFrameList::find( const TQString &name ) +TDEHTMLFrameList::Iterator TDEHTMLFrameList::find( const TQString &name ) { Iterator it = begin(); const Iterator e = end(); @@ -203,44 +203,44 @@ KHTMLFrameList::Iterator KHTMLFrameList::find( const TQString &name ) return it; } -KHTMLPart::KHTMLPart( TQWidget *parentWidget, const char *widgetname, TQObject *parent, const char *name, GUIProfile prof ) +TDEHTMLPart::TDEHTMLPart( TQWidget *parentWidget, const char *widgetname, TQObject *parent, const char *name, GUIProfile prof ) : KParts::ReadOnlyPart( parent, name ) { d = 0; - KHTMLFactory::registerPart( this ); - setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() ); + TDEHTMLFactory::registerPart( this ); + setInstance( TDEHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() ); // TODO KDE4 - don't load plugins yet - //setInstance( KHTMLFactory::instance(), false ); - init( new KHTMLView( this, parentWidget, widgetname ), prof ); + //setInstance( TDEHTMLFactory::instance(), false ); + init( new TDEHTMLView( this, parentWidget, widgetname ), prof ); } -KHTMLPart::KHTMLPart( KHTMLView *view, TQObject *parent, const char *name, GUIProfile prof ) +TDEHTMLPart::TDEHTMLPart( TDEHTMLView *view, TQObject *parent, const char *name, GUIProfile prof ) : KParts::ReadOnlyPart( parent, name ) { d = 0; - KHTMLFactory::registerPart( this ); - setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() ); + TDEHTMLFactory::registerPart( this ); + setInstance( TDEHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() ); // TODO KDE4 - don't load plugins yet - //setInstance( KHTMLFactory::instance(), false ); + //setInstance( TDEHTMLFactory::instance(), false ); assert( view ); init( view, prof ); } -void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) +void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) { if ( prof == DefaultGUI ) setXMLFile( "tdehtml.rc" ); else if ( prof == BrowserViewGUI ) setXMLFile( "tdehtml_browser.rc" ); - d = new KHTMLPartPrivate(parent()); + d = new TDEHTMLPartPrivate(parent()); d->m_view = view; setWidget( d->m_view ); d->m_guiProfile = prof; - d->m_extension = new KHTMLPartBrowserExtension( this, "KHTMLBrowserExtension" ); - d->m_hostExtension = new KHTMLPartBrowserHostExtension( this ); + d->m_extension = new TDEHTMLPartBrowserExtension( this, "TDEHTMLBrowserExtension" ); + d->m_hostExtension = new TDEHTMLPartBrowserHostExtension( this ); d->m_statusBarExtension = new KParts::StatusBarExtension( this ); d->m_statusBarIconLabel = 0L; d->m_statusBarPopupLabel = 0L; @@ -357,13 +357,13 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) d->m_paUseStylesheet = new KSelectAction( i18n( "Use S&tylesheet"), 0, this, TQT_SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" ); if ( prof == BrowserViewGUI ) { - d->m_paIncZoomFactor = new KHTMLZoomFactorAction( this, true, i18n( + d->m_paIncZoomFactor = new TDEHTMLZoomFactorAction( this, true, i18n( "Enlarge Font" ), "viewmag+", "CTRL++;CTRL+=", this, TQT_SLOT( slotIncZoomFast() ), actionCollection(), "incFontSizes" ); d->m_paIncZoomFactor->setWhatsThis( i18n( "Enlarge Font

      " "Make the font in this window bigger. " "Click and hold down the mouse button for a menu with all available font sizes." ) ); - d->m_paDecZoomFactor = new KHTMLZoomFactorAction( this, false, i18n( + d->m_paDecZoomFactor = new TDEHTMLZoomFactorAction( this, false, i18n( "Shrink Font" ), "viewmag-", CTRL + Key_Minus, this, TQT_SLOT( slotDecZoomFast() ), actionCollection(), "decFontSizes" ); d->m_paDecZoomFactor->setWhatsThis( i18n( "Shrink Font

      " @@ -437,7 +437,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) connect( this, TQT_SIGNAL( started( TDEIO::Job * ) ), this, TQT_SLOT( updateActions() ) ); - d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "tdehtml/tdehtml_popupmenu.rc", KHTMLFactory::instance() ) ); + d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "tdehtml/tdehtml_popupmenu.rc", TDEHTMLFactory::instance() ) ); connect( tdehtml::Cache::loader(), TQT_SIGNAL( requestStarted( tdehtml::DocLoader*, tdehtml::CachedObject* ) ), this, TQT_SLOT( slotLoaderRequestStarted( tdehtml::DocLoader*, tdehtml::CachedObject* ) ) ); @@ -453,7 +453,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) connect( &d->m_redirectionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRedirect() ) ); - d->m_dcopobject = new KHTMLPartIface(this); + d->m_dcopobject = new TDEHTMLPartIface(this); // TODO KDE4 - load plugins now (see also the constructors) //if ( prof == BrowserViewGUI && !parentPart() ) @@ -465,9 +465,9 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) TDEGlobal::locale()->removeCatalogue("tdehtml"); } -KHTMLPart::~KHTMLPart() +TDEHTMLPart::~TDEHTMLPart() { - //kdDebug(6050) << "KHTMLPart::~KHTMLPart " << this << endl; + //kdDebug(6050) << "TDEHTMLPart::~TDEHTMLPart " << this << endl; TDEConfig *config = TDEGlobal::config(); config->setGroup( "HTML Settings" ); @@ -520,12 +520,12 @@ KHTMLPart::~KHTMLPart() if (!parentPart()) // only delete d->m_frame if the top tdehtml_part closes delete d->m_frame; delete d; d = 0; - KHTMLFactory::deregisterPart( this ); + TDEHTMLFactory::deregisterPart( this ); } -bool KHTMLPart::restoreURL( const KURL &url ) +bool TDEHTMLPart::restoreURL( const KURL &url ) { - kdDebug( 6050 ) << "KHTMLPart::restoreURL " << url.url() << endl; + kdDebug( 6050 ) << "TDEHTMLPart::restoreURL " << url.url() << endl; d->m_redirectionTimer.stop(); @@ -544,10 +544,10 @@ bool KHTMLPart::restoreURL( const KURL &url ) d->m_workingURL = url; // set the java(script) flags according to the current host. - d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host()); - setDebugScript( KHTMLFactory::defaultHTMLSettings()->isJavaScriptDebugEnabled() ); - d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host()); - d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host()); + d->m_bJScriptEnabled = TDEHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host()); + setDebugScript( TDEHTMLFactory::defaultHTMLSettings()->isJavaScriptDebugEnabled() ); + d->m_bJavaEnabled = TDEHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host()); + d->m_bPluginsEnabled = TDEHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host()); m_url = url; @@ -555,7 +555,7 @@ bool KHTMLPart::restoreURL( const KURL &url ) disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition())); connect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition())); - KHTMLPageCache::self()->fetchData( d->m_cacheId, this, TQT_SLOT(slotRestoreData(const TQByteArray &))); + TDEHTMLPageCache::self()->fetchData( d->m_cacheId, this, TQT_SLOT(slotRestoreData(const TQByteArray &))); emit started( 0L ); @@ -563,9 +563,9 @@ bool KHTMLPart::restoreURL( const KURL &url ) } -bool KHTMLPart::openURL( const KURL &url ) +bool TDEHTMLPart::openURL( const KURL &url ) { - kdDebug( 6050 ) << "KHTMLPart(" << this << ")::openURL " << url.url() << endl; + kdDebug( 6050 ) << "TDEHTMLPart(" << this << ")::openURL " << url.url() << endl; d->m_redirectionTimer.stop(); @@ -644,7 +644,7 @@ bool KHTMLPart::openURL( const KURL &url ) bool noReloadForced = !args.reload && !args.redirectedRequest() && !args.doPost(); if (noReloadForced && urlcmp( url.url(), m_url.url(), true, true )) { - kdDebug( 6050 ) << "KHTMLPart::openURL, jumping to anchor. m_url = " << url.url() << endl; + kdDebug( 6050 ) << "TDEHTMLPart::openURL, jumping to anchor. m_url = " << url.url() << endl; m_url = url; emit started( 0L ); @@ -737,10 +737,10 @@ bool KHTMLPart::openURL( const KURL &url ) d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString(); // set the javascript flags according to the current url - d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host()); - setDebugScript( KHTMLFactory::defaultHTMLSettings()->isJavaScriptDebugEnabled() ); - d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host()); - d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host()); + d->m_bJScriptEnabled = TDEHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host()); + setDebugScript( TDEHTMLFactory::defaultHTMLSettings()->isJavaScriptDebugEnabled() ); + d->m_bJavaEnabled = TDEHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host()); + d->m_bPluginsEnabled = TDEHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host()); connect( d->m_job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), @@ -767,11 +767,11 @@ bool KHTMLPart::openURL( const KURL &url ) return true; } -bool KHTMLPart::closeURL() +bool TDEHTMLPart::closeURL() { if ( d->m_job ) { - KHTMLPageCache::self()->cancelEntry(d->m_cacheId); + TDEHTMLPageCache::self()->cancelEntry(d->m_cacheId); d->m_job->kill(); d->m_job = 0; } @@ -793,7 +793,7 @@ bool KHTMLPart::closeURL() disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition())); - KHTMLPageCache::self()->cancelFetch(this); + TDEHTMLPageCache::self()->cancelFetch(this); if ( d->m_doc && d->m_doc->parsing() ) { kdDebug( 6050 ) << " was still parsing... calling end " << endl; @@ -849,7 +849,7 @@ bool KHTMLPart::closeURL() return true; } -DOM::HTMLDocument KHTMLPart::htmlDocument() const +DOM::HTMLDocument TDEHTMLPart::htmlDocument() const { if (d->m_doc && d->m_doc->isHTMLDocument()) return static_cast(d->m_doc); @@ -857,19 +857,19 @@ DOM::HTMLDocument KHTMLPart::htmlDocument() const return static_cast(0); } -DOM::Document KHTMLPart::document() const +DOM::Document TDEHTMLPart::document() const { return d->m_doc; } -TQString KHTMLPart::documentSource() const +TQString TDEHTMLPart::documentSource() const { TQString sourceStr; - if ( !( m_url.isLocalFile() ) && KHTMLPageCache::self()->isComplete( d->m_cacheId ) ) + if ( !( m_url.isLocalFile() ) && TDEHTMLPageCache::self()->isComplete( d->m_cacheId ) ) { TQByteArray sourceArray; TQDataStream dataStream( sourceArray, IO_WriteOnly ); - KHTMLPageCache::self()->saveData( d->m_cacheId, &dataStream ); + TDEHTMLPageCache::self()->saveData( d->m_cacheId, &dataStream ); TQTextStream stream( sourceArray, IO_ReadOnly ); stream.setCodec( TQTextCodec::codecForName( encoding().latin1() ) ); sourceStr = stream.read(); @@ -894,27 +894,27 @@ TQString KHTMLPart::documentSource() const } -KParts::BrowserExtension *KHTMLPart::browserExtension() const +KParts::BrowserExtension *TDEHTMLPart::browserExtension() const { return d->m_extension; } -KParts::BrowserHostExtension *KHTMLPart::browserHostExtension() const +KParts::BrowserHostExtension *TDEHTMLPart::browserHostExtension() const { return d->m_hostExtension; } -KHTMLView *KHTMLPart::view() const +TDEHTMLView *TDEHTMLPart::view() const { return d->m_view; } -void KHTMLPart::setStatusMessagesEnabled( bool enable ) +void TDEHTMLPart::setStatusMessagesEnabled( bool enable ) { d->m_statusMessagesEnabled = enable; } -KJS::Interpreter *KHTMLPart::jScriptInterpreter() +KJS::Interpreter *TDEHTMLPart::jScriptInterpreter() { KJSProxy *proxy = jScript(); if (!proxy || proxy->paused()) @@ -923,12 +923,12 @@ KJS::Interpreter *KHTMLPart::jScriptInterpreter() return proxy->interpreter(); } -bool KHTMLPart::statusMessagesEnabled() const +bool TDEHTMLPart::statusMessagesEnabled() const { return d->m_statusMessagesEnabled; } -void KHTMLPart::setJScriptEnabled( bool enable ) +void TDEHTMLPart::setJScriptEnabled( bool enable ) { if ( !enable && jScriptEnabled() && d->m_frame && d->m_frame->m_jscript ) { d->m_frame->m_jscript->clear(); @@ -937,7 +937,7 @@ void KHTMLPart::setJScriptEnabled( bool enable ) d->m_bJScriptOverride = true; } -bool KHTMLPart::jScriptEnabled() const +bool TDEHTMLPart::jScriptEnabled() const { if(onlyLocalReferences()) return false; @@ -946,12 +946,12 @@ bool KHTMLPart::jScriptEnabled() const return d->m_bJScriptEnabled; } -void KHTMLPart::setMetaRefreshEnabled( bool enable ) +void TDEHTMLPart::setMetaRefreshEnabled( bool enable ) { d->m_metaRefreshEnabled = enable; } -bool KHTMLPart::metaRefreshEnabled() const +bool TDEHTMLPart::metaRefreshEnabled() const { return d->m_metaRefreshEnabled; } @@ -995,12 +995,12 @@ static bool createJScript(tdehtml::ChildFrame *frame) return true; } -KJSProxy *KHTMLPart::jScript() +KJSProxy *TDEHTMLPart::jScript() { if (!jScriptEnabled()) return 0; if ( !d->m_frame ) { - KHTMLPart * p = parentPart(); + TDEHTMLPart * p = parentPart(); if (!p) { d->m_frame = new tdehtml::ChildFrame; d->m_frame->m_part = this; @@ -1025,9 +1025,9 @@ KJSProxy *KHTMLPart::jScript() return d->m_frame->m_jscript; } -TQVariant KHTMLPart::crossFrameExecuteScript(const TQString& target, const TQString& script) +TQVariant TDEHTMLPart::crossFrameExecuteScript(const TQString& target, const TQString& script) { - KHTMLPart* destpart = this; + TDEHTMLPart* destpart = this; TQString trg = target.lower(); @@ -1063,7 +1063,7 @@ TQVariant KHTMLPart::crossFrameExecuteScript(const TQString& target, const TQSt //Enable this to see all JS scripts being executed //#define KJS_VERBOSE -KJSErrorDlg *KHTMLPart::jsErrorExtension() { +KJSErrorDlg *TDEHTMLPart::jsErrorExtension() { if (!d->m_settings->jsErrorsEnabled()) { return 0L; } @@ -1094,7 +1094,7 @@ KJSErrorDlg *KHTMLPart::jsErrorExtension() { return d->m_jsedlg; } -void KHTMLPart::removeJSErrorExtension() { +void TDEHTMLPart::removeJSErrorExtension() { if (parentPart()) { parentPart()->removeJSErrorExtension(); return; @@ -1108,24 +1108,24 @@ void KHTMLPart::removeJSErrorExtension() { d->m_jsedlg = 0; } -void KHTMLPart::disableJSErrorExtension() { +void TDEHTMLPart::disableJSErrorExtension() { removeJSErrorExtension(); // These two lines are really kind of hacky, and it sucks to do this inside - // KHTML but I don't know of anything that's reasonably easy as an alternative + // TDEHTML but I don't know of anything that's reasonably easy as an alternative // right now. It makes me wonder if there should be a more clean way to - // contact all running "KHTML" instance as opposed to Konqueror instances too. + // contact all running "TDEHTML" instance as opposed to Konqueror instances too. d->m_settings->setJSErrorsEnabled(false); DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", TQByteArray()); } -void KHTMLPart::jsErrorDialogContextMenu() { +void TDEHTMLPart::jsErrorDialogContextMenu() { KPopupMenu *m = new KPopupMenu(0L); m->insertItem(i18n("&Hide Errors"), this, TQT_SLOT(removeJSErrorExtension())); m->insertItem(i18n("&Disable Error Reporting"), this, TQT_SLOT(disableJSErrorExtension())); m->popup(TQCursor::pos()); } -void KHTMLPart::launchJSErrorDialog() { +void TDEHTMLPart::launchJSErrorDialog() { KJSErrorDlg *dlg = jsErrorExtension(); if (dlg) { dlg->show(); @@ -1133,13 +1133,13 @@ void KHTMLPart::launchJSErrorDialog() { } } -void KHTMLPart::launchJSConfigDialog() { +void TDEHTMLPart::launchJSConfigDialog() { TQStringList args; args << "tdehtml_java_js"; TDEApplication::tdeinitExec( "tdecmshell", args ); } -TQVariant KHTMLPart::executeScript(const TQString& filename, int baseLine, const DOM::Node& n, const TQString& script) +TQVariant TDEHTMLPart::executeScript(const TQString& filename, int baseLine, const DOM::Node& n, const TQString& script) { #ifdef KJS_VERBOSE // The script is now printed by KJS's Parser::parse @@ -1179,15 +1179,15 @@ TQVariant KHTMLPart::executeScript(const TQString& filename, int baseLine, const return ret; } -TQVariant KHTMLPart::executeScript( const TQString &script ) +TQVariant TDEHTMLPart::executeScript( const TQString &script ) { return executeScript( DOM::Node(), script ); } -TQVariant KHTMLPart::executeScript( const DOM::Node &n, const TQString &script ) +TQVariant TDEHTMLPart::executeScript( const DOM::Node &n, const TQString &script ) { #ifdef KJS_VERBOSE - kdDebug(6070) << "KHTMLPart::executeScript caller='" << name() << "' node=" << n.nodeName().string().latin1() << "(" << (n.isNull() ? 0 : n.nodeType()) << ") " /* << script */ << endl; + kdDebug(6070) << "TDEHTMLPart::executeScript caller='" << name() << "' node=" << n.nodeName().string().latin1() << "(" << (n.isNull() ? 0 : n.nodeType()) << ") " /* << script */ << endl; #endif KJSProxy *proxy = jScript(); @@ -1213,14 +1213,14 @@ TQVariant KHTMLPart::executeScript( const DOM::Node &n, const TQString &script ) submitFormAgain(); #ifdef KJS_VERBOSE - kdDebug(6070) << "KHTMLPart::executeScript - done" << endl; + kdDebug(6070) << "TDEHTMLPart::executeScript - done" << endl; #endif return ret; } -bool KHTMLPart::scheduleScript(const DOM::Node &n, const TQString& script) +bool TDEHTMLPart::scheduleScript(const DOM::Node &n, const TQString& script) { - //kdDebug(6050) << "KHTMLPart::scheduleScript "<< script << endl; + //kdDebug(6050) << "TDEHTMLPart::scheduleScript "<< script << endl; d->scheduledScript = script; d->scheduledScriptNode = n; @@ -1228,7 +1228,7 @@ bool KHTMLPart::scheduleScript(const DOM::Node &n, const TQString& script) return true; } -TQVariant KHTMLPart::executeScheduledScript() +TQVariant TDEHTMLPart::executeScheduledScript() { if( d->scheduledScript.isEmpty() ) return TQVariant(); @@ -1242,13 +1242,13 @@ TQVariant KHTMLPart::executeScheduledScript() return ret; } -void KHTMLPart::setJavaEnabled( bool enable ) +void TDEHTMLPart::setJavaEnabled( bool enable ) { d->m_bJavaForce = enable; d->m_bJavaOverride = true; } -bool KHTMLPart::javaEnabled() const +bool TDEHTMLPart::javaEnabled() const { if (onlyLocalReferences()) return false; @@ -1261,23 +1261,23 @@ bool KHTMLPart::javaEnabled() const #endif } -KJavaAppletContext *KHTMLPart::javaContext() +KJavaAppletContext *TDEHTMLPart::javaContext() { return 0; } -KJavaAppletContext *KHTMLPart::createJavaContext() +KJavaAppletContext *TDEHTMLPart::createJavaContext() { return 0; } -void KHTMLPart::setPluginsEnabled( bool enable ) +void TDEHTMLPart::setPluginsEnabled( bool enable ) { d->m_bPluginsForce = enable; d->m_bPluginsOverride = true; } -bool KHTMLPart::pluginsEnabled() const +bool TDEHTMLPart::pluginsEnabled() const { if (onlyLocalReferences()) return false; @@ -1288,7 +1288,7 @@ bool KHTMLPart::pluginsEnabled() const static int s_DOMTreeIndentLevel = 0; -void KHTMLPart::slotDebugDOMTree() +void TDEHTMLPart::slotDebugDOMTree() { if ( d->m_doc && d->m_doc->firstChild() ) tqDebug("%s", d->m_doc->firstChild()->toString().string().latin1()); @@ -1300,21 +1300,21 @@ void KHTMLPart::slotDebugDOMTree() ConstFrameIt it = d->m_frames.begin(); const ConstFrameIt end = d->m_frames.end(); for (; it != end; ++it ) - if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "KHTMLPart" ) ) { + if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "TDEHTMLPart" ) ) { KParts::ReadOnlyPart* const p = ( *it )->m_part; kdDebug(6050) << TQString().leftJustify(s_DOMTreeIndentLevel*4,' ') << "FRAME " << p->name() << " " << endl; - static_cast( p )->slotDebugDOMTree(); + static_cast( p )->slotDebugDOMTree(); } s_DOMTreeIndentLevel = indentLevel; } -void KHTMLPart::slotDebugScript() +void TDEHTMLPart::slotDebugScript() { if (jScript()) jScript()->showDebugWindow(); } -void KHTMLPart::slotDebugRenderTree() +void TDEHTMLPart::slotDebugRenderTree() { #ifndef NDEBUG if ( d->m_doc ) { @@ -1328,12 +1328,12 @@ void KHTMLPart::slotDebugRenderTree() #endif } -void KHTMLPart::slotStopAnimations() +void TDEHTMLPart::slotStopAnimations() { stopAnimations(); } -void KHTMLPart::setAutoloadImages( bool enable ) +void TDEHTMLPart::setAutoloadImages( bool enable ) { if ( d->m_doc && d->m_doc->docLoader()->autoloadImages() == enable ) return; @@ -1357,7 +1357,7 @@ void KHTMLPart::setAutoloadImages( bool enable ) } } -bool KHTMLPart::autoloadImages() const +bool TDEHTMLPart::autoloadImages() const { if ( d->m_doc ) return d->m_doc->docLoader()->autoloadImages(); @@ -1365,7 +1365,7 @@ bool KHTMLPart::autoloadImages() const return true; } -void KHTMLPart::clear() +void TDEHTMLPart::clear() { if ( d->m_bCleared ) return; @@ -1434,7 +1434,7 @@ void KHTMLPart::clear() if (d->m_frames.count()) { - KHTMLFrameList frames = d->m_frames; + TDEHTMLFrameList frames = d->m_frames; d->m_frames.clear(); ConstFrameIt it = frames.begin(); const ConstFrameIt end = frames.end(); @@ -1452,7 +1452,7 @@ void KHTMLPart::clear() if (d->m_objects.count()) { - KHTMLFrameList objects = d->m_objects; + TDEHTMLFrameList objects = d->m_objects; d->m_objects.clear(); ConstFrameIt oi = objects.begin(); const ConstFrameIt oiEnd = objects.end(); @@ -1492,26 +1492,26 @@ void KHTMLPart::clear() #endif } -bool KHTMLPart::openFile() +bool TDEHTMLPart::openFile() { return true; } -DOM::HTMLDocumentImpl *KHTMLPart::docImpl() const +DOM::HTMLDocumentImpl *TDEHTMLPart::docImpl() const { if ( d && d->m_doc && d->m_doc->isHTMLDocument() ) return static_cast(d->m_doc); return 0; } -DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const +DOM::DocumentImpl *TDEHTMLPart::xmlDocImpl() const { if ( d ) return d->m_doc; return 0; } -void KHTMLPart::slotInfoMessage(TDEIO::Job* kio_job, const TQString& msg) +void TDEHTMLPart::slotInfoMessage(TDEIO::Job* kio_job, const TQString& msg) { assert(d->m_job == kio_job); @@ -1519,7 +1519,7 @@ void KHTMLPart::slotInfoMessage(TDEIO::Job* kio_job, const TQString& msg) setStatusBarText(msg, BarDefaultText); } -void KHTMLPart::setPageSecurity( PageSecurity sec ) +void TDEHTMLPart::setPageSecurity( PageSecurity sec ) { emit d->m_extension->setPageSecurity( sec ); if ( sec != NotCrypted && !d->m_statusBarIconLabel && !parentPart() ) { @@ -1562,7 +1562,7 @@ void KHTMLPart::setPageSecurity( PageSecurity sec ) d->m_statusBarIconLabel->setPixmap( SmallIcon( iconName, instance() ) ); } -void KHTMLPart::slotData( TDEIO::Job* kio_job, const TQByteArray &data ) +void TDEHTMLPart::slotData( TDEIO::Job* kio_job, const TQByteArray &data ) { assert ( d->m_job == kio_job ); @@ -1586,7 +1586,7 @@ void KHTMLPart::slotData( TDEIO::Job* kio_job, const TQByteArray &data ) d->m_workingURL = KURL(); - d->m_cacheId = KHTMLPageCache::self()->createCacheEntry(); + d->m_cacheId = TDEHTMLPageCache::self()->createCacheEntry(); // When the first data arrives, the metadata has just been made available d->m_httpHeaders = d->m_job->queryMetaData("HTTP-Headers"); @@ -1599,7 +1599,7 @@ void KHTMLPart::slotData( TDEIO::Job* kio_job, const TQByteArray &data ) d->m_ssl_in_use = (d->m_job->queryMetaData("ssl_in_use") == "TRUE"); { - KHTMLPart *p = parentPart(); + TDEHTMLPart *p = parentPart(); if (p && p->d->m_ssl_in_use != d->m_ssl_in_use) { while (p->parentPart()) p = p->parentPart(); @@ -1663,13 +1663,13 @@ void KHTMLPart::slotData( TDEIO::Job* kio_job, const TQByteArray &data ) d->m_lastModified = TQString(); // done on-demand by lastModified() } - KHTMLPageCache::self()->addData(d->m_cacheId, data); + TDEHTMLPageCache::self()->addData(d->m_cacheId, data); write( data.data(), data.size() ); if (d->m_frame && d->m_frame->m_jscript) d->m_frame->m_jscript->dataReceived(); } -void KHTMLPart::slotRestoreData(const TQByteArray &data ) +void TDEHTMLPart::slotRestoreData(const TQByteArray &data ) { // The first data ? if ( !d->m_workingURL.isEmpty() ) @@ -1696,9 +1696,9 @@ void KHTMLPart::slotRestoreData(const TQByteArray &data ) } } -void KHTMLPart::showError( TDEIO::Job* job ) +void TDEHTMLPart::showError( TDEIO::Job* job ) { - kdDebug(6050) << "KHTMLPart::showError d->m_bParsing=" << (d->m_doc && d->m_doc->parsing()) << " d->m_bComplete=" << d->m_bComplete + kdDebug(6050) << "TDEHTMLPart::showError d->m_bParsing=" << (d->m_doc && d->m_doc->parsing()) << " d->m_bComplete=" << d->m_bComplete << " d->m_bCleared=" << d->m_bCleared << endl; if (job->error() == TDEIO::ERR_NO_CONTENT) @@ -1713,9 +1713,9 @@ void KHTMLPart::showError( TDEIO::Job* job ) } // This is a protected method, placed here because of it's relevance to showError -void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqUrl ) +void TDEHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqUrl ) { - kdDebug(6050) << "KHTMLPart::htmlError errorCode=" << errorCode << " text=" << text << endl; + kdDebug(6050) << "TDEHTMLPart::htmlError errorCode=" << errorCode << " text=" << text << endl; // make sure we're not executing any embedded JS bool bJSFO = d->m_bJScriptForce; bool bJSOO = d->m_bJScriptOverride; @@ -1812,14 +1812,14 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU end(); } -void KHTMLPart::slotFinished( TDEIO::Job * job ) +void TDEHTMLPart::slotFinished( TDEIO::Job * job ) { d->m_job = 0L; d->m_jobspeed = 0L; if (job->error()) { - KHTMLPageCache::self()->cancelEntry(d->m_cacheId); + TDEHTMLPageCache::self()->cancelEntry(d->m_cacheId); // The following catches errors that occur as a result of HTTP // to FTP redirections where the FTP URL is a directory. Since @@ -1856,7 +1856,7 @@ void KHTMLPart::slotFinished( TDEIO::Job * job ) //kdDebug( 6050 ) << "slotFinished" << endl; - KHTMLPageCache::self()->endData(d->m_cacheId); + TDEHTMLPageCache::self()->endData(d->m_cacheId); if (d->m_frame && d->m_frame->m_jscript) d->m_frame->m_jscript->dataReceived(); @@ -1869,17 +1869,17 @@ void KHTMLPart::slotFinished( TDEIO::Job * job ) end(); //will emit completed() } -void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset ) +void TDEHTMLPart::begin( const KURL &url, int xOffset, int yOffset ) { // No need to show this for a new page until an error is triggered if (!parentPart()) { removeJSErrorExtension(); setSuppressedPopupIndicator( false ); d->m_openableSuppressedPopups = 0; - for ( TQValueListIterator > i = d->m_suppressedPopupOriginParts.begin(); + for ( TQValueListIterator > i = d->m_suppressedPopupOriginParts.begin(); i != d->m_suppressedPopupOriginParts.end(); ++i ) { - if (KHTMLPart* part = *i) { + if (TDEHTMLPart* part = *i) { KJS::Window *w = KJS::Window::retrieveWindow( part ); if (w) w->forgetSuppressedWindows(); @@ -1895,10 +1895,10 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset ) if(url.isValid()) { TQString urlString = url.url(); - KHTMLFactory::vLinks()->insert( urlString ); + TDEHTMLFactory::vLinks()->insert( urlString ); TQString urlString2 = url.prettyURL(); if ( urlString != urlString2 ) { - KHTMLFactory::vLinks()->insert( urlString2 ); + TDEHTMLFactory::vLinks()->insert( urlString2 ); } } @@ -1928,7 +1928,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset ) // HTML or XHTML? (#86446) static_cast(d->m_doc)->setHTMLRequested( !servedAsXHTML ); } -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // d->m_view->initCaret(); #endif @@ -1937,14 +1937,14 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset ) if (!d->m_doc->attached()) d->m_doc->attach( ); d->m_doc->setBaseURL( KURL() ); - d->m_doc->docLoader()->setShowAnimations( KHTMLFactory::defaultHTMLSettings()->showAnimations() ); + d->m_doc->docLoader()->setShowAnimations( TDEHTMLFactory::defaultHTMLSettings()->showAnimations() ); emit docCreated(); d->m_paUseStylesheet->setItems(TQStringList()); d->m_paUseStylesheet->setEnabled( false ); - setAutoloadImages( KHTMLFactory::defaultHTMLSettings()->autoLoadImages() ); - TQString userStyleSheet = KHTMLFactory::defaultHTMLSettings()->userStyleSheet(); + setAutoloadImages( TDEHTMLFactory::defaultHTMLSettings()->autoLoadImages() ); + TQString userStyleSheet = TDEHTMLFactory::defaultHTMLSettings()->userStyleSheet(); if ( !userStyleSheet.isEmpty() ) setUserStyleSheet( KURL( userStyleSheet ) ); @@ -1957,7 +1957,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset ) d->m_doc->setParsing(true); } -void KHTMLPart::write( const char *str, int len ) +void TDEHTMLPart::write( const char *str, int len ) { if ( !d->m_decoder ) d->m_decoder = createDecoder(); @@ -1977,7 +1977,7 @@ void KHTMLPart::write( const char *str, int len ) d->m_doc->determineParseMode( decoded ); d->m_bFirstData = false; - //kdDebug(6050) << "KHTMLPart::write haveEnc = " << d->m_haveEncoding << endl; + //kdDebug(6050) << "TDEHTMLPart::write haveEnc = " << d->m_haveEncoding << endl; // ### this is still quite hacky, but should work a lot better than the old solution if(d->m_decoder->visuallyOrdered()) d->m_doc->setVisuallyOrdered(); d->m_doc->setDecoderCodec(d->m_decoder->codec()); @@ -1989,7 +1989,7 @@ void KHTMLPart::write( const char *str, int len ) t->write( decoded, true ); } -void KHTMLPart::write( const TQString &str ) +void TDEHTMLPart::write( const TQString &str ) { if ( str.isNull() ) return; @@ -2004,7 +2004,7 @@ void KHTMLPart::write( const TQString &str ) t->write( str, true ); } -void KHTMLPart::end() +void TDEHTMLPart::end() { if (d->m_doc) { if (d->m_decoder) { @@ -2019,7 +2019,7 @@ void KHTMLPart::end() } } -bool KHTMLPart::doOpenStream( const TQString& mimeType ) +bool TDEHTMLPart::doOpenStream( const TQString& mimeType ) { KMimeType::Ptr mime = KMimeType::mimeType(mimeType); if ( mime->is( "text/html" ) || mime->is( "text/xml" ) ) @@ -2030,40 +2030,40 @@ bool KHTMLPart::doOpenStream( const TQString& mimeType ) return false; } -bool KHTMLPart::doWriteStream( const TQByteArray& data ) +bool TDEHTMLPart::doWriteStream( const TQByteArray& data ) { write( data.data(), data.size() ); return true; } -bool KHTMLPart::doCloseStream() +bool TDEHTMLPart::doCloseStream() { end(); return true; } -void KHTMLPart::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more) +void TDEHTMLPart::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more) { if (!d->m_view) return; d->m_view->paint(p, rc, yOff, more); } -void KHTMLPart::stopAnimations() +void TDEHTMLPart::stopAnimations() { if ( d->m_doc ) - d->m_doc->docLoader()->setShowAnimations( KHTMLSettings::KAnimationDisabled ); + d->m_doc->docLoader()->setShowAnimations( TDEHTMLSettings::KAnimationDisabled ); ConstFrameIt it = d->m_frames.begin(); const ConstFrameIt end = d->m_frames.end(); for (; it != end; ++it ) - if ( !(*it)->m_part.isNull() && (*it)->m_part->inherits( "KHTMLPart" ) ) { + if ( !(*it)->m_part.isNull() && (*it)->m_part->inherits( "TDEHTMLPart" ) ) { KParts::ReadOnlyPart* const p = ( *it )->m_part; - static_cast( p )->stopAnimations(); + static_cast( p )->stopAnimations(); } } -void KHTMLPart::resetFromScript() +void TDEHTMLPart::resetFromScript() { closeURL(); d->m_bComplete = false; @@ -2075,7 +2075,7 @@ void KHTMLPart::resetFromScript() emit started( 0L ); } -void KHTMLPart::slotFinishedParsing() +void TDEHTMLPart::slotFinishedParsing() { d->m_doc->setParsing(false); checkEmitLoadEvent(); @@ -2087,12 +2087,12 @@ void KHTMLPart::slotFinishedParsing() checkCompleted(); } -void KHTMLPart::slotLoaderRequestStarted( tdehtml::DocLoader* dl, tdehtml::CachedObject *obj ) +void TDEHTMLPart::slotLoaderRequestStarted( tdehtml::DocLoader* dl, tdehtml::CachedObject *obj ) { if ( obj && obj->type() == tdehtml::CachedObject::Image && d->m_doc && d->m_doc->docLoader() == dl ) { - KHTMLPart* p = this; + TDEHTMLPart* p = this; while ( p ) { - KHTMLPart* const op = p; + TDEHTMLPart* const op = p; ++(p->d->m_totalObjectCount); p = p->parentPart(); if ( !p && op->d->m_loadedObjects <= op->d->m_totalObjectCount @@ -2102,12 +2102,12 @@ void KHTMLPart::slotLoaderRequestStarted( tdehtml::DocLoader* dl, tdehtml::Cache } } -void KHTMLPart::slotLoaderRequestDone( tdehtml::DocLoader* dl, tdehtml::CachedObject *obj ) +void TDEHTMLPart::slotLoaderRequestDone( tdehtml::DocLoader* dl, tdehtml::CachedObject *obj ) { if ( obj && obj->type() == tdehtml::CachedObject::Image && d->m_doc && d->m_doc->docLoader() == dl ) { - KHTMLPart* p = this; + TDEHTMLPart* p = this; while ( p ) { - KHTMLPart* const op = p; + TDEHTMLPart* const op = p; ++(p->d->m_loadedObjects); p = p->parentPart(); if ( !p && op->d->m_loadedObjects <= op->d->m_totalObjectCount && op->d->m_jobPercent <= 100 @@ -2119,7 +2119,7 @@ void KHTMLPart::slotLoaderRequestDone( tdehtml::DocLoader* dl, tdehtml::CachedOb checkCompleted(); } -void KHTMLPart::slotProgressUpdate() +void TDEHTMLPart::slotProgressUpdate() { int percent; if ( d->m_loadedObjects < d->m_totalObjectCount ) @@ -2140,14 +2140,14 @@ void KHTMLPart::slotProgressUpdate() emit d->m_extension->loadingProgress( percent ); } -void KHTMLPart::slotJobSpeed( TDEIO::Job* /*job*/, unsigned long speed ) +void TDEHTMLPart::slotJobSpeed( TDEIO::Job* /*job*/, unsigned long speed ) { d->m_jobspeed = speed; if (!parentPart()) setStatusBarText(jsStatusBarText(), BarOverrideText); } -void KHTMLPart::slotJobPercent( TDEIO::Job* /*job*/, unsigned long percent ) +void TDEHTMLPart::slotJobPercent( TDEIO::Job* /*job*/, unsigned long percent ) { d->m_jobPercent = percent; @@ -2155,7 +2155,7 @@ void KHTMLPart::slotJobPercent( TDEIO::Job* /*job*/, unsigned long percent ) d->m_progressUpdateTimer.start( 0, true ); } -void KHTMLPart::slotJobDone( TDEIO::Job* /*job*/ ) +void TDEHTMLPart::slotJobDone( TDEIO::Job* /*job*/ ) { d->m_jobPercent = 100; @@ -2163,7 +2163,7 @@ void KHTMLPart::slotJobDone( TDEIO::Job* /*job*/ ) d->m_progressUpdateTimer.start( 0, true ); } -void KHTMLPart::slotUserSheetStatDone( TDEIO::Job *_job ) +void TDEHTMLPart::slotUserSheetStatDone( TDEIO::Job *_job ) { using namespace TDEIO; @@ -2194,9 +2194,9 @@ void KHTMLPart::slotUserSheetStatDone( TDEIO::Job *_job ) setUserStyleSheet( KURL( settings()->userStyleSheet() ) ); } -void KHTMLPart::checkCompleted() +void TDEHTMLPart::checkCompleted() { -// kdDebug( 6050 ) << "KHTMLPart::checkCompleted() " << this << " " << name() << endl; +// kdDebug( 6050 ) << "TDEHTMLPart::checkCompleted() " << this << " " << name() << endl; // kdDebug( 6050 ) << " parsing: " << (d->m_doc && d->m_doc->parsing()) << endl; // kdDebug( 6050 ) << " complete: " << d->m_bComplete << endl; @@ -2255,9 +2255,9 @@ void KHTMLPart::checkCompleted() d->m_totalObjectCount = 0; d->m_loadedObjects = 0; - KHTMLPart* p = this; + TDEHTMLPart* p = this; while ( p ) { - KHTMLPart* op = p; + TDEHTMLPart* op = p; p = p->parentPart(); if ( !p && !op->d->m_progressUpdateTimer.isActive()) op->d->m_progressUpdateTimer.start( 0, true ); @@ -2312,7 +2312,7 @@ void KHTMLPart::checkCompleted() #endif } -void KHTMLPart::checkEmitLoadEvent() +void TDEHTMLPart::checkEmitLoadEvent() { if ( d->m_bLoadEventEmitted || !d->m_doc || d->m_doc->parsing() ) return; @@ -2344,20 +2344,20 @@ void KHTMLPart::checkEmitLoadEvent() d->m_doc->close(); } -const KHTMLSettings *KHTMLPart::settings() const +const TDEHTMLSettings *TDEHTMLPart::settings() const { return d->m_settings; } #ifndef KDE_NO_COMPAT -KURL KHTMLPart::baseURL() const +KURL TDEHTMLPart::baseURL() const { if ( !d->m_doc ) return KURL(); return d->m_doc->baseURL(); } -TQString KHTMLPart::baseTarget() const +TQString TDEHTMLPart::baseTarget() const { if ( !d->m_doc ) return TQString(); @@ -2365,7 +2365,7 @@ TQString KHTMLPart::baseTarget() const } #endif -KURL KHTMLPart::completeURL( const TQString &url ) +KURL TDEHTMLPart::completeURL( const TQString &url ) { if ( !d->m_doc ) return KURL( url ); @@ -2377,9 +2377,9 @@ KURL KHTMLPart::completeURL( const TQString &url ) // Called by ecma/kjs_window in case of redirections from Javascript, // and by xml/dom_docimpl.cpp in case of http-equiv meta refresh. -void KHTMLPart::scheduleRedirection( int delay, const TQString &url, bool doLockHistory ) +void TDEHTMLPart::scheduleRedirection( int delay, const TQString &url, bool doLockHistory ) { - kdDebug(6050) << "KHTMLPart::scheduleRedirection delay=" << delay << " url=" << url << endl; + kdDebug(6050) << "TDEHTMLPart::scheduleRedirection delay=" << delay << " url=" << url << endl; kdDebug(6050) << "current redirectURL=" << d->m_redirectURL << " with delay " << d->m_delayRedirect << endl; if( delay < 24*60*60 && ( d->m_redirectURL.isEmpty() || delay <= d->m_delayRedirect) ) { @@ -2394,7 +2394,7 @@ void KHTMLPart::scheduleRedirection( int delay, const TQString &url, bool doLock } } -void KHTMLPart::slotRedirect() +void TDEHTMLPart::slotRedirect() { kdDebug(6050) << this << " slotRedirect()" << endl; TQString u = d->m_redirectURL; @@ -2405,7 +2405,7 @@ void KHTMLPart::slotRedirect() if ( u.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { TQString script = KURL::decode_string( u.right( u.length() - 11 ) ); - kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl; + kdDebug( 6050 ) << "TDEHTMLPart::slotRedirect script=" << script << endl; TQVariant res = executeScript( DOM::Node(), script ); if ( res.type() == TQVariant::String ) { begin( url() ); @@ -2425,7 +2425,7 @@ void KHTMLPart::slotRedirect() if (!kapp || !kapp->authorizeURLAction("redirect", cUrl, url)) { - kdWarning(6050) << "KHTMLPart::scheduleRedirection: Redirection from " << cUrl << " to " << url << " REJECTED!" << endl; + kdWarning(6050) << "TDEHTMLPart::scheduleRedirection: Redirection from " << cUrl << " to " << url << " REJECTED!" << endl; emit completed(); return; } @@ -2453,7 +2453,7 @@ void KHTMLPart::slotRedirect() emit completed(); } -void KHTMLPart::slotRedirection(TDEIO::Job*, const KURL& url) +void TDEHTMLPart::slotRedirection(TDEIO::Job*, const KURL& url) { // the slave told us that we got redirected //kdDebug( 6050 ) << "redirection by KIO to " << url.url() << endl; @@ -2461,7 +2461,7 @@ void KHTMLPart::slotRedirection(TDEIO::Job*, const KURL& url) d->m_workingURL = url; } -bool KHTMLPart::setEncoding( const TQString &name, bool override ) +bool TDEHTMLPart::setEncoding( const TQString &name, bool override ) { d->m_encoding = name; d->m_haveEncoding = override; @@ -2479,7 +2479,7 @@ bool KHTMLPart::setEncoding( const TQString &name, bool override ) return true; } -TQString KHTMLPart::encoding() const +TQString TDEHTMLPart::encoding() const { if(d->m_haveEncoding && !d->m_encoding.isEmpty()) return d->m_encoding; @@ -2490,7 +2490,7 @@ TQString KHTMLPart::encoding() const return defaultEncoding(); } -TQString KHTMLPart::defaultEncoding() const +TQString TDEHTMLPart::defaultEncoding() const { TQString encoding = settings()->encoding(); if ( !encoding.isEmpty() ) @@ -2503,19 +2503,19 @@ TQString KHTMLPart::defaultEncoding() const return TDEGlobal::locale()->encoding(); } -void KHTMLPart::setUserStyleSheet(const KURL &url) +void TDEHTMLPart::setUserStyleSheet(const KURL &url) { if ( d->m_doc && d->m_doc->docLoader() ) (void) new tdehtml::PartStyleSheetLoader(this, url.url(), d->m_doc->docLoader()); } -void KHTMLPart::setUserStyleSheet(const TQString &styleSheet) +void TDEHTMLPart::setUserStyleSheet(const TQString &styleSheet) { if ( d->m_doc ) d->m_doc->setUserStyleSheet( styleSheet ); } -bool KHTMLPart::gotoAnchor( const TQString &name ) +bool TDEHTMLPart::gotoAnchor( const TQString &name ) { if (!d->m_doc) return false; @@ -2539,7 +2539,7 @@ bool KHTMLPart::gotoAnchor( const TQString &name ) d->m_view->setContentsPos(0, 0); return true; } else if (!n) { - kdDebug(6050) << "KHTMLPart::gotoAnchor node '" << name << "' not found" << endl; + kdDebug(6050) << "TDEHTMLPart::gotoAnchor node '" << name << "' not found" << endl; return false; } @@ -2563,7 +2563,7 @@ bool KHTMLPart::gotoAnchor( const TQString &name ) return true; } -bool KHTMLPart::nextAnchor() +bool TDEHTMLPart::nextAnchor() { if (!d->m_doc) return false; @@ -2572,7 +2572,7 @@ bool KHTMLPart::nextAnchor() return true; } -bool KHTMLPart::prevAnchor() +bool TDEHTMLPart::prevAnchor() { if (!d->m_doc) return false; @@ -2581,38 +2581,38 @@ bool KHTMLPart::prevAnchor() return true; } -void KHTMLPart::setStandardFont( const TQString &name ) +void TDEHTMLPart::setStandardFont( const TQString &name ) { d->m_settings->setStdFontName(name); } -void KHTMLPart::setFixedFont( const TQString &name ) +void TDEHTMLPart::setFixedFont( const TQString &name ) { d->m_settings->setFixedFontName(name); } -void KHTMLPart::setURLCursor( const TQCursor &c ) +void TDEHTMLPart::setURLCursor( const TQCursor &c ) { d->m_linkCursor = c; } -TQCursor KHTMLPart::urlCursor() const +TQCursor TDEHTMLPart::urlCursor() const { return d->m_linkCursor; } -bool KHTMLPart::onlyLocalReferences() const +bool TDEHTMLPart::onlyLocalReferences() const { return d->m_onlyLocalReferences; } -void KHTMLPart::setOnlyLocalReferences(bool enable) +void TDEHTMLPart::setOnlyLocalReferences(bool enable) { d->m_onlyLocalReferences = enable; } -void KHTMLPartPrivate::setFlagRecursively( - bool KHTMLPartPrivate::*flag, bool value) +void TDEHTMLPartPrivate::setFlagRecursively( + bool TDEHTMLPartPrivate::*flag, bool value) { // first set it on the current one this->*flag = value; @@ -2622,8 +2622,8 @@ void KHTMLPartPrivate::setFlagRecursively( TQValueList::Iterator it = m_frames.begin(); const TQValueList::Iterator itEnd = m_frames.end(); for (; it != itEnd; ++it) { - KHTMLPart* const part = static_cast((KParts::ReadOnlyPart *)(*it)->m_part); - if (part->inherits("KHTMLPart")) + TDEHTMLPart* const part = static_cast((KParts::ReadOnlyPart *)(*it)->m_part); + if (part->inherits("TDEHTMLPart")) part->d->setFlagRecursively(flag, value); }/*next it*/ } @@ -2632,19 +2632,19 @@ void KHTMLPartPrivate::setFlagRecursively( TQValueList::Iterator it = m_objects.begin(); const TQValueList::Iterator itEnd = m_objects.end(); for (; it != itEnd; ++it) { - KHTMLPart* const part = static_cast((KParts::ReadOnlyPart *)(*it)->m_part); - if (part->inherits("KHTMLPart")) + TDEHTMLPart* const part = static_cast((KParts::ReadOnlyPart *)(*it)->m_part); + if (part->inherits("TDEHTMLPart")) part->d->setFlagRecursively(flag, value); }/*next it*/ } } -void KHTMLPart::setCaretMode(bool enable) +void TDEHTMLPart::setCaretMode(bool enable) { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET kdDebug(6200) << "setCaretMode(" << enable << ")" << endl; if (isCaretMode() == enable) return; - d->setFlagRecursively(&KHTMLPartPrivate::m_caretMode, enable); + d->setFlagRecursively(&TDEHTMLPartPrivate::m_caretMode, enable); // FIXME: this won't work on frames as expected if (!isEditable()) { if (enable) { @@ -2653,19 +2653,19 @@ void KHTMLPart::setCaretMode(bool enable) } else view()->caretOff(); }/*end if*/ -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET } -bool KHTMLPart::isCaretMode() const +bool TDEHTMLPart::isCaretMode() const { return d->m_caretMode; } -void KHTMLPart::setEditable(bool enable) +void TDEHTMLPart::setEditable(bool enable) { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (isEditable() == enable) return; - d->setFlagRecursively(&KHTMLPartPrivate::m_designMode, enable); + d->setFlagRecursively(&TDEHTMLPartPrivate::m_designMode, enable); // FIXME: this won't work on frames as expected if (!isCaretMode()) { if (enable) { @@ -2674,17 +2674,17 @@ void KHTMLPart::setEditable(bool enable) } else view()->caretOff(); }/*end if*/ -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET } -bool KHTMLPart::isEditable() const +bool TDEHTMLPart::isEditable() const { return d->m_designMode; } -void KHTMLPart::setCaretPosition(DOM::Node node, long offset, bool extendSelection) +void TDEHTMLPart::setCaretPosition(DOM::Node node, long offset, bool extendSelection) { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET #if 0 kdDebug(6200) << k_funcinfo << "node: " << node.handle() << " nodeName: " << node.nodeName().string() << " offset: " << offset @@ -2693,28 +2693,28 @@ void KHTMLPart::setCaretPosition(DOM::Node node, long offset, bool extendSelecti if (view()->moveCaretTo(node.handle(), offset, !extendSelection)) emitSelectionChanged(); view()->ensureCaretVisible(); -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET } -KHTMLPart::CaretDisplayPolicy KHTMLPart::caretDisplayPolicyNonFocused() const +TDEHTMLPart::CaretDisplayPolicy TDEHTMLPart::caretDisplayPolicyNonFocused() const { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET return (CaretDisplayPolicy)view()->caretDisplayPolicyNonFocused(); -#else // KHTML_NO_CARET +#else // TDEHTML_NO_CARET return CaretInvisible; -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET } -void KHTMLPart::setCaretDisplayPolicyNonFocused(CaretDisplayPolicy policy) +void TDEHTMLPart::setCaretDisplayPolicyNonFocused(CaretDisplayPolicy policy) { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET view()->setCaretDisplayPolicyNonFocused(policy); -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET } -void KHTMLPart::setCaretVisible(bool show) +void TDEHTMLPart::setCaretVisible(bool show) { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (show) { NodeImpl *caretNode = xmlDocImpl()->focusNode(); @@ -2728,10 +2728,10 @@ void KHTMLPart::setCaretVisible(bool show) view()->caretOff(); }/*end if*/ -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET } -void KHTMLPart::findTextBegin() +void TDEHTMLPart::findTextBegin() { d->m_findPos = -1; d->m_findNode = 0; @@ -2744,7 +2744,7 @@ void KHTMLPart::findTextBegin() d->m_find = 0L; } -bool KHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor ) +bool TDEHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor ) { if ( !d->m_doc ) return false; @@ -2817,7 +2817,7 @@ bool KHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor ) } // Old method (its API limits the available features - remove in KDE-4) -bool KHTMLPart::findTextNext( const TQString &str, bool forward, bool caseSensitive, bool isRegExp ) +bool TDEHTMLPart::findTextNext( const TQString &str, bool forward, bool caseSensitive, bool isRegExp ) { if ( !initFindNode( false, !forward, d->m_findNode ) ) return false; @@ -2898,91 +2898,91 @@ bool KHTMLPart::findTextNext( const TQString &str, bool forward, bool caseSensit } -void KHTMLPart::slotFind() +void TDEHTMLPart::slotFind() { KParts::ReadOnlyPart *part = currentFrame(); if (!part) return; - if (!part->inherits("KHTMLPart") ) + if (!part->inherits("TDEHTMLPart") ) { kdError(6000) << "slotFind: part is a " << part->className() << ", can't do a search into it" << endl; return; } - static_cast( part )->findText(); + static_cast( part )->findText(); } -void KHTMLPart::slotFindNext() +void TDEHTMLPart::slotFindNext() { KParts::ReadOnlyPart *part = currentFrame(); if (!part) return; - if (!part->inherits("KHTMLPart") ) + if (!part->inherits("TDEHTMLPart") ) { kdError(6000) << "slotFindNext: part is a " << part->className() << ", can't do a search into it" << endl; return; } - static_cast( part )->findTextNext(); + static_cast( part )->findTextNext(); } -void KHTMLPart::slotFindPrev() +void TDEHTMLPart::slotFindPrev() { KParts::ReadOnlyPart *part = currentFrame(); if (!part) return; - if (!part->inherits("KHTMLPart") ) + if (!part->inherits("TDEHTMLPart") ) { kdError(6000) << "slotFindNext: part is a " << part->className() << ", can't do a search into it" << endl; return; } - static_cast( part )->findTextNext( true ); // reverse + static_cast( part )->findTextNext( true ); // reverse } -void KHTMLPart::slotFindDone() +void TDEHTMLPart::slotFindDone() { // ### remove me } -void KHTMLPart::slotFindAheadText() +void TDEHTMLPart::slotFindAheadText() { -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND KParts::ReadOnlyPart *part = currentFrame(); if (!part) return; - if (!part->inherits("KHTMLPart") ) + if (!part->inherits("TDEHTMLPart") ) { kdError(6000) << "slotFindNext: part is a " << part->className() << ", can't do a search into it" << endl; return; } - static_cast( part )->view()->startFindAhead( false ); -#endif // KHTML_NO_TYPE_AHEAD_FIND + static_cast( part )->view()->startFindAhead( false ); +#endif // TDEHTML_NO_TYPE_AHEAD_FIND } -void KHTMLPart::slotFindAheadLink() +void TDEHTMLPart::slotFindAheadLink() { -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND KParts::ReadOnlyPart *part = currentFrame(); if (!part) return; - if (!part->inherits("KHTMLPart") ) + if (!part->inherits("TDEHTMLPart") ) { kdError(6000) << "slotFindNext: part is a " << part->className() << ", can't do a search into it" << endl; return; } - static_cast( part )->view()->startFindAhead( true ); -#endif // KHTML_NO_TYPE_AHEAD_FIND + static_cast( part )->view()->startFindAhead( true ); +#endif // TDEHTML_NO_TYPE_AHEAD_FIND } -void KHTMLPart::enableFindAheadActions( bool enable ) +void TDEHTMLPart::enableFindAheadActions( bool enable ) { // only the topmost one has shortcuts - KHTMLPart* p = this; + TDEHTMLPart* p = this; while( p->parentPart()) p = p->parentPart(); p->d->m_paFindAheadText->setEnabled( enable ); p->d->m_paFindAheadLinks->setEnabled( enable ); } -void KHTMLPart::slotFindDialogDestroyed() +void TDEHTMLPart::slotFindDialogDestroyed() { d->m_lastFindState.options = d->m_findDialog->options(); d->m_lastFindState.history = d->m_findDialog->findHistory(); @@ -2990,7 +2990,7 @@ void KHTMLPart::slotFindDialogDestroyed() d->m_findDialog = 0L; } -void KHTMLPart::findText() +void TDEHTMLPart::findText() { // First do some init to make sure we can search in this frame if ( !d->m_doc ) @@ -3029,7 +3029,7 @@ void KHTMLPart::findText() findText( d->m_findDialog->pattern(), 0 /*options*/, widget(), d->m_findDialog ); } -void KHTMLPart::findText( const TQString &str, long options, TQWidget *parent, KFindDialog *findDialog ) +void TDEHTMLPart::findText( const TQString &str, long options, TQWidget *parent, KFindDialog *findDialog ) { // First do some init to make sure we can search in this frame if ( !d->m_doc ) @@ -3057,13 +3057,13 @@ void KHTMLPart::findText( const TQString &str, long options, TQWidget *parent, K } } -bool KHTMLPart::findTextNext() +bool TDEHTMLPart::findTextNext() { return findTextNext( false ); } // New method -bool KHTMLPart::findTextNext( bool reverse ) +bool TDEHTMLPart::findTextNext( bool reverse ) { if (!d->m_find) { @@ -3216,16 +3216,16 @@ bool KHTMLPart::findTextNext( bool reverse ) if( !( options & KFindDialog::FindBackwards )) { //kdDebug(6050) << "StringPortion: " << index << "-" << index+s.length()-1 << " -> " << lastNode << endl; - d->m_stringPortions.append( KHTMLPartPrivate::StringPortion( str.length(), lastNode ) ); + d->m_stringPortions.append( TDEHTMLPartPrivate::StringPortion( str.length(), lastNode ) ); str += s; } else // KFind itself can search backwards, so str must not be built backwards { - for( TQValueList::Iterator it = d->m_stringPortions.begin(); + for( TQValueList::Iterator it = d->m_stringPortions.begin(); it != d->m_stringPortions.end(); ++it ) (*it).index += s.length(); - d->m_stringPortions.prepend( KHTMLPartPrivate::StringPortion( 0, lastNode ) ); + d->m_stringPortions.prepend( TDEHTMLPartPrivate::StringPortion( 0, lastNode ) ); str.prepend( s ); } } @@ -3290,12 +3290,12 @@ bool KHTMLPart::findTextNext( bool reverse ) return res == KFind::Match; } -void KHTMLPart::slotHighlight( const TQString& /*text*/, int index, int length ) +void TDEHTMLPart::slotHighlight( const TQString& /*text*/, int index, int length ) { //kdDebug(6050) << "slotHighlight index=" << index << " length=" << length << endl; - TQValueList::Iterator it = d->m_stringPortions.begin(); - const TQValueList::Iterator itEnd = d->m_stringPortions.end(); - TQValueList::Iterator prev = it; + TQValueList::Iterator it = d->m_stringPortions.begin(); + const TQValueList::Iterator itEnd = d->m_stringPortions.end(); + TQValueList::Iterator prev = it; // We stop at the first portion whose index is 'greater than', and then use the previous one while ( it != itEnd && (*it).index <= index ) { @@ -3431,7 +3431,7 @@ void KHTMLPart::slotHighlight( const TQString& /*text*/, int index, int length ) } } -TQString KHTMLPart::selectedTextAsHTML() const +TQString TDEHTMLPart::selectedTextAsHTML() const { if(!hasSelection()) { kdDebug() << "selectedTextAsHTML(): selection is not valid. Returning empty selection" << endl; @@ -3448,7 +3448,7 @@ TQString KHTMLPart::selectedTextAsHTML() const return r.handle()->toHTML(exceptioncode).string(); } -TQString KHTMLPart::selectedText() const +TQString TDEHTMLPart::selectedText() const { bool hasNewLine = true; bool seenTDTag = false; @@ -3590,7 +3590,7 @@ TQString KHTMLPart::selectedText() const return text.mid(start, end-start); } -bool KHTMLPart::hasSelection() const +bool TDEHTMLPart::hasSelection() const { if ( d->m_selectionStart.isNull() || d->m_selectionEnd.isNull() ) return false; @@ -3600,7 +3600,7 @@ bool KHTMLPart::hasSelection() const return true; } -DOM::Range KHTMLPart::selection() const +DOM::Range TDEHTMLPart::selection() const { if( d->m_selectionStart.isNull() || d->m_selectionEnd.isNull() ) return DOM::Range(); @@ -3654,7 +3654,7 @@ DOM::Range KHTMLPart::selection() const return r; } -void KHTMLPart::selection(DOM::Node &s, long &so, DOM::Node &e, long &eo) const +void TDEHTMLPart::selection(DOM::Node &s, long &so, DOM::Node &e, long &eo) const { s = d->m_selectionStart; so = d->m_startOffset; @@ -3662,7 +3662,7 @@ void KHTMLPart::selection(DOM::Node &s, long &so, DOM::Node &e, long &eo) const eo = d->m_endOffset; } -void KHTMLPart::setSelection( const DOM::Range &r ) +void TDEHTMLPart::setSelection( const DOM::Range &r ) { // Quick-fix: a collapsed range shouldn't select the whole node. // The real problem is in RenderCanvas::setSelection though (when index==0 the whole node is selected). @@ -3675,17 +3675,17 @@ void KHTMLPart::setSelection( const DOM::Range &r ) d->m_endOffset = r.endOffset(); d->m_doc->setSelection(d->m_selectionStart.handle(),d->m_startOffset, d->m_selectionEnd.handle(),d->m_endOffset); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET bool v = d->m_view->placeCaret(); emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset()); #endif } } -void KHTMLPart::slotClearSelection() +void TDEHTMLPart::slotClearSelection() { bool hadSelection = hasSelection(); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET //kdDebug(6000) << "d->m_selectionStart " << d->m_selectionStart.handle() // << " d->m_selectionEnd " << d->m_selectionEnd.handle() << endl; // nothing, leave selection parameters as is @@ -3698,13 +3698,13 @@ void KHTMLPart::slotClearSelection() if ( d->m_doc ) d->m_doc->clearSelection(); if ( hadSelection ) emitSelectionChanged(); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET bool v = d->m_view->placeCaret(); emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset()); #endif } -void KHTMLPart::resetHoverText() +void TDEHTMLPart::resetHoverText() { if( !d->m_overURL.isEmpty() ) // Only if we were showing a link { @@ -3716,7 +3716,7 @@ void KHTMLPart::resetHoverText() } } -void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shiftPressed*/ ) +void TDEHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shiftPressed*/ ) { KURL u = completeURL(url); @@ -3829,7 +3829,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi (target.lower() != "_self") && (target.lower() != "_parent")) { - KHTMLPart *p = this; + TDEHTMLPart *p = this; while (p->parentPart()) p = p->parentPart(); if (!p->frameExists(target)) @@ -3887,7 +3887,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi // This executes in the active part on a click or other url selection action in // that active part. // -void KHTMLPart::urlSelected( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args ) +void TDEHTMLPart::urlSelected( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args ) { // The member var is so that slotRedirection still calls the virtual urlSelected // but is able to know if is opened a url. KDE4: just make urlSelected return a bool @@ -3896,7 +3896,7 @@ void KHTMLPart::urlSelected( const TQString &url, int button, int state, const T } // Return value: true if an url was opened, false if not (e.g. error, or jumping to anchor) -bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args ) +bool TDEHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args ) { bool hasTarget = false; @@ -3934,7 +3934,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c { TDEIO::MetaData metaData; metaData["referrer"] = d->m_referrer; - KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As" ), cURL, metaData ); + TDEHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As" ), cURL, metaData ); return false; } @@ -4011,16 +4011,16 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c return true; } -void KHTMLPart::slotViewDocumentSource() +void TDEHTMLPart::slotViewDocumentSource() { KURL url(m_url); bool isTempFile = false; - if (!(url.isLocalFile()) && KHTMLPageCache::self()->isComplete(d->m_cacheId)) + if (!(url.isLocalFile()) && TDEHTMLPageCache::self()->isComplete(d->m_cacheId)) { KTempFile sourceFile(TQString(), defaultExtension()); if (sourceFile.status() == 0) { - KHTMLPageCache::self()->saveData(d->m_cacheId, sourceFile.dataStream()); + TDEHTMLPageCache::self()->saveData(d->m_cacheId, sourceFile.dataStream()); url = KURL(); url.setPath(sourceFile.name()); isTempFile = true; @@ -4030,9 +4030,9 @@ void KHTMLPart::slotViewDocumentSource() (void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile ); } -void KHTMLPart::slotViewPageInfo() +void TDEHTMLPart::slotViewPageInfo() { - KHTMLInfoDlg *dlg = new KHTMLInfoDlg(NULL, "KHTML Page Info Dialog", false, (WFlags)WDestructiveClose); + TDEHTMLInfoDlg *dlg = new TDEHTMLInfoDlg(NULL, "TDEHTML Page Info Dialog", false, (WFlags)WDestructiveClose); dlg->_close->setGuiItem(KStdGuiItem::close()); if (d->m_doc) @@ -4083,7 +4083,7 @@ void KHTMLPart::slotViewPageInfo() } -void KHTMLPart::slotViewFrameSource() +void TDEHTMLPart::slotViewFrameSource() { KParts::ReadOnlyPart *frame = currentFrame(); if ( !frame ) @@ -4091,16 +4091,16 @@ void KHTMLPart::slotViewFrameSource() KURL url = frame->url(); bool isTempFile = false; - if (!(url.isLocalFile()) && frame->inherits("KHTMLPart")) + if (!(url.isLocalFile()) && frame->inherits("TDEHTMLPart")) { - long cacheId = static_cast(frame)->d->m_cacheId; + long cacheId = static_cast(frame)->d->m_cacheId; - if (KHTMLPageCache::self()->isComplete(cacheId)) + if (TDEHTMLPageCache::self()->isComplete(cacheId)) { KTempFile sourceFile(TQString(), defaultExtension()); if (sourceFile.status() == 0) { - KHTMLPageCache::self()->saveData(cacheId, sourceFile.dataStream()); + TDEHTMLPageCache::self()->saveData(cacheId, sourceFile.dataStream()); url = KURL(); url.setPath(sourceFile.name()); isTempFile = true; @@ -4111,7 +4111,7 @@ void KHTMLPart::slotViewFrameSource() (void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile ); } -KURL KHTMLPart::backgroundURL() const +KURL TDEHTMLPart::backgroundURL() const { // ### what about XML documents? get from CSS? if (!d->m_doc || !d->m_doc->isHTMLDocument()) @@ -4122,14 +4122,14 @@ KURL KHTMLPart::backgroundURL() const return KURL( m_url, relURL ); } -void KHTMLPart::slotSaveBackground() +void TDEHTMLPart::slotSaveBackground() { TDEIO::MetaData metaData; metaData["referrer"] = d->m_referrer; - KHTMLPopupGUIClient::saveURL( d->m_view, i18n("Save Background Image As"), backgroundURL(), metaData ); + TDEHTMLPopupGUIClient::saveURL( d->m_view, i18n("Save Background Image As"), backgroundURL(), metaData ); } -void KHTMLPart::slotSaveDocument() +void TDEHTMLPart::slotSaveDocument() { KURL srcURL( m_url ); @@ -4138,10 +4138,10 @@ void KHTMLPart::slotSaveDocument() TDEIO::MetaData metaData; // Referre unknown? - KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As" ), srcURL, metaData, "text/html", d->m_cacheId ); + TDEHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As" ), srcURL, metaData, "text/html", d->m_cacheId ); } -void KHTMLPart::slotSecurity() +void TDEHTMLPart::slotSecurity() { // kdDebug( 6050 ) << "Meta Data:" << endl // << d->m_ssl_peer_cert_subject @@ -4200,7 +4200,7 @@ void KHTMLPart::slotSecurity() } else kid->exec(); } -void KHTMLPart::slotSaveFrame() +void TDEHTMLPart::slotSaveFrame() { KParts::ReadOnlyPart *frame = currentFrame(); if ( !frame ) @@ -4213,10 +4213,10 @@ void KHTMLPart::slotSaveFrame() TDEIO::MetaData metaData; // Referrer unknown? - KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save Frame As" ), srcURL, metaData, "text/html" ); + TDEHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save Frame As" ), srcURL, metaData, "text/html" ); } -void KHTMLPart::slotSetEncoding() +void TDEHTMLPart::slotSetEncoding() { d->m_automaticDetection->setItemChecked( int( d->m_autoDetectLanguage ), false ); d->m_paSetEncoding->popupMenu()->setItemChecked( 0, false ); @@ -4226,7 +4226,7 @@ void KHTMLPart::slotSetEncoding() setEncoding( enc, true ); } -void KHTMLPart::slotUseStylesheet() +void TDEHTMLPart::slotUseStylesheet() { if (d->m_doc) { @@ -4236,7 +4236,7 @@ void KHTMLPart::slotUseStylesheet() } } -void KHTMLPart::updateActions() +void TDEHTMLPart::updateActions() { bool frames = false; @@ -4265,7 +4265,7 @@ void KHTMLPart::updateActions() bool enableFindAndSelectAll = true; if ( frame ) - enableFindAndSelectAll = frame->inherits( "KHTMLPart" ); + enableFindAndSelectAll = frame->inherits( "TDEHTMLPart" ); d->m_paFind->setEnabled( enableFindAndSelectAll ); d->m_paSelectAll->setEnabled( enableFindAndSelectAll ); @@ -4293,7 +4293,7 @@ void KHTMLPart::updateActions() d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : 0L ); } -KParts::LiveConnectExtension *KHTMLPart::liveConnectExtension( const tdehtml::RenderPart *frame) const { +KParts::LiveConnectExtension *TDEHTMLPart::liveConnectExtension( const tdehtml::RenderPart *frame) const { const ConstFrameIt end = d->m_objects.end(); for(ConstFrameIt it = d->m_objects.begin(); it != end; ++it ) if ((*it)->m_frame == frame) @@ -4301,7 +4301,7 @@ KParts::LiveConnectExtension *KHTMLPart::liveConnectExtension( const tdehtml::Re return 0L; } -bool KHTMLPart::requestFrame( tdehtml::RenderPart *frame, const TQString &url, const TQString &frameName, +bool TDEHTMLPart::requestFrame( tdehtml::RenderPart *frame, const TQString &url, const TQString &frameName, const TQStringList ¶ms, bool isIFrame ) { //kdDebug( 6050 ) << this << " requestFrame( ..., " << url << ", " << frameName << " )" << endl; @@ -4322,7 +4322,7 @@ bool KHTMLPart::requestFrame( tdehtml::RenderPart *frame, const TQString &url, c if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { if ( processObjectRequest(*it, KURL("about:blank"), TQString("text/html") ) ) { - KHTMLPart* p = static_cast(static_cast((*it)->m_part)); + TDEHTMLPart* p = static_cast(static_cast((*it)->m_part)); // See if we want to replace content with javascript: output.. TQVariant res = p->executeScript( DOM::Node(), KURL::decode_string( url.right( url.length() - 11) ) ); @@ -4339,15 +4339,15 @@ bool KHTMLPart::requestFrame( tdehtml::RenderPart *frame, const TQString &url, c return requestObject( *it, u ); } -TQString KHTMLPart::requestFrameName() +TQString TDEHTMLPart::requestFrameName() { return TQString::fromLatin1("").arg(d->m_frameNameId++); } -bool KHTMLPart::requestObject( tdehtml::RenderPart *frame, const TQString &url, const TQString &serviceType, +bool TDEHTMLPart::requestObject( tdehtml::RenderPart *frame, const TQString &url, const TQString &serviceType, const TQStringList ¶ms ) { - //kdDebug( 6005 ) << "KHTMLPart::requestObject " << this << " frame=" << frame << endl; + //kdDebug( 6005 ) << "TDEHTMLPart::requestObject " << this << " frame=" << frame << endl; tdehtml::ChildFrame *child = new tdehtml::ChildFrame; FrameIt it = d->m_objects.append( child ); (*it)->m_frame = frame; @@ -4363,16 +4363,16 @@ bool KHTMLPart::requestObject( tdehtml::RenderPart *frame, const TQString &url, return true; } -bool KHTMLPart::requestObject( tdehtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &_args ) +bool TDEHTMLPart::requestObject( tdehtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &_args ) { if (!checkLinkSecurity(url)) { - kdDebug(6005) << this << " KHTMLPart::requestObject checkLinkSecurity refused" << endl; + kdDebug(6005) << this << " TDEHTMLPart::requestObject checkLinkSecurity refused" << endl; return false; } if ( child->m_bPreloaded ) { - kdDebug(6005) << "KHTMLPart::requestObject preload" << endl; + kdDebug(6005) << "TDEHTMLPart::requestObject preload" << endl; if ( child->m_frame && child->m_part ) child->m_frame->setWidget( child->m_part->widget() ); @@ -4380,7 +4380,7 @@ bool KHTMLPart::requestObject( tdehtml::ChildFrame *child, const KURL &url, cons return true; } - //kdDebug(6005) << "KHTMLPart::requestObject child=" << child << " child->m_part=" << child->m_part << endl; + //kdDebug(6005) << "TDEHTMLPart::requestObject child=" << child << " child->m_part=" << child->m_part << endl; KParts::URLArgs args( _args ); @@ -4406,13 +4406,13 @@ bool KHTMLPart::requestObject( tdehtml::ChildFrame *child, const KURL &url, cons child->m_args.metaData().insert("ssl_activate_warnings", "TRUE"); child->m_args.metaData().insert("cross-domain", toplevelURL().url()); - // We want a KHTMLPart if the HTML says or + // We want a TDEHTMLPart if the HTML says or if ((url.isEmpty() || url.url() == "about:blank") && args.serviceType.isEmpty()) args.serviceType = TQString::fromLatin1( "text/html" ); if ( args.serviceType.isEmpty() ) { - kdDebug(6050) << "Running new KHTMLRun for " << this << " and child=" << child << endl; - child->m_run = new KHTMLRun( this, child, url, child->m_args, true ); + kdDebug(6050) << "Running new TDEHTMLRun for " << this << " and child=" << child << endl; + child->m_run = new TDEHTMLRun( this, child, url, child->m_args, true ); d->m_bComplete = false; // ensures we stop it in checkCompleted... return false; } else { @@ -4420,9 +4420,9 @@ bool KHTMLPart::requestObject( tdehtml::ChildFrame *child, const KURL &url, cons } } -bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_url, const TQString &mimetype ) +bool TDEHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_url, const TQString &mimetype ) { - //kdDebug( 6050 ) << "KHTMLPart::processObjectRequest trying to create part for " << mimetype << endl; + //kdDebug( 6050 ) << "TDEHTMLPart::processObjectRequest trying to create part for " << mimetype << endl; // IMPORTANT: create a copy of the url here, because it is just a reference, which was likely to be given // by an emitting frame part (emit openURLRequest( blahurl, ... ) . A few lines below we delete the part @@ -4459,7 +4459,7 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u url, mimetype, suggestedFilename ); switch( res ) { case KParts::BrowserRun::Save: - KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), TQString(), 0, suggestedFilename); + TDEHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), TQString(), 0, suggestedFilename); // fall-through case KParts::BrowserRun::Cancel: child->m_bCompleted = true; @@ -4486,7 +4486,7 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u //CRITICAL STUFF if ( child->m_part ) { - if (!::tqqt_cast(child->m_part) && child->m_jscript) + if (!::tqqt_cast(child->m_part) && child->m_jscript) child->m_jscript->clear(); partManager()->removePart( (KParts::ReadOnlyPart *)child->m_part ); delete (KParts::ReadOnlyPart *)child->m_part; @@ -4507,8 +4507,8 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u child->m_part = part; - if (::tqqt_cast(part)) { - static_cast(part)->d->m_frame = child; + if (::tqqt_cast(part)) { + static_cast(part)->d->m_frame = child; } else if (child->m_frame) { child->m_liveconnect = KParts::LiveConnectExtension::childObject(part); if (child->m_liveconnect) @@ -4526,7 +4526,7 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u this, TQT_SLOT( slotChildCompleted(bool) ) ); connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ), this, TQT_SIGNAL( setStatusBarText( const TQString & ) ) ); - if ( part->inherits( "KHTMLPart" ) ) + if ( part->inherits( "TDEHTMLPart" ) ) { connect( this, TQT_SIGNAL( completed() ), part, TQT_SLOT( slotParentCompleted() ) ); @@ -4598,7 +4598,7 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u // make sure the part has a way to find out about the mimetype. // we actually set it in child->m_args in requestObject already, - // but it's useless if we had to use a KHTMLRun instance, as the + // but it's useless if we had to use a TDEHTMLRun instance, as the // point the run object is to find out exactly the mimetype. child->m_args.serviceType = mimetype; @@ -4609,10 +4609,10 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u child->m_extension->setURLArgs( child->m_args ); if(url.protocol() == "javascript" || url.url() == "about:blank") { - if (!child->m_part->inherits("KHTMLPart")) + if (!child->m_part->inherits("TDEHTMLPart")) return false; - KHTMLPart* p = static_cast(static_cast(child->m_part)); + TDEHTMLPart* p = static_cast(static_cast(child->m_part)); p->begin(); if (d->m_doc && p->d->m_doc) @@ -4643,7 +4643,7 @@ bool KHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &_u } } -KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char *widgetName, +KParts::ReadOnlyPart *TDEHTMLPart::createPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQString &mimetype, TQString &serviceName, TQStringList &serviceTypes, const TQStringList ¶ms ) @@ -4697,7 +4697,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char return 0; } -KParts::PartManager *KHTMLPart::partManager() +KParts::PartManager *TDEHTMLPart::partManager() { if ( !d->m_manager && d->m_view ) { @@ -4712,28 +4712,28 @@ KParts::PartManager *KHTMLPart::partManager() return d->m_manager; } -void KHTMLPart::submitFormAgain() +void TDEHTMLPart::submitFormAgain() { disconnect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(submitFormAgain())); if( d->m_doc && !d->m_doc->parsing() && d->m_submitForm) - KHTMLPart::submitForm( d->m_submitForm->submitAction, d->m_submitForm->submitUrl, d->m_submitForm->submitFormData, d->m_submitForm->target, d->m_submitForm->submitContentType, d->m_submitForm->submitBoundary ); + TDEHTMLPart::submitForm( d->m_submitForm->submitAction, d->m_submitForm->submitUrl, d->m_submitForm->submitFormData, d->m_submitForm->target, d->m_submitForm->submitContentType, d->m_submitForm->submitBoundary ); delete d->m_submitForm; d->m_submitForm = 0; } -void KHTMLPart::submitFormProxy( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary ) +void TDEHTMLPart::submitFormProxy( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary ) { submitForm(action, url, formData, _target, contentType, boundary); } -void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary ) +void TDEHTMLPart::submitForm( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary ) { - kdDebug(6000) << this << ": KHTMLPart::submitForm target=" << _target << " url=" << url << endl; - if (d->m_formNotification == KHTMLPart::Only) { + kdDebug(6000) << this << ": TDEHTMLPart::submitForm target=" << _target << " url=" << url << endl; + if (d->m_formNotification == TDEHTMLPart::Only) { emit formSubmitNotification(action, url, formData, _target, contentType, boundary); return; - } else if (d->m_formNotification == KHTMLPart::Before) { + } else if (d->m_formNotification == TDEHTMLPart::Before) { emit formSubmitNotification(action, url, formData, _target, contentType, boundary); } @@ -4911,10 +4911,10 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt if ( d->m_doc->parsing() || d->m_runningScripts > 0 ) { if( d->m_submitForm ) { - kdDebug(6000) << "KHTMLPart::submitForm ABORTING!" << endl; + kdDebug(6000) << "TDEHTMLPart::submitForm ABORTING!" << endl; return; } - d->m_submitForm = new KHTMLPartPrivate::SubmitForm; + d->m_submitForm = new TDEHTMLPartPrivate::SubmitForm; d->m_submitForm->submitAction = action; d->m_submitForm->submitUrl = url; d->m_submitForm->submitFormData = formData; @@ -4929,7 +4929,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt } } -void KHTMLPart::popupMenu( const TQString &linkUrl ) +void TDEHTMLPart::popupMenu( const TQString &linkUrl ) { KURL popupURL; KURL linkKURL; @@ -4938,7 +4938,7 @@ void KHTMLPart::popupMenu( const TQString &linkUrl ) KParts::BrowserExtension::PopupFlags itemflags=KParts::BrowserExtension::ShowBookmark | KParts::BrowserExtension::ShowReload; if ( linkUrl.isEmpty() ) { // click on background - KHTMLPart* tdehtmlPart = this; + TDEHTMLPart* tdehtmlPart = this; while ( tdehtmlPart->parentPart() ) { tdehtmlPart=tdehtmlPart->parentPart(); @@ -4961,7 +4961,7 @@ void KHTMLPart::popupMenu( const TQString &linkUrl ) if (d->m_strSelectedURLTarget.lower() == "_blank") args.setForcesNewWindow(true); else { - KHTMLPart *p = this; + TDEHTMLPart *p = this; while (p->parentPart()) p = p->parentPart(); if (!p->frameExists(d->m_strSelectedURLTarget)) @@ -4971,8 +4971,8 @@ void KHTMLPart::popupMenu( const TQString &linkUrl ) } // Danger, Will Robinson. The Popup might stay around for a much - // longer time than KHTMLPart. Deal with it. - KHTMLPopupGUIClient* client = new KHTMLPopupGUIClient( this, d->m_popupMenuXML, linkKURL ); + // longer time than TDEHTMLPart. Deal with it. + TDEHTMLPopupGUIClient* client = new TDEHTMLPopupGUIClient( this, d->m_popupMenuXML, linkKURL ); TQGuardedPtr guard( client ); TQString mimetype = TQString::fromLatin1( "text/html" ); @@ -5018,7 +5018,7 @@ void KHTMLPart::popupMenu( const TQString &linkUrl ) } } -void KHTMLPart::slotParentCompleted() +void TDEHTMLPart::slotParentCompleted() { //kdDebug(6050) << this << " slotParentCompleted()" << endl; if ( !d->m_redirectURL.isEmpty() && !d->m_redirectionTimer.isActive() ) @@ -5028,7 +5028,7 @@ void KHTMLPart::slotParentCompleted() } } -void KHTMLPart::slotChildStarted( TDEIO::Job *job ) +void TDEHTMLPart::slotChildStarted( TDEIO::Job *job ) { tdehtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender()) ); @@ -5050,12 +5050,12 @@ void KHTMLPart::slotChildStarted( TDEIO::Job *job ) } } -void KHTMLPart::slotChildCompleted() +void TDEHTMLPart::slotChildCompleted() { slotChildCompleted( false ); } -void KHTMLPart::slotChildCompleted( bool pendingAction ) +void TDEHTMLPart::slotChildCompleted( bool pendingAction ) { tdehtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender()) ); @@ -5068,19 +5068,19 @@ void KHTMLPart::slotChildCompleted( bool pendingAction ) checkCompleted(); } -void KHTMLPart::slotChildDocCreated() +void TDEHTMLPart::slotChildDocCreated() { - const KHTMLPart* htmlFrame = static_cast(sender()); + const TDEHTMLPart* htmlFrame = static_cast(sender()); // Set domain to the frameset's domain // This must only be done when loading the frameset initially (#22039), // not when following a link in a frame (#44162). if ( d->m_doc && d->m_doc->isHTMLDocument() ) { - if ( sender()->inherits("KHTMLPart") ) + if ( sender()->inherits("TDEHTMLPart") ) { DOMString domain = static_cast(d->m_doc)->domain(); if (htmlFrame->d->m_doc && htmlFrame->d->m_doc->isHTMLDocument() ) - //kdDebug(6050) << "KHTMLPart::slotChildDocCreated: url: " << htmlFrame->m_url.url() << endl; + //kdDebug(6050) << "TDEHTMLPart::slotChildDocCreated: url: " << htmlFrame->m_url.url() << endl; static_cast(htmlFrame->d->m_doc)->setDomain( domain ); } } @@ -5088,10 +5088,10 @@ void KHTMLPart::slotChildDocCreated() disconnect( htmlFrame, TQT_SIGNAL( docCreated() ), this, TQT_SLOT( slotChildDocCreated() ) ); } -void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &args ) +void TDEHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &args ) { tdehtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender())->parent() ); - KHTMLPart *callingHtmlPart = const_cast(dynamic_cast(sender()->parent())); + TDEHTMLPart *callingHtmlPart = const_cast(dynamic_cast(sender()->parent())); // TODO: handle child target correctly! currently the script are always executed fur the parent TQString urlStr = url.url(); @@ -5147,12 +5147,12 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg } } -void KHTMLPart::slotRequestFocus( KParts::ReadOnlyPart * ) +void TDEHTMLPart::slotRequestFocus( KParts::ReadOnlyPart * ) { emit d->m_extension->requestFocus(this); } -tdehtml::ChildFrame *KHTMLPart::frame( const TQObject *obj ) +tdehtml::ChildFrame *TDEHTMLPart::frame( const TQObject *obj ) { assert( obj->inherits( "KParts::ReadOnlyPart" ) ); const KParts::ReadOnlyPart* const part = static_cast( obj ); @@ -5174,14 +5174,14 @@ tdehtml::ChildFrame *KHTMLPart::frame( const TQObject *obj ) //#define DEBUG_FINDFRAME -bool KHTMLPart::checkFrameAccess(KHTMLPart *callingHtmlPart) +bool TDEHTMLPart::checkFrameAccess(TDEHTMLPart *callingHtmlPart) { if (callingHtmlPart == this) return true; // trivial if (htmlDocument().isNull()) { #ifdef DEBUG_FINDFRAME - kdDebug(6050) << "KHTMLPart::checkFrameAccess: Empty part " << this << " URL = " << m_url << endl; + kdDebug(6050) << "TDEHTMLPart::checkFrameAccess: Empty part " << this << " URL = " << m_url << endl; #endif return false; // we are empty? } @@ -5193,7 +5193,7 @@ bool KHTMLPart::checkFrameAccess(KHTMLPart *callingHtmlPart) DOM::DOMString destDomain = htmlDocument().domain(); #ifdef DEBUG_FINDFRAME - kdDebug(6050) << "KHTMLPart::checkFrameAccess: actDomain = '" << actDomain.string() << "' destDomain = '" << destDomain.string() << "'" << endl; + kdDebug(6050) << "TDEHTMLPart::checkFrameAccess: actDomain = '" << actDomain.string() << "' destDomain = '" << destDomain.string() << "'" << endl; #endif if (actDomain == destDomain) @@ -5202,20 +5202,20 @@ bool KHTMLPart::checkFrameAccess(KHTMLPart *callingHtmlPart) #ifdef DEBUG_FINDFRAME else { - kdDebug(6050) << "KHTMLPart::checkFrameAccess: Unknown part/domain " << callingHtmlPart << " tries to access part " << this << endl; + kdDebug(6050) << "TDEHTMLPart::checkFrameAccess: Unknown part/domain " << callingHtmlPart << " tries to access part " << this << endl; } #endif return false; } -KHTMLPart * -KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame ) +TDEHTMLPart * +TDEHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame ) { #ifdef DEBUG_FINDFRAME - kdDebug(6050) << "KHTMLPart::findFrameParent: this = " << this << " URL = " << m_url << " name = " << name() << " findFrameParent( " << f << " )" << endl; + kdDebug(6050) << "TDEHTMLPart::findFrameParent: this = " << this << " URL = " << m_url << " name = " << name() << " findFrameParent( " << f << " )" << endl; #endif // Check access - KHTMLPart* const callingHtmlPart = dynamic_cast(callingPart); + TDEHTMLPart* const callingHtmlPart = dynamic_cast(callingPart); if (!checkFrameAccess(callingHtmlPart)) return 0; @@ -5229,7 +5229,7 @@ KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f if ( it != end ) { #ifdef DEBUG_FINDFRAME - kdDebug(6050) << "KHTMLPart::findFrameParent: FOUND!" << endl; + kdDebug(6050) << "TDEHTMLPart::findFrameParent: FOUND!" << endl; #endif if (childFrame) *childFrame = *it; @@ -5240,9 +5240,9 @@ KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f for (; it != end; ++it ) { KParts::ReadOnlyPart* const p = (*it)->m_part; - if ( p && p->inherits( "KHTMLPart" )) + if ( p && p->inherits( "TDEHTMLPart" )) { - KHTMLPart* const frameParent = static_cast(p)->findFrameParent(callingPart, f, childFrame); + TDEHTMLPart* const frameParent = static_cast(p)->findFrameParent(callingPart, f, childFrame); if (frameParent) return frameParent; } @@ -5251,41 +5251,41 @@ KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f } -KHTMLPart *KHTMLPart::findFrame( const TQString &f ) +TDEHTMLPart *TDEHTMLPart::findFrame( const TQString &f ) { tdehtml::ChildFrame *childFrame; - KHTMLPart *parentFrame = findFrameParent(this, f, &childFrame); + TDEHTMLPart *parentFrame = findFrameParent(this, f, &childFrame); if (parentFrame) { KParts::ReadOnlyPart *p = childFrame->m_part; - if ( p && p->inherits( "KHTMLPart" )) - return static_cast(p); + if ( p && p->inherits( "TDEHTMLPart" )) + return static_cast(p); } return 0; } -KParts::ReadOnlyPart *KHTMLPart::findFramePart(const TQString &f) +KParts::ReadOnlyPart *TDEHTMLPart::findFramePart(const TQString &f) { tdehtml::ChildFrame *childFrame; return findFrameParent(this, f, &childFrame) ? static_cast(childFrame->m_part) : 0L; } -KParts::ReadOnlyPart *KHTMLPart::currentFrame() const +KParts::ReadOnlyPart *TDEHTMLPart::currentFrame() const { KParts::ReadOnlyPart* part = (KParts::ReadOnlyPart*)(this); // Find active part in our frame manager, in case we are a frameset // and keep doing that (in case of nested framesets). // Just realized we could also do this recursively, calling part->currentFrame()... - while ( part && part->inherits("KHTMLPart") && - static_cast(part)->d->m_frames.count() > 0 ) { - KHTMLPart* frameset = static_cast(part); + while ( part && part->inherits("TDEHTMLPart") && + static_cast(part)->d->m_frames.count() > 0 ) { + TDEHTMLPart* frameset = static_cast(part); part = static_cast(frameset->partManager()->activePart()); if ( !part ) return frameset; } return part; } -bool KHTMLPart::frameExists( const TQString &frameName ) +bool TDEHTMLPart::frameExists( const TQString &frameName ) { ConstFrameIt it = d->m_frames.find( frameName ); if ( it == d->m_frames.end() ) @@ -5297,9 +5297,9 @@ bool KHTMLPart::frameExists( const TQString &frameName ) return (!(*it)->m_frame.isNull()); } -KJSProxy *KHTMLPart::framejScript(KParts::ReadOnlyPart *framePart) +KJSProxy *TDEHTMLPart::framejScript(KParts::ReadOnlyPart *framePart) { - KHTMLPart* const kp = ::tqqt_cast(framePart); + TDEHTMLPart* const kp = ::tqqt_cast(framePart); if (kp) return kp->jScript(); @@ -5315,19 +5315,19 @@ KJSProxy *KHTMLPart::framejScript(KParts::ReadOnlyPart *framePart) return 0L; } -KHTMLPart *KHTMLPart::parentPart() +TDEHTMLPart *TDEHTMLPart::parentPart() { - return ::tqqt_cast( parent() ); + return ::tqqt_cast( parent() ); } -tdehtml::ChildFrame *KHTMLPart::recursiveFrameRequest( KHTMLPart *callingHtmlPart, const KURL &url, +tdehtml::ChildFrame *TDEHTMLPart::recursiveFrameRequest( TDEHTMLPart *callingHtmlPart, const KURL &url, const KParts::URLArgs &args, bool callParent ) { #ifdef DEBUG_FINDFRAME - kdDebug( 6050 ) << "KHTMLPart::recursiveFrameRequest this = " << this << ", frame = " << args.frameName << ", url = " << url << endl; + kdDebug( 6050 ) << "TDEHTMLPart::recursiveFrameRequest this = " << this << ", frame = " << args.frameName << ", url = " << url << endl; #endif tdehtml::ChildFrame *childFrame; - KHTMLPart *childPart = findFrameParent(callingHtmlPart, args.frameName, &childFrame); + TDEHTMLPart *childPart = findFrameParent(callingHtmlPart, args.frameName, &childFrame); if (childPart) { if (childPart == this) @@ -5352,7 +5352,7 @@ tdehtml::ChildFrame *KHTMLPart::recursiveFrameRequest( KHTMLPart *callingHtmlPar static int s_saveStateIndentLevel = 0; #endif -void KHTMLPart::saveState( TQDataStream &stream ) +void TDEHTMLPart::saveState( TQDataStream &stream ) { #ifndef NDEBUG TQString indent = TQString().leftJustify( s_saveStateIndentLevel * 4, ' ' ); @@ -5438,7 +5438,7 @@ void KHTMLPart::saveState( TQDataStream &stream ) #endif } -void KHTMLPart::restoreState( TQDataStream &stream ) +void TDEHTMLPart::restoreState( TQDataStream &stream ) { KURL u; TQ_INT32 xOffset, yOffset, wContents, hContents, mWidth, mHeight; @@ -5610,7 +5610,7 @@ void KHTMLPart::restoreState( TQDataStream &stream ) args.docState = docState; d->m_extension->setURLArgs( args ); - if (!KHTMLPageCache::self()->isComplete(d->m_cacheId)) + if (!TDEHTMLPageCache::self()->isComplete(d->m_cacheId)) { d->m_restored = true; openURL( u ); @@ -5624,29 +5624,29 @@ void KHTMLPart::restoreState( TQDataStream &stream ) } -void KHTMLPart::show() +void TDEHTMLPart::show() { if ( d->m_view ) d->m_view->show(); } -void KHTMLPart::hide() +void TDEHTMLPart::hide() { if ( d->m_view ) d->m_view->hide(); } -DOM::Node KHTMLPart::nodeUnderMouse() const +DOM::Node TDEHTMLPart::nodeUnderMouse() const { return d->m_view->nodeUnderMouse(); } -DOM::Node KHTMLPart::nonSharedNodeUnderMouse() const +DOM::Node TDEHTMLPart::nonSharedNodeUnderMouse() const { return d->m_view->nonSharedNodeUnderMouse(); } -void KHTMLPart::emitSelectionChanged() +void TDEHTMLPart::emitSelectionChanged() { emit d->m_extension->enableAction( "copy", hasSelection() ); if ( d->m_findDialog ) @@ -5656,7 +5656,7 @@ void KHTMLPart::emitSelectionChanged() emit selectionChanged(); } -int KHTMLPart::zoomFactor() const +int TDEHTMLPart::zoomFactor() const { return d->m_zoomFactor; } @@ -5671,27 +5671,27 @@ static const int maxZoom = 300; extern const int KDE_NO_EXPORT fastZoomSizes[] = { 20, 50, 75, 90, 100, 120, 150, 200, 300 }; extern const int KDE_NO_EXPORT fastZoomSizeCount = sizeof fastZoomSizes / sizeof fastZoomSizes[0]; -void KHTMLPart::slotIncZoom() +void TDEHTMLPart::slotIncZoom() { zoomIn(zoomSizes, zoomSizeCount); } -void KHTMLPart::slotDecZoom() +void TDEHTMLPart::slotDecZoom() { zoomOut(zoomSizes, zoomSizeCount); } -void KHTMLPart::slotIncZoomFast() +void TDEHTMLPart::slotIncZoomFast() { zoomIn(fastZoomSizes, fastZoomSizeCount); } -void KHTMLPart::slotDecZoomFast() +void TDEHTMLPart::slotDecZoomFast() { zoomOut(fastZoomSizes, fastZoomSizeCount); } -void KHTMLPart::zoomIn(const int stepping[], int count) +void TDEHTMLPart::zoomIn(const int stepping[], int count) { int zoomFactor = d->m_zoomFactor; @@ -5706,7 +5706,7 @@ void KHTMLPart::zoomIn(const int stepping[], int count) } } -void KHTMLPart::zoomOut(const int stepping[], int count) +void TDEHTMLPart::zoomOut(const int stepping[], int count) { int zoomFactor = d->m_zoomFactor; if (zoomFactor > minZoom) { @@ -5720,7 +5720,7 @@ void KHTMLPart::zoomOut(const int stepping[], int count) } } -void KHTMLPart::setZoomFactor (int percent) +void TDEHTMLPart::setZoomFactor (int percent) { if (percent < minZoom) percent = minZoom; if (percent > maxZoom) percent = maxZoom; @@ -5738,9 +5738,9 @@ void KHTMLPart::setZoomFactor (int percent) ConstFrameIt it = d->m_frames.begin(); const ConstFrameIt end = d->m_frames.end(); for (; it != end; ++it ) - if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "KHTMLPart" ) ) { + if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "TDEHTMLPart" ) ) { KParts::ReadOnlyPart* const p = ( *it )->m_part; - static_cast( p )->setZoomFactor(d->m_zoomFactor); + static_cast( p )->setZoomFactor(d->m_zoomFactor); } if ( d->m_guiProfile == BrowserViewGUI ) { @@ -5749,7 +5749,7 @@ void KHTMLPart::setZoomFactor (int percent) } } -void KHTMLPart::slotZoomView( int delta ) +void TDEHTMLPart::slotZoomView( int delta ) { if ( delta < 0 ) slotIncZoom(); @@ -5757,7 +5757,7 @@ void KHTMLPart::slotZoomView( int delta ) slotDecZoom(); } -void KHTMLPart::setStatusBarText( const TQString& text, StatusBarPriority p) +void TDEHTMLPart::setStatusBarText( const TQString& text, StatusBarPriority p) { if (!d->m_statusMessagesEnabled) return; @@ -5781,32 +5781,32 @@ void KHTMLPart::setStatusBarText( const TQString& text, StatusBarPriority p) } -void KHTMLPart::setJSStatusBarText( const TQString &text ) +void TDEHTMLPart::setJSStatusBarText( const TQString &text ) { setStatusBarText(text, BarOverrideText); } -void KHTMLPart::setJSDefaultStatusBarText( const TQString &text ) +void TDEHTMLPart::setJSDefaultStatusBarText( const TQString &text ) { setStatusBarText(text, BarDefaultText); } -TQString KHTMLPart::jsStatusBarText() const +TQString TDEHTMLPart::jsStatusBarText() const { return d->m_statusBarText[BarOverrideText]; } -TQString KHTMLPart::jsDefaultStatusBarText() const +TQString TDEHTMLPart::jsDefaultStatusBarText() const { return d->m_statusBarText[BarDefaultText]; } -TQString KHTMLPart::referrer() const +TQString TDEHTMLPart::referrer() const { return d->m_referrer; } -TQString KHTMLPart::pageReferrer() const +TQString TDEHTMLPart::pageReferrer() const { KURL referrerURL = KURL( d->m_pageReferrer ); if (referrerURL.isValid()) @@ -5827,7 +5827,7 @@ TQString KHTMLPart::pageReferrer() const } -TQString KHTMLPart::lastModified() const +TQString TDEHTMLPart::lastModified() const { if ( d->m_lastModified.isEmpty() && m_url.isLocalFile() ) { // Local file: set last-modified from the file's mtime. @@ -5836,11 +5836,11 @@ TQString KHTMLPart::lastModified() const TQDateTime lastModif = TQFileInfo( m_url.path() ).lastModified(); d->m_lastModified = lastModif.toString( Qt::LocalDate ); } - //kdDebug(6050) << "KHTMLPart::lastModified: " << d->m_lastModified << endl; + //kdDebug(6050) << "TDEHTMLPart::lastModified: " << d->m_lastModified << endl; return d->m_lastModified; } -void KHTMLPart::slotLoadImages() +void TDEHTMLPart::slotLoadImages() { if (d->m_doc ) d->m_doc->docLoader()->setAutoloadImages( !d->m_doc->docLoader()->autoloadImages() ); @@ -5848,15 +5848,15 @@ void KHTMLPart::slotLoadImages() ConstFrameIt it = d->m_frames.begin(); const ConstFrameIt end = d->m_frames.end(); for (; it != end; ++it ) - if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "KHTMLPart" ) ) { + if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "TDEHTMLPart" ) ) { KParts::ReadOnlyPart* const p = ( *it )->m_part; - static_cast( p )->slotLoadImages(); + static_cast( p )->slotLoadImages(); } } -void KHTMLPart::reparseConfiguration() +void TDEHTMLPart::reparseConfiguration() { - KHTMLSettings *settings = KHTMLFactory::defaultHTMLSettings(); + TDEHTMLSettings *settings = TDEHTMLFactory::defaultHTMLSettings(); settings->init(); setAutoloadImages( settings->autoLoadImages() ); @@ -5872,18 +5872,18 @@ void KHTMLPart::reparseConfiguration() d->m_metaRefreshEnabled = settings->isAutoDelayedActionsEnabled (); delete d->m_settings; - d->m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings()); + d->m_settings = new TDEHTMLSettings(*TDEHTMLFactory::defaultHTMLSettings()); TQApplication::setOverrideCursor( tqwaitCursor ); tdehtml::CSSStyleSelector::reparseConfiguration(); if(d->m_doc) d->m_doc->updateStyleSelector(); TQApplication::restoreOverrideCursor(); - if (KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()) + if (TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()) runAdFilter(); } -TQStringList KHTMLPart::frameNames() const +TQStringList TDEHTMLPart::frameNames() const { TQStringList res; @@ -5896,7 +5896,7 @@ TQStringList KHTMLPart::frameNames() const return res; } -TQPtrList KHTMLPart::frames() const +TQPtrList TDEHTMLPart::frames() const { TQPtrList res; @@ -5909,9 +5909,9 @@ TQPtrList KHTMLPart::frames() const return res; } -bool KHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs ) +bool TDEHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs ) { - kdDebug( 6050 ) << this << "KHTMLPart::openURLInFrame " << url << endl; + kdDebug( 6050 ) << this << "TDEHTMLPart::openURLInFrame " << url << endl; FrameIt it = d->m_frames.find( urlArgs.frameName ); if ( it == d->m_frames.end() ) @@ -5926,17 +5926,17 @@ bool KHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs return true; } -void KHTMLPart::setDNDEnabled( bool b ) +void TDEHTMLPart::setDNDEnabled( bool b ) { d->m_bDnd = b; } -bool KHTMLPart::dndEnabled() const +bool TDEHTMLPart::dndEnabled() const { return d->m_bDnd; } -void KHTMLPart::customEvent( TQCustomEvent *event ) +void TDEHTMLPart::customEvent( TQCustomEvent *event ) { if ( tdehtml::MousePressEvent::test( event ) ) { @@ -6041,7 +6041,7 @@ static bool lastRunAt(tdehtml::RenderObject *renderNode, int y, NodeImpl *&endNo } } -void KHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event ) +void TDEHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event ) { DOM::DOMString url = event->url(); TQMouseEvent *_mouse = event->qmouseEvent(); @@ -6062,7 +6062,7 @@ void KHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event ) { d->m_bMousePressed = true; -#ifndef KHTML_NO_SELECTION +#ifndef TDEHTML_NO_SELECTION if ( _mouse->button() == Qt::LeftButton ) { if ( (!d->m_strSelectedURL.isNull() && !isEditable()) @@ -6076,27 +6076,27 @@ void KHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event ) event->absX()-innerNode.handle()->renderer()->xPos(), event->absY()-innerNode.handle()->renderer()->yPos(), node, offset, state ); d->m_extendMode = d->ExtendByChar; -#ifdef KHTML_NO_CARET +#ifdef TDEHTML_NO_CARET d->m_selectionStart = node; d->m_startOffset = offset; //if ( node ) - // kdDebug(6005) << "KHTMLPart::tdehtmlMousePressEvent selectionStart=" << d->m_selectionStart.handle()->renderer() + // kdDebug(6005) << "TDEHTMLPart::tdehtmlMousePressEvent selectionStart=" << d->m_selectionStart.handle()->renderer() // << " offset=" << d->m_startOffset << endl; //else - // kdDebug(6005) << "KHTML::tdehtmlMousePressEvent selectionStart=(nil)" << endl; + // kdDebug(6005) << "TDEHTML::tdehtmlMousePressEvent selectionStart=(nil)" << endl; d->m_selectionEnd = d->m_selectionStart; d->m_endOffset = d->m_startOffset; d->m_doc->clearSelection(); -#else // KHTML_NO_CARET +#else // TDEHTML_NO_CARET d->m_view->moveCaretTo(node, offset, (_mouse->state() & ShiftButton) == 0); -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET d->m_initialNode = d->m_selectionStart; d->m_initialOffset = d->m_startOffset; // kdDebug(6000) << "press: initOfs " << d->m_initialOffset << endl; } else { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // simply leave it. Is this a good idea? #else d->m_selectionStart = DOM::Node(); @@ -6121,7 +6121,7 @@ void KHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event ) } } -void KHTMLPart::tdehtmlMouseDoubleClickEvent( tdehtml::MouseDoubleClickEvent *event ) +void TDEHTMLPart::tdehtmlMouseDoubleClickEvent( tdehtml::MouseDoubleClickEvent *event ) { TQMouseEvent *_mouse = event->qmouseEvent(); if ( _mouse->button() == Qt::LeftButton ) @@ -6175,7 +6175,7 @@ void KHTMLPart::tdehtmlMouseDoubleClickEvent( tdehtml::MouseDoubleClickEvent *ev d->m_doc ->setSelection(d->m_selectionStart.handle(),d->m_startOffset, d->m_selectionEnd.handle(),d->m_endOffset); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET bool v = d->m_view->placeCaret(); emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset()); #endif @@ -6185,7 +6185,7 @@ void KHTMLPart::tdehtmlMouseDoubleClickEvent( tdehtml::MouseDoubleClickEvent *ev } } -void KHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& selectionNode, long& selectionOffset, bool right, bool selectLines ) +void TDEHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& selectionNode, long& selectionOffset, bool right, bool selectLines ) { tdehtml::RenderObject* obj = node->renderer(); @@ -6289,11 +6289,11 @@ void KHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& se if (right) ++selectionOffset; } -#ifndef KHTML_NO_SELECTION -void KHTMLPart::extendSelectionTo(int x, int y, int absX, int absY, const DOM::Node &innerNode) +#ifndef TDEHTML_NO_SELECTION +void TDEHTMLPart::extendSelectionTo(int x, int y, int absX, int absY, const DOM::Node &innerNode) { int offset; - //kdDebug(6000) << "KHTMLPart::tdehtmlMouseMoveEvent x=" << event->x() << " y=" << event->y() << endl; + //kdDebug(6000) << "TDEHTMLPart::tdehtmlMouseMoveEvent x=" << event->x() << " y=" << event->y() << endl; DOM::NodeImpl* node=0; tdehtml::RenderObject::SelPointState state; innerNode.handle()->renderer()->checkSelectionPoint( x, y, @@ -6357,21 +6357,21 @@ void KHTMLPart::extendSelectionTo(int x, int y, int absX, int absY, const DOM::N ->setSelection(d->m_selectionEnd.handle(),d->m_endOffset, d->m_selectionStart.handle(),d->m_startOffset); } -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET d->m_view->placeCaret(); #endif } -bool KHTMLPart::isExtendingSelection() const +bool TDEHTMLPart::isExtendingSelection() const { // This is it, the whole detection. tdehtmlMousePressEvent only sets this // on LMB or MMB, but never on RMB. As text selection doesn't work for MMB, // it's sufficient to only rely on this flag to detect selection extension. return d->m_bMousePressed; } -#endif // KHTML_NO_SELECTION +#endif // TDEHTML_NO_SELECTION -void KHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event ) +void TDEHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event ) { TQMouseEvent *_mouse = event->qmouseEvent(); @@ -6490,7 +6490,7 @@ void KHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event ) } } else { -#ifndef KHTML_NO_SELECTION +#ifndef TDEHTML_NO_SELECTION // selection stuff if( d->m_bMousePressed && innerNode.handle() && innerNode.handle()->renderer() && ( (_mouse->state() & Qt::LeftButton) != 0 )) { @@ -6510,7 +6510,7 @@ void KHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event ) } -void KHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event ) +void TDEHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event ) { DOM::Node innerNode = event->innerNode(); d->m_mousePressNode = DOM::Node(); @@ -6535,21 +6535,21 @@ void KHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event ) } #ifndef QT_NO_CLIPBOARD if ((d->m_guiProfile == BrowserViewGUI) && (_mouse->button() == Qt::MidButton) && (event->url().isNull())) { - kdDebug( 6050 ) << "KHTMLPart::tdehtmlMouseReleaseEvent() MMB shouldOpen=" + kdDebug( 6050 ) << "TDEHTMLPart::tdehtmlMouseReleaseEvent() MMB shouldOpen=" << d->m_bOpenMiddleClick << endl; if (d->m_bOpenMiddleClick) { - KHTMLPart *p = this; + TDEHTMLPart *p = this; while (p->parentPart()) p = p->parentPart(); p->d->m_extension->pasteRequest(); } } #endif -#ifndef KHTML_NO_SELECTION +#ifndef TDEHTML_NO_SELECTION // delete selection in case start and end position are at the same point if(d->m_selectionStart == d->m_selectionEnd && d->m_startOffset == d->m_endOffset) { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET d->m_extendAtEnd = true; #else d->m_selectionStart = 0; @@ -6602,7 +6602,7 @@ void KHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event ) d->m_startBeforeEnd = true; d->m_extendAtEnd = !d->m_extendAtEnd; } -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET bool v = d->m_view->placeCaret(); emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset()); #endif @@ -6624,11 +6624,11 @@ void KHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event ) } -void KHTMLPart::tdehtmlDrawContentsEvent( tdehtml::DrawContentsEvent * ) +void TDEHTMLPart::tdehtmlDrawContentsEvent( tdehtml::DrawContentsEvent * ) { } -void KHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event ) +void TDEHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event ) { if ( event->activated() ) { @@ -6644,7 +6644,7 @@ void KHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event ) } } -void KHTMLPart::slotPrintFrame() +void TDEHTMLPart::slotPrintFrame() { if ( d->m_frames.count() == 0 ) return; @@ -6667,20 +6667,20 @@ void KHTMLPart::slotPrintFrame() } } -void KHTMLPart::slotSelectAll() +void TDEHTMLPart::slotSelectAll() { KParts::ReadOnlyPart *part = currentFrame(); - if (part && part->inherits("KHTMLPart")) - static_cast(part)->selectAll(); + if (part && part->inherits("TDEHTMLPart")) + static_cast(part)->selectAll(); } -void KHTMLPart::startAutoScroll() +void TDEHTMLPart::startAutoScroll() { connect(&d->m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() )); d->m_scrollTimer.start(100, false); } -void KHTMLPart::stopAutoScroll() +void TDEHTMLPart::stopAutoScroll() { disconnect(&d->m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() )); if (d->m_scrollTimer.isActive()) @@ -6688,7 +6688,7 @@ void KHTMLPart::stopAutoScroll() } -void KHTMLPart::slotAutoScroll() +void TDEHTMLPart::slotAutoScroll() { if (d->m_view) d->m_view->doAutoScroll(); @@ -6696,7 +6696,7 @@ void KHTMLPart::slotAutoScroll() stopAutoScroll(); // Safety } -void KHTMLPart::runAdFilter() +void TDEHTMLPart::runAdFilter() { if ( parentPart() ) parentPart()->runAdFilter(); @@ -6709,12 +6709,12 @@ void KHTMLPart::runAdFilter() if ( it.current()->type() == tdehtml::CachedObject::Image ) { tdehtml::CachedImage *image = static_cast(it.current()); bool wasBlocked = image->m_wasBlocked; - image->m_wasBlocked = KHTMLFactory::defaultHTMLSettings()->isAdFiltered( d->m_doc->completeURL( (*it).url().string() ) ); + image->m_wasBlocked = TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered( d->m_doc->completeURL( (*it).url().string() ) ); if ( image->m_wasBlocked != wasBlocked ) image->do_notify(image->pixmap(), image->valid_rect()); } - if ( KHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled() ) { + if ( TDEHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled() ) { for ( NodeImpl *nextNode, *node = d->m_doc; node; node = nextNode ) { // We might be deleting 'node' shortly. @@ -6724,7 +6724,7 @@ void KHTMLPart::runAdFilter() node->id() == ID_IFRAME || (node->id() == ID_INPUT && static_cast(node)->inputType() == HTMLInputElementImpl::IMAGE )) { - if ( KHTMLFactory::defaultHTMLSettings()->isAdFiltered( d->m_doc->completeURL( static_cast(node)->getAttribute(ATTR_SRC).string() ) ) ) + if ( TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered( d->m_doc->completeURL( static_cast(node)->getAttribute(ATTR_SRC).string() ) ) ) { // We found an IMG, IFRAME or INPUT (of type IMAGE) matching a filter. node->ref(); @@ -6741,7 +6741,7 @@ void KHTMLPart::runAdFilter() } } -void KHTMLPart::selectAll() +void TDEHTMLPart::selectAll() { if (!d->m_doc) return; @@ -6809,7 +6809,7 @@ void KHTMLPart::selectAll() emitSelectionChanged(); } -bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const TQString &message, const TQString &button) +bool TDEHTMLPart::checkLinkSecurity(const KURL &linkURL,const TQString &message, const TQString &button) { bool linkAllowed = true; @@ -6843,13 +6843,13 @@ bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const TQString &message, c return true; } -void KHTMLPart::slotPartRemoved( KParts::Part *part ) +void TDEHTMLPart::slotPartRemoved( KParts::Part *part ) { -// kdDebug(6050) << "KHTMLPart::slotPartRemoved " << part << endl; +// kdDebug(6050) << "TDEHTMLPart::slotPartRemoved " << part << endl; if ( part == d->m_activeFrame ) { d->m_activeFrame = 0L; - if ( !part->inherits( "KHTMLPart" ) ) + if ( !part->inherits( "TDEHTMLPart" ) ) { if (factory()) { factory()->removeClient( part ); @@ -6861,16 +6861,16 @@ void KHTMLPart::slotPartRemoved( KParts::Part *part ) } } -void KHTMLPart::slotActiveFrameChanged( KParts::Part *part ) +void TDEHTMLPart::slotActiveFrameChanged( KParts::Part *part ) { -// kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged this=" << this << "part=" << part << endl; +// kdDebug(6050) << "TDEHTMLPart::slotActiveFrameChanged this=" << this << "part=" << part << endl; if ( part == this ) { kdError(6050) << "strange error! we activated ourselves" << endl; assert( false ); return; } -// kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl; +// kdDebug(6050) << "TDEHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl; if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( TQFRAME_OBJECT_NAME_STRING ) ) { TQFrame *frame = static_cast( d->m_activeFrame->widget() ); @@ -6881,14 +6881,14 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part ) } } - if( d->m_activeFrame && !d->m_activeFrame->inherits( "KHTMLPart" ) ) + if( d->m_activeFrame && !d->m_activeFrame->inherits( "TDEHTMLPart" ) ) { if (factory()) { factory()->removeClient( d->m_activeFrame ); } removeChildClient( d->m_activeFrame ); } - if( part && !part->inherits( "KHTMLPart" ) ) + if( part && !part->inherits( "TDEHTMLPart" ) ) { if (factory()) { factory()->addClient( part ); @@ -6916,7 +6916,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part ) d->m_extension->setExtensionProxy( KParts::BrowserExtension::childObject( d->m_activeFrame ) ); } -void KHTMLPart::setActiveNode(const DOM::Node &node) +void TDEHTMLPart::setActiveNode(const DOM::Node &node) { if (!d->m_doc || !d->m_view) return; @@ -6930,12 +6930,12 @@ void KHTMLPart::setActiveNode(const DOM::Node &node) d->m_view->ensureVisible(rect.left(), rect.top()); } -DOM::Node KHTMLPart::activeNode() const +DOM::Node TDEHTMLPart::activeNode() const { return DOM::Node(d->m_doc?d->m_doc->focusNode():0); } -DOM::EventListener *KHTMLPart::createHTMLEventListener( TQString code, TQString name, NodeImpl* node ) +DOM::EventListener *TDEHTMLPart::createHTMLEventListener( TQString code, TQString name, NodeImpl* node ) { KJSProxy *proxy = jScript(); @@ -6945,64 +6945,64 @@ DOM::EventListener *KHTMLPart::createHTMLEventListener( TQString code, TQString return proxy->createHTMLEventHandler( m_url.url(), name, code, node ); } -KHTMLPart *KHTMLPart::opener() +TDEHTMLPart *TDEHTMLPart::opener() { return d->m_opener; } -void KHTMLPart::setOpener(KHTMLPart *_opener) +void TDEHTMLPart::setOpener(TDEHTMLPart *_opener) { d->m_opener = _opener; } -bool KHTMLPart::openedByJS() +bool TDEHTMLPart::openedByJS() { return d->m_openedByJS; } -void KHTMLPart::setOpenedByJS(bool _openedByJS) +void TDEHTMLPart::setOpenedByJS(bool _openedByJS) { d->m_openedByJS = _openedByJS; } -void KHTMLPart::preloadStyleSheet(const TQString &url, const TQString &stylesheet) +void TDEHTMLPart::preloadStyleSheet(const TQString &url, const TQString &stylesheet) { tdehtml::Cache::preloadStyleSheet(url, stylesheet); } -void KHTMLPart::preloadScript(const TQString &url, const TQString &script) +void TDEHTMLPart::preloadScript(const TQString &url, const TQString &script) { tdehtml::Cache::preloadScript(url, script); } -TQCString KHTMLPart::dcopObjectId() const +TQCString TDEHTMLPart::dcopObjectId() const { TQCString id; id.sprintf("html-widget%d", d->m_dcop_counter); return id; } -long KHTMLPart::cacheId() const +long TDEHTMLPart::cacheId() const { return d->m_cacheId; } -bool KHTMLPart::restored() const +bool TDEHTMLPart::restored() const { return d->m_restored; } -bool KHTMLPart::pluginPageQuestionAsked(const TQString& mimetype) const +bool TDEHTMLPart::pluginPageQuestionAsked(const TQString& mimetype) const { // parentPart() should be const! - KHTMLPart* parent = const_cast(this)->parentPart(); + TDEHTMLPart* parent = const_cast(this)->parentPart(); if ( parent ) return parent->pluginPageQuestionAsked(mimetype); return d->m_pluginPageQuestionAsked.contains(mimetype); } -void KHTMLPart::setPluginPageQuestionAsked(const TQString& mimetype) +void TDEHTMLPart::setPluginPageQuestionAsked(const TQString& mimetype) { if ( parentPart() ) parentPart()->setPluginPageQuestionAsked(mimetype); @@ -7010,7 +7010,7 @@ void KHTMLPart::setPluginPageQuestionAsked(const TQString& mimetype) d->m_pluginPageQuestionAsked.append(mimetype); } -void KHTMLPart::slotAutomaticDetectionLanguage( int _id ) +void TDEHTMLPart::slotAutomaticDetectionLanguage( int _id ) { d->m_automaticDetection->setItemChecked( _id, true ); @@ -7079,7 +7079,7 @@ void KHTMLPart::slotAutomaticDetectionLanguage( int _id ) d->m_paSetEncoding->popupMenu()->setItemChecked( d->m_paSetEncoding->popupMenu()->idAt( 2 ), false ); } -tdehtml::Decoder *KHTMLPart::createDecoder() +tdehtml::Decoder *TDEHTMLPart::createDecoder() { tdehtml::Decoder *dec = new tdehtml::Decoder(); if( !d->m_encoding.isNull() ) @@ -7099,11 +7099,11 @@ tdehtml::Decoder *KHTMLPart::createDecoder() return dec; } -void KHTMLPart::emitCaretPositionChanged(const DOM::Node &node, long offset) { +void TDEHTMLPart::emitCaretPositionChanged(const DOM::Node &node, long offset) { emit caretPositionChanged(node, offset); } -void KHTMLPart::restoreScrollPosition() +void TDEHTMLPart::restoreScrollPosition() { KParts::URLArgs args = d->m_extension->urlArgs(); @@ -7127,10 +7127,10 @@ void KHTMLPart::restoreScrollPosition() } -void KHTMLPart::openWallet(DOM::HTMLFormElementImpl *form) +void TDEHTMLPart::openWallet(DOM::HTMLFormElementImpl *form) { -#ifndef KHTML_NO_WALLET - KHTMLPart *p; +#ifndef TDEHTML_NO_WALLET + TDEHTMLPart *p; for (p = parentPart(); p && p->parentPart(); p = p->parentPart()) { } @@ -7158,21 +7158,21 @@ void KHTMLPart::openWallet(DOM::HTMLFormElementImpl *form) if (!d->m_wq) { KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous); - d->m_wq = new KHTMLWalletQueue(this); + d->m_wq = new TDEHTMLWalletQueue(this); d->m_wq->wallet = wallet; connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool))); connect(d->m_wq, TQT_SIGNAL(walletOpened(KWallet::Wallet*)), this, TQT_SLOT(walletOpened(KWallet::Wallet*))); } assert(form); - d->m_wq->callers.append(KHTMLWalletQueue::Caller(form, form->getDocument())); -#endif // KHTML_NO_WALLET + d->m_wq->callers.append(TDEHTMLWalletQueue::Caller(form, form->getDocument())); +#endif // TDEHTML_NO_WALLET } -void KHTMLPart::saveToWallet(const TQString& key, const TQMap& data) +void TDEHTMLPart::saveToWallet(const TQString& key, const TQMap& data) { -#ifndef KHTML_NO_WALLET - KHTMLPart *p; +#ifndef TDEHTML_NO_WALLET + TDEHTMLPart *p; for (p = parentPart(); p && p->parentPart(); p = p->parentPart()) { } @@ -7200,19 +7200,19 @@ void KHTMLPart::saveToWallet(const TQString& key, const TQMap if (!d->m_wq) { KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous); - d->m_wq = new KHTMLWalletQueue(this); + d->m_wq = new TDEHTMLWalletQueue(this); d->m_wq->wallet = wallet; connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool))); connect(d->m_wq, TQT_SIGNAL(walletOpened(KWallet::Wallet*)), this, TQT_SLOT(walletOpened(KWallet::Wallet*))); } d->m_wq->savers.append(qMakePair(key, data)); -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -void KHTMLPart::dequeueWallet(DOM::HTMLFormElementImpl *form) { -#ifndef KHTML_NO_WALLET - KHTMLPart *p; +void TDEHTMLPart::dequeueWallet(DOM::HTMLFormElementImpl *form) { +#ifndef TDEHTML_NO_WALLET + TDEHTMLPart *p; for (p = parentPart(); p && p->parentPart(); p = p->parentPart()) { } @@ -7223,14 +7223,14 @@ void KHTMLPart::dequeueWallet(DOM::HTMLFormElementImpl *form) { } if (d->m_wq) { - d->m_wq->callers.remove(KHTMLWalletQueue::Caller(form, form->getDocument())); + d->m_wq->callers.remove(TDEHTMLWalletQueue::Caller(form, form->getDocument())); } -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -void KHTMLPart::walletOpened(KWallet::Wallet *wallet) { -#ifndef KHTML_NO_WALLET +void TDEHTMLPart::walletOpened(KWallet::Wallet *wallet) { +#ifndef TDEHTML_NO_WALLET assert(!d->m_wallet); assert(d->m_wq); @@ -7259,14 +7259,14 @@ void KHTMLPart::walletOpened(KWallet::Wallet *wallet) { TQToolTip::remove(d->m_statusBarWalletLabel); } TQToolTip::add(d->m_statusBarWalletLabel, i18n("The wallet '%1' is open and being used for form data and passwords.").arg(KWallet::Wallet::NetworkWallet())); -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -KWallet::Wallet *KHTMLPart::wallet() +KWallet::Wallet *TDEHTMLPart::wallet() { -#ifndef KHTML_NO_WALLET - KHTMLPart *p; +#ifndef TDEHTML_NO_WALLET + TDEHTMLPart *p; for (p = parentPart(); p && p->parentPart(); p = p->parentPart()) ; @@ -7274,14 +7274,14 @@ KWallet::Wallet *KHTMLPart::wallet() if (p) return p->wallet(); -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET return d->m_wallet; } -void KHTMLPart::slotWalletClosed() +void TDEHTMLPart::slotWalletClosed() { -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET if (d->m_wallet) { d->m_wallet->deleteLater(); d->m_wallet = 0L; @@ -7292,12 +7292,12 @@ void KHTMLPart::slotWalletClosed() delete d->m_statusBarWalletLabel; d->m_statusBarWalletLabel = 0L; } -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -void KHTMLPart::launchWalletManager() +void TDEHTMLPart::launchWalletManager() { -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET if (!DCOPClient::mainClient()->isApplicationRegistered("tdewalletmanager")) { TDEApplication::startServiceByDesktopName("tdewalletmanager_show"); } else { @@ -7305,34 +7305,34 @@ void KHTMLPart::launchWalletManager() r.send("show"); r.send("raise"); } -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -void KHTMLPart::walletMenu() +void TDEHTMLPart::walletMenu() { -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET KPopupMenu *m = new KPopupMenu(0L); m->insertItem(i18n("&Close Wallet"), this, TQT_SLOT(slotWalletClosed())); m->popup(TQCursor::pos()); -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -void KHTMLPart::slotToggleCaretMode() +void TDEHTMLPart::slotToggleCaretMode() { setCaretMode(d->m_paToggleCaretMode->isChecked()); } -void KHTMLPart::setFormNotification(KHTMLPart::FormNotification fn) { +void TDEHTMLPart::setFormNotification(TDEHTMLPart::FormNotification fn) { d->m_formNotification = fn; } -KHTMLPart::FormNotification KHTMLPart::formNotification() const { +TDEHTMLPart::FormNotification TDEHTMLPart::formNotification() const { return d->m_formNotification; } -KURL KHTMLPart::toplevelURL() +KURL TDEHTMLPart::toplevelURL() { - KHTMLPart* part = this; + TDEHTMLPart* part = this; while (part->parentPart()) part = part->parentPart(); @@ -7342,7 +7342,7 @@ KURL KHTMLPart::toplevelURL() return part->url(); } -bool KHTMLPart::isModified() const +bool TDEHTMLPart::isModified() const { if ( !d->m_doc ) return false; @@ -7350,7 +7350,7 @@ bool KHTMLPart::isModified() const return d->m_doc->unsubmittedFormChanges(); } -void KHTMLPart::setDebugScript( bool enable ) +void TDEHTMLPart::setDebugScript( bool enable ) { unplugActionList( "debugScriptList" ); if ( enable ) { @@ -7365,12 +7365,12 @@ void KHTMLPart::setDebugScript( bool enable ) d->m_bJScriptDebugEnabled = enable; } -void KHTMLPart::setSuppressedPopupIndicator( bool enable ) +void TDEHTMLPart::setSuppressedPopupIndicator( bool enable ) { setSuppressedPopupIndicator( enable, 0 ); } -void KHTMLPart::setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart ) +void TDEHTMLPart::setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originPart ) { if ( parentPart() ) { parentPart()->setSuppressedPopupIndicator( enable, originPart ); @@ -7406,7 +7406,7 @@ void KHTMLPart::setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart } } -void KHTMLPart::suppressedPopupMenu() { +void TDEHTMLPart::suppressedPopupMenu() { KPopupMenu *m = new KPopupMenu(0L); m->setCheckable(true); if ( d->m_openableSuppressedPopups ) @@ -7417,16 +7417,16 @@ void KHTMLPart::suppressedPopupMenu() { m->popup(TQCursor::pos()); } -void KHTMLPart::togglePopupPassivePopup() { +void TDEHTMLPart::togglePopupPassivePopup() { // Same hack as in disableJSErrorExtension() d->m_settings->setJSPopupBlockerPassivePopup( !d->m_settings->jsPopupBlockerPassivePopup() ); DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", TQByteArray()); } -void KHTMLPart::showSuppressedPopups() { - for ( TQValueListIterator > i = d->m_suppressedPopupOriginParts.begin(); +void TDEHTMLPart::showSuppressedPopups() { + for ( TQValueListIterator > i = d->m_suppressedPopupOriginParts.begin(); i != d->m_suppressedPopupOriginParts.end(); ++i ) { - if (KHTMLPart* part = *i) { + if (TDEHTMLPart* part = *i) { KJS::Window *w = KJS::Window::retrieveWindow( part ); if (w) { w->showSuppressedWindows(); @@ -7441,7 +7441,7 @@ void KHTMLPart::showSuppressedPopups() { // Extension to use for "view document source", "save as" etc. // Using the right extension can help the viewer get into the right mode (#40496) -TQString KHTMLPart::defaultExtension() const +TQString TDEHTMLPart::defaultExtension() const { if ( !d->m_doc ) return ".html"; @@ -7450,7 +7450,7 @@ TQString KHTMLPart::defaultExtension() const return d->m_doc->htmlMode() == DOM::DocumentImpl::XHtml ? ".xhtml" : ".html"; } -bool KHTMLPart::inProgress() const +bool TDEHTMLPart::inProgress() const { if (d->m_runningScripts || (d->m_doc && d->m_doc->parsing())) return true; diff --git a/tdehtml/tdehtml_part.h b/tdehtml/tdehtml_part.h index e4e20c03c..452083708 100644 --- a/tdehtml/tdehtml_part.h +++ b/tdehtml/tdehtml_part.h @@ -36,11 +36,11 @@ #include -class KHTMLPartPrivate; -class KHTMLPartBrowserExtension; +class TDEHTMLPartPrivate; +class TDEHTMLPartBrowserExtension; class KJSProxy; -class KHTMLView; -class KHTMLSettings; +class TDEHTMLView; +class TDEHTMLSettings; class KJavaAppletContext; class KJSErrorDlg; @@ -120,7 +120,7 @@ namespace KWallet * * \code * KURL url = "http://www.kde.org"; - * KHTMLPart *w = new KHTMLPart(); + * TDEHTMLPart *w = new TDEHTMLPart(); * w->openURL(url); * w->view()->resize(500, 400); * w->show(); @@ -139,7 +139,7 @@ namespace KWallet * w->setPluginsEnabled(false); * \endcode * - * You may also wish to disable external references. This will prevent KHTML + * You may also wish to disable external references. This will prevent TDEHTML * from loading images, frames, etc, or redirecting to external sites. * * \code @@ -151,7 +151,7 @@ namespace KWallet * * \code * TQString myHTMLCode = ...; - * KHTMLPart *w = new KHTMLPart(); + * TDEHTMLPart *w = new TDEHTMLPart(); * w->begin(); * w->write(myHTMLCode); * ... @@ -171,9 +171,9 @@ namespace KWallet * described above as the following example shows: * * \code - * KHTMLPart *doc = new KHTMLPart(); + * TDEHTMLPart *doc = new TDEHTMLPart(); * doc->openStream( "text/html", KURL() ); - * doc->writeStream( TQCString( "

      KHTML Rocks!

      " ) ); + * doc->writeStream( TQCString( "

      TDEHTML Rocks!

      " ) ); * doc->closeStream(); * \endcode * @@ -181,10 +181,10 @@ namespace KWallet * @author Lars Knoll (knoll@kde.org) * */ -class KHTML_EXPORT KHTMLPart : public KParts::ReadOnlyPart +class TDEHTML_EXPORT TDEHTMLPart : public KParts::ReadOnlyPart { Q_OBJECT - friend class KHTMLView; + friend class TDEHTMLView; friend class DOM::HTMLTitleElementImpl; friend class DOM::HTMLFrameElementImpl; friend class DOM::HTMLIFrameElementImpl; @@ -192,7 +192,7 @@ class KHTML_EXPORT KHTMLPart : public KParts::ReadOnlyPart friend class DOM::HTMLAnchorElementImpl; friend class DOM::HTMLMetaElementImpl; friend class DOM::NodeImpl; - friend class KHTMLRun; + friend class TDEHTMLRun; friend class DOM::HTMLFormElementImpl; friend class tdehtml::RenderPartObject; friend class KJS::Window; @@ -205,17 +205,17 @@ class KHTML_EXPORT KHTMLPart : public KParts::ReadOnlyPart friend class KJS::DOMDocument; friend class KJS::SourceFile; friend class KJSProxy; - friend class KHTMLPartBrowserExtension; + friend class TDEHTMLPartBrowserExtension; friend class DOM::DocumentImpl; friend class DOM::HTMLDocumentImpl; - friend class KHTMLPartBrowserHostExtension; + friend class TDEHTMLPartBrowserHostExtension; friend class tdehtml::HTMLTokenizer; friend class tdehtml::XMLTokenizer; friend class tdehtml::RenderWidget; friend class tdehtml::CSSStyleSelector; - friend class KHTMLPartIface; - friend class KHTMLPartFunction; - friend class KHTMLPopupGUIClient; + friend class TDEHTMLPartIface; + friend class TDEHTMLPartFunction; + friend class TDEHTMLPopupGUIClient; TQ_PROPERTY( bool javaScriptEnabled READ jScriptEnabled WRITE setJScriptEnabled ) TQ_PROPERTY( bool javaEnabled READ javaEnabled WRITE setJavaEnabled ) @@ -235,26 +235,26 @@ public: enum GUIProfile { DefaultGUI, BrowserViewGUI /* ... */ }; /** - * Constructs a new KHTMLPart. + * Constructs a new TDEHTMLPart. * - * KHTML basically consists of two objects: The KHTMLPart itself, - * holding the document data (DOM document), and the KHTMLView, + * TDEHTML basically consists of two objects: The TDEHTMLPart itself, + * holding the document data (DOM document), and the TDEHTMLView, * derived from TQScrollView, in which the document content is * rendered in. You can specify two different parent objects for a - * KHTMLPart, one parent for the KHTMLPart document and on parent - * for the KHTMLView. If the second @p parent argument is 0L, then + * TDEHTMLPart, one parent for the TDEHTMLPart document and on parent + * for the TDEHTMLView. If the second @p parent argument is 0L, then * @p parentWidget is used as parent for both objects, the part and * the view. */ - KHTMLPart( TQWidget *parentWidget = 0, const char *widgetname = 0, + TDEHTMLPart( TQWidget *parentWidget = 0, const char *widgetname = 0, TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); - KHTMLPart( KHTMLView *view, TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); + TDEHTMLPart( TDEHTMLView *view, TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); /** * Destructor. */ - virtual ~KHTMLPart(); + virtual ~TDEHTMLPart(); /** * Opens the specified URL @p url. @@ -307,7 +307,7 @@ public: /** * Returns a pointer to the HTML document's view. */ - KHTMLView *view() const; + TDEHTMLView *view() const; /** * Enable/disable Javascript support. Note that this will @@ -440,7 +440,7 @@ public: * Security option. * * Specify whether only file:/ or data:/ urls are allowed to be loaded without - * user confirmation by KHTML. + * user confirmation by TDEHTML. * ( for example referenced by stylesheets, images, scripts, subdocuments, embedded elements ). * * This option is mainly intended for enabling the "mail reader mode", where you load untrusted @@ -605,7 +605,7 @@ public: // void print(TQPainter *, int pageHeight, int pageWidth); /** - * Paints the HTML page to a TQPainter. See KHTMLView::paint for details + * Paints the HTML page to a TQPainter. See TDEHTMLView::paint for details */ void paint( TQPainter *, const TQRect &, int = 0, bool * = 0 ); @@ -845,7 +845,7 @@ public: KParts::PartManager *partManager(); /** - * Saves the KHTMLPart's complete state (including child frame + * Saves the TDEHTMLPart's complete state (including child frame * objects) to the provided TQDataStream. * * This is called from the saveState() method of the @@ -853,7 +853,7 @@ public: */ virtual void saveState( TQDataStream &stream ); /** - * Restores the KHTMLPart's previously saved state (including + * Restores the TDEHTMLPart's previously saved state (including * child frame objects) from the provided TQDataStream. * * @see saveState() @@ -884,15 +884,15 @@ public: /** * @internal */ - const KHTMLSettings *settings() const; + const TDEHTMLSettings *settings() const; /** - * Returns a pointer to the parent KHTMLPart if the part is a frame + * Returns a pointer to the parent TDEHTMLPart if the part is a frame * in an HTML frameset. * * Returns 0L otherwise. */ - KHTMLPart *parentPart(); + TDEHTMLPart *parentPart(); /** * Returns a list of names of all frame (including iframe) objects of @@ -906,7 +906,7 @@ public: /** * Finds a frame by name. Returns 0L if frame can't be found. */ - KHTMLPart *findFrame( const TQString &f ); + TDEHTMLPart *findFrame( const TQString &f ); /** * Recursively finds the part containing the frame with name @p f @@ -916,7 +916,7 @@ public: * frame info in @p *childFrame * @since 3.3 */ - KHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame=0 ); + TDEHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame=0 ); /** * Return the current frame (the one that has focus) @@ -1046,7 +1046,7 @@ public: * Shows or hides the suppressed popup indicator * @since 3.5 */ - void setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart ); + void setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originPart ); /** * @internal @@ -1553,7 +1553,7 @@ private: void resetFromScript(); void emitSelectionChanged(); // Returns whether callingHtmlPart may access this part - bool checkFrameAccess(KHTMLPart *callingHtmlPart); + bool checkFrameAccess(TDEHTMLPart *callingHtmlPart); bool openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs ); bool urlSelectedIntern( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args = KParts::URLArgs()); @@ -1588,7 +1588,7 @@ private: void popupMenu( const TQString &url ); - void init( KHTMLView *view, GUIProfile prof ); + void init( TDEHTMLView *view, GUIProfile prof ); void clear(); @@ -1621,16 +1621,16 @@ private: DOM::DocumentImpl *xmlDocImpl() const; tdehtml::ChildFrame *frame( const TQObject *obj ); - tdehtml::ChildFrame *recursiveFrameRequest( KHTMLPart *callingHtmlPart, const KURL &url, const KParts::URLArgs &args, bool callParent = true ); + tdehtml::ChildFrame *recursiveFrameRequest( TDEHTMLPart *callingHtmlPart, const KURL &url, const KParts::URLArgs &args, bool callParent = true ); bool checkLinkSecurity( const KURL &linkURL,const TQString &message = TQString::null, const TQString &button = TQString::null ); TQVariant executeScript( const TQString& filename, int baseLine, const DOM::Node &n, const TQString& script ); KJSProxy *jScript(); - KHTMLPart *opener(); + TDEHTMLPart *opener(); long cacheId() const; - void setOpener( KHTMLPart *_opener ); + void setOpener( TDEHTMLPart *_opener ); bool openedByJS(); void setOpenedByJS( bool _openedByJS ); @@ -1675,8 +1675,8 @@ private: void runAdFilter(); - KHTMLPartPrivate *d; - friend class KHTMLPartPrivate; + TDEHTMLPartPrivate *d; + friend class TDEHTMLPartPrivate; }; diff --git a/tdehtml/tdehtml_printsettings.cpp b/tdehtml/tdehtml_printsettings.cpp index 41b87244a..251c3403f 100644 --- a/tdehtml/tdehtml_printsettings.cpp +++ b/tdehtml/tdehtml_printsettings.cpp @@ -24,7 +24,7 @@ #include #include -KHTMLPrintSettings::KHTMLPrintSettings(TQWidget *parent, const char *name) +TDEHTMLPrintSettings::TDEHTMLPrintSettings(TQWidget *parent, const char *name) : KPrintDialogPage(parent, name) { //WhatsThis strings.... (added by pfeifle@kde.org) @@ -87,18 +87,18 @@ KHTMLPrintSettings::KHTMLPrintSettings(TQWidget *parent, const char *name) l0->addStretch(1); } -KHTMLPrintSettings::~KHTMLPrintSettings() +TDEHTMLPrintSettings::~TDEHTMLPrintSettings() { } -void KHTMLPrintSettings::getOptions(TQMap& opts, bool /*incldef*/) +void TDEHTMLPrintSettings::getOptions(TQMap& opts, bool /*incldef*/) { opts["app-tdehtml-printfriendly"] = (m_printfriendly->isChecked() ? "true" : "false"); opts["app-tdehtml-printimages"] = (m_printimages->isChecked() ? "true" : "false"); opts["app-tdehtml-printheader"] = (m_printheader->isChecked() ? "true" : "false"); } -void KHTMLPrintSettings::setOptions(const TQMap& opts) +void TDEHTMLPrintSettings::setOptions(const TQMap& opts) { m_printfriendly->setChecked(opts["app-tdehtml-printfriendly"] != "false"); m_printimages->setChecked(opts["app-tdehtml-printimages"] != "false"); diff --git a/tdehtml/tdehtml_printsettings.h b/tdehtml/tdehtml_printsettings.h index 9f69d9b88..2a92d0e3c 100644 --- a/tdehtml/tdehtml_printsettings.h +++ b/tdehtml/tdehtml_printsettings.h @@ -17,19 +17,19 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef KHTML_PRINTSETTINGS_H -#define KHTML_PRINTSETTINGS_H +#ifndef TDEHTML_PRINTSETTINGS_H +#define TDEHTML_PRINTSETTINGS_H #include class TQCheckBox; -class KHTMLPrintSettings : public KPrintDialogPage +class TDEHTMLPrintSettings : public KPrintDialogPage { Q_OBJECT public: - KHTMLPrintSettings(TQWidget *parent = 0, const char *name = 0); - ~KHTMLPrintSettings(); + TDEHTMLPrintSettings(TQWidget *parent = 0, const char *name = 0); + ~TDEHTMLPrintSettings(); void getOptions(TQMap& opts, bool incldef = false); void setOptions(const TQMap& opts); diff --git a/tdehtml/tdehtml_run.cpp b/tdehtml/tdehtml_run.cpp index 6ae958d67..2a5fd1861 100644 --- a/tdehtml/tdehtml_run.cpp +++ b/tdehtml/tdehtml_run.cpp @@ -28,7 +28,7 @@ #include "tdehtml_ext.h" #include -KHTMLRun::KHTMLRun( KHTMLPart *part, tdehtml::ChildFrame *child, const KURL &url, +TDEHTMLRun::TDEHTMLRun( TDEHTMLPart *part, tdehtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &args, bool hideErrorDialog ) : KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->topLevelWidget() : 0, false, false, hideErrorDialog ), @@ -41,14 +41,14 @@ KHTMLRun::KHTMLRun( KHTMLPart *part, tdehtml::ChildFrame *child, const KURL &url part->started(0L); } -//KHTMLPart *KHTMLRun::htmlPart() const -//{ return static_cast(m_part); } +//TDEHTMLPart *TDEHTMLRun::htmlPart() const +//{ return static_cast(m_part); } -void KHTMLRun::foundMimeType( const TQString &_type ) +void TDEHTMLRun::foundMimeType( const TQString &_type ) { Q_ASSERT(!m_bFinished); TQString mimeType = _type; // this ref comes from the job, we lose it when using KIO again - if ( static_cast(m_part)->processObjectRequest( m_child, m_strURL, mimeType ) ) + if ( static_cast(m_part)->processObjectRequest( m_child, m_strURL, mimeType ) ) m_bFinished = true; else { if ( m_bFinished ) // abort was called (this happens with the activex fallback for instance) @@ -60,7 +60,7 @@ void KHTMLRun::foundMimeType( const TQString &_type ) m_bFinished = ( res == KParts::BrowserRun::Handled ); if ( m_bFinished ) { // saved or canceled -> flag completed m_child->m_bCompleted = true; - static_cast(m_part)->checkCompleted(); + static_cast(m_part)->checkCompleted(); } } @@ -70,21 +70,21 @@ void KHTMLRun::foundMimeType( const TQString &_type ) return; } - //kdDebug(6050) << "KHTMLRun::foundMimeType " << _type << " couldn't open" << endl; + //kdDebug(6050) << "TDEHTMLRun::foundMimeType " << _type << " couldn't open" << endl; KRun::foundMimeType( mimeType ); // "open" is finished -> flag completed m_child->m_bCompleted = true; - static_cast(m_part)->checkCompleted(); + static_cast(m_part)->checkCompleted(); } -void KHTMLRun::save( const KURL & url, const TQString & suggestedFilename ) +void TDEHTMLRun::save( const KURL & url, const TQString & suggestedFilename ) { - KHTMLPopupGUIClient::saveURL( m_part->widget(), i18n( "Save As" ), url, m_args.metaData(), TQString::null, 0, suggestedFilename ); + TDEHTMLPopupGUIClient::saveURL( m_part->widget(), i18n( "Save As" ), url, m_args.metaData(), TQString::null, 0, suggestedFilename ); } // KDE4: remove -void KHTMLRun::handleError( TDEIO::Job *job ) +void TDEHTMLRun::handleError( TDEIO::Job *job ) { KParts::BrowserRun::handleError( job ); } diff --git a/tdehtml/tdehtml_run.h b/tdehtml/tdehtml_run.h index e549f9b2d..401bc7fd6 100644 --- a/tdehtml/tdehtml_run.h +++ b/tdehtml/tdehtml_run.h @@ -28,23 +28,23 @@ #include #include -class KHTMLPart; +class TDEHTMLPart; namespace tdehtml { class ChildFrame; } -class KHTMLRun : public KParts::BrowserRun +class TDEHTMLRun : public KParts::BrowserRun { Q_OBJECT public: - KHTMLRun( KHTMLPart *part, tdehtml::ChildFrame *child, const KURL &url, + TDEHTMLRun( TDEHTMLPart *part, tdehtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &args, bool hideErrorDialog ); virtual void foundMimeType( const TQString &mimetype ); - //KHTMLPart *htmlPart() const; + //TDEHTMLPart *htmlPart() const; protected: virtual void handleError( TDEIO::Job * job ); diff --git a/tdehtml/tdehtml_settings.cc b/tdehtml/tdehtml_settings.cc index 5675b2105..8e36f5891 100644 --- a/tdehtml/tdehtml_settings.cc +++ b/tdehtml/tdehtml_settings.cc @@ -39,11 +39,11 @@ struct KPerDomainSettings { bool m_bEnableJavaScript : 1; bool m_bEnablePlugins : 1; // don't forget to maintain the bitfields as the enums grow - KHTMLSettings::KJSWindowOpenPolicy m_windowOpenPolicy : 2; - KHTMLSettings::KJSWindowStatusPolicy m_windowStatusPolicy : 1; - KHTMLSettings::KJSWindowFocusPolicy m_windowFocusPolicy : 1; - KHTMLSettings::KJSWindowMovePolicy m_windowMovePolicy : 1; - KHTMLSettings::KJSWindowResizePolicy m_windowResizePolicy : 1; + TDEHTMLSettings::KJSWindowOpenPolicy m_windowOpenPolicy : 2; + TDEHTMLSettings::KJSWindowStatusPolicy m_windowStatusPolicy : 1; + TDEHTMLSettings::KJSWindowFocusPolicy m_windowFocusPolicy : 1; + TDEHTMLSettings::KJSWindowMovePolicy m_windowMovePolicy : 1; + TDEHTMLSettings::KJSWindowResizePolicy m_windowResizePolicy : 1; #ifdef DEBUG_SETTINGS void dump(const TQString &infix = TQString::null) const { @@ -62,7 +62,7 @@ struct KPerDomainSettings { typedef TQMap PolicyMap; -class KHTMLSettingsPrivate +class TDEHTMLSettingsPrivate { public: bool m_bChangeCursor : 1; @@ -92,7 +92,7 @@ public: int m_fontSize; int m_minFontSize; int m_maxFormCompletionItems; - KHTMLSettings::KAnimationAdvice m_showAnimations; + TDEHTMLSettings::KAnimationAdvice m_showAnimations; TQString m_encoding; TQString m_userSheet; @@ -115,7 +115,7 @@ public: * or a deep copy of the global settings if not existent. */ static KPerDomainSettings &setup_per_domain_policy( - KHTMLSettingsPrivate *d, + TDEHTMLSettingsPrivate *d, const TQString &domain) { if (domain.isEmpty()) { kdWarning() << "setup_per_domain_policy: domain is empty" << endl; @@ -131,7 +131,7 @@ static KPerDomainSettings &setup_per_domain_policy( } -KHTMLSettings::KJavaScriptAdvice KHTMLSettings::strToAdvice(const TQString& _str) +TDEHTMLSettings::KJavaScriptAdvice TDEHTMLSettings::strToAdvice(const TQString& _str) { KJavaScriptAdvice ret = KJavaScriptDunno; @@ -146,7 +146,7 @@ KHTMLSettings::KJavaScriptAdvice KHTMLSettings::strToAdvice(const TQString& _str return ret; } -const char* KHTMLSettings::adviceToStr(KJavaScriptAdvice _advice) +const char* TDEHTMLSettings::adviceToStr(KJavaScriptAdvice _advice) { switch( _advice ) { case KJavaScriptAccept: return I18N_NOOP("Accept"); @@ -157,7 +157,7 @@ const char* KHTMLSettings::adviceToStr(KJavaScriptAdvice _advice) } -void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domain, +void TDEHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domain, KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice& javaScriptAdvice) { TQString tmp(configStr); @@ -186,7 +186,7 @@ void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domai } } -void KHTMLSettings::readDomainSettings(TDEConfig *config, bool reset, +void TDEHTMLSettings::readDomainSettings(TDEConfig *config, bool reset, bool global, KPerDomainSettings &pd_settings) { TQString jsPrefix = global ? TQString::null : TQString::fromLatin1("javascript."); @@ -255,39 +255,39 @@ void KHTMLSettings::readDomainSettings(TDEConfig *config, bool reset, } -KHTMLSettings::KHTMLSettings() +TDEHTMLSettings::TDEHTMLSettings() { - d = new KHTMLSettingsPrivate(); + d = new TDEHTMLSettingsPrivate(); init(); } -KHTMLSettings::KHTMLSettings(const KHTMLSettings &other) +TDEHTMLSettings::TDEHTMLSettings(const TDEHTMLSettings &other) { - d = new KHTMLSettingsPrivate(); + d = new TDEHTMLSettingsPrivate(); *d = *other.d; } -KHTMLSettings::~KHTMLSettings() +TDEHTMLSettings::~TDEHTMLSettings() { delete d; } -bool KHTMLSettings::changeCursor() const +bool TDEHTMLSettings::changeCursor() const { return d->m_bChangeCursor; } -bool KHTMLSettings::underlineLink() const +bool TDEHTMLSettings::underlineLink() const { return d->m_underlineLink; } -bool KHTMLSettings::hoverLink() const +bool TDEHTMLSettings::hoverLink() const { return d->m_hoverLink; } -void KHTMLSettings::init() +void TDEHTMLSettings::init() { TDEConfig global( "tdehtmlrc", true, false ); init( &global, true ); @@ -299,7 +299,7 @@ void KHTMLSettings::init() init( local, false ); } -void KHTMLSettings::init( TDEConfig * config, bool reset ) +void TDEHTMLSettings::init( TDEConfig * config, bool reset ) { TQString group_save = config->group(); if (reset || config->hasGroup("MainView Settings")) @@ -640,7 +640,7 @@ void KHTMLSettings::init( TDEConfig * config, bool reset ) * In case of doubt, the global domain is returned. */ static const KPerDomainSettings &lookup_hostname_policy( - const KHTMLSettingsPrivate *d, + const TDEHTMLSettingsPrivate *d, const TQString& hostname) { #ifdef DEBUG_SETTINGS @@ -693,32 +693,32 @@ static const KPerDomainSettings &lookup_hostname_policy( return d->global; } -bool KHTMLSettings::isOpenMiddleClickEnabled() +bool TDEHTMLSettings::isOpenMiddleClickEnabled() { return d->m_bOpenMiddleClick; } -bool KHTMLSettings::isBackRightClickEnabled() +bool TDEHTMLSettings::isBackRightClickEnabled() { return d->m_bBackRightClick; } -bool KHTMLSettings::accessKeysEnabled() const +bool TDEHTMLSettings::accessKeysEnabled() const { return d->m_accessKeysEnabled; } -bool KHTMLSettings::isAdFilterEnabled() const +bool TDEHTMLSettings::isAdFilterEnabled() const { return d->m_adFilterEnabled; } -bool KHTMLSettings::isHideAdsEnabled() const +bool TDEHTMLSettings::isHideAdsEnabled() const { return d->m_hideAdsEnabled; } -bool KHTMLSettings::isAdFiltered( const TQString &url ) const +bool TDEHTMLSettings::isAdFiltered( const TQString &url ) const { if (d->m_adFilterEnabled) { @@ -739,7 +739,7 @@ bool KHTMLSettings::isAdFiltered( const TQString &url ) const return false; } -void KHTMLSettings::addAdFilter( const TQString &url ) +void TDEHTMLSettings::addAdFilter( const TQString &url ) { TDEConfig config( "tdehtmlrc", false, false ); config.setGroup( "Filter Settings" ); @@ -780,69 +780,69 @@ void KHTMLSettings::addAdFilter( const TQString &url ) } } -bool KHTMLSettings::isJavaEnabled( const TQString& hostname ) +bool TDEHTMLSettings::isJavaEnabled( const TQString& hostname ) { return lookup_hostname_policy(d,hostname.lower()).m_bEnableJava; } -bool KHTMLSettings::isJavaScriptEnabled( const TQString& hostname ) +bool TDEHTMLSettings::isJavaScriptEnabled( const TQString& hostname ) { return lookup_hostname_policy(d,hostname.lower()).m_bEnableJavaScript; } -bool KHTMLSettings::isJavaScriptDebugEnabled( const TQString& /*hostname*/ ) +bool TDEHTMLSettings::isJavaScriptDebugEnabled( const TQString& /*hostname*/ ) { // debug setting is global for now, but could change in the future return d->m_bEnableJavaScriptDebug; } -bool KHTMLSettings::isJavaScriptErrorReportingEnabled( const TQString& /*hostname*/ ) const +bool TDEHTMLSettings::isJavaScriptErrorReportingEnabled( const TQString& /*hostname*/ ) const { // error reporting setting is global for now, but could change in the future return d->m_bEnableJavaScriptErrorReporting; } -bool KHTMLSettings::isPluginsEnabled( const TQString& hostname ) +bool TDEHTMLSettings::isPluginsEnabled( const TQString& hostname ) { return lookup_hostname_policy(d,hostname.lower()).m_bEnablePlugins; } -KHTMLSettings::KJSWindowOpenPolicy KHTMLSettings::windowOpenPolicy( +TDEHTMLSettings::KJSWindowOpenPolicy TDEHTMLSettings::windowOpenPolicy( const TQString& hostname) const { return lookup_hostname_policy(d,hostname.lower()).m_windowOpenPolicy; } -KHTMLSettings::KJSWindowMovePolicy KHTMLSettings::windowMovePolicy( +TDEHTMLSettings::KJSWindowMovePolicy TDEHTMLSettings::windowMovePolicy( const TQString& hostname) const { return lookup_hostname_policy(d,hostname.lower()).m_windowMovePolicy; } -KHTMLSettings::KJSWindowResizePolicy KHTMLSettings::windowResizePolicy( +TDEHTMLSettings::KJSWindowResizePolicy TDEHTMLSettings::windowResizePolicy( const TQString& hostname) const { return lookup_hostname_policy(d,hostname.lower()).m_windowResizePolicy; } -KHTMLSettings::KJSWindowStatusPolicy KHTMLSettings::windowStatusPolicy( +TDEHTMLSettings::KJSWindowStatusPolicy TDEHTMLSettings::windowStatusPolicy( const TQString& hostname) const { return lookup_hostname_policy(d,hostname.lower()).m_windowStatusPolicy; } -KHTMLSettings::KJSWindowFocusPolicy KHTMLSettings::windowFocusPolicy( +TDEHTMLSettings::KJSWindowFocusPolicy TDEHTMLSettings::windowFocusPolicy( const TQString& hostname) const { return lookup_hostname_policy(d,hostname.lower()).m_windowFocusPolicy; } -int KHTMLSettings::mediumFontSize() const +int TDEHTMLSettings::mediumFontSize() const { return d->m_fontSize; } -int KHTMLSettings::minFontSize() const +int TDEHTMLSettings::minFontSize() const { return d->m_minFontSize; } -TQString KHTMLSettings::settingsToCSS() const +TQString TDEHTMLSettings::settingsToCSS() const { // lets start with the link properties TQString str = "a:link {\ncolor: "; @@ -873,7 +873,7 @@ TQString KHTMLSettings::settingsToCSS() const return str; } -const TQString &KHTMLSettings::availableFamilies() +const TQString &TDEHTMLSettings::availableFamilies() { if ( !avFamilies ) { avFamilies = new TQString; @@ -899,7 +899,7 @@ const TQString &KHTMLSettings::availableFamilies() return *avFamilies; } -TQString KHTMLSettings::lookupFont(int i) const +TQString TDEHTMLSettings::lookupFont(int i) const { TQString font; if (d->fonts.count() > (uint) i) @@ -909,121 +909,121 @@ TQString KHTMLSettings::lookupFont(int i) const return font; } -TQString KHTMLSettings::stdFontName() const +TQString TDEHTMLSettings::stdFontName() const { return lookupFont(0); } -TQString KHTMLSettings::fixedFontName() const +TQString TDEHTMLSettings::fixedFontName() const { return lookupFont(1); } -TQString KHTMLSettings::serifFontName() const +TQString TDEHTMLSettings::serifFontName() const { return lookupFont(2); } -TQString KHTMLSettings::sansSerifFontName() const +TQString TDEHTMLSettings::sansSerifFontName() const { return lookupFont(3); } -TQString KHTMLSettings::cursiveFontName() const +TQString TDEHTMLSettings::cursiveFontName() const { return lookupFont(4); } -TQString KHTMLSettings::fantasyFontName() const +TQString TDEHTMLSettings::fantasyFontName() const { return lookupFont(5); } -void KHTMLSettings::setStdFontName(const TQString &n) +void TDEHTMLSettings::setStdFontName(const TQString &n) { while(d->fonts.count() <= 0) d->fonts.append(TQString::null); d->fonts[0] = n; } -void KHTMLSettings::setFixedFontName(const TQString &n) +void TDEHTMLSettings::setFixedFontName(const TQString &n) { while(d->fonts.count() <= 1) d->fonts.append(TQString::null); d->fonts[1] = n; } -TQString KHTMLSettings::userStyleSheet() const +TQString TDEHTMLSettings::userStyleSheet() const { return d->m_userSheet; } -bool KHTMLSettings::isFormCompletionEnabled() const +bool TDEHTMLSettings::isFormCompletionEnabled() const { return d->m_formCompletionEnabled; } -int KHTMLSettings::maxFormCompletionItems() const +int TDEHTMLSettings::maxFormCompletionItems() const { return d->m_maxFormCompletionItems; } -const TQString &KHTMLSettings::encoding() const +const TQString &TDEHTMLSettings::encoding() const { return d->m_encoding; } -bool KHTMLSettings::followSystemColors() const +bool TDEHTMLSettings::followSystemColors() const { return d->m_follow_system_colors; } -const TQColor& KHTMLSettings::textColor() const +const TQColor& TDEHTMLSettings::textColor() const { return d->m_textColor; } -const TQColor& KHTMLSettings::baseColor() const +const TQColor& TDEHTMLSettings::baseColor() const { return d->m_baseColor; } -const TQColor& KHTMLSettings::linkColor() const +const TQColor& TDEHTMLSettings::linkColor() const { return d->m_linkColor; } -const TQColor& KHTMLSettings::vLinkColor() const +const TQColor& TDEHTMLSettings::vLinkColor() const { return d->m_vLinkColor; } -bool KHTMLSettings::autoLoadImages() const +bool TDEHTMLSettings::autoLoadImages() const { return d->m_bAutoLoadImages; } -bool KHTMLSettings::unfinishedImageFrame() const +bool TDEHTMLSettings::unfinishedImageFrame() const { return d->m_bUnfinishedImageFrame; } -KHTMLSettings::KAnimationAdvice KHTMLSettings::showAnimations() const +TDEHTMLSettings::KAnimationAdvice TDEHTMLSettings::showAnimations() const { return d->m_showAnimations; } -bool KHTMLSettings::isAutoDelayedActionsEnabled() const +bool TDEHTMLSettings::isAutoDelayedActionsEnabled() const { return d->m_autoDelayedActionsEnabled; } -bool KHTMLSettings::jsErrorsEnabled() const +bool TDEHTMLSettings::jsErrorsEnabled() const { return d->m_jsErrorsEnabled; } -void KHTMLSettings::setJSErrorsEnabled(bool enabled) +void TDEHTMLSettings::setJSErrorsEnabled(bool enabled) { d->m_jsErrorsEnabled = enabled; // save it @@ -1033,22 +1033,22 @@ void KHTMLSettings::setJSErrorsEnabled(bool enabled) config->sync(); } -bool KHTMLSettings::allowTabulation() const +bool TDEHTMLSettings::allowTabulation() const { return d->m_allowTabulation; } -bool KHTMLSettings::autoSpellCheck() const +bool TDEHTMLSettings::autoSpellCheck() const { return d->m_autoSpellCheck; } -TQValueList< TQPair< TQString, TQChar > > KHTMLSettings::fallbackAccessKeysAssignments() const +TQValueList< TQPair< TQString, TQChar > > TDEHTMLSettings::fallbackAccessKeysAssignments() const { return d->m_fallbackAccessKeysAssignments; } -void KHTMLSettings::setJSPopupBlockerPassivePopup(bool enabled) +void TDEHTMLSettings::setJSPopupBlockerPassivePopup(bool enabled) { d->m_jsPopupBlockerPassivePopup = enabled; // save it @@ -1058,7 +1058,7 @@ void KHTMLSettings::setJSPopupBlockerPassivePopup(bool enabled) config->sync(); } -bool KHTMLSettings::jsPopupBlockerPassivePopup() const +bool TDEHTMLSettings::jsPopupBlockerPassivePopup() const { return d->m_jsPopupBlockerPassivePopup; } diff --git a/tdehtml/tdehtml_settings.h b/tdehtml/tdehtml_settings.h index 4d68845f7..c2dd2684c 100644 --- a/tdehtml/tdehtml_settings.h +++ b/tdehtml/tdehtml_settings.h @@ -30,12 +30,12 @@ class TDEConfig; #include struct KPerDomainSettings; -class KHTMLSettingsPrivate; +class TDEHTMLSettingsPrivate; /** * Settings for the HTML view. */ -class KHTML_EXPORT KHTMLSettings +class TDEHTML_EXPORT TDEHTMLSettings { public: @@ -99,8 +99,8 @@ public: /** * @internal Constructor */ - KHTMLSettings(); - KHTMLSettings(const KHTMLSettings &other); + TDEHTMLSettings(); + TDEHTMLSettings(const TDEHTMLSettings &other); /** * Called by constructor and reparseConfiguration @@ -117,7 +117,7 @@ public: /** * Destructor. Don't delete any instance by yourself. */ - virtual ~KHTMLSettings(); + virtual ~TDEHTMLSettings(); // Behavior settings bool changeCursor() const; @@ -135,7 +135,7 @@ public: TQString cursiveFontName() const; TQString fantasyFontName() const; - // these two can be set. Mainly for historical reasons (the method in KHTMLPart exists...) + // these two can be set. Mainly for historical reasons (the method in TDEHTMLPart exists...) void setStdFontName(const TQString &n); void setFixedFontName(const TQString &n); @@ -222,10 +222,10 @@ public: bool jsPopupBlockerPassivePopup() const; private: - friend class KHTMLFactory; + friend class TDEHTMLFactory; TQString lookupFont(int i) const; - KHTMLSettingsPrivate *d; + TDEHTMLSettingsPrivate *d; static TQString *avFamilies; }; diff --git a/tdehtml/tdehtmlimage.cpp b/tdehtml/tdehtmlimage.cpp index a2b73db5c..021f95149 100644 --- a/tdehtml/tdehtmlimage.cpp +++ b/tdehtml/tdehtmlimage.cpp @@ -34,40 +34,40 @@ #include #include -K_EXPORT_COMPONENT_FACTORY( tdehtmlimagefactory /*NOT the part name, see Makefile.am*/, KHTMLImageFactory ) +K_EXPORT_COMPONENT_FACTORY( tdehtmlimagefactory /*NOT the part name, see Makefile.am*/, TDEHTMLImageFactory ) -TDEInstance *KHTMLImageFactory::s_instance = 0; +TDEInstance *TDEHTMLImageFactory::s_instance = 0; -KHTMLImageFactory::KHTMLImageFactory() +TDEHTMLImageFactory::TDEHTMLImageFactory() { s_instance = new TDEInstance( "tdehtmlimage" ); } -KHTMLImageFactory::~KHTMLImageFactory() +TDEHTMLImageFactory::~TDEHTMLImageFactory() { delete s_instance; } -KParts::Part *KHTMLImageFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, +KParts::Part *TDEHTMLImageFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList & ) { - KHTMLPart::GUIProfile prof = KHTMLPart::DefaultGUI; + TDEHTMLPart::GUIProfile prof = TDEHTMLPart::DefaultGUI; if ( strcmp( className, "Browser/View" ) == 0 ) - prof = KHTMLPart::BrowserViewGUI; - return new KHTMLImage( parentWidget, widgetName, parent, name, prof ); + prof = TDEHTMLPart::BrowserViewGUI; + return new TDEHTMLImage( parentWidget, widgetName, parent, name, prof ); } -KHTMLImage::KHTMLImage( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, KHTMLPart::GUIProfile prof ) +TDEHTMLImage::TDEHTMLImage( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, TDEHTMLPart::GUIProfile prof ) : KParts::ReadOnlyPart( parent, name ), m_image( 0 ) { - KHTMLPart* parentPart = ::tqqt_cast( parent ); - setInstance( KHTMLImageFactory::instance(), prof == KHTMLPart::BrowserViewGUI && !parentPart ); + TDEHTMLPart* parentPart = ::tqqt_cast( parent ); + setInstance( TDEHTMLImageFactory::instance(), prof == TDEHTMLPart::BrowserViewGUI && !parentPart ); TQVBox *box = new TQVBox( parentWidget, widgetName ); - m_tdehtml = new KHTMLPart( box, widgetName, this, "htmlimagepart", prof ); + m_tdehtml = new TDEHTMLPart( box, widgetName, this, "htmlimagepart", prof ); m_tdehtml->setAutoloadImages( true ); m_tdehtml->widget()->installEventFilter(this); connect( m_tdehtml->view(), TQT_SIGNAL( finishedLayout() ), this, TQT_SLOT( restoreScrollPosition() ) ); @@ -77,7 +77,7 @@ KHTMLImage::KHTMLImage( TQWidget *parentWidget, const char *widgetName, // VBox can't take focus, so pass it on to sub-widget box->setFocusProxy( m_tdehtml->widget() ); - m_ext = new KHTMLImageBrowserExtension( this, "be" ); + m_ext = new TDEHTMLImageBrowserExtension( this, "be" ); // Remove unnecessary actions. KAction *encodingAction = actionCollection()->action( "setEncoding" ); @@ -103,7 +103,7 @@ KHTMLImage::KHTMLImage( TQWidget *parentWidget, const char *widgetName, // forward important signals from the tdehtml part // forward opening requests to parent frame (if existing) - KHTMLPart *p = ::tqqt_cast(parent); + TDEHTMLPart *p = ::tqqt_cast(parent); KParts::BrowserExtension *be = p ? p->browserExtension() : m_ext; connect(m_tdehtml->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)), be, TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &))); @@ -118,7 +118,7 @@ KHTMLImage::KHTMLImage( TQWidget *parentWidget, const char *widgetName, m_ext->setURLDropHandlingEnabled( true ); } -KHTMLImage::~KHTMLImage() +TDEHTMLImage::~TDEHTMLImage() { disposeImage(); @@ -130,10 +130,10 @@ KHTMLImage::~KHTMLImage() // when we're in a html frameset and the view dies first, then it will also // kill the htmlpart if ( m_tdehtml ) - delete static_cast( m_tdehtml ); + delete static_cast( m_tdehtml ); } -bool KHTMLImage::openURL( const KURL &url ) +bool TDEHTMLImage::openURL( const KURL &url ) { static const TQString &html = TDEGlobal::staticQString( "" ); @@ -175,14 +175,14 @@ bool KHTMLImage::openURL( const KURL &url ) return true; } -bool KHTMLImage::closeURL() +bool TDEHTMLImage::closeURL() { disposeImage(); return m_tdehtml->closeURL(); } // This can happen after openURL returns, or directly from m_image->ref() -void KHTMLImage::notifyFinished( tdehtml::CachedObject *o ) +void TDEHTMLImage::notifyFinished( tdehtml::CachedObject *o ) { if ( !m_image || o != m_image ) return; @@ -214,14 +214,14 @@ void KHTMLImage::notifyFinished( tdehtml::CachedObject *o ) emit setStatusBarText(i18n("Done.")); } -void KHTMLImage::restoreScrollPosition() +void TDEHTMLImage::restoreScrollPosition() { if ( m_tdehtml->view()->contentsY() == 0 ) { m_tdehtml->view()->setContentsPos( m_xOffset, m_yOffset ); } } -void KHTMLImage::guiActivateEvent( KParts::GUIActivateEvent *e ) +void TDEHTMLImage::guiActivateEvent( KParts::GUIActivateEvent *e ) { // prevent the base implementation from emitting setWindowCaption with // our url. It destroys our pretty, previously caption. Konq saves/restores @@ -232,7 +232,7 @@ void KHTMLImage::guiActivateEvent( KParts::GUIActivateEvent *e ) } /* -void KHTMLImage::slotImageJobFinished( TDEIO::Job *job ) +void TDEHTMLImage::slotImageJobFinished( TDEIO::Job *job ) { if ( job->error() ) { @@ -246,7 +246,7 @@ void KHTMLImage::slotImageJobFinished( TDEIO::Job *job ) } } -void KHTMLImage::updateWindowCaption() +void TDEHTMLImage::updateWindowCaption() { if ( !m_tdehtml ) return; @@ -287,7 +287,7 @@ void KHTMLImage::updateWindowCaption() } */ -void KHTMLImage::disposeImage() +void TDEHTMLImage::disposeImage() { if ( !m_image ) return; @@ -296,7 +296,7 @@ void KHTMLImage::disposeImage() m_image = 0; } -bool KHTMLImage::eventFilter(TQObject *, TQEvent *e) { +bool TDEHTMLImage::eventFilter(TQObject *, TQEvent *e) { switch (e->type()) { case TQEvent::DragEnter: case TQEvent::DragMove: @@ -304,7 +304,7 @@ bool KHTMLImage::eventFilter(TQObject *, TQEvent *e) { case TQEvent::Drop: { // find out if this part is embedded in a frame, and send the // event to its outside widget - KHTMLPart *p = ::tqqt_cast(parent()); + TDEHTMLPart *p = ::tqqt_cast(parent()); if (p) return TQApplication::sendEvent(p->widget(), e); // otherwise simply forward all dnd events to the part widget, @@ -316,37 +316,37 @@ bool KHTMLImage::eventFilter(TQObject *, TQEvent *e) { return false; } -KHTMLImageBrowserExtension::KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name ) +TDEHTMLImageBrowserExtension::TDEHTMLImageBrowserExtension( TDEHTMLImage *parent, const char *name ) : KParts::BrowserExtension( parent, name ) { m_imgPart = parent; } -int KHTMLImageBrowserExtension::xOffset() +int TDEHTMLImageBrowserExtension::xOffset() { return m_imgPart->doc()->view()->contentsX(); } -int KHTMLImageBrowserExtension::yOffset() +int TDEHTMLImageBrowserExtension::yOffset() { return m_imgPart->doc()->view()->contentsY(); } -void KHTMLImageBrowserExtension::print() +void TDEHTMLImageBrowserExtension::print() { - static_cast( m_imgPart->doc()->browserExtension() )->print(); + static_cast( m_imgPart->doc()->browserExtension() )->print(); } -void KHTMLImageBrowserExtension::reparseConfiguration() +void TDEHTMLImageBrowserExtension::reparseConfiguration() { - static_cast( m_imgPart->doc()->browserExtension() )->reparseConfiguration(); + static_cast( m_imgPart->doc()->browserExtension() )->reparseConfiguration(); m_imgPart->doc()->setAutoloadImages( true ); } -void KHTMLImageBrowserExtension::disableScrolling() +void TDEHTMLImageBrowserExtension::disableScrolling() { - static_cast( m_imgPart->doc()->browserExtension() )->disableScrolling(); + static_cast( m_imgPart->doc()->browserExtension() )->disableScrolling(); } using namespace KParts; diff --git a/tdehtml/tdehtmlimage.h b/tdehtml/tdehtmlimage.h index b8d2d86d4..8b8b5893b 100644 --- a/tdehtml/tdehtmlimage.h +++ b/tdehtml/tdehtmlimage.h @@ -26,7 +26,7 @@ #include "misc/loader_client.h" -class KHTMLPart; +class TDEHTMLPart; class TDEInstance; namespace tdehtml @@ -37,12 +37,12 @@ namespace tdehtml /** * @internal */ -class KHTMLImageFactory : public KParts::Factory +class TDEHTMLImageFactory : public KParts::Factory { Q_OBJECT public: - KHTMLImageFactory(); - virtual ~KHTMLImageFactory(); + TDEHTMLImageFactory(); + virtual ~TDEHTMLImageFactory(); virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, @@ -57,13 +57,13 @@ private: /** * @internal */ -class KHTMLImage : public KParts::ReadOnlyPart, public tdehtml::CachedObjectClient +class TDEHTMLImage : public KParts::ReadOnlyPart, public tdehtml::CachedObjectClient { Q_OBJECT public: - KHTMLImage( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, KHTMLPart::GUIProfile prof ); - virtual ~KHTMLImage(); + TDEHTMLImage( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, TDEHTMLPart::GUIProfile prof ); + virtual ~TDEHTMLImage(); virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO @@ -71,7 +71,7 @@ public: virtual bool closeURL(); - KHTMLPart *doc() const { return m_tdehtml; } + TDEHTMLPart *doc() const { return m_tdehtml; } virtual void notifyFinished( tdehtml::CachedObject *o ); @@ -88,7 +88,7 @@ private slots: private: void disposeImage(); - TQGuardedPtr m_tdehtml; + TQGuardedPtr m_tdehtml; KParts::BrowserExtension *m_ext; TQString m_mimeType; tdehtml::CachedImage *m_image; @@ -98,11 +98,11 @@ private: /** * @internal */ -class KHTMLImageBrowserExtension : public KParts::BrowserExtension +class TDEHTMLImageBrowserExtension : public KParts::BrowserExtension { Q_OBJECT public: - KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name = 0 ); + TDEHTMLImageBrowserExtension( TDEHTMLImage *parent, const char *name = 0 ); virtual int xOffset(); virtual int yOffset(); @@ -113,7 +113,7 @@ protected slots: void disableScrolling(); private: - KHTMLImage *m_imgPart; + TDEHTMLImage *m_imgPart; }; #endif diff --git a/tdehtml/tdehtmlpart_p.h b/tdehtml/tdehtmlpart_p.h index a18aa5cf8..c1e641cb9 100644 --- a/tdehtml/tdehtmlpart_p.h +++ b/tdehtml/tdehtmlpart_p.h @@ -33,7 +33,7 @@ #include #include #include -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET #include #endif @@ -103,7 +103,7 @@ namespace tdehtml bool m_bCompleted; TQString m_name; KParts::URLArgs m_args; - TQGuardedPtr m_run; + TQGuardedPtr m_run; bool m_bPreloaded; KURL m_workingURL; Type m_type; @@ -116,36 +116,36 @@ namespace tdehtml } -struct KHTMLFrameList : public TQValueList +struct TDEHTMLFrameList : public TQValueList { Iterator find( const TQString &name ) KDE_NO_EXPORT; }; -typedef KHTMLFrameList::ConstIterator ConstFrameIt; -typedef KHTMLFrameList::Iterator FrameIt; +typedef TDEHTMLFrameList::ConstIterator ConstFrameIt; +typedef TDEHTMLFrameList::Iterator FrameIt; static int tdehtml_part_dcop_counter = 0; -class KHTMLWalletQueue : public TQObject +class TDEHTMLWalletQueue : public TQObject { Q_OBJECT public: - KHTMLWalletQueue(TQObject *parent) : TQObject(parent) { -#ifndef KHTML_NO_WALLET + TDEHTMLWalletQueue(TQObject *parent) : TQObject(parent) { +#ifndef TDEHTML_NO_WALLET wallet = 0L; -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } - virtual ~KHTMLWalletQueue() { -#ifndef KHTML_NO_WALLET + virtual ~TDEHTMLWalletQueue() { +#ifndef TDEHTML_NO_WALLET delete wallet; wallet = 0L; -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET KWallet::Wallet *wallet; -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET typedef QPair > Caller; typedef TQValueList CallerList; CallerList callers; @@ -156,7 +156,7 @@ class KHTMLWalletQueue : public TQObject public slots: void walletOpened(bool success) { -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET if (!success) { delete wallet; wallet = 0L; @@ -179,16 +179,16 @@ class KHTMLWalletQueue : public TQObject callers.clear(); savers.clear(); wallet = 0L; // gave it away -#endif // KHTML_NO_WALLET +#endif // TDEHTML_NO_WALLET } }; -class KHTMLPartPrivate +class TDEHTMLPartPrivate { - KHTMLPartPrivate(const KHTMLPartPrivate & other); - KHTMLPartPrivate& operator=(const KHTMLPartPrivate&); + TDEHTMLPartPrivate(const TDEHTMLPartPrivate & other); + TDEHTMLPartPrivate& operator=(const TDEHTMLPartPrivate&); public: - KHTMLPartPrivate(TQObject* parent) + TDEHTMLPartPrivate(TQObject* parent) { m_doc = 0L; m_decoder = 0L; @@ -200,7 +200,7 @@ public: m_bLoadEventEmitted = true; m_cachePolicy = TDEIO::CC_Verify; m_manager = 0L; - m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings()); + m_settings = new TDEHTMLSettings(*TDEHTMLFactory::defaultHTMLSettings()); m_bClearing = false; m_bCleared = false; m_zoomFactor = 100; @@ -218,7 +218,7 @@ public: m_findDialog = 0; m_ssl_in_use = false; m_jsedlg = 0; - m_formNotification = KHTMLPart::NoNotification; + m_formNotification = TDEHTMLPart::NoNotification; #ifndef Q_WS_QWS m_javaContext = 0; @@ -252,9 +252,9 @@ public: m_autoDetectLanguage = tdehtml::Decoder::SemiautomaticDetection; // inherit settings from parent - if(parent && parent->inherits("KHTMLPart")) + if(parent && parent->inherits("TDEHTMLPart")) { - KHTMLPart* part = static_cast(parent); + TDEHTMLPart* part = static_cast(parent); if(part->d) { m_bJScriptForce = part->d->m_bJScriptForce; @@ -289,13 +289,13 @@ public: m_userStyleSheetLastModified = 0; m_wq = 0; } - ~KHTMLPartPrivate() + ~TDEHTMLPartPrivate() { delete m_dcopobject; delete m_statusBarExtension; delete m_extension; delete m_settings; -#ifndef KHTML_NO_WALLET +#ifndef TDEHTML_NO_WALLET delete m_wallet; #endif #ifndef Q_WS_QWS @@ -304,19 +304,19 @@ public: } TQGuardedPtr m_frame; - KHTMLFrameList m_frames; - KHTMLFrameList m_objects; + TDEHTMLFrameList m_frames; + TDEHTMLFrameList m_objects; - TQGuardedPtr m_view; - KHTMLPartBrowserExtension *m_extension; + TQGuardedPtr m_view; + TDEHTMLPartBrowserExtension *m_extension; KParts::StatusBarExtension *m_statusBarExtension; - KHTMLPartBrowserHostExtension *m_hostExtension; + TDEHTMLPartBrowserHostExtension *m_hostExtension; KURLLabel* m_statusBarIconLabel; KURLLabel* m_statusBarWalletLabel; KURLLabel* m_statusBarUALabel; KURLLabel* m_statusBarJSErrorLabel; KURLLabel* m_statusBarPopupLabel; - TQValueList > m_suppressedPopupOriginParts; + TQValueList > m_suppressedPopupOriginParts; int m_openableSuppressedPopups; DOM::DocumentImpl *m_doc; tdehtml::Decoder *m_decoder; @@ -354,7 +354,7 @@ public: KJavaAppletContext *m_javaContext; #endif - KHTMLSettings *m_settings; + TDEHTMLSettings *m_settings; TDEIO::TransferJob * m_job; @@ -402,8 +402,8 @@ public: KAction *m_paSecurity; KActionMenu *m_paSetEncoding; KSelectAction *m_paUseStylesheet; - KHTMLZoomFactorAction *m_paIncZoomFactor; - KHTMLZoomFactorAction *m_paDecZoomFactor; + TDEHTMLZoomFactorAction *m_paIncZoomFactor; + TDEHTMLZoomFactorAction *m_paDecZoomFactor; KAction *m_paLoadImages; KAction *m_paFind; KAction *m_paFindNext; @@ -421,7 +421,7 @@ public: KParts::PartManager *m_manager; TQString m_popupMenuXML; - KHTMLPart::GUIProfile m_guiProfile; + TDEHTMLPart::GUIProfile m_guiProfile; int m_zoomFactor; @@ -476,7 +476,7 @@ public: int m_focusNodeNumber; TQPoint m_dragStartPos; -#ifdef KHTML_NO_SELECTION +#ifdef TDEHTML_NO_SELECTION TQPoint m_dragLastPos; #endif @@ -490,7 +490,7 @@ public: unsigned long m_totalObjectCount; unsigned int m_jobPercent; - KHTMLPart::FormNotification m_formNotification; + TDEHTMLPart::FormNotification m_formNotification; TQTimer m_progressUpdateTimer; TQStringList m_pluginPageQuestionAsked; @@ -543,7 +543,7 @@ public: //TQGuardedPtr m_activeFrame; KParts::Part * m_activeFrame; - TQGuardedPtr m_opener; + TQGuardedPtr m_opener; bool m_openedByJS; bool m_newJSInterpreterExists; // set to 1 by setOpenedByJS, for window.open @@ -551,7 +551,7 @@ public: KPopupMenu *m_automaticDetection; KSelectAction *m_manualDetection; - void setFlagRecursively(bool KHTMLPartPrivate::*flag, bool value); + void setFlagRecursively(bool TDEHTMLPartPrivate::*flag, bool value); /** returns the caret node */ DOM::Node &caretNode() { return m_extendAtEnd ? m_selectionEnd : m_selectionStart; @@ -563,7 +563,7 @@ public: time_t m_userStyleSheetLastModified; - KHTMLWalletQueue *m_wq; + TDEHTMLWalletQueue *m_wq; }; #endif diff --git a/tdehtml/tdehtmlview.cpp b/tdehtml/tdehtmlview.cpp index 383c7628a..049ac0073 100644 --- a/tdehtml/tdehtmlview.cpp +++ b/tdehtml/tdehtmlview.cpp @@ -56,7 +56,7 @@ #include "tdehtmlpart_p.h" -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET #include "tdehtml_caret_p.h" #include "xml/dom2_rangeimpl.h" #endif @@ -109,15 +109,15 @@ namespace tdehtml { using namespace DOM; using namespace tdehtml; -class KHTMLToolTip; +class TDEHTMLToolTip; #ifndef QT_NO_TOOLTIP -class KHTMLToolTip : public TQToolTip +class TDEHTMLToolTip : public TQToolTip { public: - KHTMLToolTip(KHTMLView *view, KHTMLViewPrivate* vp) : TQToolTip(view->viewport()) + TDEHTMLToolTip(TDEHTMLView *view, TDEHTMLViewPrivate* vp) : TQToolTip(view->viewport()) { m_view = view; m_viewprivate = vp; @@ -127,14 +127,14 @@ protected: virtual void maybeTip(const TQPoint &); private: - KHTMLView *m_view; - KHTMLViewPrivate* m_viewprivate; + TDEHTMLView *m_view; + TDEHTMLViewPrivate* m_viewprivate; }; #endif -class KHTMLViewPrivate { - friend class KHTMLToolTip; +class TDEHTMLViewPrivate { + friend class TDEHTMLToolTip; public: enum PseudoFocusNodes { @@ -149,16 +149,16 @@ public: CSActionPending }; - KHTMLViewPrivate() + TDEHTMLViewPrivate() : underMouse( 0 ), underMouseNonShared( 0 ), visibleWidgets( 107 ) #ifndef NO_SMOOTH_SCROLL_HACK , dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false) #endif { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET m_caretViewContext = 0; m_editorContext = 0; -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET postponed_autorepeat = NULL; reset(); vmode = TQScrollView::Auto; @@ -175,7 +175,7 @@ public: m_mouseScrollTimer = 0; m_mouseScrollIndicator = 0; } - ~KHTMLViewPrivate() + ~TDEHTMLViewPrivate() { delete formCompletions; delete tp; tp = 0; @@ -187,10 +187,10 @@ public: if (underMouseNonShared) underMouseNonShared->deref(); delete tooltip; -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET delete m_caretViewContext; delete m_editorContext; -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET delete cursor_icon_widget; delete m_mouseScrollTimer; delete m_mouseScrollIndicator; @@ -208,7 +208,7 @@ public: tabMovePending = false; lastTabbingDirection = true; pseudoFocusNode = PFNone; -#ifndef KHTML_NO_SCROLLBARS +#ifndef TDEHTML_NO_SCROLLBARS //We don't turn off the toolbars here //since if the user turns them //off, then chances are they want them turned @@ -250,22 +250,22 @@ public: painting = false; updateRegion = TQRegion(); m_dialogsAllowed = true; -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (m_caretViewContext) { m_caretViewContext->caretMoved = false; m_caretViewContext->keyReleasePending = false; }/*end if*/ -#endif // KHTML_NO_CARET -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_CARET +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND typeAheadActivated = false; -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND accessKeysActivated = false; accessKeysPreActivate = false; // We ref/deref to ensure defaultHTMLSettings is available - KHTMLFactory::ref(); - accessKeysEnabled = KHTMLFactory::defaultHTMLSettings()->accessKeysEnabled(); - KHTMLFactory::deref(); + TDEHTMLFactory::ref(); + accessKeysEnabled = TDEHTMLFactory::defaultHTMLSettings()->accessKeysEnabled(); + TDEHTMLFactory::deref(); emitCompletedAfterRepaint = CSNone; } @@ -304,7 +304,7 @@ public: scrollSuspended = false; } -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET /** this function returns an instance of the caret view context. If none * exists, it will be instantiated. */ @@ -319,7 +319,7 @@ public: if (!m_editorContext) m_editorContext = new EditorContext(); return m_editorContext; } -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET #ifdef DEBUG_PIXEL TQTime timer; @@ -375,18 +375,18 @@ public: bool dirtyLayout :1; bool m_dialogsAllowed :1; TQRegion updateRegion; - KHTMLToolTip *tooltip; + TDEHTMLToolTip *tooltip; TQPtrDict visibleWidgets; -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET CaretViewContext *m_caretViewContext; EditorContext *m_editorContext; -#endif // KHTML_NO_CARET -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_CARET +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND TQString findString; TQTimer timer; bool findLinksOnly; bool typeAheadActivated; -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND bool accessKeysEnabled; bool accessKeysActivated; bool accessKeysPreActivate; @@ -453,7 +453,7 @@ static bool findImageMapRect(HTMLImageElementImpl *img, const TQPoint &scrollOfs return false; } -void KHTMLToolTip::maybeTip(const TQPoint& p) +void TDEHTMLToolTip::maybeTip(const TQPoint& p) { DOM::NodeImpl *node = m_viewprivate->underMouseNonShared; TQRect region; @@ -484,13 +484,13 @@ void KHTMLToolTip::maybeTip(const TQPoint& p) } #endif -KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name) +TDEHTMLView::TDEHTMLView( TDEHTMLPart *part, TQWidget *parent, const char *name) : TQScrollView( parent, name, (WFlags)(WResizeNoErase | WRepaintNoErase) ) { m_medium = "screen"; m_part = part; - d = new KHTMLViewPrivate; + d = new TDEHTMLViewPrivate; TQScrollView::setVScrollBarMode(d->vmode); TQScrollView::setHScrollBarMode(d->hmode); connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(slotPaletteChanged())); @@ -499,7 +499,7 @@ KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name) // initialize QScrollView enableClipper(true); // hack to get unclipped painting on the viewport. - static_cast(TQT_TQWIDGET(viewport()))->setWFlags(WPaintUnclipped); + static_cast(TQT_TQWIDGET(viewport()))->setWFlags(WPaintUnclipped); setResizePolicy(Manual); viewport()->setMouseTracking(true); @@ -508,12 +508,12 @@ KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name) KImageIO::registerFormats(); #ifndef QT_NO_TOOLTIP - d->tooltip = new KHTMLToolTip( this, d ); + d->tooltip = new TDEHTMLToolTip( this, d ); #endif -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(findTimeout())); -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND init(); @@ -525,7 +525,7 @@ KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name) #endif } -KHTMLView::~KHTMLView() +TDEHTMLView::~TDEHTMLView() { closeChildDialogs(); if (m_part) @@ -539,7 +539,7 @@ KHTMLView::~KHTMLView() delete d; d = 0; } -void KHTMLView::init() +void TDEHTMLView::init() { if(!d->paintBuffer) d->paintBuffer = new TQPixmap(PAINT_BUFFER_HEIGHT, PAINT_BUFFER_HEIGHT); if(!d->vertPaintBuffer) @@ -561,15 +561,15 @@ void KHTMLView::init() resizeContents(s.width(), s.height()); } -void KHTMLView::clear() +void TDEHTMLView::clear() { // work around QScrollview's unbelievable bugginess setStaticBackground(true); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (!m_part->isCaretMode() && !m_part->isEditable()) caretOff(); #endif -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND if( d->typeAheadActivated ) findTimeout(); #endif @@ -588,21 +588,21 @@ void KHTMLView::clear() horizontalScrollBar()->setEnabled( false ); } -void KHTMLView::hideEvent(TQHideEvent* e) +void TDEHTMLView::hideEvent(TQHideEvent* e) { TQScrollView::hideEvent(e); if ( m_part && m_part->xmlDocImpl() ) m_part->xmlDocImpl()->docLoader()->pauseAnimations(); } -void KHTMLView::showEvent(TQShowEvent* e) +void TDEHTMLView::showEvent(TQShowEvent* e) { TQScrollView::showEvent(e); if ( m_part && m_part->xmlDocImpl() ) m_part->xmlDocImpl()->docLoader()->resumeAnimations(); } -void KHTMLView::resizeEvent (TQResizeEvent* e) +void TDEHTMLView::resizeEvent (TQResizeEvent* e) { int dw = e->oldSize().width() - e->size().width(); int dh = e->oldSize().height() - e->size().height(); @@ -620,7 +620,7 @@ void KHTMLView::resizeEvent (TQResizeEvent* e) m_part->xmlDocImpl()->dispatchWindowEvent( EventImpl::RESIZE_EVENT, false, false ); } -void KHTMLView::viewportResizeEvent (TQResizeEvent* e) +void TDEHTMLView::viewportResizeEvent (TQResizeEvent* e) { TQScrollView::viewportResizeEvent(e); @@ -629,7 +629,7 @@ void KHTMLView::viewportResizeEvent (TQResizeEvent* e) if (d->layoutSchedulingEnabled) layout(); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET else { hideCaret(); recalcAndStoreCaretPos(); @@ -641,11 +641,11 @@ void KHTMLView::viewportResizeEvent (TQResizeEvent* e) } // this is to get rid of a compiler virtual overload mismatch warning. do not remove -void KHTMLView::drawContents( TQPainter*) +void TDEHTMLView::drawContents( TQPainter*) { } -void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh ) +void TDEHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh ) { #ifdef DEBUG_PIXEL @@ -683,7 +683,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh ) for (TQPtrDictIterator it(d->visibleWidgets); it.current(); ++it) { TQWidget *w = it.current(); RenderWidget* rw = static_cast( it.currentKey() ); - if (w && rw && !rw->isKHTMLWidget()) { + if (w && rw && !rw->isTDEHTMLWidget()) { int x, y; rw->absolutePosition(x, y); contentsToViewport(x, y, x, y); @@ -760,7 +760,7 @@ static int cnt=0; m_part->xmlDocImpl()->renderer()->layer()->paint(p, pr); #endif // DEBUG_NO_PAINT_BUFFER -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (d->m_caretViewContext && d->m_caretViewContext->visible) { TQRect pos(d->m_caretViewContext->x, d->m_caretViewContext->y, d->m_caretViewContext->width, d->m_caretViewContext->height); @@ -774,7 +774,7 @@ static int cnt=0; }/*end if*/ }/*end if*/ }/*end if*/ -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET // p->setPen(TQPen(magenta,0,DashDotDotLine)); // p->drawRect(dbg_paint_rect); @@ -785,19 +785,19 @@ static int cnt=0; d->painting = false; } -void KHTMLView::setMarginWidth(int w) +void TDEHTMLView::setMarginWidth(int w) { // make it update the rendering area when set _marginWidth = w; } -void KHTMLView::setMarginHeight(int h) +void TDEHTMLView::setMarginHeight(int h) { // make it update the rendering area when set _marginHeight = h; } -void KHTMLView::layout() +void TDEHTMLView::layout() { if( m_part && m_part->xmlDocImpl() ) { DOM::DocumentImpl *document = m_part->xmlDocImpl(); @@ -824,7 +824,7 @@ void KHTMLView::layout() } else { if (!d->tooltip) - d->tooltip = new KHTMLToolTip( this, d ); + d->tooltip = new TDEHTMLToolTip( this, d ); // only apply body's overflow to canvas if root as a visible overflow if (root) ref = (!body || root->style()->hidesOverflow()) ? root : body->renderer(); @@ -870,7 +870,7 @@ void KHTMLView::layout() if (listitem) kdDebug(6000) << "after layout, before repaint" << endl; if (listitem) dumpLineBoxes(static_cast(listitem->renderer())); #endif -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET hideCaret(); if ((m_part->isCaretMode() || m_part->isEditable()) && !d->complete && d->m_caretViewContext @@ -895,7 +895,7 @@ void KHTMLView::layout() d->layoutSchedulingEnabled=true; } -void KHTMLView::closeChildDialogs() +void TDEHTMLView::closeChildDialogs() { TQObjectList *dlgs = queryList(TQDIALOG_OBJECT_NAME_STRING); for (TQObject *dlg = dlgs->first(); dlg; dlg = dlgs->next()) @@ -919,15 +919,15 @@ void KHTMLView::closeChildDialogs() d->m_dialogsAllowed = false; } -bool KHTMLView::dialogsAllowed() { +bool TDEHTMLView::dialogsAllowed() { bool allowed = d->m_dialogsAllowed; - KHTMLPart* p = m_part->parentPart(); + TDEHTMLPart* p = m_part->parentPart(); if (p && p->view()) allowed &= p->view()->dialogsAllowed(); return allowed; } -void KHTMLView::closeEvent( TQCloseEvent* ev ) +void TDEHTMLView::closeEvent( TQCloseEvent* ev ) { closeChildDialogs(); TQScrollView::closeEvent( ev ); @@ -938,7 +938,7 @@ void KHTMLView::closeEvent( TQCloseEvent* ev ) // ///////////////// -void KHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse ) +void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse ) { if (!m_part->xmlDocImpl()) return; if (d->possibleTripleClick && ( _mouse->button() & Qt::MouseButtonMask ) == Qt::LeftButton) @@ -1058,7 +1058,7 @@ void KHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse ) } } -void KHTMLView::viewportMouseDoubleClickEvent( TQMouseEvent *_mouse ) +void TDEHTMLView::viewportMouseDoubleClickEvent( TQMouseEvent *_mouse ) { if(!m_part->xmlDocImpl()) return; @@ -1098,7 +1098,7 @@ void KHTMLView::viewportMouseDoubleClickEvent( TQMouseEvent *_mouse ) TQTimer::singleShot(TQApplication::doubleClickInterval(),this,TQT_SLOT(tripleClickTimeout())); } -void KHTMLView::tripleClickTimeout() +void TDEHTMLView::tripleClickTimeout() { d->possibleTripleClick = false; d->clickCount = 0; @@ -1120,7 +1120,7 @@ static inline void forwardPeripheralEvent(tdehtml::RenderWidget* r, TQMouseEvent } -static bool targetOpensNewWindow(KHTMLPart *part, TQString target) +static bool targetOpensNewWindow(TDEHTMLPart *part, TQString target) { if (!target.isEmpty() && (target.lower() != "_top") && (target.lower() != "_self") && (target.lower() != "_parent")) { @@ -1136,7 +1136,7 @@ static bool targetOpensNewWindow(KHTMLPart *part, TQString target) return false; } -void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse ) +void TDEHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse ) { if ( d->m_mouseScrollTimer ) { TQPoint point = mapFromGlobal( _mouse->globalPos() ); @@ -1259,7 +1259,7 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse ) if ( viewport()->cursor().handle() != c.handle() ) { if( c.handle() == KCursor::arrowCursor().handle()) { - for (KHTMLPart* p = m_part; p; p = p->parentPart()) + for (TDEHTMLPart* p = m_part; p; p = p->parentPart()) p->view()->viewport()->unsetCursor(); } else { @@ -1316,7 +1316,7 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse ) } } -void KHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse ) +void TDEHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse ) { bool swallowEvent = false; int xm, ym; @@ -1357,7 +1357,7 @@ void KHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse ) } // returns true if event should be swallowed -bool KHTMLView::dispatchKeyEvent( TQKeyEvent *_ke ) +bool TDEHTMLView::dispatchKeyEvent( TQKeyEvent *_ke ) { if (!m_part->xmlDocImpl()) return false; @@ -1432,7 +1432,7 @@ bool KHTMLView::dispatchKeyEvent( TQKeyEvent *_ke ) } // returns true if event should be swallowed -bool KHTMLView::dispatchKeyEventHelper( TQKeyEvent *_ke, bool keypress ) +bool TDEHTMLView::dispatchKeyEventHelper( TQKeyEvent *_ke, bool keypress ) { DOM::NodeImpl* keyNode = m_part->xmlDocImpl()->focusNode(); if (keyNode) { @@ -1442,9 +1442,9 @@ bool KHTMLView::dispatchKeyEventHelper( TQKeyEvent *_ke, bool keypress ) } } -void KHTMLView::keyPressEvent( TQKeyEvent *_ke ) +void TDEHTMLView::keyPressEvent( TQKeyEvent *_ke ) { -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND if(d->typeAheadActivated) { // type-ahead find aka find-as-you-type @@ -1483,9 +1483,9 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke ) return; } } -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (m_part->isEditable() || m_part->isCaretMode() || (m_part->xmlDocImpl() && m_part->xmlDocImpl()->focusNode() && m_part->xmlDocImpl()->focusNode()->contentEditable())) { @@ -1493,7 +1493,7 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke ) caretKeyPressEvent(_ke); return; } -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET // If CTRL was hit, be prepared for access keys if (d->accessKeysEnabled && _ke->key() == Key_Control && _ke->state()==0 && !d->accessKeysActivated) @@ -1539,22 +1539,22 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke ) case Key_Down: case Key_J: - d->adjustScroller(this, KHTMLViewPrivate::ScrollDown, KHTMLViewPrivate::ScrollUp); + d->adjustScroller(this, TDEHTMLViewPrivate::ScrollDown, TDEHTMLViewPrivate::ScrollUp); break; case Key_Up: case Key_K: - d->adjustScroller(this, KHTMLViewPrivate::ScrollUp, KHTMLViewPrivate::ScrollDown); + d->adjustScroller(this, TDEHTMLViewPrivate::ScrollUp, TDEHTMLViewPrivate::ScrollDown); break; case Key_Left: case Key_H: - d->adjustScroller(this, KHTMLViewPrivate::ScrollLeft, KHTMLViewPrivate::ScrollRight); + d->adjustScroller(this, TDEHTMLViewPrivate::ScrollLeft, TDEHTMLViewPrivate::ScrollRight); break; case Key_Right: case Key_L: - d->adjustScroller(this, KHTMLViewPrivate::ScrollRight, KHTMLViewPrivate::ScrollLeft); + d->adjustScroller(this, TDEHTMLViewPrivate::ScrollRight, TDEHTMLViewPrivate::ScrollLeft); break; } else @@ -1636,30 +1636,30 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke ) _ke->accept(); } -void KHTMLView::findTimeout() +void TDEHTMLView::findTimeout() { -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND d->typeAheadActivated = false; d->findString = ""; - m_part->setStatusBarText(i18n("Find stopped."), KHTMLPart::BarDefaultText); + m_part->setStatusBarText(i18n("Find stopped."), TDEHTMLPart::BarDefaultText); m_part->enableFindAheadActions( true ); -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND } -#ifndef KHTML_NO_TYPE_AHEAD_FIND -void KHTMLView::startFindAhead( bool linksOnly ) +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND +void TDEHTMLView::startFindAhead( bool linksOnly ) { if( linksOnly ) { d->findLinksOnly = true; m_part->setStatusBarText(i18n("Starting -- find links as you type"), - KHTMLPart::BarDefaultText); + TDEHTMLPart::BarDefaultText); } else { d->findLinksOnly = false; m_part->setStatusBarText(i18n("Starting -- find text as you type"), - KHTMLPart::BarDefaultText); + TDEHTMLPart::BarDefaultText); } m_part->findTextBegin(); @@ -1669,14 +1669,14 @@ void KHTMLView::startFindAhead( bool linksOnly ) d->timer.start(3000, true); } -void KHTMLView::findAhead(bool increase) +void TDEHTMLView::findAhead(bool increase) { TQString status; if(d->findLinksOnly) { - m_part->findText(d->findString, KHTMLPart::FindNoPopups | - KHTMLPart::FindLinksOnly, this); + m_part->findText(d->findString, TDEHTMLPart::FindNoPopups | + TDEHTMLPart::FindLinksOnly, this); if(m_part->findTextNext()) { status = i18n("Link found: \"%1\"."); @@ -1689,7 +1689,7 @@ void KHTMLView::findAhead(bool increase) } else { - m_part->findText(d->findString, KHTMLPart::FindNoPopups, this); + m_part->findText(d->findString, TDEHTMLPart::FindNoPopups, this); if(m_part->findTextNext()) { status = i18n("Text found: \"%1\"."); @@ -1702,20 +1702,20 @@ void KHTMLView::findAhead(bool increase) } m_part->setStatusBarText(status.arg(d->findString.lower()), - KHTMLPart::BarDefaultText); + TDEHTMLPart::BarDefaultText); } -void KHTMLView::updateFindAheadTimeout() +void TDEHTMLView::updateFindAheadTimeout() { if( d->typeAheadActivated ) d->timer.start( 3000, true ); } -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND -void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke) +void TDEHTMLView::keyReleaseEvent(TQKeyEvent *_ke) { -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND if(d->typeAheadActivated) { _ke->accept(); return; @@ -1749,7 +1749,7 @@ void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke) if (d->accessKeysPreActivate && _ke->state() == TQt::ControlButton && !(TDEApplication::keyboardMouseState() & TQt::ControlButton)) { displayAccessKeys(); - m_part->setStatusBarText(i18n("Access Keys activated"),KHTMLPart::BarOverrideText); + m_part->setStatusBarText(i18n("Access Keys activated"),TDEHTMLPart::BarOverrideText); d->accessKeysActivated = true; d->accessKeysPreActivate = false; _ke->accept(); @@ -1773,7 +1773,7 @@ void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke) TQScrollView::keyReleaseEvent(_ke); } -void KHTMLView::contentsContextMenuEvent ( TQContextMenuEvent * /*ce*/ ) +void TDEHTMLView::contentsContextMenuEvent ( TQContextMenuEvent * /*ce*/ ) { // ### what kind of c*** is that ? #if 0 @@ -1800,7 +1800,7 @@ void KHTMLView::contentsContextMenuEvent ( TQContextMenuEvent * /*ce*/ ) #endif } -bool KHTMLView::focusNextPrevChild( bool next ) +bool TDEHTMLView::focusNextPrevChild( bool next ) { // Now try to find the next child if (m_part->xmlDocImpl() && focusNextPrevNode(next)) @@ -1812,14 +1812,14 @@ bool KHTMLView::focusNextPrevChild( bool next ) } // If we get here, pass tabbing control up to the next/previous child in our parent - d->pseudoFocusNode = KHTMLViewPrivate::PFNone; + d->pseudoFocusNode = TDEHTMLViewPrivate::PFNone; if (m_part->parentPart() && m_part->parentPart()->view()) return m_part->parentPart()->view()->focusNextPrevChild(next); return TQWidget::focusNextPrevChild(next); } -void KHTMLView::doAutoScroll() +void TDEHTMLView::doAutoScroll() { TQPoint pos = TQCursor::pos(); pos = viewport()->mapFromGlobal( pos ); @@ -1833,7 +1833,7 @@ void KHTMLView::doAutoScroll() { ensureVisible( xm, ym, 0, 5 ); -#ifndef KHTML_NO_SELECTION +#ifndef TDEHTML_NO_SELECTION // extend the selection while scrolling DOM::Node innerNode; if (m_part->isExtendingSelection()) { @@ -1849,7 +1849,7 @@ void KHTMLView::doAutoScroll() m_part->extendSelectionTo(xm, ym, absX, absY, innerNode); }/*end if*/ -#endif // KHTML_NO_SELECTION +#endif // TDEHTML_NO_SELECTION } } @@ -1860,7 +1860,7 @@ class HackWidget : public TQWidget inline void setNoErase() { setWFlags(getWFlags()|WRepaintNoErase); } }; -bool KHTMLView::eventFilter(TQObject *o, TQEvent *e) +bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e) { if ( e->type() == TQEvent::AccelOverride ) { TQKeyEvent* ke = (TQKeyEvent*) e; @@ -2011,17 +2011,17 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e) } -DOM::NodeImpl *KHTMLView::nodeUnderMouse() const +DOM::NodeImpl *TDEHTMLView::nodeUnderMouse() const { return d->underMouse; } -DOM::NodeImpl *KHTMLView::nonSharedNodeUnderMouse() const +DOM::NodeImpl *TDEHTMLView::nonSharedNodeUnderMouse() const { return d->underMouseNonShared; } -bool KHTMLView::scrollTo(const TQRect &bounds) +bool TDEHTMLView::scrollTo(const TQRect &bounds) { d->scrollingSelf = true; // so scroll events get ignored @@ -2091,7 +2091,7 @@ bool KHTMLView::scrollTo(const TQRect &bounds) } -bool KHTMLView::focusNextPrevNode(bool next) +bool TDEHTMLView::focusNextPrevNode(bool next) { // Sets the focus node of the document to be the node after (or if // next is false, before) the current focus node. Only nodes that @@ -2143,7 +2143,7 @@ bool KHTMLView::focusNextPrevNode(bool next) d->scrollBarMoved = false; d->tabMovePending = false; d->lastTabbingDirection = next; - d->pseudoFocusNode = KHTMLViewPrivate::PFNone; + d->pseudoFocusNode = TDEHTMLViewPrivate::PFNone; m_part->xmlDocImpl()->setFocusNode(toFocus); Node guard(toFocus); if (!toFocus->hasOneRef() ) @@ -2169,11 +2169,11 @@ bool KHTMLView::focusNextPrevNode(bool next) } #endif - if (!oldFocusNode && d->pseudoFocusNode == KHTMLViewPrivate::PFNone) + if (!oldFocusNode && d->pseudoFocusNode == TDEHTMLViewPrivate::PFNone) { ensureVisible(contentsX(), next?0:contentsHeight()); d->scrollBarMoved = false; - d->pseudoFocusNode = next?KHTMLViewPrivate::PFTop:KHTMLViewPrivate::PFBottom; + d->pseudoFocusNode = next?TDEHTMLViewPrivate::PFTop:TDEHTMLViewPrivate::PFBottom; return true; } @@ -2186,12 +2186,12 @@ bool KHTMLView::focusNextPrevNode(bool next) } else if (next) { - if (oldFocusNode || d->pseudoFocusNode == KHTMLViewPrivate::PFTop ) + if (oldFocusNode || d->pseudoFocusNode == TDEHTMLViewPrivate::PFTop ) newFocusNode = doc->nextFocusNode(oldFocusNode); } else { - if (oldFocusNode || d->pseudoFocusNode == KHTMLViewPrivate::PFBottom ) + if (oldFocusNode || d->pseudoFocusNode == TDEHTMLViewPrivate::PFBottom ) newFocusNode = doc->previousFocusNode(oldFocusNode); } @@ -2209,7 +2209,7 @@ bool KHTMLView::focusNextPrevNode(bool next) } else { -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // if it's an editable element, activate the caret if (!m_part->isCaretMode() && !m_part->isEditable() && newFocusNode->contentEditable()) { @@ -2218,7 +2218,7 @@ bool KHTMLView::focusNextPrevNode(bool next) } else { caretOff(); } -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET targetVisible = scrollTo(newFocusNode->getRect()); } @@ -2240,7 +2240,7 @@ bool KHTMLView::focusNextPrevNode(bool next) } else { - d->pseudoFocusNode = next?KHTMLViewPrivate::PFBottom:KHTMLViewPrivate::PFTop; + d->pseudoFocusNode = next?TDEHTMLViewPrivate::PFBottom:TDEHTMLViewPrivate::PFTop; return false; } } @@ -2253,14 +2253,14 @@ bool KHTMLView::focusNextPrevNode(bool next) } } -void KHTMLView::displayAccessKeys() +void TDEHTMLView::displayAccessKeys() { TQValueVector< TQChar > taken; displayAccessKeys( NULL, this, taken, false ); displayAccessKeys( NULL, this, taken, true ); } -void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks ) +void TDEHTMLView::displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks ) { TQMap< ElementImpl*, TQChar > fallbacks; if( use_fallbacks ) @@ -2304,9 +2304,9 @@ void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQVal for( TQPtrListIterator it( frames ); it != NULL; ++it ) { - if( !(*it)->inherits( "KHTMLPart" )) + if( !(*it)->inherits( "TDEHTMLPart" )) continue; - KHTMLPart* part = static_cast< KHTMLPart* >( *it ); + TDEHTMLPart* part = static_cast< TDEHTMLPart* >( *it ); if( part->view() && part->view() != caller ) part->view()->displayAccessKeys( this, origview, taken, use_fallbacks ); } @@ -2318,16 +2318,16 @@ void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQVal -void KHTMLView::accessKeysTimeout() +void TDEHTMLView::accessKeysTimeout() { d->accessKeysActivated=false; d->accessKeysPreActivate = false; -m_part->setStatusBarText(TQString::null, KHTMLPart::BarOverrideText); +m_part->setStatusBarText(TQString::null, TDEHTMLPart::BarOverrideText); emit hideAccessKeys(); } // Handling of the HTML accesskey attribute. -bool KHTMLView::handleAccessKey( const TQKeyEvent* ev ) +bool TDEHTMLView::handleAccessKey( const TQKeyEvent* ev ) { // Qt interprets the keyevent also with the modifiers, and ev->text() matches that, // but this code must act as if the modifiers weren't pressed @@ -2347,7 +2347,7 @@ bool KHTMLView::handleAccessKey( const TQKeyEvent* ev ) return focusNodeWithAccessKey( c ); } -bool KHTMLView::focusNodeWithAccessKey( TQChar c, KHTMLView* caller ) +bool TDEHTMLView::focusNodeWithAccessKey( TQChar c, TDEHTMLView* caller ) { DocumentImpl *doc = m_part->xmlDocImpl(); if( !doc ) @@ -2358,9 +2358,9 @@ bool KHTMLView::focusNodeWithAccessKey( TQChar c, KHTMLView* caller ) for( TQPtrListIterator it( frames ); it != NULL; ++it ) { - if( !(*it)->inherits( "KHTMLPart" )) + if( !(*it)->inherits( "TDEHTMLPart" )) continue; - KHTMLPart* part = static_cast< KHTMLPart* >( *it ); + TDEHTMLPart* part = static_cast< TDEHTMLPart* >( *it ); if( part->view() && part->view() != caller && part->view()->focusNodeWithAccessKey( c, this )) return true; @@ -2385,7 +2385,7 @@ bool KHTMLView::focusNodeWithAccessKey( TQChar c, KHTMLView* caller ) } // Scroll the view as necessary to ensure that the new focus node is visible -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // if it's an editable element, activate the caret if (!m_part->isCaretMode() && !m_part->isEditable() && node->contentEditable()) { @@ -2394,7 +2394,7 @@ bool KHTMLView::focusNodeWithAccessKey( TQChar c, KHTMLView* caller ) } else { caretOff(); } -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET TQRect r = node->getRect(); ensureVisible( r.right(), r.bottom()); @@ -2521,7 +2521,7 @@ struct AccessKeyData { }; } -TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const +TQMap< ElementImpl*, TQChar > TDEHTMLView::buildFallbackAccessKeys() const { // build a list of all possible candidate elements that could use an accesskey TQValueList< AccessKeyData > data; @@ -2739,22 +2739,22 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const return ret; } -void KHTMLView::setMediaType( const TQString &medium ) +void TDEHTMLView::setMediaType( const TQString &medium ) { m_medium = medium; } -TQString KHTMLView::mediaType() const +TQString TDEHTMLView::mediaType() const { return m_medium; } -bool KHTMLView::pagedMode() const +bool TDEHTMLView::pagedMode() const { return d->paged; } -void KHTMLView::setWidgetVisible(RenderWidget* w, bool vis) +void TDEHTMLView::setWidgetVisible(RenderWidget* w, bool vis) { if (vis) { d->visibleWidgets.replace(w, w->widget()); @@ -2763,24 +2763,24 @@ void KHTMLView::setWidgetVisible(RenderWidget* w, bool vis) d->visibleWidgets.remove(w); } -bool KHTMLView::needsFullRepaint() const +bool TDEHTMLView::needsFullRepaint() const { return d->needsFullRepaint; } -void KHTMLView::print() +void TDEHTMLView::print() { print( false ); } -void KHTMLView::print(bool quick) +void TDEHTMLView::print(bool quick) { if(!m_part->xmlDocImpl()) return; tdehtml::RenderCanvas *root = static_cast(m_part->xmlDocImpl()->renderer()); if(!root) return; KPrinter *printer = new KPrinter(true, TQPrinter::ScreenResolution); - printer->addDialogPage(new KHTMLPrintSettings()); + printer->addDialogPage(new TDEHTMLPrintSettings()); TQString docname = m_part->xmlDocImpl()->URL().prettyURL(); if ( !docname.isEmpty() ) docname = KStringHandler::csqueeze(docname, 80); @@ -2963,7 +2963,7 @@ void KHTMLView::print(bool quick) delete printer; } -void KHTMLView::slotPaletteChanged() +void TDEHTMLView::slotPaletteChanged() { if(!m_part->xmlDocImpl()) return; DOM::DocumentImpl *document = m_part->xmlDocImpl(); @@ -2977,7 +2977,7 @@ void KHTMLView::slotPaletteChanged() body->recalcStyle( NodeImpl::Force ); } -void KHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more) +void TDEHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more) { if(!m_part->xmlDocImpl()) return; tdehtml::RenderCanvas *root = static_cast(m_part->xmlDocImpl()->renderer()); @@ -3010,16 +3010,16 @@ void KHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more) } -void KHTMLView::useSlowRepaints() +void TDEHTMLView::useSlowRepaints() { d->useSlowRepaints = true; setStaticBackground(true); } -void KHTMLView::setVScrollBarMode ( ScrollBarMode mode ) +void TDEHTMLView::setVScrollBarMode ( ScrollBarMode mode ) { -#ifndef KHTML_NO_SCROLLBARS +#ifndef TDEHTML_NO_SCROLLBARS d->vmode = mode; TQScrollView::setVScrollBarMode(mode); #else @@ -3027,9 +3027,9 @@ void KHTMLView::setVScrollBarMode ( ScrollBarMode mode ) #endif } -void KHTMLView::setHScrollBarMode ( ScrollBarMode mode ) +void TDEHTMLView::setHScrollBarMode ( ScrollBarMode mode ) { -#ifndef KHTML_NO_SCROLLBARS +#ifndef TDEHTML_NO_SCROLLBARS d->hmode = mode; TQScrollView::setHScrollBarMode(mode); #else @@ -3037,7 +3037,7 @@ void KHTMLView::setHScrollBarMode ( ScrollBarMode mode ) #endif } -void KHTMLView::restoreScrollBar() +void TDEHTMLView::restoreScrollBar() { int ow = visibleWidth(); TQScrollView::setVScrollBarMode(d->vmode); @@ -3046,7 +3046,7 @@ void KHTMLView::restoreScrollBar() d->prevScrollbarVisible = verticalScrollBar()->isVisible(); } -TQStringList KHTMLView::formCompletionItems(const TQString &name) const +TQStringList TDEHTMLView::formCompletionItems(const TQString &name) const { if (!m_part->settings()->isFormCompletionEnabled()) return TQStringList(); @@ -3055,7 +3055,7 @@ TQStringList KHTMLView::formCompletionItems(const TQString &name) const return d->formCompletions->readListEntry(name); } -void KHTMLView::clearCompletionHistory(const TQString& name) +void TDEHTMLView::clearCompletionHistory(const TQString& name) { if (!d->formCompletions) { @@ -3065,7 +3065,7 @@ void KHTMLView::clearCompletionHistory(const TQString& name) d->formCompletions->sync(); } -void KHTMLView::addFormCompletionItem(const TQString &name, const TQString &value) +void TDEHTMLView::addFormCompletionItem(const TQString &name, const TQString &value) { if (!m_part->settings()->isFormCompletionEnabled()) return; @@ -3092,7 +3092,7 @@ void KHTMLView::addFormCompletionItem(const TQString &name, const TQString &valu d->formCompletions->writeEntry(name, items); } -void KHTMLView::removeFormCompletionItem(const TQString &name, const TQString &value) +void TDEHTMLView::removeFormCompletionItem(const TQString &name, const TQString &value) { if (!m_part->settings()->isFormCompletionEnabled()) return; @@ -3102,7 +3102,7 @@ void KHTMLView::removeFormCompletionItem(const TQString &name, const TQString &v d->formCompletions->writeEntry(name, items); } -void KHTMLView::addNonPasswordStorableSite(const TQString& host) +void TDEHTMLView::addNonPasswordStorableSite(const TQString& host) { if (!d->formCompletions) { d->formCompletions = new KSimpleConfig(locateLocal("data", "tdehtml/formcompletions")); @@ -3116,7 +3116,7 @@ void KHTMLView::addNonPasswordStorableSite(const TQString& host) d->formCompletions->setGroup(TQString::null);//reset } -bool KHTMLView::nonPasswordStorableSite(const TQString& host) const +bool TDEHTMLView::nonPasswordStorableSite(const TQString& host) const { if (!d->formCompletions) { d->formCompletions = new KSimpleConfig(locateLocal("data", "tdehtml/formcompletions")); @@ -3129,7 +3129,7 @@ bool KHTMLView::nonPasswordStorableSite(const TQString& host) const } // returns true if event should be swallowed -bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode, +bool TDEHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode, DOM::NodeImpl *targetNodeNonShared, bool cancelable, int detail,TQMouseEvent *_mouse, bool setUnder, int mouseEventType) @@ -3262,14 +3262,14 @@ bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode, return swallowEvent; } -void KHTMLView::setIgnoreWheelEvents( bool e ) +void TDEHTMLView::setIgnoreWheelEvents( bool e ) { d->ignoreWheelEvents = e; } #ifndef QT_NO_WHEELEVENT -void KHTMLView::viewportWheelEvent(TQWheelEvent* e) +void TDEHTMLView::viewportWheelEvent(TQWheelEvent* e) { if (d->accessKeysEnabled && d->accessKeysPreActivate) d->accessKeysPreActivate=false; @@ -3314,7 +3314,7 @@ void KHTMLView::viewportWheelEvent(TQWheelEvent* e) } #endif -void KHTMLView::dragEnterEvent( TQDragEnterEvent* ev ) +void TDEHTMLView::dragEnterEvent( TQDragEnterEvent* ev ) { // Handle drops onto frames (#16820) // Drops on the main html part is handled by Konqueror (and shouldn't do anything @@ -3327,7 +3327,7 @@ void KHTMLView::dragEnterEvent( TQDragEnterEvent* ev ) TQScrollView::dragEnterEvent( ev ); } -void KHTMLView::dropEvent( TQDropEvent *ev ) +void TDEHTMLView::dropEvent( TQDropEvent *ev ) { // Handle drops onto frames (#16820) // Drops on the main html part is handled by Konqueror (and shouldn't do anything @@ -3340,9 +3340,9 @@ void KHTMLView::dropEvent( TQDropEvent *ev ) TQScrollView::dropEvent( ev ); } -void KHTMLView::focusInEvent( TQFocusEvent *e ) +void TDEHTMLView::focusInEvent( TQFocusEvent *e ) { -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND m_part->enableFindAheadActions( true ); #endif DOM::NodeImpl* fn = m_part->xmlDocImpl() ? m_part->xmlDocImpl()->focusNode() : 0; @@ -3350,7 +3350,7 @@ void KHTMLView::focusInEvent( TQFocusEvent *e ) (e->reason() != TQFocusEvent::Mouse) && static_cast(fn->renderer())->widget()) static_cast(fn->renderer())->widget()->setFocus(); -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // Restart blink frequency timer if it has been killed, but only on // editable nodes if (d->m_caretViewContext && @@ -3366,29 +3366,29 @@ void KHTMLView::focusInEvent( TQFocusEvent *e ) }/*end if*/ }/*end if*/ showCaret(); -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET TQScrollView::focusInEvent( e ); } -void KHTMLView::focusOutEvent( TQFocusEvent *e ) +void TDEHTMLView::focusOutEvent( TQFocusEvent *e ) { if(m_part) m_part->stopAutoScroll(); -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND if(d->typeAheadActivated) { findTimeout(); } m_part->enableFindAheadActions( false ); -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET if (d->m_caretViewContext) { switch (d->m_caretViewContext->displayNonFocused) { - case KHTMLPart::CaretInvisible: + case TDEHTMLPart::CaretInvisible: hideCaret(); break; - case KHTMLPart::CaretVisible: { + case TDEHTMLPart::CaretVisible: { killTimer(d->m_caretViewContext->freqTimerId); d->m_caretViewContext->freqTimerId = -1; NodeImpl *caretNode = m_part->xmlDocImpl()->focusNode(); @@ -3402,12 +3402,12 @@ void KHTMLView::focusOutEvent( TQFocusEvent *e ) }/*end if*/ break; } - case KHTMLPart::CaretBlink: + case TDEHTMLPart::CaretBlink: // simply leave as is break; }/*end switch*/ }/*end if*/ -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET if ( d->cursor_icon_widget ) d->cursor_icon_widget->hide(); @@ -3415,7 +3415,7 @@ void KHTMLView::focusOutEvent( TQFocusEvent *e ) TQScrollView::focusOutEvent( e ); } -void KHTMLView::slotScrollBarMoved() +void TDEHTMLView::slotScrollBarMoved() { if ( !d->firstRelayout && !d->complete && m_part->xmlDocImpl() && d->layoutSchedulingEnabled) { @@ -3437,32 +3437,32 @@ void KHTMLView::slotScrollBarMoved() m_part->xmlDocImpl()->documentElement()->dispatchHTMLEvent(EventImpl::SCROLL_EVENT, true, false); } -void KHTMLView::timerEvent ( TQTimerEvent *e ) +void TDEHTMLView::timerEvent ( TQTimerEvent *e ) { // kdDebug() << "timer event " << e->timerId() << endl; if ( e->timerId() == d->scrollTimerId ) { if( d->scrollSuspended ) return; switch (d->scrollDirection) { - case KHTMLViewPrivate::ScrollDown: + case TDEHTMLViewPrivate::ScrollDown: if (contentsY() + visibleHeight () >= contentsHeight()) d->newScrollTimer(this, 0); else scrollBy( 0, d->scrollBy ); break; - case KHTMLViewPrivate::ScrollUp: + case TDEHTMLViewPrivate::ScrollUp: if (contentsY() <= 0) d->newScrollTimer(this, 0); else scrollBy( 0, -d->scrollBy ); break; - case KHTMLViewPrivate::ScrollRight: + case TDEHTMLViewPrivate::ScrollRight: if (contentsX() + visibleWidth () >= contentsWidth()) d->newScrollTimer(this, 0); else scrollBy( d->scrollBy, 0 ); break; - case KHTMLViewPrivate::ScrollLeft: + case TDEHTMLViewPrivate::ScrollLeft: if (contentsX() <= 0) d->newScrollTimer(this, 0); else @@ -3480,7 +3480,7 @@ void KHTMLView::timerEvent ( TQTimerEvent *e ) horizontalScrollBar()->setEnabled( true ); } } -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET else if (d->m_caretViewContext && e->timerId() == d->m_caretViewContext->freqTimerId) { d->m_caretViewContext->visible = !d->m_caretViewContext->visible; @@ -3562,8 +3562,8 @@ void KHTMLView::timerEvent ( TQTimerEvent *e ) emit repaintAccessKeys(); if (d->emitCompletedAfterRepaint) { - bool full = d->emitCompletedAfterRepaint == KHTMLViewPrivate::CSFull; - d->emitCompletedAfterRepaint = KHTMLViewPrivate::CSNone; + bool full = d->emitCompletedAfterRepaint == TDEHTMLViewPrivate::CSFull; + d->emitCompletedAfterRepaint = TDEHTMLViewPrivate::CSNone; if ( full ) emit m_part->completed(); else @@ -3571,7 +3571,7 @@ void KHTMLView::timerEvent ( TQTimerEvent *e ) } } -void KHTMLView::scheduleRelayout(tdehtml::RenderObject * /*clippedObj*/) +void TDEHTMLView::scheduleRelayout(tdehtml::RenderObject * /*clippedObj*/) { if (!d->layoutSchedulingEnabled || d->layoutTimerId) return; @@ -3580,7 +3580,7 @@ void KHTMLView::scheduleRelayout(tdehtml::RenderObject * /*clippedObj*/) ? 1000 : 0 ); } -void KHTMLView::unscheduleRelayout() +void TDEHTMLView::unscheduleRelayout() { if (!d->layoutTimerId) return; @@ -3589,7 +3589,7 @@ void KHTMLView::unscheduleRelayout() d->layoutTimerId = 0; } -void KHTMLView::unscheduleRepaint() +void TDEHTMLView::unscheduleRepaint() { if (!d->repaintTimerId) return; @@ -3598,7 +3598,7 @@ void KHTMLView::unscheduleRepaint() d->repaintTimerId = 0; } -void KHTMLView::scheduleRepaint(int x, int y, int w, int h, bool asap) +void TDEHTMLView::scheduleRepaint(int x, int y, int w, int h, bool asap) { bool parsing = !m_part->xmlDocImpl() || m_part->xmlDocImpl()->parsing(); @@ -3628,9 +3628,9 @@ void KHTMLView::scheduleRepaint(int x, int y, int w, int h, bool asap) // kdDebug() << "starting timer " << time << endl; } -void KHTMLView::complete( bool pendingAction ) +void TDEHTMLView::complete( bool pendingAction ) { -// kdDebug() << "KHTMLView::complete()" << endl; +// kdDebug() << "TDEHTMLView::complete()" << endl; d->complete = true; @@ -3642,7 +3642,7 @@ void KHTMLView::complete( bool pendingAction ) killTimer(d->layoutTimerId); d->layoutTimerId = startTimer( 0 ); d->emitCompletedAfterRepaint = pendingAction ? - KHTMLViewPrivate::CSActionPending : KHTMLViewPrivate::CSFull; + TDEHTMLViewPrivate::CSActionPending : TDEHTMLViewPrivate::CSFull; } // is there a repaint pending? @@ -3653,7 +3653,7 @@ void KHTMLView::complete( bool pendingAction ) killTimer(d->repaintTimerId); d->repaintTimerId = startTimer( 20 ); d->emitCompletedAfterRepaint = pendingAction ? - KHTMLViewPrivate::CSActionPending : KHTMLViewPrivate::CSFull; + TDEHTMLViewPrivate::CSActionPending : TDEHTMLViewPrivate::CSFull; } if (!d->emitCompletedAfterRepaint) @@ -3666,19 +3666,19 @@ void KHTMLView::complete( bool pendingAction ) } -void KHTMLView::slotMouseScrollTimer() +void TDEHTMLView::slotMouseScrollTimer() { scrollBy( d->m_mouseScroll_byX, d->m_mouseScroll_byY ); } -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // ### the dependencies on static functions are a nightmare. just be // hacky and include the implementation here. Clean me up, please. #include "tdehtml_caret.cpp" -void KHTMLView::initCaret(bool keepSelection) +void TDEHTMLView::initCaret(bool keepSelection) { #if DEBUG_CARETMODE > 0 kdDebug(6200) << "begin initCaret" << endl; @@ -3713,7 +3713,7 @@ void KHTMLView::initCaret(bool keepSelection) #endif } -bool KHTMLView::caretOverrides() const +bool TDEHTMLView::caretOverrides() const { bool cm = m_part->isCaretMode(); bool dm = m_part->isEditable(); @@ -3722,7 +3722,7 @@ bool KHTMLView::caretOverrides() const && d->editorContext()->override; } -void KHTMLView::ensureNodeHasFocus(NodeImpl *node) +void TDEHTMLView::ensureNodeHasFocus(NodeImpl *node) { if (m_part->isCaretMode() || m_part->isEditable()) return; if (node->focused()) return; @@ -3754,7 +3754,7 @@ void KHTMLView::ensureNodeHasFocus(NodeImpl *node) emit m_part->nodeActivated(Node(firstAncestor)); } -void KHTMLView::recalcAndStoreCaretPos(CaretBox *hintBox) +void TDEHTMLView::recalcAndStoreCaretPos(CaretBox *hintBox) { if (!m_part || m_part->d->caretNode().isNull()) return; d->caretViewContext(); @@ -3795,13 +3795,13 @@ void KHTMLView::recalcAndStoreCaretPos(CaretBox *hintBox) #endif } -void KHTMLView::caretOn() +void TDEHTMLView::caretOn() { if (d->m_caretViewContext) { killTimer(d->m_caretViewContext->freqTimerId); if (hasFocus() || d->m_caretViewContext->displayNonFocused - == KHTMLPart::CaretBlink) { + == TDEHTMLPart::CaretBlink) { d->m_caretViewContext->freqTimerId = startTimer(500); } else { d->m_caretViewContext->freqTimerId = -1; @@ -3810,7 +3810,7 @@ void KHTMLView::caretOn() d->m_caretViewContext->visible = true; if ((d->m_caretViewContext->displayed = (hasFocus() || d->m_caretViewContext->displayNonFocused - != KHTMLPart::CaretInvisible))) { + != TDEHTMLPart::CaretInvisible))) { updateContents(d->m_caretViewContext->x, d->m_caretViewContext->y, d->m_caretViewContext->width, d->m_caretViewContext->height); @@ -3819,7 +3819,7 @@ void KHTMLView::caretOn() }/*end if*/ } -void KHTMLView::caretOff() +void TDEHTMLView::caretOff() { if (d->m_caretViewContext) { killTimer(d->m_caretViewContext->freqTimerId); @@ -3835,7 +3835,7 @@ void KHTMLView::caretOff() }/*end if*/ } -void KHTMLView::showCaret(bool forceRepaint) +void TDEHTMLView::showCaret(bool forceRepaint) { if (d->m_caretViewContext) { d->m_caretViewContext->displayed = true; @@ -3854,7 +3854,7 @@ void KHTMLView::showCaret(bool forceRepaint) }/*end if*/ } -bool KHTMLView::foldSelectionToCaret(NodeImpl *startNode, long startOffset, +bool TDEHTMLView::foldSelectionToCaret(NodeImpl *startNode, long startOffset, NodeImpl *endNode, long endOffset) { m_part->d->m_selectionStart = m_part->d->m_selectionEnd = m_part->d->caretNode(); @@ -3871,7 +3871,7 @@ bool KHTMLView::foldSelectionToCaret(NodeImpl *startNode, long startOffset, return folded; } -void KHTMLView::hideCaret() +void TDEHTMLView::hideCaret() { if (d->m_caretViewContext) { if (d->m_caretViewContext->visible) { @@ -3889,31 +3889,31 @@ void KHTMLView::hideCaret() }/*end if*/ } -int KHTMLView::caretDisplayPolicyNonFocused() const +int TDEHTMLView::caretDisplayPolicyNonFocused() const { if (d->m_caretViewContext) return d->m_caretViewContext->displayNonFocused; else - return KHTMLPart::CaretInvisible; + return TDEHTMLPart::CaretInvisible; } -void KHTMLView::setCaretDisplayPolicyNonFocused(int policy) +void TDEHTMLView::setCaretDisplayPolicyNonFocused(int policy) { d->caretViewContext(); // int old = d->m_caretViewContext->displayNonFocused; - d->m_caretViewContext->displayNonFocused = (KHTMLPart::CaretDisplayPolicy)policy; + d->m_caretViewContext->displayNonFocused = (TDEHTMLPart::CaretDisplayPolicy)policy; // make change immediately take effect if not focused if (!hasFocus()) { switch (d->m_caretViewContext->displayNonFocused) { - case KHTMLPart::CaretInvisible: + case TDEHTMLPart::CaretInvisible: hideCaret(); break; - case KHTMLPart::CaretBlink: + case TDEHTMLPart::CaretBlink: if (d->m_caretViewContext->freqTimerId != -1) break; d->m_caretViewContext->freqTimerId = startTimer(500); // fall through - case KHTMLPart::CaretVisible: + case TDEHTMLPart::CaretVisible: d->m_caretViewContext->displayed = true; showCaret(); break; @@ -3921,7 +3921,7 @@ void KHTMLView::setCaretDisplayPolicyNonFocused(int policy) }/*end if*/ } -bool KHTMLView::placeCaret(CaretBox *hintBox) +bool TDEHTMLView::placeCaret(CaretBox *hintBox) { CaretViewContext *cv = d->caretViewContext(); caretOff(); @@ -3941,7 +3941,7 @@ bool KHTMLView::placeCaret(CaretBox *hintBox) return false; } -void KHTMLView::ensureCaretVisible() +void TDEHTMLView::ensureCaretVisible() { CaretViewContext *cv = d->m_caretViewContext; if (!cv) return; @@ -3949,7 +3949,7 @@ void KHTMLView::ensureCaretVisible() d->scrollBarMoved = false; } -bool KHTMLView::extendSelection(NodeImpl *oldStartSel, long oldStartOfs, +bool TDEHTMLView::extendSelection(NodeImpl *oldStartSel, long oldStartOfs, NodeImpl *oldEndSel, long oldEndOfs) { bool changed = false; @@ -4001,7 +4001,7 @@ bool KHTMLView::extendSelection(NodeImpl *oldStartSel, long oldStartOfs, return changed; } -void KHTMLView::updateSelection(NodeImpl *oldStartSel, long oldStartOfs, +void TDEHTMLView::updateSelection(NodeImpl *oldStartSel, long oldStartOfs, NodeImpl *oldEndSel, long oldEndOfs) { if (m_part->d->m_selectionStart == m_part->d->m_selectionEnd @@ -4035,7 +4035,7 @@ void KHTMLView::updateSelection(NodeImpl *oldStartSel, long oldStartOfs, }/*end if*/ } -void KHTMLView::caretKeyPressEvent(TQKeyEvent *_ke) +void TDEHTMLView::caretKeyPressEvent(TQKeyEvent *_ke) { NodeImpl *oldStartSel = m_part->d->m_selectionStart.handle(); long oldStartOfs = m_part->d->m_startOffset; @@ -4112,7 +4112,7 @@ void KHTMLView::caretKeyPressEvent(TQKeyEvent *_ke) _ke->accept(); } -bool KHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel) +bool TDEHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel) { if (!node) return false; ElementImpl *baseElem = determineBaseElement(node); @@ -4128,7 +4128,7 @@ bool KHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel) CaretBoxIterator cbit; CaretBoxLine *cbl = findCaretBoxLine(node, offset, &cblDeleter, base, r_ofs, cbit); if(!cbl) { - kdWarning() << "KHTMLView::moveCaretTo - findCaretBoxLine() returns NULL" << endl; + kdWarning() << "TDEHTMLView::moveCaretTo - findCaretBoxLine() returns NULL" << endl; return false; } @@ -4187,7 +4187,7 @@ bool KHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel) return selChanged; } -void KHTMLView::moveCaretByLine(bool next, int count) +void TDEHTMLView::moveCaretByLine(bool next, int count) { Node &caretNodeRef = m_part->d->caretNode(); if (caretNodeRef.isNull()) return; @@ -4218,7 +4218,7 @@ void KHTMLView::moveCaretByLine(bool next, int count) placeCaretOnLine(caretBox, x, absx, absy); } -void KHTMLView::placeCaretOnLine(CaretBox *caretBox, int x, int absx, int absy) +void TDEHTMLView::placeCaretOnLine(CaretBox *caretBox, int x, int absx, int absy) { // paranoia sanity check if (!caretBox) return; @@ -4313,7 +4313,7 @@ void KHTMLView::placeCaretOnLine(CaretBox *caretBox, int x, int absx, int absy) caretOn(); } -void KHTMLView::moveCaretToLineBoundary(bool end) +void TDEHTMLView::moveCaretToLineBoundary(bool end) { Node &caretNodeRef = m_part->d->caretNode(); if (caretNodeRef.isNull()) return; @@ -4343,7 +4343,7 @@ void KHTMLView::moveCaretToLineBoundary(bool end) placeCaretOnLine(b, x, absx, absy); } -void KHTMLView::moveCaretToDocumentBoundary(bool end) +void TDEHTMLView::moveCaretToDocumentBoundary(bool end) { Node &caretNodeRef = m_part->d->caretNode(); if (caretNodeRef.isNull()) return; @@ -4373,7 +4373,7 @@ void KHTMLView::moveCaretToDocumentBoundary(bool end) placeCaretOnLine(b, x, absx, absy); } -void KHTMLView::moveCaretBy(bool next, CaretMovement cmv, int count) +void TDEHTMLView::moveCaretBy(bool next, CaretMovement cmv, int count) { if (!m_part) return; Node &caretNodeRef = m_part->d->caretNode(); @@ -4421,7 +4421,7 @@ void KHTMLView::moveCaretBy(bool next, CaretMovement cmv, int count) placeCaretOnChar(hintBox); } -void KHTMLView::placeCaretOnChar(CaretBox *hintBox) +void TDEHTMLView::placeCaretOnChar(CaretBox *hintBox) { caretOff(); recalcAndStoreCaretPos(hintBox); @@ -4436,7 +4436,7 @@ void KHTMLView::placeCaretOnChar(CaretBox *hintBox) caretOn(); } -void KHTMLView::moveCaretByPage(bool next) +void TDEHTMLView::moveCaretByPage(bool next) { Node &caretNodeRef = m_part->d->caretNode(); if (caretNodeRef.isNull()) return; @@ -4465,47 +4465,47 @@ void KHTMLView::moveCaretByPage(bool next) placeCaretOnLine(caretBox, x, absx, absy); } -void KHTMLView::moveCaretPrevWord() +void TDEHTMLView::moveCaretPrevWord() { moveCaretBy(false, CaretByWord, 1); } -void KHTMLView::moveCaretNextWord() +void TDEHTMLView::moveCaretNextWord() { moveCaretBy(true, CaretByWord, 1); } -void KHTMLView::moveCaretPrevLine(int n) +void TDEHTMLView::moveCaretPrevLine(int n) { moveCaretByLine(false, n); } -void KHTMLView::moveCaretNextLine(int n) +void TDEHTMLView::moveCaretNextLine(int n) { moveCaretByLine(true, n); } -void KHTMLView::moveCaretPrevPage() +void TDEHTMLView::moveCaretPrevPage() { moveCaretByPage(false); } -void KHTMLView::moveCaretNextPage() +void TDEHTMLView::moveCaretNextPage() { moveCaretByPage(true); } -void KHTMLView::moveCaretToLineBegin() +void TDEHTMLView::moveCaretToLineBegin() { moveCaretToLineBoundary(false); } -void KHTMLView::moveCaretToLineEnd() +void TDEHTMLView::moveCaretToLineEnd() { moveCaretToLineBoundary(true); } -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET #ifndef NO_SMOOTH_SCROLL_HACK #define timer timer2 @@ -4515,7 +4515,7 @@ static const int SCROLL_TIME = 240; // Each step is 20 ms == 50 frames/second static const int SCROLL_TICK = 20; -void KHTMLView::scrollBy(int dx, int dy) +void TDEHTMLView::scrollBy(int dx, int dy) { TDEConfigGroup cfg( TDEGlobal::config(), "KDE" ); if( !cfg.readBoolEntry( "SmoothScrolling", false )) { @@ -4552,7 +4552,7 @@ void KHTMLView::scrollBy(int dx, int dy) } } -void KHTMLView::scrollTick() { +void TDEHTMLView::scrollTick() { if (d->dx == 0 && d->dy == 0) { stopScrolling(); return; @@ -4586,13 +4586,13 @@ void KHTMLView::scrollTick() { kapp->syncX(); } -void KHTMLView::startScrolling() +void TDEHTMLView::startScrolling() { d->scrolling = true; d->timer.start(SCROLL_TICK, false); } -void KHTMLView::stopScrolling() +void TDEHTMLView::stopScrolling() { d->timer.stop(); d->dx = d->dy = 0; @@ -4600,7 +4600,7 @@ void KHTMLView::stopScrolling() } // Overloaded from TQScrollView and TQScrollBar -void KHTMLView::scrollViewWheelEvent( TQWheelEvent *e ) +void TDEHTMLView::scrollViewWheelEvent( TQWheelEvent *e ) { int pageStep = verticalScrollBar()->pageStep(); int lineStep = verticalScrollBar()->lineStep(); diff --git a/tdehtml/tdehtmlview.h b/tdehtml/tdehtmlview.h index 5448f32f8..f67f712f0 100644 --- a/tdehtml/tdehtmlview.h +++ b/tdehtml/tdehtmlview.h @@ -22,8 +22,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef KHTMLVIEW_H -#define KHTMLVIEW_H +#ifndef TDEHTMLVIEW_H +#define TDEHTMLVIEW_H // qt includes and classes #include @@ -67,15 +67,15 @@ namespace tdehtml { void applyRule(DOM::CSSProperty *prop); } -class KHTMLPart; -class KHTMLViewPrivate; +class TDEHTMLPart; +class TDEHTMLViewPrivate; /** * Renders and displays HTML in a TQScrollView. * * Suitable for use as an application's main view. **/ -class KHTML_EXPORT KHTMLView : public TQScrollView +class TDEHTML_EXPORT TDEHTMLView : public TQScrollView { Q_OBJECT @@ -86,7 +86,7 @@ class KHTML_EXPORT KHTMLView : public TQScrollView friend class DOM::HTMLAnchorElementImpl; friend class DOM::HTMLInputElementImpl; friend class DOM::DocumentImpl; - friend class KHTMLPart; + friend class TDEHTMLPart; friend class tdehtml::RenderCanvas; friend class tdehtml::RenderObject; friend class tdehtml::RenderLineEdit; @@ -101,16 +101,16 @@ class KHTML_EXPORT KHTMLView : public TQScrollView public: /** - * Constructs a KHTMLView. + * Constructs a TDEHTMLView. */ - KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name=0 ); - virtual ~KHTMLView(); + TDEHTMLView( TDEHTMLPart *part, TQWidget *parent, const char *name=0 ); + virtual ~TDEHTMLView(); /** - * Returns a pointer to the KHTMLPart that is + * Returns a pointer to the TDEHTMLPart that is * rendering the page. **/ - KHTMLPart *part() const { return m_part; } + TDEHTMLPart *part() const { return m_part; } int frameWidth() const { return _width; } @@ -173,7 +173,7 @@ public: signals: /** * This signal is used for internal layouting. Don't use it to check if rendering finished. - * Use @ref KHTMLPart completed() signal instead. + * Use @ref TDEHTMLPart completed() signal instead. */ void finishedLayout(); void cleared(); @@ -296,9 +296,9 @@ private: bool focusNextPrevNode(bool next); bool handleAccessKey(const TQKeyEvent* ev); - bool focusNodeWithAccessKey(TQChar c, KHTMLView* caller = NULL); + bool focusNodeWithAccessKey(TQChar c, TDEHTMLView* caller = NULL); TQMap< DOM::ElementImpl*, TQChar > buildFallbackAccessKeys() const; - void displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks ); + void displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks ); void useSlowRepaints(); @@ -328,13 +328,13 @@ private: void complete( bool pendingAction ); -#ifndef KHTML_NO_TYPE_AHEAD_FIND +#ifndef TDEHTML_NO_TYPE_AHEAD_FIND void findAhead(bool increase); void updateFindAheadTimeout(); void startFindAhead( bool linksOnly ); -#endif // KHTML_NO_TYPE_AHEAD_FIND +#endif // TDEHTML_NO_TYPE_AHEAD_FIND -#ifndef KHTML_NO_CARET +#ifndef TDEHTML_NO_CARET // -- caret-related member functions (for caretMode as well as designMode) /** initializes the caret if it hasn't been initialized yet. @@ -463,14 +463,14 @@ private: /** * Returns the current caret policy when the view is not focused. - * @return a KHTMLPart::CaretDisplay value + * @return a TDEHTMLPart::CaretDisplay value */ int caretDisplayPolicyNonFocused() const; /** * Sets the caret display policy when the view is not focused. * @param policy new display policy as - * defined by KHTMLPart::CaretDisplayPolicy + * defined by TDEHTMLPart::CaretDisplayPolicy * @since 3.2 */ void setCaretDisplayPolicyNonFocused(int policy); @@ -601,7 +601,7 @@ private: */ void moveCaretToLineEnd(); -#endif // KHTML_NO_CARET +#endif // TDEHTML_NO_CARET // ------------------------------------- member variables ------------------------------------ private: @@ -614,8 +614,8 @@ private: int _marginWidth; int _marginHeight; - KHTMLPart *m_part; - KHTMLViewPrivate *d; + TDEHTMLPart *m_part; + TDEHTMLViewPrivate *d; TQString m_medium; // media type }; diff --git a/tdehtml/tdemultipart/README b/tdehtml/tdemultipart/README index c8a342d68..0fd6eb306 100644 --- a/tdehtml/tdemultipart/README +++ b/tdehtml/tdemultipart/README @@ -1,4 +1,4 @@ -KMultiPart implements "server push" for KHTML/Konqueror: +KMultiPart implements "server push" for TDEHTML/Konqueror: it handles the multipart/mixed and multipart/x-mixed-replace mimetype, embedding the appropriate component (part). @@ -11,6 +11,6 @@ Testcases: TODO: * Use the new streaming API of KParts to pipe data into the part, -the current code does that for KHTML only. -* Change KHTML so that it embeds KMultiPart for images which send multipart/x-mixed-replace +the current code does that for TDEHTML only. +* Change TDEHTML so that it embeds KMultiPart for images which send multipart/x-mixed-replace data. diff --git a/tdehtml/tdemultipart/tdemultipart.cpp b/tdehtml/tdemultipart/tdemultipart.cpp index 82e94a4c0..ac0c67b53 100644 --- a/tdehtml/tdemultipart/tdemultipart.cpp +++ b/tdehtml/tdemultipart/tdemultipart.cpp @@ -334,7 +334,7 @@ void KMultiPart::setPart( const TQString& mimeType ) { // Forward signals from the part's browser extension - // this is very related (but not exactly like) KHTMLPart::processObjectRequest + // this is very related (but not exactly like) TDEHTMLPart::processObjectRequest connect( childExtension, TQT_SIGNAL( openURLNotify() ), m_extension, TQT_SIGNAL( openURLNotify() ) ); @@ -396,7 +396,7 @@ void KMultiPart::setPart( const TQString& mimeType ) m_partIsLoading = false; // Load the part's plugins too. - // ###### This is a hack. The bug is that KHTMLPart doesn't load its plugins + // ###### This is a hack. The bug is that TDEHTMLPart doesn't load its plugins // if className != "Browser/View". loadPlugins( this, m_part, m_part->instance() ); // Get the part's GUI to appear @@ -437,7 +437,7 @@ void KMultiPart::startOfData() } if ( m_isHTMLPart ) { - KHTMLPart* htmlPart = static_cast( static_cast( m_part ) ); + TDEHTMLPart* htmlPart = static_cast( static_cast( m_part ) ); htmlPart->begin( url() ); } else @@ -463,7 +463,7 @@ void KMultiPart::reallySendData( const TQByteArray& line ) { if ( m_isHTMLPart ) { - KHTMLPart* htmlPart = static_cast( static_cast( m_part ) ); + TDEHTMLPart* htmlPart = static_cast( static_cast( m_part ) ); htmlPart->write( line.data(), line.size() ); } else if ( m_tempFile ) @@ -477,7 +477,7 @@ void KMultiPart::endOfData() Q_ASSERT( m_part ); if ( m_isHTMLPart ) { - KHTMLPart* htmlPart = static_cast( static_cast( m_part ) ); + TDEHTMLPart* htmlPart = static_cast( static_cast( m_part ) ); htmlPart->end(); } else if ( m_tempFile ) { @@ -600,12 +600,12 @@ int KMultiPartBrowserExtension::yOffset() void KMultiPartBrowserExtension::print() { - static_cast( m_imgPart->doc()->browserExtension() )->print(); + static_cast( m_imgPart->doc()->browserExtension() )->print(); } void KMultiPartBrowserExtension::reparseConfiguration() { - static_cast( m_imgPart->doc()->browserExtension() )->reparseConfiguration(); + static_cast( m_imgPart->doc()->browserExtension() )->reparseConfiguration(); m_imgPart->doc()->setAutoloadImages( true ); } #endif diff --git a/tdehtml/tdemultipart/tdemultipart.h b/tdehtml/tdemultipart/tdemultipart.h index e4add0816..776584c91 100644 --- a/tdehtml/tdemultipart/tdemultipart.h +++ b/tdehtml/tdemultipart/tdemultipart.h @@ -28,7 +28,7 @@ #include #include -class KHTMLPart; +class TDEHTMLPart; class TDEInstance; class KTempFile; class KLineParser; diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp index 497126d8c..1cea041ee 100644 --- a/tdehtml/test_regression.cpp +++ b/tdehtml/test_regression.cpp @@ -114,7 +114,7 @@ static pid_t xvfb; PartMonitor *PartMonitor::sm_highestMonitor = NULL; -PartMonitor::PartMonitor(KHTMLPart *_part) +PartMonitor::PartMonitor(TDEHTMLPart *_part) { m_part = _part; m_completed = false; @@ -271,19 +271,19 @@ Value RegTestFunction::call(ExecState *exec, Object &/*thisObj*/, const List &ar // ------------------------------------------------------------------------- -KHTMLPartObject::KHTMLPartObject(ExecState *exec, KHTMLPart *_part) +TDEHTMLPartObject::TDEHTMLPartObject(ExecState *exec, TDEHTMLPart *_part) { m_part = _part; - putDirect("openPage", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::OpenPage,1), DontEnum); - putDirect("openPageAsUrl", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::OpenPageAsUrl,1), DontEnum); - putDirect("begin", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::Begin,1), DontEnum); - putDirect("write", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::Write,1), DontEnum); - putDirect("end", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::End,0), DontEnum); - putDirect("executeScript", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::ExecuteScript,0), DontEnum); - putDirect("processEvents", new KHTMLPartFunction(exec,m_part,KHTMLPartFunction::ProcessEvents,0), DontEnum); + putDirect("openPage", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::OpenPage,1), DontEnum); + putDirect("openPageAsUrl", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::OpenPageAsUrl,1), DontEnum); + putDirect("begin", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::Begin,1), DontEnum); + putDirect("write", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::Write,1), DontEnum); + putDirect("end", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::End,0), DontEnum); + putDirect("executeScript", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::ExecuteScript,0), DontEnum); + putDirect("processEvents", new TDEHTMLPartFunction(exec,m_part,TDEHTMLPartFunction::ProcessEvents,0), DontEnum); } -Value KHTMLPartObject::get(ExecState *exec, const Identifier &propertyName) const +Value TDEHTMLPartObject::get(ExecState *exec, const Identifier &propertyName) const { if (propertyName == "document") return getDOMNode(exec,m_part->document()); @@ -293,19 +293,19 @@ Value KHTMLPartObject::get(ExecState *exec, const Identifier &propertyName) cons return ObjectImp::get(exec,propertyName); } -KHTMLPartFunction::KHTMLPartFunction(ExecState */*exec*/, KHTMLPart *_part, int _id, int length) +TDEHTMLPartFunction::TDEHTMLPartFunction(ExecState */*exec*/, TDEHTMLPart *_part, int _id, int length) { m_part = _part; id = _id; putDirect("length",length); } -bool KHTMLPartFunction::implementsCall() const +bool TDEHTMLPartFunction::implementsCall() const { return true; } -Value KHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &args) +Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &args) { Value result = Undefined(); @@ -534,7 +534,7 @@ int main(int argc, char *argv[]) cfg.writeEntry( "Fonts", TQStringList() ); cfg.writeEntry( "DefaultEncoding", "" ); cfg.setGroup("Java/JavaScript Settings"); - cfg.writeEntry( "WindowOpenPolicy", KHTMLSettings::KJSWindowOpenAllow); + cfg.writeEntry( "WindowOpenPolicy", TDEHTMLSettings::KJSWindowOpenAllow); cfg.sync(); @@ -557,9 +557,9 @@ int main(int argc, char *argv[]) } // create widgets - KHTMLFactory *fac = new KHTMLFactory(); + TDEHTMLFactory *fac = new TDEHTMLFactory(); KMainWindow *toplevel = new KMainWindow(); - KHTMLPart *part = new KHTMLPart( toplevel, 0, toplevel, 0, KHTMLPart::BrowserViewGUI ); + TDEHTMLPart *part = new TDEHTMLPart( toplevel, 0, toplevel, 0, TDEHTMLPart::BrowserViewGUI ); toplevel->setCentralWidget( part->widget() ); part->setJScriptEnabled(true); @@ -670,7 +670,7 @@ int main(int argc, char *argv[]) RegressionTest *RegressionTest::curr = 0; -RegressionTest::RegressionTest(KHTMLPart *part, const TQString &baseDir, const TQString &outputDir, +RegressionTest::RegressionTest(TDEHTMLPart *part, const TQString &baseDir, const TQString &outputDir, bool _genOutput, bool runJS, bool runHTML) : TQObject(part) { @@ -820,7 +820,7 @@ bool RegressionTest::runTests(TQString relPath, bool mustExist, int known_failur return true; } -void RegressionTest::getPartDOMOutput( TQTextStream &outputStream, KHTMLPart* part, uint indent ) +void RegressionTest::getPartDOMOutput( TQTextStream &outputStream, TDEHTMLPart* part, uint indent ) { Node node = part->document(); while (!node.isNull()) { @@ -849,7 +849,7 @@ void RegressionTest::getPartDOMOutput( TQTextStream &outputStream, KHTMLPart* pa if ( node.handle()->id() == ID_FRAME ) { outputStream << endl; TQString frameName = static_cast( node.handle() )->name.string(); - KHTMLPart* frame = part->findFrame( frameName ); + TDEHTMLPart* frame = part->findFrame( frameName ); Q_ASSERT( frame ); if ( frame ) getPartDOMOutput( outputStream, frame, indent ); @@ -910,7 +910,7 @@ void RegressionTest::getPartDOMOutput( TQTextStream &outputStream, KHTMLPart* pa } } -void RegressionTest::dumpRenderTree( TQTextStream &outputStream, KHTMLPart* part ) +void RegressionTest::dumpRenderTree( TQTextStream &outputStream, TDEHTMLPart* part ) { DOM::DocumentImpl* doc = static_cast( part->document().handle() ); if ( !doc || !doc->renderer() ) @@ -923,7 +923,7 @@ void RegressionTest::dumpRenderTree( TQTextStream &outputStream, KHTMLPart* part names.sort(); for ( TQStringList::iterator it = names.begin(); it != names.end(); ++it ) { outputStream << "FRAME: " << (*it) << "\n"; - KHTMLPart* frame = part->findFrame( (*it) ); + TDEHTMLPart* frame = part->findFrame( (*it) ); Q_ASSERT( frame ); if ( frame ) dumpRenderTree( outputStream, frame ); @@ -1411,7 +1411,7 @@ void RegressionTest::testJSFile(const TQString & filename ) ScriptInterpreter interp(global,&frame); ExecState *exec = interp.globalExec(); - global.put(exec, "part", Object(new KHTMLPartObject(exec,m_part))); + global.put(exec, "part", Object(new TDEHTMLPartObject(exec,m_part))); global.put(exec, "regtest", Object(new RegTestObject(exec,this))); global.put(exec, "debug", Object(new RegTestFunction(exec,this,RegTestFunction::Print,1) ) ); global.put(exec, "print", Object(new RegTestFunction(exec,this,RegTestFunction::Print,1) ) ); diff --git a/tdehtml/test_regression.h b/tdehtml/test_regression.h index 74f56cc72..b6791bd32 100644 --- a/tdehtml/test_regression.h +++ b/tdehtml/test_regression.h @@ -40,12 +40,12 @@ class PartMonitor : public TQObject { Q_OBJECT public: - PartMonitor(KHTMLPart *_part); + PartMonitor(TDEHTMLPart *_part); ~PartMonitor(); void waitForCompletion(); static PartMonitor* sm_highestMonitor; bool m_completed; - KHTMLPart *m_part; + TDEHTMLPart *m_part; int m_timer_waits; TQTimer *m_timeout_timer; public slots: @@ -87,31 +87,31 @@ private: /** * @internal */ -class KHTMLPartObject : public KJS::ObjectImp +class TDEHTMLPartObject : public KJS::ObjectImp { public: - KHTMLPartObject(KJS::ExecState *exec, KHTMLPart *_part); + TDEHTMLPartObject(KJS::ExecState *exec, TDEHTMLPart *_part); virtual KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; private: - KHTMLPart *m_part; + TDEHTMLPart *m_part; }; /** * @internal */ -class KHTMLPartFunction : public KJS::ObjectImp +class TDEHTMLPartFunction : public KJS::ObjectImp { public: - KHTMLPartFunction(KJS::ExecState *exec, KHTMLPart *_part, int _id, int length); + TDEHTMLPartFunction(KJS::ExecState *exec, TDEHTMLPart *_part, int _id, int length); bool implementsCall() const; KJS::Value call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args); enum { OpenPage, OpenPageAsUrl, Begin, Write, End, ExecuteScript, ProcessEvents }; private: - KHTMLPart *m_part; + TDEHTMLPart *m_part; int id; }; @@ -127,14 +127,14 @@ class RegressionTest : public TQObject Q_OBJECT public: - RegressionTest(KHTMLPart *part, const TQString &baseDir, const TQString &outputDir, + RegressionTest(TDEHTMLPart *part, const TQString &baseDir, const TQString &outputDir, bool _genOutput, bool runJS, bool runHTML); ~RegressionTest(); enum OutputType { DOMTree, RenderTree }; TQString getPartOutput( OutputType type ); - void getPartDOMOutput( TQTextStream &outputStream, KHTMLPart* part, uint indent ); - void dumpRenderTree( TQTextStream &outputStream, KHTMLPart* part ); + void getPartDOMOutput( TQTextStream &outputStream, TDEHTMLPart* part, uint indent ); + void dumpRenderTree( TQTextStream &outputStream, TDEHTMLPart* part ); void testStaticFile(const TQString& filename); void testJSFile(const TQString& filename); enum CheckResult { Failure = 0, Success = 1, Ignored = 2 }; @@ -152,7 +152,7 @@ public: void doJavascriptReport( const TQString &test ); void doFailureReport( const TQString& test, int failures ); - KHTMLPart *m_part; + TDEHTMLPart *m_part; TQString m_baseDir; TQString m_outputDir; bool m_genOutput; diff --git a/tdehtml/test_regression_fontoverload.cpp b/tdehtml/test_regression_fontoverload.cpp index f3102b20b..744150ffe 100644 --- a/tdehtml/test_regression_fontoverload.cpp +++ b/tdehtml/test_regression_fontoverload.cpp @@ -265,7 +265,7 @@ KDE_EXPORT bool TQFontDatabase::isSmoothlyScalable( const TQString &, return true; } -const TQString &KHTMLSettings::availableFamilies() +const TQString &TDEHTMLSettings::availableFamilies() { if ( !avFamilies ) { avFamilies = new TQString; @@ -275,7 +275,7 @@ const TQString &KHTMLSettings::availableFamilies() return *avFamilies; } -bool KHTMLSettings::unfinishedImageFrame() const +bool TDEHTMLSettings::unfinishedImageFrame() const { return false; } diff --git a/tdehtml/testtdehtml.cpp b/tdehtml/testtdehtml.cpp index 1da21be1f..001780dc2 100644 --- a/tdehtml/testtdehtml.cpp +++ b/tdehtml/testtdehtml.cpp @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) { TDECmdLineArgs::init(argc, argv, "testtdehtml", "Testtdehtml", - "a basic web browser using the KHTML library", "1.0"); + "a basic web browser using the TDEHTML library", "1.0"); TDECmdLineArgs::addCmdLineOptions(options); TDEApplication a; @@ -49,11 +49,11 @@ int main(int argc, char *argv[]) } #ifndef __KDE_HAVE_GCC_VISIBILITY - KHTMLFactory *fac = new KHTMLFactory(true); + TDEHTMLFactory *fac = new TDEHTMLFactory(true); #endif KMainWindow *toplevel = new KMainWindow(); - KHTMLPart *doc = new KHTMLPart( toplevel, 0, toplevel, 0, KHTMLPart::BrowserViewGUI ); + TDEHTMLPart *doc = new TDEHTMLPart( toplevel, 0, toplevel, 0, TDEHTMLPart::BrowserViewGUI ); Dummy *dummy = new Dummy( doc ); TQObject::connect( doc->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ), diff --git a/tdehtml/testtdehtml.h b/tdehtml/testtdehtml.h index 4fd76d044..dcb4c1583 100644 --- a/tdehtml/testtdehtml.h +++ b/tdehtml/testtdehtml.h @@ -1,5 +1,5 @@ -#ifndef TESTKHTML_H -#define TESTKHTML_H +#ifndef TESTTDEHTML_H +#define TESTTDEHTML_H #include #include @@ -12,7 +12,7 @@ class Dummy : public TQObject { Q_OBJECT public: - Dummy( KHTMLPart *part ) : TQObject( part ) { m_part = part; }; + Dummy( TDEHTMLPart *part ) : TQObject( part ) { m_part = part; }; private slots: void slotOpenURL( const KURL &url, const KParts::URLArgs &args ) @@ -43,7 +43,7 @@ private slots: void handleDone(); private: - KHTMLPart *m_part; + TDEHTMLPart *m_part; TQValueList filesToBenchmark; TQMap > results; int benchmarkRun; diff --git a/tdehtml/xml/dom2_eventsimpl.cpp b/tdehtml/xml/dom2_eventsimpl.cpp index c0bb10f9a..e6af64184 100644 --- a/tdehtml/xml/dom2_eventsimpl.cpp +++ b/tdehtml/xml/dom2_eventsimpl.cpp @@ -179,11 +179,11 @@ EventImpl::EventId EventImpl::typeToId(DOMString type) else if ( type == "keypress" ) return KEYPRESS_EVENT; else if ( type == "readystatechange" ) - return KHTML_READYSTATECHANGE_EVENT; + return TDEHTML_READYSTATECHANGE_EVENT; else if ( type == "dblclick" ) - return KHTML_ECMA_DBLCLICK_EVENT; + return TDEHTML_ECMA_DBLCLICK_EVENT; - // ignore: KHTML_CLICK_EVENT + // ignore: TDEHTML_CLICK_EVENT return UNKNOWN_EVENT; } @@ -254,15 +254,15 @@ DOMString EventImpl::idToType(EventImpl::EventId id) return "keypress"; //DOM3 ev. suggests textInput, but it's better for compat this way //tdehtml extensions - case KHTML_ECMA_DBLCLICK_EVENT: + case TDEHTML_ECMA_DBLCLICK_EVENT: return "dblclick"; - case KHTML_ECMA_CLICK_EVENT: + case TDEHTML_ECMA_CLICK_EVENT: return "click"; - case KHTML_DRAGDROP_EVENT: + case TDEHTML_DRAGDROP_EVENT: return "tdehtml_dragdrop"; - case KHTML_MOVE_EVENT: + case TDEHTML_MOVE_EVENT: return "tdehtml_move"; - case KHTML_READYSTATECHANGE_EVENT: + case TDEHTML_READYSTATECHANGE_EVENT: return "readystatechange"; default: @@ -454,7 +454,7 @@ void MouseEventImpl::initMouseEvent(const DOMString &typeArg, m_clientY = clientYArg; m_pageX = clientXArg; m_pageY = clientYArg; - KHTMLView* v; + TDEHTMLView* v; if ( view() && view()->document() && ( v = view()->document()->view() ) ) { m_pageX += v->contentsX(); m_pageY += v->contentsY(); diff --git a/tdehtml/xml/dom2_eventsimpl.h b/tdehtml/xml/dom2_eventsimpl.h index 5d99afbbe..0f48fa605 100644 --- a/tdehtml/xml/dom2_eventsimpl.h +++ b/tdehtml/xml/dom2_eventsimpl.h @@ -28,7 +28,7 @@ #include "dom/dom2_events.h" #include "xml/dom2_viewsimpl.h" -class KHTMLPart; +class TDEHTMLPart; class TQMouseEvent; namespace DOM { @@ -81,12 +81,12 @@ public: KEYUP_EVENT, KEYPRESS_EVENT, //Mostly corresponds to DOM3 textInput event. // tdehtml events (not part of DOM) - KHTML_ECMA_DBLCLICK_EVENT, // for html ondblclick - KHTML_ECMA_CLICK_EVENT, // for html onclick - KHTML_DRAGDROP_EVENT, - KHTML_MOVE_EVENT, + TDEHTML_ECMA_DBLCLICK_EVENT, // for html ondblclick + TDEHTML_ECMA_CLICK_EVENT, // for html onclick + TDEHTML_DRAGDROP_EVENT, + TDEHTML_MOVE_EVENT, // XMLHttpRequest events - KHTML_READYSTATECHANGE_EVENT + TDEHTML_READYSTATECHANGE_EVENT }; EventImpl(); diff --git a/tdehtml/xml/dom2_rangeimpl.cpp b/tdehtml/xml/dom2_rangeimpl.cpp index b160ce23f..c7b19de5c 100644 --- a/tdehtml/xml/dom2_rangeimpl.cpp +++ b/tdehtml/xml/dom2_rangeimpl.cpp @@ -1139,7 +1139,7 @@ DOMString RangeImpl::toHTML( int &exceptioncode ) text = DOMString("\n" "\n" "\n" - "\n" + "\n" "\n") + text + ""; diff --git a/tdehtml/xml/dom_docimpl.cpp b/tdehtml/xml/dom_docimpl.cpp index 5614dbf2e..854d7b3e3 100644 --- a/tdehtml/xml/dom_docimpl.cpp +++ b/tdehtml/xml/dom_docimpl.cpp @@ -200,12 +200,12 @@ CSSStyleSheetImpl *DOMImplementationImpl::createCSSStyleSheet(DOMStringImpl* /*t return sheet; } -DocumentImpl *DOMImplementationImpl::createDocument( KHTMLView *v ) +DocumentImpl *DOMImplementationImpl::createDocument( TDEHTMLView *v ) { return new DocumentImpl(this, v); } -HTMLDocumentImpl *DOMImplementationImpl::createHTMLDocument( KHTMLView *v ) +HTMLDocumentImpl *DOMImplementationImpl::createHTMLDocument( TDEHTMLView *v ) { return new HTMLDocumentImpl(this, v); } @@ -288,8 +288,8 @@ ElementMappingCache::ItemInfo* ElementMappingCache::get(const TQString& id) static KStaticDeleter< TQPtrList > s_changedDocumentsDeleter; TQPtrList * DocumentImpl::changedDocuments; -// KHTMLView might be 0 -DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v) +// TDEHTMLView might be 0 +DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v) : NodeBaseImpl( 0 ), m_domtree_version(0), m_counterDict(257), m_imageLoadEventTimer(0) { @@ -304,7 +304,7 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v) m_view = v; m_renderArena.reset(); - KHTMLFactory::ref(); + TDEHTMLFactory::ref(); if ( v ) { m_docLoader = new DocLoader(v->part(), this ); @@ -459,7 +459,7 @@ DocumentImpl::~DocumentImpl() m_renderArena.reset(); - KHTMLFactory::deref(); + TDEHTMLFactory::deref(); } @@ -1132,7 +1132,7 @@ void DocumentImpl::recalcStyle( StyleChange change ) fontDef.italic = f.italic(); fontDef.weight = f.weight(); if (m_view) { - const KHTMLSettings *settings = m_view->part()->settings(); + const TDEHTMLSettings *settings = m_view->part()->settings(); TQString stdfont = settings->stdFontName(); if ( !stdfont.isEmpty() ) fontDef.family = stdfont; @@ -1317,7 +1317,7 @@ void DocumentImpl::open( bool clearEventListeners ) delete m_tokenizer; m_tokenizer = 0; - KHTMLView* view = m_view; + TDEHTMLView* view = m_view; bool was_attached = attached(); if ( was_attached ) detach(); @@ -1662,7 +1662,7 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con { assert(!equiv.isNull() && !content.isNull()); - KHTMLView *v = getDocument()->view(); + TDEHTMLView *v = getDocument()->view(); if(strcasecmp(equiv, "refresh") == 0 && v && v->part()->metaRefreshEnabled()) { @@ -2336,12 +2336,12 @@ void DocumentImpl::notifyBeforeNodeRemoval(NodeImpl *n) bool DocumentImpl::isURLAllowed(const TQString& url) const { - KHTMLPart *thisPart = part(); + TDEHTMLPart *thisPart = part(); KURL newURL(completeURL(url)); newURL.setRef(TQString::null); - if (KHTMLFactory::defaultHTMLSettings()->isAdFiltered( newURL.url() )) + if (TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered( newURL.url() )) return false; // Prohibit non-file URLs if we are asked to. @@ -2355,7 +2355,7 @@ bool DocumentImpl::isURLAllowed(const TQString& url) const // We allow one level of self-reference because some sites depend on that. // But we don't allow more than one. bool foundSelfReference = false; - for (KHTMLPart *part = thisPart; part; part = part->parentPart()) { + for (TDEHTMLPart *part = thisPart; part; part = part->parentPart()) { KURL partURL = part->url(); partURL.setRef(TQString::null); if (partURL == newURL) { @@ -2619,7 +2619,7 @@ void DocumentImpl::setDecoderCodec(const TQTextCodec *codec) ElementImpl *DocumentImpl::ownerElement() const { - KHTMLPart *childPart = part(); + TDEHTMLPart *childPart = part(); if (!childPart) return 0; ChildFrame *childFrame = childPart->d->m_frame; @@ -2675,9 +2675,9 @@ DOMString DocumentImpl::toString() const } -KHTMLPart* DOM::DocumentImpl::part() const +TDEHTMLPart* DOM::DocumentImpl::part() const { - // ### TODO: make this independent from a KHTMLView one day. + // ### TODO: make this independent from a TDEHTMLView one day. return view() ? view()->part() : 0; } diff --git a/tdehtml/xml/dom_docimpl.h b/tdehtml/xml/dom_docimpl.h index 18b164643..9cacfd9f5 100644 --- a/tdehtml/xml/dom_docimpl.h +++ b/tdehtml/xml/dom_docimpl.h @@ -47,7 +47,7 @@ class TQPaintDevice; class TQTextCodec; class TQPaintDeviceMetrics; -class KHTMLView; +class TDEHTMLView; namespace tdehtml { class Tokenizer; @@ -115,8 +115,8 @@ public: HTMLDocumentImpl* createHTMLDocument( const DOMString& title); // Other methods (not part of DOM) - DocumentImpl *createDocument( KHTMLView *v = 0 ); - HTMLDocumentImpl *createHTMLDocument( KHTMLView *v = 0 ); + DocumentImpl *createDocument( TDEHTMLView *v = 0 ); + HTMLDocumentImpl *createHTMLDocument( TDEHTMLView *v = 0 ); // Returns the static instance of this class - only one instance of this class should // ever be present, and is used as a factory method for creating DocumentImpl objects @@ -184,7 +184,7 @@ class DocumentImpl : public TQObject, private tdehtml::CachedObjectClient, publi { Q_OBJECT public: - DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v); + DocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v); ~DocumentImpl(); // DOM methods & attributes for Document @@ -281,8 +281,8 @@ public: // Set the state the document should restore to void setRestoreState( const TQStringList &s) { m_state = s; } - KHTMLView *view() const { return m_view; } - KHTMLPart* part() const; + TDEHTMLView *view() const { return m_view; } + TDEHTMLPart* part() const; RangeImpl *createRange(); @@ -550,7 +550,7 @@ signals: protected: tdehtml::CSSStyleSelector *m_styleSelector; - KHTMLView *m_view; + TDEHTMLView *m_view; TQStringList m_state; tdehtml::DocLoader *m_docLoader; diff --git a/tdehtml/xml/dom_elementimpl.cpp b/tdehtml/xml/dom_elementimpl.cpp index 75ed41dfc..3941154d7 100644 --- a/tdehtml/xml/dom_elementimpl.cpp +++ b/tdehtml/xml/dom_elementimpl.cpp @@ -896,8 +896,8 @@ void ElementImpl::setContentEditable(bool enabled) { // FIXME: reset caret if it is in this node or a child }/*end if*/ // FIXME: use addCSSProperty when I get permission to move it here -// kdDebug(6000) << "CSS_PROP__KHTML_USER_INPUT: "<< value << endl; - styleRules()->setProperty(CSS_PROP__KHTML_USER_INPUT, value, false, true); +// kdDebug(6000) << "CSS_PROP__TDEHTML_USER_INPUT: "<< value << endl; + styleRules()->setProperty(CSS_PROP__TDEHTML_USER_INPUT, value, false, true); setChanged(); } diff --git a/tdehtml/xml/dom_nodeimpl.cpp b/tdehtml/xml/dom_nodeimpl.cpp index 251cb1444..ac8ca630e 100644 --- a/tdehtml/xml/dom_nodeimpl.cpp +++ b/tdehtml/xml/dom_nodeimpl.cpp @@ -337,7 +337,7 @@ void NodeImpl::dispatchEvent(EventImpl *evt, int &exceptioncode, bool tempEvent) evt->setTarget(this); // Since event handling code could cause this object to be deleted, grab a reference to the view now - KHTMLView *view = getDocument()->view(); + TDEHTMLView *view = getDocument()->view(); dispatchGenericEvent( evt, exceptioncode ); @@ -610,8 +610,8 @@ void NodeImpl::handleLocalEvents(EventImpl *evt, bool useCapture) // * use me->qEvent(), it's not available when using initMouseEvent/dispatchEvent // So we currently store a bool in MouseEventImpl. If anyone needs to trigger // dblclicks from the DOM API, we'll need a timer here (well in the doc). - if ( ( !me->isDoubleClick() && current.id == EventImpl::KHTML_ECMA_CLICK_EVENT) || - ( me->isDoubleClick() && current.id == EventImpl::KHTML_ECMA_DBLCLICK_EVENT) ) + if ( ( !me->isDoubleClick() && current.id == EventImpl::TDEHTML_ECMA_CLICK_EVENT) || + ( me->isDoubleClick() && current.id == EventImpl::TDEHTML_ECMA_DBLCLICK_EVENT) ) current.listener->handleEvent(ev); } } diff --git a/tdehtml/xml/dom_nodeimpl.h b/tdehtml/xml/dom_nodeimpl.h index c01e69c0a..457a05787 100644 --- a/tdehtml/xml/dom_nodeimpl.h +++ b/tdehtml/xml/dom_nodeimpl.h @@ -37,7 +37,7 @@ class TQPainter; template class TQPtrList; template class TQValueList; -class KHTMLView; +class TDEHTMLView; class TQRect; class TQMouseEvent; class TQKeyEvent; @@ -283,7 +283,7 @@ public: void dispatchUIEvent(int _id, int detail = 0); void dispatchSubtreeModifiedEvent(); // return true if defaultPrevented (i.e. event should be swallowed) - // this matches the logic in KHTMLView. + // this matches the logic in TDEHTMLView. bool dispatchKeyEvent(TQKeyEvent *key, bool keypress); void handleLocalEvents(EventImpl *evt, bool useCapture); @@ -351,7 +351,7 @@ public: /** * Attaches this node to the rendering tree. This calculates the style to be applied to the node and creates an * appropriate RenderObject which will be inserted into the tree (except when the style has display: none). This - * makes the node visible in the KHTMLView. + * makes the node visible in the TDEHTMLView. */ virtual void attach(); diff --git a/tdehtml/xml/xml_tokenizer.cpp b/tdehtml/xml/xml_tokenizer.cpp index ff4a33a99..44f90673f 100644 --- a/tdehtml/xml/xml_tokenizer.cpp +++ b/tdehtml/xml/xml_tokenizer.cpp @@ -91,7 +91,7 @@ void XMLIncrementalSource::setFinished( bool finished ) m_finished = finished; } -XMLHandler::XMLHandler(DocumentImpl *_doc, KHTMLView *_view) +XMLHandler::XMLHandler(DocumentImpl *_doc, TDEHTMLView *_view) : errorLine(0) { m_doc = _doc; @@ -390,7 +390,7 @@ bool XMLHandler::unparsedEntityDecl(const TQString &/*name*/, const TQString &/* //------------------------------------------------------------------------------ -XMLTokenizer::XMLTokenizer(DOM::DocumentImpl *_doc, KHTMLView *_view) +XMLTokenizer::XMLTokenizer(DOM::DocumentImpl *_doc, TDEHTMLView *_view) : m_handler(_doc,_view) { m_doc = _doc; diff --git a/tdehtml/xml/xml_tokenizer.h b/tdehtml/xml/xml_tokenizer.h index 49a9c970d..f89e5eb2f 100644 --- a/tdehtml/xml/xml_tokenizer.h +++ b/tdehtml/xml/xml_tokenizer.h @@ -31,7 +31,7 @@ #include "misc/loader_client.h" #include "misc/stringit.h" -class KHTMLView; +class TDEHTMLView; namespace tdehtml { class CachedObject; @@ -51,7 +51,7 @@ namespace tdehtml { class XMLHandler : public TQXmlDefaultHandler { public: - XMLHandler(DOM::DocumentImpl *_doc, KHTMLView *_view); + XMLHandler(DOM::DocumentImpl *_doc, TDEHTMLView *_view); virtual ~XMLHandler(); // return the error protocol if parsing failed @@ -101,7 +101,7 @@ private: private: TQString errorProt; DOM::DocumentImpl *m_doc; - KHTMLView *m_view; + TDEHTMLView *m_view; TQPtrStack m_nodes; DOM::NodeImpl *m_rootNode; @@ -162,7 +162,7 @@ private: class XMLTokenizer : public Tokenizer, public tdehtml::CachedObjectClient { public: - XMLTokenizer(DOM::DocumentImpl *, KHTMLView * = 0); + XMLTokenizer(DOM::DocumentImpl *, TDEHTMLView * = 0); virtual ~XMLTokenizer(); virtual void begin(); virtual void write( const TokenizerString &str, bool ); @@ -178,7 +178,7 @@ public: protected: DOM::DocumentImpl *m_doc; - KHTMLView *m_view; + TDEHTMLView *m_view; void executeScripts(); void addScripts(DOM::NodeImpl *n); diff --git a/tdeio/tdeio/kprotocolmanager.cpp b/tdeio/tdeio/kprotocolmanager.cpp index 450b9d107..363992988 100644 --- a/tdeio/tdeio/kprotocolmanager.cpp +++ b/tdeio/tdeio/kprotocolmanager.cpp @@ -72,7 +72,7 @@ KProtocolManagerPrivate::~KProtocolManagerPrivate() // DEFAULT USERAGENT STRING #define CFG_DEFAULT_UAGENT(X) \ -TQString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko)") \ +TQString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) TDEHTML/%4.%5.%6 (like Gecko)") \ .arg(TDE_VERSION_MAJOR).arg(TDE_VERSION_MINOR).arg(X).arg(TDE_VERSION_MAJOR).arg(TDE_VERSION_MINOR).arg(TDE_VERSION_RELEASE) void KProtocolManager::reparseConfiguration() diff --git a/tdeparts/COMMENTS b/tdeparts/COMMENTS index 32f0be1d9..7d17ebdc0 100644 --- a/tdeparts/COMMENTS +++ b/tdeparts/COMMENTS @@ -391,7 +391,7 @@ KOfficeMainWindow (a tdeparts aware shell) | |- KReportGeneratorView/Part (a koffice component) | - |- KHTMLBrowserView/Part (something like konqui, this is a kpart) + |- TDEHTMLBrowserView/Part (something like konqui, this is a kpart) Imagine all are added to one KPartManager. Now the user clicks on the report generator and gets the @@ -487,7 +487,7 @@ KOfficeMainWindow (a tdeparts aware shell) | |- KReportGeneratorView/Part (a koffice component) | - |- KHTMLBrowserView/Part (something like konqui, this is a kpart) + |- TDEHTMLBrowserView/Part (something like konqui, this is a kpart) The report generator does not want GUI merging of its HTML browser. But it wants to offer an action called "HTMLSettings" to allow choosing the default font of the HTML Widget. Obviously this action diff --git a/tdeparts/browserextension.h b/tdeparts/browserextension.h index 8d3a109ff..8dcbe68f7 100644 --- a/tdeparts/browserextension.h +++ b/tdeparts/browserextension.h @@ -65,7 +65,7 @@ struct KPARTS_EXPORT URLArgs /** * This buffer can be used by the part to save and restore its contents. - * See KHTMLPart for instance. + * See TDEHTMLPart for instance. */ TQStringList docState; @@ -89,26 +89,26 @@ struct KPARTS_EXPORT URLArgs TQString serviceType; /** - * KHTML-specific field, contents of the HTTP POST data. + * TDEHTML-specific field, contents of the HTTP POST data. */ TQByteArray postData; /** - * KHTML-specific field, header defining the type of the POST data. + * TDEHTML-specific field, header defining the type of the POST data. */ void setContentType( const TQString & contentType ); /** - * KHTML-specific field, header defining the type of the POST data. + * TDEHTML-specific field, header defining the type of the POST data. */ TQString contentType() const; /** - * KHTML-specific field, whether to do a POST instead of a GET, + * TDEHTML-specific field, whether to do a POST instead of a GET, * for the next openURL. */ void setDoPost( bool enable ); /** - * KHTML-specific field, whether to do a POST instead of a GET, + * TDEHTML-specific field, whether to do a POST instead of a GET, * for the next openURL. */ bool doPost() const; @@ -134,7 +134,7 @@ struct KPARTS_EXPORT URLArgs TQMap &metaData(); /** - * The frame in which to open the URL. KHTML/Konqueror-specific. + * The frame in which to open the URL. TDEHTML/Konqueror-specific. */ TQString frameName; @@ -719,7 +719,7 @@ private: /** * An extension class for container parts, i.e. parts that contain * other parts. - * For instance a KHTMLPart hosts one part per frame. + * For instance a TDEHTMLPart hosts one part per frame. */ class KPARTS_EXPORT BrowserHostExtension : public TQObject { diff --git a/tdeparts/browserrun.cpp b/tdeparts/browserrun.cpp index f0951b382..96de9f904 100644 --- a/tdeparts/browserrun.cpp +++ b/tdeparts/browserrun.cpp @@ -356,7 +356,7 @@ BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const TQ // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC } -// Default implementation, overridden in KHTMLRun +// Default implementation, overridden in TDEHTMLRun void BrowserRun::save( const KURL & url, const TQString & suggestedFilename ) { simpleSave( url, suggestedFilename, m_window ); @@ -461,7 +461,7 @@ void BrowserRun::handleError( TDEIO::Job * job ) void BrowserRun::redirectToError( int error, const TQString& errorText ) { /** - * To display this error in KHTMLPart instead of inside a dialog box, + * To display this error in TDEHTMLPart instead of inside a dialog box, * we tell konq that the mimetype is text/html, and we redirect to * an error:/ URL that sends the info to tdehtml. * diff --git a/tdeparts/browserrun.h b/tdeparts/browserrun.h index edd46d40d..f84e088b3 100644 --- a/tdeparts/browserrun.h +++ b/tdeparts/browserrun.h @@ -123,7 +123,7 @@ namespace KParts { */ static AskSaveResult askEmbedOrSave( const KURL & url, const TQString& mimeType, const TQString & suggestedFilename = TQString::null, int flags = 0 ); - // virtual so that KHTML can implement differently (HTML cache) + // virtual so that TDEHTML can implement differently (HTML cache) virtual void save( const KURL & url, const TQString & suggestedFilename ); // static so that it can be called from other classes diff --git a/tdeparts/browserview.desktop b/tdeparts/browserview.desktop index 42d6131ec..9c534c8f1 100644 --- a/tdeparts/browserview.desktop +++ b/tdeparts/browserview.desktop @@ -149,7 +149,7 @@ Type=bool [PropertyDef::X-TDE-BrowserView-Built-Into] Type=TQString -# If the part has a plugin for KHTML Javascript's window.navigator.plugins +# If the part has a plugin for TDEHTML Javascript's window.navigator.plugins # array, it should create a plugin info file and set this property to the # file path here. The path should be relative to TDE's data dir # ($TDEDIR/share/apps) diff --git a/tdespell2/tests/backgroundtest.cpp b/tdespell2/tests/backgroundtest.cpp index aca02af53..14f9e029d 100644 --- a/tdespell2/tests/backgroundtest.cpp +++ b/tdespell2/tests/backgroundtest.cpp @@ -31,7 +31,7 @@ const char *text = "Rationale \ ========= \ \ This code is intended to provide an implementation of the W3C's XPath \ -specification for KHTML. XPath isn't particularly useful on its own, however\ +specification for TDEHTML. XPath isn't particularly useful on its own, however\ it is an essential building block for the implementation of other standards \ like XSLT and XQuery. XPath is supported to a greater or lesser extent by both\ IE and Mozilla so it is likely to become increasingly important over the next\ @@ -45,7 +45,7 @@ licenses including Mozilla's, libxml2, Xerces and probably others, so it is \ reasonable to ask why there should be another one. \ \ It would certainly be possible to integrate one of these implementations into\ -KHTML, but it would actually be quite a lot of work. I looked at all of the\ +TDEHTML, but it would actually be quite a lot of work. I looked at all of the\ implementations mentioned with a view to using this approach before I decided\ to start from scratch.\ \ @@ -62,7 +62,7 @@ Xerces XPath (C++ version)\ \ The Xerces code seemed pretty clean and was reasonably understandable, however\ it doesn't seem to be used very much which greatly reduces the utility. As\ -with the mozilla code, porting it to use KHTML's DOM would take a fair bit of \ +with the mozilla code, porting it to use TDEHTML's DOM would take a fair bit of \ work. The main issue here being that Xerces is based around pointers to Nodes\ rather than implicitly shared Node objects.\ \ @@ -72,7 +72,7 @@ libxml2 \ This is the most obvious library to reuse as it is currently used to generate\ the KDE documentation, and is also a very complete and fast\ implementation. The down side of using this code is that it would either need\ -a new DOM implementation in KHTML (which used the libxml2 structures), a \ +a new DOM implementation in TDEHTML (which used the libxml2 structures), a \ wrapper library that made on of the DOM trees support the API of the other, or\ binding layer that parsed the XML twice and somehow maintained a mapping\ between the two DOM trees. Unfortunately the documentation of this library is\ @@ -83,7 +83,7 @@ for. They are well documented and have a well structured API. Unfortunately\ using this library still requires some mechanism to integrate the two\ underlying DOM implementations.\ \ -KHTML XPath\ +TDEHTML XPath\ ----------- \ \ There are some advantages to the XPath implementation Zack and I are working\ @@ -95,7 +95,7 @@ on, namely: \ - The code is clean and uses familiar types and idioms. \ \ We intend the code to be build on top of the DOM api rather than tying it\ -directly to the Qt or KHTML XML implementations. This will allow us to take\ +directly to the Qt or TDEHTML XML implementations. This will allow us to take\ advantage of any improvements that might be made to the underlying parser\ etc. The DOM2 traversal APIs provide a set of classes that map almost directly \ to the XPath location steps, since we need to implement these facilities\ diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 07ddf93c4..1d0ce4159 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -234,7 +234,7 @@ TQStringList KSpellingHighlighter::personalWords() l.append( "KMail" ); l.append( "KOrganizer" ); l.append( "KAddressBook" ); - l.append( "KHTML" ); + l.append( "TDEHTML" ); l.append( "KIO" ); l.append( "KJS" ); l.append( "Konqueror" ); diff --git a/win/tdelibs_export_win.h b/win/tdelibs_export_win.h index a61464ed3..9eee4ac73 100644 --- a/win/tdelibs_export_win.h +++ b/win/tdelibs_export_win.h @@ -145,8 +145,8 @@ # define KATEPART_EXPORT KDE_IMPORT #endif -#ifdef MAKE_KHTML_LIB -# define KHTML_EXPORT KDE_EXPORT +#ifdef MAKE_TDEHTML_LIB +# define TDEHTML_EXPORT KDE_EXPORT #else -# define KHTML_EXPORT KDE_IMPORT +# define TDEHTML_EXPORT KDE_IMPORT #endif -- cgit v1.2.3 From ed99a30644c19b0a3cf0d2147243532df4daa16b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 15 Feb 2013 21:57:54 -0600 Subject: Rename additional header files to avoid conflicts with KDE4 --- CMakeLists.txt | 2 +- KDE2PORTING.html | 4 +- Mainpage.dox | 4 +- Makefile.am.in | 2 +- arts/kde/kaudioplaystream.cpp | 2 +- arts/kde/kaudiorecordstream.cpp | 2 +- arts/kde/kconverttest.cc | 2 +- arts/kde/kiotest.cc | 2 +- arts/kde/kiotestslow.cc | 2 +- arts/kde/kvideowidget.cpp | 2 +- arts/kde/mcop-dcop/kmcop.cpp | 2 +- arts/knotify/knotify.cpp | 6 +- arts/message/artsmessage.cc | 6 +- configure.in.in | 2 +- interfaces/tdeimproxy/library/tdeimproxy.cpp | 2 +- .../tdefileaudiopreview/tdefileaudiopreview.cpp | 4 +- interfaces/tdescript/scriptloader.cpp | 4 +- interfaces/tdescript/scriptmanager.cpp | 4 +- interfaces/tdetexteditor/CMakeLists.txt | 2 +- interfaces/tdetexteditor/Makefile.am | 2 +- interfaces/tdetexteditor/editorchooser.cpp | 2 +- interfaces/tdetexteditor/templateinterface.cpp | 6 +- interfaces/terminal/test/main.cc | 2 +- kab/addressbook.cc | 6 +- kab/kabapi.cc | 4 +- kabc/CMakeLists.txt | 123 - kabc/HACKING | 100 - kabc/HOWTO | 372 - kabc/Makefile.am | 72 - kabc/README | 28 - kabc/README.AddressFormat | 66 - kabc/TODO | 1 - kabc/address.cpp | 592 - kabc/address.h | 341 - kabc/addressbook.cpp | 842 -- kabc/addressbook.h | 431 - kabc/addresseedialog.cpp | 259 - kabc/addresseedialog.h | 161 - kabc/addresseehelper.cpp | 111 - kabc/addresseehelper.h | 66 - kabc/addresseelist.cpp | 256 - kabc/addresseelist.h | 221 - kabc/addresslineedit.cpp | 610 - kabc/addresslineedit.h | 123 - kabc/agent.cpp | 148 - kabc/agent.h | 128 - kabc/countrytransl.map | 12381 ------------------- kabc/distributionlist.cpp | 298 - kabc/distributionlist.h | 217 - kabc/distributionlistdialog.cpp | 399 - kabc/distributionlistdialog.h | 139 - kabc/distributionlisteditor.cpp | 310 - kabc/distributionlisteditor.h | 86 - kabc/errorhandler.cpp | 55 - kabc/errorhandler.h | 95 - kabc/field.h | 176 - kabc/format.h | 49 - kabc/formatfactory.cpp | 168 - kabc/formatfactory.h | 101 - kabc/formatplugin.h | 73 - kabc/formats/CMakeLists.txt | 47 - kabc/formats/Makefile.am | 22 - kabc/formats/binary.desktop | 89 - kabc/formats/binaryformat.cpp | 221 - kabc/formats/binaryformat.h | 69 - kabc/geo.cpp | 109 - kabc/geo.h | 101 - kabc/kabc_manager.desktop | 76 - kabc/key.cpp | 153 - kabc/key.h | 150 - kabc/ldapclient.cpp | 427 - kabc/ldapclient.h | 248 - kabc/ldapconfigwidget.cpp | 626 - kabc/ldapconfigwidget.h | 300 - kabc/ldapurl.cpp | 201 - kabc/ldapurl.h | 110 - kabc/ldif.cpp | 365 - kabc/ldif.h | 182 - kabc/ldifconverter.cpp | 573 - kabc/ldifconverter.h | 100 - kabc/lock.cpp | 162 - kabc/lock.h | 88 - kabc/locknull.cpp | 63 - kabc/locknull.h | 54 - kabc/phonenumber.cpp | 213 - kabc/phonenumber.h | 161 - kabc/picture.cpp | 120 - kabc/picture.h | 128 - kabc/plugin.cpp | 61 - kabc/plugin.h | 52 - kabc/plugins/CMakeLists.txt | 15 - kabc/plugins/Makefile.am | 1 - kabc/plugins/dir/CMakeLists.txt | 73 - kabc/plugins/dir/Makefile.am | 28 - kabc/plugins/dir/dir.desktop | 92 - kabc/plugins/dir/resourcedir.cpp | 310 - kabc/plugins/dir/resourcedir.h | 113 - kabc/plugins/dir/resourcedirconfig.cpp | 107 - kabc/plugins/dir/resourcedirconfig.h | 54 - kabc/plugins/dir/resourcedirplugin.cpp | 32 - kabc/plugins/evolution/Makefile.am | 19 - kabc/plugins/evolution/README | 15 - kabc/plugins/evolution/dbwrapper.cpp | 187 - kabc/plugins/evolution/dbwrapper.h | 60 - kabc/plugins/evolution/evolution.desktop | 26 - kabc/plugins/evolution/resourceevo.cpp | 132 - kabc/plugins/evolution/resourceevo.h | 23 - kabc/plugins/file/CMakeLists.txt | 73 - kabc/plugins/file/Makefile.am | 28 - kabc/plugins/file/file.desktop | 82 - kabc/plugins/file/resourcefile.cpp | 395 - kabc/plugins/file/resourcefile.h | 162 - kabc/plugins/file/resourcefileconfig.cpp | 118 - kabc/plugins/file/resourcefileconfig.h | 57 - kabc/plugins/file/resourcefileplugin.cpp | 32 - kabc/plugins/ldaptdeio/CMakeLists.txt | 73 - kabc/plugins/ldaptdeio/Makefile.am | 28 - kabc/plugins/ldaptdeio/ldaptdeio.desktop | 10 - kabc/plugins/ldaptdeio/resourceldaptdeio.cpp | 1041 -- kabc/plugins/ldaptdeio/resourceldaptdeio.h | 171 - kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp | 388 - kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h | 118 - kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp | 36 - kabc/plugins/net/CMakeLists.txt | 73 - kabc/plugins/net/Makefile.am | 28 - kabc/plugins/net/net.desktop | 90 - kabc/plugins/net/resourcenet.cpp | 393 - kabc/plugins/net/resourcenet.h | 117 - kabc/plugins/net/resourcenetconfig.cpp | 102 - kabc/plugins/net/resourcenetconfig.h | 53 - kabc/plugins/net/resourcenetplugin.cpp | 32 - kabc/plugins/sql/Makefile.am | 20 - kabc/plugins/sql/resourcesql.cpp | 338 - kabc/plugins/sql/resourcesql.h | 63 - kabc/plugins/sql/resourcesqlconfig.cpp | 95 - kabc/plugins/sql/resourcesqlconfig.h | 51 - kabc/plugins/sql/sql.desktop | 10 - kabc/resource.cpp | 351 - kabc/resource.h | 319 - kabc/resourceselectdialog.cpp | 111 - kabc/resourceselectdialog.h | 57 - kabc/scripts/Makefile.am | 6 - kabc/scripts/addressee.src.cpp | 1127 -- kabc/scripts/addressee.src.h | 407 - kabc/scripts/createisomap.pl | 35 - kabc/scripts/entrylist | 82 - kabc/scripts/field.src.cpp | 512 - kabc/scripts/makeaddressee | 215 - kabc/secrecy.cpp | 100 - kabc/secrecy.h | 100 - kabc/sortmode.cpp | 79 - kabc/sortmode.h | 114 - kabc/sound.cpp | 118 - kabc/sound.h | 153 - kabc/stdaddressbook.cpp | 203 - kabc/stdaddressbook.h | 153 - kabc/tdeab2tdeabc.cpp | 476 - kabc/tdeab2tdeabc.desktop | 105 - kabc/tests/Makefile.am | 55 - kabc/tests/bigread.cpp | 65 - kabc/tests/bigwrite.cpp | 70 - kabc/tests/kabcargl.cpp | 70 - kabc/tests/testaddressee.cpp | 57 - kabc/tests/testaddresseelist.cpp | 196 - kabc/tests/testaddressfmt.cpp | 63 - kabc/tests/testaddresslineedit.cpp | 29 - kabc/tests/testdb.cpp | 33 - kabc/tests/testdistlist.cpp | 59 - kabc/tests/testkabc.cpp | 62 - kabc/tests/testkabcdlg.cpp | 45 - kabc/tests/testldapclient.cpp | 161 - kabc/tests/testldapclient.h | 51 - kabc/tests/testlock.cpp | 206 - kabc/tests/testlock.h | 51 - kabc/timezone.cpp | 85 - kabc/timezone.h | 89 - kabc/vcard/AdrParam.cpp | 126 - kabc/vcard/AdrValue.cpp | 140 - kabc/vcard/AgentParam.cpp | 103 - kabc/vcard/AgentValue.cpp | 81 - kabc/vcard/CMakeLists.txt | 40 - kabc/vcard/ClassValue.cpp | 120 - kabc/vcard/ContentLine.cpp | 302 - kabc/vcard/DateParam.cpp | 82 - kabc/vcard/DateValue.cpp | 434 - kabc/vcard/EmailParam.cpp | 116 - kabc/vcard/Entity.cpp | 134 - kabc/vcard/Enum.cpp | 490 - kabc/vcard/FloatValue.cpp | 120 - kabc/vcard/GeoValue.cpp | 100 - kabc/vcard/ImageParam.cpp | 81 - kabc/vcard/ImageValue.cpp | 81 - kabc/vcard/ImgValue.cpp | 81 - kabc/vcard/LangValue.cpp | 127 - kabc/vcard/Makefile.am | 21 - kabc/vcard/NValue.cpp | 128 - kabc/vcard/OrgValue.cpp | 107 - kabc/vcard/Param.cpp | 129 - kabc/vcard/PhoneNumberValue.cpp | 81 - kabc/vcard/README | 15 - kabc/vcard/RToken.cpp | 88 - kabc/vcard/SoundValue.cpp | 81 - kabc/vcard/SourceParam.cpp | 112 - kabc/vcard/TelParam.cpp | 81 - kabc/vcard/TelValue.cpp | 81 - kabc/vcard/TextBinParam.cpp | 81 - kabc/vcard/TextBinValue.cpp | 104 - kabc/vcard/TextListValue.cpp | 107 - kabc/vcard/TextParam.cpp | 82 - kabc/vcard/TextValue.cpp | 86 - kabc/vcard/URIValue.cpp | 133 - kabc/vcard/UTCValue.cpp | 110 - kabc/vcard/VCard.cpp | 283 - kabc/vcard/VCardEntity.cpp | 119 - kabc/vcard/Value.cpp | 81 - kabc/vcard/include/VCard.h | 43 - kabc/vcard/include/VCardAdrParam.h | 64 - kabc/vcard/include/VCardAdrValue.h | 83 - kabc/vcard/include/VCardAgentParam.h | 60 - kabc/vcard/include/VCardAgentValue.h | 44 - kabc/vcard/include/VCardClassValue.h | 56 - kabc/vcard/include/VCardContentLine.h | 77 - kabc/vcard/include/VCardDateParam.h | 44 - kabc/vcard/include/VCardDateValue.h | 99 - kabc/vcard/include/VCardDefines.h | 52 - kabc/vcard/include/VCardEmailParam.h | 56 - kabc/vcard/include/VCardEntity.h | 68 - kabc/vcard/include/VCardEnum.h | 123 - kabc/vcard/include/VCardFloatValue.h | 51 - kabc/vcard/include/VCardGeoValue.h | 49 - kabc/vcard/include/VCardGroup.h | 39 - kabc/vcard/include/VCardImageParam.h | 44 - kabc/vcard/include/VCardImageValue.h | 44 - kabc/vcard/include/VCardImgValue.h | 39 - kabc/vcard/include/VCardLangValue.h | 51 - kabc/vcard/include/VCardNValue.h | 56 - kabc/vcard/include/VCardOrgValue.h | 50 - kabc/vcard/include/VCardParam.h | 59 - kabc/vcard/include/VCardPhoneNumberValue.h | 39 - kabc/vcard/include/VCardRToken.h | 40 - kabc/vcard/include/VCardSndValue.h | 39 - kabc/vcard/include/VCardSoundValue.h | 44 - kabc/vcard/include/VCardSourceParam.h | 58 - kabc/vcard/include/VCardTelParam.h | 51 - kabc/vcard/include/VCardTelValue.h | 44 - kabc/vcard/include/VCardTextBinParam.h | 44 - kabc/vcard/include/VCardTextBinValue.h | 67 - kabc/vcard/include/VCardTextListValue.h | 51 - kabc/vcard/include/VCardTextParam.h | 44 - kabc/vcard/include/VCardTextValue.h | 41 - kabc/vcard/include/VCardURIValue.h | 52 - kabc/vcard/include/VCardUTCValue.h | 58 - kabc/vcard/include/VCardVCard.h | 63 - kabc/vcard/include/VCardVCardEntity.h | 56 - kabc/vcard/include/VCardValue.h | 46 - kabc/vcard/include/generated/AdrParam-generated.h | 23 - kabc/vcard/include/generated/AdrValue-generated.h | 23 - .../vcard/include/generated/AgentParam-generated.h | 23 - .../vcard/include/generated/AgentValue-generated.h | 23 - .../vcard/include/generated/ClassValue-generated.h | 23 - .../include/generated/ContentLine-generated.h | 23 - kabc/vcard/include/generated/DateParam-generated.h | 23 - kabc/vcard/include/generated/DateValue-generated.h | 23 - .../vcard/include/generated/EmailParam-generated.h | 23 - .../vcard/include/generated/FloatValue-generated.h | 23 - kabc/vcard/include/generated/GeoValue-generated.h | 23 - kabc/vcard/include/generated/Group-generated.h | 23 - .../vcard/include/generated/ImageParam-generated.h | 23 - .../vcard/include/generated/ImageValue-generated.h | 23 - kabc/vcard/include/generated/ImgParam-generated.h | 23 - kabc/vcard/include/generated/ImgValue-generated.h | 23 - kabc/vcard/include/generated/LangValue-generated.h | 23 - kabc/vcard/include/generated/NValue-generated.h | 23 - kabc/vcard/include/generated/Name-generated.h | 22 - kabc/vcard/include/generated/OrgValue-generated.h | 23 - kabc/vcard/include/generated/Param-generated.h | 23 - kabc/vcard/include/generated/ParamName-generated.h | 22 - .../vcard/include/generated/ParamValue-generated.h | 22 - .../include/generated/PhoneNumberValue-generated.h | 23 - .../vcard/include/generated/SoundValue-generated.h | 23 - .../include/generated/SourceParam-generated.h | 23 - kabc/vcard/include/generated/TelParam-generated.h | 23 - kabc/vcard/include/generated/TelValue-generated.h | 23 - .../include/generated/TextBinParam-generated.h | 23 - .../include/generated/TextBinValue-generated.h | 23 - .../include/generated/TextListValue-generated.h | 23 - .../include/generated/TextNSParam-generated.h | 23 - kabc/vcard/include/generated/TextParam-generated.h | 23 - kabc/vcard/include/generated/TextValue-generated.h | 23 - kabc/vcard/include/generated/URIValue-generated.h | 23 - kabc/vcard/include/generated/UTCValue-generated.h | 23 - kabc/vcard/include/generated/VCard-generated.h | 23 - .../include/generated/VCardEntity-generated.h | 23 - kabc/vcard/include/generated/Value-generated.h | 23 - kabc/vcard/include/generated/generate | 2 - kabc/vcard/include/generated/generateHeaders.awk | 41 - kabc/vcard/include/generated/headerBodies | 34 - kabc/vcard/testread.cpp | 129 - kabc/vcard/testwrite.cpp | 41 - kabc/vcard/vCard-all.cpp | 37 - kabc/vcard21parser.cpp | 608 - kabc/vcard21parser.h | 221 - kabc/vcardconverter.cpp | 129 - kabc/vcardconverter.h | 163 - kabc/vcardformat.cpp | 59 - kabc/vcardformat.h | 49 - kabc/vcardformatimpl.cpp | 1001 -- kabc/vcardformatimpl.h | 106 - kabc/vcardformatplugin.cpp | 120 - kabc/vcardformatplugin.h | 56 - kabc/vcardparser/CMakeLists.txt | 40 - kabc/vcardparser/Makefile.am | 31 - kabc/vcardparser/README.testing | 15 - kabc/vcardparser/checkvcard.pl | 75 - kabc/vcardparser/testread.cpp | 89 - kabc/vcardparser/testread2.cpp | 42 - kabc/vcardparser/tests/vcard1.vcf | 13 - kabc/vcardparser/tests/vcard1.vcf.ref | 15 - kabc/vcardparser/tests/vcard2.vcf | 11 - kabc/vcardparser/tests/vcard2.vcf.ref | 12 - kabc/vcardparser/tests/vcard3.vcf | 11 - kabc/vcardparser/tests/vcard3.vcf.ref | 12 - kabc/vcardparser/tests/vcard4.vcf | 14 - kabc/vcardparser/tests/vcard4.vcf.ref | 14 - kabc/vcardparser/tests/vcard5.vcf | 313 - kabc/vcardparser/tests/vcard5.vcf.ref | 313 - kabc/vcardparser/tests/vcard6.vcf | 10 - kabc/vcardparser/tests/vcard6.vcf.ref | 10 - kabc/vcardparser/tests/vcard7.vcf | 7 - kabc/vcardparser/tests/vcard7.vcf.ref | 8 - kabc/vcardparser/testutils.cpp | 99 - kabc/vcardparser/testutils.h | 14 - kabc/vcardparser/testwrite.cpp | 134 - kabc/vcardparser/vcard.cpp | 109 - kabc/vcardparser/vcard.h | 91 - kabc/vcardparser/vcardline.cpp | 151 - kabc/vcardparser/vcardline.h | 115 - kabc/vcardparser/vcardparser.cpp | 297 - kabc/vcardparser/vcardparser.h | 44 - kabc/vcardtool.cpp | 896 -- kabc/vcardtool.h | 88 - kate/part/kateautoindent.cpp | 2 +- kate/part/katebookmarks.cpp | 2 +- kate/part/katebuffer.cpp | 2 +- kate/part/katecmds.cpp | 2 +- kate/part/kateconfig.cpp | 4 +- kate/part/katedialogs.cpp | 10 +- kate/part/katedocument.cpp | 10 +- kate/part/katedocument.h | 2 +- kate/part/katedocumenthelpers.cpp | 2 +- kate/part/katefactory.cpp | 2 +- kate/part/katefiletype.cpp | 2 +- kate/part/katefont.cpp | 2 +- kate/part/katehighlight.cpp | 8 +- kate/part/katejscript.cpp | 4 +- kate/part/kateluaindentscript.cpp | 4 +- kate/part/kateprinter.cpp | 2 +- kate/part/kateschema.cpp | 4 +- kate/part/katesearch.cpp | 4 +- kate/part/katespell.cpp | 2 +- kate/part/katesyntaxdocument.cpp | 4 +- kate/part/katetextline.cpp | 2 +- kate/part/kateview.cpp | 8 +- kate/part/kateviewhelpers.cpp | 6 +- kate/part/kateviewinternal.cpp | 2 +- kate/part/test_regression.cpp | 2 +- kate/plugins/autobookmarker/autobookmarker.cpp | 2 +- kate/plugins/insertfile/insertfileplugin.cpp | 6 +- kate/plugins/isearch/ISearchPlugin.cpp | 2 +- kate/plugins/kdatatool/kate_kdatatool.cpp | 2 +- kate/plugins/wordcompletion/docwordcompletion.cpp | 2 +- kded/kbuildimageiofactory.cpp | 4 +- kded/kbuildprotocolinfofactory.cpp | 4 +- kded/kbuildservicefactory.cpp | 4 +- kded/kbuildservicegroupfactory.cpp | 4 +- kded/kbuildservicetypefactory.cpp | 4 +- kded/kded.cpp | 4 +- kded/khostname.cpp | 4 +- kded/tde-menu.cpp | 4 +- kded/tdebuildsycoca.cpp | 6 +- kded/vfolder_menu.cpp | 2 +- kdewidgets/CMakeLists.txt | 2 +- kdewidgets/kde.widgets | 2 +- kdewidgets/tests/test.widgets | 2 +- kdoctools/meinproc.cpp | 2 +- kdoctools/tdeio_help.cpp | 4 +- kdoctools/xslt.cpp | 2 +- kimgio/dds.cpp | 2 +- kimgio/eps.cpp | 2 +- kimgio/exr.cpp | 2 +- kimgio/gimp.h | 2 +- kimgio/hdr.cpp | 2 +- kimgio/jp2.cpp | 2 +- kinit/autostart.cpp | 2 +- kinit/kinit.cpp | 6 +- kinit/tdelauncher.cpp | 8 +- kinit/tdelauncher_main.cpp | 2 +- knewstuff/downloaddialog.cpp | 4 +- knewstuff/engine.cpp | 4 +- knewstuff/entry.cpp | 4 +- knewstuff/ghns.cpp | 2 +- knewstuff/knewstuff.cpp | 2 +- knewstuff/knewstuffbutton.cpp | 2 +- knewstuff/knewstuffgeneric.cpp | 4 +- knewstuff/knewstuffsecure.cpp | 6 +- knewstuff/provider.cpp | 6 +- knewstuff/providerdialog.cpp | 4 +- knewstuff/security.cpp | 4 +- knewstuff/tdehotnewstuff.cpp | 2 +- knewstuff/testnewstuff.cpp | 2 +- knewstuff/uploaddialog.cpp | 4 +- kstyles/highcontrast/config/highcontrastconfig.cpp | 4 +- kstyles/klegacy/klegacystyle.cpp | 2 +- kstyles/klegacy/plugin.cpp | 2 +- kstyles/kthemestyle/kthemestyle.cpp | 2 +- kstyles/plastik/config/plastitdeconf.cpp | 4 +- kstyles/utils/installtheme/main.cpp | 4 +- kstyles/web/plugin.cpp | 2 +- kstyles/web/webstyle.cpp | 2 +- libtdemid/deviceman.cc | 2 +- libtdescreensaver/main.cpp | 4 +- networkstatus/connectionmanager.cpp | 4 +- networkstatus/networkstatusindicator.cpp | 2 +- tdeabc/CMakeLists.txt | 123 + tdeabc/HACKING | 100 + tdeabc/HOWTO | 372 + tdeabc/Makefile.am | 72 + tdeabc/README | 28 + tdeabc/README.AddressFormat | 66 + tdeabc/TODO | 1 + tdeabc/address.cpp | 592 + tdeabc/address.h | 341 + tdeabc/addressbook.cpp | 842 ++ tdeabc/addressbook.h | 431 + tdeabc/addresseedialog.cpp | 259 + tdeabc/addresseedialog.h | 161 + tdeabc/addresseehelper.cpp | 111 + tdeabc/addresseehelper.h | 66 + tdeabc/addresseelist.cpp | 256 + tdeabc/addresseelist.h | 221 + tdeabc/addresslineedit.cpp | 610 + tdeabc/addresslineedit.h | 123 + tdeabc/agent.cpp | 148 + tdeabc/agent.h | 128 + tdeabc/countrytransl.map | 12381 +++++++++++++++++++ tdeabc/distributionlist.cpp | 298 + tdeabc/distributionlist.h | 217 + tdeabc/distributionlistdialog.cpp | 399 + tdeabc/distributionlistdialog.h | 139 + tdeabc/distributionlisteditor.cpp | 310 + tdeabc/distributionlisteditor.h | 86 + tdeabc/errorhandler.cpp | 55 + tdeabc/errorhandler.h | 95 + tdeabc/field.h | 176 + tdeabc/format.h | 49 + tdeabc/formatfactory.cpp | 168 + tdeabc/formatfactory.h | 101 + tdeabc/formatplugin.h | 73 + tdeabc/formats/CMakeLists.txt | 47 + tdeabc/formats/Makefile.am | 22 + tdeabc/formats/binary.desktop | 89 + tdeabc/formats/binaryformat.cpp | 221 + tdeabc/formats/binaryformat.h | 69 + tdeabc/geo.cpp | 109 + tdeabc/geo.h | 101 + tdeabc/kabc_manager.desktop | 76 + tdeabc/key.cpp | 153 + tdeabc/key.h | 150 + tdeabc/ldapclient.cpp | 427 + tdeabc/ldapclient.h | 248 + tdeabc/ldapconfigwidget.cpp | 626 + tdeabc/ldapconfigwidget.h | 300 + tdeabc/ldapurl.cpp | 201 + tdeabc/ldapurl.h | 110 + tdeabc/ldif.cpp | 365 + tdeabc/ldif.h | 182 + tdeabc/ldifconverter.cpp | 573 + tdeabc/ldifconverter.h | 100 + tdeabc/lock.cpp | 162 + tdeabc/lock.h | 88 + tdeabc/locknull.cpp | 63 + tdeabc/locknull.h | 54 + tdeabc/phonenumber.cpp | 213 + tdeabc/phonenumber.h | 161 + tdeabc/picture.cpp | 120 + tdeabc/picture.h | 128 + tdeabc/plugin.cpp | 61 + tdeabc/plugin.h | 52 + tdeabc/plugins/CMakeLists.txt | 15 + tdeabc/plugins/Makefile.am | 1 + tdeabc/plugins/dir/CMakeLists.txt | 73 + tdeabc/plugins/dir/Makefile.am | 28 + tdeabc/plugins/dir/dir.desktop | 92 + tdeabc/plugins/dir/resourcedir.cpp | 310 + tdeabc/plugins/dir/resourcedir.h | 113 + tdeabc/plugins/dir/resourcedirconfig.cpp | 107 + tdeabc/plugins/dir/resourcedirconfig.h | 54 + tdeabc/plugins/dir/resourcedirplugin.cpp | 32 + tdeabc/plugins/evolution/Makefile.am | 19 + tdeabc/plugins/evolution/README | 15 + tdeabc/plugins/evolution/dbwrapper.cpp | 187 + tdeabc/plugins/evolution/dbwrapper.h | 60 + tdeabc/plugins/evolution/evolution.desktop | 26 + tdeabc/plugins/evolution/resourceevo.cpp | 132 + tdeabc/plugins/evolution/resourceevo.h | 23 + tdeabc/plugins/file/CMakeLists.txt | 73 + tdeabc/plugins/file/Makefile.am | 28 + tdeabc/plugins/file/file.desktop | 82 + tdeabc/plugins/file/resourcefile.cpp | 395 + tdeabc/plugins/file/resourcefile.h | 162 + tdeabc/plugins/file/resourcefileconfig.cpp | 118 + tdeabc/plugins/file/resourcefileconfig.h | 57 + tdeabc/plugins/file/resourcefileplugin.cpp | 32 + tdeabc/plugins/ldaptdeio/CMakeLists.txt | 73 + tdeabc/plugins/ldaptdeio/Makefile.am | 28 + tdeabc/plugins/ldaptdeio/ldaptdeio.desktop | 10 + tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp | 1041 ++ tdeabc/plugins/ldaptdeio/resourceldaptdeio.h | 171 + .../plugins/ldaptdeio/resourceldaptdeioconfig.cpp | 388 + tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h | 118 + .../plugins/ldaptdeio/resourceldaptdeioplugin.cpp | 36 + tdeabc/plugins/net/CMakeLists.txt | 73 + tdeabc/plugins/net/Makefile.am | 28 + tdeabc/plugins/net/net.desktop | 90 + tdeabc/plugins/net/resourcenet.cpp | 393 + tdeabc/plugins/net/resourcenet.h | 117 + tdeabc/plugins/net/resourcenetconfig.cpp | 102 + tdeabc/plugins/net/resourcenetconfig.h | 53 + tdeabc/plugins/net/resourcenetplugin.cpp | 32 + tdeabc/plugins/sql/Makefile.am | 20 + tdeabc/plugins/sql/resourcesql.cpp | 338 + tdeabc/plugins/sql/resourcesql.h | 63 + tdeabc/plugins/sql/resourcesqlconfig.cpp | 95 + tdeabc/plugins/sql/resourcesqlconfig.h | 51 + tdeabc/plugins/sql/sql.desktop | 10 + tdeabc/resource.cpp | 351 + tdeabc/resource.h | 319 + tdeabc/resourceselectdialog.cpp | 111 + tdeabc/resourceselectdialog.h | 57 + tdeabc/scripts/Makefile.am | 6 + tdeabc/scripts/addressee.src.cpp | 1127 ++ tdeabc/scripts/addressee.src.h | 407 + tdeabc/scripts/createisomap.pl | 35 + tdeabc/scripts/entrylist | 82 + tdeabc/scripts/field.src.cpp | 512 + tdeabc/scripts/makeaddressee | 215 + tdeabc/secrecy.cpp | 100 + tdeabc/secrecy.h | 100 + tdeabc/sortmode.cpp | 79 + tdeabc/sortmode.h | 114 + tdeabc/sound.cpp | 118 + tdeabc/sound.h | 153 + tdeabc/stdaddressbook.cpp | 203 + tdeabc/stdaddressbook.h | 153 + tdeabc/tdeab2tdeabc.cpp | 476 + tdeabc/tdeab2tdeabc.desktop | 105 + tdeabc/tests/Makefile.am | 55 + tdeabc/tests/bigread.cpp | 65 + tdeabc/tests/bigwrite.cpp | 70 + tdeabc/tests/kabcargl.cpp | 70 + tdeabc/tests/testaddressee.cpp | 57 + tdeabc/tests/testaddresseelist.cpp | 196 + tdeabc/tests/testaddressfmt.cpp | 63 + tdeabc/tests/testaddresslineedit.cpp | 29 + tdeabc/tests/testdb.cpp | 33 + tdeabc/tests/testdistlist.cpp | 59 + tdeabc/tests/testkabc.cpp | 62 + tdeabc/tests/testkabcdlg.cpp | 45 + tdeabc/tests/testldapclient.cpp | 161 + tdeabc/tests/testldapclient.h | 51 + tdeabc/tests/testlock.cpp | 206 + tdeabc/tests/testlock.h | 51 + tdeabc/timezone.cpp | 85 + tdeabc/timezone.h | 89 + tdeabc/vcard/AdrParam.cpp | 126 + tdeabc/vcard/AdrValue.cpp | 140 + tdeabc/vcard/AgentParam.cpp | 103 + tdeabc/vcard/AgentValue.cpp | 81 + tdeabc/vcard/CMakeLists.txt | 40 + tdeabc/vcard/ClassValue.cpp | 120 + tdeabc/vcard/ContentLine.cpp | 302 + tdeabc/vcard/DateParam.cpp | 82 + tdeabc/vcard/DateValue.cpp | 434 + tdeabc/vcard/EmailParam.cpp | 116 + tdeabc/vcard/Entity.cpp | 134 + tdeabc/vcard/Enum.cpp | 490 + tdeabc/vcard/FloatValue.cpp | 120 + tdeabc/vcard/GeoValue.cpp | 100 + tdeabc/vcard/ImageParam.cpp | 81 + tdeabc/vcard/ImageValue.cpp | 81 + tdeabc/vcard/ImgValue.cpp | 81 + tdeabc/vcard/LangValue.cpp | 127 + tdeabc/vcard/Makefile.am | 21 + tdeabc/vcard/NValue.cpp | 128 + tdeabc/vcard/OrgValue.cpp | 107 + tdeabc/vcard/Param.cpp | 129 + tdeabc/vcard/PhoneNumberValue.cpp | 81 + tdeabc/vcard/README | 15 + tdeabc/vcard/RToken.cpp | 88 + tdeabc/vcard/SoundValue.cpp | 81 + tdeabc/vcard/SourceParam.cpp | 112 + tdeabc/vcard/TelParam.cpp | 81 + tdeabc/vcard/TelValue.cpp | 81 + tdeabc/vcard/TextBinParam.cpp | 81 + tdeabc/vcard/TextBinValue.cpp | 104 + tdeabc/vcard/TextListValue.cpp | 107 + tdeabc/vcard/TextParam.cpp | 82 + tdeabc/vcard/TextValue.cpp | 86 + tdeabc/vcard/URIValue.cpp | 133 + tdeabc/vcard/UTCValue.cpp | 110 + tdeabc/vcard/VCard.cpp | 283 + tdeabc/vcard/VCardEntity.cpp | 119 + tdeabc/vcard/Value.cpp | 81 + tdeabc/vcard/include/VCard.h | 43 + tdeabc/vcard/include/VCardAdrParam.h | 64 + tdeabc/vcard/include/VCardAdrValue.h | 83 + tdeabc/vcard/include/VCardAgentParam.h | 60 + tdeabc/vcard/include/VCardAgentValue.h | 44 + tdeabc/vcard/include/VCardClassValue.h | 56 + tdeabc/vcard/include/VCardContentLine.h | 77 + tdeabc/vcard/include/VCardDateParam.h | 44 + tdeabc/vcard/include/VCardDateValue.h | 99 + tdeabc/vcard/include/VCardDefines.h | 52 + tdeabc/vcard/include/VCardEmailParam.h | 56 + tdeabc/vcard/include/VCardEntity.h | 68 + tdeabc/vcard/include/VCardEnum.h | 123 + tdeabc/vcard/include/VCardFloatValue.h | 51 + tdeabc/vcard/include/VCardGeoValue.h | 49 + tdeabc/vcard/include/VCardGroup.h | 39 + tdeabc/vcard/include/VCardImageParam.h | 44 + tdeabc/vcard/include/VCardImageValue.h | 44 + tdeabc/vcard/include/VCardImgValue.h | 39 + tdeabc/vcard/include/VCardLangValue.h | 51 + tdeabc/vcard/include/VCardNValue.h | 56 + tdeabc/vcard/include/VCardOrgValue.h | 50 + tdeabc/vcard/include/VCardParam.h | 59 + tdeabc/vcard/include/VCardPhoneNumberValue.h | 39 + tdeabc/vcard/include/VCardRToken.h | 40 + tdeabc/vcard/include/VCardSndValue.h | 39 + tdeabc/vcard/include/VCardSoundValue.h | 44 + tdeabc/vcard/include/VCardSourceParam.h | 58 + tdeabc/vcard/include/VCardTelParam.h | 51 + tdeabc/vcard/include/VCardTelValue.h | 44 + tdeabc/vcard/include/VCardTextBinParam.h | 44 + tdeabc/vcard/include/VCardTextBinValue.h | 67 + tdeabc/vcard/include/VCardTextListValue.h | 51 + tdeabc/vcard/include/VCardTextParam.h | 44 + tdeabc/vcard/include/VCardTextValue.h | 41 + tdeabc/vcard/include/VCardURIValue.h | 52 + tdeabc/vcard/include/VCardUTCValue.h | 58 + tdeabc/vcard/include/VCardVCard.h | 63 + tdeabc/vcard/include/VCardVCardEntity.h | 56 + tdeabc/vcard/include/VCardValue.h | 46 + .../vcard/include/generated/AdrParam-generated.h | 23 + .../vcard/include/generated/AdrValue-generated.h | 23 + .../vcard/include/generated/AgentParam-generated.h | 23 + .../vcard/include/generated/AgentValue-generated.h | 23 + .../vcard/include/generated/ClassValue-generated.h | 23 + .../include/generated/ContentLine-generated.h | 23 + .../vcard/include/generated/DateParam-generated.h | 23 + .../vcard/include/generated/DateValue-generated.h | 23 + .../vcard/include/generated/EmailParam-generated.h | 23 + .../vcard/include/generated/FloatValue-generated.h | 23 + .../vcard/include/generated/GeoValue-generated.h | 23 + tdeabc/vcard/include/generated/Group-generated.h | 23 + .../vcard/include/generated/ImageParam-generated.h | 23 + .../vcard/include/generated/ImageValue-generated.h | 23 + .../vcard/include/generated/ImgParam-generated.h | 23 + .../vcard/include/generated/ImgValue-generated.h | 23 + .../vcard/include/generated/LangValue-generated.h | 23 + tdeabc/vcard/include/generated/NValue-generated.h | 23 + tdeabc/vcard/include/generated/Name-generated.h | 22 + .../vcard/include/generated/OrgValue-generated.h | 23 + tdeabc/vcard/include/generated/Param-generated.h | 23 + .../vcard/include/generated/ParamName-generated.h | 22 + .../vcard/include/generated/ParamValue-generated.h | 22 + .../include/generated/PhoneNumberValue-generated.h | 23 + .../vcard/include/generated/SoundValue-generated.h | 23 + .../include/generated/SourceParam-generated.h | 23 + .../vcard/include/generated/TelParam-generated.h | 23 + .../vcard/include/generated/TelValue-generated.h | 23 + .../include/generated/TextBinParam-generated.h | 23 + .../include/generated/TextBinValue-generated.h | 23 + .../include/generated/TextListValue-generated.h | 23 + .../include/generated/TextNSParam-generated.h | 23 + .../vcard/include/generated/TextParam-generated.h | 23 + .../vcard/include/generated/TextValue-generated.h | 23 + .../vcard/include/generated/URIValue-generated.h | 23 + .../vcard/include/generated/UTCValue-generated.h | 23 + tdeabc/vcard/include/generated/VCard-generated.h | 23 + .../include/generated/VCardEntity-generated.h | 23 + tdeabc/vcard/include/generated/Value-generated.h | 23 + tdeabc/vcard/include/generated/generate | 2 + tdeabc/vcard/include/generated/generateHeaders.awk | 41 + tdeabc/vcard/include/generated/headerBodies | 34 + tdeabc/vcard/testread.cpp | 129 + tdeabc/vcard/testwrite.cpp | 41 + tdeabc/vcard/vCard-all.cpp | 37 + tdeabc/vcard21parser.cpp | 608 + tdeabc/vcard21parser.h | 221 + tdeabc/vcardconverter.cpp | 129 + tdeabc/vcardconverter.h | 163 + tdeabc/vcardformat.cpp | 59 + tdeabc/vcardformat.h | 49 + tdeabc/vcardformatimpl.cpp | 1001 ++ tdeabc/vcardformatimpl.h | 106 + tdeabc/vcardformatplugin.cpp | 120 + tdeabc/vcardformatplugin.h | 56 + tdeabc/vcardparser/CMakeLists.txt | 40 + tdeabc/vcardparser/Makefile.am | 31 + tdeabc/vcardparser/README.testing | 15 + tdeabc/vcardparser/checkvcard.pl | 75 + tdeabc/vcardparser/testread.cpp | 89 + tdeabc/vcardparser/testread2.cpp | 42 + tdeabc/vcardparser/tests/vcard1.vcf | 13 + tdeabc/vcardparser/tests/vcard1.vcf.ref | 15 + tdeabc/vcardparser/tests/vcard2.vcf | 11 + tdeabc/vcardparser/tests/vcard2.vcf.ref | 12 + tdeabc/vcardparser/tests/vcard3.vcf | 11 + tdeabc/vcardparser/tests/vcard3.vcf.ref | 12 + tdeabc/vcardparser/tests/vcard4.vcf | 14 + tdeabc/vcardparser/tests/vcard4.vcf.ref | 14 + tdeabc/vcardparser/tests/vcard5.vcf | 313 + tdeabc/vcardparser/tests/vcard5.vcf.ref | 313 + tdeabc/vcardparser/tests/vcard6.vcf | 10 + tdeabc/vcardparser/tests/vcard6.vcf.ref | 10 + tdeabc/vcardparser/tests/vcard7.vcf | 7 + tdeabc/vcardparser/tests/vcard7.vcf.ref | 8 + tdeabc/vcardparser/testutils.cpp | 99 + tdeabc/vcardparser/testutils.h | 14 + tdeabc/vcardparser/testwrite.cpp | 134 + tdeabc/vcardparser/vcard.cpp | 109 + tdeabc/vcardparser/vcard.h | 91 + tdeabc/vcardparser/vcardline.cpp | 151 + tdeabc/vcardparser/vcardline.h | 115 + tdeabc/vcardparser/vcardparser.cpp | 297 + tdeabc/vcardparser/vcardparser.h | 44 + tdeabc/vcardtool.cpp | 896 ++ tdeabc/vcardtool.h | 88 + tdecert/tdecertpart.cc | 4 +- tdecmshell/main.cpp | 6 +- tdeconf_update/tdeconf_update.cpp | 6 +- tdecore/CMakeLists.txt | 16 +- tdecore/MAINTAINERS | 10 +- tdecore/Makefile.am | 16 +- tdecore/kappdcopiface.cpp | 2 +- tdecore/kapplication_win.cpp | 2 +- tdecore/kcalendarsystem.cpp | 4 +- tdecore/kcalendarsystemgregorian.cpp | 2 +- tdecore/kcalendarsystemhebrew.cpp | 2 +- tdecore/kcalendarsystemhijri.cpp | 2 +- tdecore/kcalendarsystemjalali.cpp | 4 +- tdecore/kcharsets.cpp | 4 +- tdecore/kcheckaccelerators.cpp | 4 +- tdecore/kclipboard.cpp | 2 +- tdecore/kcompletion.cpp | 4 +- tdecore/kcompletion.h | 2 +- tdecore/kcrash.cpp | 2 +- tdecore/kdebug.areas | 2 +- tdecore/kdebug.cpp | 4 +- tdecore/kdebugrc | 2 +- tdecore/kdesktopfile.cpp | 2 +- tdecore/kdetcompmgr.cpp | 2 +- tdecore/kgenericfactory.h | 4 +- tdecore/kglobal.cpp | 6 +- tdecore/kglobalaccel.cpp | 2 +- tdecore/kglobalsettings.cpp | 6 +- tdecore/kiconeffect.cpp | 4 +- tdecore/kiconloader.cpp | 2 +- tdecore/kiconloader.h | 2 +- tdecore/kicontheme.cpp | 2 +- tdecore/kinstance.cpp | 4 +- tdecore/kkeynative_x11.cpp | 2 +- tdecore/kkeyserver_x11.cpp | 4 +- tdecore/klibloader.cpp | 2 +- tdecore/klibloader.h | 2 +- tdecore/klocale.cpp | 4 +- tdecore/klocale.h | 2 +- tdecore/klockfile.cpp | 4 +- tdecore/kmimesourcefactory.cpp | 2 +- tdecore/kmimesourcefactory.h | 2 +- tdecore/kpalette.cpp | 2 +- tdecore/kprotocolinfo_tdecore.cpp | 2 +- tdecore/kprotocolinfofactory.cpp | 2 +- tdecore/krootprop.cpp | 4 +- tdecore/ksavefile.h | 2 +- tdecore/ksimpleconfig.cpp | 2 +- tdecore/ksimpledirwatch.cpp | 2 +- tdecore/ksockaddr.cpp | 2 +- tdecore/ksocks.cpp | 2 +- tdecore/kstandarddirs.h | 2 +- tdecore/kstartupinfo.cpp | 4 +- tdecore/kstartupinfo.h | 2 +- tdecore/kstaticdeleter.h | 2 +- tdecore/kstringhandler.cpp | 2 +- tdecore/ktempdir.cpp | 2 +- tdecore/ktempfile.cpp | 4 +- tdecore/ktimezones.cpp | 2 +- tdecore/kuniqueapplication.cpp | 2 +- tdecore/kurl.cpp | 2 +- tdecore/kurldrag.cpp | 4 +- tdecore/kvmallocator.cpp | 2 +- tdecore/netsupp.cpp | 2 +- tdecore/network/kresolver.cpp | 2 +- tdecore/network/kresolverstandardworkers.cpp | 2 +- tdecore/network/tdesocketaddress.cpp | 2 +- tdecore/network/tdesocketbase.cpp | 2 +- .../network-manager/network-manager_p.h | 2 +- tdecore/tde-config.cpp.cmake | 6 +- tdecore/tde-config.cpp.in | 6 +- tdecore/tdeaboutdata.h | 2 +- tdecore/tdeaccel.cpp | 2 +- tdecore/tdeaccelaction.cpp | 4 +- tdecore/tdeaccelbase.cpp | 4 +- tdecore/tdeapplication.cpp | 8 +- tdecore/tdecmdlineargs.cpp | 4 +- tdecore/tdeconfig.cpp | 2 +- tdecore/tdeconfig_compiler/example/autoexample.cpp | 4 +- tdecore/tdeconfig_compiler/example/example.cpp | 4 +- tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp | 8 +- tdecore/tdeconfig_compiler/tests/test2.cpp.ref | 2 +- tdecore/tdeconfig_compiler/tests/test8a.h.ref | 2 +- .../tdeconfig_compiler/tests/test_dpointer.cpp.ref | 2 +- tdecore/tdeconfigbackend.cpp | 4 +- tdecore/tdeconfigbackend.h | 2 +- tdecore/tdeconfigbase.cpp | 4 +- tdecore/tdeconfigdialogmanager.cpp | 2 +- tdecore/tdeconfigskeleton.cpp | 4 +- tdecore/tdeconfigskeleton.h | 2 +- tdecore/tdehardwaredevices.cpp | 6 +- tdecore/tdenetworkconnections.cpp | 2 +- tdecore/tdeshortcut.cpp | 4 +- tdecore/tdeshortcutlist.cpp | 2 +- tdecore/tdeshortcutmenu.cpp | 2 +- tdecore/tdestdaccel.cpp | 4 +- tdecore/tdesycoca.cpp | 2 +- tdecore/tests/Makefile.am | 2 +- tdecore/tests/kapptest.cpp | 2 +- tdecore/tests/kcalendartest.cpp | 4 +- tdecore/tests/kcmdlineargstest.cpp | 2 +- tdecore/tests/kglobaltest.cpp | 2 +- tdecore/tests/klocaletest.cpp | 6 +- tdecore/tests/kmdcodectest.cpp | 2 +- tdecore/tests/krfcdatetest.cpp | 2 +- tdecore/tests/ksocktest.cpp | 2 +- tdecore/tests/ktempfiletest.cpp | 2 +- tdecore/tests/kuniqueapptest.cpp | 2 +- tdecore/tests/kurltest.cpp | 2 +- tdecore/tests/startserviceby.cpp | 2 +- tdecore/tests/testqtargs.cpp | 2 +- tdecore/twin.cpp | 6 +- tdecore/twinmodule.cpp | 2 +- tdefile-plugins/elf/tdefile_elf.cpp | 2 +- tdehtml/css/csshelper.cpp | 2 +- tdehtml/css/cssparser.cpp | 2 +- tdehtml/css/cssstyleselector.cpp | 2 +- tdehtml/ecma/kjs_debugwin.cpp | 10 +- tdehtml/ecma/kjs_html.cpp | 4 +- tdehtml/ecma/kjs_mozilla.cpp | 2 +- tdehtml/ecma/kjs_navigator.cpp | 4 +- tdehtml/ecma/kjs_proxy.cpp | 6 +- tdehtml/ecma/kjs_window.cpp | 6 +- tdehtml/html/dtd.cpp | 2 +- tdehtml/html/html_documentimpl.cpp | 4 +- tdehtml/html/html_elementimpl.cpp | 2 +- tdehtml/html/html_formimpl.cpp | 6 +- tdehtml/html/html_imageimpl.cpp | 2 +- tdehtml/html/html_tableimpl.cpp | 2 +- tdehtml/html/htmlparser.cpp | 2 +- tdehtml/html/htmltokenizer.cpp | 2 +- tdehtml/java/kjavaapplet.cpp | 2 +- tdehtml/java/kjavaappletcontext.cpp | 4 +- tdehtml/java/kjavaappletserver.cpp | 4 +- tdehtml/java/kjavaappletviewer.cpp | 2 +- tdehtml/java/kjavaappletwidget.cpp | 2 +- tdehtml/java/kjavaprocess.cpp | 2 +- tdehtml/misc/arena.cpp | 2 +- tdehtml/misc/decoder.cpp | 4 +- tdehtml/misc/htmlhashes.cpp | 2 +- tdehtml/misc/htmltags.h | 2 +- tdehtml/misc/knsplugininstaller.cpp | 6 +- tdehtml/misc/loader.cpp | 4 +- tdehtml/misc/loader_jpeg.cpp | 2 +- tdehtml/misc/maketags | 2 +- tdehtml/rendering/font.cpp | 2 +- tdehtml/rendering/render_applet.cpp | 2 +- tdehtml/rendering/render_body.cpp | 2 +- tdehtml/rendering/render_box.cpp | 2 +- tdehtml/rendering/render_canvas.cpp | 2 +- tdehtml/rendering/render_flow.cpp | 2 +- tdehtml/rendering/render_form.cpp | 4 +- tdehtml/rendering/render_frames.cpp | 4 +- tdehtml/rendering/render_image.cpp | 2 +- tdehtml/rendering/render_inline.cpp | 2 +- tdehtml/rendering/render_line.cpp | 2 +- tdehtml/rendering/render_list.cpp | 2 +- tdehtml/rendering/render_object.cpp | 2 +- tdehtml/rendering/render_object.h | 2 +- tdehtml/rendering/render_replaced.cpp | 2 +- tdehtml/rendering/render_table.cpp | 2 +- tdehtml/rendering/render_text.cpp | 2 +- tdehtml/rendering/table_layout.cpp | 2 +- tdehtml/tdehtml_ext.cpp | 4 +- tdehtml/tdehtml_factory.cpp | 2 +- tdehtml/tdehtml_pagecache.cpp | 2 +- tdehtml/tdehtml_part.cpp | 10 +- tdehtml/tdehtml_printsettings.cpp | 2 +- tdehtml/tdehtml_run.cpp | 2 +- tdehtml/tdehtml_settings.cc | 8 +- tdehtml/tdehtmlimage.cpp | 2 +- tdehtml/tdehtmlview.cpp | 2 +- tdehtml/tdemultipart/tdemultipart.cpp | 6 +- tdehtml/test_regression.cpp | 2 +- tdehtml/xml/dom_docimpl.cpp | 4 +- tdehtml/xml/dom_nodeimpl.cpp | 2 +- tdehtml/xml/xml_tokenizer.cpp | 2 +- tdeio/bookmarks/kbookmark.cc | 4 +- tdeio/bookmarks/kbookmarkexporter.cc | 2 +- tdeio/bookmarks/kbookmarkimporter.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_crash.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_ie.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_kde1.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_ns.cc | 2 +- tdeio/bookmarks/kbookmarkimporter_opera.cc | 2 +- tdeio/bookmarks/kbookmarkmanager.cc | 4 +- tdeio/bookmarks/kbookmarkmenu.cc | 4 +- tdeio/bookmarks/kbookmarkmenu.h | 2 +- tdeio/bookmarks/kbookmarkmenu_p.h | 2 +- tdeio/httpfilter/httpfilter.cc | 2 +- tdeio/kpasswdserver/kpasswdserver.cpp | 4 +- tdeio/kssl/kssl.cc | 2 +- tdeio/kssl/ksslcertdlg.cc | 6 +- tdeio/kssl/ksslcertificate.cc | 4 +- tdeio/kssl/ksslinfodlg.cc | 6 +- tdeio/kssl/ksslkeygen.cc | 6 +- tdeio/kssl/ksslpemcallback.cc | 2 +- tdeio/kssl/ksslpkcs12.cc | 2 +- tdeio/kssl/ksslpkcs7.cc | 2 +- tdeio/kssl/ksslsettings.cc | 2 +- tdeio/kssl/ksslutils.cc | 4 +- tdeio/misc/kpac/discovery.cpp | 2 +- tdeio/misc/kpac/downloader.cpp | 4 +- tdeio/misc/kpac/proxyscout.cpp | 4 +- tdeio/misc/kssld/kssld.cpp | 2 +- tdeio/misc/tdefile/fileprops.cpp | 2 +- tdeio/misc/tdemailservice.cpp | 2 +- tdeio/misc/tdesendbugmail/main.cpp | 4 +- tdeio/misc/tdetelnetservice.cpp | 4 +- tdeio/misc/tdewalletd/tdewalletd.cpp | 6 +- tdeio/misc/tdewalletd/tdewalletwizard.ui | 2 +- tdeio/misc/uiserver.cpp | 6 +- tdeio/tdefile/CMakeLists.txt | 4 +- tdeio/tdefile/ChangeLog | 14 +- tdeio/tdefile/Makefile.am | 4 +- tdeio/tdefile/kacleditwidget.cpp | 2 +- tdeio/tdefile/kcombiview.cpp | 2 +- tdeio/tdefile/kcombiview.h | 2 +- tdeio/tdefile/kcustommenueditor.cpp | 4 +- tdeio/tdefile/kdiroperator.cpp | 8 +- tdeio/tdefile/kdirselectdialog.cpp | 6 +- tdeio/tdefile/kdirsize.cpp | 2 +- tdeio/tdefile/kencodingfiledialog.cpp | 6 +- tdeio/tdefile/kicondialog.cpp | 4 +- tdeio/tdefile/kimagefilepreview.cpp | 4 +- tdeio/tdefile/kmetaprops.cpp | 6 +- tdeio/tdefile/knotifydialog.cpp | 4 +- tdeio/tdefile/knotifydialog.h | 2 +- tdeio/tdefile/kopenwith.cpp | 4 +- tdeio/tdefile/kpreviewprops.cpp | 4 +- tdeio/tdefile/kpropertiesdialog.cpp | 8 +- tdeio/tdefile/kurlbar.cpp | 4 +- tdeio/tdefile/kurlcombobox.cpp | 4 +- tdeio/tdefile/kurlrequester.cpp | 4 +- tdeio/tdefile/kurlrequesterdlg.cpp | 4 +- tdeio/tdefile/tdefiledetailview.cpp | 6 +- tdeio/tdefile/tdefiledialog.cpp | 10 +- tdeio/tdefile/tdefilefiltercombo.cpp | 2 +- tdeio/tdefile/tdefileiconview.cpp | 4 +- tdeio/tdefile/tdefilemetainfowidget.cpp | 2 +- tdeio/tdefile/tdefilepreview.cpp | 2 +- tdeio/tdefile/tdefilesharedlg.cpp | 6 +- tdeio/tdefile/tdefilespeedbar.cpp | 6 +- tdeio/tdefile/tdefiletreeview.cpp | 2 +- tdeio/tdefile/tdefileview.cpp | 4 +- tdeio/tdefile/tderecentdirs.cpp | 2 +- tdeio/tdefile/tests/kcustommenueditortest.cpp | 2 +- tdeio/tdefile/tests/kdirselectdialogtest.cpp | 2 +- tdeio/tdefile/tests/kfdtest.cpp | 2 +- tdeio/tdefile/tests/kfstest.cpp | 4 +- tdeio/tdefile/tests/tdefiletreeviewtest.cpp | 2 +- tdeio/tdeio/CMakeLists.txt | 8 +- tdeio/tdeio/Makefile.am | 8 +- tdeio/tdeio/chmodjob.cpp | 4 +- tdeio/tdeio/dataslave.cpp | 2 +- tdeio/tdeio/defaultprogress.cpp | 4 +- tdeio/tdeio/global.cpp | 6 +- tdeio/tdeio/job.cpp | 10 +- tdeio/tdeio/kdcopservicestarter.cpp | 2 +- tdeio/tdeio/kdirlister.cpp | 8 +- tdeio/tdeio/kdirwatch.cpp | 2 +- tdeio/tdeio/kemailsettings.cpp | 4 +- tdeio/tdeio/kimageio.cpp | 4 +- tdeio/tdeio/kmessageboxwrapper.h | 2 +- tdeio/tdeio/kmimetype.cpp | 2 +- tdeio/tdeio/kmimetypechooser.cpp | 2 +- tdeio/tdeio/kprotocolinfo.cpp | 2 +- tdeio/tdeio/kprotocolmanager.cpp | 6 +- tdeio/tdeio/krun.cpp | 4 +- tdeio/tdeio/krun.h | 2 +- tdeio/tdeio/kscan.cpp | 2 +- tdeio/tdeio/kservice.cpp | 4 +- tdeio/tdeio/kservicefactory.cpp | 4 +- tdeio/tdeio/kservicegroup.cpp | 4 +- tdeio/tdeio/kservicegroupfactory.cpp | 4 +- tdeio/tdeio/kshred.cpp | 2 +- tdeio/tdeio/ktar.cpp | 2 +- tdeio/tdeio/kurlcompletion.cpp | 4 +- tdeio/tdeio/kuserprofile.cpp | 2 +- tdeio/tdeio/netaccess.cpp | 4 +- tdeio/tdeio/observer.cpp | 4 +- tdeio/tdeio/passdlg.cpp | 2 +- tdeio/tdeio/paste.cpp | 8 +- tdeio/tdeio/pastedialog.cpp | 2 +- tdeio/tdeio/previewjob.cpp | 4 +- tdeio/tdeio/renamedlg.cpp | 6 +- tdeio/tdeio/scheduler.cpp | 4 +- tdeio/tdeio/sessiondata.cpp | 6 +- tdeio/tdeio/skipdlg.cpp | 2 +- tdeio/tdeio/slave.cpp | 8 +- tdeio/tdeio/slavebase.cpp | 2 +- tdeio/tdeio/slaveconfig.cpp | 2 +- tdeio/tdeio/statusbarprogress.cpp | 2 +- tdeio/tdeio/tcpslavebase.cpp | 6 +- tdeio/tdeio/tdefilefilter.cpp | 2 +- tdeio/tdeio/tdefileitem.cpp | 6 +- tdeio/tdeio/tdefilemetainfo.cpp | 2 +- tdeio/tdeio/tdefileshare.cpp | 2 +- tdeio/tdeioexec/main.cpp | 6 +- tdeio/tests/kiopassdlgtest.cpp | 4 +- tdeio/tests/kpropsdlgtest.cpp | 2 +- tdeio/tests/kprotocolinfotest.cpp | 4 +- tdeio/tests/tdeioslavetest.cpp | 2 +- tdeioslave/file/file.cc | 6 +- tdeioslave/ftp/ftp.cc | 2 +- tdeioslave/http/http.cc | 2 +- tdeioslave/http/http_cache_cleaner.cpp | 6 +- tdeioslave/http/kcookiejar/kcookiewin.cpp | 4 +- tdeioslave/http/kcookiejar/main.cpp | 2 +- tdeioslave/metainfo/metainfo.cpp | 2 +- tdelfeditor/tdelfeditor.cpp | 2 +- tdemdi/tdemdi/dockcontainer.cpp | 4 +- tdemdi/tdemdi/guiclient.cpp | 2 +- tdemdi/tdemdi/mainwindow.cpp | 4 +- tdemdi/tdemdi/mainwindow.h | 2 +- tdemdi/tdemdichildarea.cpp | 4 +- tdemdi/tdemdichildfrm.cpp | 2 +- tdemdi/tdemdichildfrmcaption.cpp | 2 +- tdemdi/tdemdichildview.cpp | 2 +- tdemdi/tdemdidockcontainer.cpp | 4 +- tdemdi/tdemdiguiclient.cpp | 2 +- tdemdi/tdemdimainfrm.cpp | 4 +- tdemdi/tdemdimainfrm.h | 2 +- tdeparts/browserextension.cpp | 4 +- tdeparts/browserrun.cpp | 6 +- tdeparts/factory.cpp | 4 +- tdeparts/part.cpp | 6 +- tdeparts/partmanager.cpp | 2 +- tdeparts/plugin.cpp | 2 +- tdeparts/tests/example.cpp | 4 +- tdeparts/tests/ghostview.cpp | 4 +- tdeparts/tests/normalktm.cpp | 6 +- tdeparts/tests/notepad.cpp | 2 +- tdeparts/tests/parts.cpp | 4 +- tdeparts/tests/plugin_spellcheck.cpp | 4 +- tdeprint/cups/cupsaddsmb2.cpp | 4 +- tdeprint/cups/cupsdconf2/addressdialog.cpp | 2 +- tdeprint/cups/cupsdconf2/browsedialog.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdcomment.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdconf.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsddialog.cpp | 6 +- tdeprint/cups/cupsdconf2/cupsddirpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdjobspage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdlogpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp | 4 +- tdeprint/cups/cupsdconf2/cupsdserverpage.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdsplash.cpp | 2 +- tdeprint/cups/cupsdconf2/editlist.cpp | 2 +- tdeprint/cups/cupsdconf2/locationdialog.cpp | 2 +- tdeprint/cups/cupsdconf2/main.cpp | 2 +- tdeprint/cups/cupsdconf2/portdialog.cpp | 2 +- tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp | 2 +- tdeprint/cups/cupsdconf2/sizewidget.cpp | 2 +- tdeprint/cups/cupsinfos.cpp | 2 +- tdeprint/cups/ippreportdlg.cpp | 4 +- tdeprint/cups/ipprequest.cpp | 4 +- tdeprint/cups/kmconfigcups.cpp | 2 +- tdeprint/cups/kmconfigcupsdir.cpp | 2 +- tdeprint/cups/kmcupsconfigwidget.cpp | 2 +- tdeprint/cups/kmcupsfactory.cpp | 2 +- tdeprint/cups/kmcupsjobmanager.cpp | 2 +- tdeprint/cups/kmcupsmanager.cpp | 4 +- tdeprint/cups/kmcupsuimanager.cpp | 4 +- tdeprint/cups/kmpropbanners.cpp | 2 +- tdeprint/cups/kmpropquota.cpp | 2 +- tdeprint/cups/kmpropusers.cpp | 2 +- tdeprint/cups/kmwbanners.cpp | 2 +- tdeprint/cups/kmwfax.cpp | 2 +- tdeprint/cups/kmwipp.cpp | 2 +- tdeprint/cups/kmwippprinter.cpp | 4 +- tdeprint/cups/kmwippselect.cpp | 2 +- tdeprint/cups/kmwother.cpp | 2 +- tdeprint/cups/kmwquota.cpp | 2 +- tdeprint/cups/kmwusers.cpp | 2 +- tdeprint/cups/kphpgl2page.cpp | 2 +- tdeprint/cups/kpimagepage.cpp | 2 +- tdeprint/cups/kpschedulepage.cpp | 2 +- tdeprint/cups/kptagspage.cpp | 2 +- tdeprint/cups/kptextpage.cpp | 2 +- tdeprint/driver.cpp | 2 +- tdeprint/driverview.cpp | 2 +- tdeprint/droptionview.cpp | 2 +- tdeprint/ext/kextprinterimpl.cpp | 2 +- tdeprint/ext/kmextmanager.cpp | 2 +- tdeprint/ext/kmextuimanager.cpp | 2 +- tdeprint/foomatic/kfoomaticprinterimpl.cpp | 2 +- tdeprint/foomatic/kmfoomaticmanager.cpp | 2 +- tdeprint/foomatic2loader.cpp | 2 +- tdeprint/kmfactory.cpp | 4 +- tdeprint/kmjob.cpp | 2 +- tdeprint/kmmanager.cpp | 2 +- tdeprint/kmprinter.cpp | 2 +- tdeprint/kmspecialmanager.cpp | 4 +- tdeprint/kmuimanager.cpp | 2 +- tdeprint/kmvirtualmanager.cpp | 4 +- tdeprint/kpcopiespage.cpp | 2 +- tdeprint/kpdriverpage.cpp | 2 +- tdeprint/kpfileselectpage.cpp | 2 +- tdeprint/kpfilterpage.cpp | 4 +- tdeprint/kpgeneralpage.cpp | 2 +- tdeprint/kpmarginpage.cpp | 4 +- tdeprint/kpposterpage.cpp | 2 +- tdeprint/kpqtpage.cpp | 2 +- tdeprint/kprintaction.cpp | 2 +- tdeprint/kprintdialog.cpp | 6 +- tdeprint/kprinter.cpp | 6 +- tdeprint/kprinterimpl.cpp | 4 +- tdeprint/kprinterpropertydialog.cpp | 4 +- tdeprint/kprintpreview.cpp | 4 +- tdeprint/kprintprocess.cpp | 2 +- tdeprint/kxmlcommand.cpp | 4 +- tdeprint/lpd/klpdprinterimpl.cpp | 2 +- tdeprint/lpd/kmlpdmanager.cpp | 2 +- tdeprint/lpd/kmlpduimanager.cpp | 2 +- tdeprint/lpd/lpdtools.cpp | 2 +- tdeprint/lpdunix/klpdunixprinterimpl.cpp | 2 +- tdeprint/lpdunix/kmlpdunixmanager.cpp | 2 +- tdeprint/lpdunix/kmlpdunixuimanager.cpp | 2 +- tdeprint/lpr/apshandler.cpp | 2 +- tdeprint/lpr/editentrydialog.cpp | 2 +- tdeprint/lpr/kmconfiglpr.cpp | 2 +- tdeprint/lpr/kmlprjobmanager.cpp | 2 +- tdeprint/lpr/kmlprmanager.cpp | 4 +- tdeprint/lpr/kmlpruimanager.cpp | 2 +- tdeprint/lpr/lpchelper.cpp | 2 +- tdeprint/lpr/lprhandler.cpp | 2 +- tdeprint/lpr/lprngtoolhandler.cpp | 2 +- tdeprint/lpr/matichandler.cpp | 2 +- tdeprint/management/kaddprinterwizard.cpp | 6 +- tdeprint/management/kmconfigcommand.cpp | 2 +- tdeprint/management/kmconfigdialog.cpp | 2 +- tdeprint/management/kmconfigfilter.cpp | 2 +- tdeprint/management/kmconfigfonts.cpp | 2 +- tdeprint/management/kmconfiggeneral.cpp | 4 +- tdeprint/management/kmconfigjobs.cpp | 2 +- tdeprint/management/kmconfigpreview.cpp | 2 +- tdeprint/management/kmdbcreator.cpp | 2 +- tdeprint/management/kmdriverdb.cpp | 2 +- tdeprint/management/kmdriverdbwidget.cpp | 4 +- tdeprint/management/kmdriverdialog.cpp | 4 +- tdeprint/management/kminfopage.cpp | 2 +- tdeprint/management/kminstancepage.cpp | 4 +- tdeprint/management/kmjobviewer.cpp | 6 +- tdeprint/management/kmlistview.cpp | 2 +- tdeprint/management/kmmainview.cpp | 6 +- tdeprint/management/kmpages.cpp | 2 +- tdeprint/management/kmprinterview.cpp | 2 +- tdeprint/management/kmpropbackend.cpp | 2 +- tdeprint/management/kmpropcontainer.cpp | 2 +- tdeprint/management/kmpropdriver.cpp | 2 +- tdeprint/management/kmpropgeneral.cpp | 2 +- tdeprint/management/kmpropmembers.cpp | 2 +- tdeprint/management/kmpropwidget.cpp | 4 +- tdeprint/management/kmspecialprinterdlg.cpp | 4 +- tdeprint/management/kmwbackend.cpp | 2 +- tdeprint/management/kmwclass.cpp | 2 +- tdeprint/management/kmwdriver.cpp | 2 +- tdeprint/management/kmwdriverselect.cpp | 4 +- tdeprint/management/kmwdrivertest.cpp | 4 +- tdeprint/management/kmwend.cpp | 2 +- tdeprint/management/kmwfile.cpp | 2 +- tdeprint/management/kmwinfopage.cpp | 2 +- tdeprint/management/kmwizard.cpp | 4 +- tdeprint/management/kmwlocal.cpp | 4 +- tdeprint/management/kmwlpd.cpp | 4 +- tdeprint/management/kmwname.cpp | 4 +- tdeprint/management/kmwpassword.cpp | 2 +- tdeprint/management/kmwsmb.cpp | 2 +- tdeprint/management/kmwsocket.cpp | 4 +- tdeprint/management/kmwsocketutil.cpp | 4 +- tdeprint/management/kxmlcommanddlg.cpp | 4 +- tdeprint/management/kxmlcommandselector.cpp | 4 +- tdeprint/management/networkscanner.cpp | 4 +- tdeprint/management/smbview.cpp | 6 +- tdeprint/management/tdeprint_management_module.cpp | 4 +- tdeprint/marginpreview.cpp | 2 +- tdeprint/marginwidget.cpp | 4 +- tdeprint/plugincombobox.cpp | 2 +- tdeprint/posterpreview.cpp | 4 +- tdeprint/ppdloader.cpp | 2 +- tdeprint/printerfilter.cpp | 2 +- tdeprint/rlpr/kmconfigproxy.cpp | 2 +- tdeprint/rlpr/kmproprlpr.cpp | 2 +- tdeprint/rlpr/kmproxywidget.cpp | 2 +- tdeprint/rlpr/kmrlprmanager.cpp | 2 +- tdeprint/rlpr/kmrlpruimanager.cpp | 2 +- tdeprint/rlpr/kmwrlpr.cpp | 2 +- tdeprint/rlpr/krlprprinterimpl.cpp | 2 +- tdeprint/tdefilelist.cpp | 2 +- tdeprint/tdeprintd.cpp | 4 +- tdeprint/tests/helpwindow.cpp | 2 +- tdeprint/tools/escputil/escpwidget.cpp | 4 +- tdeprint/util.h | 2 +- tderandr/ktimerdialog.cpp | 2 +- tderandr/libtderandr.cc | 4 +- tderandr/randr.cpp | 4 +- tderesources/configdialog.cpp | 4 +- tderesources/configpage.cpp | 4 +- tderesources/factory.cpp | 2 +- tderesources/kcmtderesources.cpp | 2 +- tderesources/resource.cpp | 2 +- tderesources/selectdialog.cpp | 4 +- tdersync/rsyncconfigdialog.cpp | 4 +- tdersync/tdersync.h | 4 +- tdespell2/settings.cpp | 4 +- tdespell2/ui/configdialog.cpp | 2 +- tdespell2/ui/configwidget.cpp | 2 +- tdespell2/ui/dialog.cpp | 2 +- tdesu/ssh.cpp | 2 +- tdesu/su.cpp | 2 +- tdeui/CMakeLists.txt | 8 +- tdeui/MAINTAINERS | 4 +- tdeui/Makefile.am | 8 +- tdeui/kauthicon.cpp | 2 +- tdeui/kbugreport.cpp | 6 +- tdeui/kbuttonbox.cpp | 2 +- tdeui/kcharselect.cpp | 2 +- tdeui/kcmenumngr.cpp | 2 +- tdeui/kcolorbutton.cpp | 2 +- tdeui/kcolorcombo.cpp | 8 +- tdeui/kcolordialog.cpp | 8 +- tdeui/kcombobox.cpp | 2 +- tdeui/kcommand.cpp | 2 +- tdeui/kcursor.cpp | 2 +- tdeui/kdatepicker.cpp | 4 +- tdeui/kdatetbl.cpp | 6 +- tdeui/kdatewidget.cpp | 4 +- tdeui/kdialog.cpp | 4 +- tdeui/kdialogbase.cpp | 6 +- tdeui/kdockwidget.cpp | 6 +- tdeui/kdualcolorbutton.cpp | 2 +- tdeui/keditcl1.cpp | 4 +- tdeui/keditcl2.cpp | 4 +- tdeui/keditlistbox.cpp | 2 +- tdeui/kedittoolbar.cpp | 4 +- tdeui/kguiitem.h | 2 +- tdeui/khelpmenu.cpp | 4 +- tdeui/kiconview.cpp | 4 +- tdeui/kiconviewsearchline.cpp | 2 +- tdeui/kjanuswidget.cpp | 6 +- tdeui/kkeybutton.cpp | 2 +- tdeui/kkeydialog.cpp | 6 +- tdeui/klineedit.cpp | 2 +- tdeui/klineeditdlg.cpp | 2 +- tdeui/kmenubar.cpp | 8 +- tdeui/kmessagebox.cpp | 6 +- tdeui/knuminput.cpp | 4 +- tdeui/knumvalidator.cpp | 4 +- tdeui/kpanelmenu.cpp | 2 +- tdeui/kpassdlg.cpp | 6 +- tdeui/kpassivepopup.cpp | 2 +- tdeui/kpixmapio.cpp | 2 +- tdeui/kpixmapregionselectordialog.cpp | 2 +- tdeui/kpixmapregionselectorwidget.cpp | 2 +- tdeui/kprogress.cpp | 2 +- tdeui/kprogressbox.cpp | 2 +- tdeui/kpushbutton.cpp | 4 +- tdeui/ksconfig.cpp | 4 +- tdeui/kscrollview.cpp | 2 +- tdeui/ksplashscreen.cpp | 4 +- tdeui/kstatusbar.cpp | 2 +- tdeui/kstdaction.cpp | 4 +- tdeui/kstdaction_p.h | 2 +- tdeui/kstdguiitem.cpp | 2 +- tdeui/kswitchlanguagedialog.cpp | 4 +- tdeui/ksyntaxhighlighter.cpp | 4 +- tdeui/ksystemtray.cpp | 4 +- tdeui/ksystemtray.h | 2 +- tdeui/ktabbar.cpp | 4 +- tdeui/ktextbrowser.cpp | 2 +- tdeui/ktextedit.cpp | 4 +- tdeui/ktimezonewidget.cpp | 2 +- tdeui/ktip.cpp | 6 +- tdeui/kurllabel.cpp | 2 +- tdeui/kwhatsthismanager.cpp | 2 +- tdeui/kwizard.cpp | 4 +- tdeui/kxmlguibuilder.cpp | 6 +- tdeui/kxmlguifactory.cpp | 2 +- tdeui/kxmlguifactory_p.cpp | 2 +- tdeui/tdeaboutapplication.cpp | 4 +- tdeui/tdeaboutdialog.cpp | 6 +- tdeui/tdeabouttde.cpp | 2 +- tdeui/tdeaction.cpp | 2 +- tdeui/tdeactionclasses.cpp | 4 +- tdeui/tdeactionselector.cpp | 2 +- tdeui/tdecmodule.cpp | 4 +- tdeui/tdecompletionbox.cpp | 2 +- tdeui/tdeconfigdialog.cpp | 2 +- tdeui/tdefontcombo.cpp | 2 +- tdeui/tdefontdialog.cpp | 6 +- tdeui/tdefontrequester.cpp | 2 +- tdeui/tdelistbox.cpp | 2 +- tdeui/tdelistview.cpp | 2 +- tdeui/tdelistviewsearchline.cpp | 2 +- tdeui/tdemainwindow.cpp | 4 +- tdeui/tdeshortcutdialog.cpp | 4 +- tdeui/tdespell.cpp | 4 +- tdeui/tdespelldlg.cpp | 2 +- tdeui/tdetoolbar.cpp | 4 +- tdeui/tdetoolbar.h | 2 +- tdeui/tdetoolbarbutton.cpp | 4 +- tdeui/tdetoolbarbutton.h | 2 +- tdeui/tdetoolbarhandler.cpp | 2 +- tdeui/tests/itemcontainertest.cpp | 2 +- tdeui/tests/kaboutdialogtest.cpp | 2 +- tdeui/tests/kcharselecttest.cpp | 2 +- tdeui/tests/kcolordlgtest.cpp | 2 +- tdeui/tests/kcomboboxtest.cpp | 2 +- tdeui/tests/kcompletiontest.cpp | 2 +- tdeui/tests/kdatepicktest.cpp | 2 +- tdeui/tests/kdatetimewidgettest.cpp | 2 +- tdeui/tests/kdatewidgettest.cpp | 2 +- tdeui/tests/kdockwidgettest.cpp | 2 +- tdeui/tests/kdualcolortest.cpp | 2 +- tdeui/tests/klineedittest.cpp | 4 +- tdeui/tests/kmessageboxtest.cpp | 4 +- tdeui/tests/kstatusbartest.cpp | 2 +- tdeui/tests/kstatusbartest.h | 2 +- tdeui/tests/ktimewidgettest.cpp | 2 +- tdeui/tests/tdemainwindowtest.cpp | 2 +- tdeui/tests/twindowtest.cpp | 4 +- tdeui/tests/twindowtest.h | 2 +- tdeui/twindowlistmenu.cpp | 2 +- tdeunittest/modrunner.cpp | 4 +- tdeunittest/runner.cpp | 2 +- tdeunittest/tester.h | 2 +- tdeutils/kcmultidialog.cpp | 4 +- tdeutils/kcmultidialog.h | 2 +- tdeutils/kfind.cpp | 4 +- tdeutils/kfinddialog.cpp | 4 +- tdeutils/kplugininfo.cpp | 2 +- tdeutils/kpluginselector.cpp | 6 +- tdeutils/kreplace.cpp | 4 +- tdeutils/kreplacedialog.cpp | 4 +- tdeutils/ksettings/componentsdialog.cpp | 2 +- tdeutils/ksettings/dialog.cpp | 2 +- tdeutils/tdecmodulecontainer.cpp | 2 +- tdeutils/tdecmoduleinfo.cpp | 4 +- tdeutils/tdecmoduleloader.cpp | 4 +- tdeutils/tdecmoduleproxy.cpp | 2 +- tdewallet/backend/tdewalletbackend.cc | 4 +- tdewallet/tests/tdewalletasync.cpp | 2 +- tdewallet/tests/tdewalletboth.cpp | 2 +- tdewallet/tests/tdewalletsync.cpp | 2 +- win/pro_files/kabc/kabc.pro | 4 +- win/pro_files/kabc/vcard/vcard.pro | 4 +- win/pro_files/kio/kio.pro | 6 +- win/pro_files/tdecore/tdecore.pro | 10 +- win/pro_files/tdeui/tdeui.pro | 4 +- win/tools/build_tdelibs_dbg | 2 +- win/tools/build_tdelibs_rel | 2 +- 1393 files changed, 51761 insertions(+), 51761 deletions(-) delete mode 100644 kabc/CMakeLists.txt delete mode 100644 kabc/HACKING delete mode 100644 kabc/HOWTO delete mode 100644 kabc/Makefile.am delete mode 100644 kabc/README delete mode 100644 kabc/README.AddressFormat delete mode 100644 kabc/TODO delete mode 100644 kabc/address.cpp delete mode 100644 kabc/address.h delete mode 100644 kabc/addressbook.cpp delete mode 100644 kabc/addressbook.h delete mode 100644 kabc/addresseedialog.cpp delete mode 100644 kabc/addresseedialog.h delete mode 100644 kabc/addresseehelper.cpp delete mode 100644 kabc/addresseehelper.h delete mode 100644 kabc/addresseelist.cpp delete mode 100644 kabc/addresseelist.h delete mode 100644 kabc/addresslineedit.cpp delete mode 100644 kabc/addresslineedit.h delete mode 100644 kabc/agent.cpp delete mode 100644 kabc/agent.h delete mode 100644 kabc/countrytransl.map delete mode 100644 kabc/distributionlist.cpp delete mode 100644 kabc/distributionlist.h delete mode 100644 kabc/distributionlistdialog.cpp delete mode 100644 kabc/distributionlistdialog.h delete mode 100644 kabc/distributionlisteditor.cpp delete mode 100644 kabc/distributionlisteditor.h delete mode 100644 kabc/errorhandler.cpp delete mode 100644 kabc/errorhandler.h delete mode 100644 kabc/field.h delete mode 100644 kabc/format.h delete mode 100644 kabc/formatfactory.cpp delete mode 100644 kabc/formatfactory.h delete mode 100644 kabc/formatplugin.h delete mode 100644 kabc/formats/CMakeLists.txt delete mode 100644 kabc/formats/Makefile.am delete mode 100644 kabc/formats/binary.desktop delete mode 100644 kabc/formats/binaryformat.cpp delete mode 100644 kabc/formats/binaryformat.h delete mode 100644 kabc/geo.cpp delete mode 100644 kabc/geo.h delete mode 100644 kabc/kabc_manager.desktop delete mode 100644 kabc/key.cpp delete mode 100644 kabc/key.h delete mode 100644 kabc/ldapclient.cpp delete mode 100644 kabc/ldapclient.h delete mode 100644 kabc/ldapconfigwidget.cpp delete mode 100644 kabc/ldapconfigwidget.h delete mode 100644 kabc/ldapurl.cpp delete mode 100644 kabc/ldapurl.h delete mode 100644 kabc/ldif.cpp delete mode 100644 kabc/ldif.h delete mode 100644 kabc/ldifconverter.cpp delete mode 100644 kabc/ldifconverter.h delete mode 100644 kabc/lock.cpp delete mode 100644 kabc/lock.h delete mode 100644 kabc/locknull.cpp delete mode 100644 kabc/locknull.h delete mode 100644 kabc/phonenumber.cpp delete mode 100644 kabc/phonenumber.h delete mode 100644 kabc/picture.cpp delete mode 100644 kabc/picture.h delete mode 100644 kabc/plugin.cpp delete mode 100644 kabc/plugin.h delete mode 100644 kabc/plugins/CMakeLists.txt delete mode 100644 kabc/plugins/Makefile.am delete mode 100644 kabc/plugins/dir/CMakeLists.txt delete mode 100644 kabc/plugins/dir/Makefile.am delete mode 100644 kabc/plugins/dir/dir.desktop delete mode 100644 kabc/plugins/dir/resourcedir.cpp delete mode 100644 kabc/plugins/dir/resourcedir.h delete mode 100644 kabc/plugins/dir/resourcedirconfig.cpp delete mode 100644 kabc/plugins/dir/resourcedirconfig.h delete mode 100644 kabc/plugins/dir/resourcedirplugin.cpp delete mode 100644 kabc/plugins/evolution/Makefile.am delete mode 100644 kabc/plugins/evolution/README delete mode 100644 kabc/plugins/evolution/dbwrapper.cpp delete mode 100644 kabc/plugins/evolution/dbwrapper.h delete mode 100644 kabc/plugins/evolution/evolution.desktop delete mode 100644 kabc/plugins/evolution/resourceevo.cpp delete mode 100644 kabc/plugins/evolution/resourceevo.h delete mode 100644 kabc/plugins/file/CMakeLists.txt delete mode 100644 kabc/plugins/file/Makefile.am delete mode 100644 kabc/plugins/file/file.desktop delete mode 100644 kabc/plugins/file/resourcefile.cpp delete mode 100644 kabc/plugins/file/resourcefile.h delete mode 100644 kabc/plugins/file/resourcefileconfig.cpp delete mode 100644 kabc/plugins/file/resourcefileconfig.h delete mode 100644 kabc/plugins/file/resourcefileplugin.cpp delete mode 100644 kabc/plugins/ldaptdeio/CMakeLists.txt delete mode 100644 kabc/plugins/ldaptdeio/Makefile.am delete mode 100644 kabc/plugins/ldaptdeio/ldaptdeio.desktop delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeio.cpp delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeio.h delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h delete mode 100644 kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp delete mode 100644 kabc/plugins/net/CMakeLists.txt delete mode 100644 kabc/plugins/net/Makefile.am delete mode 100644 kabc/plugins/net/net.desktop delete mode 100644 kabc/plugins/net/resourcenet.cpp delete mode 100644 kabc/plugins/net/resourcenet.h delete mode 100644 kabc/plugins/net/resourcenetconfig.cpp delete mode 100644 kabc/plugins/net/resourcenetconfig.h delete mode 100644 kabc/plugins/net/resourcenetplugin.cpp delete mode 100644 kabc/plugins/sql/Makefile.am delete mode 100644 kabc/plugins/sql/resourcesql.cpp delete mode 100644 kabc/plugins/sql/resourcesql.h delete mode 100644 kabc/plugins/sql/resourcesqlconfig.cpp delete mode 100644 kabc/plugins/sql/resourcesqlconfig.h delete mode 100644 kabc/plugins/sql/sql.desktop delete mode 100644 kabc/resource.cpp delete mode 100644 kabc/resource.h delete mode 100644 kabc/resourceselectdialog.cpp delete mode 100644 kabc/resourceselectdialog.h delete mode 100644 kabc/scripts/Makefile.am delete mode 100644 kabc/scripts/addressee.src.cpp delete mode 100644 kabc/scripts/addressee.src.h delete mode 100755 kabc/scripts/createisomap.pl delete mode 100644 kabc/scripts/entrylist delete mode 100644 kabc/scripts/field.src.cpp delete mode 100755 kabc/scripts/makeaddressee delete mode 100644 kabc/secrecy.cpp delete mode 100644 kabc/secrecy.h delete mode 100644 kabc/sortmode.cpp delete mode 100644 kabc/sortmode.h delete mode 100644 kabc/sound.cpp delete mode 100644 kabc/sound.h delete mode 100644 kabc/stdaddressbook.cpp delete mode 100644 kabc/stdaddressbook.h delete mode 100644 kabc/tdeab2tdeabc.cpp delete mode 100644 kabc/tdeab2tdeabc.desktop delete mode 100644 kabc/tests/Makefile.am delete mode 100644 kabc/tests/bigread.cpp delete mode 100644 kabc/tests/bigwrite.cpp delete mode 100644 kabc/tests/kabcargl.cpp delete mode 100644 kabc/tests/testaddressee.cpp delete mode 100644 kabc/tests/testaddresseelist.cpp delete mode 100644 kabc/tests/testaddressfmt.cpp delete mode 100644 kabc/tests/testaddresslineedit.cpp delete mode 100644 kabc/tests/testdb.cpp delete mode 100644 kabc/tests/testdistlist.cpp delete mode 100644 kabc/tests/testkabc.cpp delete mode 100644 kabc/tests/testkabcdlg.cpp delete mode 100644 kabc/tests/testldapclient.cpp delete mode 100644 kabc/tests/testldapclient.h delete mode 100644 kabc/tests/testlock.cpp delete mode 100644 kabc/tests/testlock.h delete mode 100644 kabc/timezone.cpp delete mode 100644 kabc/timezone.h delete mode 100644 kabc/vcard/AdrParam.cpp delete mode 100644 kabc/vcard/AdrValue.cpp delete mode 100644 kabc/vcard/AgentParam.cpp delete mode 100644 kabc/vcard/AgentValue.cpp delete mode 100644 kabc/vcard/CMakeLists.txt delete mode 100644 kabc/vcard/ClassValue.cpp delete mode 100644 kabc/vcard/ContentLine.cpp delete mode 100644 kabc/vcard/DateParam.cpp delete mode 100644 kabc/vcard/DateValue.cpp delete mode 100644 kabc/vcard/EmailParam.cpp delete mode 100644 kabc/vcard/Entity.cpp delete mode 100644 kabc/vcard/Enum.cpp delete mode 100644 kabc/vcard/FloatValue.cpp delete mode 100644 kabc/vcard/GeoValue.cpp delete mode 100644 kabc/vcard/ImageParam.cpp delete mode 100644 kabc/vcard/ImageValue.cpp delete mode 100644 kabc/vcard/ImgValue.cpp delete mode 100644 kabc/vcard/LangValue.cpp delete mode 100644 kabc/vcard/Makefile.am delete mode 100644 kabc/vcard/NValue.cpp delete mode 100644 kabc/vcard/OrgValue.cpp delete mode 100644 kabc/vcard/Param.cpp delete mode 100644 kabc/vcard/PhoneNumberValue.cpp delete mode 100644 kabc/vcard/README delete mode 100644 kabc/vcard/RToken.cpp delete mode 100644 kabc/vcard/SoundValue.cpp delete mode 100644 kabc/vcard/SourceParam.cpp delete mode 100644 kabc/vcard/TelParam.cpp delete mode 100644 kabc/vcard/TelValue.cpp delete mode 100644 kabc/vcard/TextBinParam.cpp delete mode 100644 kabc/vcard/TextBinValue.cpp delete mode 100644 kabc/vcard/TextListValue.cpp delete mode 100644 kabc/vcard/TextParam.cpp delete mode 100644 kabc/vcard/TextValue.cpp delete mode 100644 kabc/vcard/URIValue.cpp delete mode 100644 kabc/vcard/UTCValue.cpp delete mode 100644 kabc/vcard/VCard.cpp delete mode 100644 kabc/vcard/VCardEntity.cpp delete mode 100644 kabc/vcard/Value.cpp delete mode 100644 kabc/vcard/include/VCard.h delete mode 100644 kabc/vcard/include/VCardAdrParam.h delete mode 100644 kabc/vcard/include/VCardAdrValue.h delete mode 100644 kabc/vcard/include/VCardAgentParam.h delete mode 100644 kabc/vcard/include/VCardAgentValue.h delete mode 100644 kabc/vcard/include/VCardClassValue.h delete mode 100644 kabc/vcard/include/VCardContentLine.h delete mode 100644 kabc/vcard/include/VCardDateParam.h delete mode 100644 kabc/vcard/include/VCardDateValue.h delete mode 100644 kabc/vcard/include/VCardDefines.h delete mode 100644 kabc/vcard/include/VCardEmailParam.h delete mode 100644 kabc/vcard/include/VCardEntity.h delete mode 100644 kabc/vcard/include/VCardEnum.h delete mode 100644 kabc/vcard/include/VCardFloatValue.h delete mode 100644 kabc/vcard/include/VCardGeoValue.h delete mode 100644 kabc/vcard/include/VCardGroup.h delete mode 100644 kabc/vcard/include/VCardImageParam.h delete mode 100644 kabc/vcard/include/VCardImageValue.h delete mode 100644 kabc/vcard/include/VCardImgValue.h delete mode 100644 kabc/vcard/include/VCardLangValue.h delete mode 100644 kabc/vcard/include/VCardNValue.h delete mode 100644 kabc/vcard/include/VCardOrgValue.h delete mode 100644 kabc/vcard/include/VCardParam.h delete mode 100644 kabc/vcard/include/VCardPhoneNumberValue.h delete mode 100644 kabc/vcard/include/VCardRToken.h delete mode 100644 kabc/vcard/include/VCardSndValue.h delete mode 100644 kabc/vcard/include/VCardSoundValue.h delete mode 100644 kabc/vcard/include/VCardSourceParam.h delete mode 100644 kabc/vcard/include/VCardTelParam.h delete mode 100644 kabc/vcard/include/VCardTelValue.h delete mode 100644 kabc/vcard/include/VCardTextBinParam.h delete mode 100644 kabc/vcard/include/VCardTextBinValue.h delete mode 100644 kabc/vcard/include/VCardTextListValue.h delete mode 100644 kabc/vcard/include/VCardTextParam.h delete mode 100644 kabc/vcard/include/VCardTextValue.h delete mode 100644 kabc/vcard/include/VCardURIValue.h delete mode 100644 kabc/vcard/include/VCardUTCValue.h delete mode 100644 kabc/vcard/include/VCardVCard.h delete mode 100644 kabc/vcard/include/VCardVCardEntity.h delete mode 100644 kabc/vcard/include/VCardValue.h delete mode 100644 kabc/vcard/include/generated/AdrParam-generated.h delete mode 100644 kabc/vcard/include/generated/AdrValue-generated.h delete mode 100644 kabc/vcard/include/generated/AgentParam-generated.h delete mode 100644 kabc/vcard/include/generated/AgentValue-generated.h delete mode 100644 kabc/vcard/include/generated/ClassValue-generated.h delete mode 100644 kabc/vcard/include/generated/ContentLine-generated.h delete mode 100644 kabc/vcard/include/generated/DateParam-generated.h delete mode 100644 kabc/vcard/include/generated/DateValue-generated.h delete mode 100644 kabc/vcard/include/generated/EmailParam-generated.h delete mode 100644 kabc/vcard/include/generated/FloatValue-generated.h delete mode 100644 kabc/vcard/include/generated/GeoValue-generated.h delete mode 100644 kabc/vcard/include/generated/Group-generated.h delete mode 100644 kabc/vcard/include/generated/ImageParam-generated.h delete mode 100644 kabc/vcard/include/generated/ImageValue-generated.h delete mode 100644 kabc/vcard/include/generated/ImgParam-generated.h delete mode 100644 kabc/vcard/include/generated/ImgValue-generated.h delete mode 100644 kabc/vcard/include/generated/LangValue-generated.h delete mode 100644 kabc/vcard/include/generated/NValue-generated.h delete mode 100644 kabc/vcard/include/generated/Name-generated.h delete mode 100644 kabc/vcard/include/generated/OrgValue-generated.h delete mode 100644 kabc/vcard/include/generated/Param-generated.h delete mode 100644 kabc/vcard/include/generated/ParamName-generated.h delete mode 100644 kabc/vcard/include/generated/ParamValue-generated.h delete mode 100644 kabc/vcard/include/generated/PhoneNumberValue-generated.h delete mode 100644 kabc/vcard/include/generated/SoundValue-generated.h delete mode 100644 kabc/vcard/include/generated/SourceParam-generated.h delete mode 100644 kabc/vcard/include/generated/TelParam-generated.h delete mode 100644 kabc/vcard/include/generated/TelValue-generated.h delete mode 100644 kabc/vcard/include/generated/TextBinParam-generated.h delete mode 100644 kabc/vcard/include/generated/TextBinValue-generated.h delete mode 100644 kabc/vcard/include/generated/TextListValue-generated.h delete mode 100644 kabc/vcard/include/generated/TextNSParam-generated.h delete mode 100644 kabc/vcard/include/generated/TextParam-generated.h delete mode 100644 kabc/vcard/include/generated/TextValue-generated.h delete mode 100644 kabc/vcard/include/generated/URIValue-generated.h delete mode 100644 kabc/vcard/include/generated/UTCValue-generated.h delete mode 100644 kabc/vcard/include/generated/VCard-generated.h delete mode 100644 kabc/vcard/include/generated/VCardEntity-generated.h delete mode 100644 kabc/vcard/include/generated/Value-generated.h delete mode 100755 kabc/vcard/include/generated/generate delete mode 100755 kabc/vcard/include/generated/generateHeaders.awk delete mode 100644 kabc/vcard/include/generated/headerBodies delete mode 100644 kabc/vcard/testread.cpp delete mode 100644 kabc/vcard/testwrite.cpp delete mode 100644 kabc/vcard/vCard-all.cpp delete mode 100644 kabc/vcard21parser.cpp delete mode 100644 kabc/vcard21parser.h delete mode 100644 kabc/vcardconverter.cpp delete mode 100644 kabc/vcardconverter.h delete mode 100644 kabc/vcardformat.cpp delete mode 100644 kabc/vcardformat.h delete mode 100644 kabc/vcardformatimpl.cpp delete mode 100644 kabc/vcardformatimpl.h delete mode 100644 kabc/vcardformatplugin.cpp delete mode 100644 kabc/vcardformatplugin.h delete mode 100644 kabc/vcardparser/CMakeLists.txt delete mode 100644 kabc/vcardparser/Makefile.am delete mode 100644 kabc/vcardparser/README.testing delete mode 100755 kabc/vcardparser/checkvcard.pl delete mode 100644 kabc/vcardparser/testread.cpp delete mode 100644 kabc/vcardparser/testread2.cpp delete mode 100644 kabc/vcardparser/tests/vcard1.vcf delete mode 100644 kabc/vcardparser/tests/vcard1.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard2.vcf delete mode 100644 kabc/vcardparser/tests/vcard2.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard3.vcf delete mode 100644 kabc/vcardparser/tests/vcard3.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard4.vcf delete mode 100644 kabc/vcardparser/tests/vcard4.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard5.vcf delete mode 100644 kabc/vcardparser/tests/vcard5.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard6.vcf delete mode 100644 kabc/vcardparser/tests/vcard6.vcf.ref delete mode 100644 kabc/vcardparser/tests/vcard7.vcf delete mode 100644 kabc/vcardparser/tests/vcard7.vcf.ref delete mode 100644 kabc/vcardparser/testutils.cpp delete mode 100644 kabc/vcardparser/testutils.h delete mode 100644 kabc/vcardparser/testwrite.cpp delete mode 100644 kabc/vcardparser/vcard.cpp delete mode 100644 kabc/vcardparser/vcard.h delete mode 100644 kabc/vcardparser/vcardline.cpp delete mode 100644 kabc/vcardparser/vcardline.h delete mode 100644 kabc/vcardparser/vcardparser.cpp delete mode 100644 kabc/vcardparser/vcardparser.h delete mode 100644 kabc/vcardtool.cpp delete mode 100644 kabc/vcardtool.h create mode 100644 tdeabc/CMakeLists.txt create mode 100644 tdeabc/HACKING create mode 100644 tdeabc/HOWTO create mode 100644 tdeabc/Makefile.am create mode 100644 tdeabc/README create mode 100644 tdeabc/README.AddressFormat create mode 100644 tdeabc/TODO create mode 100644 tdeabc/address.cpp create mode 100644 tdeabc/address.h create mode 100644 tdeabc/addressbook.cpp create mode 100644 tdeabc/addressbook.h create mode 100644 tdeabc/addresseedialog.cpp create mode 100644 tdeabc/addresseedialog.h create mode 100644 tdeabc/addresseehelper.cpp create mode 100644 tdeabc/addresseehelper.h create mode 100644 tdeabc/addresseelist.cpp create mode 100644 tdeabc/addresseelist.h create mode 100644 tdeabc/addresslineedit.cpp create mode 100644 tdeabc/addresslineedit.h create mode 100644 tdeabc/agent.cpp create mode 100644 tdeabc/agent.h create mode 100644 tdeabc/countrytransl.map create mode 100644 tdeabc/distributionlist.cpp create mode 100644 tdeabc/distributionlist.h create mode 100644 tdeabc/distributionlistdialog.cpp create mode 100644 tdeabc/distributionlistdialog.h create mode 100644 tdeabc/distributionlisteditor.cpp create mode 100644 tdeabc/distributionlisteditor.h create mode 100644 tdeabc/errorhandler.cpp create mode 100644 tdeabc/errorhandler.h create mode 100644 tdeabc/field.h create mode 100644 tdeabc/format.h create mode 100644 tdeabc/formatfactory.cpp create mode 100644 tdeabc/formatfactory.h create mode 100644 tdeabc/formatplugin.h create mode 100644 tdeabc/formats/CMakeLists.txt create mode 100644 tdeabc/formats/Makefile.am create mode 100644 tdeabc/formats/binary.desktop create mode 100644 tdeabc/formats/binaryformat.cpp create mode 100644 tdeabc/formats/binaryformat.h create mode 100644 tdeabc/geo.cpp create mode 100644 tdeabc/geo.h create mode 100644 tdeabc/kabc_manager.desktop create mode 100644 tdeabc/key.cpp create mode 100644 tdeabc/key.h create mode 100644 tdeabc/ldapclient.cpp create mode 100644 tdeabc/ldapclient.h create mode 100644 tdeabc/ldapconfigwidget.cpp create mode 100644 tdeabc/ldapconfigwidget.h create mode 100644 tdeabc/ldapurl.cpp create mode 100644 tdeabc/ldapurl.h create mode 100644 tdeabc/ldif.cpp create mode 100644 tdeabc/ldif.h create mode 100644 tdeabc/ldifconverter.cpp create mode 100644 tdeabc/ldifconverter.h create mode 100644 tdeabc/lock.cpp create mode 100644 tdeabc/lock.h create mode 100644 tdeabc/locknull.cpp create mode 100644 tdeabc/locknull.h create mode 100644 tdeabc/phonenumber.cpp create mode 100644 tdeabc/phonenumber.h create mode 100644 tdeabc/picture.cpp create mode 100644 tdeabc/picture.h create mode 100644 tdeabc/plugin.cpp create mode 100644 tdeabc/plugin.h create mode 100644 tdeabc/plugins/CMakeLists.txt create mode 100644 tdeabc/plugins/Makefile.am create mode 100644 tdeabc/plugins/dir/CMakeLists.txt create mode 100644 tdeabc/plugins/dir/Makefile.am create mode 100644 tdeabc/plugins/dir/dir.desktop create mode 100644 tdeabc/plugins/dir/resourcedir.cpp create mode 100644 tdeabc/plugins/dir/resourcedir.h create mode 100644 tdeabc/plugins/dir/resourcedirconfig.cpp create mode 100644 tdeabc/plugins/dir/resourcedirconfig.h create mode 100644 tdeabc/plugins/dir/resourcedirplugin.cpp create mode 100644 tdeabc/plugins/evolution/Makefile.am create mode 100644 tdeabc/plugins/evolution/README create mode 100644 tdeabc/plugins/evolution/dbwrapper.cpp create mode 100644 tdeabc/plugins/evolution/dbwrapper.h create mode 100644 tdeabc/plugins/evolution/evolution.desktop create mode 100644 tdeabc/plugins/evolution/resourceevo.cpp create mode 100644 tdeabc/plugins/evolution/resourceevo.h create mode 100644 tdeabc/plugins/file/CMakeLists.txt create mode 100644 tdeabc/plugins/file/Makefile.am create mode 100644 tdeabc/plugins/file/file.desktop create mode 100644 tdeabc/plugins/file/resourcefile.cpp create mode 100644 tdeabc/plugins/file/resourcefile.h create mode 100644 tdeabc/plugins/file/resourcefileconfig.cpp create mode 100644 tdeabc/plugins/file/resourcefileconfig.h create mode 100644 tdeabc/plugins/file/resourcefileplugin.cpp create mode 100644 tdeabc/plugins/ldaptdeio/CMakeLists.txt create mode 100644 tdeabc/plugins/ldaptdeio/Makefile.am create mode 100644 tdeabc/plugins/ldaptdeio/ldaptdeio.desktop create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeio.h create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h create mode 100644 tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp create mode 100644 tdeabc/plugins/net/CMakeLists.txt create mode 100644 tdeabc/plugins/net/Makefile.am create mode 100644 tdeabc/plugins/net/net.desktop create mode 100644 tdeabc/plugins/net/resourcenet.cpp create mode 100644 tdeabc/plugins/net/resourcenet.h create mode 100644 tdeabc/plugins/net/resourcenetconfig.cpp create mode 100644 tdeabc/plugins/net/resourcenetconfig.h create mode 100644 tdeabc/plugins/net/resourcenetplugin.cpp create mode 100644 tdeabc/plugins/sql/Makefile.am create mode 100644 tdeabc/plugins/sql/resourcesql.cpp create mode 100644 tdeabc/plugins/sql/resourcesql.h create mode 100644 tdeabc/plugins/sql/resourcesqlconfig.cpp create mode 100644 tdeabc/plugins/sql/resourcesqlconfig.h create mode 100644 tdeabc/plugins/sql/sql.desktop create mode 100644 tdeabc/resource.cpp create mode 100644 tdeabc/resource.h create mode 100644 tdeabc/resourceselectdialog.cpp create mode 100644 tdeabc/resourceselectdialog.h create mode 100644 tdeabc/scripts/Makefile.am create mode 100644 tdeabc/scripts/addressee.src.cpp create mode 100644 tdeabc/scripts/addressee.src.h create mode 100755 tdeabc/scripts/createisomap.pl create mode 100644 tdeabc/scripts/entrylist create mode 100644 tdeabc/scripts/field.src.cpp create mode 100755 tdeabc/scripts/makeaddressee create mode 100644 tdeabc/secrecy.cpp create mode 100644 tdeabc/secrecy.h create mode 100644 tdeabc/sortmode.cpp create mode 100644 tdeabc/sortmode.h create mode 100644 tdeabc/sound.cpp create mode 100644 tdeabc/sound.h create mode 100644 tdeabc/stdaddressbook.cpp create mode 100644 tdeabc/stdaddressbook.h create mode 100644 tdeabc/tdeab2tdeabc.cpp create mode 100644 tdeabc/tdeab2tdeabc.desktop create mode 100644 tdeabc/tests/Makefile.am create mode 100644 tdeabc/tests/bigread.cpp create mode 100644 tdeabc/tests/bigwrite.cpp create mode 100644 tdeabc/tests/kabcargl.cpp create mode 100644 tdeabc/tests/testaddressee.cpp create mode 100644 tdeabc/tests/testaddresseelist.cpp create mode 100644 tdeabc/tests/testaddressfmt.cpp create mode 100644 tdeabc/tests/testaddresslineedit.cpp create mode 100644 tdeabc/tests/testdb.cpp create mode 100644 tdeabc/tests/testdistlist.cpp create mode 100644 tdeabc/tests/testkabc.cpp create mode 100644 tdeabc/tests/testkabcdlg.cpp create mode 100644 tdeabc/tests/testldapclient.cpp create mode 100644 tdeabc/tests/testldapclient.h create mode 100644 tdeabc/tests/testlock.cpp create mode 100644 tdeabc/tests/testlock.h create mode 100644 tdeabc/timezone.cpp create mode 100644 tdeabc/timezone.h create mode 100644 tdeabc/vcard/AdrParam.cpp create mode 100644 tdeabc/vcard/AdrValue.cpp create mode 100644 tdeabc/vcard/AgentParam.cpp create mode 100644 tdeabc/vcard/AgentValue.cpp create mode 100644 tdeabc/vcard/CMakeLists.txt create mode 100644 tdeabc/vcard/ClassValue.cpp create mode 100644 tdeabc/vcard/ContentLine.cpp create mode 100644 tdeabc/vcard/DateParam.cpp create mode 100644 tdeabc/vcard/DateValue.cpp create mode 100644 tdeabc/vcard/EmailParam.cpp create mode 100644 tdeabc/vcard/Entity.cpp create mode 100644 tdeabc/vcard/Enum.cpp create mode 100644 tdeabc/vcard/FloatValue.cpp create mode 100644 tdeabc/vcard/GeoValue.cpp create mode 100644 tdeabc/vcard/ImageParam.cpp create mode 100644 tdeabc/vcard/ImageValue.cpp create mode 100644 tdeabc/vcard/ImgValue.cpp create mode 100644 tdeabc/vcard/LangValue.cpp create mode 100644 tdeabc/vcard/Makefile.am create mode 100644 tdeabc/vcard/NValue.cpp create mode 100644 tdeabc/vcard/OrgValue.cpp create mode 100644 tdeabc/vcard/Param.cpp create mode 100644 tdeabc/vcard/PhoneNumberValue.cpp create mode 100644 tdeabc/vcard/README create mode 100644 tdeabc/vcard/RToken.cpp create mode 100644 tdeabc/vcard/SoundValue.cpp create mode 100644 tdeabc/vcard/SourceParam.cpp create mode 100644 tdeabc/vcard/TelParam.cpp create mode 100644 tdeabc/vcard/TelValue.cpp create mode 100644 tdeabc/vcard/TextBinParam.cpp create mode 100644 tdeabc/vcard/TextBinValue.cpp create mode 100644 tdeabc/vcard/TextListValue.cpp create mode 100644 tdeabc/vcard/TextParam.cpp create mode 100644 tdeabc/vcard/TextValue.cpp create mode 100644 tdeabc/vcard/URIValue.cpp create mode 100644 tdeabc/vcard/UTCValue.cpp create mode 100644 tdeabc/vcard/VCard.cpp create mode 100644 tdeabc/vcard/VCardEntity.cpp create mode 100644 tdeabc/vcard/Value.cpp create mode 100644 tdeabc/vcard/include/VCard.h create mode 100644 tdeabc/vcard/include/VCardAdrParam.h create mode 100644 tdeabc/vcard/include/VCardAdrValue.h create mode 100644 tdeabc/vcard/include/VCardAgentParam.h create mode 100644 tdeabc/vcard/include/VCardAgentValue.h create mode 100644 tdeabc/vcard/include/VCardClassValue.h create mode 100644 tdeabc/vcard/include/VCardContentLine.h create mode 100644 tdeabc/vcard/include/VCardDateParam.h create mode 100644 tdeabc/vcard/include/VCardDateValue.h create mode 100644 tdeabc/vcard/include/VCardDefines.h create mode 100644 tdeabc/vcard/include/VCardEmailParam.h create mode 100644 tdeabc/vcard/include/VCardEntity.h create mode 100644 tdeabc/vcard/include/VCardEnum.h create mode 100644 tdeabc/vcard/include/VCardFloatValue.h create mode 100644 tdeabc/vcard/include/VCardGeoValue.h create mode 100644 tdeabc/vcard/include/VCardGroup.h create mode 100644 tdeabc/vcard/include/VCardImageParam.h create mode 100644 tdeabc/vcard/include/VCardImageValue.h create mode 100644 tdeabc/vcard/include/VCardImgValue.h create mode 100644 tdeabc/vcard/include/VCardLangValue.h create mode 100644 tdeabc/vcard/include/VCardNValue.h create mode 100644 tdeabc/vcard/include/VCardOrgValue.h create mode 100644 tdeabc/vcard/include/VCardParam.h create mode 100644 tdeabc/vcard/include/VCardPhoneNumberValue.h create mode 100644 tdeabc/vcard/include/VCardRToken.h create mode 100644 tdeabc/vcard/include/VCardSndValue.h create mode 100644 tdeabc/vcard/include/VCardSoundValue.h create mode 100644 tdeabc/vcard/include/VCardSourceParam.h create mode 100644 tdeabc/vcard/include/VCardTelParam.h create mode 100644 tdeabc/vcard/include/VCardTelValue.h create mode 100644 tdeabc/vcard/include/VCardTextBinParam.h create mode 100644 tdeabc/vcard/include/VCardTextBinValue.h create mode 100644 tdeabc/vcard/include/VCardTextListValue.h create mode 100644 tdeabc/vcard/include/VCardTextParam.h create mode 100644 tdeabc/vcard/include/VCardTextValue.h create mode 100644 tdeabc/vcard/include/VCardURIValue.h create mode 100644 tdeabc/vcard/include/VCardUTCValue.h create mode 100644 tdeabc/vcard/include/VCardVCard.h create mode 100644 tdeabc/vcard/include/VCardVCardEntity.h create mode 100644 tdeabc/vcard/include/VCardValue.h create mode 100644 tdeabc/vcard/include/generated/AdrParam-generated.h create mode 100644 tdeabc/vcard/include/generated/AdrValue-generated.h create mode 100644 tdeabc/vcard/include/generated/AgentParam-generated.h create mode 100644 tdeabc/vcard/include/generated/AgentValue-generated.h create mode 100644 tdeabc/vcard/include/generated/ClassValue-generated.h create mode 100644 tdeabc/vcard/include/generated/ContentLine-generated.h create mode 100644 tdeabc/vcard/include/generated/DateParam-generated.h create mode 100644 tdeabc/vcard/include/generated/DateValue-generated.h create mode 100644 tdeabc/vcard/include/generated/EmailParam-generated.h create mode 100644 tdeabc/vcard/include/generated/FloatValue-generated.h create mode 100644 tdeabc/vcard/include/generated/GeoValue-generated.h create mode 100644 tdeabc/vcard/include/generated/Group-generated.h create mode 100644 tdeabc/vcard/include/generated/ImageParam-generated.h create mode 100644 tdeabc/vcard/include/generated/ImageValue-generated.h create mode 100644 tdeabc/vcard/include/generated/ImgParam-generated.h create mode 100644 tdeabc/vcard/include/generated/ImgValue-generated.h create mode 100644 tdeabc/vcard/include/generated/LangValue-generated.h create mode 100644 tdeabc/vcard/include/generated/NValue-generated.h create mode 100644 tdeabc/vcard/include/generated/Name-generated.h create mode 100644 tdeabc/vcard/include/generated/OrgValue-generated.h create mode 100644 tdeabc/vcard/include/generated/Param-generated.h create mode 100644 tdeabc/vcard/include/generated/ParamName-generated.h create mode 100644 tdeabc/vcard/include/generated/ParamValue-generated.h create mode 100644 tdeabc/vcard/include/generated/PhoneNumberValue-generated.h create mode 100644 tdeabc/vcard/include/generated/SoundValue-generated.h create mode 100644 tdeabc/vcard/include/generated/SourceParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TelParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TelValue-generated.h create mode 100644 tdeabc/vcard/include/generated/TextBinParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TextBinValue-generated.h create mode 100644 tdeabc/vcard/include/generated/TextListValue-generated.h create mode 100644 tdeabc/vcard/include/generated/TextNSParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TextParam-generated.h create mode 100644 tdeabc/vcard/include/generated/TextValue-generated.h create mode 100644 tdeabc/vcard/include/generated/URIValue-generated.h create mode 100644 tdeabc/vcard/include/generated/UTCValue-generated.h create mode 100644 tdeabc/vcard/include/generated/VCard-generated.h create mode 100644 tdeabc/vcard/include/generated/VCardEntity-generated.h create mode 100644 tdeabc/vcard/include/generated/Value-generated.h create mode 100755 tdeabc/vcard/include/generated/generate create mode 100755 tdeabc/vcard/include/generated/generateHeaders.awk create mode 100644 tdeabc/vcard/include/generated/headerBodies create mode 100644 tdeabc/vcard/testread.cpp create mode 100644 tdeabc/vcard/testwrite.cpp create mode 100644 tdeabc/vcard/vCard-all.cpp create mode 100644 tdeabc/vcard21parser.cpp create mode 100644 tdeabc/vcard21parser.h create mode 100644 tdeabc/vcardconverter.cpp create mode 100644 tdeabc/vcardconverter.h create mode 100644 tdeabc/vcardformat.cpp create mode 100644 tdeabc/vcardformat.h create mode 100644 tdeabc/vcardformatimpl.cpp create mode 100644 tdeabc/vcardformatimpl.h create mode 100644 tdeabc/vcardformatplugin.cpp create mode 100644 tdeabc/vcardformatplugin.h create mode 100644 tdeabc/vcardparser/CMakeLists.txt create mode 100644 tdeabc/vcardparser/Makefile.am create mode 100644 tdeabc/vcardparser/README.testing create mode 100755 tdeabc/vcardparser/checkvcard.pl create mode 100644 tdeabc/vcardparser/testread.cpp create mode 100644 tdeabc/vcardparser/testread2.cpp create mode 100644 tdeabc/vcardparser/tests/vcard1.vcf create mode 100644 tdeabc/vcardparser/tests/vcard1.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard2.vcf create mode 100644 tdeabc/vcardparser/tests/vcard2.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard3.vcf create mode 100644 tdeabc/vcardparser/tests/vcard3.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard4.vcf create mode 100644 tdeabc/vcardparser/tests/vcard4.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard5.vcf create mode 100644 tdeabc/vcardparser/tests/vcard5.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard6.vcf create mode 100644 tdeabc/vcardparser/tests/vcard6.vcf.ref create mode 100644 tdeabc/vcardparser/tests/vcard7.vcf create mode 100644 tdeabc/vcardparser/tests/vcard7.vcf.ref create mode 100644 tdeabc/vcardparser/testutils.cpp create mode 100644 tdeabc/vcardparser/testutils.h create mode 100644 tdeabc/vcardparser/testwrite.cpp create mode 100644 tdeabc/vcardparser/vcard.cpp create mode 100644 tdeabc/vcardparser/vcard.h create mode 100644 tdeabc/vcardparser/vcardline.cpp create mode 100644 tdeabc/vcardparser/vcardline.h create mode 100644 tdeabc/vcardparser/vcardparser.cpp create mode 100644 tdeabc/vcardparser/vcardparser.h create mode 100644 tdeabc/vcardtool.cpp create mode 100644 tdeabc/vcardtool.h (limited to 'tdehtml/css/cssparser.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a9f23a4d..ac1ecf1a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -953,7 +953,7 @@ add_subdirectory( kinit ) add_subdirectory( tdeprint ) add_subdirectory( kab ) add_subdirectory( tderesources ) -add_subdirectory( kabc ) +add_subdirectory( tdeabc ) add_subdirectory( arts ) add_subdirectory( interfaces ) add_subdirectory( kate ) diff --git a/KDE2PORTING.html b/KDE2PORTING.html index b375854de..322efffb2 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -204,9 +204,9 @@ must have created a TDEApplication object before the methods can be used.

    diff --git a/Mainpage.dox b/Mainpage.dox index 15904678c..702510fc5 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -49,8 +49,8 @@ * (classes)\n * Defines interfaces for common components so that new implementations * can be dropped in. - * - kabc - * (classes)\n + * - kabc + * (classes)\n * Access to the Trinity address book. * - tderesources * (classes)\n diff --git a/Makefile.am.in b/Makefile.am.in index 83d0901fa..2ebb4f8c6 100644 --- a/Makefile.am.in +++ b/Makefile.am.in @@ -39,7 +39,7 @@ potdir = $(kde_includes) pot_DATA = kde.pot messages: - cd kabc/scripts && perl ./makeaddressee + cd tdeabc/scripts && perl ./makeaddressee find . -type d | grep -v '\.svn' | sed -e 's,$$,/,' > dirs mfs=`find . -name Makefile.am | xargs egrep -l '^messages:'` ;\ for dir in $$mfs; do \ diff --git a/arts/kde/kaudioplaystream.cpp b/arts/kde/kaudioplaystream.cpp index 52743a67e..0ef5b8332 100644 --- a/arts/kde/kaudioplaystream.cpp +++ b/arts/kde/kaudioplaystream.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/arts/kde/kaudiorecordstream.cpp b/arts/kde/kaudiorecordstream.cpp index 0d180d1f1..0c11bcf04 100644 --- a/arts/kde/kaudiorecordstream.cpp +++ b/arts/kde/kaudiorecordstream.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/arts/kde/kconverttest.cc b/arts/kde/kconverttest.cc index 70c4b7918..647c2f320 100644 --- a/arts/kde/kconverttest.cc +++ b/arts/kde/kconverttest.cc @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include diff --git a/arts/kde/kiotest.cc b/arts/kde/kiotest.cc index 01ce8f3f1..ed9a3fadf 100644 --- a/arts/kde/kiotest.cc +++ b/arts/kde/kiotest.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include "qiomanager.h" diff --git a/arts/kde/kiotestslow.cc b/arts/kde/kiotestslow.cc index df6ed645f..93bfac388 100644 --- a/arts/kde/kiotestslow.cc +++ b/arts/kde/kiotestslow.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index 389228d99..c03a18c21 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -27,7 +27,7 @@ #endif #include -#include +#include #include "kvideowidget.h" diff --git a/arts/kde/mcop-dcop/kmcop.cpp b/arts/kde/mcop-dcop/kmcop.cpp index d134aeca4..d5e8c8642 100644 --- a/arts/kde/mcop-dcop/kmcop.cpp +++ b/arts/kde/mcop-dcop/kmcop.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index 3d0e45d02..313a7a993 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -52,9 +52,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/arts/message/artsmessage.cc b/arts/message/artsmessage.cc index 4eb62f1fb..eaa5c8e2c 100644 --- a/arts/message/artsmessage.cc +++ b/arts/message/artsmessage.cc @@ -31,11 +31,11 @@ Gnome, etc. and used instead. #include -#include -#include +#include +#include #include #include -#include +#include #include // command line options diff --git a/configure.in.in b/configure.in.in index 651d6f2eb..c414bafdb 100644 --- a/configure.in.in +++ b/configure.in.in @@ -249,7 +249,7 @@ AC_SUBST(LIBRESOLV) AC_SUBST(LIBICE) AC_SUBST(LIB_KAB, '$(top_builddir)/kab/libkab.la') -AC_SUBST(LIB_KABC, '$(top_builddir)/kabc/libkabc.la') +AC_SUBST(LIB_KABC, '$(top_builddir)/tdeabc/libkabc.la') AC_SUBST(LIB_TDECORE, '$(top_builddir)/tdecore/libtdecore.la') AC_SUBST(LIB_TDEUI, '$(top_builddir)/tdeui/libtdeui.la') AC_SUBST(LIB_KIO, '$(top_builddir)/tdeio/libtdeio.la') diff --git a/interfaces/tdeimproxy/library/tdeimproxy.cpp b/interfaces/tdeimproxy/library/tdeimproxy.cpp index c4d77c61e..fb2db0eb4 100644 --- a/interfaces/tdeimproxy/library/tdeimproxy.cpp +++ b/interfaces/tdeimproxy/library/tdeimproxy.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp index 7dd746c4f..370805a74 100644 --- a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp +++ b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp @@ -5,10 +5,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdescript/scriptloader.cpp b/interfaces/tdescript/scriptloader.cpp index ad6c8df20..803feb3a6 100644 --- a/interfaces/tdescript/scriptloader.cpp +++ b/interfaces/tdescript/scriptloader.cpp @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/interfaces/tdescript/scriptmanager.cpp b/interfaces/tdescript/scriptmanager.cpp index 42e20cd5b..a0dfbe921 100644 --- a/interfaces/tdescript/scriptmanager.cpp +++ b/interfaces/tdescript/scriptmanager.cpp @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include #include //using namespace KScriptInterface; diff --git a/interfaces/tdetexteditor/CMakeLists.txt b/interfaces/tdetexteditor/CMakeLists.txt index 0808a84f3..ca0176ce7 100644 --- a/interfaces/tdetexteditor/CMakeLists.txt +++ b/interfaces/tdetexteditor/CMakeLists.txt @@ -90,7 +90,7 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 0.0.0 - LINK tdeui-shared kabc-shared tdeparts-shared + LINK tdeui-shared tdeabc-shared tdeparts-shared DEPENDENCIES dcopidl dcopidl2cpp DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/interfaces/tdetexteditor/Makefile.am b/interfaces/tdetexteditor/Makefile.am index b535b39cc..4b1590abe 100644 --- a/interfaces/tdetexteditor/Makefile.am +++ b/interfaces/tdetexteditor/Makefile.am @@ -46,7 +46,7 @@ servicetype_DATA = tdetexteditor.desktop tdetexteditoreditor.desktop tdetextedit kcm_tdetexteditor_DATA = kcm_tdetexteditor.desktop kcm_tdetexteditordir = $(kde_datadir)/kcm_componentchooser -templateinterface.lo: $(top_builddir)/kabc/addressee.h +templateinterface.lo: $(top_builddir)/tdeabc/addressee.h include ../../admin/Doxyfile.am diff --git a/interfaces/tdetexteditor/editorchooser.cpp b/interfaces/tdetexteditor/editorchooser.cpp index aed904c54..1eddfb8d6 100644 --- a/interfaces/tdetexteditor/editorchooser.cpp +++ b/interfaces/tdetexteditor/editorchooser.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdetexteditor/templateinterface.cpp b/interfaces/tdetexteditor/templateinterface.cpp index ecc34c7e2..01e0c292f 100644 --- a/interfaces/tdetexteditor/templateinterface.cpp +++ b/interfaces/tdetexteditor/templateinterface.cpp @@ -22,11 +22,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/interfaces/terminal/test/main.cc b/interfaces/terminal/test/main.cc index bcce6fdbc..8130f85d6 100644 --- a/interfaces/terminal/test/main.cc +++ b/interfaces/terminal/test/main.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include "main.h" #include "main.moc" diff --git a/kab/addressbook.cc b/kab/addressbook.cc index ab73111be..852f56d57 100644 --- a/kab/addressbook.cc +++ b/kab/addressbook.cc @@ -22,11 +22,11 @@ #include #include -#include +#include #include -#include +#include #include -#include +#include extern "C" { #include diff --git a/kab/kabapi.cc b/kab/kabapi.cc index 05cffe946..7f2159e24 100644 --- a/kab/kabapi.cc +++ b/kab/kabapi.cc @@ -18,8 +18,8 @@ #include "kabapi.h" #include -#include -#include +#include +#include #include diff --git a/kabc/CMakeLists.txt b/kabc/CMakeLists.txt deleted file mode 100644 index 57c4741fe..000000000 --- a/kabc/CMakeLists.txt +++ /dev/null @@ -1,123 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( vcard ) -add_subdirectory( vcardparser ) -add_subdirectory( formats ) -add_subdirectory( plugins ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include - ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include/generated - ${CMAKE_CURRENT_SOURCE_DIR}/vcardparser - - # external includes - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/kab -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - address.h addressbook.h addresseedialog.h - agent.h distributionlist.h distributionlistdialog.h - distributionlisteditor.h errorhandler.h field.h - format.h formatfactory.h formatplugin.h geo.h key.h - phonenumber.h picture.h plugin.h resource.h secrecy.h - resourceselectdialog.h sound.h stdaddressbook.h - timezone.h vcardconverter.h vcardformat.h lock.h - vcardformatplugin.h ldifconverter.h addresslineedit.h - ldapclient.h addresseelist.h locknull.h ldif.h - ldapurl.h ldapconfigwidget.h sortmode.h - ${CMAKE_CURRENT_BINARY_DIR}/addressee.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES tdeab2tdeabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) -install( FILES kabc_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources ) -install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc ) - - -##### generated files ########################### -# FIXME this hack make compatibility with out-of-source mode - -file( COPY - scripts/makeaddressee scripts/addressee.src.cpp - scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp - DESTINATION scripts ) - -add_custom_command( - OUTPUT addressee.cpp addressee.h field.cpp - COMMAND perl - ARGS makeaddressee - DEPENDS scripts/addressee.src.cpp scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts -) - - -##### kabc ###################################### - -set( target kabc ) - -set( ${target}_SRCS - address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp - agent.cpp distributionlist.cpp distributionlistdialog.cpp - distributionlisteditor.cpp errorhandler.cpp field.cpp - formatfactory.cpp geo.cpp key.cpp phonenumber.cpp - picture.cpp plugin.cpp resource.cpp resourceselectdialog.cpp - secrecy.cpp sound.cpp stdaddressbook.cpp timezone.cpp - vcard21parser.cpp vcardconverter.cpp vcardformat.cpp - vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp - addresslineedit.cpp ldapclient.cpp addresseelist.cpp - vcardtool.cpp addresseehelper.cpp lock.cpp locknull.cpp - ldif.cpp ldapurl.cpp ldapconfigwidget.cpp sortmode.cpp - addresseehelper.skel -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.2.0 - LINK vcards-static vcard-shared tdeio-shared tderesources-shared - DEPENDENCIES addressee.h dcopidl - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### tdeab2tdeabc ################################## - -set( target tdeab2tdeabc ) - -set( ${target}_SRCS - tdeab2tdeabc.cpp -) - -tde_add_executable( ${target} - SOURCES ${${target}_SRCS} - LINK kab-static kabc-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kabc/HACKING b/kabc/HACKING deleted file mode 100644 index 429ae0865..000000000 --- a/kabc/HACKING +++ /dev/null @@ -1,100 +0,0 @@ -Coding Style -============ - -See http://korganizer.kde.org/hacking.html for an HTML version. - -Formatting ----------- - -- No Tabs. -- Indent with 2 spaces. -- A line must not have more than 80 chars. -- Put Spaces between brackets and arguments of functions. -- For if, else, while and similar statements put the brackets on the same line - as the statement. -- Function and class definitions have their brackets on separate lines. - -Example: - -void MyClass::myFunction() -{ - if ( blah == fasel ) { - blubbVariable = arglValue; - } else { - blubbVariable = oerxValue; - } -} - - -Header Formatting ------------------ - -- General formatting rules apply. -- Access modifiers are indented. -- Put curly brackets of class definition on its own line. -- Double inclusion protection defines are all upper case letters and are - composed of the namespace (if available), the classname and a H suffix - separated by underscores. -- Inside a namespace there is no indentation. - -Example: - -#ifndef XKJ_MYCLASS_H -#define XKJ_MYCLASS_H - -namespace XKJ { - -class MyClass -{ - public: - MyClass(); - - private: - int mMyInt; -}; - -} - -#endif - - -API docs --------- - -- Each public function must have a Doxygen compatible comment in the header -- Use C-style comments without additional asterisks -- Indent correctly. -- Comments should be grammatically correct, e.g. sentences start with uppercase - letters and end with a full stop. -- Be concise. - -Example: - - /** - This function makes tea. - - @param cups number of cups. - @result tea - */ - Tea makeTea( int cups ); - - -Class and File Names --------------------- - -- Put classes in files, which have the same name as the class, but only - lower-case letters. -- Designer-generated files should have a name classname_base.ui and shoul - contain a class called ClassnameBase. -- Classes inheriting from designer-generated classes have the same name as the - generated class, but without the Base suffix. - -Class and Variable Names ------------------------- - -- For class, variable, function names seperate multiple words by upper-casing - the words precedeed by other words. -- Class names start with an upper-case letter. -- Function names start with a lower-case letter. -- Variable names start with a lower-case letter. -- Member variables of a class start with "m" followed by an upper-case letter. diff --git a/kabc/HOWTO b/kabc/HOWTO deleted file mode 100644 index 7b41371b0..000000000 --- a/kabc/HOWTO +++ /dev/null @@ -1,372 +0,0 @@ -The KDE Address Book Framework -=============================== - -The KDE address book framework tries to provide an easy to use and powerful -mechanism to handle contacts in all KDE applications. - -If you want to make use of it, this small introduction to programming -with libkabc may be helpful. - - -General Concepts -================= - -In libkabc the storage and management of contacts is devided in 2 layers. - -****************** -Management Layer * -****************** - - .-------------------. - | KABC::AddressBook | - .--------------------------------. - | KABC::Addressee | => Iterators - | KABC::Addressee | - | KABC::Addressee | => Search functions - | ... | - `--------------------------------' - | - - - - - - - - - - - - | - - - - - - - - - - - - - - | -*************** | -Storage Layer * | -*************** | ....................... - | . . - Network - .---------------. | . .---------------. . - | ResourceFile |----+-----| ResourceLDAP | . - `---------------' | . `---------------' . - .---------------. | . .---------------. . - | ResourceDir |----+-----| ResourceNet | . - `---------------' . `---------------' . - . . - ....................... - - -The Management Layer ---------------------- -The Management Layer consists of the two classes KABC::AddressBook and -KABC::Addressee. KABC::AddressBook is a container for KABC::Addressee objects -and provides 2 kinds of access methods. -1) Iterators - With iterators you can iterate over each of the contacts of the - address book and perform an action on it - -2) Search functions - With search functions you can search for contacts with special attributes - such as "all contacts with the name 'Harald'" - -The class KABC::Addressee represents a single contact and contains all data -a vCard could store (as specified in RFC 2426). - -The Storage Layer ------------------- -The Storage Layer consists of the class KABC::Resource and its derived classes. -These classes are used by KABC::AddressBook to load and store the contacts to -the single backends. -At the moment libkabc provides 4 types of resources: -1) ResourceFile - - stores all contacts in a single file - -2) ResourceDir - - stores each contact in its own file with the unique identifier of the - contact as a filename, will all of the files together in one directory - -3) ResourceLDAP - - stores all of the contacts on a LDAP server - -4) ResourceNet - - stores all contacts in a single file, which can be accessable via HTTP, - FTP, Fish, WebDAV, POP3, IMAP or whatever the KIO frame work supports - -In general the developer does not have to take how to save the single contacts. -He just has to plug one of the above mentioned resources into KABC::AddressBook -and perform a save action. - -Examples -========= -Like a picture, C/C++ code is worth a 1000 words I'd like to give you a -lot of examples now, how to use libkabc for several tasks: - - -Using KABC::StdAddressBook and Iterators ------------------------------------------ -Normally you have to plugin the resources manually into the addressbook object -and call the load() function before you can access the contacts, but there is -a special class KABC::StdAddressBook, which loads all resources of the standard -address book of the user automatically. You can use it the following way: - - - #include - - 1: KABC::AddressBook *ab = KABC::StdAddressBook::self(); - 2: KABC::AddressBook::Iterator it; - 3: for ( it = ab->begin(); it != ab->end(); ++it ) { - 4: KABC::Addressee addr = (*it); - 5: - 6: kdDebug() << "Name = " << addr.formattedName() << endl; - 7: } - -The above example prints out the names of all the contacts in the user's address -book. In line 1 you retrieve a pointer to the user's standard address book -(provided by KABC::StdAddressBook via a singleton design pattern). -In line 2 an iterator is defined, which is used in line 3 to iterate over the -whole address book. The assignment in line 4 is intended only to show more -clearly how iterators function. -You could also use (*it).formattedName() directly. In line 6 the formatted name -of the current contact is printed out to stderr. -As you can see that's all magic, and it's quite easy ;) - - -Using KABC::AddressBook manually ---------------------------------- -In some cases you don't want to load the user's standard address book, but, -for example, just a single vCard. For this purpose you have to use the -class KABC::AddressBook and handle the resource stuff manually. -The following code will create a file resource and save a contact into it: - - - #include - #include - - 1: KABC::AddressBook ab; - 2: - 3: // create a file resource - 4: KABC::Resource *res = new KABC::ResourceFile( "/home/user/myvcard.vcf", "vcard" ); - 5: - 6: if ( !ab.addResource( res ) ) { - 7: kdDebug() << "Unable to open resource" << endl; - 8: return 1; - 9: } -10: -11: if ( !ab.load() ) { -12: kdDebug() << "Unable to load address book!" << endl; -13: return 2; -14: } -15: -16: KABC::Addressee addr; -17: addr.setNameFromString( "Otto Harald Meyer" ); -18: addr.setBirthday( QDate( 1982, 07, 19 ) ); -19: addr.setNickName( "otto" ); -20: addr.setMailer( "kmail" ); -21: -22: // TZ -23: KABC::TimeZone tz( 60 ); // takes time shift in minutes as argument -24: addr.setTimeZone( tz ); -25: -26: // GEO -27: KABC::Geo geo( 52.5, 13.36 ); // takes latitude and longitude as argument -28: addr.setGeo( geo ); -29: -30: addr.setTitle( "dude, the" ); -31: addr.setRole( "developer" ); -32: addr.setOrganization( "KDE e.V." ); -33: addr.setNote( "Yet another senseless note..." ); -34: addr.setUrl( KURL( "http://kaddressbook.org" ) ); -35: -36: // CLASS -37: KABC::Secrecy secrecy( KABC::Secrecy::Confidential ); -38: addr.setSecrecy( secrecy ); -39: -40: // PHOTO or LOGO -41: KABC::Picture photo; -42: QImage img; -43: if ( img.load( "face.png", "PNG" ) ) { -44: photo.setData( img ); -45: photo.setType( "image/png" ); -46: addr.setPhoto( photo ); -47: } -48: -49: addr.insertEmail( "otto@kde.se", true ); // preferred email -50: addr.insertEmail( "otti@yahoo.com", false ); -51: -52: // TEL -53: KABC::PhoneNumber phoneHome( "0351 5466738", KABC::PhoneNumber::Home ); -54: KABC::PhoneNumber phoneWork( "0351 2335411", KABC::PhoneNumber::Work ); -55: addr.insertPhoneNumber( phoneHome ); -56: addr.insertPhoneNumber( phoneWork ); -57: -58: // ADR -59: KABC::Address homeAddr( KABC::Address::Home ); -60: homeAddr.setStreet( "Milliwaystreet 42" ); -61: homeAddr.setLocality( "London" ); -62: homeAddr.setRegion( "Saxony" ); -63: homeAddr.setPostalCode( "43435" ); -64: homeAddr.setCountry( "Germany" ); -65: addr.insertAddress( homeAddr ); -66: -67: addr.insertCategory( "LUG-Dresden-Members" ); -68: -69: addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", "21.04.2009" ); -70: -71: ab.insertAddressee( addr ); // will be assigned to the standard resource -72: // automatically -73: -74: KABC::Ticket *ticket = ab.requestSaveTicket( res ); -75: if ( !ticket ) { -76: kdError() << "Resource is locked by other application!" << endl; -77: } else { -78: if ( !ab.save( ticket ) ) { -79: kdError() << "Saving failed!" << endl; -80: ab.releaseSaveTicket( ticket ); -81: } -82: -83: } -84: -85: return 0; - -In line 1 the KABC::AddressBook is created. In line 4 you creat the -KABC::ResourceFile (which will handle the loading/saving). -The resource takes 2 arguments, the first is the file name and the -second one the file format. At the moment libkabc supports two file formats: -1) vCard, as specified in RFC 2426 -2) Binary, which increases performance during loading and saving - -In line 6 we try to plug the resource into the addressbook. The addressbook -class tries to open the resource immediately and returns whether opening was -successful. We add here only one resource, but you can add as many resources -as you want. - -In line 11 we try to load all contacts from the backends into the address book. -As before, it returns whether opening was successful. - -In line 16 a KABC::Addressee is created, which we will fill now with data, -before inserting it into the KABC::AddressBook. -The setNameFromString() function in the following line takes a string as -argument and tries to parse it into the single name components such as: given -name, family name, additional names, honoric prefix and honoric suffix. -You can set these values manually as well by calling - addr.setGivenName( "Otto" ); -and - addr.setFamilyName( "Meyer" ); -etc. etc. - -In line 23 we use the class KABC::TimeZone to store the timezone. This class -takes the time shift in minutes. - -In line 27 the KABC::Geo class is used for storing the geographical -information. The arguments are the latitude and longitude as float values. - -KABC::Secrecy in line 37 represents the CLASS entity of a vCard and can take -KABC::Secrecy::Public, KABC::Secrecy::Private or KABC::Secrecy::Confidential -as argument. - -In line 41 we make use of KABC::Picture class to store the photo of the -contact. This class can contain either an URL or the raw image data in form -of a QImage, in this example we use the latter. - -In line 43 we try to load the image "face.png" from the local directory and -assign this QImage to the KABC::Picture class via the setData() function. -Additionally we set the type of the picture to "image/png". - -From 49 - 50 we insert 2 email addresses with the first one as preferred -(second argument is true). - -In 53 and the following 3 lines we add two telephone numbers. For this purpose -libkabc provides the KABC::PhoneNumber class, which takes the phone number in -string representation as first argument and the type as second. The types can -be combined, so 'KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax' would be -the Home Fax. - -In line 59 we create a KABC::Address object and set the single parts in the -following lines. - -In line 67 we assign the contact to a special category. - -A contact can also contain custom entries, which are not specified in the API, -so you can add custom values with insertCustom() as shown in line 69. -The first argument of this function should be the name of the application, so -2 applications which use the same custom entry accidentally, do not overwrite -the data for each other. The second argument contains the name of the -custom entry and the third argument the value in string representation. - -In line 71 we finally insert the KABC::Addressee object into the -KABC::AddressBook. Since we have only one resource loaded, the contact is -automatically assigned to this resource. If you have several writeable -resources loaded, you should ask the user which resource the contact shall -belong to and assign the selected resource to the contact with - KABC::Addressee.setResource( KABC::Resource *resource ); -before inserting it into the address book. - -To prevent multiple access to one resource and possible resulting data loss -we have to lock the resource before saving our changes. -For this purpose KABC::AddressBook provides the function - requestSaveTicket( KABC::Resource* ) -which takes a pointer to the resource which shall be saved as argument and -returns a so called 'Save Ticket' if locking succeeded or a null pointer -if the resource is already locked by another application. - -So when we retrieved a valid ticket in line 74, we try to save our changes in -line 78. -The KABC::AddressBook::save() function takes the save ticket as argument and -returns whether saving succeeded. It also releases the save ticket when successful. - -Important! -If the save() call fails, you have to release the save ticket manually, as is -done in line 80, otherwise possible locks, created by the resources, won't be -removed. - -You can see also, that manual use is quite easy for the KABC::AddressBook class -and for the ResourceFile. For more information about the API of KABC::Addressee -please take a look at the official API documentation or the header files. - - -Distribution Lists -------------------- -libkabc provides so called distribution lists to group contacts. These lists -just store the uid of contacts, so they can be used for every kind of contact -grouping. There are 2 classes which handle the whole distribution list tasks, -KABC::DistributionListManager and KABC::DistributionList. The first one keeps -track of all available distribution lists and the latter one is the -representation of one list. - - - #include - #include - - 1: KABC::DistributionListManager manager( KABC::StdAddressBook::self() ); - 2: - 3: // load the lists - 4: manager.load(); - 5: - 6: QStringList listNames = manager.listNames(); - 7: QStringList::Iterator it; - 8: for ( it = listNames.begin(); it != listNames.end(); ++it ) { - 9: KABC::DistributionList *list = manager.list( *it ); -10: kdDebug() << list->name() << endl; -11: -12: QStringList emails = list->emails(); -13: QStringList::Iterator eit; -14: for ( eit = emails.begin(); eit != emails.end(); ++eit ) -15: kdDebug() << QString( "\t%1" ).arg( (*eit).latin1() ) << endl; -16: } - -In the first line a KABC::DistributionListManager is created. The manager takes -a pointer to a KABC::AddressBook, because he has to resolve the stored uids to -currently available email addresses. -In line 4 the manager loads all distribution lists from the central config file -$HOME/.trinity/share/apps/kabc/distlists. -The next line queries the names of all available distribution lists, which are -used in line 9 to retrieve a pointer to the specific list. -Now that you have a KABC::DistributionList object, you can performe the -following actions on it: - - set / get the name - - insert an entry - - remove an entry - - get a list of all email addresses - - get a list of all entries (which includes the uids) - -In line 12 we query all email addresses of every resource and print them out. - - contains also the declaration for the class -KABC::DistributionListWatcher. This class exists only once per application and -its only job is to emit a signal as soon as the distribution list file has -changed. So to make your application aware of changes use the following code: - - - #include - - 1: connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ), - 2: this, SLOT( slotDistributionListChanged() ) ); - -You see, as usual, easy ;) - diff --git a/kabc/Makefile.am b/kabc/Makefile.am deleted file mode 100644 index 57e72aec2..000000000 --- a/kabc/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ -SUBDIRS = vcard vcardparser . formats plugins scripts tests - -# Make sure $(all_includes) remains last! -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ - -I$(srcdir)/vcard/include -I$(srcdir)/vcardparser/ \ - -I$(srcdir)/vcard/include/generated \ - -I$(srcdir)/vcardparser $(all_includes) - -field.cpp: addressee.h addressee.cpp -addressee.cpp: addressee.h -addressee.cpp addressee.h field.cpp: \ - $(srcdir)/scripts/makeaddressee \ - $(srcdir)/scripts/addressee.src.cpp \ - $(srcdir)/scripts/addressee.src.h \ - $(srcdir)/scripts/entrylist \ - $(srcdir)/scripts/field.src.cpp - mysrcdir=`cd $(srcdir)/scripts && pwd` ;\ - cd scripts && $(PERL) $$mysrcdir/makeaddressee - -CLEANFILES = addressee.h addressee.cpp field.cpp - -lib_LTLIBRARIES = libkabc.la -libkabc_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 3:0:2 -no-undefined -libkabc_la_LIBADD = vcard/libvcard.la vcardparser/libvcards.la $(LIB_KIO) \ - $(top_builddir)/tderesources/libtderesources.la $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE) -libkabc_la_COMPILE_FIRST = addressee.h - -libkabc_la_SOURCES = \ - address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp agent.cpp \ - distributionlist.cpp distributionlistdialog.cpp distributionlisteditor.cpp \ - errorhandler.cpp field.cpp formatfactory.cpp geo.cpp key.cpp \ - phonenumber.cpp picture.cpp plugin.cpp resource.cpp \ - resourceselectdialog.cpp secrecy.cpp sound.cpp stdaddressbook.cpp \ - timezone.cpp vcard21parser.cpp vcardconverter.cpp vcardformat.cpp \ - vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp addresslineedit.cpp \ - ldapclient.cpp addresseelist.cpp vcardtool.cpp addresseehelper.cpp \ - addresseehelper.skel lock.cpp locknull.cpp ldif.cpp ldapurl.cpp ldapconfigwidget.cpp \ - sortmode.cpp - - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = address.h addressbook.h addressee.h addresseedialog.h \ - agent.h distributionlist.h distributionlistdialog.h distributionlisteditor.h \ - errorhandler.h field.h format.h formatfactory.h formatplugin.h geo.h key.h \ - phonenumber.h picture.h plugin.h resource.h \ - resourceselectdialog.h secrecy.h sound.h stdaddressbook.h timezone.h \ - vcardconverter.h vcardformat.h vcardformatplugin.h ldifconverter.h \ - addresslineedit.h ldapclient.h addresseelist.h lock.h locknull.h ldif.h \ - ldapurl.h ldapconfigwidget.h sortmode.h - -METASOURCES = AUTO - -bin_PROGRAMS = tdeab2tdeabc - -tdeab2tdeabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -tdeab2tdeabc_LDADD = libkabc.la ../kab/libkab.la -tdeab2tdeabc_SOURCES = tdeab2tdeabc.cpp - -autostart_DATA = tdeab2tdeabc.desktop -autostartdir = $(datadir)/autostart - -manager_DATA = kabc_manager.desktop -managerdir = $(kde_servicesdir)/tderesources - -DOXYGEN_REFERENCES = tdecore tdeui - -map_DATA = countrytransl.map -mapdir = $(kde_datadir)/kabc - -EXTRA_DIST = $(map_DATA) - -include ../admin/Doxyfile.am diff --git a/kabc/README b/kabc/README deleted file mode 100644 index 46d21b9b6..000000000 --- a/kabc/README +++ /dev/null @@ -1,28 +0,0 @@ -LIBKABC - new address book API for KDE - -PURPOSE: - -libkabc provides an API for address book data. This can be used by all KDE -application using data of this type, e.g. KAddressBook, KMail, KOrganizer, -KPilot etc. It is meant as replacement for libkab (in tdebase/kab). - -FEATURES: - -- Value based interface, addressbook entry data is implicitly shared. -- Address book entries are identified by a unique id. -- vCard backend (RFC 2425 / RFC 2426). -- Locking mechanism to support concurrent access to the address book by - multiple processes. -- Notification on change of addressbook by other process. -- Dialog for selecting address book entries, supports mouse and keyboard - selection, supports automatic name completion. -- GUI client for viewing, modifying address book data. This is aimed at - developers not end users. -- Tool for converting data, written with libkab, to libkabc format. -- Multiple backends (resources) for storing entries e.g. LDAP - -AUTHOR: Cornelius Schumacher - -LICENCE: LPGL - -DATE: 13 Oct 2001 diff --git a/kabc/README.AddressFormat b/kabc/README.AddressFormat deleted file mode 100644 index 8079e4914..000000000 --- a/kabc/README.AddressFormat +++ /dev/null @@ -1,66 +0,0 @@ -Address formats can be a tricky thing. libkabc tries very hard to perfectly fit -the needs of ~95% of users and to be at least sufficient for the other 5%. - -The formatting of an address depends on the destination country as well as on -the origin country of a letter. Basically, the part indicating the destination -country follows the rules of the country of origin, all the rest follows the -rules of the destination country. So we need to store for every country a) the -country positioning and b) the address formatting. - -Address formats should usually be stored in a country's entry.desktop. There we -store the country position in field "AddressCountryPosition" and the address -format in a field "AddressFormat". Note that for most countries one field -"AddressFormat" is sufficient for personal as well as company addresses -(because personal addresses look just like business addresses without company); -however, in some countries (eg. Hungary) business addresses differ in their -structure. In this case you have the possibility of adding another field -"BusinessAddressFormat" which will be preferred for formatting of business -addresses; if libkabc can't find such a field, it will fall back to -"AddressFormat". (Please use BusinessAddressFormat ONLY if you really need to) - -The format consists mainly of tags that will be replaced by address fields. -The list of tags may grow in the future, the format *might* change in the near -future, but I hope not. - -Any comments very very welcome to kde-pim@kde.org or to jost@schenck.de. - --Jost. - -Fields AddressFormat and BusinessAddressFormat ------------------------------------------------- -%n = real name -%N = REAL NAME -%cm = company -%CM = COMPANY -%s = street -%S = STREET -%z = zip code -%l = location -%L = LOCATION -%r = region -%R = REGION -%p = post office box -%, = conditional comma+whitespace, - will be left out if the value left or right of it is purged -%w = conditional whitespace, - will be left out if the value left or right of it is purged -%0(...) = the text inside the brackets will be completely purged if not - at least one tag inside it evaluates to something. Example: when the - address doesn't have a postbox, the string %0(PO Box %p) will not - evaluate to "PO Box " but to an empty string. -\n = newline - -Field AddressCountryPosition ------------------------------------------------- -below = country name below rest of address -BELOW = country name below in capital letters -above = country name above rest of address -ABOVE = country name above in capital letters - -Some Tips ------------------------------------------------- -- You sometimes have three fields in a line which can all be empty. If you eg. -separate them all with conditional whitespace (same goes for cond. comma) like -in "%z%w%r%w%l" and only the middle value (here: region) is empty, there will -be no whitespace at all between the outer values (here: zipcode and location). -To avoid this, combine two of these values with purge brackets: %0(%z%w%r)%w%l. diff --git a/kabc/TODO b/kabc/TODO deleted file mode 100644 index 13f75b6bb..000000000 --- a/kabc/TODO +++ /dev/null @@ -1 +0,0 @@ -Factor out TDELockFile. diff --git a/kabc/address.cpp b/kabc/address.cpp deleted file mode 100644 index 46b483b43..000000000 --- a/kabc/address.cpp +++ /dev/null @@ -1,592 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "address.h" - -#include -#include -#include -#include -#include -#include - -#include - -using namespace KABC; - -TQMap *Address::mISOMap = 0; -static KStaticDeleter< TQMap > isoMapDeleter; - -Address::Address() : - mEmpty( true ), mType( 0 ) -{ - mId = TDEApplication::randomString( 10 ); -} - -Address::Address( int type ) : - mEmpty( true ), mType( type ) -{ - mId = TDEApplication::randomString( 10 ); -} - -bool Address::operator==( const Address &a ) const -{ - if ( mPostOfficeBox != a.mPostOfficeBox ) return false; - if ( mExtended != a.mExtended ) return false; - if ( mStreet != a.mStreet ) return false; - if ( mLocality != a.mLocality ) return false; - if ( mRegion != a.mRegion ) return false; - if ( mPostalCode != a.mPostalCode ) return false; - if ( mCountry != a.mCountry ) return false; - if ( mLabel != a.mLabel ) return false; - - return true; -} - -bool Address::operator!=( const Address &a ) const -{ - return !( a == *this ); -} - -bool Address::isEmpty() const -{ - if ( mPostOfficeBox.isEmpty() && - mExtended.isEmpty() && - mStreet.isEmpty() && - mLocality.isEmpty() && - mRegion.isEmpty() && - mPostalCode.isEmpty() && - mCountry.isEmpty() && - mLabel.isEmpty() ) { - return true; - } - return false; -} - -void Address::clear() -{ - *this = Address(); -} - -void Address::setId( const TQString &id ) -{ - mEmpty = false; - - mId = id; -} - -TQString Address::id() const -{ - return mId; -} - -void Address::setType( int type ) -{ - mEmpty = false; - - mType = type; -} - -int Address::type() const -{ - return mType; -} - -TQString Address::typeLabel() const -{ - TQString label; - bool first = true; - - const TypeList list = typeList(); - - TypeList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { - label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); - if ( first ) - first = false; - } - } - - return label; -} - -void Address::setPostOfficeBox( const TQString &s ) -{ - mEmpty = false; - - mPostOfficeBox = s; -} - -TQString Address::postOfficeBox() const -{ - return mPostOfficeBox; -} - -TQString Address::postOfficeBoxLabel() -{ - return i18n("Post Office Box"); -} - - -void Address::setExtended( const TQString &s ) -{ - mEmpty = false; - - mExtended = s; -} - -TQString Address::extended() const -{ - return mExtended; -} - -TQString Address::extendedLabel() -{ - return i18n("Extended Address Information"); -} - - -void Address::setStreet( const TQString &s ) -{ - mEmpty = false; - - mStreet = s; -} - -TQString Address::street() const -{ - return mStreet; -} - -TQString Address::streetLabel() -{ - return i18n("Street"); -} - - -void Address::setLocality( const TQString &s ) -{ - mEmpty = false; - - mLocality = s; -} - -TQString Address::locality() const -{ - return mLocality; -} - -TQString Address::localityLabel() -{ - return i18n("Locality"); -} - - -void Address::setRegion( const TQString &s ) -{ - mEmpty = false; - - mRegion = s; -} - -TQString Address::region() const -{ - return mRegion; -} - -TQString Address::regionLabel() -{ - return i18n("Region"); -} - - -void Address::setPostalCode( const TQString &s ) -{ - mEmpty = false; - - mPostalCode = s; -} - -TQString Address::postalCode() const -{ - return mPostalCode; -} - -TQString Address::postalCodeLabel() -{ - return i18n("Postal Code"); -} - - -void Address::setCountry( const TQString &s ) -{ - mEmpty = false; - - mCountry = s; -} - -TQString Address::country() const -{ - return mCountry; -} - -TQString Address::countryLabel() -{ - return i18n("Country"); -} - - -void Address::setLabel( const TQString &s ) -{ - mEmpty = false; - - mLabel = s; -} - -TQString Address::label() const -{ - return mLabel; -} - -TQString Address::labelLabel() -{ - return i18n("Delivery Label"); -} - -Address::TypeList Address::typeList() -{ - static TypeList list; - - if ( list.isEmpty() ) - list << Dom << Intl << Postal << Parcel << Home << Work << Pref; - - return list; -} - -TQString Address::typeLabel( int type ) -{ - if ( type & Pref ) - return i18n( "Preferred address", "Preferred" ); - - switch ( type ) { - case Dom: - return i18n("Domestic"); - break; - case Intl: - return i18n("International"); - break; - case Postal: - return i18n("Postal"); - break; - case Parcel: - return i18n("Parcel"); - break; - case Home: - return i18n("Home Address", "Home"); - break; - case Work: - return i18n("Work Address", "Work"); - break; - case Pref: - return i18n("Preferred Address"); - break; - default: - return i18n("Other"); - break; - } -} - -void Address::dump() const -{ - kdDebug(5700) << " Address {" << endl; - kdDebug(5700) << " Id: " << id() << endl; - kdDebug(5700) << " Extended: " << extended() << endl; - kdDebug(5700) << " Street: " << street() << endl; - kdDebug(5700) << " Postal Code: " << postalCode() << endl; - kdDebug(5700) << " Locality: " << locality() << endl; - kdDebug(5700) << " }" << endl; -} - - -TQString Address::formattedAddress( const TQString &realName, - const TQString &orgaName ) const -{ - TQString ciso; - TQString addrTemplate; - TQString ret; - - // FIXME: first check for iso-country-field and prefer that one - if ( !country().isEmpty() ) { - ciso = countryToISO( country() ); - } else { - // fall back to our own country - ciso = TDEGlobal::locale()->country(); - } - KSimpleConfig entry( locate( "locale", - TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) ); - entry.setGroup( "KCM Locale" ); - - // decide whether this needs special business address formatting - if ( orgaName.isEmpty() ) { - addrTemplate = entry.readEntry( "AddressFormat" ); - } else { - addrTemplate = entry.readEntry( "BusinessAddressFormat" ); - if ( addrTemplate.isEmpty() ) - addrTemplate = entry.readEntry( "AddressFormat" ); - } - - // in the case there's no format found at all, default to what we've always - // used: - if ( addrTemplate.isEmpty() ) { - kdWarning(5700) << "address format database incomplete " - << "(no format for locale " << ciso - << " found). Using default address formatting." << endl; - addrTemplate = "%0(%n\\n)%0(%cm\\n)%0(%s\\n)%0(PO BOX %p\\n)%0(%l%w%r)%,%z"; - } - - // scan - parseAddressTemplateSection( addrTemplate, ret, realName, orgaName ); - - // now add the country line if needed (formatting this time according to - // the rules of our own system country ) - if ( !country().isEmpty() ) { - KSimpleConfig entry( locate( "locale", TQString( "l10n/" ) - + TDEGlobal::locale()->country() + TQString( "/entry.desktop" ) ) ); - entry.setGroup( "KCM Locale" ); - TQString cpos = entry.readEntry( "AddressCountryPosition" ); - if ( "BELOW" == cpos || cpos.isEmpty() ) { - ret = ret + "\n\n" + country().upper(); - } else if ( "below" == cpos ) { - ret = ret + "\n\n" + country(); - } else if ( "ABOVE" == cpos ) { - ret = country().upper() + "\n\n" + ret; - } else if ( "above" == cpos ) { - ret = country() + "\n\n" + ret; - } - } - - return ret; -} - -bool Address::parseAddressTemplateSection( const TQString &tsection, - TQString &result, const TQString &realName, const TQString &orgaName ) const -{ - // This method first parses and substitutes any bracketed sections and - // after that replaces any tags with their values. If a bracketed section - // or a tag evaluate to zero, they are not just removed but replaced - // with a placeholder. This is because in the last step conditionals are - // resolved which depend on information about zero-evaluations. - result = tsection; - int stpos = 0; - bool ret = false; - - // first check for brackets that have to be evaluated first - int fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); - while ( -1 != fpos ) { - int bpos1 = fpos + KABC_FMTTAG_purgeempty.length(); - int bpos2; - // expect opening bracket and find next balanced closing bracket. If - // next char is no opening bracket, continue parsing (no valid tag) - if ( '(' == result[bpos1] ) { - bpos2 = findBalancedBracket( result, bpos1 ); - if ( -1 != bpos2 ) { - // we have balanced brackets, recursively parse: - TQString rplstr; - bool purge = !parseAddressTemplateSection( result.mid( bpos1+1, - bpos2-bpos1-1 ), rplstr, - realName, orgaName ); - if ( purge ) { - // purge -> remove all - // replace with !_P_!, so conditional tags work later - result.replace( fpos, bpos2 - fpos + 1, "!_P_!" ); - // leave stpos as it is - } else { - // no purge -> replace with recursively parsed string - result.replace( fpos, bpos2 - fpos + 1, rplstr ); - ret = true; - stpos = fpos + rplstr.length(); - } - } else { - // unbalanced brackets: keep on parsing (should not happen - // and will result in bad formatting) - stpos = bpos1; - } - } - fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); - } - - // after sorting out all purge tags, we just search'n'replace the rest, - // keeping track of whether at least one tag evaluates to something. - // The following macro needs TQString for R_FIELD - // It substitutes !_P_! for empty fields so conditional tags work later -#define REPLTAG(R_TAG,R_FIELD) \ - if ( result.find(R_TAG, false) != -1 ) { \ - TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \ - result.replace( R_TAG, rpl ); \ - if ( !R_FIELD.isEmpty() ) { \ - ret = true; \ - } \ - } - REPLTAG( KABC_FMTTAG_realname, realName ); - REPLTAG( KABC_FMTTAG_REALNAME, realName.upper() ); - REPLTAG( KABC_FMTTAG_company, orgaName ); - REPLTAG( KABC_FMTTAG_COMPANY, orgaName.upper() ); - REPLTAG( KABC_FMTTAG_pobox, postOfficeBox() ); - REPLTAG( KABC_FMTTAG_street, street() ); - REPLTAG( KABC_FMTTAG_STREET, street().upper() ); - REPLTAG( KABC_FMTTAG_zipcode, postalCode() ); - REPLTAG( KABC_FMTTAG_location, locality() ); - REPLTAG( KABC_FMTTAG_LOCATION, locality().upper() ); - REPLTAG( KABC_FMTTAG_region, region() ); - REPLTAG( KABC_FMTTAG_REGION, region().upper() ); - result.replace( KABC_FMTTAG_newline, "\n" ); -#undef REPLTAG - - // conditional comma - fpos = result.find( KABC_FMTTAG_condcomma, 0 ); - while ( -1 != fpos ) { - TQString str1 = result.mid( fpos - 5, 5 ); - TQString str2 = result.mid( fpos + 2, 5 ); - if ( str1 != "!_P_!" && str2 != "!_P_!" ) { - result.replace( fpos, 2, ", " ); - } else { - result.remove( fpos, 2 ); - } - fpos = result.find( KABC_FMTTAG_condcomma, fpos ); - } - // conditional whitespace - fpos = result.find( KABC_FMTTAG_condwhite, 0 ); - while ( -1 != fpos ) { - TQString str1 = result.mid( fpos - 5, 5 ); - TQString str2 = result.mid( fpos + 2, 5 ); - if ( str1 != "!_P_!" && str2 != "!_P_!" ) { - result.replace( fpos, 2, " " ); - } else { - result.remove( fpos, 2 ); - } - fpos = result.find( KABC_FMTTAG_condwhite, fpos ); - } - - // remove purged: - result.remove( "!_P_!" ); - - return ret; -} - -int Address::findBalancedBracket( const TQString &tsection, int pos ) const -{ - int balancecounter = 0; - for( unsigned int i = pos + 1; i < tsection.length(); i++ ) { - if ( ')' == tsection[i] && 0 == balancecounter ) { - // found end of brackets - return i; - } else - if ( '(' == tsection[i] ) { - // nested brackets - balancecounter++; - } - } - return -1; -} - -TQString Address::countryToISO( const TQString &cname ) -{ - // we search a map file for translations from country names to - // iso codes, storing caching things in a TQMap for faster future - // access. - if ( !mISOMap ) - isoMapDeleter.setObject( mISOMap, new TQMap() ); - - TQMap::ConstIterator it; - it = mISOMap->find( cname ); - if ( it != mISOMap->end() ) - return it.data(); - - TQString mapfile = TDEGlobal::dirs()->findResource( "data", - TQString::fromLatin1( "kabc/countrytransl.map" ) ); - - TQFile file( mapfile ); - if ( file.open( IO_ReadOnly ) ) { - TQTextStream s( &file ); - TQString strbuf = s.readLine(); - while( !strbuf.isEmpty() ) { - TQStringList countryInfo = TQStringList::split( '\t', strbuf, true ); - if ( countryInfo[ 0 ] == cname ) { - file.close(); - mISOMap->insert( cname, countryInfo[ 1 ] ); - return countryInfo[ 1 ]; - } - strbuf = s.readLine(); - } - file.close(); - } - - // fall back to system country - mISOMap->insert( cname, TDEGlobal::locale()->country() ); - return TDEGlobal::locale()->country(); -} - -TQString Address::ISOtoCountry( const TQString &ISOname ) -{ - // get country name from ISO country code (e.g. "no" -> i18n("Norway")) - if ( ISOname.simplifyWhiteSpace().isEmpty() ) - return TQString::null; - - TQString mapfile = TDEGlobal::dirs()->findResource( "data", - TQString::fromLatin1( "kabc/countrytransl.map" ) ); - - TQFile file( mapfile ); - if ( file.open( IO_ReadOnly ) ) { - TQTextStream s( &file ); - TQString searchStr = "\t" + ISOname.simplifyWhiteSpace().lower(); - TQString strbuf = s.readLine(); - int pos; - while ( !strbuf.isEmpty() ) { - if ( (pos = strbuf.find( searchStr )) != -1 ) { - file.close(); - return i18n( strbuf.left( pos ).utf8() ); - } - strbuf = s.readLine(); - } - file.close(); - } - - return ISOname; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Address &addr ) -{ - return s << addr.mId << addr.mType << addr.mPostOfficeBox << - addr.mExtended << addr.mStreet << addr.mLocality << - addr.mRegion << addr.mPostalCode << addr.mCountry << - addr.mLabel; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Address &addr ) -{ - s >> addr.mId >> addr.mType >> addr.mPostOfficeBox >> addr.mExtended >> - addr.mStreet >> addr.mLocality >> addr.mRegion >> - addr.mPostalCode >> addr.mCountry >> addr.mLabel; - - addr.mEmpty = false; - - return s; -} diff --git a/kabc/address.h b/kabc/address.h deleted file mode 100644 index b4165a098..000000000 --- a/kabc/address.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESS_H -#define KABC_ADDRESS_H - -#include -#include -#include - -#include - -// template tags for address formatting localization -#define KABC_FMTTAG_realname TQString("%n") -#define KABC_FMTTAG_REALNAME TQString("%N") -#define KABC_FMTTAG_company TQString("%cm") -#define KABC_FMTTAG_COMPANY TQString("%CM") -#define KABC_FMTTAG_pobox TQString("%p") -#define KABC_FMTTAG_street TQString("%s") -#define KABC_FMTTAG_STREET TQString("%S") -#define KABC_FMTTAG_zipcode TQString("%z") -#define KABC_FMTTAG_location TQString("%l") -#define KABC_FMTTAG_LOCATION TQString("%L") -#define KABC_FMTTAG_region TQString("%r") -#define KABC_FMTTAG_REGION TQString("%R") -#define KABC_FMTTAG_newline TQString("\\n") -#define KABC_FMTTAG_condcomma TQString("%,") -#define KABC_FMTTAG_condwhite TQString("%w") -#define KABC_FMTTAG_purgeempty TQString("%0") - -namespace KABC { - -/** - @short Postal address information. - - This class represents information about a postal address. -*/ -class KABC_EXPORT Address -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); - - public: - /** - List of addresses. - */ - typedef TQValueList
    List; - typedef TQValueList TypeList; - - /** - Address types: - - @li @p Dom - domestic - @li @p Intl - international - @li @p Postal - postal - @li @p Parcel - parcel - @li @p Home - home address - @li @p Work - address at work - @li @p Pref - preferred address - */ - enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, - Pref = 64 }; - - /** - Constructor that creates an empty Address, which is initialized - with a unique id (see id()). - */ - Address(); - - /** - This is like Address() just above, with the difference - that you can specify the type. - */ - Address( int ); - - bool operator==( const Address & ) const; - bool operator!=( const Address & ) const; - - /** - Returns true, if the address is empty. - */ - bool isEmpty() const; - - /** - Clears all entries of the address. - */ - void clear(); - - /** - Sets the unique id. - */ - void setId( const TQString & ); - - /* - Returns the unique id. - */ - TQString id() const; - - /** - Sets the type of address. See enum for definiton of types. - - @param type type, can be a bitwise or of multiple types. - */ - void setType( int type ); - - /** - Returns the type of address. Can be a bitwise or of multiple types. - */ - int type() const; - - /** - Returns a translated string of all types the address has. - */ - TQString typeLabel() const; - - /** - Sets the post office box. - */ - void setPostOfficeBox( const TQString & ); - - /** - Returns the post office box. - */ - TQString postOfficeBox() const; - - /** - Returns the translated label for post office box field. - */ - static TQString postOfficeBoxLabel(); - - /** - Sets the extended address information. - */ - void setExtended( const TQString & ); - - /** - Returns the extended address information. - */ - TQString extended() const; - - /** - Returns the translated label for extended field. - */ - static TQString extendedLabel(); - - /** - Sets the street (including number). - */ - void setStreet( const TQString & ); - - /** - Returns the street. - */ - TQString street() const; - - /** - Returns the translated label for street field. - */ - static TQString streetLabel(); - - /** - Sets the locality, e.g. city. - */ - void setLocality( const TQString & ); - - /** - Returns the locality. - */ - TQString locality() const; - - /** - Returns the translated label for locality field. - */ - static TQString localityLabel(); - - /** - Sets the region, e.g. state. - */ - void setRegion( const TQString & ); - - /** - Returns the region. - */ - TQString region() const; - - /** - Returns the translated label for region field. - */ - static TQString regionLabel(); - - /** - Sets the postal code. - */ - void setPostalCode( const TQString & ); - - /** - Returns the postal code. - */ - TQString postalCode() const; - - /** - Returns the translated label for postal code field. - */ - static TQString postalCodeLabel(); - - /** - Sets the country. - */ - void setCountry( const TQString & ); - - /** - Returns the country. - */ - TQString country() const; - - /** - Returns the translated label for country field. - */ - static TQString countryLabel(); - - /** - Sets the delivery label. This is the literal text to be used as label. - */ - void setLabel( const TQString & ); - - /** - Returns the delivery label. - */ - TQString label() const; - - /** - Returns the translated label for delivery label field. - */ - static TQString labelLabel(); - - /** - Returns the list of available types. - */ - static TypeList typeList(); - - /** - Returns the translated label for a special type. - */ - static TQString typeLabel( int type ); - - /** - Used for debug output. - */ - void dump() const; - - /** - Returns this address formatted according to the country-specific - address formatting rules. The formatting rules applied depend on - either the addresses {@link #country country} field, or (if the - latter is empty) on the system country setting. If companyName is - provided, an available business address format will be preferred. - - @param realName the formatted name of the contact - @param orgaName the name of the organization or company - @return the formatted address (containing newline characters) - */ - TQString formattedAddress( const TQString &realName=TQString::null - , const TQString &orgaName=TQString::null ) const; - - /** - Returns ISO code for a localized country name. Only localized country - names will be understood. This might be replaced by a TDELocale method in - the future. - @param cname name of the country - @return two digit ISO code - */ - static TQString countryToISO( const TQString &cname ); - - /** - Returns a localized country name for a ISO code. - This might be replaced by a TDELocale method in the future. - @param ISOname two digit ISO code - @return localized name of the country - @since 3.2 - */ - static TQString ISOtoCountry( const TQString &ISOname ); - - private: - /** - Parses a snippet of an address template - @param tsection the template string to be parsed - @param result TQString reference in which the result will be stored - @return true if at least one tag evaluated positively, else false - */ - bool parseAddressTemplateSection( const TQString &tsection - , TQString &result - , const TQString &realName - , const TQString &orgaName ) const; - - /** - Finds the balanced closing bracket starting from the opening bracket at - pos in tsection. - @return position of closing bracket, -1 for unbalanced brackets - */ - int findBalancedBracket( const TQString &tsection, int pos ) const; - - bool mEmpty; - - TQString mId; - int mType; - - TQString mPostOfficeBox; - TQString mExtended; - TQString mStreet; - TQString mLocality; - TQString mRegion; - TQString mPostalCode; - TQString mCountry; - TQString mLabel; - - static TQMap *mISOMap; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); - -} - -#endif diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp deleted file mode 100644 index 8e1eca333..000000000 --- a/kabc/addressbook.cpp +++ /dev/null @@ -1,842 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "errorhandler.h" -#include "resource.h" - -#include "addressbook.h" -#include "addressbook.moc" - -using namespace KABC; - -struct AddressBook::AddressBookData -{ - Field::List mAllFields; - ErrorHandler *mErrorHandler; - TDEConfig *mConfig; - KRES::Manager *mManager; - TQPtrList mPendingLoadResources; - TQPtrList mPendingSaveResources; - Iterator end; -}; - -struct AddressBook::Iterator::IteratorData -{ - Resource::Iterator mIt; - TQValueList mResources; - int mCurrRes; -}; - -struct AddressBook::ConstIterator::ConstIteratorData -{ - Resource::ConstIterator mIt; - TQValueList mResources; - int mCurrRes; -}; - -AddressBook::Iterator::Iterator() - : d( new IteratorData ) -{ -} - -AddressBook::Iterator::Iterator( const AddressBook::Iterator &i ) - : d( new IteratorData ) -{ - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; -} - -AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iterator &i ) -{ - if ( this == &i ) - return *this; // guard against self assignment - - delete d; // delete the old data the Iterator was completely constructed before - d = new IteratorData; - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; - - return *this; -} - -AddressBook::Iterator::~Iterator() -{ - delete d; - d = 0; -} - -const Addressee &AddressBook::Iterator::operator*() const -{ - return *(d->mIt); -} - -Addressee &AddressBook::Iterator::operator*() -{ - return *(d->mIt); -} - -Addressee *AddressBook::Iterator::operator->() -{ - return &(*(d->mIt)); -} - -AddressBook::Iterator &AddressBook::Iterator::operator++() -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::Iterator &AddressBook::Iterator::operator++( int ) -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::Iterator &AddressBook::Iterator::operator--() -{ - (d->mIt)--; - - return *this; -} - -AddressBook::Iterator &AddressBook::Iterator::operator--( int ) -{ - (d->mIt)--; - - return *this; -} - -bool AddressBook::Iterator::operator==( const Iterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool AddressBook::Iterator::operator!=( const Iterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - - -AddressBook::ConstIterator::ConstIterator() - : d( new ConstIteratorData ) -{ -} - -AddressBook::ConstIterator::ConstIterator( const AddressBook::ConstIterator &i ) - : d( new ConstIteratorData ) -{ - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; -} - -AddressBook::ConstIterator::ConstIterator( const AddressBook::Iterator &i ) -{ - d = new ConstIteratorData; - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator=( const AddressBook::ConstIterator &i ) -{ - if ( this == &i ) - return *this; // guard for self assignment - - delete d; // delete the old data because the Iterator was really constructed before - d = new ConstIteratorData; - d->mIt = i.d->mIt; - d->mResources = i.d->mResources; - d->mCurrRes = i.d->mCurrRes; - - return *this; -} - -AddressBook::ConstIterator::~ConstIterator() -{ - delete d; - d = 0; -} - -const Addressee &AddressBook::ConstIterator::operator*() const -{ - return *(d->mIt); -} - -const Addressee* AddressBook::ConstIterator::operator->() const -{ - return &(*(d->mIt)); -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator++() -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator++(int) -{ - do { - bool jumped = false; - while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource - if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { - return *this; - } - - d->mCurrRes++; // jump to next resource - - jumped = true; - d->mIt = (d->mResources[ d->mCurrRes ])->begin(); - } - - if ( !jumped ) - (d->mIt)++; - - } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); - - return *this; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator--() -{ - (d->mIt)--; - return *this; -} - -AddressBook::ConstIterator &AddressBook::ConstIterator::operator--(int) -{ - (d->mIt)--; - return *this; -} - -bool AddressBook::ConstIterator::operator==( const ConstIterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool AddressBook::ConstIterator::operator!=( const ConstIterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - - -AddressBook::AddressBook() - : d( new AddressBookData ) -{ - d->mErrorHandler = 0; - d->mConfig = 0; - d->mManager = new KRES::Manager( "contact" ); - d->end.d->mResources = TQValueList(); - d->end.d->mCurrRes = -1; -} - -AddressBook::AddressBook( const TQString &config ) - : d( new AddressBookData ) -{ - d->mErrorHandler = 0; - if ( config.isEmpty() ) - d->mConfig = 0; - else - d->mConfig = new TDEConfig( config ); - d->mManager = new KRES::Manager( "contact" ); - d->mManager->readConfig( d->mConfig ); - d->end.d->mResources = TQValueList(); - d->end.d->mCurrRes = -1; -} - -AddressBook::~AddressBook() -{ - delete d->mManager; d->mManager = 0; - delete d->mConfig; d->mConfig = 0; - delete d->mErrorHandler; d->mErrorHandler = 0; - delete d; d = 0; -} - -bool AddressBook::load() -{ - kdDebug(5700) << "AddressBook::load()" << endl; - - clear(); - - KRES::Manager::ActiveIterator it; - bool ok = true; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( !(*it)->load() ) { - error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); - ok = false; - } - } - - return ok; -} - -bool AddressBook::asyncLoad() -{ - kdDebug(5700) << "AddressBook::asyncLoad()" << endl; - - clear(); - - KRES::Manager::ActiveIterator it; - bool ok = true; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - d->mPendingLoadResources.append( *it ); - if ( !(*it)->asyncLoad() ) { - error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); - ok = false; - } - } - - return ok; -} - -bool AddressBook::save( Ticket *ticket ) -{ - kdDebug(5700) << "AddressBook::save()"<< endl; - - if ( ticket->resource() ) { - deleteRemovedAddressees(); - bool ok = ticket->resource()->save( ticket ); - if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); - return ok; - } - - return false; -} - -bool AddressBook::asyncSave( Ticket *ticket ) -{ - kdDebug(5700) << "AddressBook::asyncSave()"<< endl; - - if ( ticket->resource() ) { - d->mPendingSaveResources.append( ticket->resource() ); - bool ok = ticket->resource()->asyncSave( ticket ); - if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); - return ok; - } - - return false; -} - -AddressBook::Iterator AddressBook::begin() -{ - TQValueList list; - KRES::Manager::ActiveIterator resIt; - for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) - list.append( *resIt ); - - if ( list.count() == 0 ) - return end(); - - Iterator it = Iterator(); - it.d->mResources = list; - it.d->mCurrRes = 0; - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - - while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { - if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) - return end(); - - it.d->mCurrRes++; - - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - } - - return it; -} - -AddressBook::ConstIterator AddressBook::begin() const -{ - TQValueList list; - KRES::Manager::ActiveIterator resIt; - for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) - list.append( *resIt ); - - if ( list.count() == 0 ) - return end(); - - Iterator it = Iterator(); - it.d->mResources = list; - it.d->mCurrRes = 0; - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - - while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { - if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) - return end(); - - it.d->mCurrRes++; - - it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); - } - - return it; -} - -AddressBook::Iterator AddressBook::end() -{ - KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); - - if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available - d->end.d->mIt = Resource::Iterator(); - } else { - d->end.d->mIt = (*resIt)->end(); - } - - return d->end; -} - -AddressBook::ConstIterator AddressBook::end() const -{ - KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); - - if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available - d->end.d->mIt = Resource::Iterator(); - } else { - d->end.d->mIt = (*resIt)->end(); - } - - return d->end; -} - -void AddressBook::clear() -{ - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - (*it)->clear(); -} - -Ticket *AddressBook::requestSaveTicket( Resource *resource ) -{ - kdDebug(5700) << "AddressBook::requestSaveTicket()" << endl; - - if ( !resource ) - resource = standardResource(); - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( (*it) == resource ) { - if ( (*it)->readOnly() || !(*it)->isOpen() ) - return 0; - else - return (*it)->requestSaveTicket(); - } - } - - return 0; -} - -void AddressBook::releaseSaveTicket( Ticket *ticket ) -{ - if ( !ticket ) - return; - - if ( ticket->resource() ) { - ticket->resource()->releaseSaveTicket( ticket ); - } -} - -void AddressBook::insertAddressee( const Addressee &a ) -{ - Resource *resource = a.resource(); - if ( resource == 0 ) - resource = standardResource(); - - Resource::Iterator it; - Addressee fAddr = resource->findByUid( a.uid() ); - - Addressee addr( a ); - if ( !fAddr.isEmpty() ) { - if ( fAddr != a ) - addr.setRevision( TQDateTime::currentDateTime() ); - else { - if ( fAddr.resource() == 0 ) { - fAddr.setResource( resource ); - //NOTE: Should we have setChanged( true ) here? - resource->insertAddressee( fAddr ); - } - return; - } - } - - addr.setResource( resource ); - addr.setChanged( true ); - resource->insertAddressee( addr ); -} - -void AddressBook::removeAddressee( const Addressee &a ) -{ - if ( a.resource() ) - a.resource()->removeAddressee( a ); -} - -void AddressBook::removeAddressee( const Iterator &it ) -{ - if ( (*it).resource() ) - (*it).resource()->removeAddressee( *it ); -} - -AddressBook::Iterator AddressBook::find( const Addressee &a ) -{ - Iterator it; - for ( it = begin(); it != end(); ++it ) { - if ( a.uid() == (*it).uid() ) - return it; - } - - return end(); -} - -Addressee AddressBook::findByUid( const TQString &uid ) -{ - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - Addressee addr = (*it)->findByUid( uid ); - if ( !addr.isEmpty() ) - return addr; - } - - return Addressee(); -} - -Addressee::List AddressBook::allAddressees() -{ - Addressee::List list; - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) - list.append( *it ); - - return list; -} - -Addressee::List AddressBook::findByName( const TQString &name ) -{ - Addressee::List results; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->findByName( name ); - - return results; -} - -Addressee::List AddressBook::findByEmail( const TQString &email ) -{ - Addressee::List results; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->findByEmail( email ); - - return results; -} - -Addressee::List AddressBook::findByCategory( const TQString &category ) -{ - Addressee::List results; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->findByCategory( category ); - - return results; -} - -void AddressBook::dump() const -{ - kdDebug(5700) << "AddressBook::dump() --- begin ---" << endl; - - ConstIterator it; - for( it = begin(); it != end(); ++it ) { - (*it).dump(); - } - - kdDebug(5700) << "AddressBook::dump() --- end ---" << endl; -} - -TQString AddressBook::identifier() -{ - TQStringList identifier; - - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( !(*it)->identifier().isEmpty() ) - identifier.append( (*it)->identifier() ); - } - - return identifier.join( ":" ); -} - -Field::List AddressBook::fields( int category ) -{ - if ( d->mAllFields.isEmpty() ) { - d->mAllFields = Field::allFields(); - } - - if ( category == Field::All ) return d->mAllFields; - - Field::List result; - Field::List::ConstIterator it; - for ( it = d->mAllFields.constBegin(); it != d->mAllFields.constEnd(); ++it ) { - if ( (*it)->category() & category ) - result.append( *it ); - } - - return result; -} - -bool AddressBook::addCustomField( const TQString &label, int category, - const TQString &key, const TQString &app ) -{ - if ( d->mAllFields.isEmpty() ) { - d->mAllFields = Field::allFields(); - } - - TQString a = app.isNull() ? TDEGlobal::instance()->instanceName() : app; - TQString k = key.isNull() ? label : key; - - Field *field = Field::createCustomField( label, category, k, a ); - - if ( !field ) return false; - - d->mAllFields.append( field ); - - return true; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const AddressBook &ab ) -{ - if (!ab.d) return s; - - return s;// << ab.d->mAddressees; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, AddressBook &ab ) -{ - if (!ab.d) return s; - -// s >> ab.d->mAddressees; - - return s; -} - -bool AddressBook::addResource( Resource *resource ) -{ - if ( !resource->open() ) { - kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl; - return false; - } - - d->mManager->add( resource ); - resource->setAddressBook( this ); - - connect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), - this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); - connect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), - this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); - - connect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - connect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); - - return true; -} - -bool AddressBook::removeResource( Resource *resource ) -{ - resource->close(); - - if ( resource == standardResource() ) - d->mManager->setStandardResource( 0 ); - - resource->setAddressBook( 0 ); - - disconnect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), - this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); - disconnect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), - this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); - - disconnect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - disconnect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - - d->mManager->remove( resource ); - - return true; -} - -TQPtrList AddressBook::resources() -{ - TQPtrList list; - - KRES::Manager::ActiveIterator it; - for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - if ( d->mManager->standardResource() == (*it) ) - list.prepend( *it ); - else - list.append( *it ); - } - - return list; -} - -void AddressBook::setErrorHandler( ErrorHandler *handler ) -{ - delete d->mErrorHandler; - d->mErrorHandler = handler; -} - -void AddressBook::error( const TQString& msg ) -{ - if ( !d->mErrorHandler ) // create default error handler - d->mErrorHandler = new ConsoleErrorHandler; - - if ( d->mErrorHandler ) - d->mErrorHandler->error( msg ); - else - kdError(5700) << "no error handler defined" << endl; -} - -void AddressBook::deleteRemovedAddressees() -{ - // no any longer needed -} - -void AddressBook::setStandardResource( Resource *resource ) -{ - d->mManager->setStandardResource( resource ); -} - -Resource *AddressBook::standardResource() -{ - return d->mManager->standardResource(); -} - -KRES::Manager *AddressBook::resourceManager() -{ - return d->mManager; -} - -void AddressBook::cleanUp() -{ -} - -bool AddressBook::loadingHasFinished() const -{ - return d->mPendingLoadResources.isEmpty(); -} - -void AddressBook::resourceLoadingFinished( Resource *res ) -{ - d->mPendingLoadResources.remove( res ); - emit loadingFinished( res ); - - if ( d->mPendingLoadResources.count() == 0 ) - emit addressBookChanged( this ); -} - -void AddressBook::resourceSavingFinished( Resource *res ) -{ - d->mPendingSaveResources.remove( res ); - - emit savingFinished( res ); -} - -void AddressBook::resourceLoadingError( Resource *res, const TQString &errMsg ) -{ - error( errMsg ); - - d->mPendingLoadResources.remove( res ); - if ( d->mPendingLoadResources.count() == 0 ) - emit addressBookChanged( this ); -} - -void AddressBook::resourceSavingError( Resource *res, const TQString &errMsg ) -{ - error( errMsg ); - - d->mPendingSaveResources.remove( res ); -} diff --git a/kabc/addressbook.h b/kabc/addressbook.h deleted file mode 100644 index 8b87b6898..000000000 --- a/kabc/addressbook.h +++ /dev/null @@ -1,431 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSBOOK_H -#define KABC_ADDRESSBOOK_H - -#include -#include - -#include - -#include "addressee.h" -#include "field.h" - -namespace KABC { - -class ErrorHandler; -class Resource; -class Ticket; - -/** - @short Address Book - - This class provides access to a collection of address book entries. - */ -class KABC_EXPORT AddressBook : public TQObject -{ - Q_OBJECT - - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); - friend class StdAddressBook; - - public: - /** - @short Address Book Iterator - - This class provides an iterator for address book entries. - */ - class KABC_EXPORT Iterator - { - public: - Iterator(); - Iterator( const Iterator & ); - ~Iterator(); - - Iterator &operator=( const Iterator & ); - const Addressee &operator*() const; - Addressee &operator*(); - Addressee* operator->(); - Iterator &operator++(); - Iterator &operator++(int); - Iterator &operator--(); - Iterator &operator--(int); - bool operator==( const Iterator &it ); - bool operator!=( const Iterator &it ); - - struct IteratorData; - IteratorData *d; - }; - - /** - @short Address Book Const Iterator - - This class provides a const iterator for address book entries. - */ - class KABC_EXPORT ConstIterator - { - public: - ConstIterator(); - ConstIterator( const ConstIterator & ); - ConstIterator( const Iterator & ); - ~ConstIterator(); - - ConstIterator &operator=( const ConstIterator & ); - const Addressee &operator*() const; - const Addressee* operator->() const; - ConstIterator &operator++(); - ConstIterator &operator++(int); - ConstIterator &operator--(); - ConstIterator &operator--(int); - bool operator==( const ConstIterator &it ); - bool operator!=( const ConstIterator &it ); - - struct ConstIteratorData; - ConstIteratorData *d; - }; - - /** - Constructs an address book object. - You have to add the resources manually before calling load(). - */ - AddressBook(); - - /** - Constructs an address book object. - The resources are loaded automatically. - - @param config The config file which contains the resource settings. - */ - AddressBook( const TQString &config ); - - /** - Destructor. - */ - virtual ~AddressBook(); - - /** - Requests a ticket for saving the addressbook. Calling this function locks - the addressbook for all other processes. You need the returned ticket - object for calling the save() function. - - @param resource A pointer to the resource which shall be locked. If 0, - the default resource is locked. - @return 0 if the resource is already locked or a valid save ticket - otherwise. - @see save() - */ - Ticket *requestSaveTicket( Resource *resource = 0 ); - - /** - Releases the ticket requested previously with requestSaveTicket(). - Call this function, if you want to release a ticket without saving. - */ - void releaseSaveTicket( Ticket *ticket ); - - /** - Loads all addressees synchronously. - - @return Whether the loading was successfully. - */ - bool load(); - - /** - Loads all addressees asynchronously. This function returns immediately - and emits the addressBookChanged() signal as soon as the loading has - finished. - - @return Whether the synchronous part of loading was successfully. - */ - bool asyncLoad(); - - /** - Saves all addressees of one resource synchronously. If the save is - successfull the ticket is deleted. - - @param ticket The ticket returned by requestSaveTicket(). - @return Whether the saving was successfully. - */ - bool save( Ticket *ticket ); - - /** - Saves all addressees of one resource asynchronously. If the save is - successfull the ticket is deleted. - - @param ticket The ticket returned by requestSaveTicket(). - @return Whether the synchronous part of saving was successfully. - */ - bool asyncSave( Ticket *ticket ); - - /** - Returns an iterator pointing to the first addressee of address book. - This iterator equals end() if the address book is empty. - */ - ConstIterator begin() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - Iterator begin(); - - /** - Returns an iterator pointing to the last addressee of address book. - This iterator equals begin() if the address book is empty. - */ - ConstIterator end() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - Iterator end(); - - - /** - Removes all addressees from the address book. - */ - void clear(); - - /** - Insert an addressee into the address book. If an addressee with the same - unique id already exists, it is replaced by the new one, otherwise it is - appended. - - @param addr The addressee which shall be insert. - */ - void insertAddressee( const Addressee &addr ); - - /** - Removes an addressee from the address book. - - @param addr The addressee which shall be removed. - */ - void removeAddressee( const Addressee &addr ); - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - - @param it An iterator pointing to the addressee which shall be removed. - */ - void removeAddressee( const Iterator &it ); - - /** - Returns an iterator pointing to the specified addressee. It will return - end() if no addressee matched. - - @param addr The addresee you are looking for. - */ - Iterator find( const Addressee &addr ); // KDE4: const - - /** - Searches an addressee with the specified unique identifier. - - @param uid The unique identifier you are looking for. - @return The addressee with the specified unique identifier or an - empty addressee. - */ - Addressee findByUid( const TQString &uid ); // KDE4: const - - /** - Returns a list of all addressees in the address book. - */ - Addressee::List allAddressees(); // KDE4: const - - /** - Searches all addressees which match the specified name. - - @param name The name you are looking for. - @return A list of all matching addressees. - */ - Addressee::List findByName( const TQString &name ); // KDE4: const - - /** - Searches all addressees which match the specified email address. - - @param email The email address you are looking for. - @return A list of all matching addressees. - */ - Addressee::List findByEmail( const TQString &email ); // KDE4: const - - /** - Searches all addressees which belongs to the specified category. - - @param category The category you are looking for. - @return A list of all matching addressees. - */ - Addressee::List findByCategory( const TQString &category ); // KDE4: const - - /** - Returns a string identifying this addressbook. The identifier is - created by concatenation of the resource identifiers. - */ - virtual TQString identifier(); // KDE4: const - - /** - Returns a list of all Fields known to the address book which are associated - with the given field category. - */ - Field::List fields( int category = Field::All ); // KDE4: const - - /** - Add custom field to address book. - - @param label User visible label of the field. - @param category Ored list of field categories. - @param key Identifier used as key for reading and writing the field. - @param app String used as application key for reading and writing - the field. - */ - bool addCustomField( const TQString &label, int category = Field::All, - const TQString &key = TQString::null, - const TQString &app = TQString::null ); - - /** - Adds a resource to the address book. - - @param resource The resource you want to add. - @return Whether opening the resource was successfully. - */ - bool addResource( Resource *resource ); - - /** - Removes a resource from the address book. - - @param resource The resource you want to remove. - @return Whether closing the resource was successfully. - */ - bool removeResource( Resource *resource ); - - /** - Returns a list of all resources. - */ - TQPtrList resources(); // KDE4: const - - /** - Sets the @p ErrorHandler, that is used by error() to - provide GUI independent error messages. - - @param errorHandler The error handler you want to use. - */ - void setErrorHandler( ErrorHandler *errorHandler ); - - /** - Shows GUI independent error messages. - - @param msg The error message that shall be displayed. - */ - void error( const TQString &msg ); - - /** - @deprecated There is no need to call this function anymore. - */ - void cleanUp() KDE_DEPRECATED; - - /** - Used for debug output. This function prints out the list - of all addressees to kdDebug(5700). - */ - void dump() const; - - /** - */ - void emitAddressBookLocked() { emit addressBookLocked( this ); } - void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } - void emitAddressBookChanged() { emit addressBookChanged( this ); } - - /** - Returns true when the loading of the addressbook has finished, - otherwise false. - - @since 3.5 - */ - bool loadingHasFinished() const; - - signals: - /** - Emitted when one of the resources discovered a change in its backend - or the asynchronous loading of all resources has finished. - You should connect to this signal to update the presentation of - the contact data in your application. - - @param addressBook The address book which emitted this signal. - */ - void addressBookChanged( AddressBook *addressBook ); - - /** - Emitted when one of the resources has been locked for writing. - - @param addressBook The address book which emitted this signal. - */ - void addressBookLocked( AddressBook *addressBook ); - - /** - Emitted when one of the resources has been unlocked. - You should connect to this signal if you want to save your changes - to a resource which is currently locked, and want to get notified when - saving is possible again. - - @param addressBook The address book which emitted this signal. - */ - void addressBookUnlocked( AddressBook *addressBook ); - - /** - Emitted when the asynchronous loading of one resource has finished - after calling asyncLoad(). - - @param resource The resource which emitted this signal. - */ - void loadingFinished( Resource *resource ); - - /** - Emitted when the asynchronous saving of one resource has finished - after calling asyncSave(). - - @param resource The resource which emitted this signal. - */ - void savingFinished( Resource *resource ); - - protected slots: - void resourceLoadingFinished( Resource* ); - void resourceSavingFinished( Resource* ); - void resourceLoadingError( Resource*, const TQString& ); - void resourceSavingError( Resource*, const TQString& ); - - protected: - void deleteRemovedAddressees(); - void setStandardResource( Resource* ); - Resource *standardResource(); - KRES::Manager *resourceManager(); - - private: - TQPtrList mDummy; // Remove in KDE 4 - struct AddressBookData; - AddressBookData *d; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); - -} - -#endif diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp deleted file mode 100644 index c8a1bf51e..000000000 --- a/kabc/addresseedialog.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "stdaddressbook.h" - -#include "addresseedialog.h" -#include "addresseedialog.moc" - -using namespace KABC; - -AddresseeItem::AddresseeItem( TQListView *parent, const Addressee &addressee ) : - TQListViewItem( parent ), - mAddressee( addressee ) -{ - setText( Name, addressee.realName() ); - setText( Email, addressee.preferredEmail() ); -} - -TQString AddresseeItem::key( int column, bool ) const -{ - if (column == Email) { - TQString value = text(Email); - TQRegExp emailRe("<\\S*>"); - int match = emailRe.search(value); - if (match > -1) - value = value.mid(match + 1, emailRe.matchedLength() - 2); - - return value.lower(); - } - - return text(column).lower(); -} - -AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : - KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), - Ok|Cancel, Ok, parent ), mMultiple( multiple ) -{ - TQWidget *topWidget = plainPage(); - - TQBoxLayout *topLayout = new TQHBoxLayout( topWidget ); - TQBoxLayout *listLayout = new TQVBoxLayout; - topLayout->addLayout( listLayout ); - - mAddresseeList = new TDEListView( topWidget ); - mAddresseeList->addColumn( i18n("Name") ); - mAddresseeList->addColumn( i18n("Email") ); - mAddresseeList->setAllColumnsShowFocus( true ); - mAddresseeList->setFullWidth( true ); - listLayout->addWidget( mAddresseeList ); - connect( mAddresseeList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - TQT_SLOT( slotOk() ) ); - connect( mAddresseeList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), - TQT_SLOT( updateEdit( TQListViewItem * ) ) ); - - mAddresseeEdit = new KLineEdit( topWidget ); - mAddresseeEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto ); - connect( mAddresseeEdit->completionObject(), TQT_SIGNAL( match( const TQString & ) ), - TQT_SLOT( selectItem( const TQString & ) ) ); - mAddresseeEdit->setFocus(); - mAddresseeEdit->completionObject()->setIgnoreCase( true ); - listLayout->addWidget( mAddresseeEdit ); - - setInitialSize( TQSize( 450, 300 ) ); - - if ( mMultiple ) { - TQBoxLayout *selectedLayout = new TQVBoxLayout; - topLayout->addLayout( selectedLayout ); - topLayout->setSpacing( spacingHint() ); - - TQGroupBox *selectedGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("Selected"), - topWidget ); - selectedLayout->addWidget( selectedGroup ); - - mSelectedList = new TDEListView( selectedGroup ); - mSelectedList->addColumn( i18n("Name") ); - mSelectedList->addColumn( i18n("Email") ); - mSelectedList->setAllColumnsShowFocus( true ); - mSelectedList->setFullWidth( true ); - connect( mSelectedList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - TQT_SLOT( removeSelected() ) ); - - TQPushButton *unselectButton = new TQPushButton( i18n("Unselect"), selectedGroup ); - connect ( unselectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelected() ) ); - - connect( mAddresseeList, TQT_SIGNAL( clicked( TQListViewItem * ) ), - TQT_SLOT( addSelected( TQListViewItem * ) ) ); - - setInitialSize( TQSize( 650, 350 ) ); - } - - mAddressBook = StdAddressBook::self( true ); - connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), - TQT_SLOT( addressBookChanged() ) ); - connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ), - TQT_SLOT( addressBookChanged() ) ); - - loadAddressBook(); -} - -AddresseeDialog::~AddresseeDialog() -{ -} - -void AddresseeDialog::loadAddressBook() -{ - mAddresseeList->clear(); - mItemDict.clear(); - mAddresseeEdit->completionObject()->clear(); - - AddressBook::Iterator it; - for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); - addCompletionItem( (*it).realName(), item ); - addCompletionItem( (*it).preferredEmail(), item ); - } -} - -void AddresseeDialog::addCompletionItem( const TQString &str, TQListViewItem *item ) -{ - if ( str.isEmpty() ) return; - - mItemDict.insert( str, item ); - mAddresseeEdit->completionObject()->addItem( str ); -} - -void AddresseeDialog::selectItem( const TQString &str ) -{ - if ( str.isEmpty() ) return; - - TQListViewItem *item = mItemDict.find( str ); - if ( item ) { - mAddresseeList->blockSignals( true ); - mAddresseeList->setSelected( item, true ); - mAddresseeList->ensureItemVisible( item ); - mAddresseeList->blockSignals( false ); - } -} - -void AddresseeDialog::updateEdit( TQListViewItem *item ) -{ - mAddresseeEdit->setText( item->text( 0 ) ); - mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); -} - -void AddresseeDialog::addSelected( TQListViewItem *item ) -{ - AddresseeItem *addrItem = dynamic_cast( item ); - if ( !addrItem ) return; - - Addressee a = addrItem->addressee(); - - TQListViewItem *selectedItem = mSelectedDict.find( a.uid() ); - if ( !selectedItem ) { - selectedItem = new AddresseeItem( mSelectedList, a ); - mSelectedDict.insert( a.uid(), selectedItem ); - } -} - -void AddresseeDialog::removeSelected() -{ - TQListViewItem *item = mSelectedList->selectedItem(); - AddresseeItem *addrItem = dynamic_cast( item ); - if ( !addrItem ) return; - - mSelectedDict.remove( addrItem->addressee().uid() ); - delete addrItem; -} - -Addressee AddresseeDialog::addressee() -{ - AddresseeItem *aItem = 0; - - if ( mMultiple ) - aItem = dynamic_cast( mSelectedList->firstChild() ); - else - aItem = dynamic_cast( mAddresseeList->selectedItem() ); - - if (aItem) return aItem->addressee(); - return Addressee(); -} - -Addressee::List AddresseeDialog::addressees() -{ - Addressee::List al; - AddresseeItem *aItem = 0; - - if ( mMultiple ) { - TQListViewItem *item = mSelectedList->firstChild(); - while( item ) { - aItem = dynamic_cast( item ); - if ( aItem ) al.append( aItem->addressee() ); - item = item->nextSibling(); - } - } - else - { - aItem = dynamic_cast( mAddresseeList->selectedItem() ); - if (aItem) al.append( aItem->addressee() ); - } - - return al; -} - -Addressee AddresseeDialog::getAddressee( TQWidget *parent ) -{ - AddresseeDialog *dlg = new AddresseeDialog( parent ); - Addressee addressee; - int result = dlg->exec(); - - if ( result == TQDialog::Accepted ) { - addressee = dlg->addressee(); - } - - delete dlg; - return addressee; -} - -Addressee::List AddresseeDialog::getAddressees( TQWidget *parent ) -{ - AddresseeDialog *dlg = new AddresseeDialog( parent, true ); - Addressee::List addressees; - int result = dlg->exec(); - if ( result == TQDialog::Accepted ) { - addressees = dlg->addressees(); - } - - delete dlg; - return addressees; -} - -void AddresseeDialog::addressBookChanged() -{ - loadAddressBook(); -} diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h deleted file mode 100644 index 74470d1b4..000000000 --- a/kabc/addresseedialog.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEEDIALOG_H -#define KABC_ADDRESSEEDIALOG_H - -#include - -#include -#include -#include - -#include "addressbook.h" - -namespace KABC { - -/** - @short Special ListViewItem, that is used by the AddresseeDialog. -*/ -class KABC_EXPORT AddresseeItem : public TQListViewItem -{ - public: - - /** - Type of column - @li @p Name - Name in Addressee - @li @p Email - Email in Addressee - */ - enum columns { Name = 0, Email = 1 }; - - /** - Constructor. - - @param parent The parent listview. - @param addressee The associated addressee. - */ - AddresseeItem( TQListView *parent, const Addressee &addressee ); - - /** - Returns the addressee. - */ - Addressee addressee() const { return mAddressee; } - - /** - Method used by TQListView to sort the items. - */ - virtual TQString key( int column, bool ascending ) const; - - private: - Addressee mAddressee; -}; - -/** - @short Dialog for selecting address book entries. - - This class provides a dialog for selecting entries from the standard KDE - address book. Use the getAddressee() function to open a modal dialog, - returning an address book entry. - - In the dialog you can select an entry from the list with the mouse or type in - the first letters of the name or email address you are searching for. The - entry matching best is automatically selected. Use double click, pressing - return or pressing the ok button to return the selected addressee to the - application. -*/ -class KABC_EXPORT AddresseeDialog : public KDialogBase -{ - Q_OBJECT - - public: - /** - Construct addressbook entry select dialog. - - @param parent parent widget - @param multiple if true, indicates a multiple selection. - */ - AddresseeDialog( TQWidget *parent=0, bool multiple=false ); - - /** - Destructor. - */ - virtual ~AddresseeDialog(); - - /** - Return the address chosen. - - If it is a multiple select, this will return only the first address chosen - */ - Addressee addressee(); - - /** - Return the list of addresses chosen - */ - Addressee::List addressees(); - - /** - Select a single address book entry. - - Open addressee select dialog and return the entry selected by the user. - If the user doesn't select an entry or presses cancel, the returned - addressee is empty. - */ - static Addressee getAddressee( TQWidget *parent ); - - /** - Select multiple address book entries. - - Open addressee select dialog and return the entries selected by the user. - If the user doesn't select an entry or presses cancel, the returned - addressee list is empty. - */ - static Addressee::List getAddressees( TQWidget *parent ); - - private slots: - void selectItem( const TQString & ); - void updateEdit( TQListViewItem *item ); - void addSelected( TQListViewItem *item ); - void removeSelected(); - - protected slots: - void addressBookChanged(); - - private: - void loadAddressBook(); - void addCompletionItem( const TQString &str, TQListViewItem *item ); - - bool mMultiple; - - TDEListView *mAddresseeList; - KLineEdit *mAddresseeEdit; - - TDEListView *mSelectedList; - - AddressBook *mAddressBook; - - TQDict mItemDict; - TQDict mSelectedDict; - - class AddresseeDialogPrivate; - AddresseeDialogPrivate *d; -}; - -} -#endif diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp deleted file mode 100644 index 5b8998852..000000000 --- a/kabc/addresseehelper.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (C) 2003 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include - -#include "addresseehelper.h" - -using namespace KABC; - -AddresseeHelper * AddresseeHelper::s_self; - -// static -AddresseeHelper *AddresseeHelper::self() -{ - if ( !s_self ) - s_self = new AddresseeHelper(); - - return s_self; -} - -AddresseeHelper::AddresseeHelper() - : TQObject( tqApp ), - DCOPObject( "KABC::AddresseeHelper" ) -{ - initSettings(); - - connectDCOPSignal( "kaddressbook", "KABC::AddressBookConfig", - "changed()", "initSettings()", false ); -} - -// static -void AddresseeHelper::addToSet( const TQStringList& list, - std::set& container ) -{ - TQStringList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( !(*it).isEmpty() ) - container.insert( *it ); - } -} - -void AddresseeHelper::initSettings() -{ - mTitles.clear(); - mSuffixes.clear(); - mPrefixes.clear(); - - mTitles.insert( i18n( "Dr." ) ); - mTitles.insert( i18n( "Miss" ) ); - mTitles.insert( i18n( "Mr." ) ); - mTitles.insert( i18n( "Mrs." ) ); - mTitles.insert( i18n( "Ms." ) ); - mTitles.insert( i18n( "Prof." ) ); - - mSuffixes.insert( i18n( "I" ) ); - mSuffixes.insert( i18n( "II" ) ); - mSuffixes.insert( i18n( "III" ) ); - mSuffixes.insert( i18n( "Jr." ) ); - mSuffixes.insert( i18n( "Sr." ) ); - - mPrefixes.insert( "van" ); - mPrefixes.insert( "von" ); - mPrefixes.insert( "de" ); - - TDEConfig config( "kabcrc", true, false ); // readonly, no kdeglobals - config.setGroup( "General" ); - - addToSet( config.readListEntry( "Prefixes" ), mTitles ); - addToSet( config.readListEntry( "Inclusions" ), mPrefixes ); - addToSet( config.readListEntry( "Suffixes" ), mSuffixes ); - mTradeAsFamilyName = config.readBoolEntry( "TradeAsFamilyName", true ); -} - -bool AddresseeHelper::containsTitle( const TQString& title ) const -{ - return mTitles.find( title ) != mTitles.end(); -} - -bool AddresseeHelper::containsPrefix( const TQString& prefix ) const -{ - return mPrefixes.find( prefix ) != mPrefixes.end(); -} - -bool AddresseeHelper::containsSuffix( const TQString& suffix ) const -{ - return mSuffixes.find( suffix ) != mSuffixes.end(); -} - -bool AddresseeHelper::tradeAsFamilyName() const -{ - return mTradeAsFamilyName; -} diff --git a/kabc/addresseehelper.h b/kabc/addresseehelper.h deleted file mode 100644 index 5280e6b2d..000000000 --- a/kabc/addresseehelper.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - This file is part of the KDE libraries - Copyright (C) 2003 Carsten Pfeiffer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEEHELPER_H -#define KABC_ADDRESSEEHELPER_H - -#include -#include - -#include - -#include - -/** - static data, shared by ALL addressee objects -*/ - -namespace KABC { - -class KABC_EXPORT AddresseeHelper : public TQObject, public DCOPObject -{ - K_DCOP - - public: - static AddresseeHelper *self(); - - bool containsTitle( const TQString& title ) const; - bool containsPrefix( const TQString& prefix ) const; - bool containsSuffix( const TQString& suffix ) const; - bool tradeAsFamilyName() const; - - k_dcop: - ASYNC initSettings(); - - private: - AddresseeHelper(); - - static void addToSet( const TQStringList& list, - std::set& container ); - std::set mTitles; - std::set mPrefixes; - std::set mSuffixes; - bool mTradeAsFamilyName; - - static AddresseeHelper *s_self; -}; - -} - -#endif diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp deleted file mode 100644 index 47324001c..000000000 --- a/kabc/addresseelist.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Jost Schenck - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "addresseelist.h" - -#include "field.h" -#include "sortmode.h" - -using namespace KABC; - -// -// -// Traits -// -// - -bool SortingTraits::Uid::eq( const Addressee &a1, const Addressee &a2 ) -{ - // locale awareness doesn't make sense sorting ids - return ( TQString::compare( a1.uid(), a2.uid() ) == 0 ); -} - -bool SortingTraits::Uid::lt( const Addressee &a1, const Addressee &a2 ) -{ - // locale awareness doesn't make sense sorting ids - return ( TQString::compare( a1.uid(), a2.uid() ) < 0 ); -} - -bool SortingTraits::Name::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.name(), a2.name() ) == 0 ); -} - -bool SortingTraits::Name::lt( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.name(), a2.name() ) < 0 ); -} - -bool SortingTraits::FormattedName::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) == 0 ); -} - -bool SortingTraits::FormattedName::lt( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) < 0 ); -} - -bool SortingTraits::FamilyName::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 - && TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 ); -} - -bool SortingTraits::FamilyName::lt( const Addressee &a1, const Addressee &a2 ) -{ - int family = TQString::localeAwareCompare( a1.familyName(), a2.familyName() ); - if ( 0 == family ) { - return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) < 0 ); - } else { - return family < 0; - } -} - -bool SortingTraits::GivenName::eq( const Addressee &a1, const Addressee &a2 ) -{ - return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 - && TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 ); -} - -bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 ) -{ - int given = TQString::localeAwareCompare( a1.givenName(), a2.givenName() ); - if ( 0 == given ) { - return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) < 0 ); - } else { - return given < 0; - } -} - -// -// -// AddresseeList -// -// - -static Field *sActiveField=0; - -AddresseeList::AddresseeList() - : TQValueList() -{ - mReverseSorting = false; - mActiveSortingCriterion = FormattedName; -} - -AddresseeList::~AddresseeList() -{ -} - -AddresseeList::AddresseeList( const AddresseeList &l ) - : TQValueList( l ) -{ - mReverseSorting = l.reverseSorting(); - mActiveSortingCriterion = l.sortingCriterion(); -} - -AddresseeList::AddresseeList( const TQValueList &l ) - : TQValueList( l ) -{ - mReverseSorting = false; -} - -void AddresseeList::dump() const -{ - kdDebug(5700) << "AddresseeList {" << endl; - kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl; - - TQString crit; - if ( Uid == mActiveSortingCriterion ) { - crit = "Uid"; - } else if ( Name == mActiveSortingCriterion ) { - crit = "Name"; - } else if ( FormattedName == mActiveSortingCriterion ) { - crit = "FormattedName"; - } else if ( FamilyName == mActiveSortingCriterion ) { - crit = "FamilyName"; - } else if ( GivenName == mActiveSortingCriterion ) { - crit = "GivenName"; - } else { - crit = "unknown -- update dump method"; - } - - kdDebug(5700) << "sorting criterion: " << crit << endl; - - for ( const_iterator it = begin(); it != end(); ++it ) { - (*it).dump(); - } - - kdDebug(5700) << "}" << endl; -} - -void AddresseeList::sortBy( SortingCriterion c ) -{ - mActiveSortingCriterion = c; - if ( Uid == c ) { - sortByTrait(); - } else if ( Name == c ) { - sortByTrait(); - } else if ( FormattedName == c ) { - sortByTrait(); - } else if ( FamilyName == c ) { - sortByTrait(); - } else if ( GivenName==c ) { - sortByTrait(); - } else { - kdError(5700) << "AddresseeList sorting criterion passed for which a trait is not known. No sorting done." << endl; - } -} - -void AddresseeList::sort() -{ - sortBy( mActiveSortingCriterion ); -} - -template -void AddresseeList::sortByTrait() -{ - // FIXME: better sorting algorithm, bubblesort is not acceptable for larger lists. - // - // for i := 1 to n - 1 - // do for j := 1 to n - i - // do if A[j] > A[j+1] - // then temp := A[j] - // A[j] := A[j + 1] - // A[j + 1 ] := temp - - iterator i1 = begin(); - iterator endIt = end(); - --endIt; - if ( i1 == endIt ) // don't need sorting - return; - - iterator i2 = endIt; - while( i1 != endIt ) { - iterator j1 = begin(); - iterator j2 = j1; - ++j2; - while( j1 != i2 ) { - if ( !mReverseSorting && Trait::lt( *j2, *j1 ) - || mReverseSorting && Trait::lt( *j1, *j2 ) ) { - tqSwap( *j1, *j2 ); - } - ++j1; - ++j2; - } - ++i1; - --i2; - } -} - -void AddresseeList::sortByField( Field *field ) -{ - if ( !field ) { - kdWarning(5700) << "sortByField called with no active sort field" << endl; - return; - } - - sActiveField = field; - - if ( count() == 0 ) - return; - - KABC::FieldSortMode *mode = new KABC::FieldSortMode( sActiveField, !mReverseSorting ); - - KABC::Addressee::setSortMode( mode ); - qHeapSort( *this ); - KABC::Addressee::setSortMode( 0 ); - - delete mode; -} - -void AddresseeList::sortByMode( SortMode *mode ) -{ - if ( count() == 0 ) - return; - - KABC::Addressee::setSortMode( mode ); - qHeapSort( *this ); - KABC::Addressee::setSortMode( 0 ); -} - -Field* -AddresseeList::sortingField() const -{ - return sActiveField; -} diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h deleted file mode 100644 index 7c9df0275..000000000 --- a/kabc/addresseelist.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Jost Schenck - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEELIST_H -#define KABC_ADDRESSEELIST_H - -#include - -#include "addressee.h" - -namespace KABC { - -class Field; -class SortField; -class SortMode; - -/** - * Each trait must implement one static function for equality, one for "less - * than". Class name should be the field name. A trait does not necessarily - * have to stick to just one field: a trait sorting by family name can e.g. - * sort addressees with equal family name by given name. - * - * If you want to implement reverse sorting, you do not have to write another - * trait, as AddresseeList takes care of that. - */ -namespace SortingTraits -{ - -class KABC_EXPORT Uid -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT Name -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT FormattedName -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT FamilyName // fallback to given name -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -class KABC_EXPORT GivenName // fallback to family name -{ - public: - static bool eq( const Addressee &, const Addressee & ); - static bool lt( const Addressee &, const Addressee & ); -}; - -} - -/** - * Addressee attribute used for sorting. - */ -typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterion; - -/** - * @short a TQValueList of Addressee, with sorting functionality - * - * This class extends the functionality of TQValueList with - * sorting methods specific to the Addressee class. It can be used - * just like any other TQValueList but is no template class. - * - * An AddresseeList does not automatically keep sorted when addressees - * are added or removed or the sorting order is changed, as this would - * slow down larger operations by sorting after every step. So after - * such operations you have to call {@link #sort} or {@link #sortBy} to - * create a defined order again. - * - * Iterator usage is inherited by TQValueList and extensively documented - * there. Please remember that the state of an iterator is undefined - * after any sorting operation. - * - * For the enumeration Type SortingCriterion, which specifies the - * field by the collection will be sorted, the following values exist: - * Uid, Name, FormattedName, FamilyName, GivenName. - * - * @author Jost Schenck jost@schenck.de - */ -class KABC_EXPORT AddresseeList : public TQValueList -{ - public: - AddresseeList(); - ~AddresseeList(); - AddresseeList( const AddresseeList & ); - AddresseeList( const TQValueList & ); - - /** - * Debug output. - */ - void dump() const; - - /** - * Determines the direction of sorting. On change, the list - * will not automatically be resorted. - * @param r true if sorting should be done reverse, false otherwise - */ - void setReverseSorting( bool r = true ) { mReverseSorting = r; } - - /** - * Returns the direction of sorting. - * @return true if sorting is done reverse, false otherwise - */ - bool reverseSorting() const { return mReverseSorting; } - - /** - * Sorts this list by a specific criterion. - * @param c the criterion by which should be sorted - */ - void sortBy( SortingCriterion c ); - - /** - * Sorts this list by a specific field. If no parameter is given, the - * last used Field object will be used. - * @param field pointer to the Field object to be sorted by - */ - void sortByField( Field *field = 0 ); - - /** - * Sorts this list by a specific sorting mode. - * @param mode pointer to the sorting mode object to be sorted by - * @since 3.4 - */ - void sortByMode( SortMode *mode = 0 ); - - /** - * Sorts this list by its active sorting criterion. This normally is the - * criterion of the last sortBy operation or FormattedName if up - * to now there has been no sortBy operation. - * - * Please note that the sorting trait of the last {@link #sortByTrait} - * method call is not remembered and thus the action can not be repeated - * by this method. - */ - void sort(); - - /** - * Templated sort function. You normally will not want to use this but - * {@link #sortBy} and {@link #sort} instead as the existing sorting - * criteria completely suffice for most cases. - * - * However, if you do want to use some special sorting criterion, you can - * write a trait class that will be provided to this templated method. - * This trait class has to have a class declaration like the following: - * \code - * class MySortingTrait { - * public: - * // eq returns true if a1 and a2 are equal - * static bool eq(KABC::Addressee a1, KABC::Addressee a2); - * // lt returns true is a1 is "less than" a2 - * static bool lt(KABC::Addressee a1, KABC::Addressee a2); - * }; - * \endcode - * You can then pass this class to the sortByTrait method like this: - * \code - * myAddresseelist.sortByTrait<MySortingTrait>(); - * \endcode - * Please note that the {@link #sort} method can not be used to repeat the - * sorting of the last sortByTrait action. - * - * Right now this method uses the bubble sort algorithm. This should be - * replaced for a better one when I have time. - */ - template void sortByTrait(); - - /** - * Returns the active sorting criterion, ie the sorting criterion that - * will be used by a {@link #sort} call. - */ - SortingCriterion sortingCriterion() const { return mActiveSortingCriterion; } - - /** - * Returns the active sorting field, ie a pointer to the Field object - * which was used for the last {@link #sortByField} operation. - * This function returns the last GLOBAL sorting field, not - * the class specific one. - * You're a lot better off by keeping track of this locally. - */ - Field* sortingField() const; - - private: - bool mReverseSorting; - SortingCriterion mActiveSortingCriterion; - //KDE 4.0 - add a d-pointer here! -}; - -} - -#endif diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp deleted file mode 100644 index a61e7a5c9..000000000 --- a/kabc/addresslineedit.cpp +++ /dev/null @@ -1,610 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Helge Deller - 2002 Lubos Lunak - 2001,2003 Carsten Pfeiffer - 2001 Waldo Bastian - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -// $Id$ - -#include "addresslineedit.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "ldapclient.h" - -#include - -//============================================================================= -// -// Class AddressLineEdit -// -//============================================================================= - - -using namespace KABC; - -TDECompletion * AddressLineEdit::s_completion = 0L; -bool AddressLineEdit::s_addressesDirty = false; -TQTimer* AddressLineEdit::s_LDAPTimer = 0L; -LdapSearch* AddressLineEdit::s_LDAPSearch = 0L; -TQString* AddressLineEdit::s_LDAPText = 0L; -AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L; -TDEConfig *AddressLineEdit::s_config = 0L; - -static KStaticDeleter completionDeleter; -static KStaticDeleter ldapTimerDeleter; -static KStaticDeleter ldapSearchDeleter; -static KStaticDeleter ldapTextDeleter; -static KStaticDeleter configDeleter; - -AddressLineEdit::AddressLineEdit(TQWidget* parent, - bool useCompletion, - const char *name) - : KLineEdit(parent,name) -{ - m_useCompletion = useCompletion; - m_completionInitialized = false; - m_smartPaste = false; - - init(); - - // Whenever a new AddressLineEdit is created (== a new composer is created), - // we set a dirty flag to reload the addresses upon the first completion. - // The address completions are shared between all AddressLineEdits. - // Is there a signal that tells us about addressbook updates? - if (m_useCompletion) - s_addressesDirty = true; -} - - -//----------------------------------------------------------------------------- -void AddressLineEdit::init() -{ - if ( !s_completion ) { - completionDeleter.setObject( s_completion, new TDECompletion() ); - s_completion->setOrder( TDECompletion::Sorted ); - s_completion->setIgnoreCase( true ); - } - - if( m_useCompletion ) { - if( !s_LDAPTimer ) { - ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer ); - ldapSearchDeleter.setObject( s_LDAPSearch, new LdapSearch ); - ldapTextDeleter.setObject( s_LDAPText, new TQString ); - } - connect( s_LDAPTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotStartLDAPLookup())); - connect( s_LDAPSearch, TQT_SIGNAL( searchData( const TQStringList& )), - TQT_SLOT( slotLDAPSearchData( const TQStringList& ))); - } - - if ( m_useCompletion && !m_completionInitialized ) - { - setCompletionObject( s_completion, false ); // we handle it ourself - connect( this, TQT_SIGNAL( completion(const TQString&)), - this, TQT_SLOT(slotCompletion() )); - - TDECompletionBox *box = completionBox(); - connect( box, TQT_SIGNAL( highlighted( const TQString& )), - this, TQT_SLOT( slotPopupCompletion( const TQString& ) )); - connect( box, TQT_SIGNAL( userCancelled( const TQString& )), - TQT_SLOT( userCancelled( const TQString& ))); - - m_completionInitialized = true; // don't connect muliple times. That's - // ugly, tho, better have completionBox() - // virtual in KDE 4 - // Why? This is only called once. Why should this be called more - // than once? And why was this protected? - } -} - -//----------------------------------------------------------------------------- -AddressLineEdit::~AddressLineEdit() -{ -} - -//----------------------------------------------------------------------------- - -TDEConfig* AddressLineEdit::config() -{ - if ( !s_config ) - configDeleter.setObject( s_config, new TDEConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals - - return s_config; -} - -void AddressLineEdit::setFont( const TQFont& font ) -{ - KLineEdit::setFont( font ); - if ( m_useCompletion ) - completionBox()->setFont( font ); -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::keyPressEvent(TQKeyEvent *e) -{ - bool accept = false; - - if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e))) - { - doCompletion(true); - accept = true; - } - else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e))) - { - int len = text().length(); - - if (len == cursorPosition()) // at End? - { - doCompletion(true); - accept = true; - } - } - - if( !accept ) - KLineEdit::keyPressEvent( e ); - - if( e->isAccepted()) - { - if( m_useCompletion && s_LDAPTimer != NULL ) - { - if( *s_LDAPText != text()) - stopLDAPLookup(); - *s_LDAPText = text(); - s_LDAPLineEdit = this; - s_LDAPTimer->start( 500, true ); - } - } -} - -void AddressLineEdit::mouseReleaseEvent( TQMouseEvent * e ) -{ - if (m_useCompletion && (e->button() == Qt::MidButton)) - { - m_smartPaste = true; - KLineEdit::mouseReleaseEvent(e); - m_smartPaste = false; - return; - } - KLineEdit::mouseReleaseEvent(e); -} - -void AddressLineEdit::insert(const TQString &t) -{ - if (!m_smartPaste) - { - KLineEdit::insert(t); - return; - } - TQString newText = t.stripWhiteSpace(); - if (newText.isEmpty()) - return; - - // remove newlines in the to-be-pasted string as well as an eventual - // mailto: protocol - newText.replace( TQRegExp("\r?\n"), ", " ); - if ( newText.startsWith( "mailto:" ) ) - { - KURL u(newText); - newText = u.path(); - } - else if (newText.find(" at ") != -1) - { - // Anti-spam stuff - newText.replace( " at ", "@" ); - newText.replace( " dot ", "." ); - } - else if (newText.find("(at)") != -1) - { - newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); - } - - TQString contents = text(); - int start_sel = 0; - int end_sel = 0; - int pos = cursorPosition(); - if (getSelection(&start_sel, &end_sel)) - { - // Cut away the selection. - if (pos > end_sel) - pos -= (end_sel - start_sel); - else if (pos > start_sel) - pos = start_sel; - contents = contents.left(start_sel) + contents.right(end_sel+1); - } - - int eot = contents.length(); - while ((eot > 0) && contents[eot-1].isSpace()) eot--; - if (eot == 0) - { - contents = TQString::null; - } - else if (pos >= eot) - { - if (contents[eot-1] == ',') - eot--; - contents.truncate(eot); - contents += ", "; - pos = eot+2; - } - - contents = contents.left(pos)+newText+contents.mid(pos); - setText(contents); - setCursorPosition(pos+newText.length()); -} - -void AddressLineEdit::paste() -{ - if (m_useCompletion) - m_smartPaste = true; - KLineEdit::paste(); - m_smartPaste = false; -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::cursorAtEnd() -{ - setCursorPosition( text().length() ); -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::enableCompletion(bool enable) -{ - m_useCompletion = enable; -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::doCompletion(bool ctrlT) -{ - if ( !m_useCompletion ) - return; - - TQString prevAddr; - - TQString s(text()); - int n = s.findRev(','); - - if (n >= 0) - { - n++; // Go past the "," - - int len = s.length(); - - // Increment past any whitespace... - while( n < len && s[n].isSpace() ) - n++; - - prevAddr = s.left(n); - s = s.mid(n,255).stripWhiteSpace(); - } - - if ( s_addressesDirty ) - loadAddresses(); - - if ( ctrlT ) - { - TQStringList completions = s_completion->substringCompletion( s ); - if (completions.count() > 1) { - m_previousAddresses = prevAddr; - setCompletedItems( completions ); - } - else if (completions.count() == 1) - setText(prevAddr + completions.first()); - - cursorAtEnd(); - return; - } - - TDEGlobalSettings::Completion mode = completionMode(); - - switch ( mode ) - { - case TDEGlobalSettings::CompletionPopupAuto: - { - if (s.isEmpty()) - break; - } - case TDEGlobalSettings::CompletionPopup: - { - m_previousAddresses = prevAddr; - TQStringList items = s_completion->allMatches( s ); - items += s_completion->allMatches( "\"" + s ); - items += s_completion->substringCompletion( '<' + s ); - uint beforeDollarCompletionCount = items.count(); - - if( s.find( ' ' ) == -1 ) // one word, possibly given name - items += s_completion->allMatches( "$$" + s ); - - if ( !items.isEmpty() ) - { - if ( items.count() > beforeDollarCompletionCount ) - { - // remove the '$$whatever$' part - for( TQStringList::Iterator it = items.begin(); - it != items.end(); - ++it ) - { - int pos = (*it).find( '$', 2 ); - if( pos < 0 ) // ??? - continue; - (*it)=(*it).mid( pos + 1 ); - } - } - - items = removeMailDupes( items ); - - // We do not want KLineEdit::setCompletedItems to perform text - // completion (suggestion) since it does not know how to deal - // with providing proper completions for different items on the - // same line, e.g. comma-separated list of email addresses. - bool autoSuggest = (mode != TDEGlobalSettings::CompletionPopupAuto); - setCompletedItems( items, autoSuggest ); - - if (!autoSuggest) - { - int index = items.first().find( s ); - TQString newText = prevAddr + items.first().mid( index ); - //kdDebug() << "OLD TEXT: " << text() << endl; - //kdDebug() << "NEW TEXT: " << newText << endl; - setUserSelection(false); - setCompletedText(newText,true); - } - } - - break; - } - - case TDEGlobalSettings::CompletionShell: - { - TQString match = s_completion->makeCompletion( s ); - if ( !match.isNull() && match != s ) - { - setText( prevAddr + match ); - cursorAtEnd(); - } - break; - } - - case TDEGlobalSettings::CompletionMan: // Short-Auto in fact - case TDEGlobalSettings::CompletionAuto: - { - if (!s.isEmpty()) - { - TQString match = s_completion->makeCompletion( s ); - if ( !match.isNull() && match != s ) - { - TQString adds = prevAddr + match; - setCompletedText( adds ); - } - break; - } - } - case TDEGlobalSettings::CompletionNone: - default: // fall through - break; - } -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::slotPopupCompletion( const TQString& completion ) -{ - setText( m_previousAddresses + completion ); - cursorAtEnd(); -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::loadAddresses() -{ - s_completion->clear(); - s_addressesDirty = false; - - TQStringList adrs = addresses(); - for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it) - addAddress( *it ); -} - -void AddressLineEdit::addAddress( const TQString& adr ) -{ - s_completion->addItem( adr ); - int pos = adr.find( '<' ); - if( pos >= 0 ) - { - ++pos; - int pos2 = adr.find( pos, '>' ); - if( pos2 >= 0 ) - s_completion->addItem( adr.mid( pos, pos2 - pos )); - } -} - -void AddressLineEdit::slotStartLDAPLookup() -{ - if( !s_LDAPSearch->isAvailable() || s_LDAPLineEdit != this ) - return; - startLoadingLDAPEntries(); -} - -void AddressLineEdit::stopLDAPLookup() -{ - s_LDAPSearch->cancelSearch(); - s_LDAPLineEdit = NULL; -} - -void AddressLineEdit::startLoadingLDAPEntries() -{ - TQString s( *s_LDAPText ); - // TODO cache last? - TQString prevAddr; - int n = s.findRev(','); - if (n>= 0) - { - prevAddr = s.left(n+1) + ' '; - s = s.mid(n+1,255).stripWhiteSpace(); - } - if( s.length() == 0 ) - return; - - loadAddresses(); // TODO reuse these? - s_LDAPSearch->startSearch( s ); -} - -void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs ) -{ - if( s_LDAPLineEdit != this ) - return; - for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) { - TQString name(*it); - int pos = name.find( " <" ); - int pos_comma = name.find( ',' ); - // put name in quotes, if we have a comma in the name - if (pos>0 && pos_comma>0 && pos_commahasFocus()) - { - if( completionMode() != TDEGlobalSettings::CompletionNone ) - { - doCompletion( false ); - } - } -} - -TQStringList AddressLineEdit::removeMailDupes( const TQStringList& adrs ) -{ - TQStringList src = adrs; - qHeapSort( src ); - TQString last; - for( TQStringList::Iterator it = src.begin(); it != src.end(); ) { - if( *it == last ) - { - it = src.remove( it ); - continue; // dupe - } - last = *it; - ++it; - } - return src; -} - -//----------------------------------------------------------------------------- -void AddressLineEdit::dropEvent(TQDropEvent *e) -{ - KURL::List uriList; - if(KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList )) - { - TQString ct = text(); - KURL::List::Iterator it = uriList.begin(); - for (; it != uriList.end(); ++it) - { - if (!ct.isEmpty()) ct.append(", "); - KURL u(*it); - if ((*it).protocol() == "mailto") - ct.append( (*it).path() ); - else - ct.append( (*it).url() ); - } - setText(ct); - setEdited( true ); - } - else { - if (m_useCompletion) - m_smartPaste = true; - TQLineEdit::dropEvent(e); - m_smartPaste = false; - } -} - - -TQStringList AddressLineEdit::addresses() -{ - TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while - - TQStringList result; - TQString space(" "); - TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]"); - TQString endQuote("\" "); - TQString addr, email; - - KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); - KABC::AddressBook::Iterator it; - for( it = addressBook->begin(); it != addressBook->end(); ++it ) { - TQStringList emails = (*it).emails(); - - TQString n = (*it).prefix() + space + - (*it).givenName() + space + - (*it).additionalName() + space + - (*it).familyName() + space + - (*it).suffix(); - - n = n.simplifyWhiteSpace(); - - TQStringList::ConstIterator mit; - - for ( mit = emails.begin(); mit != emails.end(); ++mit ) { - email = *mit; - if (!email.isEmpty()) { - if (n.isEmpty() || (email.find( '<' ) != -1)) - addr = TQString::null; - else { /* do we really need quotes around this name ? */ - if (n.find(needQuotes) != -1) - addr = '"' + n + endQuote; - else - addr = n + space; - } - - if (!addr.isEmpty() && (email.find( '<' ) == -1) - && (email.find( '>' ) == -1) - && (email.find( ',' ) == -1)) - addr += '<' + email + '>'; - else - addr += email; - addr = addr.stripWhiteSpace(); - result.append( addr ); - } - } - } - - KABC::DistributionListManager manager( addressBook ); - manager.load(); - result += manager.listNames(); - - TQApplication::restoreOverrideCursor(); - - return result; -} - -#include "addresslineedit.moc" diff --git a/kabc/addresslineedit.h b/kabc/addresslineedit.h deleted file mode 100644 index f81ffbfe4..000000000 --- a/kabc/addresslineedit.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Helge Deller - 2002 Lubos Lunak - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSLINEEDIT_H -#define KABC_ADDRESSLINEEDIT_H -// $Id$ - -#include -#include -#include - -#include "klineedit.h" -#include "kcompletion.h" - -class TDEConfig; - -namespace KABC { - -class LdapSearch; - -/** - * A lineedit with LDAP and kabc completion - * - * This lineedit is supposed to be used wherever the user types email addresses - * and might want a completion. You can simply use it as a replacement for - * KLineEdit or TQLineEdit. - * - * You can enable or disable the lineedit at any time. - * - * @see AddressLineEdit::enableCompletion() - */ -class KABC_EXPORT AddressLineEdit : public KLineEdit -{ - Q_OBJECT -public: - AddressLineEdit(TQWidget* parent, bool useCompletion = true, - const char *name = 0L); - virtual ~AddressLineEdit(); - - /** - * Reimplented for internal reasons. - * @ see KLineEdit::setFont() - */ - virtual void setFont( const TQFont& ); - - static TDEConfig *config(); - -public slots: - /** - * Set cursor to end of line. - */ - void cursorAtEnd(); - /** - * Toggle completion. - */ - void enableCompletion( bool enable ); - -protected: - /** - * Always call AddressLineEdit::loadAddresses() as the first thing. - * Use addAddress() to add addresses. - */ - virtual void loadAddresses(); - void addAddress( const TQString& ); - virtual void keyPressEvent(TQKeyEvent*); - virtual void dropEvent(TQDropEvent *e); - virtual void paste(); - virtual void insert(const TQString &t); - virtual void mouseReleaseEvent( TQMouseEvent * e ); - void doCompletion(bool ctrlT); - -private slots: - void slotCompletion() { doCompletion(false); } - void slotPopupCompletion( const TQString& ); - void slotStartLDAPLookup(); - void slotLDAPSearchData( const TQStringList& ); - -private: - void init(); - void startLoadingLDAPEntries(); - void stopLDAPLookup(); - TQStringList addresses(); - TQStringList removeMailDupes( const TQStringList& adrs ); - - TQString m_previousAddresses; - bool m_useCompletion; - bool m_completionInitialized; - bool m_smartPaste; - TQString m_typedText; // unused - - static bool s_addressesDirty; - static TDECompletion *s_completion; - static TQTimer *s_LDAPTimer; - static LdapSearch *s_LDAPSearch; - static TQString *s_LDAPText; - static AddressLineEdit *s_LDAPLineEdit; - static TDEConfig *s_config; - -private: - class AddressLineEditPrivate* d; -}; - -} - -#endif /* KABC_ADDRESSLINEEDIT_H */ diff --git a/kabc/agent.cpp b/kabc/agent.cpp deleted file mode 100644 index 571b7803e..000000000 --- a/kabc/agent.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "addressee.h" - -#include "agent.h" - -using namespace KABC; - -Agent::Agent() - : mAddressee( 0 ), mIntern( false ) -{ -} - -Agent::Agent( const TQString &url ) - : mAddressee( 0 ),mUrl( url ), mIntern( false ) -{ -} - -Agent::Agent( Addressee *addressee ) - : mAddressee( addressee ), mIntern( true ) -{ -} - -Agent::~Agent() -{ - delete mAddressee; - mAddressee = 0; -} - -bool Agent::operator==( const Agent &a ) const -{ - if ( mIntern != a.mIntern ) - return false; - - if ( !mIntern ) { - if ( mUrl != a.mUrl ) - return false; - } else { - if ( mAddressee && !a.mAddressee ) return false; - if ( !mAddressee && a.mAddressee ) return false; - if ( !mAddressee && !a.mAddressee ) return false; - if ( (*mAddressee) != (*a.mAddressee) ) return false; - } - - return true; -} - -bool Agent::operator!=( const Agent &a ) const -{ - return !( a == *this ); -} - -Agent &Agent::operator=( const Agent &addr ) -{ - if ( this == &addr ) - return *this; - - if ( addr.mIntern && addr.mAddressee ) { - if ( mAddressee ) - delete mAddressee; - - mAddressee = new Addressee; - *mAddressee = *(addr.mAddressee); - } - - mUrl = addr.mUrl; - mIntern = addr.mIntern; - - return *this; -} - -void Agent::setUrl( const TQString &url ) -{ - mUrl = url; - mIntern = false; -} - -void Agent::setAddressee( Addressee *addressee ) -{ - mAddressee = addressee; - mIntern = true; -} - -bool Agent::isIntern() const -{ - return mIntern; -} - -TQString Agent::url() const -{ - return mUrl; -} - -Addressee *Agent::addressee() const -{ - return mAddressee; -} - -TQString Agent::asString() const -{ - if ( mIntern ) - return "intern agent"; - else - return mUrl; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent ) -{ - TQ_UINT32 hasAddressee = ( agent.mAddressee != 0 ); - - s << agent.mIntern << agent.mUrl << hasAddressee; - if ( hasAddressee ) - s << (*agent.mAddressee); - - return s; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Agent &agent ) -{ - TQ_UINT32 hasAddressee; - - s >> agent.mIntern >> agent.mUrl >> hasAddressee; - - if ( hasAddressee ) { - agent.mAddressee = new Addressee; - s >> (*agent.mAddressee); - } - - return s; -} diff --git a/kabc/agent.h b/kabc/agent.h deleted file mode 100644 index dbe048f08..000000000 --- a/kabc/agent.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_AGENT_H -#define KABC_AGENT_H - -class TQDataStream; - -#include - -#include - -namespace KABC { - -class Addressee; - -/** - * Important!!! - * - * At the moment the vcard format does not support saving and loading - * this entity. - */ -class KABC_EXPORT Agent -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); - -public: - - /** - * Consturctor. Creates an empty object. - */ - Agent(); - - /** - * Consturctor. - * - * @param url A URL that describes the position of the agent file. - */ - Agent( const TQString &url ); - - /** - * Consturctor. - * - * @param addressee The addressee object of the agent. - */ - Agent( Addressee *addressee ); - - /** - * Destructor. - */ - ~Agent(); - - - bool operator==( const Agent & ) const; - bool operator!=( const Agent & ) const; - Agent &operator=( const Agent & ); - - /** - * Sets a URL for the location of the agent file. When using this - * function, isIntern() will return 'false' until you use - * setAddressee(). - * - * @param url The location URL of the agent file. - */ - void setUrl( const TQString &url ); - - /** - * Sets the addressee of the agent. When using this function, - * isIntern() will return 'true' until you use setUrl(). - * - * @param addressee The addressee object of the agent. - */ - void setAddressee( Addressee *addressee ); - - /** - * Returns whether the agent is described by a URL (extern) or - * by a addressee (intern). - * When this method returns 'true' you can use addressee() to - * get a Addressee object. Otherwise you can request the URL - * of this agent by url() and load the data from that location. - */ - bool isIntern() const; - - /** - * Returns the location URL of this agent. - */ - TQString url() const; - - /** - * Returns the addressee object of this agent. - */ - Addressee* addressee() const; - - /** - * Returns string representation of the agent. - */ - TQString asString() const; - -private: - Addressee *mAddressee; - TQString mUrl; - - int mIntern; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); - -} -#endif diff --git a/kabc/countrytransl.map b/kabc/countrytransl.map deleted file mode 100644 index 1459f0942..000000000 --- a/kabc/countrytransl.map +++ /dev/null @@ -1,12381 +0,0 @@ -Andorra ad -Andorra ad -أندورا ad -Ðндора ad -Ðндора ad -অà§à¦¯à¦¾à¦¨à¦¡à§‹à¦°à¦¾ ad -Andora ad -Andora ad -ΑνδόÏα ad -Andoro ad -آندورا ad -Andorre ad -Andóra ad -×נדורה ad -अंडोरा ad -アンドラ ad -អង់ដូរ៉ា ad -안ë„ë¼ ad -ອີນເດີຠad -Andora ad -Ðндора ad -Ðндорра ad -à¨à¨‚ਡੋਰਾ ad -Andora ad -Ðндорра ad -Andora ad -Ðндора ad -Andora ad -அனà¯à®Ÿà¯‹à®°à®¾ ad -Ðндора ad -à¹à¸­à¸™à¹‚ดรา ad -Ðндорра ad -Ðндорра ad -Andore ad -安é“å°” ad -安é“爾 ad -United Arab Emirates ae -Vereenigde Arabiese Emirate ae -الإمارات العربية المتحدة ae -Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ ÐрабÑÐºÑ–Ñ Ð­Ð¼Ñ–Ñ€Ð°Ñ‚Ñ‹ ae -ОÐЕ ae -সংযà§à¦•à§à¦¤ আরব আমিরশাহি ae -Stadoù-Unanet Arabeg ae -Ujedinjeni arapski emirati ae -Emirats Àrabs Units ae -Spojené arabské emiráty ae -Emiraethau Arabaidd Unedig ae -Forenende Arabiske Emirater ae -Vereinigte Arabische Emirate ae -Ενωμένα ΑÏαβικά ΕμιÏάτα ae -UniÄintaj Arabaj Emirlandoj ae -Emiratos árabes unidos ae -Araabia Ühendemiraadid ae -Arabiar Emirato Batuak ae -امارات متحده عربی ae -Yhdistyneet Arabiemiraatit ae -Émirats Arabes Unis ae -Ferienigde Arabyske Emiraten ae -Aontas na nÉimíríochtaí Arabacha ae -Emiratos Ãrabes Unidos ae -×יחוד ×”×מירויות הערביות ae -संयà¥à¤•à¥à¤¤ अरब अमीरात ae -Ujedinjeni arapski emirati ae -Egyesült Arab Emirátusok ae -Sameinuðu arabísku furstadæmin ae -Emirati Arabi Uniti ae -アラブ首長国連邦 ae -អារ៉ាប់​រួម ae -ì•„ëž ì—미레ì´íЏ ì—°í•© ae -ສະຫະລັດ ae -Jungtiniai Arabų Emiratai ae -Apvienotie ArÄbu EmerÄti ae -Обединети ÐрапÑки Емирати ae -ÐÑгдÑÑн арабын имрат ae -Emirati Għarab Magħquda ae -De forente arabiske emirater ae -Vereenigte Araabsche Emiraten ae -Verenigde Arabische Emiraten ae -Dei sameinte arabiske emirata ae -Di-Emirate tseo di Kopanego tsa Arab ae -ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ ae -Zjednoczone Emiraty Arabskie ae -Emiratos Ãrabes Unidos ae -Emirados Ãrabes Unidos ae -Emiratele Arabe Unite ae -Объединенные ÐрабÑкие Эмираты ae -Leta Zunze Ubumwe z'Abarabu ae -Ovttastuvvon arábalaÅ¡ emiráhtat ae -Spojené arabské emiráty ae -Združeni arabski Emirati ae -Уједињени арапÑки емирати ae -Ujedinjeni arapski emirati ae -Förenade arabemiraten ae -யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ அரபி எமிரேடà¯à®¸à¯ ae -Ðморати муттаҳидаи Ðраб ae -สหรัà¸à¸­à¸²à¸«à¸£à¸±à¸šà¸­à¸µà¸¡à¸´à¹€à¸£à¸•ส์ ae -BirleÅŸik Arap Emirlikleri ae -Berläşkän Ğäräp Ämirlekläre ae -Об'єднані ÐрабÑькі Емірати ae -Бирлашган Ðраб Ðмирликлари ae -Mashango o tangananaho a Emirates ae -Emirat Arabes Unis ae -阿è”é…‹ ae -阿拉伯è¯åˆå¤§å…¬åœ‹ ae -Izindawo zezinduna zase-United Arab ae -Afghanistan af -Ø£ÙØºØ§Ù†Ø³ØªØ§Ù† af -ÐфганіÑтан af -ÐфганиÑтан af -আফগানিসà§à¦¤à¦¾à¦¨ af -Afganistan af -Afganistan af -Afganistan af -Afghanistán af -Affganistan af -Αφγανιστάν af -Afganio af -Afghanistán af -Afganistan af -Ø§ÙØºØ§Ù†Ø³ØªØ§Ù† af -Afganistan af -An Afganastáin af -Afganistan af -×פגניסטן af -अफगानिसà¥à¤¤à¤¾à¤¨ af -Afganistan af -Afganisztán af -Afganistan af -Afganistan af -アフガニスタン af -អាហ្វកានីស្ážáž¶áž“ af -아프가니스탄 af -ລີທົ່ວເນີຠaf -AfganistÄna af -ÐвганиÑтан af -ÐфганÑтан af -Afganistan af -ਅਫਗਾਨਿਸਤਾਨ af -Afganistan af -Afeganistão af -Afeganistão af -Afganistan af -ÐфганиÑтан af -Afuganisitani af -Afganistan af -Afganistan af -ÐвганиÑтан af -Avganistan af -Afganistan af -ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯ af -ÐфғониÑтон af -อาฟà¸à¸²à¸™à¸´à¸ªà¸–าน af -Afganistan af -Äfğänstan af -ÐфганіÑтан af -ÐфғониÑтон af -Afganistan af -阿富汗 af -阿富汗 af -Antigua and Barbuda ag -Antigue en Barbuda ag -أنتيغوا Ùˆ باربودا ag -Antigua vÉ™ Barbuda ag -Ðнтыгуа Ñ– Барбуда ag -Ðнтигуа и Барбуда ag -অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦—à§à§Ÿà¦¾ à¦à¦¬à¦‚ বারà§à¦¬à§à¦¡à¦¾ ag -Antigua ha Barbuda ag -Antigua i Barbuda ag -Antigua i Barbuda ag -Antigua a Barbuda ag -Antigwa a Barbwda ag -Antigua og Barbuda ag -Antigua und Barbuda ag -Αντίγκουα και ΜπαÏμποÏντα ag -Antigvo-Barbudo ag -Antigua y Barbuda ag -Antigua ja Barbuda ag -Antigua eta Barbuda ag -آنتیگوا Ùˆ باربودا ag -Antigua ja Barbados ag -Antigua og Barbuda ag -Antigua et Barbuda ag -Antigua en Barbuda ag -Antigua agus Barbúda ag -Antiga e Barbuda ag -×נטיגו××” ובריבודה ag -à¤à¤¨à¥à¤Ÿà¤¿à¤—à¥à¤† और बारबूडा ag -Antigua i Barbuda ag -Antigua és Barbuda ag -Antigua dan Barbuda ag -Antígva og Barbúda ag -Antigua e Barbuda ag -アンティグアãƒãƒ¼ãƒ–ーダ ag -Antigua និង Barbuda ag -앤티가 바부다 ag -Antikva ir Barbuda ag -Antigva un Barbuda ag -Ðнтигва и Барбуда ag -Ðнтигуа ба Барбуда ag -Antigwa u Barbuda ag -Antigua og Barbuda ag -Antigua un Barbuda ag -Antigua en Barbuda ag -Antigua og Barbuda ag -Antigua le Barbuda ag -Antigua e Barbuda ag -à¨à¨‚ਟੀਗà©à¨† ਤੇ ਬਾਰਬà©à¨¡à¨¾ ag -Antigua i Barbuda ag -Antígua e Barbuda ag -Antigua e Barbuda ag -Antigua ÅŸi Barbuda ag -Ðнтигуа и Барбуда ag -Antigwa na Barubida ag -Antigua ja Barbuda ag -Antigua a Barbuda ag -Antigva in Barbuda ag -Ðнтигва и Барбуда ag -Antigva i Barbuda ag -I-Antigua kanye ne Barbuda ag -Antigua och Barbuda ag -ஆனà¯à®Ÿà®¿à®•ா மறà¯à®±à¯à®®à¯ பெரà¯à®®à¯à®Ÿà®¾ ag -Ðнтигуо ва Барбудо ag -อันทิà¸à¸±à¸§ à¹à¸¥à¸° บาร์บูดา ag -Antigua ve Barbuda ag -Antigua wä Barbuda ag -Трінідад Ñ– Тобаго ag -Ðнтигуа ва Барбуда ag -Antigua và Barbuda ag -Antigua eyet Barbuda ag -Antigua ne Barbuda ag -安æç“œå’Œå·´å¸ƒè¾¾ ag -安地瓜島和巴布é”å³¶ ag -Antigua kanye ne-Barbuda ag -Anguilla ai -أنغويلا ai -ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai -Ðнгила ai -অà§à¦¯à¦¾à¦™à§à¦—à§à¦‡à¦²à¦¾ ai -Angilla ai -Angwila ai -Ανγκουίλα ai -Angvilo ai -آنگوییلا ai -×נגווילה ai -à¤à¤‚गà¥à¤à¤²à¤¾ ai -Angvilla ai -イギリス属領アンギラ ai -អង់ហ្ស៊ីឡា ai -ì•™ê¸¸ë¼ ai -à»àºžàº™àº§àº´àº™ ai -Ðнгилја ai -Ðнгуаилла ai -Angwilla ai -à¨à¨‚ਨਗà©à¨ˆà¨²à¨¾ ai -Anghila ai -Ðнгилла ai -Angwiya ai -Angvila ai -Ðнгвила ai -Angvila ai -ஆனà¯à®•ிலà¯à®²à®¾ ai -Ðнгуилло ai -à¹à¸­à¸‡à¸à¸µà¸¥à¸² ai -ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai -Ðнгвилла ai -Anguila ai -安圭拉 ai -阿爾åŠåˆ©äºž ai -Albania al -Albanië al -ألبانيا al -ÐÐ»ÑŒÐ±Ð°Ð½Ñ–Ñ al -ÐÐ»Ð±Ð°Ð½Ð¸Ñ al -অলবেনিয়া al -Albani al -Albanija al -Albània al -Albánie al -Albanien al -Albanien al -Αλβανία al -Albanio al -Albaania al -آلبانی al -Albanie al -Albanië al -An Albáin al -Albánia al -×לבניה al -अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾ al -Albánia al -Albanía al -アルãƒãƒ‹ã‚¢ al -អាល់បានី al -알바니아 al -à»àº­àº”à»àº¥àº™àº•ິຠal -Albanija al -AlbÄnija al -Ðлбанија al -Ðлбани al -Albanija al -Albanien al -Albanië al -ਅਲਬਾਨੀਆ al -Albânia al -Albânia al -ÐÐ»Ð±Ð°Ð½Ð¸Ñ al -Alubaniya al -Albánia al -Albánsko al -Albanija al -Ðлбанија al -Albanija al -Albanien al -ஆலà¯à®ªà®©à®¿à®¯à®¾ al -Олбанӣ al -อัลเบเนีย al -Arnavutluk al -ÐÐ»Ð±Ð°Ð½Ñ–Ñ al -ÐÐ»Ð±Ð°Ð½Ð¸Ñ al -Albaneye al -阿尔巴尼亚 al -阿亞巴尼亞 al -Armenia am -Armenië am -أرمينيا am -ÐрмÑÐ½Ñ–Ñ am -ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am -আরà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ am -Armeni am -Armenija am -Armènia am -Arménie am -Armenien am -Armenien am -ΑÏμενία am -Armenio am -Armeenia am -ارمنستان am -Arménie am -Armenië am -An Airméin am -Arménia am -×רמניה am -आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾ am -Örményország am -Armenía am -アルメニア am -អារមáŸáž“ី am -아르메니아 am -ອາເຈນຕິນາ am -ArmÄ—nija am -ArmÄ“nija am -Ерменија am -Ðрмен am -Armenien am -Armenië am -ਅਰਮੀਨੀਆ am -Arménia am -Armênia am -ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am -Arumeniya am -Arménsko am -Armenija am -Јерменија am -Jermenija am -Armenien am -ஆரà¯à®®à¯‡à®©à®¿à®¯à®¾ am -ÐрманиÑтон am -อาร์เมเนีย am -Ermenistan am -Ärmänstan am -Ð’Ñ–Ñ€Ð¼ÐµÐ½Ñ–Ñ am -ÐрманиÑтон am -Ã…rmeneye am -亚美尼亚 am -亞美尼亞 am -Netherlands Antilles an -Nederlandse Antilles an -أنتيل هولندا an -ÐідÑрлÑндÑÐºÑ–Ñ Ðнтылы an -ХоландÑки Ðнтили an -নেদারলà§à¦¯à¦¾à¦£à§à¦¡à¦¸ অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦²à§‡à¦¸ an -Antilh an Izelvroioù an -Nizozemski Antili an -Antilles del Països Baixos an -Nizozemské Antily an -Ynysoedd Iseldiraidd Y Carib? an -Nederlandske antiller an -Niederländische Antillen an -Ολλανδικές Αντίλλες an -Nederlandaj Antiloj an -Antillas holandesas an -Hollandi Antillid an -Antilla Holandarrak an -آنتیلس هلند an -Alankomaiden Antillit an -Antilles néerlandaises an -Nederlânske Antillen an -Aintillí na hÃsiltíre an -Antillas Holandesas an -नीदरलैंड à¤à¤¨à¥à¤Ÿà¥€à¤²à¥€à¤¸ an -Nizozemski Antili an -Holland-Antillák an -Hollensku Antillur an -Antille Olandesi an -オランダ領アンãƒãƒ« an -អង់ទីយáŸâ€‹áž áž¼áž›áŸ’លង់ an -네ëœëž€ë“œë ¹ 안틸레스 an -ເນເທີà»àº¥àº™ an -Nyderlandų Antilai an -NÄ«derlandes Antiļas an -ХоландÑки Ðнтили an -Ðедерландын ÐнтиллÑÑ an -De nederlandske Antillene an -Nedderlandsche Antillen an -Nederlandse Antillen an -Dei nederlandske Antillane an -ਨੀਂਦਰਲੈਂਡ à¨à¨‚ਟੀਲੀਸ an -Antyle Holenderskie an -Antilhas Holandês an -Antilhas Holandesas an -Antilele Olandeze an -ÐидерландÑкие ÐнтильÑкие оÑтрова an -Antiye z'Ubuholande an -HollándalaÅ¡ Antillat an -Holandské Antily an -Nizozemski Antili an -ХоландÑки антили an -Holandski antili an -Nederländska Antillerna an -நெதரà¯à®²à®¾à®¨à¯à®¤à¯ அனà¯à®Ÿà®¿à®²à¯à®¸à¯ an -ÐнтилиÑи Ҳолланд an -เนเธอร์à¹à¸¥à¸™à¸”์ à¹à¸­à¸™à¸—ิลีส an -Hollanda Antilleri an -Niderland Antilläre an -ÐнтільÑькі оÑтрови (Ðідерланди) an -Ðидерландлар Ðнтил Ороллари an -Hà Lan Antilles an -Antiyes Neyerlandesses an -è·å±žå®‰çš„列斯群岛 an -è·å±¬å®‰åœ°åˆ—斯群島 an -Angola ao -أنغولا ao -Ðнгола ao -Ðнгола ao -অà§à¦¯à¦¾à¦™à§à¦—োলা ao -Ανγκόλα ao -Angolo ao -آنگولا ao -Angóla ao -×נגולה ao -अंगोला ao -Angóla ao -アンゴラ ao -អង់ហ្គោឡា ao -ì•™ê³¨ë¼ ao -ບັນà»àºà»€àº¥àºµàº ao -Ðнгола ao -Ðнгол ao -ਅੰਗੋਲਾ ao -Ðнгола ao -Ðнгола ao -ஆஙà¯à®•ோலா ao -Ðнгуло ao -à¹à¸­à¸‡à¹‚à¸à¸¥à¸² ao -Ðнгола ao -Ðнгола ao -安哥拉 ao -安哥拉 ao -Argentina ar -Argentinië ar -الأرجنتين ar -Ðргентына ar -Ðржентина ar -আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ ar -Arc'hantina ar -Ariannin ar -Argentinien ar -ΑÏγεντινή ar -Argentino ar -آرژانتین ar -Agentiina ar -Argentine ar -Argentinië ar -An Airgintín ar -Arxentina ar -×רגנטינה ar -अरà¥à¤œà¥‡à¤‚टीना ar -Argentína ar -Argentína ar -アルゼンãƒãƒ³ ar -អាហ្សង់ទីន ar -아르헨티나 ar -ອາເຈນຕິນາ ar -ArgentÄ«na ar -Ðргентина ar -Ðргентин ar -ArÄ¡entina ar -Argentinien ar -Argentinië ar -ਅਰਜ਼ਨਟੀਨਾ ar -Argentyna ar -Ðргентина ar -Arijantina ar -Argentína ar -Ðргентина ar -I-Argentina ar -ஆரà¯à®šà¯†à®©à¯à®Ÿà®¿à®©à®¾ ar -Оржонтина ar -อาร์เจนตินา ar -Arjantin ar -Ðргентина ar -Ðргентина ar -Agenthina ar -Ã…rdjintene ar -阿根廷 ar -阿根廷 ar -American Samoa as -Amerikanse Samoa as -ساموا الأمريكية as -ÐмÑрыканÑкае Самоа as -ÐмериканÑки Самоа as -মারà§à¦•িন সামোয়া as -Samoa amerikanek as -AmeriÄka Samoa as -Samoa Americana as -Americká Samoa as -Samoa Americanaidd as -Samoa (USA) as -Amerikanisches Samoa as -ΑμεÏικανική Σαμόα as -Amerika Samoo as -Samoa americana as -Ameerika Samoa as -Amerikar Samoa as -ساموای آمریکا as -Amerikan Samoa as -Samoa américaines as -Amerikaansk Samoa as -Samó Meiriceánach as -Samoa Americana as -סמו××” ×”×מריקנית as -अमेरिकी सामोआ as -AmeriÄka Samoa as -Amerikai Szamoa as -Bandaríska Samóa as -Samoa Americane as -アメリカンサモア as -សាមូអា អាមáŸážšáž·áž€ as -미국령 사모아 as -ອາເມລິàºàº²à»€àº«àº™àº·àº­ as -Amerikos Samoa as -Amerikas Samoa as -ÐмериканÑка Самоа as -Ðмерик, Самоа as -Samoa Amerikana as -Amerikansk Samoa as -Amerikaansch Samoa as -Amerikaans Samoa as -Amerikansk Samoa as -ਅਮਰੀਕੀ ਸਾਮੋਆ as -Samoa AmerykaÅ„skie as -Samoa Americana as -Samoa Americana as -Samoa americană as -ÐмериканÑкое Самоа as -Samowa Nyamerika as -AmerihkálaÅ¡ Samoa as -Americká Samoa as -AmeriÅ¡ka Samoa as -Ðмеричка Самоа as -AmeriÄka Samoa as -Amerikanska Samoa as -அமெரிகà¯à®•ா சமோயா as -Самоаи Ðмрикоӣ as -อเมริà¸à¸±à¸™ ซามัว as -Amerika Samoası as -Amerikalı Samoa as -ÐмериканÑьке Самоа as -Ðмерика СамоаÑи as -Samowa Amerikinne as -ç¾Žå±žè¨æ‘©äºš as -美屬薩摩亞 as -Austria at -Oostenryk at -النمسا at -Avstriya at -ÐÑžÑÑ‚Ñ€Ñ‹Ñ at -ÐвÑÑ‚Ñ€Ð¸Ñ at -অসà§à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ at -Aostria at -Austrija at -Àustria at -Rakousko at -Awstria at -Østrig at -Österreich at -ΑυστÏία at -AÅ­strio at -اتریش at -Itävalta at -Eysturríki at -Autriche at -Eastenryk at -An Ostair at -×וסטריה at -आसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾ at -Austrija at -Ausztria at -Austurríki at -オーストリア at -អូទ្រីស at -오스트리아 at -ອອດສະເຕເລີຠat -Austrija at -Austrija at -ÐвÑтрија at -ÐвÑтри at -Awtrija at -Østerrike at -Österriek at -Oostenrijk at -Austerrike at -ਆਸਟਰੀਆ at -Ãustria at -Ãustria at -ÐвÑÑ‚Ñ€Ð¸Ñ at -Ositiriya at -Nuortariika at -Rakúsko at -Avstrija at -ÐуÑтрија at -Austrija at -I-Austria at -Österrike at -ஆஸà¯à®¤à¯à®¤à®¿à®°à®¿à®¯à®¾ at -ÐвÑÑ‚Ñ€Ð¸Ñ at -ออสเตรีย at -Avusturya at -ÐвÑÑ‚Ñ€Ñ–Ñ at -ÐвÑÑ‚Ñ€Ð¸Ñ at -Ositiria at -Ão at -Otriche at -奥地利 at -奧地利 at -Australia au -Australië au -أستراليا au -Avustralya au -ÐÑžÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au -ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au -অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à§Ÿà¦¾ au -Aostralia au -Australija au -Austràlia au -Austrálie au -Awstralia au -Australien au -Australien au -ΑυστÏαλία au -AÅ­stralio au -Austraalia au -استرالیا au -Australie au -Australië au -An Astráil au -Austrália au -×וסטרליה au -आसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾ au -Australija au -Ausztrália au -Ãstralía au -オーストラリア au -អូស្ážáŸ’រាលី au -오스트레ì¼ë¦¬ì•„ au -ອອດສະເຕເລີຠau -Australija au -AustrÄlija au -ÐвÑтралија au -ÐвÑтрали au -Awstralja au -Australien au -Australië au -ਅਸਟਰੇਲੀਆ au -Austrália au -Austrália au -ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au -Ositaraliya au -Austrália au -Austrália au -Avstralija au -ÐуÑтралија au -Australija au -I-Australia au -Australien au -ஆஸà¯à®¤à¯à®¤à®¿à®°à¯‡à®²à®¿à®¯à®¾ au -ОÑтролиё au -ออสเตรเลีย au -Avusturalya au -ÐвÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au -ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au -Ositiralia au -Úc au -Ostraleye au -澳大利亚 au -澳大利亞 au -Aruba aw -أروبا aw -Ðруба aw -আরà§à¦¬à¦¾ aw -Arwba aw -ΑÏοÏμπα aw -Arubo aw -آروبا aw -×רובה aw -अरूबा aw -Arúba aw -オランダ自治領アルムaw -អារូបា aw -아루바 aw -ເàºàº¡à»„ັພ່ aw -Ðруба aw -Ðрува aw -ਅਰੂਬੀ aw -Ðруба aw -Ãruba aw -Ðруба aw -à®…à®°à¯à®ªà®¾ aw -Ðрубо aw -อรูบา aw -Ðруба aw -Ðруба aw -Arouba aw -阿é²å·´ aw -阿魯巴 aw -Ã…land Islands ax -Ã…land Eilande ax -ОÑтрови Ðланд ax -Illes Ã…land ax -Ã…landské ostrovy ax -Ã…land-øerne ax -Aland ax -Îησιά Ã…land ax -Islas Aland ax -Ahvenamaa ax -Ã…land irlak ax -Ahvenanmaan saaret ax -ÃŽles Ã…land ax -Ã…land-eilannen ax -Na hOileáin Ã…land ax -Illas Ã…land ax -Ã…land-szigetek ax -Ãlandseyjar ax -Isole Ã…land ax -オーランド諸島 ax -កោះ Ã…land ax -Ã…land salos ax -ОÑтрови Оланд ax -Ã…land-øyene ax -Ã…land-Inseln ax -Ã…land-eilanden ax -Ã…land-øyane ax -ਅਮਾਨ ਟਾਪੂ ax -Wyspy Ã…land ax -Ilhas Ã…land ax -Ilhas Ã…land ax -ÐландÑкие оÑтрова ax -Ibirwa by'Ã…land ax -Ã…land sullot ax -Ã…landski otoki ax -ÐландÑка оÑтрва ax -Alandska ostrva ax -Ã…land ax -หมู่เà¸à¸²à¸°à¸­à¸²à¸¥à¸±à¸™à¸”์ ax -Cayman Adaları ax -Aland Utrawları ax -ÐландÑькі оÑтрови ax -Ðланд Ороллари ax -阿兰群岛 ax -奧蘭群島 ax -Azerbaijan az -أذربيجان az -AzÉ™rbaycan az -ÐзÑрбайджан az -Ðзербайджан az -আজেরবাইজান az -Azerbeidjan az -Azerbejdžan az -Azerbaitjan az -Ãzerbajdžánský az -Aserbaijan az -Azerbajdjan az -Aserbaidschan az -ΑζεÏμπαϊτζάν az -AzerbajÄano az -Azerbaiján az -Aserbaidžaan az -آذربایجان az -Azerbaidäani az -Aserbadsjan az -Azerbeidjan az -An Asarbaiseáin az -×זרביג'ן az -अजरबैजान az -Azerbejdžan az -Azerbajdzsán az -Aserbaídsjan az -Azerbaigian az -アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³ az -អាហ្ស៊ែរបែហ្សង់ az -아제르바ì´ìž” az -ອາເຊີໄບຈັນ az -Azerbaidžanas az -AzerbaidžÄna az -Ðзербејџан az -Ðзарбайжан az -AżerbajÄ¡an az -Aserbajdsjan az -Aserbaidschan az -Azerbeidjan az -Aserbajdsjan az -ਅਜ਼ਰਬਾਈਜਾਨ az -Azerbejdżan az -Azerbaijão az -Azerbaijão az -Ðзербайджан az -Azeribayijani az -Aserbaižan az -Ãzerbajdžánsky az -Azerbajdžan az -Ðзербејџан az -Azerbejdžan az -I-Azerbaijan az -அசரà¯à®ªà¯ˆà®šà®¾à®©à¯ az -Озарбойҷон az -อาร์เซอร์ไบจัน az -Azerice az -Äzärbaycan az -Ðзербайджан az -Озарбайжон az -Azerbaydjan az -阿塞拜疆 az -亞塞拜然 az -Bosnia and Herzegovina ba -Bosnië en Herzegovina ba -البوسنا Ùˆ الهرسك ba -БоÑÑŒÐ½Ñ–Ñ Ñ– Герцагавіна ba -БоÑна и Херцеговина ba -বসনিয়া à¦à¦¬à¦‚ হারজিগোভিনা ba -Bosni hag Herzigovi ba -Bosna i Hercegovina ba -Bòsnia i Hercegovina ba -Bosna a Herzegovina ba -Bosnia a Hertsegofina ba -Bosnien-Herzegovina ba -Bosnien und Herzegowina ba -Βοσνία και ΕÏζεγοβίνη ba -Bosnio kaj Hercegovino ba -Bosnia y Herzegovina ba -Bosnia ja Hertsegovina ba -Bosnia eta Herzegovina ba -بوسنی Ùˆ هرزگوین ba -Bosnia ja Herzegovina ba -Bosnia-Herzegovina ba -Bosnie herzégovine ba -Bosnië en Herzegovina ba -An Bhoisnia agus Heirseagóivéin ba -Bosnia e Herzegovina ba -בוסניה הרצגובינה ba -बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¥‡à¤—ोविना ba -Bosna i Hercegovina ba -Bosznia-Hercegovina ba -Bosnía og Hersegóvína ba -Bosnia e Erzegovina ba -ボスニアヘルツェゴビナ ba -បូស្ន៊ី និង​ហឺហ្ស៊áŸáž áŸ’គោវីណា ba -보스니아어와 헤르체고비나 ba -ບອສເນີຠà»àº¥àº° ເຫີເຊີໂàºàº§àº´àº™àº² ba -Bosnija ir Hercegovina ba -Bosnija un Hercogovina ba -БоÑна и Херцеговина ba -БоÑни ба Херцеговина ba -Bożnia u Ħerżegovina ba -Bosnia-Hercegovina ba -Bosnien-Herzegowina ba -Bosnië en Herzegovina ba -Bosnia-Hercegovina ba -Bosnia le Herzegovina ba -ਬੋਸਨੀਆ ਤੇ ਹਰਜ਼ੀਗੋਵਿਨਾ ba -BoÅ›nia i Hercegowina ba -Bósnia e Herzegovina ba -Bósnia Herzegovina ba -Bosnia ÅŸi HerÅ£egovina ba -БоÑÐ½Ð¸Ñ Ð¸ Герцеговина ba -Bosiniya na Herizegovina ba -Bosnia ja Hercegovina ba -Bosna a Hercegovina ba -Bosna in Hercegovina ba -БоÑна и Херцеговина ba -Bosna i Hercegovina ba -I-Bosnia kanye ne Herzegovina ba -Bosnien och Herzegovina ba -பொசà¯à®©à®¿à®¯à®¾ மறà¯à®±à¯à®®à¯ ஹரà¯à®œà®¿à®•ோவினா ba -БоÑÐ½Ð¸Ñ Ð²Ð° ГерÑогавина ba -บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸´à¸™à¸² ba -Bosna Hersek ba -Bosnia wä Herzegovina ba -БоÑÐ½Ñ–Ñ Ñ– Герцеговина ba -БоÑÐ½Ð¸Ñ Ð²Ð° Герцоговина ba -Mubosinia na Muhezegovina ba -Bosnia và Herzegovina ba -Bosneye ba -Bosnia ne Herzegovina ba -波斯尼亚和黑塞哥维那 ba -æ³¢å£«å°¼äºžèˆ‡èµ«å¡žå“¥ç¶­ç´ ba -Bosnia kanye ne-Herzegovina ba -Barbados bb -بربادوس bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Ð‘Ð°Ñ€Ð±ÐµÐ¹Ð´Ð¾Ñ bb -বারবাডোস bb -ΜπαÏμπάντος bb -Barbado bb -باربادوس bb -Barbade bb -Barbadós bb -ברבדוס bb -बारबाडोस bb -ãƒãƒ«ãƒãƒ‰ã‚¹ bb -បារបាដូស bb -바르바ë„스 bb -ບາລບາດອດສ bb -Barbadosas bb -Barbadosa bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Ð‘Ð°Ñ€Ð±Ð¾Ð´Ð°Ñ bb -ਬਾਰਬਾਡੋਸ bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Barubadosi bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -I-Barbados bb -பாரà¯à®ªà¯‡à®Ÿà®¾à®šà¯ bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -บาร์บาดอส bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb -BÃ¥rbades bb -巴巴多斯 bb -å·´è²å¤š bb -Bangladesh bd -بنغلاديش bd -BanqladeÅŸ bd -БанглÑдÑш bd -Бангладеш bd -বাংলাদেশ bd -Bangladaech bd -BangladeÅ¡ bd -Bangladéš bd -Bangladesch bd -Μπαγκλαντές bd -BangladeÅo bd -بنگلادش bd -An Bhanglaidéis bd -בנגלדש bd -बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶ bd -BangladeÅ¡ bd -Banglades bd -Bangladess bd -ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥ bd -បង់ក្លាដáŸážŸáŸ’áž  bd -방글ë¼ë°ì‹œ bd -ບັງຄະລາເທດ bd -BangladeÅ¡as bd -BangladeÅ¡a bd -Бангладеш bd -Бангладеш bd -Bangladexx bd -Bangladesch bd -ਬੰਗਲਾਦੇਸ਼ bd -Bangladesz bd -BangladeÅŸ bd -Бангладеш bd -Bangaladeshi bd -Bangladéš bd -BangladeÅ¡ bd -Бангладеш bd -BangladeÅ¡ bd -I-Bangladesh bd -பஙà¯à®•ளாதேச௠bd -Банглодеш bd -บังคลาเทศ bd -BangladeÅŸ bd -BangladeÅŸ bd -Бангладеш bd -Бангладеш bd -孟加拉国 bd -孟加拉 bd -Belgium be -België be -بلجيكا be -Belçika be -БÑÐ»ÑŒÐ³Ñ–Ñ be -Ð‘ÐµÐ»Ð³Ð¸Ñ be -বেলজিয়াম be -Belgia be -Belgija be -Bèlgica be -Belgie be -Gwlad Belg be -Belgien be -Belgien be -Βέλγιο be -Belgio be -Bélgica be -Belgia be -Belgika be -بلژیک be -Belgia be -Belgia be -Belgique be -België be -An Bheilg be -Bélxica be -בלגיה be -बेलà¥à¤œà¤¿à¤¯à¤® be -Belgija be -Belgia be -Belgía be -Belgio be -ベルギー be -បែលហ្ស៊ិក be -ë²¨ê¸°ì— be -ເບລຢ່ງມ be -Belgija be -Beļģija be -Белгија be -Белги be -BelÄ¡ju be -Belgia be -Belgien be -België be -Belgia be -Bèlgica be -ਬੈਲਜੀਅਮ be -Belgia be -Bélgica be -Bélgica be -Belgia be -Ð‘ÐµÐ»ÑŒÐ³Ð¸Ñ be -Ububiligi be -Belgia be -Belgicko be -Belgija be -Белгија be -Belgija be -I-Belgium be -Belgien be -பெலà¯à®šà®¿à®¯à®®à¯ be -Ð‘ÐµÐ»Ð³Ð¸Ñ be -เบลเยียม be -Belçika be -Belgia be -Ð‘ÐµÐ»ÑŒÐ³Ñ–Ñ be -Ð‘ÐµÐ»Ð³Ð¸Ñ be -Bỉ be -Beldjike be -比利时 be -比利時 be -Burkina Faso bf -بوركينا ÙØ§Ø³Ùˆ bf -Буркіна ФаÑо bf -Буркина ФаÑо bf -বারকিনা ফাসো bf -Bwrcina Ffaso bf -ΜπουÏκίνα Φάσο bf -Burkino bf -Ø¨ÙˆØ±Ú©ÛŒÙ†Ø§ÙØ§Ø³Ùˆ bf -Buircíne Fasó bf -בורניקה פ×סו bf -बà¥à¤°à¥à¤•िना फासो bf -Burkina faso bf -Búrkína Fasó bf -ブルキナファソ bf -ប៊ូរគីណាហ្វាសូ bf -부르키나 파소 bf -ຕຸລະàºàºµ bf -Буркина ФаÑо bf -Буркина ФаÑо bf -ਬà©à¨°à¨•ਿਨਾ ਫਾਸੋ bf -Буркина-ФаÑо bf -Burukina Faso bf -Буркина ФаÑо bf -பரà¯à®•ினா ஃபசோ bf -Буркина ФаÑу bf -เบอร์à¸à¸´à¸™à¸²à¸Ÿà¸²à¹‚ซ bf -Буркіна-ФаÑо bf -Буркина-ФаÑÑо bf -Bourkina Fasso bf -布基纳法索 bf -布å‰ç´æ³•ç´¢ bf -Bulgaria bg -Bulgarye bg -بلغاريا bg -Bolgarıstan bg -Ð‘Ð°ÑžÐ³Ð°Ñ€Ñ‹Ñ bg -Ð‘ÑŠÐ»Ð³Ð°Ñ€Ð¸Ñ bg -বà§à¦²à¦—েরিয়া bg -Bulgari bg -Bugarska bg -Bulgària bg -Bulharsko bg -Bwlgaria bg -Bulgarien bg -Bulgarien bg -ΒουλγαÏία bg -Bulgario bg -Bulgaaria bg -بلغارستان bg -Bulgarie bg -Bulgarije bg -An Bhulgáir bg -Bulgária bg -בולגריה bg -बà¥à¤²à¥à¤—ारिया bg -Bugarska bg -Bulgária bg -Búlgaría bg -ブルガリア bg -ប៊ុលហ្ការី bg -불가리아 bg -ບັນà»àºà»€àº¥àºµàº bg -Bulgarija bg -BulgÄrija bg -Бугарија bg -Болгари bg -Bulgarija bg -Bulgarien bg -Bulgarije bg -ਬà©à¨²à¨—ਾਰੀਆ bg -BuÅ‚garia bg -Bulgária bg -Bulgária bg -Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg -Buligariya bg -Bulgária bg -Bulharsko bg -Bolgarija bg -БугарÑка bg -Bugarska bg -I-Bulgaria bg -Bulgarien bg -பலà¯à®•ேரியா bg -БулғориÑтон bg -บัลà¹à¸à¹€à¸£à¸µà¸¢ bg -Bulgaristan bg -Ð‘Ð¾Ð»Ð³Ð°Ñ€Ñ–Ñ bg -Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg -Baligaria bg -BulgÃ¥reye bg -ä¿åŠ åˆ©äºš bg -ä¿åŠ åˆ©äºž bg -Bahrain bh -البحرين bh -БахрÑйн bh -Бахрейн bh -বাহরেন bh -Barein bh -Bahrein bh -Bahrajn bh -ΜπαχÏέιν bh -Barejno bh -Bahrein bh -Bahrein bh -بحرین bh -Baghrein bh -Bairéin bh -Barein bh -בחריין bh -बहारीन bh -Barein bh -ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³ bh -បារ៉ែន bh -ë°”ë ˆì¸ bh -ຖັàºàºà»ˆàº‡àº§ bh -Bahreinas bh -Bahreina bh -Бахреин bh -Бахрайн bh -Baħrain bh -Baghrein bh -ਬਹਿਰੀਨ bh -Bahrajn bh -Bahrein bh -Бахрейн bh -Bahirayini bh -Bahrajn bh -Bahrajn bh -Бахреин bh -Bahrein bh -I-Bahrain bh -Bahrein bh -பஹà¯à®°à¯ˆà®©à¯ bh -Баҳрайн bh -บาห์เรียน bh -Bahreyn bh -Bahreyn bh -Бахрейн bh -Баҳрайн bh -Bareyn bh -å·´æž— bh -å·´æž— bh -Burundi bi -بوروندي bi -Бурундзі bi -Бурунди bi -বà§à¦°à§à¦¨à§à¦¡à¦¿ bi -Bwrwndi bi -ΜπουÏουντί bi -Burundo bi -بروندی bi -An Bhurúin bi -בורונדי bi -बà¥à¤°à¥‚ंडी bi -Búrúndí bi -ブルンジ bi -ប៊ូរុនឌី bi -부룬디 bi -ເຄອຣດ bi -Burundija bi -Бурунди bi -Бурунди bi -ਬà©à¨°à©à¨¨à¨¡à©€ bi -Бурунди bi -Бурунди bi -பà¯à®°à¯à®©à¯à®Ÿà®¿ bi -Бурундӣ bi -บูรันดิ bi -Бурунді bi -Бурунди bi -Bouroundi bi -布隆迪 bi -浦隆地 bi -Benin bj -Denin bj -بينين bj -БÑнін bj -Бенин bj -বেনিন bj -Μπενίν bj -Benino bj -بنین bj -Bénin bj -Beinin bj -בנין bj -बेनिन bj -Benín bj -ベナン bj -áž”áŸážŽáž¶áŸ†áž„ bj -베냉 bj -ບອສເນີຠbj -Benina bj -Бенин bj -Бенин bj -ਬੀਨਿਨ bj -Benim bj -Бенин bj -Bene bj -Бенин bj -பெனின௠bj -Бенини bj -เบนิน bj -Бенін bj -Бенин bj -è´å® bj -è²å— bj -Bermuda bm -برمودا bm -БÑрмуды bm -Бермуда bm -বারà§à¦®à§à¦¡à¦¾ bm -Bermud bm -Bermudy bm -Bermwda bm -Bermudas bm -ΒεÏμοÏδες bm -Bermudoj bm -برمودا bm -Bermudes bm -Beirmiúda bm -ברמודה bm -बरमूडा bm -Bermúdaeyjar bm -英領ãƒãƒ¼ãƒŸãƒ¥ãƒ¼ãƒ€ bm -ប៊áŸážšáž˜áž¼ážŠáž¶ bm -버뮤다 bm -ເàºàº¥àº¥àº°àº¡àº±àº™ bm -Bermudų bm -Bermudas bm -Бермуди bm -Бермуда bm -ਬੀਰਮà©à¨¡à¨¾ bm -Bermudy bm -Bermude bm -БермудÑкие ОÑтрова bm -Berimuda bm -Bermudy bm -Bermudi bm -Бермуда bm -பெரà¯à®®à¯à®Ÿà®¾ bm -Бермудо bm -เบอร์มิวดา bm -Бермуди bm -Бермуда Ороллари bm -Bermudes bm -百慕大 bm -ç™¾æ…•é” bm -Brunei Darussalam bn -بروناي دار السلام bn -БрунÑй bn -Бруней bn -বà§à¦°à§à¦¨à§‡à¦‡ দারà¦à¦¸à¦¸à¦²à¦¾à¦® bn -Darussalam Brunei bn -Brunej bn -Brwnei Darwsalam bn -Brunei bn -ΜπÏουνέι ÎταÏουσαλάμ bn -Brunejo bn -Brunei bn -برونویی بیت‌المقدس bn -Brunei bn -Brúiné bn -בורניי ×“×¨×•×¡×œ× bn -बà¥à¤°à¥‚नेई दारेसà¥à¤¸à¤²à¤¾à¤® bn -Brunei Szultánság bn -Brúnei Darussalam bn -Brunei bn -ブルãƒã‚¤ bn -ប្រ៊ុយណ០bn -ë¸Œë£¨ë‚˜ì´ bn -ເບລາລັສເຊີຠbn -Bruneja Darusalama bn -Брунеи Дар ÐµÑ Ð¡Ð°Ð»Ð°Ð¼ bn -Бруней ДаруÑÑалам bn -Brunei bn -Brunei bn -Brunei bn -ਬਰੂਨੀ ਡਾਰੂਸਲਾਮ bn -Brunei Dar-es-Salam bn -Brunei bn -Бруней bn -Buruneyi Darusalamu bn -Brunei bn -Brunei Darusalam bn -Брунеј ДаруÑалам bn -Brunej Darusalam bn -பà¯à®°à¯‚னை டரà¯à®šà®²à®¾à®®à¯ bn -Брунеи Ð‘Ð°Ð¹Ñ‚ÑƒÐ»Ð¼ÑƒÒ›Ð°Ð´Ð´Ð°Ñ bn -บรูไนดูรัสซาลาม bn -Brunei bn -Бруней ДаруÑÑалам bn -Бруней ДоруÑÑалом bn -Bruney Darussalam bn -文莱达é²è¨å…° bn -æ–‡èŠé”魯薩蘭 bn -Bolivia bo -Bolivië bo -بوليÙيا bo -Boliviya bo -Ð‘Ð°Ð»Ñ–Ð²Ñ–Ñ bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -বলিভিয়া bo -Bolivija bo -Bolívia bo -Bolívie bo -Bolifia bo -Bolivien bo -Βολιβία bo -Bolivio bo -Boliivia bo -بولیوی bo -Bolivie bo -An Bholaiv bo -Bolívia bo -בוליביה bo -बोलिविया bo -Bolivija bo -Bolívia bo -Bólivía bo -ボリビア bo -បូលីវី bo -볼리비아 bo -ໂບລີເວີຠbo -Bolivija bo -BolÄ«vija bo -Боливија bo -Боливи bo -Bolivja bo -Bolivien bo -ਬੋਲਵੀਆ bo -Boliwia bo -Bolívia bo -Bolívia bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -Boliviya bo -Bolívia bo -Bolivija bo -Боливија bo -Bolivija bo -I-Bolivia bo -பொலிவியா bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -โบลิเวีย bo -Bolivya bo -Ð‘Ð¾Ð»Ñ–Ð²Ñ–Ñ bo -Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo -Boliveye bo -玻利维亚 bo -玻利維亞 bo -Brazil br -Brazilië br -البرازيل br -Braziliya br -Ð‘Ñ€Ð°Ð·Ñ‹Ð»Ñ–Ñ br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br -বà§à¦°à¦¾à¦œà¦¿à¦² br -Brasil br -Brazílie br -Brasil br -Brasilien br -Brasilien br -Î’Ïαζιλία br -Brazilo br -Brasil br -Brasiilia br -Brasil br -برزیل br -Brasilia br -Brésil br -Brazilië br -An Bhrasaíl br -Brasil br -ברזיל br -बà¥à¤°à¤¾à¤œà¥€à¤² br -Brazília br -Brasilía br -Brasile br -ブラジル br -ប្រáŸáž áŸ’ស៊ីល br -브ë¼ì§ˆ br -ບາຊີລ br -Brazilija br -BrazÄ«lija br -Бразил br -Бразил br -Brażil br -Brasil br -Brasilien br -Brazilië br -Brasil br -Brasil br -ਬਰਾਜ਼ੀਲ br -Brazylia br -Brasil br -Brasil br -Brazilia br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br -Burezile br -Brasil br -Brazília br -Brazilija br -Бразил br -I-Brazil br -Brasilien br -பிரேசில௠br -Бразил br -บราซิล br -Brezilya br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ñ–Ñ br -Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br -Burazili br -Braezi br -巴西 br -巴西 br -Bahamas bs -جزر الباهاما bs -Багамы bs -БахамÑки оÑтрови bs -বাহামাস bs -Bahami bs -Bahames bs -Bahamy bs -Ynysoedd Bahama bs -Μπαχάμες bs -Bahamoj bs -Bahama bs -باهاماس bs -Bahaman saaret bs -Na Bahámaí bs -Baamas bs -בהמס bs -बहामा bs -Bahamák bs -Bahamaeyjar bs -ãƒãƒãƒž bs -បាហាម៉ា bs -바하마 bs -ປານາມາ bs -Bahamų bs -Бахами bs -Ð‘Ð°Ñ…Ð°Ð¼Ð°Ñ bs -Baħamas bs -ਬਾਹਾਮਾਸ bs -Bahamy bs -БагамÑкие оÑтрова bs -Bahamasi bs -Bahamy bs -Bahami bs -Бахами bs -Bahami bs -பனாமா bs -Ð‘Ð¾Ò³Ð¾Ð¼Ð¾Ñ bs -บาฮามา bs -Bahamalar bs -Багами bs -Багама Ороллари bs -巴哈马 bs -巴拿馬 bs -Bhutan bt -بوتان bt -Бутан bt -Бутан bt -ভূটান bt -Butañ bt -Butan bt -Bhútán bt -Bhwtan bt -Μπουτάν bt -Butano bt -Bhután bt -بوتان bt -Bhoutan bt -An Bhútáin bt -Bután bt -בהוטן bt -भूटान bt -Bhután bt -Bútan bt -ブータン bt -ប៊ូážáž¶áž“ bt -부탄 bt -ຖັàºàºà»ˆàº‡àº§ bt -Bhutano bt -ButÄna bt -Бутан bt -Бутан bt -Butan bt -ਭà©à¨Ÿà¨¾à¨¨ bt -Butão bt -Butão bt -Butan bt -Бутан bt -Butani bt -Butan bt -Бутан bt -Butan bt -பூடான௠bt -Бутон bt -ภูà¸à¸²à¸™ bt -Butan bt -Бутан bt -Бутан bt -Boutan bt -ä¸ä¸¹ bt -ä¸ä¸¹ bt -Botswana bw -بوتسوانا bw -БатÑвана bw -БотÑуана bw -বটসওয়ানা bw -Bocvana bw -Μποτσουάνα bw -Bocvano bw -بوتسووانا bw -An Bhotsuáin bw -Botsuana bw -בוצ×ונה bw -बोतà¥à¤¸à¤µà¤¾à¤¨à¤¾ bw -Botsvana bw -Botsvana bw -ボツワナ bw -បុážážŸáŸ’វាណា bw -보츠와나 bw -ບອດສເນີຠbw -Botsvanos bw -BotsvÄna bw -Боцвана bw -БотÑвана bw -ਬੋਟਸਵਾਨਾ bw -Botsuana bw -БотÑвана bw -Botsvana bw -Боцвана bw -Bocvana bw -பாடà¯à®¸à¯à®µà®©à®¾ bw -БотÑвана bw -บอทสวานา bw -Botsvana bw -БотÑвана bw -Боцвана bw -Boswana bw -åšèŒ¨ç“¦çº³ bw -波札那 bw -Belarus by -روسيا البيضاء by -БеларуÑÑŒ by -Ð‘ÐµÐ»Ð°Ñ€ÑƒÑ by -বেলারà§à¦¸ by -Belarusi by -Bjelorusija by -Bielorússia by -BÄ›lorusko by -Belarws by -Hviderusland by -Weißrussland by -ΛευκοÏωσία by -Belorusio by -Valgevene by -بلاروس by -Valkovenäjä by -Hvítarusland by -Bélarus by -Wyt-Rusland by -An Bhealarúis by -Bielorúsia by -בלרוס by -बेलारूस by -Bjelorusija by -Fehéroroszország by -Hvíta-Rússland by -Bielorussia by -ベラルーシ by -áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស by -벨ë¼ë£¨ìФ by -ເບລາລັສ by -Baltarusija by -Baltkrievija by -БелоруÑија by -Цагаан Ð¾Ñ€Ð¾Ñ by -Hviterussland by -Wittrussland by -Wit-Rusland by -Kviterussland by -ਬੇਲਾਰੂਸ by -BiaÅ‚oruÅ› by -Bielorrússia by -БеларуÑÑŒ by -Belarusi by -Vilges-Ruošša by -Bielorusko by -Belorusija by -БелоруÑија by -Belorusija by -I-Belarus by -Vitryssland by -பெலாரூச௠by -БелоруÑиё by -เบลารุส by -БілоруÑÑ–Ñ by -Ð‘ÐµÐ»Ð¾Ñ€ÑƒÑ by -Belaruss by -白俄罗斯 by -白俄羅斯 by -Belize bz -بيليز bz -БÑлізе bz -Белийз bz -বেলিজ bz -Beliz bz -Bel?s bz -Μπελίζε bz -Belizo bz -بلیز bz -An Bheilís bz -בליז bz -बेलिज bz -Belís bz -ベリーズ bz -áž”áŸáž›áž¸áž áŸ’ស bz -벨리즈 bz -ເບລàºà»ˆàº‡àº¡ bz -Belizo bz -Beliza bz -Белизе bz -Ð‘ÐµÐ»Ð¸Ð·Ñ bz -Beliż bz -ਬੀਲੀਜ਼ਿ bz -Белиз bz -Белиз bz -Beliz bz -பெலà¯à®šà®¿à®¯à®®à¯ bz -Белиз bz -เบลไลซ์ bz -Beliz bz -Беліз bz -Белиз bz -伯利兹 bz -比利時 bz -Default C -Standaard C -Ø§ÙØªØ±Ø§Ø¶ÙŠ C -Ön QurÄŸulu C -Па ўмаўчаньні C -По подразбиране C -ডিফলà§à¦Ÿ C -Dre ziouer C -Omissió C -Výchozí C -Rhagosodedig C -Standard C -Standard C -ΠÏοκαθοÏισμένο C -Apriora C -Predeterminado C -Vaikimisi C -Lehenetsia C -Ù¾ÛŒØ´â€ŒÙØ±Ø¶ C -Oletus C -Forsettur C -Par défaut C -Standert C -Réamhshocrú C -Por Omisión C -ברירת מחדל C -डिफ़ॉलà¥à¤Ÿ C -UobiÄajeno C -Standard C -Alapértelmezett C -Standar C -Sjálfgefið C -Predefinito C -標準 C -លំនាំដើម C -기본 C -ຄ່າປະລິàºàº²àº C -Numatyta C -NoklusÄ“tais C -Почетно C -Стандарт C -Normali C -Standard C -Standard C -Standaard C -Standard C -Thuso ya Tshoganetso C -Omission C -ਮੂਲ C -DomyÅ›lnie C -Por Omissão C -Padrão C -Implicit C -По умолчанию C -Mburabuzi C -Standárda C -Å tandardný C -Privzeto C -Подразумевано C -Podrazumevano C -Förval C -à®®à¯à®©à¯à®©à®¿à®°à¯à®ªà¯à®ªà¯ C -Пешфарзӣ C -ค่าปริยาย C -Öntanımlı C -Ğädäti C -Типовий C -Ðндоза C -Mặc định C -Prémetou C -Okwendalo C -默认 C -é è¨­ C -Okwendalo C -Canada ca -Kanada ca -كندا ca -Kanada ca -Канада ca -Канада ca -কানাডা ca -Kanada ca -Kanada ca -Canadà ca -Kanada ca -Kanada ca -Καναδάς ca -Kanado ca -Canadá ca -Kanada ca -Kanada ca -کانادا ca -Kanada ca -Kanada ca -Kanada ca -Ceanada ca -Canadá ca -קנדה ca -कनाडा ca -Kanada ca -Kanada ca -Kanada ca -Kanada ca -カナダ ca -កាណាដា ca -ìºë‚˜ë‹¤ ca -à»àº„ນາດາ ca -Kanada ca -KanÄda ca -Канада ca -Канад ca -Kanada ca -Kanada ca -ਕੈਨੇਡਾ ca -Kanada ca -Canadá ca -Canadá ca -Канада ca -Kanada ca -Kanada ca -Kanada ca -Канада ca -Kanada ca -I-Canada ca -Kanada ca -கனடா ca -Канада ca -à¹à¸„นาดา ca -Kanada ca -Kanada ca -Канада ca -Канада ca -加拿大 ca -加拿大 ca -Cocos (Keeling) Islands cc -Kokos Eilande cc -جزر كوكوس (كيلينغ) cc -КокоÑови оÑтрови cc -কোকোস (কীলিং) দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ cc -Inizi Koko (Keeling) cc -Kokosovo (Keeling) ostrvo cc -Illes Cocos (Keeling) cc -Kokosové ostrovy (Keeling) cc -Ynysoedd y Cocos (Keeling) cc -Cocos/Keeling-Inseln cc -Îήσοι Κόκος (Κήλινγκ) cc -Kokosinsuloj cc -Islas Cocos (Keeling) cc -Kookossaared cc -Cocos Irlak cc -جزایر کوکوس کیلینگ cc -Cookinsaaret cc -ÃŽles Cocos cc -Oileán na gCócónna (Keeling) cc -Illas Cocos (Keeling) cc -××™×™ קוקוס cc -कोकोस (कीलिंग) आइलैंडà¥à¤¸ cc -Cocos (Keeling) Otoci cc -Kókusz-szigetek (Keeling) cc -Kókoseyjar cc -Isole Cocos (Keeling) cc -オーストラリア領ココス島 cc -កោះ Cocos (Keeling) cc -코코스 ì œë„ cc -Kokosu salas cc -ОÑтрови ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc -Cocos (Keeling) арлууд cc -Gżejjer Cocos (Keeling) cc -Kokosøyene cc -Cocos- (Keeling-) Inseln cc -Kokosøyane cc -ਕੋਕੋਸ(ਕਿਨਿੰਗ) ਟਾਪੂ cc -Wyspy Kokosowe (Keelinga) cc -Ilhas Cocos (Keeling) cc -Ilhas Cocos cc -Insulele Cocos (Keeling) cc -КокоÑовые (Килинг) оÑтрова cc -Ibirwa Kokosi cc -Kokosullut cc -Kokosove Ostrovy cc -Kokosovi (Keelingovi) otoki cc -КокоÑова (Килингова) оÑтрва cc -Kokosova (Kilingova) ostrva cc -Kokosöarna cc -கோகோஸ௠(கீலிஙà¯) தீவà¯à®•ள௠cc -Ҷазираи ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc -หมู่เà¸à¸²à¸°à¹‚คคอส (Keeling) cc -Keeling Adaları cc -Kokos (Keeling) Utrawları cc -КокоÑові оÑтрови cc -ÐšÐ¾ÐºÐ¾Ñ (Килинг) Ороллари cc -Iyes Cocos cc -科科斯群岛 cc -å¯å¯æ–¯ç¾¤å³¶ cc -Congo, The Democratic Republic of the cd -Kongo, Demokratiese republiek van die cd -ДÑÐ¼Ð°ÐºÑ€Ð°Ñ‚Ñ‹Ñ‡Ð½Ð°Ñ Ð ÑÑпубліка Конга cd -ДР Конго cd -কঙà§à¦—োর গণতানà§à¦¤à§à¦°à¦¿à¦• পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦° cd -Kongo, Demokratska republika cd -Congo, República Democràtica del cd -Kongo cd -Congo, Gweriniaeth Democrataidd y cd -Congo, den demokratiske republik cd -Kongo, Republik cd -Κονγκό, ΔημοκÏατία του cd -Kongo, la Demokratia Respubliko de la cd -Congo, República democrática del cd -Kongo (DV) cd -Kongoko Errepublika Demokratikoa cd -Kongon demokraattinen tasavalta cd -République Démocratique du Congo cd -Kongo, de democratische republyk van de cd -Poblacht Dhaonlathach an Chongó cd -Congo, República Democrática do cd -קונגו, הרפובליקה הדמוקרטית של cd -डेमोकà¥à¤°à¥‡à¤Ÿà¤¿à¤• रिपबà¥à¤²à¤¿à¤• ऑफ कॉगो cd -Kongói Demokratikus Köztársaság cd -Kongó, Austur cd -Congo, Repubblica Democratica del cd -コンゴ,民主共和国 cd -សាធារណរដ្ឋ​ប្រជាធិបážáŸáž™áŸ’យ​កុងហ្គោ cd -Kongo demokratinÄ— respublika cd -Kongo demokrÄtiskÄ republika cd -Конго, ДемократÑка Република на cd -Kongo (RD) cd -Kongo cd -Kongo (De demokraatsche Republiek) cd -Congo, Democratische republiek cd -Kongo cd -ਕਾਂਗੋ, ਲੋਕਤੰਤਰੀ ਗਣਰਾਜ cd -Republika Demokratyczna Kongo cd -Congo, República Democrática do cd -República Democrática do Congo cd -Congo, Republica Democrată cd -ДемократичеÑÐºÐ°Ñ Ð ÐµÑпублика Конго cd -Kongo, Repubulika Iharanira Demokarasi ya cd -Kongo cd -Demokratická Republika Kongo cd -Kongo, demokratiÄna republika cd -Конго, ДемократÑка Република cd -Kongo, Demokratska Republika cd -Demokratiska republiken Kongo cd -கானà¯à®•ோ, கà¯à®Ÿà®¿à®¯à®°à®šà¯ cd -Ҷумҳурии демократии Ҳонконг cd -สาธารณรัà¸à¸›à¸£à¸°à¸Šà¸²à¸˜à¸´à¸›à¹„ตยคองโภcd -Demokratik Kongo Cumhuriyeti cd -Kongo, Demokrat Cömhüriäte cd -Конго, демократична реÑпубліка cd -Конго Демократик РеÑпубликаÑи cd -Congo, republike democratike cd -刚果民主共和国 cd -剛果民主共和國 cd -Central African Republic cf -Sentrale Afrika Republiek cf -جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى cf -ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка cf -ЦÐР cf -মধà§à¦¯ আফà§à¦°à¦¿à¦•ান রিপাবলিক cf -Republik centrafricaine cf -CentralnoafriÄka Republika cf -República Centro Africana cf -StÅ™edoafrická republika cf -Gweriniaeth Canolig Affrica cf -Central-afrikanske Republik cf -Zentralafrikanische Republik cf -ΔημοκÏατία ΚεντÏικής ΑφÏικής cf -Mezafrika Respubliko cf -República Centroafricana cf -Kesk-Aafrika Vabariik cf -Afrika Erdiko Errepublika cf -جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی cf -Keski-Afrikan tasavalta cf -République centrafricaine cf -Sintraal Afrikaanse Republyk cf -Poblacht na hAfraice Láir cf -República Centro Africana cf -הרפובליקה ×”×פריקנית התיכונה cf -सेंटà¥à¤°à¤² अफà¥à¤°à¥€à¤•न रिपबà¥à¤²à¤¿à¤• cf -Centralna AfriÄka Republika cf -Közép-Afrikai Köztársaság cf -Mið-Afríkulýðveldið cf -Repubblica Centrafricana cf -中央アフリカ共和国 cf -សាធារណរដ្ឋ​អាហ្វ្រិក​កណ្ដាល cf -중앙 아프리카 공화국 cf -ໂດມິນິàºàº±àº™ cf -CentrinÄ—s Afrikos Respublika cf -CentrÄlÄfrikas republika cf -ЦентралноафриканÑка Република cf -Төв африкын ард ÑƒÐ»Ñ cf -Repubblika ÄŠentrali Afrikana cf -Den sentralafrikanske republikk cf -Zentraalafrikaansche Republiek cf -Centraal Afrikaanse Republiek cf -Den sentralafrikanske republikken cf -ਕੇਂਦਰੀ ਅਫਰੀਕੀ ਗਣਰਾਜ cf -Republika Åšrodkowej Afryki cf -República Central Africana cf -República da Ãfrica Central cf -Republica Centrafricană cf -Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика cf -Repubulika ya Santara Afurika cf -GuovddášafrihkálaÅ¡ republihkka cf -Stredoafrická Republika cf -CentralnoafriÅ¡ka republika cf -Централноафричка Република cf -CentralnoafriÄka Republika cf -Centralafrikanska Republiken cf -மைய ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®• கà¯à®Ÿà®¿à®¯à®°à®šà¯ cf -Ҷумҳурии Ðфриқои Марказӣ cf -สาธารณรัà¸à¸­à¸±à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡ cf -Orta Afrika Cumhuriyeti cf -Üzäk Afrika Cömhüriäte cf -Центральна африканÑька реÑпубліка cf -Марказий Ðфрика РеÑпубликаÑи cf -Cá»™ng hoà Trung Phi cf -Cintrafrike cf -中éžå…±å’Œå›½ cf -多明尼加共和國 cf -Congo cg -Konsole cg -الكونغو cg -Конга cg -Конго cg -কঙà§à¦—à§‹ cg -Kongo cg -Kongo cg -Kongo cg -Kongo cg -Κονγκό cg -Kongo (Brazavila) cg -Kongo cg -Kongo cg -Ú©Ù†Ú¯Ùˆ cg -Kongo cg -Kongo cg -Congó cg -קונגו cg -कोंगो cg -Kongo cg -Kongó cg -Kongó, Vestur cg -コンゴ cg -កុងហ្គោ cg -콩고 cg -ຄອນໂà»àºŠàº¥ cg -Kongo cg -Kongo cg -Конго cg -Конго cg -Kongo cg -Kongo-Brazaville cg -Kongo cg -Kongo-Brazaville cg -ਕਾਂਗੋ cg -Kongo cg -Конго cg -Kongo cg -Kongo cg -Kongo cg -Kongo cg -Конго cg -Kongo cg -Kongo cg -கானà¯à®•ோ cg -Конго cg -คองโภcg -Kongo cg -Kongo cg -Конго cg -Конго cg -刚果 cg -剛果 cg -Switzerland ch -Switserland ch -سويسرا ch -İsveçrÉ™ ch -ШвÑÐ¹Ñ†Ð°Ñ€Ñ‹Ñ ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch -সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦£à§à¦¡ ch -Suis ch -Å vicarska ch -Suïssa ch -Å výcarsko ch -Y Swistir ch -Schweiz ch -Schweiz ch -Ελβετία ch -Svislando ch -Suiza ch -Å veits ch -Suitza ch -سوییس ch -Sveitsi ch -Suisse ch -Switserlân ch -An Eilvéis ch -Suíza ch -שוייץ ch -सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤°à¤²à¥ˆà¤‚ड ch -Å vicarska ch -Svájc ch -Swiss ch -Sviss ch -Svizzera ch -スイス ch -ស្វ៊ីស ch -스위스 ch -ສະວິສເຊີà»àº¥àº™ ch -Å veicarija ch -Å veice ch -Швајцарија ch -Швецарь ch -Svizzera ch -Sveits ch -Swiez ch -Zwitserland ch -Sveits ch -Suissa ch -ਸਵਿਟਜ਼ਰਲੈਂਡ ch -Szwajcaria ch -Suíça ch -Suíça ch -ElveÅ£ia ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch -Swazilande ch -Å veica ch -Å vajÄiarsko ch -Å vica ch -ШвајцарÑка ch -Å vajcarska ch -I-Switzerland ch -Schweiz ch -சà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯ ch -Свитзерланд ch -สวิสเซอร์à¹à¸¥à¸™à¸”์ ch -İsviçre ch -İswiçrä ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ñ–Ñ ch -Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch -Thuỵ SÄ© ch -Swisse ch -瑞士 ch -瑞士 ch -Cote d'ivoire ci -ساحل العاج ci -Бераг Слановай КоÑьці ci -Кот Дивоар ci -Aod an Olifant ci -Obala SlonovaÄe ci -Costa d'ivori ci -PobÅ™eží slonoviny ci -Y Traeth Ifori ci -Elfenbenskysten ci -Ακτή Î•Î»ÎµÏ†Î±Î½Ï„Î¿ÏƒÏ„Î¿Ï ci -Eburio ci -Costa de Marfil ci -Cote d'Ivoire ci -Boli kosta ci -Ú©ÙØªÙ دیوÙیر ci -Côte d'Ivoire ci -Ivoorkust ci -An Cósta Eabhair ci -कोट डि'वॉरे ci -Baci kocke ci -Elefántcsontpart ci -Fílabeinsströndin ci -Costa d'Avorio ci -コートジボアール ci -កូដឌីវáŸážš ci -코트디부아르 ci -ປ່ອàºàº«àº¡àº²àºàºàº°àº¥àº­àº ci -KotdivuÄra ci -Брегот на Слоновата КоÑка ci -Kosta tal-Avorju ci -Elfenbenskysten ci -Elfenbeenküst ci -Ivoorkust ci -Elfenbeinskysten ci -ਕਾਂਟੋ ਡੀਵੋਇਰੀ ci -Wybrzeże KoÅ›ci SÅ‚oniowej ci -Costa do Marfim ci -Coasta de Azur ci -Кот Д'Ивуар ci -Kote divuware ci -ElfenÄalánriddu ci -SlonokoÅ¡Äena obala ci -Обала Ñлоноваче ci -Obala slonovaÄe ci -Elfenbenskusten ci -Соҳили Оҷ ci -อ่าวไอวอรี ci -Кот Д'Івуар ci -Кот д'Ивуар ci -Bá» biển ngà ci -Coisse d' Ivwere ci -科特迪瓦 ci -象牙海岸 ci -Cook islands ck -Cook Eilande ck -جزر كوك ck -ÐÑтравы Кука ck -ОÑтрови Кук ck -কà§à¦• দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ck -Inizi Kook ck -Kukova ostrva ck -Illes Cook ck -Cookovy ostrovy ck -Ynysoedd Cook ck -Cook-øerne ck -Cook-Inseln ck -Îησιά Κουκ ck -Kukinsuloj ck -Islas Cook ck -Cooki saared ck -Cook Irlak ck -جزایر Ú©ÙˆÚ© ck -Cooksaaret ck -ÃŽles Cook ck -Oileáin Chook ck -Illas Cook ck -××™×™ קוק ck -कà¥à¤• आइलैंड ck -Cook otoci ck -Cook-szigetek ck -Cooks-eyjar ck -Isole Cook ck -ニュージーランド自治領クック諸島 ck -កោះ Cook ck -ì¿¡ ì œë„ ck -ຄຸàºàºàºµà»‰ ck -Kuko salų ck -Kuka salas ck -Кукови оÑтрови ck -Cook арлууд ck -Gżejjer Cook ck -Cookøyene ck -Cookinseln ck -Cook Eilanden ck -Cookøyane ck -ਕà©à©±à¨• ਟਾਪੂ ck -Wyspy Cooka ck -Ilhas Cook ck -Ilhas Cook ck -Insulele Cook ck -ОÑтрова Кука ck -Ibirwa bya Kuke ck -Cooksullut ck -Cookove ostrovy ck -Cookovi otoki ck -Кукова оÑтрва ck -Kukova ostrva ck -Cooköarna ck -கà¯à®•௠தீவ௠ck -Ҷазираи Кук ck -หมู่เà¸à¸²à¸°à¸„ุภck -Cook Adaları ck -Kok Utrawları ck -ОÑтрови Кука ck -Кук Ороллари ck -Iyes Cook ck -库克群岛 ck -庫克群島 ck -Chile cl -Chilië cl -تشيلي cl -Åžili cl -Чылі cl -Чили cl -চিলি cl -ÄŒile cl -Xile cl -Tsile cl -Χιλή cl -Ĉilio cl -TÅ¡iili cl -Txile cl -شیلی cl -Chili cl -Chili cl -An tSile cl -צ'ילה cl -चिली cl -ÄŒile cl -Chili cl -Cile cl -ãƒãƒª cl -ឈីលី cl -ì¹ ë ˆ cl -ຊີລີ cl -ÄŒilÄ— cl -Čīle cl -Чиле cl -Чили cl -ÄŠile cl -Chili cl -ਚਿੱਲੀ cl -Cile cl -Чили cl -Shili cl -ÄŒile cl -ÄŒile cl -Чиле cl -ÄŒile cl -I-Chile cl -சிலி cl -Чилли cl -ชิลี cl -Åžili cl -Çili cl -Чилі cl -Чили cl -Chi lê cl -Tchili cl -智利 cl -智利 cl -Cameroon cm -Kameroon cm -الكاميرون cm -КамÑрун cm -Камерун cm -কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨ cm -Kameroun cm -Kamerun cm -Camerun cm -Kamerun cm -Y Camer?n cm -Cameroun cm -Kamerun cm -ΚαμεÏοÏν cm -Kameruno cm -Camerún cm -Kamerun cm -Kamerun cm -کامرون cm -Kamerun cm -Cameroun cm -Kameroen cm -Camarún cm -Camerún cm -קמרון cm -कैमरून cm -Kamerun cm -Kamerun cm -Kamerún cm -Camerun cm -カメルーン cm -កាមáŸážšáž¼áž“ cm -카메룬 cm -ຕາລາງງານ - K cm -KamerÅ«no cm -KamerÅ«na cm -Камерун cm -Камерун cm -Kamerun cm -Kamerun cm -Kamerun cm -Cameroen cm -Kamerun cm -ਕੈਮਰੂਨ cm -Kamerun cm -Camarões cm -Camarões cm -Camerun cm -Камерун cm -Kameruni cm -Kamerun cm -Komerun cm -Kamerun cm -Камерун cm -Kamerun cm -Kamerun cm -கமீரூன௠cm -Камерун cm -คาเมรูน cm -Kamerun cm -Kameroon cm -Камерун cm -Камерун cm -Camrone cm -喀麦隆 cm -喀麥隆 cm -China cn -الصين cn -Çin cn -Кітай cn -Китай cn -চীন cn -Sina cn -Kina cn -Xina cn -Čína cn -Tseina cn -Kina cn -Κίνα cn -Ĉinujo cn -Hiina cn -Txina cn -چین cn -Kiina cn -Kina cn -Chine cn -An tSín cn -סין cn -चीन cn -Kina cn -Kína cn -Cina cn -Kína cn -Cina cn -中国 cn -áž…áž·áž“ cn -중국 cn -ຈີນ cn -Kinija cn -Ķīna cn -Кина cn -Ð¥Ñтад cn -ÄŠina cn -Kina cn -Kina cn -Xina cn -ਚੀਨ cn -Chiny cn -Китай cn -Ubushinwa cn -Kiinná cn -Čína cn -Kitajska cn -Кина cn -Kina cn -I-China cn -Kina cn -சீனா cn -Хитой cn -จีน cn -Çin cn -Çin cn -Китай cn -Хитой cn -Trung Quốc cn -Chine cn -中国 cn -中國 cn -Colombia co -Colombië co -كولمبيا co -ÐšÐ°Ð»ÑŽÐ¼Ð±Ñ–Ñ co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -কলোমà§à¦¬à¦¿à§Ÿà¦¾ co -Kolumbi co -Kolumbija co -Colòmbia co -Kolumbie co -Kolumbien co -Κολομβία co -Kolumbio co -Kolumbia co -Kolonbia co -کلمبیا co -Kolumbia co -Colombie co -Columbia co -An Cholóim co -Colómbia co -קולומביה co -कोलमà¥à¤¬à¤¿à¤¯à¤¾ co -Kolumbija co -Kolumbia co -Kólumbía co -コロンビア co -កូឡុំប៊ី co -콜롬비아 co -ໂຄລຳເບີຠco -Kolumbija co -Kolumbija co -Колумбија co -Колумб co -Kolumbja co -Kolumbien co -Columbia co -ਕੋਲੰਬੀਆ co -Kolumbia co -Colômbia co -Colômbia co -Columbia co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -Kolombiya co -Kolombia co -Kolumbia co -Kolumbija co -Колумбија co -Kolumbija co -I-Colombia co -கொலமà¯à®ªà®¿à®¯à®¾ co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -โคลัมเบีย co -Kolombiya co -Kolombia co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ñ–Ñ co -ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co -Colombeye co -Columbia co -哥伦比亚 co -哥倫比亞 co -Costa Rica cr -كوستاريكا cr -КоÑта Рыка cr -КоÑта Рика cr -কোসà§à¦Ÿà¦¾ রিকা cr -Kosta Rika cr -Kostarika cr -Kostarika cr -Κόστα Ρίκα cr -Kostariko cr -کاستاریکا cr -Kosta Rika cr -Cósta Ríce cr -קוסטה ריקה cr -कोसà¥à¤Ÿà¤¾ रिका cr -Kosta rika cr -Kostaríka cr -コスタリカ cr -កូស្ážáž¶ážšáž¸áž€áž¶ cr -코스타 리카 cr -ໂຄເອເທີຠcr -Kosta Rika cr -Kostarika cr -КоÑта Рика cr -КоÑта Рика cr -ਕੋਸਟਾ ਰੀਕਾ cr -Kostaryka cr -КоÑта-Рика cr -Kosita Rika cr -Kostarika cr -Kostarika cr -КоÑтарика cr -Kostarika cr -I-Costa Rica cr -கோஸà¯à®Ÿà®¾ ரிகா cr -КоÑта Рика cr -คอสตาริà¸à¸² cr -Kosta Rika cr -Kosta Rika cr -КоÑта-Ріка cr -КоÑта Рика cr -哥斯达黎加 cr -哥斯大黎加 cr -Cuba cu -Kuba cu -كوبا cu -Куба cu -Куба cu -কিউবা cu -Kuba cu -Kuba cu -Kuba cu -Ciwba cu -Kuba cu -ΚοÏβα cu -Kubo cu -Kuuba cu -Kuba cu -کوبا cu -Kuuba cu -Kuba cu -Cúba cu -קובה cu -कà¥à¤¯à¥‚बा cu -Kuba cu -Kuba cu -Kúba cu -キュームcu -គុយបា cu -ì¿ ë°” cu -ເàºàº¡à»„ພ່ cu -Kuba cu -Kuba cu -Куба cu -Куба cu -Kuba cu -Kuba cu -ਕਿਊਬਾ cu -Kuba cu -Куба cu -Kuba cu -Kuba cu -Kuba cu -Куба cu -Kuba cu -I-Cuba cu -Kuba cu -கியà¯à®ªà®¾ cu -Куба cu -คิวบา cu -Küba cu -Kuba cu -Куба cu -Куба cu -å¤å·´ cu -å¤å·´ cu -Cape Verde cv -Kaap Verde cv -كاب Ùيردي cv -Кабо Верде cv -কেপ ভারডি cv -Penn Verde cv -Zelenortska ostrva cv -Cap Verd cv -Kapverdy cv -Cape Ferde cv -Kapverdiske øer cv -Cap Verdische Inseln cv -ΠÏάσινο ΑκÏωτήÏιο cv -Kapo-Verdo cv -Cabo Verde cv -Roheneeme saared cv -Cabo Verde cv -کیپ‌ورده cv -Kap Verde cv -Cap vert cv -Kaap Verdië cv -Rinn Verde cv -Cabo Verde cv -×›×£ וורדה cv -कैप वरà¥à¤¡à¥‡ cv -Zöldfoki-szigetek cv -Grænhöfðaeyjar cv -Capo Verde cv -カーãƒãƒ™ãƒ«ãƒ‡ cv -កាបវែរ cv -ì¹´ë³´ë² ë¥´ë° cv -ເàºàº¡à»„ພ່ cv -Kabaverde cv -Кејп Верде cv -Капе Ð’ÑÑ€Ð´Ñ cv -Kapp Verde cv -Kap Verde cv -Kaap Verdië cv -Kapp Verde cv -ਕੇਪ ਵੀਰਡੀ cv -Cabo Verde cv -Cabo Verde cv -Capul Verde cv -Кабо-Верде cv -Kapu Veri cv -Кејп Верд cv -Kejp Verd cv -Kap Verde cv -கேப௠வெரà¯à®Ÿà¯ cv -Димоғи Верде cv -à¹à¸«à¸¥à¸¡à¹€à¸§à¸­à¸£à¹Œà¸”ี cv -Kape Verde cv -Кабо-Верде cv -Кейп Верде cv -Cap Vert cv -佛得角 cv -ç¶­å¾·è§’ cv -Christmas Island cx -Kersfees Eiland cx -جزر الكريسماس cx -ОÑтров РождеÑтво cx -কà§à¦°à¦¿à¦¸à§à¦Ÿà¦®à¦¾à¦¸ দà§à¦¬à§€à¦ª cx -Inizi Nedeleg cx -BožiÄno ostrvo cx -Illa de Pascua cx -VánoÄní ostrovy cx -Ynys y Nadolig cx -Juleøen cx -Weihnachtsinsel cx -Îήσος των ΧÏιστουγέννων cx -Kristnaskinsulo cx -Islas Christmas cx -Jõulusaar cx -Eguberri Irla cx -جزایر کریسمس cx -Joulusaari cx -ÃŽle de Noël cx -Christmas Eilân cx -Oileán na Nollag cx -Illas Christmas cx -××™×™ כריסטמס cx -कà¥à¤°à¤¿à¤¸à¤®à¤¸ आइलैंड cx -UskrÅ¡nji otoci cx -Karácsony-szigetek cx -Jólaey cx -Isola Christmas cx -クリスマス諸島 cx -កោះ Christmas cx -í¬ë¦¬ìŠ¤ë§ˆìŠ¤ 섬 cx -ຄິດສະຕອລ cx -KalÄ—dų salos cx -ZiemassvÄ“tku salas cx -ВелигденÑки ОÑтрови cx -КриÑÑ‚Ð¼Ð°Ñ Ð°Ñ€Ð»ÑƒÑƒÐ´ cx -Christmasøya cx -Wiehnachtsinsel cx -Christmasøya cx -ਕà©à¨°à¨¿à¨¸à¨®à¨¿à¨¸ ਟਾਪੂ cx -Wyspy Bożego Narodzenia cx -Ilhas Natal cx -Ilhas do Natal cx -Insulele Christmas cx -ОÑтров РождеÑтва cx -Ikirwa cya Noheli cx -Christmassuollu cx -VianoÄné Ostrovy cx -BožiÄni otok cx -Божићно оÑтрво cx -Božićno ostrvo cx -Julön cx -கிரà¯à®¸à¯à®¤à¯à®®à®¸à¯ தீவ௠cx -Ҷазираи КриÑÑ‚Ð¼Ð°Ñ cx -เà¸à¸²à¸°à¸„ริสต์มาส cx -Yılbaşı Adaları cx -Christmas Utrawları cx -ОÑтрів Різдва cx -КриÑÐ¼Ð°Ñ ÐžÑ€Ð¾Ð»Ð¸ cx -Äảo giáng sinh cx -圣诞岛 cx -è–誕島 cx -Cyprus cy -Siprus cy -قبرص cy -Кіпр cy -Кипър cy -সাইপà§à¦°à¦¾à¦¸ cy -Chipr cy -Kipar cy -Xipre cy -Kypr cy -Cypern cy -Zypern cy -ΚÏÏ€Ïος cy -Cipro cy -Chipre cy -Küpros cy -Txipre cy -قبرس cy -Kypros cy -Chypre cy -An Chipir cy -Chipre cy -קפריסין cy -साइपà¥à¤°à¤¸ cy -Cipar cy -Ciprus cy -Kýpur cy -Cipro cy -キプロス cy -ស៊ីពរ០cy -키프로스 cy -ບີບອັດ cy -Kipro cy -Kipra cy -Кипар cy -Ð¡Ð¸Ð¿Ñ€ÑƒÑ cy -ÄŠipru cy -Kypros cy -Zypern cy -Kypros cy -ਕਿਉਪਰਸ cy -Cypr cy -Chipre cy -Chipre cy -Cipru cy -Кипр cy -Shipure cy -Kypros cy -Ciper cy -Кипар cy -Kipar cy -Cypern cy -சிபà¯à®°à®¸à¯ cy -Кипр cy -ไซปรัส cy -Kıbrıs cy -Kiper cy -Кіпр cy -Кипр cy -Síp cy -Chîpe cy -塞浦路斯 cy -賽普勒斯 cy -Czechia cz -Czechië cz -التشيك cz -Çex Respublikası cz -ЧÑÑ…Ñ–Ñ cz -Чешка република cz -চেকিয়া cz -Tchekia cz -ÄŒeÅ¡ka cz -Txèquia cz -ÄŒesko cz -Y Weriniaeth Siec cz -Tjekkiet cz -Tschechien cz -Τσεχία cz -ĈeÄ¥io cz -República Checa cz -TÅ¡ehhi cz -Txekia cz -Ú†Ú© cz -Tsekki cz -République tchèque cz -Tsjechië cz -Poblacht na Seice cz -Chéquia cz -צ'×›×™×” cz -चेक cz -ÄŒeÅ¡ka cz -Csehország cz -Tékkland cz -Repubblica Ceca cz -ãƒã‚§ã‚³ cz -ឆáŸáž€ cz -ì²´ì½” cz -ÄŒekija cz -ÄŒehija cz -Чешка cz -Чехиа cz -Cżekia cz -Tsjekkia cz -Tschechien cz -Tsjechië cz -Tsjekkia cz -Chèquia cz -ਚੈੱਚੀਆ cz -Czechy cz -República Checa cz -República Tcheca cz -Cehia cz -Ð§ÐµÑ…Ð¸Ñ cz -Ceke cz -ÄŒeahkka cz -ÄŒesko cz -ÄŒeÅ¡ka cz -Чешка cz -ÄŒeÅ¡ka cz -I-Czechia cz -Tjeckien cz -செகà¯à®¯à®¾ cz -Ð§ÐµÑ…Ð¸Ñ cz -เชค cz -Çek Cumhuriyeti cz -Çexiä cz -Ð§ÐµÑ…Ñ–Ñ cz -Ð§ÐµÑ…Ð¸Ñ cz -Séc cz -Tchekeye cz -æ·å…‹ cz -æ·å…‹ cz -Germany de -Duitsland de -ألمانيا de -Almaniya de -ÐÑмеччына de -Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de -জারà§à¦®à¦¾à¦¨à¦¿ de -Alamagn de -NjemaÄka de -Alemanya de -NÄ›mecko de -Yr Almaen de -Tyskland de -Deutschland de -ΓεÏμανία de -Germanio de -Alemania de -Saksamaa de -Alemania de -آلمان de -Saksa de -Týskland de -Allemagne de -Dûtslân de -An Ghearmáin de -Alemaña de -גרמניה de -जरà¥à¤®à¤¨à¥€ de -NjemaÄka de -Németország de -Jerman de -Þýskaland de -Germania de -ドイツ de -អាល្លឺម៉ង់ de -ë…ì¼ de -ເàºàº¥àº¥àº°àº¡àº±àº™àº™àºµ de -Vokietija de -VÄcija de -Германија de -Герман de -Jerman de -Ä ermanja de -Tyskland de -Düütschland de -Duitsland de -Tyskland de -Alemanya de -ਜਰਮਨੀ de -Niemcy de -Alemanha de -Alemanha de -Germania de -Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de -Ubudage de -Duiska de -Nemecko de -NemÄija de -Ðемачка de -NemaÄka de -I-Germany de -Tyskland de -ஜெரà¯à®®à®©à®¿ de -Олмон de -เยอรมันนี de -Almanya de -Almania de -Ðімеччина de -ÐžÐ»Ð¼Ð¾Ð½Ð¸Ñ de -Äức de -Almagne de -德国 de -德國 de -IJalimani de -Djibouti dj -جيبوتي dj -Джыбуці dj -Джибути dj -জিবৌতি dj -Äibuti dj -Džibuti dj -Jib?ti dj -Dschibuti dj -Τζιμπουτί dj -Äœibutio dj -جیبوتی dj -Xibuti dj -×’'יבוטי dj -डिबौती dj -Džibuti dj -Dzsibuti dj -Djíbútí dj -Gibuti dj -ジブムdj -ហ្ស៊ីបូទី dj -지부티 dj -ພັດພາ dj -Džibutis dj -Džibutija dj -Ðибути dj -Жибут dj -DÄ¡ibuti dj -Dschibouti dj -ਡਜੀਬà©à¨‰à¨Ÿà©€ dj -Dżibuti dj -Djibuti dj -Djibuti dj -Джибути dj -Jibuti dj -Djibuhti dj -Džibuty dj -Džibuti dj -Ðибути dj -Džibuti dj -I-Djibouti dj -டிஜிபொடி dj -Ҷибойти dj -จิบูติ dj -Cibuti dj -Djibuti dj -Джібуті dj -Жибути dj -å‰å¸ƒæ dj -å‰å¸ƒåœ° dj -Denmark dk -Denemarke dk -الدنمارك dk -Danimarka dk -Ð”Ð°Ð½Ñ–Ñ dk -Ð”Ð°Ð½Ð¸Ñ dk -ডেনমারà§à¦• dk -Danmark dk -Danska dk -Dinamarca dk -Dánsko dk -Denmarc dk -Danmark dk -Dänemark dk -Δανία dk -Danlando dk -Dinamarca dk -Taani dk -Danimarka dk -دانمارک dk -Tanska dk -Danmark dk -Danemark dk -Denemarken dk -An Danmhairg dk -Dinamarca dk -דנמרק dk -डेनमारà¥à¤• dk -Danska dk -Dánia dk -Danmörk dk -Danimarca dk -デンマーク dk -ដាណឺម៉ាក dk -ë´ë§ˆí¬ dk -ເດນມາຠdk -Danija dk -DÄnija dk -ДанÑка dk -Дани dk -Danimarka dk -Danmark dk -Dänmark dk -Denemarken dk -Danmark dk -Dinamarca dk -ਡੈੱਨਮਾਰਕ dk -Dania dk -Dinamarca dk -Dinamarca dk -Danemarca dk -Ð”Ð°Ð½Ð¸Ñ dk -Danimarike dk -Dánmárku dk -Dánsko dk -Danska dk -ДанÑка dk -Danska dk -I-Denmark dk -Danmark dk -டெனà¯à®®à®¾à®°à¯à®•௠dk -Денмарк dk -เดนมาร์ภdk -Danimarka dk -Dania dk -Ð”Ð°Ð½Ñ–Ñ dk -Ð”Ð°Ð½Ð¸Ñ dk -Äan Mạch dk -DaenmÃ¥tche dk -丹麦 dk -丹麥 dk -Dominica dm -Dominisië dm -دومينيكا dm -Дамініка dm -Доминика dm -ডমিনিকা dm -Dominik dm -Dominika dm -Dominika dm -Dominikanische Republik dm -Îτομίνικα dm -Dominiko dm -دومینیکا dm -Dominique dm -Doiminice dm -דומינקה dm -डोमिनिका dm -Dominika dm -Dóminíka dm -ドミニカ dm -ដូមីនីកា dm -ë„미니카 dm -ໂລມາເນີຠdm -Dominika dm -Dominika dm -Доминика dm -Доминика dm -Dominika dm -ਡੋਮਾਨੀਕਾ dm -Dominika dm -Dominicana dm -Доминика dm -Dominikani dm -Dominikánsko dm -Dominikanska republika dm -Доминика dm -Dominika dm -டொமினிகா dm -Доминика dm -โดมินาà¸à¸±à¸™ dm -Dominik dm -Dominika dm -Домініка dm -Доминика dm -Dominike dm -多米尼加 dm -多明尼加 dm -Dominican Republic do -Dominikaanse Republiek do -جمهورية الدومينيكان do -Dominik Respublikası do -ДамініканÑÐºÐ°Ñ Ð ÑÑпубліка do -ДоминиканÑка република do -ডমিনিকান রিপাবলিক do -Republik Dominikan do -Dominikanska Republika do -República Dominicana do -Dominikánská republika do -Gweriniaeth Dominica do -Dominikanske Republik do -Dominikanische Republik do -Δομινικανή ΔημοκÏατία do -Dominika Respubliko do -República Dominicana do -Dominikaani Vabariik do -Dominikar Errepublika do -جمهوری دامینیکن do -Dominikaaninen tasavalta do -République dominicaine do -Dominicaanse Republyk do -An Phoblacht Dhoiminiceach do -República Dominicana do -הרפובליקה הדומיניקנית do -डोमिनिकन रिपबà¥à¤²à¤¿à¤• do -Dominikanska Republika do -Dominikai Köztársaság do -Republik Dominika do -Dóminíska lýðveldið do -Repubblica Dominicana do -ドミニカ共和国 do -សាធារណរដ្ឋ​ដូមីនីកែន do -ë„미니카 공화국 do -ໂດມິນີàºàº±àº™ do -Dominikos Respublika do -Dominikas Republika do -ДоминиканÑка Република do -Домникан ард ÑƒÐ»Ñ do -Repubblika Dominikana do -Den dominikanske republikk do -Dominikaansche Republiek do -Dominicaanse Republiek do -Den dominikanske republikken do -Republica Dominicana do -ਡੋਮਾਨੀਕਾ ਗਣਰਾਜ do -Dominikana do -República Dominicana do -República Dominicana do -Republica Dominicană do -ДоминиканÑÐºÐ°Ñ Ñ€ÐµÑпублика do -Repubulika Dominikani do -DominihkalaÅ¡ republihkka do -Dominikánska republika do -Dominikanska republika do -ДоминиканÑка Република do -Dominikanska Republika do -I-Dominican Republic do -Dominikanska republiken do -டொமினிகà¯à®•ன௠கà¯à®Ÿà®¿à®¯à®°à®šà¯ do -Ҷумҳурии Доминика do -สาธารณรัà¸à¹‚ดมินิà¸à¸±à¸™ do -Dominik Cumhuriyeti do -Dominika Cömhüriäte do -ДомініканÑька реÑпубліка do -Доминикана РеÑпубликаÑи do -Muvhuso wa Dominican do -Cá»™ng hoà Dominican do -Republike Dominikinne do -IRepublic yeDominican do -多米尼加共和国 do -多明尼加共和國 do -Algeria dz -Algerië dz -الجزائر dz -Ðльжыр dz -Ðлжир dz -অà§à¦¯à¦¾à¦²à¦œà§‡à¦°à¦¿à§Ÿà¦¾ dz -Aljeri dz -Alžir dz -Algèria dz -Alžírsko dz -Algeriet dz -Algerien dz -ΑλγεÏία dz -Algerio dz -Argelia dz -Alžeeria dz -الجزیره dz -Algérie dz -Algerije dz -An Ailgéir dz -Alxéria dz -×לג'יריה dz -अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾ dz -Alžir dz -Algéria dz -Alsír dz -アルジェリア dz -អាល់ហ្សáŸážšáž¸ dz -알제리 dz -ບັນàºàº²à»€àº¥àºµàº dz -Alžyras dz -Alžīrija dz -Ðлжир dz -Ðлжер dz -AlÄ¡erija dz -Algerie dz -Algerien dz -Algerije dz -Algerie dz -ਅਲਜੀਰੀਆ dz -Algieria dz -Argélia dz -Argélia dz -Ðлжир dz -Aligeriya dz -Alžírsko dz -Alžirija dz -Ðлжир dz -Alžir dz -I-Algeria dz -Algeriet dz -அலà¯à®œà®¿à®°à®¿à®¯à®¾ dz -Ðлҷазоир dz -อัลจีเรีย dz -Aljır dz -Ðлжир dz -Жазоир dz -Aldjereye dz -阿尔åŠåˆ©äºš dz -阿爾åŠåˆ©äºž dz -Equador ec -Ewenaar ec -الإكوادور ec -Ekvator ec -Эквадор ec -Еквадор ec -ইকà§à§Ÿà§‡à¦¡à¦° ec -Ecuador ec -Ekvador ec -Ekvádor ec -Ecwador ec -Ecuador ec -ΙσημεÏινός ec -Ekvadoro ec -Ecuador ec -Ekuador ec -اکوادور ec -Équateur ec -Eacuadór ec -Ecuador ec -×קוודור ec -इकà¥à¤µà¥‡à¤¡à¥‰à¤° ec -Ekvador ec -Ecuador ec -Ekvador ec -Ecuador ec -エクアドル ec -អáŸáž€áŸ’វាឌáŸážš ec -ì—ì½°ë„르 ec -ເອàºà»àº”à» ec -Ekvadoras ec -Ekvadora ec -Еквадор ec -Эквадор ec -Ekwador ec -Ecuador ec -Ecuador ec -Ecuador ec -à¨à¨•ਾਵੇਡਰ ec -Ekwador ec -Ecuador ec -Эквадор ec -Ekwateri ec -Ekvador ec -Ekvádor ec -Ekvador ec -Еквадор ec -Ekvador ec -I-Equador ec -ஈகà¯à®µà¯†à®Ÿà®¾à®°à¯ ec -Эквадор ec -เอà¸à¸§à¸²à¸”อร์ ec -Ekvator ec -Еквадор ec -Эквадор ec -EcwÃ¥teur ec -厄瓜多尔 ec -厄瓜多 ec -Estonia ee -Estlandies ee -استونيا ee -Estoniya ee -ЭÑÑ‚Ð¾Ð½Ñ–Ñ ee -ЕÑÑ‚Ð¾Ð½Ð¸Ñ ee -à¦à¦¸à§à¦Ÿà§‹à¦¨à¦¿à§Ÿà¦¾ ee -Estonija ee -Estònia ee -Estonsko ee -Estland ee -Estland ee -Εσθονία ee -Estlando ee -Eesti ee -استونی ee -Eesti ee -Estonie ee -Estland ee -An Eastóin ee -×סטוניה ee -à¤à¤¸à¥à¤¤à¥‹à¤¨à¤¿à¤¯à¤¾ ee -Estonija ee -Észtország ee -Eistland ee -エストニア ee -អáŸážŸáŸ’ážáž¼áž“ី ee -ì—스토니아 ee -ເອໂທເນີຠee -Estija ee -Igaunija ee -ЕÑтонија ee -ЭÑтони ee -Estonja ee -Estland ee -Estland ee -Estland ee -Estland ee -Estònia ee -ਈਸਟੋਨੀਆ ee -Estónia ee -Estônia ee -ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee -Esitoniya ee -Estteeana ee -Estónsko ee -Estonija ee -ЕÑтонија ee -Estonija ee -I-Estonia ee -Estland ee -எசà¯à®Ÿà¯‹à®©à®¿à®¯à®¾ ee -ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee -เอสโทเนีย ee -Estonya ee -ЕÑÑ‚Ð¾Ð½Ñ–Ñ ee -ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee -Estoneye ee -爱沙尼亚 ee -愛沙尼亞 ee -Egypt eg -Egipte eg -مصر eg -Misir eg -ЭгіпÑÑ‚ eg -Египет eg -মিশর eg -Ejipt eg -Egipat eg -Egipte eg -Yr Aifft eg -Egypten eg -Ägypten eg -Αίγυπτος eg -Egiptujo eg -Egipto eg -Egiptus eg -Egipto eg -مصر eg -Egypti eg -Egyptaland eg -Égypte eg -Egypte eg -An Éigipt eg -Exipto eg -×ž×¦×¨×™× eg -इजिपà¥à¤¤ eg -Egipat eg -Egyiptom eg -Egyptaland eg -Egitto eg -エジプト eg -អáŸáž áŸ’ស៊ីប eg -ì´ì§‘트 eg -ອີຢີບ eg -Egiptas eg -Ä’Ä£ipte eg -Египет eg -Египт eg -Mesir eg -EÄ¡ittu eg -Ägypten eg -Egypte eg -Egepeta eg -ਮਿਸਰ eg -Egipt eg -Egipto eg -Egito eg -Egipt eg -Египет eg -Misiri eg -Egypta eg -Egipt eg -Египат eg -Egipat eg -I-Egypt eg -Egypten eg -எகிபà¯à®¤à¯ eg -МиÑÑ€ eg -อียิปต์ eg -Mısır eg -Mısır eg -Єгипет eg -МиÑÑ€ eg -Ai Cập eg -Edjipe eg -åŸƒåŠ eg -åŸƒåŠ eg -Igibhithe eg -Western Sahara eh -Westelike Sahara eh -الصحراء الغربية eh -ЗаходнÑÑ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh -Западна Сахара eh -পশà§à¦šà¦¿à¦® সাহারা eh -Sahara occidental eh -Zapadna Sahara eh -Sàhara Occidental eh -Západní Sahara eh -Gorllewin Sahara eh -Vestsahara eh -Westsahara eh -Δυτική ΣαχάÏα eh -Okcidenta Saharo eh -Sahara occidental eh -Lääne-Sahara eh -Mendebaldeko Sahara eh -صحرای غربی eh -Länsi-Sahara eh -Sahara occidental eh -West Sahara eh -An Sahára Thiar eh -Saara Ocidental eh -מערב סהרה eh -पशà¥à¤šà¤¿à¤®à¥€ सहारा eh -Westerm Sahara eh -Nyugat-Szahara eh -Vestur-Sahara eh -Sahara Occidentale eh -西サãƒãƒ© eh -សាហារ៉ា​ážáž¶áž„​លិច eh -ì„œì‚¬í•˜ë¼ eh -ພື້ນທີ່ທຳງານ eh -Vakarų Sahara eh -RietumsahÄra eh -Западна Сахара eh -Барууг Ñахар eh -Saħara tal-Punent eh -Vest-Sahara eh -Westsahara eh -West Sahara eh -Vest-Sahara eh -ਦੱਖਣੀ ਸਹਾਰਾ eh -Zachodnia Sahara eh -Sara Ocidental eh -Sahara Ocidental eh -Sahara de Vest eh -Ð—Ð°Ð¿Ð°Ð´Ð½Ð°Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh -Sahara y'Iburengerazuba eh -Oarje-Sahara eh -Západna Sahara eh -Zahodna Sahara eh -Западна Сахара eh -Zapadna Sahara eh -Västsahara eh -மேறà¯à®•தà¯à®¤à®¿à®¯ சஹாரா eh -Саҳрои Ғарбӣ eh -ซาฮาร่าตะวันตภeh -Batı Sahara eh -Batış Sahara eh -Західна Сахара eh -Ғарбий Сахара eh -Tây Sahara eh -Sara Coûtchantrece eh -西撒哈拉 eh -西盛哈拉 eh -Eritrea er -اريتريا er -ЭрытрÑÑ er -Ð•Ñ€Ð¸Ñ‚Ñ€ÐµÑ er -à¦à¦°à¦¿à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ er -Eritre er -Eritreja er -ΕÏυθÏαία er -Eritreo er -اریتره er -Érythrée er -Eiritré er -×ריתרי××” er -à¤à¤°à¤¿à¤Ÿà¥à¤°à¥€à¤¯à¤¾ er -Eritreja er -Erítrea er -エリトリア er -អáŸážšáž¸áž‘្រា er -ì—리트레아 er -à»àºà»‰à»„ຂà»àºŸà»‰àº¡àº—ຳງານ er -EritrÄ—ja er -Eritreja er -Еритреја er -Эритреа er -ਈਰੀਟਰੀਆ er -Erytrea er -Eritreia er -Eritréia er -Ð­Ñ€Ð¸Ñ‚Ñ€ÐµÑ er -Eritereya er -Eritreja er -Еритреја er -Eritreja er -ரிடà¯à®°à®¿à®¯à®¾ er -Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er -เอริเทรีย er -Eritre er -Ð•Ñ€Ñ–Ñ‚Ñ€ÐµÑ er -Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er -Eritrêye er -厄立特里亚 er -厄利垂亞 er -Spain es -Spanje es -أسبانيا es -İspaniya es -Ð“Ñ–ÑˆÐ¿Ð°Ð½Ñ–Ñ es -ИÑÐ¿Ð°Ð½Ð¸Ñ es -সà§à¦ªà§‡à¦¨ es -Spagn es -Å panija es -Espanya es -Å panÄ›lsko es -Sbaen es -Spanien es -Spanien es -Ισπανία es -Hispanio es -España es -Hispaania es -Espainia es -اسپانیا es -Espanja es -Spania es -Espagne es -Spanje es -An Spáinn es -España es -ספרד es -सà¥à¤ªà¥‡à¤¨ es -Å panjolska es -Spanyolország es -Spanyol es -Spánn es -Spagna es -スペイン es -អáŸážŸáŸ’ប៉ាញ es -ìŠ¤íŽ˜ì¸ es -ສະເປັນ es -Ispanija es -SpÄnija es -Шпанија es -ИÑпани es -Sepanyol es -Spanja es -Spania es -Spanien es -Spanje es -Spania es -Espanha es -ਸਪੇਨ es -Hiszpania es -Espanha es -Espanha es -Spania es -ИÑÐ¿Ð°Ð½Ð¸Ñ es -Esipanye es -Spánia es -Å panielsko es -Å panija es -Шпанија es -Å panija es -I-Spain es -Spanien es -சà¯à®ªà¯†à®¯à®¿à®©à¯ es -ИÑпаниё es -สเปน es -İspanya es -İspania es -ІÑÐ¿Ð°Ð½Ñ–Ñ es -ИÑÐ¿Ð°Ð½Ð¸Ñ es -Tây Ban Nha es -Sipagne es -西ç­ç‰™ es -西ç­ç‰™ es -Ethiopia et -Ethiopië et -اثيوبيا et -Ð­Ñ‚Ñ‹Ñ‘Ð¿Ñ–Ñ et -Ð•Ñ‚Ð¸Ð¾Ð¿Ð¸Ñ et -ইথিওপিয়া et -Etiopi et -Etiopija et -Etiòpia et -Etiopie et -Ethiopien et -Äthiopien et -Αιθιοπία et -Etiopio et -Etiopía et -Etioopia et -Etiopia et -اتیوپی et -Etiopia et -Éthiopie et -Ethiopië et -An Aetóip et -Etiopia et -×תיופיה et -इथियोपिया et -Etiopija et -Etiópia et -Eþíópía et -Etiopia et -エãƒã‚ªãƒ”ã‚¢ et -អáŸážáŸ’យូពី et -ì—티오피아 et -ເອໂທເນີຠet -Etiopija et -Etiopija et -Етиопија et -Этопи et -Etjopia et -Etiopia et -Äthiopien et -Ethiopië et -Etiopia et -ਈਥੋਪੀਆ et -Etiopia et -Etiópia et -Etiópia et -Etiopia et -Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et -Etiyopiya et -Etiopia et -Etiópia et -Etiopija et -Етиопија et -Etiopija et -Etiopien et -எதியோபியா et -ҲабашиÑтон et -เอธิโอเปีย et -Etiyopya et -Efiopia et -Ð•Ñ„Ñ–Ð¾Ð¿Ñ–Ñ et -Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et -Etiopeye et -埃塞俄比亚 et -衣索比亞 et -Finland fi -Ùنلندا fi -Finlandiya fi -ФінлÑÐ½Ð´Ñ‹Ñ fi -Ð¤Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ fi -ফিনলà§à¦¯à¦¾à¦£à§à¦¡ fi -Finska fi -Finlàndia fi -Finsko fi -Y Ffindir fi -Finnland fi -Φινλανδία fi -Finnlando fi -Finlandia fi -Soome fi -Finlandia fi -Ùنلاند fi -Suomi fi -Finnland fi -Finlande fi -Finlân fi -An Fhionlainn fi -Finlándia fi -פינלנד fi -फिनलैंड fi -Finska fi -Finnország fi -Finlandia fi -Finnland fi -Finlandia fi -フィンランド fi -ហ្វាំងឡង់ fi -핀란드 fi -ຟີນà»àº¥àº™ fi -Suomija fi -Somija fi -ФинÑка fi -Финнланд fi -Finlandja fi -Finnland fi -Finlandia fi -ਫਿਨਲੈਂਡ fi -Finlandia fi -Finlândia fi -Finlândia fi -Finlanda fi -ФинлÑÐ½Ð´Ð¸Ñ fi -Finilande fi -Suopma fi -Fínsko fi -Finska fi -ФинÑка fi -Finska fi -I-Finland fi -பினà¯à®²à®¾à®¨à¯à®¤à¯ fi -Финлонд fi -ฟินà¹à¸¥à¸™à¸”์ fi -Finlandiya fi -Finland (Suomi) fi -ФінлÑÐ½Ð´Ñ–Ñ fi -ФинлÑÐ½Ð´Ð¸Ñ fi -Phần Lan fi -Finlande fi -芬兰 fi -芬蘭 fi -Fiji fj -Ùيجي fj -Фіджы fj -ОÑтрови Фиджи fj -ফিজি fj -Fidji fj -Fidži fj -Fidži fj -Ffiji fj -Fidschi fj -Φίτζι fj -FiÄioj fj -Fidži fj -Ùیجی fj -Fidji fj -Fidsí fj -פיג'×™ fj -फिजी fj -Fidzsi fj -Fídjieyjar fj -Figi fj -フィジー fj -ហ្វ៊ីហ្ស៊ី fj -피지 fj -ມີດີ fj -Fidži fj -Фиџи fj -Фижи fj -FiÄ¡i fj -Fidschi fj -ਫਿੱਜੀ fj -Fidżi fj -Ilhas Fiji fj -Фиджи fj -Fidži fj -Fidži fj -Фиџи fj -Fidži fj -பிஜி fj -Фиҷи fj -ฟิจิ fj -Фіджі fj -Фижи fj -Fidji fj -æ–æµŽ fj -è²æ¿Ÿ fj -Falkland Islands (Malvinas) fk -Falkland Eilande (Malvinas) fk -جزر الÙوكلاند (المالÙيناس) fk -ФалклендÑÐºÑ–Ñ Ð°Ñтравы (Мальвіны) fk -ФолклендÑки оÑтрови fk -ফকলà§à¦¯à¦¾à¦£à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ (মলভিনাস) fk -Inizi Falklandi (Malvinas) fk -Foklandska ostrva (Malvini) fk -Illes Falkland (Malvines) fk -Falklandy (Malvíny) fk -Ynysoedd Y Ffalcland (Malfinas) fk -Falkland-øerne fk -Falkland-Inseln (Malvinen) fk -Îησιά Φώκλαντ (Malvinas) fk -Falklandoj fk -Islas Falkland (Malvinas) fk -Falklandi saared (Malviinid) fk -Falkland Irlak (Malvinak) fk -جزایر ÙØ§Ù„کلند مالویناس fk -Falklandin saaret (Malvinassaaret) fk -ÃŽles Falkland (Malvinas) fk -Falkland Eilannen (Malvinas) fk -Na hOileáin Fháclainne (Malvinas) fk -Illas Falkland (Malvinas) fk -××™×™ פולקלנד fk -फाकलैंड आइलैंड (मालविनास) fk -Folklandska otoÄja (Malvini) fk -Falkland-szigetek fk -Falklandseyjar fk -Isole Falkland (Malvine) fk -フォークランド諸島 fk -កោះ Falkland (Malvinas) fk -í¬í´ëžœë“œ êµ°ë„ (ë§ë¹„나스) fk -Folklendu salas fk -ФокландÑки ОÑтрови (Малвини) fk -Фалкланд арлууд (МалвинаÑ) fk -Gżejjer Falkland (Malvinas) fk -Falklandsøyene fk -Falklandinseln (Malvinas) fk -Falkland Eilanden (Malvinas) fk -Falklandsøyane fk -ਫਾਕਲੈਂਡ ਟਾਪੂ fk -Wyspy Falklandzkie (Malwiny) fk -Ilhas Falkland (Malvinas) fk -Ilhas Malvinas fk -Insulele Falkland (Malvine) fk -ФолклендÑкие (МальвинÑкие) оÑтрова fk -Ibirwa bya Falikilande (Maluvinasi) fk -Falklánddasullot fk -Falklandské Ostrovy (Malviny) fk -Falklandski otoki (Malvini) fk -ФолкландÑка оÑтрва (Малвини) fk -Folklandska ostrva (Malvini) fk -Falklandsöarna fk -ஃபாலà¯à®•௠தீவà¯(மாலà¯à®µà®¿à®©à®¾à®¸à¯) fk -Ҷазираи фолкланд (Малвина) fk -หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸„à¹à¸¥à¸™à¸”์ (Malvinas) fk -Falkland Adaları fk -Falkland Utrawları (Malvinnar) fk -ФолклендÑькі оÑтрови (БританіÑ) fk -Фолкленд (Малвин) Ороллари fk -Iyes Malouwines fk -ç¦å…‹å…°ç¾¤å²›(马尔维纳斯) fk -ç¦å…‹è˜­ç¾¤å³¶ (é¦¬çˆ¾ç¶­ç´æ–¯) fk -Micronesia, Federated States of fm -Micronesië, Vereenigde State van fm -ФедÑÑ€Ð°Ñ†Ñ‹Ñ ÐœiкранÑзіі fm -ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm -মাইকà§à¦°à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾, ফেডারেটেড সà§à¦Ÿà§‡à¦Ÿà¦¸ অব fm -Mikronezija, Federalne države fm -Micronesia, Estats Federats de fm -Mikronésie fm -Micronesia, Taleithau Cyfunol fm -Mikronesien, de forenede stater af fm -Mikronesien, Föderation von fm -ΜικÏονησίας, Ομόσπονδες πολιτείες της fm -Mikronezio, Respubliko de fm -Micronesia, Estados federados de fm -Mikroneesia fm -Mikronesiako Estatu Federatuak fm -Mikronesian liittovaltio fm -Etats Fédérés de Micronésie fm -Micronesië, Federale staten Fan fm -Stáit Cónascacha na Micrinéise fm -Micronésia, Estados Federados de fm -מיקרונזיה, מדינות הפדרציה של fm -फेडरेटेड सà¥à¤Ÿà¥‡à¤Ÿ ऑफ माइकà¥à¤°à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾ fm -Mikronézia fm -Míkrónesía, Sambandsríki fm -Micronesia, stati federati di fm -ミクロãƒã‚·ã‚¢,米自由連邦 fm -រដ្ឋ​សហពáŸáž“្ធ​មិក្រូនáŸážŸáŸŠáž¸ fm -Mikronezija fm -MikronÄ“zija fm -Микронезија, Федеративни Држави на fm -Mikronesja (Stati Federati ta') fm -Mikronesiaføderasjonen fm -Mikronesien, Vereenigte Staten vun fm -Micronesië, Federale staten van fm -Mikronesiaføderasjonen fm -ਮਾਇਕਰੋਨੀਸੀਆ, ਸੰਘੀ ਪà©à¨°à¨¾à¨‚ਤ fm -Federacja Stanów Mikronezji fm -Micronésia, Estados Federados da fm -Estados Federados da Micronésia fm -Micronezia, Statele Federative fm -ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm -Mikoronesiya, Leta Zishyizwehamwe fm -MikronesiafederaÅ¡uvdna fm -Spojené Å¡táty Mikronézie fm -Mikronezija, Združene države fm -Микронезија, Федерација држава fm -Mikronezija, Federacija država fm -Mikronesiska federationen fm -மைகà¯à®°à¯‹à®©à®¿à®šà®¾, à®’à®°à¯à®™à¯à®•ிணைநà¯à®¤ மாநிலம௠fm -สหพันธรัà¸à¸¡à¸´à¹‚ครนีเซีย fm -Mikronezya Federasyonu fm -Mikronesia, Berläşkän İlläre fm -МікронезіÑ, федеративні штати fm -ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm -Micronezeye fm -密克罗尼西亚è”邦 fm -密克羅尼西亞è¯é‚¦ fm -Faroe Islands fo -Faroe Eilande fo -جزر الÙيرو fo -ОÑтрови Фаро fo -ফারো দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ fo -Enez Faroe fo -Farska ostrva fo -Illes Faroe fo -Faerské ostrovy fo -Ynysoedd Ffar?e fo -Færøerne fo -Färöer-Inseln fo -Îήσοι ΦεÏόε fo -Ferooj fo -islas Faroe fo -Fääri saared fo -Faroe Irlak fo -جزایر ÙØ§Ø±Ùˆ fo -Färsaaret fo -ÃŽles Féroé fo -Faroe Eilannen fo -Na Scigirí (Oileáin Fharó) fo -Illas Feroe fo -××™×™ פ×רו fo -फारोठआइलैंड fo -Faroe Otoci fo -Faroe-szigetek fo -Færeyjar fo -Isole Fær Øer fo -フェロー諸島 fo -កោះ​ហ្វ៉ារ៉ូ fo -페로 ì œë„ fo -ໄອà»àº¥àº™ fo -Faroe salos fo -FÄ“ru salas fo -ФарÑки ОÑтрови fo -Фарое арлууд fo -Gżejjer Faroe fo -Færøyene fo -Färöerinseln fo -Faroe Eilanden fo -Færøyane fo -ਫਾਰੋਈ ਟਾਪੂ fo -Wyspy Faroe fo -Ilhas Faroe fo -Ilhas Faroe fo -Insulele Feroe fo -ФарерÑкие оÑтрова fo -Ibirwa bya Farowe fo -Fearsuolu fo -Ostrovy Faroe fo -Otoki Faroe fo -ФарÑка оÑтрва fo -Farska ostrva fo -Färöarna fo -ஃபரோ தீவà¯à®•ள௠fo -Ҷазираи Фару fo -หมู่เà¸à¸²à¸°à¸Ÿà¸²à¹‚ร fo -Faroe Adaları fo -Faroe Utrawları fo -ФарерÑькі оÑтрови fo -Фарер Ороллари fo -Äảo Faroe fo -Iye Faeroyé fo -法罗群岛 fo -法羅群島 fo -France fr -Frankryk fr -ÙØ±Ù†Ø³Ø§ fr -Fransa fr -Ð¤Ñ€Ð°Ð½Ñ†Ñ‹Ñ fr -Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr -ফà§à¦°à¦¾à¦¨à§à¦¸ fr -Frañs fr -Francuska fr -França fr -Francie fr -Ffrainc fr -Frankrig fr -Frankreich fr -Γαλλία fr -Francio fr -Francia fr -Prantsusmaa fr -Frantzia fr -ÙØ±Ø§Ù†Ø³Ù‡ fr -Ranska fr -Frakland fr -Frankryk fr -An Fhrainc fr -Franza fr -צרפת fr -फà¥à¤°à¤¾à¤‚स fr -Francuska fr -Franciaország fr -Prancis fr -Frakkland fr -Francia fr -フランス fr -បារាំង fr -프랑스 fr -àºàº£àº±à»ˆàº‡ fr -PrancÅ«zija fr -Francija fr -Франција fr -Франц fr -Perancis fr -Franza fr -Frankrike fr -Frankriek fr -Frankrijk fr -Frankrike fr -Fora fr -França fr -ਫਰਾਂਸ fr -Francja fr -França fr -França fr -FranÅ£a fr -Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr -Ubufaransa fr -Fránkriika fr -Francúzsko fr -Francija fr -ФранцуÑка fr -Francuska fr -I-France fr -Frankrike fr -பிரானà¯à®šà¯ fr -ФаронÑа fr -à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª fr -Fransa fr -Fransia fr -Ð¤Ñ€Ð°Ð½Ñ†Ñ–Ñ fr -Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr -Fura fr -Pháp fr -Fransi fr -法国 fr -法國 fr -Gabon ga -الغابون ga -Габон ga -Габон ga -গà§à¦¯à¦¾à¦¬à¦¨ ga -Gabun ga -Γκαμπόν ga -Gabono ga -Gabón ga -گابون ga -An Ghabúin ga -Gabón ga -גבון ga -गेबॉन ga -ガボン ga -ហ្គាបុង ga -가봉 ga -à»àºàº¥à»ˆàº‡àº™ ga -Gabonas ga -Gabona ga -Габон ga -Габон ga -Gabun ga -ਗਾਬੋਨ ga -Gabão ga -Gabão ga -Габон ga -Gabo ga -Габон ga -காபான௠ga -Габон ga -à¸à¸²à¸šà¸­à¸™ ga -Габон ga -Габон ga -加蓬 ga -加彭 ga -United Kingdom gb -Vereenigde Koninkryk gb -المملكة المتحدة gb -BirləşmiÅŸ Krallıq gb -Злучанае КаралеўÑтва gb -Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb -ইউনাইটেড কিংডম gb -Rouantelezh Unanet gb -Velika Britanija gb -Regne Unit gb -Spojené království gb -Y Deyrnas Unedig gb -Storbritannien gb -Großbritannien gb -Ηνωμένο Βασίλειο gb -Britio gb -Reino Unido gb -Suurbritannia gb -Erresuma Batua gb -بریتانیا gb -Iso-Britannia gb -Stórabretland gb -Royaume Uni gb -Ferienigd Keninkryk gb -An Ríocht Aontaithe gb -Reino Unido gb -בריטניה gb -यूनाइटेड किंगडम gb -Ujedinjeno Kraljevstvo gb -Egyesült Királyság gb -Inggris gb -Bretland gb -Regno Unito gb -イギリス gb -ចក្រភព​អង់គ្លáŸážŸ gb -ì˜êµ­ gb -ສະຫະລາດສະອານາຈັຠgb -JungtinÄ— KaralystÄ— gb -ApvienotÄ Karaliste gb -Обединето КралÑтво gb -Их британ gb -Renju Unit gb -Storbritannia gb -Grootbritannien gb -Verenigd Koninkrijk gb -Storbritannia gb -Regne Unit gb -ਬਰਤਾਨੀਆ gb -Wielka Brytania gb -Reino Unido gb -Reino Unido gb -Anglia gb -Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb -Ubwongereza gb -Stuorrabrittania gb -Anglicko gb -Združeno kraljestvo gb -Уједињено КраљевÑтво gb -Ujedinjeno Kraljevstvo gb -I-United Kingdom gb -Storbritannien gb -à®à®•à¯à®•ிய ராஜà¯à®œà®¿à®¯à®®à¯ gb -Подшоҳии Муттаҳида gb -สหราชอาณาจัà¸à¸£ gb -BirleÅŸik Krallık gb -Berläşkän PadÅŸahlıq gb -Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ gb -Буюк Ð‘Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb -Anh gb -RweyÃ¥me Uni gb -United Kingdom gb -英国 gb -è¯åˆçŽ‹åœ‹ gb -United Kingdom gb -Grenada gd -غرينادا gd -Qrenada gd -ГрÑнада gd -Гренада gd -গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¾ gd -Granada gd -ΓÏενάδα gd -Grenado gd -Granada gd -گرانادا gd -Grenade gd -Granada gd -גרנדה gd -गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾ gd -Granada gd -グレナダ gd -ហ្គ្រីណាដា gd -그러네ì´ë‹¤ gd -ເàºàº™àº²àº”າ gd -GrenÄda gd -Гренада gd -Гренада gd -Granada gd -ਗਰੀਨਾਡਾ gd -Granada gd -Granada gd -Гренада gd -Gerenada gd -I-Grenada gd -கிரெனடா gd -Гронодо gd -เà¸à¸£à¸™à¸²à¸”า gd -Гренада gd -Гренада gd -GrenÃ¥de gd -格林纳达 gd -æ ¼ç‘žé‚£é” gd -Georgia ge -Georgië ge -جورجيا ge -Ð“Ñ€ÑƒÐ·Ñ–Ñ ge -Ð“Ñ€ÑƒÐ·Ð¸Ñ ge -জরà§à¦œà¦¿à§Ÿà¦¾ ge -Jeorji ge -Gruzija ge -Geòrgia ge -Gruzie ge -Georgien ge -Georgien ge -ΓεωÏγία ge -Georgino ge -Gruusia ge -گرجستان ge -Géorgie ge -Georgië ge -An tSeoirsia ge -Xeórxia ge -×’'ורג'×™×” ge -जà¥à¤¯à¤¾à¤°à¥à¤œà¤¿à¤¯à¤¾ ge -Grúzia ge -Georgía ge -ジョージア島 ge -ហ្សកហ្ស៊ី ge -그루지아 ge -ເຊີເບີຠge -Gruzija ge -Gruzija ge -Грузија ge -Георги ge -Ä orÄ¡ia ge -Georgien ge -Georgië ge -ਜਾਰਜੀਆ ge -Gruzja ge -Geórgia ge -Geórgia ge -Ð“Ñ€ÑƒÐ·Ð¸Ñ ge -Jeworugiya ge -Gruzija ge -Грузија ge -Gruzija ge -Georgien ge -ஜியோரà¯à®œà®¿à®¯à®¾ ge -ГурҷиÑтон ge -จอร์เจีย ge -Gürcistan ge -Görcestan ge -Ð“Ñ€ÑƒÐ·Ñ–Ñ ge -ГуржиÑтон ge -Djeyordjeye ge -æ ¼é²å‰äºš ge -喬治亞 ge -Ghana gh -غانا gh -Гана gh -Гана gh -ঘানা gh -Gwana gh -Gana gh -Γκάνα gh -Ganao gh -غنا gh -Gána gh -Gana gh -×’×× ×” gh -घाना gh -Gana gh -ガーナ gh -ហ្កាណា gh -가나 gh -ຈີນ gh -Gana gh -Gana gh -Гана gh -Гана gh -Gana gh -ਘਾਨਾ gh -Gana gh -Gana gh -Gana gh -Гана gh -Gana gh -Gana gh -Гана gh -Gana gh -I-Ghana gh -கானா gh -Ғано gh -à¸à¸²à¸™à¸² gh -Гана gh -Гана gh -Gana gh -加纳 gh -è¿¦ç´ gh -Gibraltar gi -جبل طارق gi -Гібралтар gi -Гибралтар gi -জিবà§à¦°à¦²à§à¦Ÿà¦¾à¦° gi -Jibraltar gi -ΓιβÏÎ±Î»Ï„Î¬Ï gi -Gibraltaro gi -گیبرالتار gi -Giobráltar gi -Xibraltar gi -גיברלטר gi -जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° gi -Gibraltár gi -Gíbraltar gi -Gibilterra gi -ジブラルタル gi -지브롤터 gi -ມອລຕາ gi -Gibraltaras gi -GibraltÄrs gi -Гибралтар gi -Гибралтар gi -Ä ibiltar gi -ਗੀਬਰਾਲਟਾਰ gi -Гибралтар gi -Jiburalitari gi -Гибралтар gi -ஜிபà¯à®°à®²à¯à®Ÿà®¾à®°à¯ gi -Ҷабалуттариқ gi -ยิบรอลตา gi -Cebelitarık gi -Гібралтар gi -Гибралтар gi -Djibraltar gi -直布罗陀 gi -直布羅陀 gi -Greenland gl -Groenland gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl -গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦£à§à¦¡ gl -Griñland gl -Groenlàndia gl -Grónsko gl -Y Lasynys gl -Grønland gl -Grönland gl -Ισλανδία gl -Groenlandia gl -Gröönimaa gl -Gröönlanti gl -Groenland gl -Grienlân gl -An Ghraonlainn gl -Groenlándia gl -Grönland gl -Grænland gl -Groenlandia gl -グリーンランド gl -Grenlandija gl -Гренланд gl -Grønland gl -Gröönland gl -Groenland gl -Grønland gl -ਗਰੀਨਲੈਂਡ gl -Grenlandia gl -Gronelândia gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl -Goronilande gl -Ruonáeatnan gl -Grenlandija gl -Гренланд gl -Grenland gl -Grönland gl -Ð“Ñ€Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ gl -à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์ gl -Grönland gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ñ–Ñ gl -Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl -格陵兰 gl -格陵蘭 gl -Gambia gm -Gambië gm -غامبيا gm -Ð“Ð°Ð¼Ð±Ñ–Ñ gm -Ð“Ð°Ð¼Ð±Ð¸Ñ gm -গামবিয়া gm -Gambi gm -Gambija gm -Gàmbia gm -Gambie gm -Γκάμπια gm -Gambio gm -گامبیا gm -Gambie gm -An Ghaimbia gm -Gámbia gm -גמביה gm -जामà¥à¤¬à¤¿à¤¯à¤¾ gm -Gambija gm -Gambía gm -ガンビア gm -ហ្កាំប៊ី gm -ê°ë¹„ì•„ gm -à»àºàº¡àº¡àº² gm -Gambija gm -Gambija gm -Гамбија gm -Гамби gm -Gambja gm -ਗੈਂਬੀਆ gm -Gâmbia gm -Gâmbia gm -Ð“Ð°Ð¼Ð±Ð¸Ñ gm -Gambiya gm -Gambija gm -Гамбија gm -Gambija gm -காமà¯à®ªà®¿à®¯à®¾ gm -Гомбиё gm -à¹à¸à¸¡à¹€à¸šà¸µà¸¢ gm -Ð“Ð°Ð¼Ð±Ñ–Ñ gm -Ð“Ð°Ð¼Ð±Ð¸Ñ gm -Gambeye gm -冈比亚 gm -甘比亞 gm -Guinea gn -غينيا gn -ГвінÑÑ gn -Ð“Ð²Ð¸Ð½ÐµÑ gn -গিনি gn -Gine gn -Gvineja gn -Gini gn -Γουινέα gn -Gvineo gn -Ginea gn -گینه gn -Guinée gn -An Ghuine gn -Guiné gn -×’×™× ××” gn -गà¥à¤ˆà¤¨à¤¾ gn -Gvineja gn -Gínea gn -ギニア gn -ហ្គីណ០gn -기니 gn -ເຖາວັນ gn -GvinÄ—ja gn -Gvineja gn -Гвинеја gn -Гуйнеа gn -Ginea gn -ਗà©à¨‡à¨¨à©€à¨† gn -Gwinea gn -Guiné gn -Guiné gn -Ð“Ð²Ð¸Ð½ÐµÑ gn -Gineya gn -Gvineja gn -Гвинеја gn -Gvineja gn -கà¯à®¯à¯à®©à®¿à®¯à®¾ gn -Гине gn -à¸à¸´à¸™à¸µ gn -Gine gn -Ð“Ð²Ñ–Ð½ÐµÑ gn -Ð“Ð²Ð¸Ð½ÐµÑ gn -Guinêye gn -几内亚 gn -幾內亞 gn -Guadeloupe gp -غواديلوب gp -ГвадÑлупа gp -Гваделупа gp -গাডেলà§à¦ª gp -Gwadeloup gp -Gvadalupe gp -Guadalupe gp -Gwadel?p gp -ΓουαδελοÏπη gp -Gvadelupo gp -Guadalupe gp -Guadalupe gp -گوادلوپ gp -Guadalúip gp -Guadalupe gp -×’×ודלופה gp -गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‹à¤ª gp -Gvadelúpeyjar gp -Guadalupa gp -ä»é ˜ã‚°ã‚¢ãƒ‰ãƒ«ãƒ¼ãƒ— gp -ហ្គាដឺលុប gp -과들루프 gp -ເດີລຸຠgp -Gvandelupa gp -Гваделупе gp -Gwadelup gp -ਗà©à¨†à¨¡à©€à¨“ਪੀ gp -Gwadelupa gp -Guadalupe gp -Guadalupe gp -Guadelupa gp -Гваделупа gp -Gwaderupe gp -Гвадалупе gp -Gvadalupe gp -கà¯à®µà®¾à®Ÿà¯†à®²à¯à®ªà¯‹à®ªà¯ gp -Гвадалуппо gp -เà¸à¸²à¸°à¸à¸±à¸§à¹€à¸”อลูป gp -Guadelupa gp -Гваделупа gp -Гваделупа gp -瓜德罗普 gp -瓜德魯普 gp -Equatorial Guinea gq -Ekwatoriaal Guinea gq -غينيا الاستوائية gq -ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ gq -Екваториална Ð“Ð²Ð¸Ð½ÐµÑ gq -ইকà§à§Ÿà§‡à¦Ÿà§‹à¦°à¦¿à§Ÿà¦¾à¦² গিনি gq -Guine équatoriale gq -Ekvatorijalna Gvineja gq -Guinea Equatorial gq -Rovníková Guinea gq -Gini Gyhydeddol gq -Ækvatorial Guinea gq -Äquatorial-Guinea gq -ΙσημεÏινή Γουινέα gq -Ekvatora Gvineo gq -Guinea equatorial gq -Ekvatoriaal-Guinea gq -Ginea Ekuatoriala gq -گینه اکوادور gq -Päiväntasaajan Guinea gq -Guinée équatoriale gq -Guine Mheánchiorclach gq -Guinea Ecuatorial gq -×’×™× ××” המשוונית gq -इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गà¥à¤à¤¨à¤¾ gq -Ekvatorijalna Gvineja gq -EgyenlítÅ‘i Guinea gq -Miðbaugs-Gínea gq -Guinea Equatoriale gq -赤é“ギニア gq -ហ្គីណáŸâ€‹áž¢áŸáž€áŸ’វាទáŸážš gq -ì ë„ 기니 gq -àºàº²àº™àºªàº­àº™ gq -Ekvatoriaus GvinÄ—ja gq -EkvatoriÄlÄ Gvineja gq -Екваторијална Гвинеја gq -Equatorial Гуйнеа gq -Ginea Ekwatorjali gq -Ekvatorial-Guinea gq -Äquatoriaal-Guinea gq -Equatoriaal Guinea gq -Ekvatorial-Guinea gq -à¨à¨•ੂਲੇਟਰਲ ਗà©à¨ˆà¨¨à¨¿à¨† gq -Gwinea Równikowa gq -Guiné Equatorial gq -Guiné Equatorial gq -Guinea Ecuatorială gq -Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ gq -Gineya Ekwatoriyale gq -EkvatorialalaÅ¡-Guinea gq -Rovníkova Guinea gq -Ekvatorialna Gvineja gq -Екваторијална Гвинеја gq -Ekvatorijalna Gvineja gq -Ekvatorialguinea gq -ஈகோடோரியல௠கà¯à®¯à¯à®©à®¿à®¯à®¾ gq -Гинеи Экваторӣ gq -à¸à¸´à¸™à¸µ ตรงเส้นศูนย์สูตร gq -Ekvatoral Gine gq -Equatorlı Guinea gq -Екваторіальна Ð“Ð²Ñ–Ð½ÐµÑ gq -Экваториал Ð“Ð²Ð¸Ð½ÐµÑ gq -Guinêye EcwÃ¥toriÃ¥le gq -赤é“几内亚 gq -赤é“幾內亞 gq -Greece gr -Griekeland gr -اليونان gr -Yunanıstan gr -ГрÑÑ†Ñ‹Ñ gr -Ð“ÑŠÑ€Ñ†Ð¸Ñ gr -গà§à¦°à§€à¦¸ gr -Gres gr -GrÄka gr -Grècia gr -Řecko gr -Gwlad Groeg gr -Grækenland gr -Griechenland gr -Ελλάδα gr -Grekujo gr -Grecia gr -Kreeka gr -Grezia gr -یونان gr -Kreikka gr -Grikkaland gr -Grèce gr -Grikelân gr -An Ghréig gr -Grécia gr -יוון gr -गà¥à¤°à¥€à¤¸ gr -GrÄka gr -Görögország gr -Grikkland gr -Grecia gr -ギリシャ gr -ក្រិក gr -그리스 gr -àºàºµàºŠ gr -Graikija gr -GrieÄ·ija gr -Грција gr -Грек gr -GreÄ‹ja gr -Hellas gr -Grekenland gr -Griekenland gr -Hellas gr -Grèça gr -ਗਰੀਸ gr -Grecja gr -Grécia gr -Grécia gr -Grecia gr -Ð“Ñ€ÐµÑ†Ð¸Ñ gr -Ubugereki gr -Greika gr -Grécko gr -GrÄija gr -Грчка gr -GrÄka gr -I-Greece gr -Grekland gr -கிரீச௠gr -Юнон gr -à¸à¸£à¸µà¸‹ gr -Yunanistan gr -Yunanstan gr -Ð“Ñ€ÐµÑ†Ñ–Ñ gr -ЮнониÑтон gr -Hy Lạp gr -Grece gr -希腊 gr -希臘 gr -Guatemala gt -Gautemala gt -غواتيمالا gt -Quatemala gt -ГватÑмала gt -Гватемала gt -গà§à§Ÿà¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾ gt -Gvatemala gt -Gwatemala gt -Γουατεμάλα gt -Gvatemalo gt -گواتمالا gt -Guatamala gt -גו×טמלה gt -गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾ gt -Gvatemala gt -Gvatemala gt -グァテマラ gt -ហ្គាážáŸáž˜áŸ‰áž¶áž¡áž¶ gt -과테ë§ë¼ gt -àºàº±àº§à»€àº•ມາລາ gt -Gvatemala gt -Gvatemala gt -Гватемала gt -ГуÑтемала gt -Gwatemala gt -ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾ gt -Gwatemala gt -Гватемала gt -Gwatemala gt -Gvatemala gt -Гватемала gt -Gvatemala gt -I-Guatemala gt -கà¯à®µà®¾à®¤à¯à®¤à®®à®¾à®²à®¾ gt -Гватемоло gt -à¸à¸±à¸§à¹€à¸•มาลา gt -Гватемала gt -Гватемала gt -Gwatemala gt -å±åœ°é©¬æ‹‰ gt -瓜地馬拉 gt -Guam gu -غوام gu -Гуам gu -Гуам gu -গà§à§Ÿà¦¾à¦® gu -Gwam gu -Gw?m gu -Γκουάμ gu -Gvamo gu -گوام gu -גו×× gu -गà¥à¤µà¤¾à¤® gu -Gvam gu -グァム gu -ហ្គាំម gu -ê´Œ gu -à»àºàº¡àº¡àº² gu -Guama gu -Гвам gu -Гуам gu -Gwam gu -ਗà©à¨†à¨® gu -Гуам gu -Gwamu gu -Гуам gu -காம௠gu -Гуамма gu -à¸à¸§à¸¡ gu -Гуам gu -Гуам gu -Gwam gu -关岛 gu -關島 gu -Guinea-Bissau gw -غينيا-بيساو gw -ГвінÑÑ-БіÑаў gw -Ð“Ð²Ð¸Ð½ÐµÑ Ð‘Ð¸Ñау gw -গিনি-বিসো gw -Gine-Biso gw -Gvineja-Bisau gw -Gini-Bisaw gw -Γουινέα-Μπισσάου gw -Gvineo BisaÅ­a gw -Ginea-Bissau gw -گینه بیسائو gw -Guinée-Bissau gw -Guine-Bhissau gw -×’×™× ××” ביס×ו gw -गà¥à¤à¤¨à¤¾-बिसाऊ gw -Bissau-Guinea gw -Gínea-Bissá gw -ギニアビサオ gw -ហ្គីណáŸáž”៊ីសៅ gw -기니비사 gw -ລັດເຊີຠgw -Gvineja-Bisava gw -Гвинеја БиÑао gw -Гуйнеа-БиÑÑау gw -Ginea-Bissaw gw -ਗà©à¨‡à¨¨à¨¿à¨†-ਬਿਸ਼ਾਉ gw -Gwinea-Bissau gw -Guiné Bissau gw -Guiné-Bissau gw -ГвинеÑ-БиÑау gw -Gineya-Bisawu gw -Гвинеја БиÑао gw -Gvineja Bisao gw -கà¯à®¯à¯à®©à®¿à®¯à®¾-பிஸà¯à®¸à®¾ gw -Гвинеи БиÑÑои gw -à¸à¸´à¸™à¸µ - บิสซอ gw -Gine-Bissau gw -ГвінеÑ-БіÑау gw -ГвинеÑ-БиÑÑау gw -Guinêye-Bissaw gw -å‡ å†…äºšæ¯”ç» gw -幾內亞比紹 gw -Guyana gy -غيانا gy -ГвіÑна gy -Гуайана gy -গায়ানা gy -Gwiana gy -Gvajana gy -Giana gy -Γουιάνα gy -Gujano gy -گویان gy -Guyane gy -An Ghuáin gy -Guiana gy -גוי×× ×” gy -गà¥à¤¯à¤¾à¤¨à¤¾ gy -Gvæjana gy -ガイアナ gy -ហ្គីយ៉ាណា gy -ê°€ì´ì•„나 gy -ຈີນ gy -Gviana gy -Gajana gy -Гвајана gy -ГуÑна gy -Gujana gy -ਗà©à¨†à¨¨à¨¾ gy -Gujana gy -Guiana gy -Guiana gy -Guiana gy -Гайана gy -Giyana gy -Gvajana gy -Гвајана gy -Gvajana gy -கானா gy -Гуана gy -à¸à¸¹à¸¢à¸²à¸™à¹ˆà¸² gy -Guana gy -ГайÑна gy -Гвиана gy -圭亚那 gy -è“‹äºžç´ gy -Hong Kong SAR(China) hk -Hong Kong SAR (China) hk -Хонг Конг (Китай) hk -হং কং SAR(চীন) hk -Hong Kong SAR(Sina) hk -Hong Kong SAR(Xina) hk -Hong Kong SAR (Čína) hk -Hongkong SAR(Kina) hk -Χονγκ Κονγκ SAR (Κίνα) hk -Hongkong hk -Hong Kong SAR(Txina) hk -Hong Kong SAR (Kiina) hk -Hong Kong SAR (Chine) hk -Hong Cong SAR(An tSín) hk -Hong Kong hk -הונג קונג SAR (סין) hk -Hongkong (Kína) hk -Hong Kong (sjálfstjórnarhérað í Kína) hk -Hong Kong SAR(Cina) hk -香港(中国) hk -ហុងចិន (áž…áž·áž“) hk -Hong Kongas SAR(Kinija) hk -Хонг Конг СÐР(Кина) hk -Hongkong SAR(Kina) hk -Hong Kong hk -Hongkong SAR(Kina) hk -ਹਾਂਗ-ਕਾਂਗ SAR(ਚੀਨ) hk -Hong Kong SAR (Chiny) hk -Hong Kong SAR (China) hk -Гонконг hk -Hong Kong SAR (Ubushinwa) hk -Hongkong SAR(Kiinná) hk -Hong Kong SAR (Kitajska) hk -SAR Hong Kong (Кина) hk -SAR Hong Kong (Kina) hk -Hong Kong (Kina) hk -ஹாஙà¯à®•ாங௠SAR(சீனா) hk -ฮ่องà¸à¸‡ hk -Hong Kong (Çin) hk -Гонконг SAR (Китай) hk -Гонконг (Хитой) hk -中国香港特别行政区 hk -香港 SAR(中國) hk -Honduras hn -هندوراس hn -Ð“Ð°Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -হণà§à¦¡à§à¦°à¦¾à¦¸ hn -Hondures hn -Hondwras hn -ΟνδοÏÏα hn -Honduro hn -هندوراس hn -Hondúras hn -הונדורס hn -होंडà¥à¤°à¤¾à¤¸ hn -Hondúras hn -ホンジュラス hn -ហុងឌូរ៉ាស់ hn -온ë‘ë¼ìФ hn -ຫອນດູລັດ hn -HondÅ«ras hn -Hondurasa hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ħonduras hn -Hondures hn -ਹੰਨਡੂਰਸ hn -Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Hondirasi hn -Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -I-Honduras hn -ஆணà¯à®Ÿà¯à®°à®¾à®¸à¯ hn -Ò²Ð¸Ð½Ð´ÑƒÑ€Ð¾Ñ hn -ฮอนดูรัส hn -Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn -洪都拉斯 hn -å®éƒ½æ‹‰æ–¯ hn -Croatia hr -Kroasië hr -كرواتيا hr -Xırvatıstan hr -Ð¥Ð°Ñ€Ð²Ð°Ñ‚Ñ‹Ñ hr -ХърватÑка hr -কà§à¦°à§‹à§Ÿà¦¾à¦¶à¦¿à§Ÿà¦¾ hr -Kroatia hr -Hrvatska hr -Croàcia hr -Chorvatsko hr -Kroatien hr -Kroatien hr -ΚÏοατία hr -Kroatio hr -Croacia hr -Horvaatia hr -Kroazia hr -کرواسی hr -Kroatia hr -Kroatia hr -Croatie hr -Kroatië hr -An Chróit hr -Croácia hr -קרו×טיה hr -कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾ hr -Hrvatska hr -Horvátország hr -Kroasia hr -Króatía hr -Croazia hr -クロアãƒã‚¢ hr -ក្រូអាហhr -í¬ë¡œì•„í‹°ì•„ hr -ໂຄເອເທີຠhr -Kroatija hr -HorvÄtija hr -ХрватÑка hr -Кроати hr -Kroazja hr -Kroatia hr -Kroatien hr -Kroatië hr -Kroatia hr -Croacia hr -ਕਰੋਆਟਿਆ hr -Chorwacja hr -Croácia hr -Croácia hr -CroaÅ£ia hr -Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr -Korowasiya hr -Kroátia hr -Chorvátsko hr -HrvaÅ¡ka hr -ХрватÑка hr -Hrvatska hr -I-Croatia hr -Kroatien hr -கà¯à®°à¯‹à®Ÿà®¿à®¯à®¾ hr -Хорватӣ hr -โครเอเธีย hr -Hırvatistan hr -Kroatia hr -Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ñ–Ñ hr -Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr -CrowÃ¥ceye hr -克罗地亚 hr -克羅埃西亞 hr -Haiti ht -Haïti ht -هايتي ht -Гаіці ht -Хаити ht -হাইতি ht -Haití ht -Αϊτή ht -Haitio ht -Haití ht -هاییتی ht -Haïti ht -Háítí ht -×”×יטי ht -हैती ht -Haítí ht -ãƒã‚¤ãƒ ht -ហែទី ht -ì•„ì´í‹° ht -ວາດຮູບ - K ht -Haitis ht -Хаити ht -Хайти ht -Ħaiti ht -ਹਾਇਟੀ ht -Гаити ht -Hayiti ht -Хаити ht -ஹைதி ht -Ҳаити ht -ไฮติ ht -Гаїті ht -Гаити ht -Hayiti ht -海地 ht -海地 ht -Hungary hu -Hongarye hu -هنغاريا hu -Macarıstan hu -Вугоршчына hu -Ð£Ð½Ð³Ð°Ñ€Ð¸Ñ hu -হাঙà§à¦—েরী hu -Hungaria hu -MaÄ‘arska hu -Hongria hu -MaÄarsko hu -Hwngari hu -Ungarn hu -Ungarn hu -ΟυγγαÏία hu -Hungario hu -Hungría hu -Ungari hu -Hungaria hu -مجارستان hu -Unkari hu -Ungarn hu -Hongrie hu -Hongarije hu -An Ungáir hu -Hungria hu -הונגריה hu -हंगरी hu -MaÄ‘jarska hu -Magyarország hu -Hungaria hu -Ungverjaland hu -Ungheria hu -ãƒãƒ³ã‚¬ãƒªãƒ¼ hu -ហុងគ្រី hu -í—가리 hu -ຫັງàºàº²àº¥àºµ hu -Vengrija hu -UngÄrija hu -Унгарија hu -Унгар hu -Ungerija hu -Ungarn hu -Ungarn hu -Hongarije hu -Ungarn hu -Hongria hu -ਹੰਗਰੀ hu -WÄ™gry hu -Hungria hu -Hungria hu -Ungaria hu -Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu -Hongiriya hu -Ungár hu -MaÄarsko hu -Madžarska hu -МађарÑка hu -MaÄ‘arska hu -I-Hungary hu -Ungern hu -ஹஙà¯à®•ேரி hu -МаҷориÑтон hu -ฮังà¸à¸²à¸£à¸µ hu -Macaristan hu -Macarstan hu -Угорщина hu -Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu -Hongreye hu -匈牙利 hu -匈牙利 hu -Indonesia id -Indonesië id -إندونيسيا id -İndoneziya id -ІнданÑÐ·Ñ–Ñ id -Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id -ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾ id -Indonezi id -Indonezija id -Indonèsia id -Indonésie id -Indonesien id -Indonesien id -Ινδονησία id -Indonezio id -Indoneesia id -اندونزی id -Indonésie id -Indonesië id -An Indinéis id -Indonésia id -×ינדונזיה id -इंडोनेशिया id -Indonezija id -Indonézia id -Indónesía id -インドãƒã‚·ã‚¢ id -ឥណ្ឌូនáŸážŸáŸŠáž¸ id -ì¸ë„네시아 id -ອີàºà»‚ດນີເຊີຠid -Indonezija id -IndonÄ“zija id -Индонезија id -Индонез id -Indoneżja id -Indonesien id -Indonesië id -ਇੰਡੋਨੇਸ਼ੀਆ id -Indonezja id -Indonésia id -Indonésia id -Indonezia id -Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id -Indonesiya id -Indonézia id -Indonezija id -Индонезија id -Indonezija id -I-Indonesia id -Indonesien id -இநà¯à®¤à¯‹à®©à¯€à®šà®¿à®¯à®¾ id -Индонезӣ id -อินโดนีเซีย id -İndonezya id -İndonesia id -Ð†Ð½Ð´Ð¾Ð½ÐµÐ·Ñ–Ñ id -Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id -Indonezeye id -å°åº¦å°¼è¥¿äºš id -å°å°¼ id -Ireland ie -Ierland ie -أيرلندا ie -İrlandiya ie -ІрлÑÐ½Ð´Ñ‹Ñ ie -Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie -আয়ারলà§à¦¯à¦¾à¦£à§à¦¡ ie -Iwerzhon ie -Irska ie -Irlanda ie -Irsko ie -Iwerddon ie -Irland ie -Irland ie -ΙÏλανδία ie -Islando ie -Irlanda ie -Iirimaa ie -Irlanda ie -ایرلند ie -Irlanti ie -Ãrland ie -Irlande ie -Ierlân ie -Éire ie -Irlanda ie -×ירלנד ie -आयरलैंड ie -Irska ie -Ãrország ie -Irlandia ie -Ãrland ie -Irlanda ie -アイルランド ie -អៀរឡង់ ie -ì•„ì¼ëžœë“œ ie -ໄອà»àº¥àº™ ie -Airija ie -Īrija ie -ИрÑка ie -Ирланд ie -Irlanda ie -Irland ie -Irland ie -Ierland ie -Irland ie -Irlanda ie -ਆਇਰਲੈਂਡ ie -Irlandia ie -Irlanda ie -Irlanda ie -Irlanda ie -Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie -Irilande ie -Irlánda ie -Ãrsko ie -Irska ie -ИрÑка ie -Irska ie -I-Ireland ie -Irland ie -அயரà¯à®²à®¾à®¨à¯à®¤à¯ ie -Ирлонд ie -ไอร์à¹à¸¥à¸™à¸”์ ie -İrlanda ie -İreland, İrlandia ie -Ð†Ñ€Ð»Ð°Ð½Ð´Ñ–Ñ ie -Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie -Irlande ie -伊朗 ie -愛爾蘭 ie -Israel il -اسرائيل il -İzrail il -Ізраіль il -Израел il -ইসরাইল il -Izrael il -Izrael il -ΙσÏαήλ il -Israelo il -Iisrael il -اسراییل il -Ãsrael il -Israël il -Iosrael il -ישר×ל il -इज़राइल il -Izrael il -Izrael il -Ãsrael il -Israele il -イスラエル il -អ៊ីស្រាអែល il -ì´ìФë¼ì—˜ il -ອິດສະລະເອລ il -Izraelis il -IzraÄ“la il -Израел il -Изриал il -Iżrael il -ਇਜ਼ਰਾਈਲ il -Izrael il -Израиль il -Isirayeli il -Izrael il -Izrael il -Израел il -Izrael il -I-Israel il -இசà¯à®°à¯‡à®²à¯ il -ИÑроил il -อิสราเอล il -İsrail il -İsrael il -Ізраїль il -ИÑроил il -Israyel il -USirayeli il -以色列 il -以色列 il -India in -Indië in -الهند in -Hindistan in -Ð†Ð½Ð´Ñ‹Ñ in -Ð˜Ð½Ð´Ð¸Ñ in -ভারত in -Indez in -Indija in -Ãndia in -Indie in -Indien in -Indien in -Ινδία in -Hindujo in -هندوستان in -Intia in -Inde in -An India in -Ãndia in -הודו in -भारत in -Indija in -Indland in -インド in -ឥណ្ឌា in -ì¸ë„ in -ອິນເດີຠin -Indija in -Indija in -Индија in -ЭнÑтхÑг in -Indja in -Indien in -ਭਾਰਤ in -Indie in -Ãndia in -Ãndia in -Ð˜Ð½Ð´Ð¸Ñ in -Ubuhinde in -Indija in -Индија in -Indija in -I-India in -Indien in -இநà¯à®¤à®¿à®¯à®¾ in -ҲиндуÑтон in -อินเดีย in -Hindistan in -Hindstan in -Ð†Ð½Ð´Ñ–Ñ in -ҲиндиÑтон in -Ấn Äá»™ in -Inde in -å°åº¦ in -å°åº¦ in -Endiya in -Iraq iq -Irak iq -العراق iq -İraq iq -Ірак iq -Ирак iq -ইরাক iq -Irak iq -Irak iq -Irák iq -Irac iq -Irak iq -Irak iq -ΙÏάκ iq -Irako iq -Irak iq -Iraak iq -Irak iq -عراق iq -Irak iq -Irak iq -Irak iq -Irak iq -An Iaráic iq -עיר××§ iq -इराक iq -Irak iq -Irak iq -Ãrak iq -イラク iq -អ៊ីរ៉ាក់ iq -ì´ë¼í¬ iq -ອີລັຠiq -Irakas iq -IrÄka iq -Ирак iq -Ирак iq -Irak iq -Irak iq -Irak iq -Irak iq -ਇਰਾਕ iq -Irak iq -Iraque iq -Iraque iq -Irak iq -Ирак iq -Iraki iq -Iráka iq -Irák iq -Irak iq -Ирак iq -Irak iq -I-Iraq iq -Irak iq -ஈராக௠iq -Ироқ iq -อิรัภiq -Irak iq -Ğíraq iq -Ірак iq -Ироқ iq -Irak iq -伊拉克 iq -伊拉克 iq -Iran ir -أيران ir -Іран ir -Иран ir -ইরান ir -Ãrán ir -ΙÏάν ir -Irano ir -Iraan ir -ایران ir -An Iaráin ir -Irán ir -×יר×ן ir -इरान ir -Irán ir -Ãran ir -イラン ir -អ៊ីរ៉ង់ ir -ì´ëž€ ir -ອີລັຠir -Iranas ir -IrÄna ir -Иран ir -Иран ir -ਈਰਾਨ ir -Irão ir -Irã ir -Иран ir -Irani ir -Irána ir -Irán ir -Иран ir -I-Iran ir -ஈரான௠ir -Эрон ir -อิหร่าน ir -İran ir -İran ir -Іран ir -Эрон ir -伊朗 ir -伊朗 ir -Iceland is -Ysland is -أيسلندا is -İslandiya is -ІÑьлÑÐ½Ð´Ñ‹Ñ is -ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is -আইসলà§à¦¯à¦¾à¦£à§à¦¡ is -Island is -Island is -Islàndia is -Island is -Ynys yr I? is -Island is -Island is -Ισλανδία is -Islando is -Islandia is -Island is -Islandia is -ایسلند is -Islanti is -Ãsland is -Islande is -Yslân is -An Ãoslainn is -Islándia is -×יסלנד is -आयरलैंड is -Island is -Izland is -Islandia is -Ãsland is -Islanda is -アイスランド is -អ៊ីស្លង់ is -ì•„ì´ìŠ¬ëž€ë“œ is -ໄອຊà»àº¥àº™ is -Islandija is -Islande is -ИÑланд is -ИÑланд is -Islandja is -Island is -Island is -IJsland is -Island is -Islandia is -ਆਈਸਲੈਂਡ is -Islandia is -Islândia is -Islândia is -Islanda is -ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is -Isilande is -Islánda is -Island is -Islandija is -ИÑланд is -Island is -I-Iceland is -Island is -தீவ௠is -ИÑлонд is -ไอซ์à¹à¸¥à¸™à¸”์ is -İzlanda is -İsland is -ІÑÐ»Ð°Ð½Ð´Ñ–Ñ is -ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is -Izlande is -冰岛 is -冰島 is -Icelandi is -Italy it -Italië it -ايطاليا it -İtalyia it -Ð†Ñ‚Ð°Ð»Ñ–Ñ it -Ð˜Ñ‚Ð°Ð»Ð¸Ñ it -ইতালী it -Italia it -Italija it -Itàlia it -Itálie it -Yr Eidal it -Italien it -Italien it -Ιταλία it -Italio it -Italia it -Itaalia it -Italia it -ایتالیا it -Italia it -Italia it -Italie it -Italië it -An Iodáil it -Itália it -×יטליה it -इटली it -Italija it -Olaszország it -Italia it -Ãtalía it -Italia it -イタリア it -អ៊ីážáž¶áž›áž¸ it -ì´íƒˆë¦¬ì•„ it -ອີຕາລີ it -Italija it -ItÄlija it -Италија it -Итали it -Itali it -Italja it -Italia it -Italien it -Italië it -Italia it -Italia it -ਇਟਲੀ it -WÅ‚ochy it -Itália it -Itália it -Italia it -Ð˜Ñ‚Ð°Ð»Ð¸Ñ it -Ubutaliyani it -Itália it -Taliansko it -Italija it -Италија it -Italija it -I-Italy it -Italien it -இதà¯à®¤à®¾à®²à®¿ it -Итолиё it -อิตาลี it -İtalya it -İtalia it -Ð†Ñ‚Ð°Ð»Ñ–Ñ it -Ð˜Ñ‚Ð°Ð»Ð¸Ñ it -à it -ItÃ¥leye it -Ithali it -æ„大利 it -義大利 it -Jamaica jm -Jamaika jm -جامايكا jm -Yamayka jm -Ямайка jm -Ямайка jm -জামাইকা jm -Jamaika jm -Jamajka jm -Jamajka jm -Jamaika jm -Τζαμάικα jm -Jamajko jm -Jamaika jm -جاماییکا jm -Jamaika jm -Jamaïque jm -An Iamáice jm -Xamaica jm -×’'מייקה jm -जमैका jm -Jamajka jm -Jamaika jm -Jamaika jm -Jamaíka jm -Giamaica jm -ジャマイカ jm -ហ្សាម៉ាអ៊ិគ jm -ìžë©”ì´ì¹´ jm -ຈາໄມàºàº² jm -Jamaika jm -Jamaika jm -Јамајка jm -Ямайк jm -Ä amajka jm -Jamaika jm -ਜੈਮੇਕਾ jm -Jamajka jm -Ямайка jm -Jamayika jm -Jamajka jm -Jamajka jm -Јамајка jm -Jamajka jm -I-Jamaica jm -சமெயà¯à®•à¯à®•ா jm -Ҷомойко jm -จาไมà¸à¹‰à¸² jm -Jamaika jm -Jamayka jm -Ямайка jm -Ямайка jm -Djamayike jm -牙买加 jm -牙買加 jm -Jordan jo -Jordaan jo -الأردن jo -İordaniya jo -Ð¯Ñ€Ð´Ð°Ð½Ñ–Ñ jo -Ð™Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo -জরà§à¦¡à¦¾à¦¨ jo -Jordani jo -Jordània jo -Jordán jo -Gwlad Iorddonen jo -Jordanien jo -ΙοÏδανία jo -Jordanio jo -Jordania jo -Jordaania jo -Jordania jo -اردن jo -Jordania jo -Jordanie jo -Jordanië jo -An Iordáin jo -Xordánia jo -ירדן jo -जॉरà¥à¤¡à¤¨ jo -Jordánia jo -Jórdanía jo -Giordania jo -ヨルダン jo -ហ្ស៊កដានី jo -요르단 jo -ຈà»à»àº”ນ jo -Jordanija jo -JordÄnija jo -Јордан jo -Ðрдан jo -Ä ordan jo -Jordanien jo -Jordanië jo -ਜਾਰਡਨ jo -Jordania jo -Jordânia jo -Jordânia jo -Iordania jo -Ð˜Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo -Yorudani jo -Jordánia jo -Jordánsko jo -Jordanija jo -Јордан jo -I-Jordan jo -Jordanien jo -ஜோரà¯à®Ÿà®¾à®©à¯ jo -Урдон jo -จอร์à¹à¸”น jo -Ürdün jo -Ð™Ð¾Ñ€Ð´Ð°Ð½Ñ–Ñ jo -Иордан jo -Djordaneye jo -约旦 jo -ç´„æ—¦ jo -Ijolidani jo -Japan jp -اليابان jp -Yaponiya jp -Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp -Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp -জাপান jp -Japon jp -Japó jp -Japonsko jp -Siapan jp -Ιαπωνία jp -Japanio jp -Japón jp -Jaapan jp -Japonia jp -ژاپن jp -Japani jp -Japon jp -An tSeapáin jp -Xapón jp -יפן jp -जापान jp -Japán jp -Jepang jp -Giappone jp -日本 jp -ជប៉ុន jp -ì¼ë³¸ jp -àºàºµà»ˆàº›àº¸à»ˆàº™ jp -Japonija jp -JapÄna jp -Јапонија jp -Япон jp -Jepun jp -Ä appun jp -Japon jp -ਜਾਪਾਨ jp -Japonia jp -Japão jp -Japão jp -Japonia jp -Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp -Ubuyapani jp -Japána jp -Japonsko jp -Japonska jp -Јапан jp -I-Japan jp -சபà¯à®ªà®¾à®©à¯ jp -Ҷопон jp -à¸à¸µà¹ˆà¸›à¹ˆà¸¸à¸™ jp -Japonya jp -Japan, Yaponia jp -Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp -Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp -Nhật bản jp -Djapon jp -日本 jp -日本 jp -Kenya ke -Kenië ke -كينيا ke -ÐšÐµÐ½Ñ–Ñ ke -ÐšÐµÐ½Ð¸Ñ ke -কেনিয়া ke -Kenija ke -Keňa ke -Cenia ke -Kenia ke -Κένυα ke -Kenjo ke -Kenia ke -کنیا ke -Kenia ke -An Chéinia ke -Kenia ke -×§× ×™×” ke -केनà¥à¤¯à¤¾ ke -Kenija ke -Kenía ke -ケニア ke -កáŸáž“យ៉ា ke -ì¼€ëƒ ke -ເວນດາ ke -Kenija ke -Kenija ke -Кенија ke -ÐšÐµÐ½Ð¸Ñ ke -Kenja ke -Kenia ke -ਕੀਨੀਆ ke -Kenia ke -Quénia ke -Quênia ke -Kenia ke -ÐšÐµÐ½Ð¸Ñ ke -Keňa ke -Kenija ke -Кенија ke -Kenija ke -கெனà¯à®¯à®¾ ke -Куниё ke -เคนยา ke -Kenia ke -ÐšÐµÐ½Ñ–Ñ ke -ÐšÐµÐ½Ð¸Ñ ke -Kenia ke -肯尼亚 ke -肯亞 ke -Kyrgyzstan kg -قيرغيزستان kg -КыргызÑтан kg -КиргизÑтан kg -কিরà§à¦—িজসà§à¦¤à¦¾à¦¨ kg -Kirgistan kg -Kirgistan kg -Kyrgigstan kg -Kyrgyzstán kg -Cyrgystan kg -Kirgizistan kg -Kirgisien kg -ΚιÏγιζιστάν kg -Kirgizujo kg -Kyrgyzstán kg -Kõrgõzstan kg -قرقیزستان kg -Kirghizstan kg -An Chirgeastáin kg -Kirguizistán kg -קירגיסטן kg -किरà¥à¤—िजिसà¥à¤¤à¤¾à¤¨ kg -Kirgizisztán kg -Kirgisistan kg -Kirghizistan kg -キルギスタン kg -គៀរហ្គីស្ážáž„់ kg -키르기스스탄 kg -ຄສິຕັລ kg -Kirgistanas kg -KirgizstÄna kg -КиргиÑтан kg -КиргизÑтан kg -Kirgiżstan kg -Kirgisistan kg -Kirgisien kg -Kirgizië kg -Kirgisistan kg -ਕਿਰਗਸਤਾਨ kg -Kigistan kg -Quirguistão kg -Quirguistão kg -Kirgiztan kg -КиргизÑтан kg -Kirigizisitani kg -Kirgisistan kg -Kirgizstan kg -КиргиÑтан kg -Kirgistan kg -Kirgizistan kg -கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯ kg -ҚирғизиÑтон kg -คีจิสถาน kg -Kırgızistan kg -Qırğızstan kg -КиргизÑтан kg -ҚирғизиÑтон kg -Kirguiztan kg -å‰å°”剿–¯æ–¯å¦ kg -å‰çˆ¾å‰æ–¯ kg -Cambodia kh -Kambodië kh -كمبوديا kh -Камбоджа kh -Камбоджа kh -কামবোডিয়া kh -Kambodj kh -KamboÄ‘a kh -Cambodja kh -Kambodža kh -Kambodscha kh -Καμπότζη kh -KamboÄo kh -Kambodža kh -Canbodia kh -کامبوج kh -Kambodza kh -Cambodge kh -Cambodja kh -An Chambóid kh -Camboia kh -קמבודיה kh -कमà¥à¤¬à¥‹à¤¡à¤¿à¤¯à¤¾ kh -KamboÄ‘a kh -Kambodzsa kh -Kambódía kh -Cambogia kh -カンボジア kh -កម្ពុជា kh -캄보디아 kh -ໂຄລຳເບີຠkh -Kambodža kh -Kambodža kh -Камбоџа kh -Камбодиа kh -Kemboja kh -Kambodja kh -Kambodsja kh -Kambodscha kh -Cambodja kh -Kambodsja kh -ਕੰਬੋਡੀਆ kh -Kambodża kh -Cambodja kh -Cambodja kh -Cambogia kh -Камбоджа kh -Kamboji kh -Kamboža kh -Kambodža kh -Kambodža kh -Камбоџа kh -Kambodža kh -Kambodja kh -கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®¾ kh -Камбуҷа kh -à¸à¸±à¸¡à¸žà¸¹à¸Šà¸² kh -Kamboçya kh -Kambodia kh -Камбоджа kh -Камбоджа kh -Cam pu chia kh -Cambodje kh -柬埔寨 kh -柬埔寨 kh -Kiribati ki -كيريباتي ki -Кiрыбацi ki -Кирибати ki -কিরিবাটি ki -Ciribati ki -ΚιÏιμπάτι ki -Kiribato ki -کیریباتی ki -Ciribeas ki -קיריב×טי ki -किरीबाती ki -Kíribatí ki -キリãƒã‚¹ ki -គិរិបាទី ki -키리바시 ki -à»àºŸàº„ທັລ - K ki -Кирибати ki -Крибати ki -ਕਿਰਿਬਟੀ ki -Кирибати ki -Кирибати ki -கிரிபடி ki -Карибот ki -คิริบาติ ki -Кірібаті ki -Кирибати ki -基里巴斯 ki -å‰é‡Œå·´æ–¯ ki -Comoros km -جزر القمر km -Каморы km -КоморÑки оÑтрови km -কমোরস km -Komoros km -Komori km -Komory km -Ynysoedd Y Comoros km -Comorerne km -Komoren km -ΚομόÏες km -Komoroj km -Komoorid km -کوموروس km -Komorit km -Comores km -Na Comóir km -קומורוס km -कोमोरो km -Kómoreyjar km -Comore km -コモロ km -កុំម៉ូរ៉ូស km -코모로 km -ສີ km -Komoru salas km -КоморÑки оÑтрови km -Ð¡Ð¾Ð¼Ð¾Ñ€Ð¾Ñ km -Komoros km -Komorene km -Komoren km -Komorane km -ਕੋਮੋਰੋਸ km -Komory km -КоморÑкие оÑтрова km -Komore km -Komorot km -Komori km -Комора km -Komora km -Komorerna km -காமாரோஸ௠km -ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km -โคโมรอส km -Komoros km -Komorlar km -КоморÑькі оÑтрови km -ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km -Comores km -ç§‘æ‘©ç½— km -葛摩 km -St. Kitts and Nevis kn -St. Kitts en Nevis kn -سانت كيتس Ùˆ نيÙيس kn -St. Kitts vÉ™ Nevis kn -СÑнт-КрыÑтофер Ñ– ÐÑÐ²Ñ–Ñ kn -Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -সেনà§à¦Ÿ কিটস à¦à¦¬à¦‚ নেভিস kn -S. Kitts ha Nevis kn -St. Kitts i Nevis kn -Sv. Kitts a Nevis kn -Ynysoedd St. Kitts a Nevis kn -St. Kitts-Nevis kn -St. Kitts und Nevis kn -Άγιος ΧÏιστόφοÏος (Σαιντ Κιτς) και Îέβις kn -Sent-Kristofo kaj Neviso kn -St. Kitts y Nevis kn -St. Kitts ja Nevis kn -St. Kitts eta Nevis kn -سن کیتس Ùˆ نویس kn -St. Kitts ja Nevis kn -St Kitts et Nevis kn -St. Kitts en Nevis kn -San Críostóir Nimheas kn -Saint Kitts e Nevis kn -סנט קיטס ונביס kn -सेंट किटà¥à¤¸ तथा नेविस kn -St. Kitts és Nevis kn -St. Kitts dan Nevis kn -Sankti Kristófer og Nevis kn -Saint Kitts e Nevis kn -セントクリストファーãƒã‚¤ãƒ“ス kn -សង់ឃីហនិង áž“áŸážœáž¸ážŸ kn -세ì¸íЏ 키츠 네비스 kn -Å v. Kitts ir Nevis kn -Senkitsa un Nevisa kn -Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -St. ÐšÐ¸Ñ‚Ñ‚Ñ Ð±Ð° ÐÐµÐ²Ð¸Ñ kn -St. Kitts u Nevis kn -St. Kitts og Nevis kn -St. Kitts un Nevis kn -St. Kitts en Nevis kn -St. Kitts og Nevis kn -St. Kitts le Nevis kn -St. Kitts e Nevis kn -ਸੇਂਟ ਕਿਟਸ ਤੇ ਨਿਵੀਸ kn -St. Kitts e Nevis kn -St Kitts e Nevis kn -Sf. Kitts ÅŸi Nevis kn -Сент-ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -Mutagatifu Kitsi na Nevisi kn -St. Kitts ja Nevis kn -St. Kitts a Nevis kn -St. Kitts in Nevis kn -Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn -Sv. Kits i Nevis kn -I-St. Kitts and Nevis kn -St. Kitts och Nevis kn -செயினà¯à®Ÿà¯ கிடà¯à®šà¯ & நெவிச௠kn -Синт ÐšÐ¸Ñ‚Ñ‚Ñ Ð²Ð° ÐÐµÐ²Ð¸Ñ kn -เซนต์à¸à¸´à¸•ส์à¹à¸¥à¸°à¹€à¸™à¸§à¸´à¸ª kn -St. Kitts ve Nevis kn -Santa Kitts wä Nevis kn -Ð¤ÐµÐ´ÐµÑ€Ð°Ñ†Ñ–Ñ Ð¡ÐµÐ½Ñ‚-ÐšÑ–Ñ‚Ñ Ñ– ÐÐµÐ²Ñ–Ñ kn -Сент-КриÑтофер ва ÐÐµÐ²Ð¸Ñ kn -St. Kitts na Nevis kn -St. Kitts và Nevis kn -St. Kitts neNevis kn -圣基茨和尼维斯 kn -è–å…‹ç†æ–¯å¤šç¦åŠå°¼ç¶­æ–¯ kn -St. Kitts kanye no-Nevis kn -North Korea kp -Noord Korea kp -كوريا الشمالية kp -Åžimali Koreya kp -ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ ÐšÐ°Ñ€ÑÑ kp -Северна ÐšÐ¾Ñ€ÐµÑ kp -উতà§à¦¤à¦° কোরিয়া kp -Norzh-Korea kp -Sjeverna Koreja kp -Corea del Nord kp -Severní Korea kp -Gogledd Corea kp -Nordkorea kp -Nord-Korea kp -Î’ÏŒÏεια ΚοÏέα kp -Nordkoreo kp -Corea del Norte kp -Põhja-Korea kp -Ipar Korea kp -کره شمالی kp -Pohjois-Korea kp -Norðurkorea kp -Corée du nord kp -Noard-Korea kp -An Chóiré Thuaidh kp -Corea do Norte kp -צפון קורי××” kp -उतà¥à¤¤à¤°à¥€ कोरिया kp -Sjeverna Koreja kp -Észak-Korea kp -Korea Utara kp -Norður-Kórea kp -Corea del Nord kp -æœé®®æ°‘主主義人民共和国 kp -កូរ៉áŸâ€‹ážáž¶áž„​ជើង kp -ì¡°ì„ ë¯¼ì£¼ì£¼ì˜ ì¸ë¯¼ê³µí™”êµ­ kp -ເàºàº»àº²àº¥àºµà»€àº«àº™àº·àº­ kp -Å iaurÄ—s KorÄ—ja kp -ZiemeļKoreja kp -Северна Кореја kp -Хойд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kp -Korea ta' Fuq kp -Nord-Korea kp -Noordkorea kp -Noord-Korea kp -Nord-Korea kp -Lebowa la Korea kp -Corea dèu Nord kp -ਉੱਤਰੀ ਕੋਰੀਆ kp -Korea Północna kp -Coreia do Norte kp -Coréia do Norte kp -Coreea de Nord kp -Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kp -Koreya y'Amajyaruguru kp -Davvi-Korea kp -severná Kórea kp -Severna Koreja kp -Северна Кореја kp -Severna Koreja kp -I-North Korea kp -Nordkorea kp -வட கொரியா kp -КореÑи Шимолӣ kp -เà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­ kp -Kuzey Kore kp -Tönyaq Korea kp -Північна ÐšÐ¾Ñ€ÐµÑ kp -Шимолий ÐšÐ¾Ñ€ÐµÑ kp -Devhula ha Korea kp -Bắc Triá»u Tiên kp -Bijhe Corêye kp -Umntla Korea kp -æœé²œ kp -北韓 kp -Enyakatho ne-Korea kp -South Korea kr -Suid Korea kr -كوريا الجنوبية kr -CÉ™nubi Koreya kr -ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ ÐšÐ°Ñ€ÑÑ kr -Южна ÐšÐ¾Ñ€ÐµÑ kr -দকà§à¦·à¦¿à¦£ কোরিয়া kr -Su-Korea kr -Južna Koreja kr -Corea del Sud kr -Jižní Korea kr -De Corea kr -Sydkorea kr -Süd-Korea kr -Îότια ΚοÏέα kr -Sudkoreo kr -Corea del Sur kr -Lõuna-Korea kr -Hego Korea kr -کره جنوبی kr -Etelä-Korea kr -Suðurkorea kr -Corée du sud kr -Sûd-Korea kr -An Chóiré Theas kr -Corea do Sur kr -×“×¨×•× ×§×•×¨×™××” kr -दकà¥à¤·à¤¿à¤£à¥€ कोरिया kr -Južna Koreja kr -Dél-Korea kr -Korea Selatan kr -Suður-Kórea kr -Corea del Sud kr -大韓民国 kr -កូរ៉áŸâ€‹ážáž¶áž„​ážáŸ’បូង kr -대한민국 kr -ເàºàº»àº²àº¥àºµà»ƒàº•້ kr -Pietų KorÄ—ja kr -DievidKoreja kr -Јужна Кореја kr -Өмнөд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kr -Korea t'Isfel kr -Sør-Korea kr -Söödkorea kr -Zuid-Korea kr -Sør-Korea kr -Borwa bja Korea kr -Corea dèu Sud kr -ਦੱਖਣੀ ਕੋਰੀਆ kr -Korea PoÅ‚udniowa kr -Coreia do Sul kr -Coréia do Sul kr -Coreea de Sud kr -Ð®Ð¶Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kr -Koreya y'Amajyepfo kr -Lulli-Korea kr -Južná Kórea kr -Južna Koreja kr -Јужна Кореја kr -Južna Koreja kr -I-South Korea kr -Sydkorea kr -தென௠கொரியா kr -КореÑи Ҷанубӣ kr -เà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้ kr -Güney Kore kr -Könyaq Korea kr -Південна ÐšÐ¾Ñ€ÐµÑ kr -Жанубий ÐšÐ¾Ñ€ÐµÑ kr -Korea tshipembe kr -Hàn Quốc kr -Nonne Corêye kr -Umzantsi Korea kr -韩国 kr -å—韓 kr -Emzansi Korea kr -Kuwait kw -Kuwaït kw -الكويت kw -КувÑйт kw -Кувейт kw -কà§à§Ÿà§‡à¦¤ kw -Kowaet kw -Kuvajt kw -Kuvajt kw -Coweit kw -Κουβέιτ kw -Kuvajto kw -Kuveit kw -کویت kw -Kuvait kw -Kowait kw -Koeweit kw -Cuáit kw -כווית kw -कà¥à¤µà¥ˆà¤¤ kw -Kuvajt kw -Kuvait kw -Kúveit kw -クェート kw -គុយវ៉ែហkw -쿠웨ì´íЏ kw -à»àº•້ມຮູບ- K kw -Kuveitas kw -Kuveita kw -Кувајт kw -Кувейт kw -Koeweit kw -ਕà©à¨µà©ˆà¨¤ kw -Koweit kw -Kuveit kw -Кувейт kw -Koweti kw -Kuvajt kw -Kuvajt kw -Кувајт kw -Kuvajt kw -I-Kuwait kw -கà¯à®µà¯ˆà®¤à¯ kw -Қувейт kw -คูเวต kw -Küwäyt kw -KКувейт kw -Кувайт kw -Kuweyt kw -ç§‘å¨ç‰¹ kw -ç§‘å¨ç‰¹ kw -Cayman Islands ky -Cayman Eilande ky -جزر الكايمان ky -Кайманови оÑтрови ky -কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ky -Inizi Kaeman ky -Kajmanska ostrva ky -Illes Caimà ky -Kajmanské ostrovy ky -Ynysoedd Caiman ky -Cayman-øerne ky -Kaiman-Inseln ky -Îησιά Κάυμαν ky -Kejmanoj ky -Islas Caimán ky -Kaimanisaared ky -Kaiman Irlak ky -جزایر Ú©Ùیمن ky -Cayman-saaret ky -ÃŽles Caïman ky -Kaaiman Eilannen ky -Oileáin na gCadhman ky -Illas Caimán ky -××™×™ קיימן ky -केमन आइलैंड ky -Kajmanski Otoci ky -Kajmán-szigetek ky -Cayman-eyjar ky -Isole Cayman ky -英領ケイマン諸島 ky -កោះ​កៃម៉ាន ky -ì¼€ì´ë§¨ ì œë„ ky -ຄາຕາລັນ ky -Kaimanų salos ky -Kaimanu salas ky -КајманÑки ОÑтрови ky -Cayman арлууд ky -Gżejjer Cayman ky -Caymanøyene ky -Kayman-Inseln ky -Kaaiman Eilanden ky -Caymanøyane ky -ਕਾਅਮਾਨ ਟਾਪੂ ky -Kajmany ky -Ilhas Caimão ky -Ilhas Cayman ky -Insulele Cayman ky -Каймановы оÑтрова ky -Ibirwa bya Kayimani ky -Caymansullot ky -Kajmanske Ostrovy ky -Kajmanski otoki ky -КајманÑка оÑтрва ky -Kajmanska ostrva ky -Caymanöarna ky -கேமான௠தீவà¯à®•ள௠ky -Ҷазираи Кайман ky -หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™ ky -Cayman Adaları ky -Kayman Utrawları ky -Кайман оÑтрів ky -Кайман Ороллари ky -Iyes Cayman ky -开曼群岛 ky -開曼群島 ky -Kazakhstan kz -كازاخستان kz -КазахÑтан kz -КазахÑтан kz -কাজাকসà§à¦¤à¦¾à¦¨ kz -Kazakstan kz -Kazahstan kz -Kazachstán kz -Casacstan kz -Kasachstan kz -Καζακστάν kz -KazaÄ¥ujo kz -Kazakhstán kz -Kasahstan kz -قزاقستان kz -Kazakstan kz -Kazachstan kz -An Chasacstáin kz -Kazaxistán kz -קזחסט×ן kz -कज़ाखिसà¥à¤¤à¤¾à¤¨ kz -Kazahstan kz -Kazahsztán kz -Kasakstan kz -Kazakistan kz -カザフスタン kz -កាហ្សាក់ស្ážáž„់ kz -ì¹´ìží스탄 kz -à»àºà»àº¥àºàº•ິຠ- K kz -Kazachstanas kz -KazahstÄna kz -КазакÑтан kz -Казак kz -Każakstan kz -Kasakhstan kz -Kasachstan kz -Kazachstan kz -Kasakhstan kz -ਕਾਜ਼ਾਕਸਤਾਨ kz -Kazachstan kz -Cazaquistão kz -Cazaquistão kz -Cazahstan kz -КазахÑтан kz -Kazakisitani kz -Kasakhstan kz -Kazachstan kz -Kazahstan kz -КазахÑтан kz -Kazahstan kz -Kazakstan kz -கஜஸà¯à®¤à®¾à®©à¯` kz -ҚазоқиÑтон kz -คาซัคสถาน kz -Kazakistan kz -Qazaqstan kz -КазахÑтан kz -ҚозоғиÑтон kz -Kazaxhtan kz -哈è¨å…‹æ–¯å¦ kz -哈薩克 kz -Laos la -لاوس la -Ð›Ð°Ð¾Ñ la -Ð›Ð°Ð¾Ñ la -লাওস la -Λάος la -Laoso la -لائوس la -Láós la -ל×וס la -लाओस la -Laosz la -ラオス la -ឡាវ la -ë¼ì˜¤ìФ la -ລາວ la -Laosas la -Laosa la -Ð›Ð°Ð¾Ñ la -Ð›Ð°Ð¾Ñ la -ਲਿਉਸ la -Ð›Ð°Ð¾Ñ la -Lawosi la -Ð›Ð°Ð¾Ñ la -லாஸ௠la -Ð›Ð°Ð¾Ñ la -ลาว la -Ð›Ð°Ð¾Ñ la -Ð›Ð°Ð¾Ñ la -Lào la -Lawosse la -è€æŒ la -寮國 la -Lebanon lb -Libanon lb -لبنان lb -Ліван lb -Ливан lb -লেবানন lb -Liban lb -Liban lb -Líban lb -Libanon lb -Libanus lb -Libanon lb -Libanon lb -Λίβανος lb -Libano lb -Líbano lb -Liibanon lb -Libano lb -لبنان lb -Libanon lb -Libanon lb -Liban lb -Libanon lb -An Liobáin lb -Líbano lb -לבנון lb -लेबनान lb -Libanon lb -Libanon lb -Líbanon lb -Libano lb -レãƒãƒŽãƒ³ lb -លីបង់ lb -레바논 lb -ເດນ່ງນ lb -Libanas lb -LibÄna lb -Либан lb -Либанон lb -Lubnan lb -Libanu lb -Libanon lb -Libanon lb -Libanon lb -Libanon lb -ਲਿਬਨਾਨ lb -Liban lb -Líbano lb -Líbano lb -Liban lb -Ливан lb -Libani lb -Libanon lb -Libanon lb -Libanon lb -Либан lb -Liban lb -I-Lebanon lb -Libanon lb -லெபனான௠lb -Лубнон lb -เลบานอน lb -Ліван lb -Лебанон lb -Li Băng lb -Liban lb -黎巴嫩 lb -黎巴嫩 lb -St. Lucia lc -سانت لوسيا lc -СÑнт-ЛюÑÑ–Ñ lc -Св. Ð›ÑƒÑ‡Ð¸Ñ lc -সেনà§à¦Ÿ লà§à¦¸à¦¿à§Ÿà¦¾ lc -S. Lucia lc -Svatá Lucie lc -St. Lwsia lc -Σάντα Λουτσία lc -Sent-Lucio lc -Santa Lucía lc -سن لوسیا lc -Sankta Lusia lc -Sainte Lucie lc -San Lúisia lc -Santa Lucia lc -סנטה לוסיה lc -सेंट लूसिया lc -Sankti Lúsía lc -Santa Lucia lc -セントルシア lc -សង់លូស៊ីយ៉ា lc -세ì¸íЏ 루시아 lc -ເຊັນລູເຊີຠlc -Å v Liucija lc -Sv. LÅ«cija lc -Св. Луција lc -St. ЛуÑиа lc -St. LuÄ‹ija lc -ਸੇਂਟ ਲੂਉਸ lc -Santa Lúcia lc -Santa Lúcia lc -Sf. Lucia lc -Сент-ЛюÑÐ¸Ñ lc -Mutagatifu Lusiya lc -Sv. Júlia lc -Sv. Lucija lc -Св. Луција lc -Sv. Lucija lc -I-St. Lucia lc -செனà¯à®Ÿà¯ லூசியா lc -Синт ЛуÑиё lc -เซนต์ลูเซีย lc -Santa Lüçiä lc -Сент-ЛюÑÑ–Ñ lc -Сент-ЛюÑÐ¸Ñ lc -Ste Luceye lc -圣å¢è¥¿äºš lc -è–露西亞 lc -Liechtenstein li -ليشتنشتاين li -ЛіхтÑнштÑйн li -Лихтенщайн li -লিখটেনসà§à¦Ÿà¦¾à¦‡à¦¨ li -LihtenÅ¡tajn li -LichtenÅ¡tejnsko li -Λίχτενσταϊν li -LiÄ¥tenÅtejno li -Liechtestein li -لیختن اشتاین li -An Lichtinstéin li -ליכטנשטין li -लिचटेनसà¥à¤Ÿà¥€à¤¨ li -LihtenÅ¡tajn li -リヒテンシュタイン li -លិចទáŸáž“ស្ážáŸ‚áž“ li -리히í…ìŠˆíƒ€ì¸ li -ຟ້າà»àº¡àºš li -LichtenÅ¡teinas li -LihtenÅ¡teina li -Лихтенштајн li -ЛихтÑнштайн li -Liechtensteen li -ਲੀਚਟੀਨਸਟੀਨ li -Lichtensztajn li -Лихтенштейн li -Liyeshitensiteyini li -Лихтенштајн li -LihtenÅ¡tajn li -லசà¯à®šà¯†à®©à¯à®¸à¯à®Ÿà¯†à®©à¯ li -Лихтанштоин li -ลิชเทนสไตน์ li -LihtenÅŸtayn li -Lihtenstein li -Ліхтенштейн li -Лихтенштейн li -Lîchtensteyn li -列支敦士登 li -列支敦斯登 li -Sri Lanka lk -سريلانكا lk -Шры-Ланка lk -Шри Ланка lk -শà§à¦°à§€à¦²à¦™à§à¦•া lk -Å ri Lanka lk -Srí Lanka lk -Sri Lanca lk -ΣÏι Λάνκα lk -Sri-Lanko lk -سریلانکا lk -Srí Lanca lk -סרי לנקה lk -शà¥à¤°à¥€ लंका lk -Å ri Lanka lk -Srí Lanka lk -スリランカ lk -ស្រីលង្កា lk -스리랑카 lk -ເຊີເບີຠlk -Å ri Lanka lk -Å rilanka lk -Шри Ланка lk -Шириланк lk -ਸà©à¨°à©€à¨²à©°à¨•ਾ lk -Шри-Ланка lk -Siri Lanka lk -Å ri Lanka lk -Шри Ланка lk -Å ri Lanka lk -இலஙà¯à®•ை lk -Сри Лонко lk -ศรีลังà¸à¸² lk -Åžri Lanka lk -Шрі-Ланка lk -Шри Ланка lk -æ–¯é‡Œå…°å¡ lk -æ–¯é‡Œè˜­å¡ lk -Liberia lr -Liberië lr -ليبيريا lr -ЛібÑÑ€Ñ‹Ñ lr -Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr -লাইবেরিয়া lr -Liberija lr -Libèria lr -Libérie lr -ΛιβεÏία lr -Liberio lr -Libeeria lr -لیبریا lr -Libéria lr -An Libéir lr -Libéria lr -לוב lr -लाइबेरिया lr -Liberija lr -Libéria lr -Líbería lr -リベリア lr -លីបáŸážšáž¸áž™áŸ‰áž¶ lr -ë¼ì´ë² ë¦¬ì•„ lr -ລິຊາ lr -LibÄ“rija lr -Либерија lr -Либери lr -Liberja lr -ਲੀਬਿਰੀਆ lr -Libéria lr -Libéria lr -Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr -Liberiya lr -Lýbia lr -Liberija lr -Либерија lr -Liberija lr -லிபிரியா lr -Либериё lr -ไลบีเรีย lr -Liberya lr -Ð›Ñ–Ð±ÐµÑ€Ñ–Ñ lr -Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr -利比里亚 lr -賴比瑞亞 lr -Lesotho ls -ليسوتو ls -ЛеÑота ls -ЛеÑото ls -লেসোথো ls -Lesoto ls -Lesoto ls -Λεσόθο ls -Lesoto ls -Lesoto ls -لسوتو ls -Leosóta ls -Lesoto ls -לסוטו ls -लेसोथो ls -Lesótó ls -レソト ls -áž¡áŸážŸáž¼ážáž¼ ls -레소토 ls -ທົດສອບ ls -Lesoto ls -ЛеÑото ls -ЛиÑото ls -Leżoto ls -ਲਿਉਥੂ ls -Lesoto ls -Lesoto ls -Lesoto ls -ЛеÑото ls -Lesoto ls -Lesoto ls -ЛеÑото ls -Lesoto ls -லஸொதோ ls -ЛиÑуту ls -เลโซโต ls -Lesoto ls -Lesoto ls -ЛеÑото ls -ЛеÑото ls -Lessoto ls -莱索托 ls -賴索扥 ls -Lithuania lt -Lithuanië lt -ليتوانيا lt -Litvaniya lt -Літва lt -Литва lt -লিথà§à§Ÿà§‡à¦¨à¦¿à§Ÿà¦¾ lt -Lituani lt -Litvanija lt -Lituània lt -Litva lt -Lithwania lt -Litauen lt -Litauen lt -Λιθουανία lt -Litovio lt -Lituania lt -Leedu lt -Lituania lt -لیتوانی lt -Liettua lt -Lituanie lt -Litouwen lt -An Liotuáin lt -Lituánia lt -×œ×™×˜× lt -लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾ lt -Litva lt -Litvánia lt -Litháen lt -Lituania lt -リトアニア lt -លីទុយអានី lt -리투아니아 lt -ລິທົ່ວເນີຠlt -Lietuva lt -Lietuva lt -Литванија lt -Литва lt -Litwanja lt -Litauen lt -Litauen lt -Litouwen lt -Litauen lt -ਲੀਥੂਨੀਆ lt -Litwa lt -Lituânia lt -Lituânia lt -Lituania lt -Литва lt -Litwaniya lt -Lietuva lt -Litva lt -Litva lt -Литванија lt -Litvanija lt -I-Lithuania lt -Litauen lt -லிதà¯à®¤à¯à®µà¯‡à®©à®¿à®¯à®¾ lt -Литвониё lt -ลิธัวเนีย lt -Litvanya lt -Lituania lt -Литва lt -Литва lt -Litwaneye lt -ç«‹é™¶å®› lt -ç«‹é™¶å®› lt -Luxembourg lu -Luxenburg lu -لوكسمبورغ lu -Lüksemburq lu -ЛюкÑÑмбург lu -ЛюкÑембург lu -লাকà§à¦¸à§‡à¦®à¦¬à§à¦°à§à¦— lu -Luksembourg lu -Luksemburg lu -Luxemburg lu -Lucembursko lu -Lwcsembwrg lu -Luxemburg lu -ΛουξεμβοÏÏγο lu -Luksemburgo lu -Luxemburgo lu -Luksemburg lu -Luxenburgo lu -لوگزامبورگ lu -Luxemburg lu -Luksemborg lu -Luxemburg lu -Lucsamburg lu -Luxemburgo lu -לוקסמבורג lu -लकà¥à¤¸à¤®à¤¬à¤°à¥à¤— lu -Luksemburg lu -Luxemburg lu -Lúxemborg lu -Lussemburgo lu -ルクセンブルグ lu -លុចហ្សំបួរ lu -ë£©ì…ˆë¶€ë¥´í¬ lu -ລັàºà»àºŠàº¡à»€àºšàºµàº lu -Liuksemburgas lu -Luksemburga lu -ЛукÑембург lu -ЛюкÑембүрг lu -Lussemburgu lu -Luxemborg lu -Luxemburg lu -ਲਕਸ਼ਮਬਰਗ lu -Luksemburg lu -Luxemburgo lu -Luxemburgo lu -Luxemburg lu -ЛюкÑембург lu -Lugizamburu lu -Luxemburg lu -Luxemburg lu -Luksemburg lu -ЛукÑембург lu -Luksemburg lu -I-Luxembourg lu -Luxemburg lu -லகà¯à®šà®®à¯à®ªà¯‹à®°à¯à®•௠lu -Лукзамбург lu -ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸­à¸£à¹Œà¸ lu -Lüksemburg lu -Lüksemburg lu -ЛюкÑембург lu -ЛюкÑембург lu -Lussimbork lu -墿£®å ¡ lu -盧森堡 lu -Latvia lv -لاتÙيا lv -Latviya lv -Ð›Ð°Ñ‚Ð²Ñ–Ñ lv -Ð›Ð°Ñ‚Ð²Ð¸Ñ lv -লাতভিয়া lv -Latvija lv -Letònia lv -LotyÅ¡sko lv -Latfia lv -Letland lv -Lettland lv -Λεττονία lv -Latvio lv -Letonia lv -Läti lv -لاتویا lv -Lettonie lv -Letland lv -An Laitvia lv -Letónia lv -לטביה lv -लाटविया lv -Latvija lv -Lettország lv -Lettland lv -Lettonia lv -ラトビア lv -ឡាážážœáž¸áž™áŸ‰áž¶ lv -ë¼íŠ¸ë¹„ì•„ lv -ລັດເວີຠlv -Latvija lv -Latvija lv -Латвија lv -Латви lv -Latvja lv -Lettland lv -Letland lv -ਲਾਟਵੀਆ lv -Åotwa lv -Letónia lv -Ð›Ð°Ñ‚Ð²Ð¸Ñ lv -Lativiya lv -Látvia lv -LotyÅ¡sko lv -Latvija lv -Латвија lv -Latvija lv -I-Latvia lv -Lettland lv -லடà¯à®µà®¿à®¯à®¾ lv -Латвонӣ lv -ลัธเวีย lv -Litvanya lv -Ð›Ð°Ñ‚Ð²Ñ–Ñ lv -Ð›Ð°Ñ‚Ð²Ð¸Ñ lv -Lativia lv -Letoneye lv -拉脱维亚 lv -拉脫維亞 lv -Libya ly -Libië ly -ليبيا ly -Ð›Ñ–Ð²Ñ–Ñ ly -Ð›Ð¸Ð±Ð¸Ñ ly -লিবিয়া ly -Julia ly -Libija ly -Líbia ly -Lýbie ly -Libia ly -Libyen ly -Libyen ly -ΛιβÏη ly -Libio ly -Libia ly -Liibüa ly -Libia ly -لیبی ly -Lybie ly -Libië ly -An Libia ly -Líbia ly -לוב ly -लीबिया ly -Libija ly -Líbia ly -Líbía ly -Libia ly -リビア ly -លីប៊ី ly -리비아 ly -ລິຊາ ly -Libija ly -LÄ«bija ly -Либија ly -Ð›Ð¸Ð±Ñ ly -Libja ly -Libyen ly -Libië ly -ਲੀਬੀਆ ly -Libia ly -Líbia ly -Líbia ly -Libia ly -Ð›Ð¸Ð²Ð¸Ñ ly -Libiya ly -Lýbia ly -Libija ly -Либија ly -Libija ly -I-Libya ly -Libyen ly -லிபியா ly -Ð›Ð¸Ð±Ð¸Ñ ly -ลิเบีย ly -Libia ly -Ð›Ñ–Ð²Ñ–Ñ ly -Ð›Ð¸Ð±Ð¸Ñ ly -Libeye ly -利比亚 ly -利比亞 ly -Morocco ma -Morokko ma -المغرب ma -Марока ma -Мароко ma -মরকà§à¦•à§‹ ma -Marok ma -Maroko ma -Marroc ma -Maroko ma -Moroco ma -Marokko ma -Marokko ma -ΜαÏόκο ma -Maroko ma -Marruecos ma -Maroko ma -Maroko ma -مراکش ma -Marokko ma -Marokko ma -Maroc ma -Marokko ma -Maracó ma -Marrocos ma -מרוקו ma -मोरकà¥à¤•ो ma -Maroko ma -Marokkó ma -Marokkó ma -Marocco ma -モロッコ ma -ម៉ារ៉ុក ma -모로코 ma -ເມົາລິ ma -Marokas ma -Maroka ma -Мароко ma -Морокко ma -Marokk ma -Marokko ma -Marokko ma -Marokko ma -Marokko ma -ਮੋਰਕੋ ma -Maroko ma -Marrocos ma -Marrocos ma -Maroc ma -Марокко ma -Maroke ma -Marokko ma -Maroko ma -Maroko ma -Мароко ma -Maroko ma -I-Morocco ma -Marocko ma -மோராகோ ma -Марокко ma -โมร็อคโค ma -Morokko ma -Марокко ma -Марокаш ma -Ma rốc ma -Marok ma -摩洛哥 ma -摩洛哥 ma -Monaco mc -Monako mc -موناكو mc -Манака mc -Монако mc -মোনাকো mc -Monako mc -Monako mc -Mònaco mc -Monako mc -Μονακό mc -Monako mc -Mónaco mc -موناکو mc -Monacó mc -Mónaco mc -מונקו mc -मोनेको mc -Monako mc -Mónakó mc -モナコ mc -ម៉ូណាកូ mc -모나코 mc -ເມົາລິ mc -Monakas mc -Monako mc -Монако mc -Монако mc -Monako mc -ਮੋਨਕੋ mc -Monako mc -Mónaco mc -Mônaco mc -Монако mc -Monako mc -Monako mc -Monako mc -Монако mc -Monako mc -மனாகோ mc -Монако mc -โมนาโค mc -Monako mc -Manako mc -Монако mc -Монако mc -摩纳哥 mc -æ‘©ç´å“¥ mc -Moldova md -Ù…ÙˆÙ„Ø¯ÙˆÙØ§ md -Малдова md -ÐœÐ¾Ð»Ð´Ð°Ð²Ð¸Ñ md -মলডোভা md -Moldavi md -Moldàvia md -Moldávie md -Moldofa md -Moldawien md -Μολδαβία md -Moldavujo md -Moldavia md -Moldavia md -مولداوی md -Moldavie md -An Mholdóiv md -Moldávia md -מולדובה md -मॉलà¥à¤¦à¥‹à¤µà¤¾ md -Moldóva md -Moldavia md -モルドムmd -ម៉ុលដូវ៉ា md -몰ë„ë°” md -ສະໂລວັຠmd -MoldÄvija md -Молдавија md -Молдав md -Moldavja md -Moldawien md -Moldavië md -ਮੋਡੋਵਾ md -MoÅ‚dawia md -Moldávia md -Молдова md -Molidova md -Moldávsko md -Молдавија md -Moldavija md -Moldavien md -மாலà¯à®Ÿà¯‹à®µà®¾ md -Молдавӣ md -มอลโดวา md -Молдова md -Молдова md -摩尔多瓦 md -摩爾多瓦 md -Madagascar mg -Madagaskar mg -مدغشقر mg -МадагаÑкар mg -МадагаÑкар mg -মাদাগাসà§à¦•ার mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -ΜαδαγασκάÏη mg -Madagaskaro mg -Madagaskar mg -ماداگاسکار mg -Madagaskar mg -מדגסקר mg -मेडागासà¥à¤•र mg -Madagaskar mg -Madagaszkár mg -Madagaskar mg -マダガスカル mg -ម៉ាដាហ្កាស្ការ mg -마다카스카르 mg -ຄາສະບາລ - K mg -Madagaskaras mg -Madagaskara mg -МадаÑкар mg -МадагаÑкар mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -ਮੈਡਾਗਾਸਕਰ mg -Madagaskar mg -Madagáscar mg -МадагаÑкар mg -Madagasikari mg -Madagaskar mg -Madagaskar mg -Madagaskar mg -МадагаÑкар mg -Madagaskar mg -Madagaskar mg -மடகஸà¯à®•ார௠mg -МадогоÑкор mg -มาดาà¸à¸±à¸ªà¸à¸² mg -Madagaskar mg -Madagaskar mg -МадагаÑкар mg -МадагаÑкар mg -马达加斯加 mg -馬é”加斯加 mg -Marshall Islands mh -Marshall EIlande mh -جزر مارشال mh -Маршалавы аÑтравы mh -МаршалÑки оÑтрови mh -মারশাল দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ mh -Inizi Marshall mh -MarÅ¡alova ostrva mh -Illes Marshall mh -Marshallovy ostrovy mh -Ynysoedd Marshall mh -Marshall-øerne mh -Marshall-Inseln mh -Îησιά ΜάÏσαλ mh -MarÅaloj mh -Islas Marshall mh -Marshalli saared mh -Marshall Irlak mh -جزایر مارشال mh -Marshallinsaaret mh -ÃŽles Marshall mh -Marshall Eilânen mh -Oileáin Mharshall mh -Illas Marshall mh -××™×™ מרשל mh -मारà¥à¤¶à¤² आइलैंड mh -Marshall Otoci mh -Marshall-szigetek mh -Marshall-eyjar mh -Isole Marshall mh -米自由連åˆãƒžãƒ¼ã‚·ãƒ£ãƒ«è«¸å³¶ mh -កោះ Marshall mh -마샬 ì œë„ mh -ລາດສະອານາຈັàºà»„ທຠmh -Marshalo salos mh -MÄrÅ¡alu salas mh -Маршалови ОÑтрови mh -Маршаллын арлууд mh -Gżejjer Marshall mh -Marshalløyene mh -Marshallinseln mh -Marshall Eilanden mh -Marshalløyane mh -ਮਾਰਸ਼ਲ ਟਾਪੂ mh -Wyspy Marshalla mh -Ilhas Marshall mh -Ilhas Marshall mh -Insulele Marshall mh -Маршалловы оÑтрова mh -Ibirwa bya Marishali mh -Marshallsullot mh -Maršálove ostrovy mh -Marshallovi otoki mh -Маршалова оÑтрва mh -MarÅ¡alova ostrva mh -Marshallöarna mh -மாரà¯à®·à®²à¯ தீவà¯à®•ள௠mh -Ҷазираи Маршал mh -หมู่เà¸à¸²à¸°à¸¡à¸²à¹à¸Šà¸¥ mh -MarÅŸal Adaları mh -MarÅŸal Utrawları mh -МаршальÑькі оÑтрови mh -Маршалл Ороллари mh -Iyes Marshall mh -马ç»ç¾¤å²› mh -馬紹爾群島 mh -Macedonia mk -Makedoniese mk -مقدونيا mk -Makedonya mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk -মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ mk -Makedonia mk -Makedonija mk -Macedònia mk -Makedonie mk -Makedonien mk -Makedonien mk -Σλαβομακεδονία mk -Makedonujo mk -Makedoonia mk -Mazedonia mk -مقدونیه mk -Makedonia mk -Macédoine mk -Macedonië mk -An Mhacadóin (IPIM) mk -Macedónia mk -מקדוניה mk -मकदूनिया mk -Makedonija mk -Macedónia mk -Masedonia mk -Makedónía mk -マケドニア mk -ម៉ាសáŸážŠáž“ mk -마케ë„니아 mk -ມາເຊໂດເນີຠmk -Makedonija mk -MaÄ·edonija mk -Македонија mk -Макидон mk -MaÄ‹edonja mk -Makedonia mk -Makedonien mk -Macedonië mk -Makedonia mk -Macedònian mk -ਮੈਕਡੋਨੀਆ mk -Macedónia mk -Macedônia mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk -Masedoniya mk -Makedonia mk -Macedónsky mk -Makedonija mk -Македонија mk -Makedonija mk -I-Macedonia mk -Makedonien mk -மாசிடோ னியா mk -Мақдуниё mk -มาเซโดเนีย mk -Makedonya mk -Makedonia mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk -ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk -Masedonia mk -Macedoneye mk -马其顿 mk -馬其頓 mk -Mali ml -مالي ml -Малі ml -Мали ml -মালি ml -Μαλί ml -Malio ml -مالی ml -Mailí ml -מ×לי ml -माली ml -Malí ml -マリ ml -ម៉ាលី ml -ë§ë¦¬ ml -ຈົດຫມາຠml -Мали ml -Мали ml -ਮਾਲੀ ml -Мали ml -Мали ml -மாலி ml -Молӣ ml -มาลี ml -Малі ml -Мали ml -马里 ml -馬利 ml -Myanmar mm -ميانمار mm -М'Ñнма mm -Мианмар mm -মিয়ানমার mm -Mjanmar mm -Mianmar mm -Burma mm -Burma (Myanmar) mm -ÎœÎ¹Î±Î½Î¼Î¬Ï mm -Mjanmao mm -Birmania mm -میانمار mm -Maenmar mm -מינמר mm -मà¥à¤¯à¤¨à¤®à¤¾à¤° mm -Mianmar mm -Mjanmar mm -ミャンマー mm -មីយ៉ាន់ម៉ា mm -미얀마 mm -ຕົວຮງàºàºžàºµàº·à»‰àº™àº—ີ່ທຳງານ - K mm -Mjanma mm -Мијанмар mm -МÑнмар mm -Mjanmar mm -Myanmar (Birma) mm -ਮਿਆਂਮਾਰ mm -Mianmar mm -МьÑнма (Бирма) mm -Mjanmar mm -Мијанмар mm -Mijanmar mm -மயனà¯à®®à®¾à®°à¯ mm -Миёнмор mm -เมียนมาร์ mm -Mianmar mm -М'Ñнма mm -МÑнмар mm -Miến Äiện mm -Birmaneye mm -缅甸 mm -緬甸 mm -Mongolia mn -Mongolië mn -منغوليا mn -ÐœÐ°Ð½Ð³Ð¾Ð»Ñ–Ñ mn -ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn -মোঙà§à¦—োলিয়া mn -Mongoli mn -Mongolija mn -Mongòlia mn -Mongolsko mn -Mongoliet mn -Mongolei mn -Μογγολία mn -Mongolio mn -Mongoolia mn -مغولستان mn -Mongolie mn -Mongolië mn -An Mhongóil mn -Mongólia mn -מונגוליה mn -मंगोलिया mn -Mongolija mn -Mongólia mn -Mongólía mn -モンゴル mn -ម៉ុងហ្គោលី mn -몽골 mn -ລອàºàº­àº´àº™ mn -Mongolija mn -Mongolija mn -Монголија mn -МОÐГОЛ mn -Mongolja mn -Mongolei mn -Mongolië mn -ਮੰਗੋਲੀਆ mn -Mongólia mn -Mongólia mn -ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn -Mongoliya mn -Mongolsko mn -Mongolija mn -Монголија mn -Mongolija mn -Mongoliet mn -மாஙà¯à®•ோலியா mn -МуғулиÑтон mn -มองโà¸à¹€à¸¥à¸µà¸¢ mn -MoÄŸolistan mn -MoÄŸolstan mn -ÐœÐ¾Ð½Ð³Ð¾Ð»Ñ–Ñ mn -МуғилиÑтон mn -Mông cổ mn -Mongoleye mn -è’™å¤ mn -è’™å¤ mn -Macau SAR(China) mo -Macau SAR (China) mo -Макао (Китай) mo -মাকাউ SAR(চীন) mo -Makav SAR(Sina) mo -Macau SAR(Xina) mo -Macau SAR (Čína) mo -Macau SAR(Kina) mo -Macao SAR (China) mo -Μακάο SAR (Κίνα) mo -Macau mo -Macau SAR(Txina) mo -Makao SAR(Kiina) mo -Macao SAR (Chine) mo -Macao SAR(An tSín) mo -מק×ו SAR (סין) mo -Makaó (Kína) mo -Makaó (sjálfstjórnarhérað í Kína) mo -Macau SAR(Cina) mo -マカオ(中国) mo -ម៉ាកាវ (áž…áž·áž“) mo -Macau SAR(Kinija) mo -Макао СÐР(Кина) mo -Macao SAR (Kina) mo -Macao mo -Macao SAR (Kina) mo -ਮੈਕਿਉ SAR(ਚੀਨ) mo -Makao SAR (Chiny) mo -Macau (China) mo -Macao SAR(China) mo -Макао mo -Makawu SAR (Ubushinwa) mo -Macau SAR (Kiinná) mo -Macau SAR (Kitajska) mo -SAR Macau (Кина) mo -SAR Macau (Kina) mo -Macao (Kina) mo -Macau SAR(சீனா) mo -มาเà¸à¹Šà¸² mo -Makau (Çin) mo -Macau SAR(Китай) mo -Макау (Хитой) mo -中国澳门特别行政区 mo -澳門 SAR(中國) mo -Martinique mq -مارتينيك mq -Мартыніка mq -Мартиника mq -মারà§à¦Ÿà¦¿à¦¨à¦¿à¦•à§ mq -Martinik mq -Martinik mq -Martinica mq -Martinik mq -Martin?c mq -ΜαÏτινίκα mq -Martiniko mq -Martinica mq -Martinika mq -مارتینیک mq -Martainíc mq -Martinica mq -מרטיניק mq -मारà¥à¤Ÿà¥€à¤¨à¥€à¤• mq -Martiník mq -Martinica mq -フランス海外県マルãƒãƒ‹ãƒ¼ã‚¯ mq -ម៉ារទីនីគ mq -ë§ˆë¥´í‹°ë‹ˆí¬ mq -ເມົາລິ mq -Martinika mq -Martinika mq -Мартиник mq -Мартиники mq -Martinik mq -ਮਾਰਟੀਨਿਕਿਉ mq -Martynika mq -Martinica mq -Martinica mq -Martinica mq -Мартиника mq -Maritinike mq -Martinik mq -Мартиник mq -Martinik mq -மாரà¯à®¤à®¿à®©à®¿à®•à¯à®¯à¯ mq -Мартиник mq -มาทินิค mq -Martinik mq -Martinik mq -Мартініка mq -Мартиника mq -Martinike mq -马æå°¼å…‹ mq -馬æå°¼å…‹ mq -Mauritania mr -Mauritanië mr -موريتانيا mr -ÐœÐ°ÑžÑ€Ñ‹Ñ‚Ð°Ð½Ñ–Ñ mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr -মরিটানিয়া mr -Maouritani mr -Mauritanija mr -Mauritània mr -Mauretánie mr -Mawritania mr -Mauretanien mr -Mauretanien mr -ΜαυÏιτανία mr -MaÅ­ritanujo mr -Mauritaania mr -موراتانی mr -Mauritanie mr -Mauritanië mr -An Mháratáin mr -Mauritánia mr -מ×וריטניה mr -मारीतानिया mr -Mauritanija mr -Mauritánia mr -Máritanía mr -モーリタニア mr -ម៉ូរីážáž¶áž“ី mr -모리타니 mr -ລິທົວເນີຠmr -Mauritanija mr -MauritÄnija mr -Мавританија mr -Мауритани mr -Mawritanja mr -Mauretanien mr -Mauritanië mr -ਮਾਉਰੀਟਨਿਆ mr -Mauretania mr -Mauritânia mr -Mauritânia mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr -Moritaniya mr -Mavretanija mr -Мауританија mr -Mauritanija mr -Mauretanien mr -மௌரிடானியா mr -Мавритонӣ mr -มอริทาเนีย mr -Mauritanya mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ mr -ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr -Moritanreye mr -毛里塔尼亚 mr -茅利塔尼亞 mr -Montserrat ms -مونتسيرات ms -МонÑерат ms -মনà§à¦Ÿà¦¸à§‡à¦°à¦¾à¦Ÿ ms -Monsera ms -ΜοντσεÏάτ ms -Moncerato ms -مون‌سرات ms -Montsarat ms -מונטסרט ms -मॉटसेरट ms -Monserrat ms -英領モントセラト ms -ម៉ុងសáŸážšáŸ‰áž¶ ms -몬트세ë¼íЏ ms -ຈà»àºžàº²àºš ms -Monserata ms -МонÑерат ms -МонтÑеррат ms -ਮੋਨਟਸੀਰਾਟ ms -МонтÑеррат ms -Monserati ms -МонÑерат ms -Monserat ms -மானà¯à®Ÿà¯à®šà¯†à®°à¯à®°à®Ÿà¯ ms -МунтеÑирот ms -มอนต์เซอร์รัท ms -МонтÑеррат ms -Монцеррат ms -蒙特塞拉特 ms -蒙的塞拉特 ms -Malta mt -مالطة mt -Мальта mt -Малта mt -মলটা mt -Malt mt -Μάλτα mt -Malto mt -مالت mt -Malte mt -Málta mt -מלטה mt -मालà¥à¤Ÿà¤¾ mt -Málta mt -マルタ mt -ម៉ាល់ážáž¶ mt -몰타 mt -ມອລຕາ mt -Малта mt -Малта mt -ਮਾਲਟਾ mt -Мальта mt -Malita mt -Малта mt -I-Malta mt -மாலà¯à®Ÿà®¾ mt -Молет mt -มอลตา mt -Мальта mt -Малта mt -Male mt -马耳他 mt -馬爾他 mt -Mauritius mu -موريشيوس mu -Маўрыцы mu -ОÑтров Мавриций mu -মরিশাস mu -Mauris mu -Mauricijus mu -Maurici mu -Mauricius mu -Mawrisiws mu -ΜαυÏίκιος mu -MaÅ­ricio mu -Mauricio mu -Maurizio mu -موریتیس mu -ÃŽle Maurice mu -Oileán Mhuirís mu -Maurício mu -מ×וריציוס mu -मॉरीशस mu -Mauricijus mu -Máritíus mu -モーリシャス mu -ម៉ូរីទុស mu -모리셔스 mu -ພາທິຊັ້ນ mu -MaurÄ«cija mu -ÐœÐ°Ð²Ñ€Ð¸Ñ†Ð¸ÑƒÑ mu -ÐœÐ°Ð²Ñ€Ð¸Ñ‚ÑƒÑ mu -Mawriju mu -ਮਾਉਰੀਟਿਸ mu -Mauritânia mu -Ilhas Maurício mu -MauriÅ£ius mu -Маврикий mu -Ibirwa bya Morise mu -Maurícius mu -Mavricij mu -ÐœÐ°ÑƒÑ€Ð¸Ñ†Ð¸Ñ˜ÑƒÑ mu -Mauricijus mu -மௌரிடியஸ௠mu -Мавритӣ mu -มอริเชียส mu -Mauritus mu -Маврікій mu -Маврикий mu -Iye Môrice mu -毛里求斯 mu -毛里求斯 mu -Maldives mv -جزر المالدي٠mv -Мальдывы mv -МалдивÑки оÑтрови mv -মালদà§à¦¬à§€à¦ª mv -Inizi Maldiv mv -Maldivi mv -Maledivy mv -Ynysoedd y Mald?f mv -Maldiverne mv -Malediven mv -Μαλδίβες mv -Maldivoj mv -Maldivas mv -Maldiivid mv -Maldibak mv -مالدیو mv -Malediivit mv -Malediven mv -Na Maildiví mv -Maldivas mv -מולדבה mv -मालदीव mv -Maldivi mv -Maldív-szigetek mv -Maldíveyjar mv -Maldive mv -モルジブ mv -ម៉ាល់ឌីវ mv -몰디브 mv -ມັລດິສ mv -Maldyvai mv -Maldivu salas mv -Малдиви mv -Малдив mv -Maldivene mv -Malediven mv -Malediven mv -Maldivane mv -ਮਾਲਦੀਵ mv -Malediwy mv -Maldivas mv -Maldivas mv -Maldive mv -МальдивÑкие оÑтрова mv -Malidive mv -Maldiivat mv -Maldiv mv -Малдиви mv -Maldivi mv -Maldiverna mv -மாலà¯à®¤à¯€à®µà¯à®•ள௠mv -Молдивӣ mv -มัลดิฟ mv -Maldivler mv -Maldivlar mv -Мальдіви mv -Малдив Ороллари mv -马尔代夫 mv -馬爾地夫 mv -Malawi mw -مالاوي mw -Малаві mw -Малави mw -মালাওয়ি mw -Malavi mw -Μαλάουι mw -Malavio mw -مالاوی mw -An Mhaláiv mw -Malavi mw -מל×ווי mw -मलावी mw -Malavi mw -Malaví mw -マラウイ mw -ម៉ាឡាវី mw -ë§ë¼ìœ„ mw -ມອລຕາ mw -Malavi mw -Малави mw -Малави mw -ਮਾਲਾਵੀ mw -Малави mw -Малави mw -Malavi mw -மலவி mw -Моловӣ mw -มาลาวี mw -Malavi mw -Малаві mw -Малави mw -马拉维 mw -é¦¬æ‹‰å¨ mw -Mexico mx -Meksiko mx -المكسيك mx -Meksika mx -МÑкÑыка mx -МекÑико mx -মেকà§à¦¸à¦¿à¦•à§‹ mx -Mec'hiko mx -Meksiko mx -Mèxic mx -Mexiko mx -Mecsico mx -Mexiko mx -Μεξικό mx -Meksiko mx -México mx -Mehhiko mx -Mexiko mx -مکزیک mx -Meksiko mx -Meksiko mx -Mexique mx -Meicsiceo mx -México mx -מקסיקו mx -मेकà¥à¤¸à¤¿à¤•ो mx -Meksiko mx -Mexikó mx -Meksiko mx -Mexíkó mx -Messico mx -メキシコ mx -ម៉ិចស៊ិក mx -멕시코 mx -ເມັàºàºŠàºµà»‚ຠmx -Meksika mx -Meksika mx -МекÑико mx -МекÑико mx -Messiku mx -Mexiko mx -Mèxic mx -ਮੈਕਸਿਕੋ mx -Meksyk mx -México mx -México mx -Mexic mx -МекÑика mx -Megizike mx -Mexiko mx -Mehika mx -МекÑико mx -Meksiko mx -I-Mexico mx -மெகà¯à®šà®¿à®•ோ mx -МекÑико mx -เม็à¸à¸‹à¸´à¹‚ภmx -Meksika mx -Meksiko mx -МекÑика mx -МекÑика mx -Mê hi cô mx -Mecsike mx -墨西哥 mx -墨西哥 mx -Malaysia my -Malysië my -ماليزيا my -ÐœÐ°Ð»Ð°Ð¹Ð·Ñ‹Ñ my -ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my -মালয়েশিয়া my -Malezia my -Malezija my -Malàsia my -Malajsie my -Maleisia my -Μαλαισία my -Malajzio my -Malasia my -Malaisia my -Malasia my -مالزی my -Malesia my -Malaisie my -Maleisië my -An Mhalaeisia my -Malásia my -מלזיה my -मलेशिया my -Malezija my -Malajzia my -Malasía my -マレーシア my -ម៉ាឡáŸážŸáŸŠáž¸ my -ë§ë ˆì´ì‹œì•„ my -ມອລຕາ my -Malaizija my -Malaizija my -Малезија my -Малайз my -Malażja my -Maleisië my -ਮਲੇਸ਼ੀਆ my -Malezja my -Malásia my -Malásia my -Malaezia my -ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my -Maleziya my -Malajzia my -Malezija my -Малезија my -Malezija my -மலேசியா my -Малайзӣ my -มาเลเซีย my -Malezya my -ÐœÐ°Ð»Ð°Ð¹Ð·Ñ–Ñ my -ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my -Malaizeye my -马æ¥è¥¿äºš my -馬來西亞 my -Mozambique mz -Mosambiek mz -موزمبيق mz -Мазамбік mz -Мозамбик mz -মোজামবিক mz -Mozambik mz -Mozambik mz -Moçambic mz -Mozambik mz -Mosamb?c mz -Μοζαμβίκη mz -Mozambiko mz -Mosambiik mz -Mozanbike mz -موزامبیک mz -Mosambik mz -Mósaimbíc mz -מוזמביק mz -मोज़ामà¥à¤¬à¥€à¤• mz -Mozambik mz -Mozambik mz -Mósambík mz -Mozambico mz -モザンビーク mz -ម៉ូហ្សាំប៊ិក mz -ëª¨ìž ë¹„í¬ mz -ຫນ່ວàºàº„ວາມຈຳ mz -Mozambikas mz -Mozambika mz -Мозамбик mz -Мозамбайк mz -Możambik mz -Mosambik mz -Mosambik mz -Mosambik mz -ਮੋਜ਼ਾਨਬਿਕਿਉ mz -Mozambik mz -Moçambique mz -Moçambique mz -Mozambic mz -Мозамбик mz -Mosambik mz -Mozambik mz -Mozambik mz -Мозамбик mz -Mozambik mz -Moçambique mz -மோசாமà¯à®ªà®¿à®•௠mz -Мозамбик mz -โมà¹à¸‹à¸¡à¸šà¸´à¸ mz -Mozambik mz -Mozambik mz -Мозамбік mz -Мозамбик mz -Mozambike mz -莫桑比克 mz -莫三比克 mz -Namibia na -Namibië na -ناميبيا na -ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na -ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na -নামিবিয়া na -Namibi na -Namibija na -Namíbia na -Namíbie na -Îαμίμπια na -Namibio na -Namiibia na -نامیبیا na -Namibie na -Namibië na -An Namaib na -Namíbia na -נמיביה na -नामीबिया na -Namibija na -Namíbia na -Namibía na -ナミビア na -ណាមីប៊ី na -나미비아 na -ຈາໄມàºàº² na -Namibija na -NamÄ«bija na -Ðамибија na -Ðамиби na -Namibja na -Namibië na -ਨਾਮੀਬੀਆ na -Namíbia na -Namíbia na -ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na -Namibiya na -Namíbia na -Namibija na -Ðамибија na -Namibija na -நாமிபியா na -Ðамибиё na -นามิเบีย na -Namibya na -ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na -ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na -Namibeye na -纳米比亚 na -那米比亞 na -New Caledonia nc -Nuwe Caledonië nc -كاليدونيا الجديدة nc -ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc -Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc -নিউ কà§à¦¯à¦¾à¦²à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ nc -Kaledoni-nevez nc -Nova Kaledonija nc -Nova Caledònia nc -Nová Kaledonie nc -Caledonia Newydd nc -Ny Caledonien nc -Neukaledonien nc -Îέα Καληδονία nc -Nov-Kaledonio nc -Nueva Caledonia nc -Uus-Kaledoonia nc -Kaledonia Berria nc -کالدونیا نو nc -Uusi-Kaledonia nc -Nouvelle Calédonie nc -Nij Caledonië nc -An Nua-Chaladóin nc -Nova Caledónia nc -קלדוניה החדשה nc -नà¥à¤¯à¥‚ केलेदूनिया nc -Nova Kaledonija nc -Új-Kaledónia nc -Nýja-Kaledónía nc -Nuova Caledonia nc -ニューカレドニア nc -នូវែលកាលáŸážŠáž¼áž“ី nc -뉴 칼레ë„니아 nc -ມາເຊໂດເນີຠnc -Naujoji Kaledonija nc -Jaunkaledonija nc -Ðова Каледонија nc -Ð¨Ð¸Ð½Ñ ÐºÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸ nc -Kaledonja Ä dida nc -Ny-Caledonia nc -Nieg Kaledonien nc -Nieuw Caledonië nc -Ny-Caledonia nc -ਨਵਾਂ ਕਾਲੀਡੋਨਾ nc -Nowa Kaledonia nc -Nova Caledónia nc -Nova Caledônia nc -Noua Caledonie nc -ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc -Kaledoniya nc -Ođđa Kaledonia nc -Nová Kaledónia nc -Nova Kaledonija nc -Ðова Каледонија nc -Nova Kaledonija nc -Nya Caledonien nc -நியூ கலடோனியா nc -КаледониÑи Ðав nc -นิวคาเลโดเนีย nc -Yeni Kaledonya nc -Yaña Kaledonia nc -Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc -Янги ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc -Nouve Caledonreye nc -新喀里多尼亚 nc -新喀里多尼亞 nc -Niger ne -النيجر ne -Ðігер ne -Ðигер ne -নাইজের ne -Nijer ne -Níger ne -ÎίγηÏας ne -NiÄero ne -نیجر ne -Nigeria ne -An Nígir ne -Níxer ne -× ×™×’'ר ne -निगर ne -Níger ne -ニジェール ne -នីហ្សáŸážš ne -니제르 ne -ຕົວຮງàºàºžàº·à»‰àº™àº—ີ່ທຳງານ ne -NigÄ“ra ne -Ðигер ne -Ðигер ne -NiÄ¡er ne -ਨਿਜੀਰ ne -Nigéria ne -Nigéria ne -Ðигер ne -Nijeri ne -Nigéria ne -Ðигер ne -நிஜர௠ne -Ðигерӣ ne -ไนเจอร์ ne -Nijerya ne -Ðігер ne -Ðигер ne -Nidjer ne -尼日尔 ne -尼日 ne -Norfolk Island nf -Norfolk Eiland nf -جزيرة نورÙولك nf -Ðорфалк nf -ОÑтров Ðорфолк nf -নরফোক দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ nf -Enez Norfolk nf -Norfolk ostrvo nf -Illa Norfolk nf -Ynys Norffolc nf -Norfolk-øerne (Australien) nf -Norfolk-Insel nf -Îήσος ÎÏŒÏφοκ nf -Norfolkinsulo nf -Isla Norfolk nf -Norfolki saar nf -Norfok Irla nf -جزایر نورÙولک nf -Norfolkinsaari nf -ÃŽle Norfolk nf -Norfolk Eilân nf -Oileán Norfolc nf -Illa Norfolk nf -××™×™ נורפולק nf -नॉरफाक आइलैंड nf -Otok Norfolk nf -Norfolk-szigetek nf -Norfolkeyja nf -Isola Norfolk nf -オーストラリア領ノーフォーク諸島 nf -កោះ Norfolk nf -ë…¸í¬í¬ ì œë„ nf -ໂປà»àº¥àº™ nf -Norfolko sala nf -Norfolka nf -Ðорфолшки ОÑтров nf -Norfolk арлууд nf -Gżira ta' Norfolk nf -Norfolkøya nf -Norfolkinsel nf -Norfolk Eiland nf -Norfolkøya nf -ਨੋਰਫੋਲਕ ਟਾਪੂ nf -Wyspy Norfolk nf -Ilha Norfolk nf -Ilhas Norfolk nf -Insulele Norfolk nf -ОÑтров Ðорфолк nf -Ikirwa cya Norufolika nf -Norfolksuolu nf -Ostrov Norfolk nf -Otok Norfolk nf -Ðорфолкшко оÑтрво nf -NorfolkÅ¡ko ostrvo nf -Norfolkön nf -நாரà¯à®ªà¯‹à®•௠தீவ௠nf -Ҷазираи Ðурфолк nf -เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¸Ÿà¸­à¸¥à¹Œà¸„ nf -Norfolk Adaları nf -Norfolk Utrawları nf -ОÑтрів Ðорфолк nf -Ðорфолк Ороли nf -Iye di Norfolk nf -诺ç¦å…‹å²› nf -諾ç¦å…‹å³¶ nf -Nigeria ng -Nigerië ng -نيجيريا ng -ÐÑ–Ð³ÐµÑ€Ñ‹Ñ ng -ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng -নাইজেরিয়া ng -Nijeria ng -Nigerija ng -Nigèria ng -Nigérie ng -ÎιγηÏία ng -NiÄerio ng -Nigeeria ng -نیجریه ng -Nigéria ng -An Nigéir ng -Nixéria ng -ניגריה ng -नाइजीरिया ng -Nigerija ng -Nigéria ng -Nígería ng -ナイジェリア ng -នីហ្សáŸážšáž¸áž™áŸ‰áž¶ ng -나ì´ì§€ë¦¬ì•„ ng -ບັນà»àºà»€àº¥àºµàº ng -Nigerija ng -NigÄ“rija ng -Ðигерија ng -Ðигери ng -NiÄ¡erja ng -ਨੀਜੀਰਿਆ ng -Nigéria ng -Nigéria ng -ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng -Nigeriya ng -Nigéria ng -Nigerija ng -Ðигерија ng -Nigerija ng -நிஜேரியா ng -Ðигерӣ ng -ไนจีเรีย ng -Nijerya ng -ÐÑ–Ð³ÐµÑ€Ñ–Ñ ng -ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng -Nidjeria ng -尼日利亚 ng -奈åŠåˆ©äºž ng -Nicaragua ni -Nikaragua ni -نيكاراغوا ni -Ðікарагуа ni -Ðикарагуа ni -নিকারাগà§à§Ÿà¦¾ ni -Nikwaraga ni -Nikaragva ni -Nikaragua ni -Nicaragwa ni -ÎικαÏάγουα ni -Nikaragvo ni -Nikaraagua ni -Nikaragua ni -نیکاراگویه ni -Nikaragua ni -Nikaragua ni -Nicearagua ni -ניקרגווה ni -निकारागà¥à¤† ni -Nikaragva ni -Níkaragva ni -ニカラグア ni -នីការ៉ាហ្គáŸážš ni -니카ë¼ê³¼ ni -ປາລາàºàºàº§àº ni -Nikaragva ni -Nikaragva ni -Ðикарагва ni -Ðикрагуа ni -Nikaragwa ni -ਨਿਕਾਰਗà©à¨† ni -Nikaragua ni -Nicarágua ni -Nicarágua ni -Ðикарагуа ni -Nikaragwa ni -Nikaragua ni -Nikaragva ni -Ðикарагва ni -Nikaragva ni -I-Nicaragua ni -நிகராகà¯à®µà¯‡ ni -Ðикарагуа ni -นิคาราà¸à¸±à¸§ ni -Nikaragua ni -Nikaragua ni -Ðікарагуа ni -Ðикарагуа ni -Nicaragwa ni -尼加拉瓜 ni -尼加拉瓜 ni -Netherlands nl -Nederland nl -هولندا nl -Hollandiya nl -ГалÑÐ½Ð´Ñ‹Ñ nl -Ð¥Ð¾Ð»Ð°Ð½Ð´Ð¸Ñ nl -হলà§à¦¯à¦¾à¦£à§à¦¡ nl -Izelvroioù nl -Nizozemska nl -Holanda nl -Nizozemí nl -Yr Iseldiroedd nl -Holland nl -Niederlande nl -Κάτω ΧώÏες nl -Nederlando nl -Países Bajos nl -Holland nl -Holanda nl -هلند nl -Alankomaat nl -Háland nl -Pays bas nl -Nederlân nl -An Ãsiltír nl -Países Baixos nl -הולנד nl -नीदरलैंडà¥à¤¸ nl -Nizozemska nl -Hollandia nl -Belanda nl -Holland nl -Paesi Bassi nl -オランダ nl -ហុល្លង់ nl -네ëœëž€ë“œ nl -ເນເທີà»àº¥àº™à¹Œ nl -Olandija nl -NÄ«derlande nl -Холандија nl -Ðедерланд nl -Nederland nl -Nedderlanne nl -Nederland nl -Nederland nl -Holanda nl -ਨੀਂਦਰਲੈਂਡ nl -Holandia nl -Holanda nl -Holanda nl -Olanda nl -Ðидерланды nl -Ubuholandi nl -Hollánda nl -Holandsko nl -Nizozemska nl -Холандија nl -Holandija nl -I-Netherlands nl -Nederländerna nl -நெதரà¯à®²à®¾à®¨à¯à®¤à¯ nl -Ҳуланд nl -เนเธอร์à¹à¸¥à¸™à¸”์ nl -Hollanda nl -Niderlandlar nl -Ð“Ð¾Ð»Ð»Ð°Ð½Ð´Ñ–Ñ nl -Ðидерландлар nl -Hà Lan nl -Bas Payis nl -è·å…° nl -è·è˜­ nl -Norway no -Noorweë no -النرويج no -Norveç no -ÐарвÑÐ³Ñ–Ñ no -ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no -নরওয়ে no -Norvegia no -NorveÅ¡ka no -Noruega no -Norsko no -Norwy no -Norge no -Norwegen no -ÎοÏβηγία no -Norvegio no -Noruega no -Norra no -Norvegia no -نروژ no -Norja no -Norra no -Norvège no -Noorwegen no -An Iorua no -Noruega no -נורבגיה no -नारà¥à¤µà¥‡ no -NorveÅ¡ka no -Norvégia no -Norwegia no -Noregur no -Norvegia no -ノルウェー no -áž“áŸážšážœáŸ‚ស no -ë…¸ë¥´ì›¨ì´ no -ນà»à»€àº§ no -Norvegija no -Norvēģija no -Ðорвешка no -Ðорвеги no -NorveÄ¡ja no -Norge no -Norwegen no -Noorwegen no -Noreg no -Noruega no -ਨਾਰਵੇ no -Norwegia no -Noruega no -Noruega no -Norvegia no -ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no -Noruveje no -Norga no -Nórsko no -NorveÅ¡ka no -Ðорвешка no -NorveÅ¡ka no -I-Norway no -Norge no -நாரà¯à®µà¯‡ no -Ðорвегӣ no -นอร์เวย์ no -Norveç no -ÐÐ¾Ñ€Ð²ÐµÐ³Ñ–Ñ no -ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no -Na uy no -Norvedje no -æŒªå¨ no -æŒªå¨ no -Nepal np -نيبال np -ÐÑпал np -Ðепал np -নেপাল np -Nepál np -Îεπάλ np -Nepalo np -نپال np -Népal np -Neipeal np -נפ×ל np -नेपाल np -Nepál np -ãƒãƒ‘ール np -áž“áŸáž”៉ាល់ np -네팔 np -ເວນດາ np -Nepalas np -NepÄla np -Ðепал np -Ðепал np -ਨੇਪਾਲ np -Ðепал np -Nepali np -Ðепал np -நேபாளம௠np -Ðипол np -เนปาล np -Ðепал np -Ðепал np -尼泊尔 np -尼泊爾 np -Nauru nr -ناورو nr -Ðауру nr -Ðауру nr -নাউরৠnr -Naurueg nr -Nawrw nr -ÎαουÏÎ¿Ï nr -NaÅ­ro nr -Naurú nr -نائورو nr -Naurusaaret nr -Nárúis nr -× ×ורו nr -नौरू nr -Naurski nr -Nárú nr -ナウル nr -ណូរូ nr -나우루 nr -ປາລາàºàºàº§àº nr -Ðауру nr -Ðауру nr -Nawru nr -ਨਾਉਰੂ nr -Ðауру nr -Ikinawuru nr -Ðауру nr -நௌர௠nr -Ðауру nr -นาวรู nr -Ðауру nr -Ðауру nr -Nawouro nr -ç‘™é² nr -諾魯 nr -Niue nu -Nieu nu -نيوي nu -ÐÑ–ÑžÑ nu -Ðиуе nu -নিউই nu -Niwe nu -ÎιοÏε nu -Niuo nu -نیئو nu -ניווה nu -नियू nu -ニュージーランド自治領ニウエ nu -នីវ nu -ë‹ˆìš°ì— nu -ເນ໊ຕ nu -Ðије nu -Ðиуе nu -Niwe nu -ਨੀਉਈ nu -Ðиуе nu -Ðиуе nu -நீய௠nu -Ðиу nu -นิอุเอ nu -Nive nu -Niu nu -Ðіуе nu -Ðиуе nu -Niuwé nu -纽埃 nu -ç´é„‚å³¶ nu -New Zealand nz -Nuwe Seeland nz -نيوزيلاندا nz -Yeni Zellandiya nz -ÐÐ¾Ð²Ð°Ñ Ð—ÑлÑÐ½Ð´Ñ‹Ñ nz -Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz -নিউজিলà§à¦¯à¦¾à¦£à§à¦¡ nz -Zeland nevez nz -Novi Zeland nz -Nova Zelanda nz -Nový Zéland nz -Seland Newydd nz -Neuseeland nz -Îέα Ζηλανδία nz -Nov-Zelando nz -Nueva Zelanda nz -Uus-Meremaa nz -Zelanda Berria nz -زلاندنو nz -Uusi-Seelanti nz -Nýsæland nz -Nouvelle Zélande nz -Nij Seelân nz -An Nua-Shéalainn nz -Nova Celándia nz -ניו זילנד nz -नà¥à¤¯à¥‚जीलैंड nz -Novi Zeland nz -Új-Zéland nz -Selandia Baru nz -Nýja-Sjáland nz -Nuova Zelanda nz -ニュージーランド nz -នូវែលហ្សáŸáž¡áž„់ nz -뉴질랜드 nz -ນີວຊີà»àº¥àº™ nz -Naujoji Zelandija nz -JaunZÄ“lande nz -Ðов Зеланд nz -Ð¨Ð¸Ð½Ñ Ð·ÐµÐ°Ð»Ð°Ð½Ð´ nz -Nieg Seeland nz -Nieuw Zeeland nz -Navera Zelanda nz -ਨਿਊਜ਼ੀਲੈਂਡ nz -Nowa Zelandia nz -Nova Zelândia nz -Nova Zelândia nz -Noua Zeelandă nz -ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz -Nuveli Zelande nz -Ođđa Zealánda nz -Nový Zéland nz -Nova Zelandija nz -Ðови Зеланд nz -Novi Zeland nz -I-New Zealand nz -Nya Zeeland nz -நியூசிலாநà¯à®¤à¯ nz -Зилонди Ðав nz -นิวซีà¹à¸¥à¸™à¸”์ nz -Yeni Zelanda nz -Yaña Zealand nz -Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ñ–Ñ nz -Янги Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz -Nouve Zelande nz -新西兰 nz -ç´è¥¿è˜­ nz -Oman om -عÙمان om -Ðман om -Оман om -ওমান om -Omán om -Ομάν om -Omano om -Omán om -Omaan om -عمان om -Omán om -עומן om -ओमन om -Omán om -Óman om -オマーン om -អូម៉ង់ om -오만 om -ເàºàºµàºàº¥àº°àº¡àº±àº™ om -Omanas om -OmÄna om -Оман om -Оман om -ਓਮਾਨ om -Omã om -Omã om -Оман om -Omani om -Omán om -Оман om -I-Oman om -ஓமன௠om -Оман om -โอมาน om -Umman om -Оман om -Уммон om - Oman om -阿曼 om -阿曼 om -Panama pa -بنما pa -Панама pa -Панама pa -পানামা pa -Panamà pa -Παναμάς pa -Panamo pa -Panamá pa -پاناما pa -Panamá pa -פנמה pa -पनामा pa -パナマ pa -ប៉ាណាម៉ា pa -파나마 pa -ປານາມາ pa -Панама pa -Панама pa -ਪੈਨਾਮਾ pa -Panamá pa -Panamá pa -Панама pa -Панама pa -I-Panama pa -பனாமா pa -Панама pa -ปานามา pa -Панама pa -Панама pa -巴拿马 pa -巴拿馬 pa -Peru pe -البيرو pe -ПÑру pe -Перу pe -পেরৠpe -Perou pe -Perú pe -Periw pe -ΠεÏÎ¿Ï pe -Peruo pe -Perú pe -Peruu pe -پرو pe -Pérou pe -Peiriú pe -Perú pe -פרו pe -पेरू pe -Perú pe -Perù pe -ペルー pe -ប៉áŸážšáž¼ pe -페루 pe -ເປລູ pe -Перу pe -Перу pe -Pero pe -ਪੇਰੂ pe -Перу pe -Перу pe -I-Peru pe -பெர௠pe -Перу pe -เปรู pe -Перу pe -Перу pe -Perou pe -ç§˜é² pe -秘魯 pe -French Polynesia pf -Fraans Polynesië pf -بولينيزيا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© pf -ФранцуÑÐºÐ°Ñ ÐŸÐ°Ð»Ñ–Ð½ÑÐ·Ñ–Ñ pf -ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf -ফরাসী পলিনেশিয়া pf -Polinezi galleg pf -Francuska Polinezija pf -Polinèsia francessa pf -Francouzská Polynésie pf -Polynesia Ffrengig pf -Fransk Polynesien pf -Französisch Polynesien pf -Γαλλική Πολυνησία pf -Franca Polinezio pf -Polinesia francesa pf -Prantsuse Polüneesia pf -Polinesia Frantziarra pf -پولونزی ÙØ±Ø§Ù†Ø³Ù‡ pf -Ranskan Polynesia pf -Polynésie française pf -Frânsk Polinesië pf -Polainéis na Fraince pf -Polinésia Francesa pf -פולינזיה הצרפתית pf -फà¥à¤°à¥‡à¤‚च पॉलीनेसिया pf -Francuska Polinezija pf -Francia-Polinézia pf -Franska Pólýnesía pf -Polinesia Francese pf -フランス領ãƒãƒªãƒã‚·ã‚¢ pf -ប៉ូលីនáŸážŸáŸŠáž¸â€‹áž”ារាំង pf -프랑스령 í´ë¦¬ë„¤ì‹œì•„ pf -àºàº£àº±à»ˆàº‡à»€àºªàº” pf -PrancÅ«zų Polinezija pf -FranÄu PolinÄ“zija pf -ФранцуÑка Полинезија pf -Франц полинеÑи pf -Polineżja FranÄ‹iża pf -Fransk Polynesia pf -Franzöösch Polynesien pf -Frans Polinesië pf -Fransk Polynesia pf -ਫਰੈਂਚ ਪੋਲੀਂਸੀਆ pf -Polinezja Francuska pf -Polinésia Francesa pf -Polinésia Francesa pf -Polinezia Franceză pf -ФранцузÑÐºÐ°Ñ ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf -Polinesiya Mfaransa pf -FránskkalaÅ¡ Polynesia pf -Francúzska Polynézia pf -Francoska Polinezija pf -ФранцуÑка Полинезија pf -Francuska Polinezija pf -Franska Polynesien pf -பிரனà¯à®šà¯ போலினேசியா pf -ПулинезиÑи ФаронÑа pf -à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¹‚พลีนีเซีย pf -Fransız Polinezyası pf -Frans Polinesia pf -Французька ÐŸÐ¾Ð»Ñ–Ð½ÐµÐ·Ñ–Ñ pf -Француз ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf -Polynesia thuá»™c Pháp pf -Polinezeye francesse pf -法属波利尼西亚 pf -法屬波利尼西亞 pf -Papua New Guinea pg -بابوا غينيا الجديدة pg -Papua Yeni Gvineya pg -Папуа–ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ pg -Папуа Ðова Ð“Ð²Ð¸Ð½ÐµÑ pg -পাপà§à§Ÿà¦¾ নিউ গিনি pg -Papouazi Gine Nevez pg -Papua Nova Gvineja pg -Papua Nova Guinea pg -Papua - Nová Guinea pg -Papwa Gini Newydd pg -Papua Neu-Guinea pg -ΠαποÏα Îέα Γουινέα pg -Papuo-Nov-Gvineo pg -Papua Nueva Guinea pg -Paapua Uus-Guinea pg -Papua Ginea Berria pg -پاپوا گینه نو pg -Papua-Uusi-Guinea pg -Papouasie-Nouvelle-Guinée pg -Papua Nij Guinea pg -Nua-Ghuine Phapua pg -Papúa Nova Guiné pg -פפו××” ניו ×’×™× ×™ pg -पापà¥à¤† नà¥à¤¯à¥‚ गियाना pg -Papua Nova Gvineja pg -Pápua Új-Guinea pg -Papúa Nýja-Gínea pg -Papua Nuova Guinea pg -パプアニューギニア pg -ប៉ាពូញូវហ្គីណ០pg -파푸아뉴기니 pg -ເທົາອ່ອນ pg -Papua Naujoji GvinÄ—ja pg -Papua Jaungvineja pg -Папуа Ðова Гвинеја pg -Папуа ÑˆÐ¸Ð½Ñ Ð“ÑƒÐ¹Ð½ÐµÐ° pg -Papwa Ginea pg -Papua Ny-Guinea pg -Papua-Niegguinea pg -Papua Ny-Guinea pg -ਪਾਪੂਆ ਨਵਾਂ ਗੂਈਆ pg -Papua Nowa Gwinea pg -Papua Nova Guiné pg -Papua Nova Guiné pg -Papua Noua Guinee pg -Папуа-ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ pg -Papuwa Gineya Nshya pg -Papua Ođđa-Guinea pg -Papua Nová Guinea pg -Papua Nova Gvineja pg -Папуа Ðова Гвинеја pg -Papua Nova Gvineja pg -Papua Nya Guinea pg -பாபà¯à®ªà®¾ நியூ ஜினியா pg -Папуа ГвинеиÑи Ðав pg -ปาปัวนิวà¸à¸´à¸™à¸µ pg -Papua Yeni Gine pg -Papua Yaña Guinea pg -Папуа Ðова Ð“Ð²Ñ–Ð½ÐµÑ pg -Папуа Янги Ð“Ð²Ð¸Ð½ÐµÑ pg -Papouwazeye Nouve Guinêye pg -巴布亚新几内亚 pg -巴布ç´å¹¾å…§äºž pg -Philippines ph -Fillipyne ph -الÙلبين ph -FillipinlÉ™r ph -Філіпіны ph -Филипини ph -ফিলিপিনস ph -Filipin ph -Filipini ph -Filipines ph -Filipíny ph -Ynysoedd Y Philipinau ph -Filippinerne ph -Philippinen ph -Φιλιππίνες ph -Filipinoj ph -Filipinas ph -Filipiinid ph -Filipinak ph -Ùیلیپین ph -Filippiinit ph -Filippijnen ph -Na hOileáin Fhilipíneacha ph -Filipinas ph -×¤×™×œ×™×¤×™× ×™× ph -फिलिपà¥à¤ªà¥€à¤¨à¥à¤¸ ph -Filipini ph -Fülöp-szigetek ph -Filippseyjar ph -Filippine ph -フィリピン ph -ហ្វ៊ីលីពីន ph -필리핀 ph -ອາລະປະໂຫàºàº” ph -Filipinai ph -FilipÄ«nas ph -Филипини ph -Плиппин ph -Filippini ph -Filippinene ph -Philippinen ph -Filippijnen ph -Filippinane ph -ਫਿਲੀਪੀਨਜ਼ ph -Filipiny ph -Filipinas ph -Filipinas ph -Filipine ph -Филиппины ph -Filipine ph -Filippiinat ph -Filipíny ph -Filipini ph -Филипини ph -Filipini ph -Filippinerna ph -பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯ ph -Филипин ph -ฟิลิปปินส์ ph -Filipinler ph -Filippinnär ph -Філіппіни ph -Филиппин ph -Filipenes ph -è²å¾‹å®¾ ph -è²å¾‹è³“ ph -Pakistan pk -باكستان pk -ПакіÑтан pk -ПакиÑтан pk -পাকিসà§à¦¤à¦¾à¦¨ pk -Paquistà pk -Pákistán pk -Pacistan pk -Πακιστάν pk -Pakistano pk -پاکستان pk -An Phacastáin pk -Paquistán pk -פ×קיסטן pk -पाकिसà¥à¤¤à¤¾à¤¨ pk -Pakisztán pk -パキスタン pk -ប៉ាគីស្ážáž¶áž“ pk -파키스탄 pk -ລງບ pk -Pakistanas pk -PakistÄna pk -ПакиÑтан pk -ПакиÑтан pk -ਪਾਕਿਸਤਾਨ pk -Paquistão pk -Paquistão pk -ПакиÑтан pk -Pakisitani pk -ПакиÑтан pk -பாகிஸà¯à®¤à®¾à®©à¯ pk -ПокиÑтон pk -ปาà¸à¸µà¸ªà¸–าน pk -Päqstan pk -ПакиÑтан pk -ПокиÑтон pk -å·´åŸºæ–¯å¦ pk -å·´åŸºæ–¯å¦ pk -Poland pl -بولندا pl -PolÅŸa pl -Польшча pl -Полша pl -পোলà§à¦¯à¦¾à¦£à§à¦¡ pl -Polonia pl -Poljska pl -Polònia pl -Polsko pl -Gwlad Pwyl pl -Polen pl -Polen pl -Πολωνία pl -Pollando pl -Polonia pl -Poola pl -Polonia pl -لهستان pl -Puola pl -Pólland pl -Pologne pl -Polen pl -An Pholainn pl -Polónia pl -פולין pl -पोलैंड pl -Poljska pl -Lengyelország pl -Polandia pl -Pólland pl -Polonia pl -ãƒãƒ¼ãƒ©ãƒ³ãƒ‰ pl -ប៉ូឡូញ pl -í´ëž€ë“œ pl -ໂປà»àº¥àº™ pl -Lenkija pl -Polija pl -ПолÑка pl -Польш pl -Polonja pl -Polen pl -Polen pl -Polen pl -Polen pl -Polònia pl -ਪੋਲੈਂਡ pl -Polska pl -Polónia pl -Polônia pl -Polonia pl -Польша pl -Polonye pl -Polska pl -Poľsko pl -Poljska pl -ПољÑка pl -Poljska pl -I-Poland pl -Polen pl -போலாநà¯à®¤à¯ pl -ÐŸÐ¾Ð»Ð°Ð½Ð´Ð¸Ñ pl -โปà¹à¸¥à¸™à¸”์ pl -Polonya pl -Polonia, PolÅŸa pl -Польща pl -Полша pl -Pholandi pl -Ba Lan pl -Pologne pl -波兰 pl -波蘭 pl -Saint Pierre and Miquelon pm -St Pierre en Miquelon pm -سانت بيير Ùˆ ميكيلون pm -Saint Pierre vÉ™ Miquelon pm -СÑн-П'ер Ñ– Мікелон pm -Св. Пиер и Магелан pm -সেনà§à¦Ÿ পিয়ের à¦à¦¬à¦‚ মিকেলন pm -Sant Per ha Mikelon pm -Sveti Pjer i Migelon pm -Saint Pierre i Miquelon pm -Saint Pierre a Miquelon pm -Ynysoedd Sant Pierre a Micwelon pm -Saint Pierre og Miquelon pm -Saint Pierre und Miquelon pm -Σαιν Î Î¹Î­Ï (Άγιος ΠέτÏος) και Μικελόν pm -Sent-Piero kaj Mikelono pm -Saint Pierre y Miquelon pm -Saint Pierre ja Miquelon pm -Saint Pierre eta Miquelon pm -سنت Ù¾ÛŒÙØ± Ùˆ میکولئون pm -Saint-Pierre ja Miquelon pm -Saint-Pierre-et-Miquelon pm -Saint Pierre en Miquelon pm -Peadar Naofa agus Micilín pm -Saint Pierre e Miquelon pm -ס×ן פייר ומיקלון pm -सेंट पियरे तथा मिकà¥à¤µà¥‡à¤²à¤¨ pm -Saint Pierre i Miquelon pm -Saint Pierre és Miquelon pm -Sankti Pierre og Miquelon pm -Saint Pierre e Miquelon pm -フランス海外領土サンピエールミクロン諸島 pm -세ì¸íЏ 피ì—르 미쿠엘론 pm -SenpjÄ“ra un Mikelona pm -Свети Пјер и Микелон pm -Сайнт пиерре ба микуелон pm -Saint Pierre u Miquelon pm -Saint-Pierre-et-Miquelon pm -Sankt Pierre un Miquelon pm -Saint Pierre en Miquelon pm -Saint-Pierre-et-Miquelon pm -ਸੇਂਟ ਪੀਈਰੀ ਤੇ ਮਾਕਿਉਲੋਨ pm -Saint Pierre i Miquelon pm -S. Pedro e Miquelão pm -Saint Pierre e Miquelon pm -Saint Pierre ÅŸi Miquelon pm -Сен-Пьер и Микелон pm -Mutagatifu Petero na Mikelo pm -Saint-Pierre-et-Miquelon pm -Saint Pierre a Miquelon pm -Sveti Pierre in Miquelon pm -Св. Пјер и Микелон pm -Sv. Pjer i Mikelon pm -Saint Pierre och Miquelon pm -செயினà¯à®Ÿà¯ பியரி மறà¯à®±à¯à®®à¯ மிகà¯à®¯à¯à®²à®©à¯ pm -Синт Пир Миколеюн pm -เซนต์ปิà¹à¸­à¸£à¹Œ à¹à¸¥à¸°à¸¡à¸´à¹€à¸„อลอน pm -Saint Pierre ve Miquelon pm -Saint Pierre wä Miquelon pm -Сент-П'єр Ñ– Мікелон pm -Сент-Пер ва Микелон pm -Sint Pire et Miquelon pm -圣皮埃尔和密克隆 pm -è–皮埃爾島åŠå¯†å…‹éš†å³¶ pm -Pitcairn pn -بيتكايرن pn -ПіткÑрн pn -ОÑтрови Питкерн pn -পিটকেম pn -Pitkern pn -Ynys Pitcairn pn -ΠίτκαιÏν pn -Pitkarna Insulo pn -پیت Ú©ÙØ±Ù† pn -פיטקרן pn -पिटकैरà¥à¤¨ pn -英領ピトケアン諸島 pn -í•케언 pn -ລງບ pn -PitkÄ“rna pn -Питкерн pn -Питкайрн pn -ਪੀਟਕਾਰਨ pn -Питкаирн pn -பிடà¯à®•ாயà¯à®©à¯ pn -Питкорин pn -เà¸à¸²à¸°à¸žà¸´à¸•à¹à¸„ร์น pn -Pitkairn pn -Питкерн pn -çš®ç‰¹å¼€æ© pn -匹特開æ©å³¶ pn -Puerto Rico pr -بورتوريكو pr -Puerto Riko pr -ПуÑрта Рыка pr -Порто Рико pr -পà§à§Ÿà§‡à¦°à§à¦¤à§‹ রিকো pr -Porto Rico pr -Portoriko pr -Portoriko pr -Pwerto Rico pr -ΠουέÏτο Ρίκο pr -Puerto-Riko pr -پورتوریکو pr -Porto Rico pr -Portó Ríce pr -Porto Rico pr -פורטו ריקו pr -पà¥à¤¯à¥‚रà¥à¤Ÿà¥‹ रिको pr -Portoriko pr -Púertó Ríkó pr -Portorico pr -プエルトリコ pr -áž–áŸážšážáž¼ážšáž¸áž€áž¼ pr -푸ì—르토리코 pr -ໂປຣໂຕຄອນ pr -Puerto Rikas pr -Puertoriko pr -Порто Рико pr -Пуерто Рико pr -ਰੂਇਰਟੂ ਰੀਕੋ pr -Porto Rico pr -Porto Rico pr -ПуÑрто-Рико pr -Porito Riko pr -Portoriko pr -Порторико pr -Portoriko pr -பà¯à®¯à¯à®°à¯à®Ÿà¯‹ ரிகோ pr -Пурто Рико pr -เปอร์โตริโภpr -Porta Riko pr -Puerto Riko pr -Пуерто-Ріко pr -ПуÑрто-Рико pr -Porto Rico pr -æ³¢å¤šé»Žå„ pr -æ³¢å¤šé»Žå„ pr -Palestinian Territory ps -Palesteinse Gebied ps -السلطة الÙلسطينية ps -FÉ™lÉ™stin SahÉ™si ps -ПалеÑтынÑÐºÐ°Ñ Ñ‚ÑÑ€Ñ‹Ñ‚Ð¾Ñ€Ñ‹Ñ ps -ПалеÑтина ps -পà§à¦¯à¦¾à¦²à§‡à¦¸à§à¦Ÿà¦¿à¦¨à¦¿à§Ÿà¦¾à¦¨ টেরিটরি ps -Palestinska teritorija ps -Territori Palestí ps -Palestinské území ps -Tiriogaeth Palesteina ps -Palæstinensiske selvstyreomrÃ¥der ps -Palästinensisches Gebiet ps -Παλαιστίνη ps -Palestina Teritorio ps -Territorio palestino ps -Palestiina ps -Palestina ps -Ùلسطین ps -Palestiinalaisalue ps -Palestinensiska økið ps -Territoire palestinien ps -Palestijnsk territorium ps -Críoch na bPalaistíneach ps -Território Palestino ps -×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™× ps -फिलीसà¥à¤¤à¥€à¤¨à¥€ टेरिटरी ps -Palestinski teritorij ps -Palesztin területek ps -Palestína ps -Palestina ps -パレスãƒãƒŠè‡ªæ²»åŒº ps -ប៉ាលáŸážŸáŸ’ទីន ps -íŒ”ë ˆìŠ¤íƒ€ì¸ ìžì¹˜êµ¬ ps -àºàº²àº™àºžàº´àº¡àºœàº´àº”ພາດ ps -Palestinos teritorija ps -PalestÄ«nieÅ¡u treitorija ps -ПалеÑтинÑки територии ps -ПалеÑтины газар нутаг ps -Palestina ps -Palestinske territorier ps -De palästinensche sülvenregeerte Regioon ps -Palestijns territorium ps -Palestinske territorium ps -Bohwa bja Palestina ps -ਫਲਾਸਤੀਨ ਖੇਤਰ ps -Palestyna ps -Território Palestiniano ps -Território Palestino ps -Teritoriul Palestinian ps -ПалеÑтинÑкие территории ps -Igihugu cya Palesitina ps -PalestiinnalaÅ¡ territoria ps -Palestínske územia ps -Palestinski teritorij ps -ПалеÑтина ps -Palestina ps -I-Palestinian Territory ps -Palestina ps -பாலஸà¯à®¤à¯€à®© ஆணையம௠ps -ФалаÑтин ps -เขตปà¸à¸„รองปาเลสไตน์ ps -Filistin Bölgesi ps -Fälestin ps -ПалеÑтинÑька Ñ‚ÐµÑ€Ð¸Ñ‚Ð¾Ñ€Ñ–Ñ ps -ФалаÑтин Ерлари ps -Mukano wa maphalesitina ps -Lãnh thổ cá»§a Palestine ps -Palestene ps -Umhlaba wePalestina ps -å·´å‹’æ–¯å¦åœ°åŒº ps -å·´å‹’æ–¯å¦é ˜åœ° ps -Indawo yama-Phalesitina ps -Portugal pt -البرتغال pt -Portuqaliya pt -ÐŸÐ°Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt -পোরà§à¦¤à§à¦—াল pt -Portugalsko pt -Portiwgal pt -ΠοÏτογαλία pt -Portugalo pt -پرتغال pt -Portugali pt -An Phortaingéil pt -פורטוגל pt -पà¥à¤°à¥à¤¤à¤—ाल pt -Portugália pt -Portúgal pt -Portogallo pt -ãƒãƒ«ãƒˆã‚¬ãƒ« pt -áž–áŸážšáž‘ុយហ្គាល់ pt -í¬ë¥´íˆ¬ê°ˆ pt -ໂປຣຕຸເàºàºª pt -Portugalija pt -PortugÄle pt -Португалија pt -Португал pt -Portugall pt -ਪà©à¨°à¨¤à¨—ਾਲ pt -Portugalia pt -Portugalia pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt -Poritigali pt -Portugalsko pt -Portugalska pt -Португал pt -I-Portugal pt -போரà¯à®¤à¯à®¤à¯à®•ல௠pt -Пуртуқол pt -โปรตุเà¸à¸ª pt -Portekiz pt -Portugalia pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt -ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt -Bồ Äào Nha pt -è‘¡è„牙 pt -è‘¡è„牙 pt -Palau pw -بالاو pw -Палау pw -Палау pw -পালাউ pw -Palaw pw -Παλάου pw -Palao pw -پالائو pw -פל×ו pw -पलाऊ pw -Palá pw -パラオ pw -ប៉ាឡូ pw -팔ë¼ìš° pw -ມອລຕາ pw -Палау pw -Палау pw -ਪਾਲਾਉ pw -Палау pw -Palawu pw -Палау pw -பலாவ௠pw -Палау pw -เà¸à¸²à¸°à¸žà¸²à¹€à¸¥à¸² pw -Палау pw -Палау pw -Palawou pw -帕劳 pw -å¸›ç‰ pw -Paraguay py -Paraguaai py -باراغواي py -Paraqvay py -Парагвай py -Парагвай py -পà§à¦¯à¦¾à¦°à¦¾à¦—à§à§Ÿà§‡ py -Paragwae py -Paragvaj py -Paraguai py -Paragw?i py -ΠαÏαγουάη py -Paragvajo py -Paraguai py -پاراگویه py -Paragua py -Paraguai py -פרגו××™ py -पैरागà¥à¤ py -Paragvaj py -Paragvæ py -パラグアイ py -ប៉ារ៉ាហ្គាយ py -파ë¼ê³¼ì´ py -ປາລາàºàºàº§àº py -Paragvajus py -Paragvaja py -Парагвај py -Парагвай py -Paragwaj py -Paraguai py -ਪਾਰਾਗà©à¨† py -Paragwaj py -Paraguai py -Paraguai py -Paraguai py -Парагвай py -Paragwe py -Portugalsko py -Paragvaj py -Парагвај py -Paragvaj py -I-Paraguay py -பராகà¯à®µà¯‡ py -Порогвие py -ปาราà¸à¸§à¸±à¸¢ py -Парагвай py -Парагвай py -Paragway py -巴拉圭 py -巴拉圭 py -Qatar qa -قطر qa -Катар qa -Катар qa -কাতার qa -Kwatar qa -Katar qa -Katar qa -Catar qa -Katar qa -ÎšÎ±Ï„Î¬Ï qa -Kataro qa -Katar qa -قطر qa -Katar qa -Catar qa -קטר qa -क़तर qa -Katar qa -Katar qa -Katar qa -カタール qa -កាážáž¶ážš qa -카타르 qa -ມອລຕາ qa -Kataras qa -Katara qa -Катар qa -Катар qa -Katar qa -ਕਤਰ qa -Katar qa -Катар qa -Katari qa -Katar qa -Katar qa -Катар qa -Katar qa -I-Qatar qa -கதார௠qa -Қатар qa -ควาตาร์ qa -Katar qa -Катар qa -Қатар qa -Katar qa -å¡å¡”å°” qa -å¡é” qa -Romania ro -Romenië ro -رومانيا ro -Rumıniya ro -Ð ÑƒÐ¼Ñ‹Ð½Ñ–Ñ ro -Ð ÑƒÐ¼ÑŠÐ½Ð¸Ñ ro -রà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ ro -Roumani ro -Rumunija ro -Rumunsko ro -Rumænien ro -Rumänien ro -Ρουμανία ro -Rumanio ro -Rumanía ro -Rumeenia ro -Errumania ro -رومانی ro -Rumenia ro -Roumanie ro -Roemenië ro -An Rómáin ro -Románia ro -רומניה ro -रोमानिया ro -Rumunjska ro -Románia ro -Rumania ro -Rúmenía ro -ルーマニア ro -រូម៉ានី ro -루마니아 ro -ໂລມາເນີຠro -Rumunija ro -RumÄnija ro -Романија ro -Румын ro -Rumanija ro -Rumänien ro -Roemenië ro -ਰੋਮਾਨੀਆ ro -Rumunia ro -Roménia ro -Romênia ro -România ro -Ð ÑƒÐ¼Ñ‹Ð½Ð¸Ñ ro -Romaniya ro -Románia ro -Rumunsko ro -Romunija ro -Румунија ro -Rumunija ro -I-Romania ro -Rumänien ro -à®°à¯à®®à¯‡à®©à®¿à®¯à®¾ ro -Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro -โรมาเนีย ro -Romanya ro -Ð ÑƒÐ¼ÑƒÐ½Ñ–Ñ ro -Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro -Roumaneye ro -罗马尼亚 ro -羅馬尼亞 ro -Russia ru -Rusland ru -روسيا ru -Rusiya ru -РаÑÐµÑ ru -РуÑÐ¸Ñ ru -রাশিয়া ru -Rusia ru -Rusija ru -Rússia ru -Rusko ru -Rwsia ru -Rusland ru -Russland ru -Ρωσία ru -Ruslando ru -Rusia ru -Venemaa ru -Errusia ru -روسیه ru -Venäjä ru -Russland ru -Russie ru -Rusland ru -An Rúis ru -Rúsia ru -רוסיה ru -रà¥à¤¸ ru -Rusija ru -Oroszország ru -Rusia ru -Rússland ru -ロシア ru -រូស្ស៊ី ru -러시아 ru -ລັດເຊີຠru -Rusija ru -Krievija ru -РуÑија ru -ÐžÑ€Ð¾Ñ ru -Russja ru -Russland ru -Russland ru -Rusland ru -Russland ru -ਰੂਸ ru -Rosja ru -Rússia ru -Rússia ru -Rusia ru -РоÑÑÐ¸Ñ ru -Uburusiya ru -Ruošša ru -Rusko ru -Rusija ru -РуÑија ru -Rusija ru -I-Russia ru -Ryssland ru -ரசியா ru -РуÑÑÐ¸Ñ ru -รัสเซีย ru -Rusya ru -Urısia, Räsäy ru -РоÑÑ–Ñ ru -РоÑÑÐ¸Ñ ru -Rashia ru -Nga ru -Rûsseye ru -Rashiya ru -ä¿„ç½—æ–¯ ru -ä¿„ç¾…æ–¯ ru -Rwanda rw -رواندا rw -Ruanda rw -Руанда rw -Руанда rw -রোয়ানà§à¦¡à¦¾ rw -Ruanda rw -Ruanda rw -Ruanda rw -Ρουάντα rw -Ruando rw -Ruanda rw -رواندا rw -Ruanda rw -Ruanda rw -Ruanda rw -רו×נדה rw -रवांडा rw -Ruanda rw -Ruanda rw -Rúanda rw -Ruanda rw -ルワンダ rw -រវ៉ាន់ដា rw -르완다 rw -à»àºžàº™àº”້າ rw -Ruanda rw -Ruanda rw -Руанда rw -Рванда rw -Ruanda rw -ਰਵਾਂਡਾ rw -Ruanda rw -Ruanda rw -Ruanda rw -Ruanda rw -Руанда rw -Ruanda rw -Руанда rw -Ruanda rw -வானà¯à®Ÿà®¾ rw -Руондо rw -รวันด้า rw -Ruanda rw -Руанда rw -Рванда rw -墿—ºè¾¾ rw -ç›§å®‰é” rw -Saudi Arabia sa -Saudi Arabië sa -السعودية sa -SÉ™udi ÆrÉ™bistan sa -СаудаўÑÐºÐ°Ñ ÐÑ€Ð°Ð±Ñ–Ñ sa -СаудитÑка ÐÑ€Ð°Ð±Ð¸Ñ sa -সৌদি আরব sa -Arabi Saudiet sa -Saudijska Arabija sa -Aràbia Saurí sa -Saúdská Arábie sa -Sawdi Arabia sa -Saudi Arabien sa -Saudi-Arabien sa -Σαουδική ΑÏαβία sa -SaÅ­da Arabio sa -Arabia Saudí sa -Saudi Araabia sa -عربستان سعودی sa -Saudi-Arabia sa -Arabie Saoudite sa -Saudi-Arabië sa -An Araib Shádach sa -Arabia Saudita sa -ערב הסעודית sa -सऊदी अरब sa -Saudijska Arabija sa -Szaúd-Arábia sa -Sádi-Arabía sa -Arabia Saudita sa -サウジアラビア sa -អារ៉ាប៊ីសាអ៊ូឌីហsa -사우디 ì•„ë¼ë¹„ì•„ sa -ອາລະບິຠsa -Saudo Arabija sa -SaÅ«da ArÄbija sa -СаудиÑка Ðрабија sa -Саудын араб sa -Għarabja Sawdita sa -Saudi-Arabia sa -Saudi Arabien sa -Saudi-Arabië sa -Saudi-Arabia sa -ਸਾਊਦੀ ਅਰਬ sa -Arabia Saudyjska sa -Arábia Saudita sa -Arábia Saudita sa -Arabia Saudită sa -СаудовÑÐºÐ°Ñ ÐÑ€Ð°Ð²Ð¸Ñ sa -Arabiya Sawudite sa -Saudi Arábia sa -Saudská arábia sa -Saudova Arabija sa -СаудијÑка Ðрабија sa -Saudijska Arabija sa -I-Saudi Arabia sa -Saudiarabien sa -சவà¯à®¤à®¿ அரேபியா sa -ÐрабиÑтони Саудӣ sa -ซาอุดิอาระเบีย sa -Suudi Arabistan sa -Söğüd Ğäräbstan sa -СаудівÑька ÐÑ€Ð°Ð²Ñ–Ñ sa -Ð¡Ð°ÑƒÐ´Ð¸Ñ ÐрабиÑтони sa -Ẩrập Saudi sa -Arabeye Sawoudite sa -沙特阿拉伯 sa -æ²™çƒåœ°é˜¿æ‹‰ä¼¯ sa -Solomon Islands sb -Solomon Eilande sb -جزر سليمان sb -Solomon Adaları sb -Саламонавы аÑтравы sb -Соломонови оÑтрови sb -সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ sb -Inizi Salaun sb -Solomonska ostrva sb -Illes Solomon sb -Å alamounovy ostrovy sb -Ynysoedd Solomon sb -Salomon-øerne sb -Salomon-Inseln sb -Îήσοι Σολομώντος sb -Salomonoj sb -Islas Salomón sb -Saalomoni saared sb -Solomon Irlak sb -جزایر سلیمان sb -Solomon-saaret sb -ÃŽles Salomon sb -Solomon Eilannen sb -Oileáin Sholamón sb -Illas Salomón sb -××™×™ שלמה sb -सोलोमन आइलैंड sb -Solomonova otoÄja sb -Salamon-szigetek sb -Salómonseyjar sb -Isole Salomone sb -ソロモン諸島 sb -កោះ​សូឡូម៉ូន sb -솔로몬 ì œë„ sb -ສະໂລວະເນີຠsb -Saliamono salos sb -Solomonu salas sb -СоломонÑки ОÑтрови sb -Соломоны арлууд sb -Gżejjer Solomon sb -Salomonøyene sb -Salomonen sb -Solomon Eilanden sb -Salomonøyane sb -ਸੋਲੋਮੋਨ ਆਈਸਲੈਂਡ sb -Wyspy Salomona sb -Ilhas Salomão sb -Ilhas Salomão sb -Insulele Solomon sb -Соломоновы оÑтрова sb -Ibirwa bya Salomo sb -Salomonsullot sb -Å alamúnove ostrovy sb -Solomonovi otoki sb -Соломонова оÑтрва sb -Solomonova ostrva sb -Salomonöarna sb -சாலமன௠தீவà¯à®•ள௠sb -Ҷазираи Сулаймон sb -หมู่เà¸à¸²à¸°à¹‚ซโลมอน sb -Solomon Adaları sb -Solomon Utrawları sb -Соломонові оÑтрови sb -Соломон Ороллари sb -Quần đảo Solomon sb -Iyes Salomon sb -所罗门群岛 sb -索羅門群島 sb -Seychelles sc -سيشل sc -СÑйшÑлы sc -СейшелÑки оÑтрови sc -সীচিলিস sc -Sechell sc -SejÅ¡eli sc -Ynysoedd y Seisi?l sc -Seychellerne sc -Seychellen sc -Σεϋχέλλες sc -SejÅeloj sc -SeiÅ¡ellid sc -سیشل sc -Seychellit sc -Seychellen sc -Na Séiséil sc -Seicheles sc -××™×™ סיישל sc -शेसेलà¥à¤¸ sc -SejÅ¡eli sc -Seychelles-eyjar sc -セイシェル sc -សីស្ហែល sc -세ì´ì…¸ sc -ເຊລ sc -SeiÅ¡eļu salas sc -Сејшели sc -Ð¡ÐµÐ¹Ñ‡ÐµÐ»Ð»Ð¸Ñ sc -Seychellene sc -Seychellen sc -Seychellen sc -Seychellane sc -ਸੀਲਚੀਲੀਸ sc -Seszele sc -Ilhas Seychelles sc -СейшельÑкие оÑтрова sc -Seyishele sc -SeyÅ¡ellat sc -SejÅ¡eli sc -Сејшели sc -SejÅ¡eli sc -Seychellerna sc -சேசெலà¯à®²à®¸à¯ sc -Сейшелӣ sc -ซีเชลล์ sc -SeyÅŸeller sc -SeyÅŸellär sc -СейшельÑькі оÑтрови sc -Сейшел Ороллари sc -Seycheles sc -塞舌尔 sc -塞席爾 sc -Sudan sd -السودان sd -Судан sd -Судан sd -সà§à¦¦à¦¾à¦¨ sd -Sondan sd -Sudán sd -Swdan sd -Σουδάν sd -Sudano sd -Sudán sd -Sudaan sd -سودان sd -Sudania sd -Soudan sd -An tSúdáin sd -Sudán sd -סודן sd -सूडान sd -Szudán sd -Súdan sd -スーダン sd -ស៊ូដង់ sd -수단 sd -ຊູດານ sd -Sudanas sd -SudÄna sd -Судан sd -Судан sd -ਸੂਡਾਨ sd -Sudão sd -Sudão sd -Судан sd -Sudani sd -Sudán sd -Судан sd -I-Sudan sd -சூடான௠sd -Судон sd -ซูดาน sd -Судан sd -Судан sd -Sudani sd -Soudan sd -è‹ä¸¹ sd -蘇丹 sd -Sweden se -Swede se -السويد se -İsveç se -ШвÑÑ†Ñ‹Ñ se -Ð¨Ð²ÐµÑ†Ð¸Ñ se -সà§à¦‡à¦¡à§‡à¦¨ se -Å vedska se -Suècia se -Å védsko se -Sverige se -Schweden se -Σουηδία se -Svedio se -Suecia se -Rootsi se -Suedia se -سوئد se -Ruotsi se -Svøriki se -Suède se -Zweden se -An tSualainn se -Suécia se -שבדיה se -सà¥à¤µà¥€à¤¡à¤¨ se -Å vedska se -Svédország se -Swedia se -Svíþjóð se -Svezia se -スウェーデン se -ស៊ុយអែដ se -ìŠ¤ì›¨ë´ se -ສະວີເດນ se -Å vedija se -Zviedrija se -ШведÑка se -Швед se -Svezja se -Sverige se -Zweden se -Sverige se -Suècia se -ਸਵੀਡਨ se -Szwecja se -Suécia se -Suécia se -Suedia se -Ð¨Ð²ÐµÑ†Ð¸Ñ se -Suwede se -Ruoŧŧa se -Å védsko se -Å vedska se -ШведÑка se -Å vedska se -I-Sweden se -Sverige se -சà¯à®µà¯€à®Ÿà®©à¯ se -Шведӣ se -สวีเดน se -İsveç se -İswäc, Åžwedsia se -Ð¨Ð²ÐµÑ†Ñ–Ñ se -Ð¨Ð²ÐµÑ†Ð¸Ñ se -Swidene se -Thuỵ Äiển se -Suwede se -瑞典 se -瑞典 se -Singapore sg -سنغاÙورة sg -Sinqapur sg -Сынгапур sg -Сингапур sg -সিঙà§à¦—াপà§à¦° sg -Singapour sg -Singapur sg -Singapur sg -Singapur sg -Singap?r sg -Singapur sg -ΣινγκαποÏÏη sg -Singapuro sg -Singapur sg -Singapur sg -سنگاپور sg -Singapour sg -Singeapór sg -Singapur sg -סינגפור sg -सिंगापोर sg -Singapur sg -Szingapúr sg -Singapúr sg -シンガãƒãƒ¼ãƒ« sg -សិង្ហបុរី sg -싱가í¬ë¥´ sg -ໂຊນາ sg -SingapÅ«ras sg -SingapÅ«ra sg -Сингапур sg -Сингафур sg -Singapura sg -Singapor sg -Singapur sg -ਸਿੰਘਾਪà©à¨° sg -Singapur sg -Singapura sg -Singapura sg -Сингапур sg -Singapur sg -Singapur sg -Сингапур sg -Singapur sg -சிஙà¯à®•பà¯à®ªà¯‚ர௠sg -Сингопур sg -สิงคโปร์ sg -Singapur sg -Singapur sg -Сінгапур sg -Сингапур sg -Singapour sg -æ–°åŠ å¡ sg -æ–°åŠ å¡ sg -Saint Helena sh -St Helena sh -سانت هيلانة sh -ВоÑтраў СьвÑтой Ðлены sh -Св. Елена sh -সেনà§à¦Ÿ হেলেনা sh -Sant Lena sh -Sveta Helena sh -Santa Helena sh -Svatá Helena sh -Ynys Santes Helena sh -St. Helena sh -St. Helena sh -Αγία Ελένη sh -Sent-Heleno sh -Santa Helena sh -سنت هلن sh -Sainte-Hélène sh -Sint Helena sh -San Héilin sh -Santa Helena sh -סט. הלנה sh -सेंट हेलेना sh -Sveta Helena sh -Szent Heléna sh -Sankti Helena sh -Sant'Elena sh -英領セントヘレナ島 sh -សង់ហáŸáž¡áŸážŽáž¶ sh -세ì¸íŠ¸í—¬ë ˆë‚˜ sh -ຫົວເລື່ອງ sh -Å v. Elenos sala sh -Sv. HelÄ“nas sala sh -Света Елена sh -Сайнт Хелена sh -St. Helena sh -Sankt Helena sh -St. Helena sh -ਸੇਂਟ ਹੀਲੀਨਆ sh -ÅšwiÄ™ta Helena sh -Santa Helena sh -Santa Helena sh -Sfînta Elena sh -оÑтров СвÑтой Елены sh -Mutagatifu Helena sh -St. Helena sh -Svätá Helena sh -Sveta Helena sh -Света Јелена sh -Sveta Jelena sh -செயினà¯à®Ÿà¯ ஹேலேனா sh -Синт Ҳилин sh -เซนต์เฮเลน่า sh -ОÑтрів СвÑтої Єлени sh -Ðвлиё Елена Ороли sh -Sint Elene sh -圣赫勒拿 sh -è–赫勒拿島 sh -Slovenia si -Slovenië si -سلوÙينيا si -Sloveniya si -Ð¡Ð»Ð°Ð²ÐµÐ½Ñ–Ñ si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si -সà§à¦²à§‹à¦­à§‡à¦¨à¦¿à§Ÿà¦¾ si -Sloveni si -Slovenija si -Eslovènia si -Slovinsko si -Slofenia si -Slovenien si -Slowenien si -Σλοβενία si -Slovenio si -Eslovenia si -Sloveenia si -Eslovenia si -اسلوانی si -Slovénie si -Slowenië si -An tSlóivéin si -Eslovénia si -סלובניה si -सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾ si -Slovenija si -Szlovénia si -Slóvenía si -スロベニア si -ស្លូវ៉ានី si -슬로베니아 si -ສະໂລວະເນີຠsi -SlovÄ—nija si -SlovÄ“nija si -Словенија si -Слован si -Slovenja si -Slowenien si -Slowenië si -Eslovenia si -ਸਲੋਵੀਨੀਆ si -SÅ‚owenia si -Eslovénia si -Eslovênia si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si -Siloveniya si -Slovinsko si -Slovenija si -Словенија si -Slovenija si -I-Slovenia si -Slovenien si -சà¯à®²à¯‹à®µà®¿à®©à®¿à®¯à®¾ si -УÑлувонӣ si -สโลเวเนีย si -Slovenya si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ñ–Ñ si -Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si -Esloveneye si -斯洛文尼亚 si -斯洛維尼亞 si -Slovakia sk -Slovakië sk -Ø³Ù„ÙˆÙØ§ÙƒÙŠØ§ sk -Slovakiya sk -Ð¡Ð»Ð°Ð²Ð°ÐºÑ–Ñ sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk -সà§à¦²à§‹à¦­à¦¾à¦•িয়া sk -Slovaki sk -SlovaÄka sk -Eslovàquia sk -Slovensko sk -Slofacia sk -Slovakiet sk -Slowakien sk -Σλοβακία sk -Slovakujo sk -Eslovaquia sk -Slovakkia sk -Eslovakia sk -اسلواکی sk -Slovaquie sk -Slowakije sk -An tSlóvaic sk -Eslováquia sk -סלובקיה sk -सà¥à¤²à¥‹à¤µà¤¾à¤•िया sk -SlovaÄka sk -Szlovákia sk -Slóvakía sk -Slovacchia sk -スロãƒã‚­ã‚¢ sk -ស្លូវ៉ាគី sk -슬로바키아 sk -ສະໂລວັຠsk -Slovakija sk -SlovÄkija sk -Словачка sk -Словак sk -Slovakja sk -Slowakei sk -Slowakije sk -ਸਲੋਵਾਕਿਆ sk -SÅ‚owacja sk -Eslováquia sk -Eslováquia sk -Slovacia sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk -Silovakiya sk -Slovákia sk -Slovensko sk -SlovaÅ¡ka sk -Словачка sk -SlovaÄka sk -I-Slovakia sk -Slovakien sk -சà¯à®²à¯‹à®µà®¾à®•à¯à®•ிய sk -УÑлувок sk -สโลวาเà¸à¸µà¸¢ sk -Slovakya sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÑ–Ñ sk -Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk -Eslovakeye sk -斯洛ä¼å…‹ sk -斯洛ä¼å…‹ sk -San Marino sm -سان مارينو sm -Сан-Марына sm -Сан Марино sm -সান মারিনো sm -Σαν ΜαÏίνο sm -San-Marino sm -سن‌مارینو sm -Saint-Marin sm -San Mairíne sm -סן מרינו sm -सेन मेरिनो sm -San Marínó sm -サンマリノ sm -សាន់ម៉ារីណូ sm -산마리노 sm -ໂຊນາ sm -San Marinas sm -SanmarÄ«no sm -Сан Марино sm -Сан Марино sm -ਸਨ ਮਰੀਨੋ sm -São Marino sm -Сан-Марино sm -Mutagatifu Marini sm -Сан Марино sm -சான௠மரினோ sm -Сан Морину sm -ซานมาริโน sm -Сан-Маріно sm -Сан-Марино sm -Sint Marin sm -圣马力诺 sm -è–馬力諾 sm -Senegal sn -السنغال sn -Seneqal sn -СÑнÑгал sn -Сенегал sn -সেনেগল sn -Σενεγάλη sn -Senegalo sn -سنگال sn -Senegali sn -Sénégal sn -An tSeineagáil sn -סנגל sn -सेनेगल sn -Szenegál sn -ã‚»ãƒã‚¬ãƒ« sn -សáŸáž“áŸáž áŸ’គាល់ sn -세네갈 sn -ທົ່ວໄປ sn -Senegalas sn -SenegÄla sn -Сенегал sn -Сенегал sn -Senegall sn -ਸੈਨੇਗਾਲ sn -Сенегал sn -Senegali sn -Сенегал sn -சீனேகல௠sn -Синегол sn -เซนีà¸à¸±à¸¥ sn -Сенегал sn -Сенегал sn -SenegÃ¥l sn -塞内加尔 sn -塞內加爾 sn -Somalia so -Somalië so -صومال so -Somali so -Самалі so -Ð¡Ð¾Ð¼Ð°Ð»Ð¸Ñ so -সোমালিয়া so -Somali so -Somalija so -Somàlia so -Somálsko so -Σομαλία so -Somalio so -Somaalia so -سومالی so -Somalie so -Somalie so -An tSomáil so -Somália so -סומליה so -सोमालिया so -Somalija so -Szomália so -Sómalía so -ソマリア so -សូម៉ាលី so -소ë§ë¦¬ì•„ so -ໂລມາເນີຠso -Somalis so -SomÄlija so -Сомалија so -Сомали so -Somalija so -Somalien so -Somalie so -ਸੋਮਾਲੀਆ so -Somália so -Somália so -Сомали so -Somaliya so -Somália so -Somálsko so -Somalija so -Сомалија so -Somalija so -I-Somalia so -சோமாலியா so -Сумалӣ so -โซมาเลีย so -Somali so -Сомалі so -Сомали so -Somaleye so -索马里 so -索馬利亞 so -Suriname sr -سورينام sr -Surinam sr -Сурынам sr -Суринам sr -সà§à¦°à¦¿à¦¨à¦¾à¦® sr -Surinam sr -Surinam sr -Surinam sr -Swrinam sr -Surinam sr -ΣουÏινάμ sr -Surinamo sr -Surinam sr -Surinam sr -سورینام sr -Surinam sr -Suranam sr -סורינ×× sr -सूरीनाम sr -Surinam sr -Súrínam sr -スリナム sr -ស៊ូរីណាមី sr -수리남 sr -ເຊີເບີຠsr -Surinamas sr -Surinama sr -Суринам sr -Суринам sr -Surinam sr -Surinam sr -Surinam sr -Surinam sr -ਸੂਰੀਨਾਮੀ sr -Surinam sr -Surinam sr -Суринам sr -Surinamu sr -Surinam sr -Surinam sr -Surinam sr -Суринам sr -Surinam sr -Surinam sr -சà¯à®°à®¿à®¨à¯‡à®®à¯ sr -Суринам sr -ซูรีนามิ sr -Surinam sr -Surinam sr -Сурінам sr -Суринам sr -è‹é‡Œå— sr -è˜‡åˆ©å— sr -Sao Tome and Principe st -Sao Tome en Principe st -ساو تومي Ùˆ البرنسيب st -Sao Tome vÉ™ Principe st -Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі st -Сао Томе и ПринÑипи st -সাও টোম à¦à¦¬à¦‚ পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ª st -Sao Tome ha Principe st -Sao Tome i Principe st -Sao Tome i Principe st -Sao Tome a Principe st -Ynysoedd Sao Tome a Principe st -Sao Tomé og Principe st -Sao Tome und Principe st -Σάο Τομέ και ΠÏίνσιπε st -Sao-Tomeo kaj Principeo st -Sao Tome y Príncipe st -Sao Tome ja Principe st -Sao Tome eta Principe st -سائوتومه Ùˆ پرینسیپه st -São Tomé ja Príncipe st -Sao Tomé et Principe st -Sao Tome en Principe st -São Tomé agus Príncipe st -Santo Tomé e Príncipe st -साओ टोम तथा पà¥à¤°à¤¿à¤‚सिपी st -Sv. Toma i Princip st -Sao Tome és Principe st -Saó Tóme og Prinsípe st -São Tomé e Príncipe st -サントメプリンシペ st -ìƒíˆ¬ë©” 프린시페 st -ບà»àº¥àº´àºàº²àº™ st -Santome un Prinsipi st -Сао Томе и ПринÑипе st -Сао Ð¢Ð¾Ð¼Ñ Ð±Ð° Принцип st -Sao Tome u Principe st -São Tomé og Príncipe st -São Tomé un Príncipe st -Sao Tome en Principe st -São Tomé og Príncipe st -ਸਾਓ ਟੋਮੀ ਤੇ ਪਰੀਸਿਪੀ st -Sao Tome i Principe st -São Tomé and Príncipe st -São Tome e Príncipe st -Sao Tome ÅŸi Principe st -Сан-Томе и ПринÑипи st -Sawo Tome na Purencipe st -São Tomé ja Príncipe st -Sao Tome a Principe st -Sao Tome in Principe st -Св. Тома и Принцип st -Sv. Toma i Princip st -São Tomé och Príncipe st -சயோ டோம௠மறà¯à®±à¯à®®à¯ பிரினà¯à®¸à®¿à®ªà®¿ st -Синт Том ва ПринÑип st -ซาวโทม à¹à¸¥à¸° พรินซิป st -Sao Tome ve Principe st -Sao Tome wä Principe st -Сан-Томе Ñ– ПрінÑіпі st -Сан-Томе ва ПринÑипи st -São Tomé et Prince st -圣多美和普林西比 st -è–å¤šç¾ŽåŠæ™®æž—西比 st -El Salvador sv -Ø§Ù„Ø³Ù„ÙØ§Ø¯ÙˆØ± sv -Сальвадор sv -Салвадор sv -à¦à¦² সালভাডোর sv -Ar Salvador sv -Salvador sv -El Salfador sv -Ελ Î£Î±Î»Î²Î±Î½Ï„ÏŒÏ sv -Salvadoro sv -Salvador sv -السالوادور sv -Salvador sv -An tSalvadóir sv -O Salvador sv -×ל סלבדור sv -अल सलà¥à¤µà¤¾à¤¡à¥‹à¤° sv -Salvador sv -エルサルãƒãƒ‰ãƒ« sv -អែលសាល់វ៉ាឌáŸážš sv -엘살바ë„르 sv -ເອລຊັນວາດດ໠sv -Salvadoras sv -Salvadora sv -Ел Салвадор sv -Эл Салвадор sv -ਈਲ ਸਾਲਵੇਡੋਰ sv -Salwador sv -Salvador sv -Сальвадор sv -Eli Salivadoro sv -Salvádor sv -Salvador sv -Ел Салвадор sv -I-El Salvador sv -எல௠சாலà¯à®µà®Ÿà¯‹ ர௠sv -Ðл Салвадур sv -เอลซัลวาดอร์ sv -Ель-Сальвадор sv -Салвадор sv -è¨å°”瓦多 sv -薩爾瓦多 sv -Syria sy -Sirië sy -سوريا sy -SuriyÉ™ sy -Ð¡Ñ‹Ñ€Ñ‹Ñ sy -Ð¡Ð¸Ñ€Ð¸Ñ sy -সিরিয়া sy -Siri sy -Sirija sy -Síria sy -Sýrie sy -Syrien sy -Syrien sy -ΣυÏία sy -Sirio sy -Siria sy -Süüria sy -Siria sy -سوریه sy -Syyria sy -Syrie sy -Syrië sy -An tSiria sy -Síria sy -סוריה sy -सीरिया sy -Sirija sy -Szíria sy -Sýrland sy -Siria sy -シリア sy -ស៊ីរី sy -시리아 sy -ເຊີເບີຠsy -Sirija sy -SÄ«rija sy -Сирија sy -Сири sy -Siria sy -Syrien sy -Syrië sy -ਸੀਰੀਆ sy -Síria sy -Síria sy -Siria sy -Ð¡Ð¸Ñ€Ð¸Ñ sy -Siriya sy -Sýria sy -Sirija sy -Сирија sy -Sirija sy -I-Syria sy -Syrien sy -சிரியா sy -Ð¡ÑƒÑ€Ð¸Ñ sy -ซีเรีย sy -Suriye sy -Süriä sy -Ð¡Ð¸Ñ€Ñ–Ñ sy -Ð¡ÑƒÑ€Ð¸Ñ sy -Sireye sy -å™åˆ©äºš sy -敘利亞 sy -Swaziland sz -Swasiland sz -سوازيلاند sz -Svaziland sz -СвазылÑнд sz -Свазиленд sz -সোয়াজিলà§à¦¯à¦¾à¦£à§à¦¡ sz -Svazilend sz -Neozelàndia sz -Gwlad y Swasi sz -Swasiland sz -Σουαζιλάνδη sz -Svazilando sz -Swazilandia sz -Svaasimaa sz -Swazilandia sz -سووازیلند sz -Swazimaa sz -An tSuasalainn sz -Suacilándia sz -סוו×זילנד sz -सà¥à¤µà¤¾à¤œà¥€à¤²à¥ˆà¤‚ड sz -Svazilend sz -Szváziföld sz -Svasíland sz -スワジランド sz -ស្វាហ្ស៊ីឡង់ sz -스와질란드 sz -ລາດສະນາຈັàºà»„ທຠsz -Svazilenda sz -Свазиленд sz -Свациланд sz -Sważilandja sz -Swasiland sz -ਸਵਾਜ਼ੀਲੈਂਡ sz -Suazi sz -Suazilândia sz -Suazilândia sz -Suaziland sz -Свазиленд sz -Swazilande sz -Swazijsko sz -Svazi sz -Свазиленд sz -Svazilend sz -ஸà¯à®µà®¾à®šà®¿à®²à®¾à®©à¯à®Ÿà¯ sz -Свозиланд sz -สวาซิà¹à¸¥à¸™à¸”์ sz -Свазіленд sz -Свазиленд sz -Suwazilande sz -æ–¯å¨å£«å…° sz -å²ç“¦æ¿Ÿè˜­ sz -Turks and Caicos Islands tc -Turks en Caicos Eilande tc -جزر الترك Ùˆ الكايكوس tc -Türk vÉ™ Caicos Adaları tc -ÐÑтравы ТÑÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ°Ñ tc -ОÑтрови Ð¢ÑŠÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc -টারà§à¦•স à¦à¦¬à¦‚ কাইকোস দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ tc -Inizi Turks ha Kaikos tc -Turks i Kaikos ostrva tc -Illes Turks i Caicos tc -Turks a Caicos ostrovy tc -Ynysoedd Twrc a Chaicos tc -Turks- og Caicosøerne tc -Turks- und Caicos-Inseln tc -Îήσοι ΤεÏκς και Κάικος tc -Turkoj kaj Kajkoj tc -Islas Turcos y Caicos tc -Turks ja Caicos tc -Turks eta Caicos Irlak tc -جزایر تورکس Ùˆ کایکوس tc -Turks- ja Caicos-saaret tc -ÃŽles Turks et Caicos tc -Turks en Caicos Eilânen tc -Na hOileáin Turks agus Caicos tc -Illas Caicos e Turks tc -××™×™ ×§×יקוס וטורקס tc -तà¥à¤°à¥à¤• तथा कैकोस आइलैंड tc -Turks i Caicos otoÄje tc -Turks- és Caicos-szigetek tc -Turks- og Caicos-eyjar tc -Isole Turks e Caicos tc -英領タークス諸島 カイコス諸島 tc -កោះ​ទួក និង​ កៃកូស tc -í„°í¬ìФ ì¼€ì´ì»¤ìФ ì œë„ tc -TÄ“rksa un Kaikosa tc -ОÑтрови Турк и ÐšÐ°Ð¸ÐºÐ¾Ñ tc -Турк ба Кайкогийн арлууд tc -Gżejjer Turks u Caicos tc -Turks- og Caicosøyene tc -Turks- un Caicosinseln tc -Turks en Caicos Eilanden tc -Turks- og Caicosøyane tc -ਤà©à¨°à¨•ਸ ਤੇ ਕਾਇਕੋਸ ਟਾਪੂ tc -Wyspy Turks i Caicos tc -Ilhas Turks e Caicos tc -Ilhas Caicos e Turca tc -Insulele Turks ÅŸi Caicos tc -ОÑтрова Ð¢ÐµÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc -Ibirwa bya Turike na Kayikosi tc -Turks- ja Kaikossullot tc -Turks a Caicos ostrovy tc -Otoka Turks in Caicos tc -Турка и Кајкошка оÑтрва tc -Turka i KajkoÅ¡ka ostrva tc -Turks- och Caicosöarna tc -தà¯à®°à¯à®•à¯à®•ிகள௠மறà¯à®±à¯à®®à¯ காயà¯à®•ோஸ௠தீவà¯à®•ள௠tc -Ҷазираи Турк ва ÐšÐ¾Ð¹ÐºÑƒÑ tc -เà¸à¸²à¸°à¸”ติร์à¸à¹à¸¥à¸°à¹€à¸„คอส tc -Turks ve Caicos Adaları tc -Türks wä Caicos Utrawları tc -ОÑтрови Ð¢ÐµÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ¾Ñ tc -Ð¢ÑƒÑ€ÐºÑ Ð²Ð° ÐšÐ°Ð¸ÐºÐ¾Ñ ÐžÑ€Ð¾Ð»Ð»Ð°Ñ€Ð¸ tc -Quần đảo Turks và Caicos tc -Iyes Turks et Caicos tc -特克斯和凯科斯群岛 tc -åœŸå…‹æ–¯å’Œé–‹å¡æ–¯ç¾¤å³¶ tc -Chad td -تشاد td -Çad td -Чад td -Чад td -চà§à¦¯à¦¾à¦¡ td -Tchad td -ÄŒad td -Txad td -ÄŒad td -Tsiad td -Tchad td -Tschad td -Τσαντ td -Ĉado td -TÅ¡aad td -Txad td -چاد td -Tchad td -Tsjaad td -Sead td -Chade td -צ'×ד td -चाड td -Äad td -Csád td -Tsjad td -Ciad td -ãƒãƒ£ãƒ‰ td -ឆាដ td -차드 td -ເàºàº¡à»„ພ່ td -ÄŒada td -Чад td -Чад td -ÄŠad td -Tsjad td -Tschad td -Tsjaad td -Tsjad td -ਚਾਂਦ td -Czad td -Chade td -Chade td -Ciad td -Чад td -Cade td -ÄŒad td -ÄŒad td -ÄŒad td -Чад td -ÄŒad td -Tchad td -சாட௠td -Чод td -ชาด td -Çad td -Çad td -Чад td -Чад td -Tchad td -ä¹å¾— td -查德 td -Togo tg -توغو tg -Тога tg -Того tg -টোগো tg -Τόγκο tg -توگو tg -Tógó tg -טוגו tg -टोगो tg -Tógó tg -トーゴ tg -ážáž¼áž áŸ’គោ tg -토고 tg -ຂອງເລ່ນສະນຸຠtg -Того tg -Того tg -ਤੋਗੋ tg -Того tg -Того tg -டோகோ tg -Того tg -โตโภtg -Того tg -Того tg -多哥 tg -多哥 tg -Thailand th -تايلاند th -Tayland th -ТайлÑнд th -Тайланд th -থাইলà§à¦¯à¦¾à¦£à§à¦¡ th -Tajland th -Tailàndia th -Thajsko th -Gwlad y Tai th -Ταϊλάνδη th -Tajlando th -Tailandia th -Tai th -Thailandia th -تایلند th -Thaimaa th -Tailand th -Thaïlande th -Thailân th -An Téalainn th -Tailándia th -ת×ילנד th -थाइलैंड th -Tajland th -Thaiföld th -Taíland th -Tailandia th -タイ th -ážáŸƒ th -태국 th -ລາດສະນາຈັàºà»„ທຠth -Tailandas th -Taizeme th -Тајланд th -Тайланд th -Tajlandja th -Tailandia th -ਥਾਈਲੈਂਡ th -Tajlandia th -Tailândia th -Tailândia th -Tailanda th -Таиланд th -Tayilande th -Thajsko th -Tajska th -Тајланд th -Tajland th -I-Thailand th -தாயà¯à®²à®¾à®¨à¯à®¤à¯ th -Тойлонд th -ราชอาณาจัà¸à¸£à¹„ทย th -Tayland th -Tayland th -Таїланд th -Таиланд th -Thái Lan th -Taylande th -泰国 th -泰國 th -Tajikistan tj -طاجيكستان tj -Tacikistan tj -ТаджыкіÑтан tj -ТаджикиÑтан tj -তাজিকিসà§à¦¤à¦¾à¦¨ tj -Tadjikistan tj -Tadžikistan tj -Tadjikistan tj -Tádžikistán tj -Tajicistan tj -Tadschikistan tj -Τατζικιστάν tj -TaÄikujo tj -Tajikistán tj -Tadžikistan tj -تاجیکستان tj -Tadjikistan tj -An Táidsíceastáin tj -Taxiquistán tj -טג'קיסטן tj -ताजिकिसà¥à¤¤à¤¾à¤¨ tj -Tadžikistan tj -Tadzsikisztán tj -Tadsjikistan tj -Tagikistan tj -タジキスタン tj -ážáž¶áž áŸ’ស៊ីគីស្ážáž„់ tj -타지키스탄 tj -ໃຕ້ຫວັນ tj -Tadžikistanas tj -TadžikistÄna tj -ТаџикиÑтан tj -ТажикÑтан tj -TaÄ¡ikistan tj -Tadsjikistan tj -Tadschikistan tj -Tadjikistan tj -Tadsjikistan tj -ਤਜ਼ਾਕਸਤਾਨ tj -Tadżykistan tj -Tajiquistão tj -Tajiquistão tj -ТаджикиÑтан tj -Tajikisitani tj -Tažikistan tj -Tadžikistan tj -Tadžikistan tj -ТаџикиÑтан tj -Tadžikistan tj -Tadzjikistan tj -தஜிகிஸà¯à®¤à®¾à®©à¯ tj -ТоҷикиÑтон tj -ธาจีà¸à¸´à¸ªà¸–าน tj -Tacikistan tj -Tajıqstan tj -ТаджикиÑтан tj -ТожикиÑтон tj -Tadjikistan tj -å¡”å‰å…‹æ–¯å¦ tj -å¡”å‰å…‹ tj -Tokelau tk -توكيلاو tk -Такелау tk -Токело tk -টোকেলো tk -Tokelo tk -Tocelaw tk -Τοκελάου tk -Tokelao tk -توکلائو tk -Na hOileáin Tócala tk -טוקל×ו tk -तोकेलाऊ tk -Tókelá tk -ニュージーランド自治領トケラウ tk -ážáž¼áž€áŸáž¡áž¼ tk -토켈로 tk -ເບລາລັສ tk -Токелау tk -Токелау tk -Tokelaw tk -ਤੋਕੀਲਾਉ tk -Токелау tk -Tokelawu tk -Токелау tk -டோகேலா tk -Токилау tk -โทเคเลา tk -Tokelauça tk -Токелау tk -Токелау tk -托克劳 tk -托克勞 tk -Turkmenistan tm -تركمانستان tm -TürkmÉ™nistan tm -ТуркмÑніÑтан tm -ТуркмениÑтан tm -তà§à¦°à§à¦•মেনিসà§à¦¤à¦¾à¦¨ tm -Turcmenistan tm -Turkmenistán tm -Twrcmenistan tm -ΤουÏκμενιστάν tm -Turkmenujo tm -Turkmenistán tm -Türkmenistan tm -ترکمنستان tm -Turkménistan tm -An Tuircméanastáin tm -Turkmenistán tm -טורקמניסטן tm -तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨ tm -Türkmenisztán tm -Túrkmenistan tm -トルクメニスタン tm -ទួគមáŸáž“ីស្ážáž„់ tm -투르í¬ë©”니스탄 tm -ຕຸລະàºàºµ tm -TurkmenistÄna tm -ТуркмениÑтан tm -ТуркменÑтан tm -ਤà©à¨°à¨•ੇਮਸਤਾਨ tm -Turquemenistão tm -Turcomenistão tm -Turcmenistan tm -ТуркмениÑтан tm -Turikimenisitani tm -ТуркмениÑтан tm -தà¯à®°à¯à®•à¯à®®à¯†à®©à®¿à®¸à¯à®¤à®¾à®©à¯ tm -ТуркманиÑтон tm -เตอร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน tm -Türkmenistan tm -ТуркменіÑтан tm -ТуркманиÑтон tm -Turcmenistan tm -åœŸåº“æ›¼æ–¯å¦ tm -土庫曼 tm -Tunisia tn -Tunisië tn -تونس tn -Tunis tn -Ð¢ÑƒÐ½Ñ–Ñ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -টিউনিসিয়া tn -Tunizi tn -Tunis tn -Tunísia tn -Tunisko tn -Tiwnisia tn -Tunesien tn -Tunesien tn -Τυνησία tn -Tunizio tn -Túnez tn -Tuneesia tn -تونس tn -Tunesia tn -Tunisie tn -Tunisie tn -An Túinéis tn -Túnez tn -תוניסיה tn -टà¥à¤¯à¥‚नीशिया tn -Tunis tn -Tunézia tn -Túnis tn -ãƒãƒ¥ãƒ‹ã‚¸ã‚¢ tn -ទុយនáŸážŸáŸŠáž¸ tn -튀니지 tn -ລັດເຊີຠtn -Tunisas tn -Tunisija tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tuneżija tn -Tunesien tn -Tunisie tn -ਟà©à¨¨à©€à¨¶à©€à¨† tn -Tunezja tn -Tunísia tn -Tunísia tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tuniziya tn -Tunisko tn -Tunizija tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tunis tn -I-Tunisia tn -Tunisien tn -தà¯à®©à®¿à®šà®¿à®¯à®¾ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -ตูนีเซีย tn -Tunus tn -Ð¢ÑƒÐ½Ñ–Ñ tn -Ð¢ÑƒÐ½Ð¸Ñ tn -Tunizeye tn -çªå°¼æ–¯ tn -çªå°¼è¥¿äºž tn -Tonga to -تونغا to -Tonqa to -Тонга to -Тонга to -টোংগা to -Inizi Tonga to -Τόνγκα to -Tongo to -تونگو to -טונגה to -टोंगा to -トンガ to -ážáž»áž„ហ្គោ to -통가 to -ໂຊນາ to -Тонга to -Тонга to -ਟਾਂਗਾ to -Тонга to -Тонга to -டோஙà¯à®•ா to -Тонго to -ตองà¸à¹‰à¸² to -Тонга to -Тонга to -汤加 to -æ±åŠ  to -East Timor tp -Oos Timor tp -تيمور الشرقية tp -Şərqi Timor tp -УÑходні Тымор tp -Източен Тимор tp -পূরà§à¦¬ টিমর tp -Timor reter tp -IstoÄni Timor tp -Timor Est tp -Východní Timor tp -Dwyrain Timor tp -Østtimor tp -Ost-Timor tp -Ανατολικό Î¤Î¹Î¼ÏŒÏ tp -Orienta Timoro tp -Timor oriental tp -Ida-Timor tp -Ekialdeko Timor tp -تیمور شرقی tp -Itä-Timor tp -Timor oriental tp -Oost Timor tp -Tíomór Thoir tp -Timor do Leste tp -מזרח טימור tp -पूरà¥à¤µà¥€ तिमोर tp -IstoÄni Timor tp -Kelet-Timor tp -Austur-Tímor tp -Timor Est tp -æ±ãƒ†ã‚£ãƒ¢ãƒ¼ãƒ« tp -ទីមáŸážšâ€‹ážáž¶áž„​កើហtp -ë™í‹°ëª¨ë¥´ tp -ວັນà»àº¥àº°à»€àº§àº¥àº² tp -Rytų Timoras tp -Austrumtimora tp -ИÑточен Тимор tp -Зүүн тимор tp -Timor Timur tp -Timor tal-Lvant tp -Øst-Timor tp -Oosttimor tp -Oost Timor tp -Aust-Timor tp -ਪੂਰਬੀ ਤਾਮੋਰ tp -Timor Wschodni tp -Timor Leste tp -Timor Leste tp -Timorul de Est tp -ВоÑточный Тимор tp -Timoro y'Uburasirazuba tp -Nuorta-Timor tp -Východný Timor tp -Vzhodni Timor tp -ИÑточни Тимор tp -IstoÄni Timor tp -Östtimor tp -கிழகà¯à®•௠திமார௠tp -Тимури Шарқ tp -ติมอร์ตะวันออภtp -DoÄŸu Timur tp -Çığış Timor tp -Східний Тімор tp -Шарқий Тимур tp -Äông Timo tp -Timor Ess tp -ä¸œå¸æ±¶ tp -æ±å¸æ±¶ tp -Turkey tr -Turkeye tr -تركيا tr -TürkiyÉ™ tr -Ð¢ÑƒÑ€Ñ†Ñ‹Ñ tr -Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr -তà§à¦°à§à¦•à§€ tr -Turkia tr -Turska tr -Turquia tr -Turecko tr -Twrci tr -Tyrkiet tr -Türkei tr -ΤουÏκία tr -Turkujo tr -Turquía tr -Türgi tr -Turkia tr -ترکیه tr -Turkki tr -Turkaland tr -Turquie tr -Turkije tr -An Tuirc tr -Turquia tr -טורקיה tr -तà¥à¤°à¥à¤•ी tr -Turska tr -Törökország tr -Turki tr -Tyrkland tr -Turchia tr -トルコ tr -ទួរគី tr -터키 tr -ຕຸລະàºàºµ tr -Turkija tr -Turcija tr -Турција tr -Турк tr -Turki tr -Turkija tr -Tyrkia tr -Törkei tr -Turkije tr -Tyrkia tr -Turquia tr -ਤà©à¨°à¨•à©€ tr -Turcja tr -Turquia tr -Turquia tr -Turcia tr -Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr -Turukiya tr -Durka tr -Turecko tr -TurÄija tr -ТурÑка tr -Turska tr -I-Turkey tr -Turkiet tr -தà¯à®°à¯à®•à¯à®•ி tr -Туркиё tr -ตุรà¸à¸µ tr -Türkiye tr -Törkiä tr -Туреччина tr -Ð¢ÑƒÑ€ÐºÐ¸Ñ tr -Thổ NhÄ© Kì tr -Turkeye tr -土耳其 tr -土耳其 tr -Trinidad and Tobago tt -Trinidad en Tobago tt -ترينيداد Ùˆ توباغو tt -Trinidad vÉ™ Tabaqo tt -Трынідад Ñ– Табага tt -Тринидад и Тобаго tt -তà§à¦°à¦¿à¦¨à¦¿à¦¦à¦¾à¦¦ à¦à¦¬à¦‚ টোবাগো tt -Trinidad ha Tobago tt -Trinidad i Tobago tt -Trinidad i Tobago tt -Trinidad a Tobago tt -Ynysoedd Trinidad a Thobago tt -Trinidad og Tobago tt -Trinidad und Tobago tt -ΤÏίνινταντ και Τομπάγκο tt -Trinidado kaj Tobago tt -Trinidad y Tobago tt -Trinidad ja Tobago tt -Trinidad eta Tobago tt -ترینیداد Ùˆ ØªÙØ¨Ø§Ú¯Ùˆ tt -Trinidad ja Tobago tt -Trinidad og Tobago tt -Trinidad et Tobago tt -Trinidad en Tobago tt -Oileán na Tríonóide agus Tobága tt -Trinidade e Tobago tt -טרינידד וטובגו tt -टà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ और टोबैगो tt -Trinidad i Tobago tt -Trinidad és Tobago tt -Trinidad dan Tobago tt -Trínidad og Tóbagó tt -Trinidad e Tobago tt -トリニダードトãƒã‚³ tt -ទ្រីនីដាដ និង​​ ážáž¼áž”ាហ្គោ tt -트리니다드 토바고 tt -ຕີນິà»àº”ດà»àº¥àº°à»‚ທບາໂຠtt -Trinidadas ir Tobagas tt -Trinidada un Tobago tt -Тринидад и Тобаго tt -Тринида ба Тобаго tt -Trinidad dan Tobago tt -Trinidad u Tobago tt -Trinidad og Tobago tt -Trinidad un Tobago tt -Trinidad en Tobago tt -Trinidad og Tobago tt -Trinidad le Tobago tt -Trinidad e Tobago tt -ਤਰੀਨੀਡਾਡ ਤੇ ਤੋਬਾਗੋ tt -Trinidad i Tobago tt -Trindade e Tobago tt -Trinidad e Tobago tt -Trinidad ÅŸi Tobago tt -Тринидад и Тобаго tt -Tirinida na Tobago tt -Trinidad ja Tobago tt -Trinidad a Tobago tt -Trinidad in Tabago tt -Тринидад и Тобаго tt -Trinidad i Tobago tt -I-Trinidad kanye neTobago tt -Trinidad och Tobago tt -டà¯à®°à®¿à®©à®¿à®Ÿà®¾à®Ÿà¯ & டொபாகோ tt -Туриндод ва Тубогу tt -ตรีนิà¹à¸”ดà¹à¸¥à¸°à¹‚ทบาโภtt -Trinidad veTabago tt -Trinidad wä Tobago tt -РеÑпубліка Трінідад та Тобаго tt -Тринидад ва Тобаго tt -Trinidad na Tobago tt -Trinidad và Tobago tt -Trinité et Tobago tt -Trinidad ne Tobago tt -特立尼达和多巴哥 tt -åƒé‡Œé”åŠæ‰˜è²å“¥ tt -Trinidad knaye ne-Tobago tt -Tuvalu tv -ØªÙˆÙØ§Ù„Ùˆ tv -Тувалу tv -Тувалу tv -টà§à¦­à¦¾à¦²à§ tv -Twfalw tv -Î¤Î¿Ï…Î²Î±Î»Î¿Ï tv -Tuvalo tv -توالو tv -טוב×לו tv -तà¥à¤µà¤¾à¤²à¥‚ tv -Túvalú tv -ツãƒãƒ« tv -ទុយវ៉ាលុយ tv -투발루 tv -ຊູລູ tv -Тувалу tv -Тувалу tv -ਤà©à¨µà¨¾à¨²à©‚ tv -Тувалу tv -Тувалу tv -தà¯à®µà®²à¯ tv -Тувалу tv -ตูวาลู tv -Tuvaluça tv -Тувалу tv -Тувалу tv -Touvalou tv -å›¾ç“¦å¢ tv -å瓦魯 tv -Taiwan tw -تايوان tw -Tayvan tw -Тайвань tw -Тайван tw -তাইওয়ান tw -Tajvan tw -Ταϊβάν tw -Tajvano tw -Taiwán tw -تایوان tw -Taivan tw -Taïwan tw -An Téaváin tw -Taiwán tw -טיוו×ן tw -ताईवान tw -Tajvan tw -Tajvan tw -Taívan tw -å°æ¹¾ tw -ážáŸƒážœáŸ‰áž¶áž“់ tw -대만 tw -ໃຕ້ຫວັນ tw -Taivanis tw -TaivÄna tw -Тајван tw -Тайван tw -Tajwan tw -ਤਾਈਵਾਨ tw -Tajwan tw -Formosa tw -Taivan tw -Тайвань tw -Tayiwani tw -Tajvan tw -Тајван tw -Tajvan tw -I-Taiwan tw -தாயà¯à®µà®¾à®©à¯ tw -Тойвон tw -ไต้หวัน tw -Tayvan tw -Taywan tw -Тайвань tw -Тайван tw -Äài Loan tw -䏭国尿¹¾ tw -å°ç£ tw -Tanzania, United Republic of tz -Tanzanië, Vereenigde Republiek van tz -جمهورية تنزانيا المتحدة tz -Tanzaniya tz -Ð—Ð»ÑƒÑ‡Ð°Ð½Ð°Ñ Ð ÑÑпубліка Ð¢Ð°Ð½Ð·Ð°Ð½Ñ–Ñ tz -Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz -তানজানিয়া tz -Tanzanija, Ujedinjena Republika tz -Tanzània, República Unida de tz -Tanzánie tz -Tansania, Gweriniaeth Unedig tz -Tanzania tz -Tansania, vereinigte Republik tz -Τανζανία, Ενωμένη δημοκÏατία της tz -Tanzanio, UnuiÄinta Respubliko de tz -Tanzania, Republica de tz -Tansaania tz -Tanaziar Errepublika Batua tz -جمهوری متحده تانزانیا tz -Tansanian yhdistäytynyt tasavalta tz -Tanzanie, République unie de tz -Tanzanië, Ferienigd republyk fan tz -An Tansáin tz -República Unida de Tanzánia tz -טנזניה, הרפובליקה המ×וחדת של tz -तंजानिया यूनाइटेड रिपबà¥à¤²à¤¿à¤• tz -Ujedinjena Republika Tanzanija tz -Tanzánia tz -Tansanía tz -Tanzania tz -タンザニア,共和国連邦 tz -ážáž„់ហ្សានី tz -탄ìžë‹ˆì•„ 합중국 tz -ໂດມິນິàºàº±àº™ tz -Tanzanijos Respublika tz -TanzÄnija tz -Танзанија, Обединета Република tz -Танканы нÑгдÑÑн ÑƒÐ»Ñ tz -Republik Bersatu Tanzania tz -Tanżania tz -Tanzania tz -Tansania tz -Tanzania, Verenigde republiek van tz -Tanzania tz -ਤਾਨਜ਼ੂਈਆ, ਸੰਯà©à¨•ਤ ਗਣਰਾਜ tz -Zjednoczna Republika Tanzanii tz -República da União da Tanzânia tz -República da Tanzânia tz -Tanzania, Republica Unită tz -Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz -Tanzaniya, Repubulika Yunze Ubumwe ya tz -Tanzania tz -Tanzánia, Spojená republika tz -Tanzanija, Združena republika tz -Танзанија, Уједињена Република tz -Tanzanija, Ujedinjena Republika tz -Förenade republiken Tanzania tz -டானà¯à®œà®¾à®¨à®¿à®¯à®¾, à®à®•à¯à®•ிய கà¯à®Ÿà®¿à®¯à®°à®šà¯ tz -Ҷумҳурии Муттаҳидаи Тонзониё tz -สาธารณรัà¸à¹à¸—นซาเนีย tz -Tanzanya tz -Tanzania, Berläşkän Cömhüriätläre tz -ТанзаніÑ, об'єднана реÑпубліка tz -Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ Ð‘Ð¸Ñ€Ð»Ð°ÑˆÐ³Ð°Ð½ РеÑпубликаÑи tz -Tanzania, Cá»™ng hoà thống nhât tz -Tanzaneye tz -妿¡‘尼亚è”åˆå…±å’Œå›½ tz -å¦å°šå°¼äºž tz -Ukraine ua -Ukraïne ua -أوكرانيا ua -Ukrayna ua -Украіна ua -Украйна ua -ইউকà§à¦°à§‡à¦¨ ua -Ukraina ua -Ukrajina ua -Ucraïna ua -Ukrajina ua -Wcr?in ua -ΟυκÏανία ua -Ukrainio ua -Ucrania ua -Ukraina ua -Ukrania ua -اکراین ua -Ukraina ua -Ukraina ua -Oekraïne ua -An Úcráin ua -Ucrania ua -×וקר××™× ×” ua -उकà¥à¤°à¥‡à¤¨ ua -Ukrajina ua -Ukrajna ua -Ukraina ua -Úkraína ua -Ucraina ua -ウクライナ ua -អ៊ុយក្រែន ua -ìš°í¬ë¼ì´ë‚˜ ua -àºàº¹à»€àº„ຣນ ua -Ukraina ua -Ukraina ua -Украина ua -Украйн ua -Ukranja ua -Ukraina ua -Oekraïne ua -Ukraina ua -Ucraina ua -ਯੂਕਰੇਨ ua -Ukraina ua -Ucrânia ua -Ucrânia ua -Ucraina ua -Украина ua -Ukerene ua -Ukraina ua -Ukrajina ua -Ukrajina ua -Украјина ua -Ukrajina ua -I-Ukraine ua -Ukraina ua -உகà¯à®°à¯†à®¯à¯à®©à¯ ua -Украина ua -ยูเครน ua -Ukrayna ua -Ukrain ua -Україна ua -Украина ua -Ukraina ua -Oucrinne ua -乌克兰 ua -çƒå…‹è˜­ ua -Uganda ug -أوغندا ug -Uqanda ug -Уганда ug -Уганда ug -ইউগাণà§à¦¡à¦¾ ug -Ouganda ug -Wganda ug -Ουγκάντα ug -Ugando ug -اوگاندا ug -Ouganda ug -×וגנדה ug -उगांडा ug -Úganda ug -ウガンダ ug -អ៊ូហ្គង់ដា ug -우간다 ug -à»àºžàº™àº”້າ ug -Уганда ug -Уганда ug -ਯੂਗਾਂਡਾ ug -Уганда ug -Уганда ug -உகானà¯à®Ÿà®¾ ug -Угондо ug -ยูà¸à¸±à¸™à¸”า ug -Уганда ug -Уганда ug -Ouganda ug -乌干达 ug -çƒå¹²é” ug -United States of America us -Vereenigde State van Amerika us -الولايات المتحدة الأمريكية us -Amerika BirləşmiÅŸ Åžtatları us -Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ ÐмÑрыкі us -СÐЩ us -মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° us -Stadoù-Unanet Amerika us -Sjedinjene AmeriÄke Države us -Estats Units d'Amèrica us -Spojené státy americké us -Unol Daleithau America us -USA us -USA us -Ηνωμένες Πολιτείες της ΑμεÏικής us -Usono us -Estados Unidos de América us -Ameerika Ühendriigid us -Ameriketako Estatu Batuak us -ایالات متحده‌ی آمریکا us -Yhdysvallat us -Sambandsríki Amerika (USA) us -États Unis d'Amérique us -Ferienigde Staten fan Amerika us -Stáit Aontaithe Mheiriceá us -Estados Unidos de América us -×רצות הברית us -संयà¥à¤•à¥à¤¤ राजà¥à¤¯ अमेरिका us -Sjedinjene AmeriÄke Države us -Amerikai Egyesült Ãllamok us -Amerika Serikat us -Bandaríkin us -Stati Uniti d'America us -アメリカåˆè¡†å›½ us -សហរដ្ឋអាមáŸážšáž·áž€ us -미 합중국 us -ສະຫະລັດອາເມລິàºàº² us -JungtinÄ—s Amerikos Valstijos us -Amerikas SavienotÄs Valstis us -Соединети ÐмериканÑки Држави us -ÐÐУ us -Amerika Syarikat us -Stati Uniti us -USA us -Vereenigte Staten vun Amerika us -Verenigde Staten van Amerika us -USA us -Estats Units d'Amèrica us -ਸੰਯà©à¨•ਤ ਰਾਜ ਅਮਰੀਕਾ us -Stany Zjednoczone Ameryki us -Estados Unidos da América us -Estados Unidos da América us -Statele Unite ale Americii us -Соединённые Штаты Ðмерики us -Leta Zunze Ubumwe z'Amerika us -Amerihká ovttastuvvan stáhtat us -USA us -Združene države Amerike us -Сједињене америчке државе us -Sjedinjene ameriÄke države us -I-United States of America us -Amerikas förenta stater us -à®à®•à¯à®•ிய அமெரிகà¯à®•ா us -Иёлоти Муттаҳидаи Ðмрико us -สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² us -Amerika BirleÅŸik Devletleri us -Amerika QuÅŸma Åžtatları us -СШРus -Ðмерика Қўшма Штатлари us -mashango o tangananaho a America us -Hợp chá»§ng quốc Hoa Kỳ us -Estats Unis us -United States ye Melika us -美国 us -美利堅åˆçœ¾åœ‹ us -Uruguay uy -الأوروغواي uy -Uruqvay uy -Уругвай uy -Уругвай uy -উরà§à¦—à§à§Ÿà§‡ uy -Urugvaj uy -Uruguai uy -Wrwgw?i uy -ΟυÏουγουάη uy -Urugvajo uy -Uruguai uy -اروگویه uy -Uragua uy -Uruguai uy -×ורוגו××™ uy -उरूगà¥à¤µà¥‡ uy -Urugvaj uy -Úrúgvæ uy -ウルグアイ uy -អ៊ុយរុយហ្គាយ uy -ìš°ë£¨ê³¼ì´ uy -ອຸລຸàºàºàº§àº uy -Urugvajus uy -Urugvaja uy -Уругвај uy -Уругвай uy -Urugwaj uy -Uruguai uy -ਉਰੂਗਵੇ uy -Urugwaj uy -Uruguai uy -Uruguai uy -Uruguai uy -Уругвай uy -Irigwe uy -Uruguaj uy -Urugvaj uy -Уругвај uy -Urugvaj uy -I-Uruguay uy -உரà¯à®•à¯à®µà¯‡ uy -Уругвай uy -อุรุà¸à¸§à¸±à¸¢ uy -Уругвай uy -Уругвай uy -Ourougway uy -乌拉圭 uy -çƒæ‹‰åœ­ uy -Uzbekistan uz -أوزبكستان uz -ÖzbÉ™kistan uz -УзбÑкіÑтан uz -УзбекиÑтан uz -উজবেকিসà§à¦¤à¦¾à¦¨ uz -Ouzbekistan uz -Uzbekistán uz -Wsbecist?n uz -Usbekistan uz -Ουζμπεκιστάν uz -Uzbekujo uz -Uzbekistán uz -Usbekistan uz -ازبکستان uz -Ouzbékistan uz -Úisbéiceastáin uz -Uzbekistán uz -×וזבקיסטן uz -उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨ uz -Üzbegisztán uz -Úsbekistan uz -ウズベキスタン uz -អ៊ូហ្សបáŸáž‚ីស្ážáž„់ uz -우즈베키스탄 uz -ເດນ່ງນ uz -UzbekistÄna uz -УзбекиÑтан uz -УзбекÑтан uz -Użbekistan uz -Usbekistan uz -Usbekistan uz -Usbekistan uz -ਉਜ਼ੇਬਕਸਤਾਨ uz -Uzbequistão uz -Uzbequistão uz -УзбекиÑтан uz -Uzibekisitani uz -Usbekistan uz -УзбекиÑтан uz -உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯ uz -ӮзбекиÑтон uz -อุซเบà¸à¸´à¸ªà¸–าน uz -Özbekistan uz -Özbäkstan uz -УзбекиÑтан uz -ЎзбекиÑтон uz -Ouzbekistan uz -ä¹Œå…¹åˆ«å…‹æ–¯å¦ uz -çƒèŒ²åˆ¥å…‹ uz -Vatican City va -Vatikaan Stad va -مدينة Ø§Ù„ÙØ§ØªÙŠÙƒØ§Ù† va -Vatican ŞəhÉ™ri va -Ватыкан va -Ватикана va -ভà§à¦¯à¦¾à¦Ÿà¦¿à¦•ান সিটি va -Ker Vatikan va -Vatikan va -Ciutat del Vaticà va -Vatikán va -Dinas y Fatican va -Vatikanstaten va -Vatikanstadt va -Βατικανό va -Vatikano va -Vaticano va -Vatikan va -Batikano Hiria va -شهر واتیکان va -Vatikaani va -Vatican va -Vaticaanstad va -An Chathaoir Naofa va -Cidade do Vaticano va -הוותיקן va -वेटिकन सिटी va -Vatikan va -Vatikán va -Vatíkanið va -Città del Vaticano va -ãƒãƒã‚«ãƒ³å¸‚国 va -ក្រុង​វ៉ាទីកង់ va -바티칸 시티 va -ລັດເວີຠva -VatikÄns va -Ватикан va -Ватикан Ñити va -Vatikan va -Vatikanstaten va -Vatikaan va -Vaticaanstad va -Vatikanstaten va -ਵਾਟੀਕੇਨ ਸਿਟੀ va -Watykan va -Cidade do Vaticano va -Cidade do Vaticano va -Vatican, OraÅŸul va -Ватикан va -Umujyi wa Vatikani va -Vatikanstáhta va -Vatikán va -Vatikan va -Ватикан va -Vatikan va -Vatikanstaten va -வாடிகன௠நகரம௠va -Шаҳри Ватикан va -นครรัà¸à¸§à¸²à¸•ิà¸à¸±à¸™ va -Vatikan va -Vatikan va -Ватікан va -Ватикан Шаҳри va -Thành phố Vatican va -Vatican va -梵蒂冈 va -梵諦岡城 va -St. Vincent and the Grenadines vc -St. Vincent en die Grenadene vc -سانت Ùينسنت Ùˆ الغرينادين vc -St. Vincent vÉ™ Grenadines vc -СÑнт-ВінÑÑнт Ñ– ГрÑнадыны vc -Св. ВинÑет и Гренадините vc -সেনà§à¦Ÿ ভিনসেনà§à¦Ÿ ও গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¿à¦¨ vc -S. Visant hag ar Grenadinez vc -Sveti Vincent i Grenadini vc -St. Vincent i les Granadines vc -St. Vincent a Grenadiny vc -Ynysoedd St. Finsent a'r Grenadinau vc -St. Vincent og Grenadinerne vc -St. Vincent und Grenadinen vc -Άγιος Βικέντιος και ΓÏεναδίνες vc -Sent-Vincento kaj la Grenadinoj vc -San Vicente y las Granadinas vc -St. Vincent ja Grenadiinid vc -St. Vincent eta Grenadines vc -سن وینسن Ùˆ گرادینس vc -St. Vincent ja Grenadiinit vc -Sankta Vinsent og Grenadinoyggjar vc -St Vincent et les Grenadines vc -St. Vincent en de Grenadines vc -St. Vincent agus Grenadines vc -Santo Vicente e as Granadinas vc -סנט וינסנט ×•×”×’×¨× ×“×™× ×™× vc -सेंट विंसेंट तथा गà¥à¤°à¥‡à¤¨à¥‡à¤¡à¤¾à¤‡à¤¨à¥à¤¸ vc -St. Vincent és Grenadines vc -St. Vincent dan the Grenadines vc -Sankti Vinsent og Grenadíneyjar vc -Saint Vincent e Grenadines vc -セントヴィンセントグレナディン vc -សង់វាំងសង់ និង ​ហ្គ្រីណាឌីន vc -세ì¸íЏ 빈센트 그레나딘 vc -ເຊີນວິນà»àºŠàº™ à»àº¥àº°à»€àºàº™àº²àº”ີນ vc -Å v. Vincentas ir Grenadinai vc -Sentvinsenta un GrenadÄ«nes vc -Св. ВинÑент и Гренадите vc -St. ВинÑент ба Гренадин vc -St. Vincent dan Grenadines vc -St. VinÄ‹enz u l-Grenadini vc -St. Vincent og Grenadinene vc -St. Vincent un de Grenadinen vc -St. Vincent en de Grenadines vc -St. Vincent og Grenadinane vc -St. Vincent le Grenadines vc -St. Vincent e les Granadines vc -ਸੇਂਟ ਵੀਨਸੈਂਟ ਤੇ ਗਰੀਨਾਜੀਨਸ vc -St. Vincent i Grenadyny vc -São Vicente e Granadinas vc -São Vicente e Grenadines vc -Sf. Vincent ÅŸi Grenadines vc -Сент-ВинÑент и Гренадины vc -Mutagatifu Visenti na Gerenadine vc -St. Vincent ja the Grenadiinnat vc -St. Vincent a Grenadines vc -Sv. Vincent in Grenadini vc -Св. ВинÑент и Гренадини vc -Sv. Vinsent i Grenadini vc -I-St. Vincent and the Grenadines vc -St. Vincent och Grenadinerna vc -செயினà¯à®Ÿà¯ வினà¯à®šà¯†à®©à¯à®Ÿà¯ மறà¯à®±à¯à®®à¯ கà¯à®°à¯€à®©à®¾à®Ÿà¯ˆà®©à¯à®¸à¯ vc -Синт ВинÑент ва Гренадина vc -เà¸à¸²à¸°à¹€à¸‹à¸™à¸•์วินเซนต์ vc -St. Vincent ve Grenadines vc -Sain Vinsent wä Grenadinnär vc -Сент-ВінÑент Ñ– Гренадіни vc -Сент-ВинÑент ва Гренадина vc -St. Vincent na Grenadines vc -St. Vincent và Grenadines vc -St. Vincint et les Grenadines vc -St. Vincent ne Grenadines vc -åœ£æ–‡æ£®ç‰¹å’Œæ ¼æž—çº³ä¸æ–¯ vc -è–æ–‡æ£®åŠæ ¼ç´é‚£ä¸ vc -I-St. Vincent kanye ne-Grenadines vc -Venezuela ve -Ùنزويلا ve -Venesuella ve -Ð’ÑнÑÑуÑла ve -ВенеÑуела ve -ভেনেজà§à§Ÿà§‡à¦²à¦¾ ve -Venecuela ve -Veneçuela ve -Feneswela ve -Βενεζουέλα ve -Venezuelo ve -Venetsueela ve -ونزویلا ve -Venesuela ve -Vénézuela ve -Veiniséala ve -ונצו×לה ve -वेनेजà¥à¤à¤²à¤¾ ve -Venecuela ve -Venesúela ve -ベãƒã‚ºã‚§ãƒ© ve -ážœáŸážŽáŸáž áŸ’សុ៊យអáŸáž¡áž¶ ve -ë² ë„¤ìˆ˜ì—˜ë¼ ve -ເວເນຊຸເອລາ ve -Venesuela ve -VenecuÄ“la ve -Венецуела ve -ВинеÑÑуел ve -Veneżwela ve -ਵੈਂਨਜ਼ੂà¨à¨²à¨¾ ve -Wenezuela ve -ВенеÑуÑла ve -Venezuwela ve -Венецуела ve -Venecuela ve -I-Venezuela ve -வெனிசà¯à®²à®¾ ve -ВинизуÑлло ve -เวเนซุเอลา ve -ВенеÑуела ve -ВенеÑуÑла ve -Venezwela ve -委内瑞拉 ve -委內瑞拉 ve -Virgin Islands, British vg -Virgin Eilande, Brits vg -الجزر العذراء, بريطانيا vg -Virgin Adaları, Britanya vg -БрытанÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vg -БританÑки ВирджинÑки оÑтрови vg -ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ vg -DjeviÄanska ostrva, Britanska vg -Illes Verges, Angleses vg -Ynysoedd yr Wyryf, Prydeinig vg -Britiske jomfruøer vg -Virgin-Inseln, britisch vg -ΠαÏθένοι Îήσοι, Î’Ïετανικές vg -Virgininsuloj, Britaj vg -Islas Vírgenes Británicas vg -Briti Neitsisaared vg -Britaniar Irla Birjinak vg -جزایر ویرجین انگلیسی vg -Brittien Neitsytsaaret vg -ÃŽles Vierges britanniques vg -Virgin Eilannen, Britse vg -Oileáin Bhriotanacha na Maighdean vg -Illas Virxes, Británicas vg -××™×™ הבתולה, בריטי vg -वरà¥à¤œà¤¿à¤¨ आइलैंड, बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ vg -DjeviÄansko otoÄje, Britanski vg -Virgin-szigetek (brit) vg -Bresku Jómfrúareyjar vg -Isole Vergini Britanniche vg -英領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vg -កោះ​ស្មោង អង់គ្លáŸážŸ vg -ì˜êµ­ë ¹ 버진 ì œë„ vg -Britu Virdžinu salas vg -ДевÑтвени ОÑтрови, БританÑки vg -Виржин арлууд, британи vg -Kepulauan Virgin, British vg -Jomfruøyene (Storbritannia) vg -Britsche Jumferninseln vg -Virgin Eilanden, Britse vg -Jomfruøyane (Storbritannia) vg -ਵੀਰਗੀਨ ਟਾਪੂ, ਬਰਤਾਨੀਆ vg -Wyspy Dziewicze (Brytyjskie) vg -Ilhas Virgens, Inglaterra vg -Ilhas Virgens, Inglaterra vg -Insulele Virgine, Anglia vg -ВиргинÑкие БританÑкие оÑтрова vg -Ibirwa by'Isugi, Nyongereza vg -Panenské Ostrovy, Britské vg -DeviÅ¡ki otoki, Britanski vg -ДевичанÑка оÑтрва, БританÑка vg -DeviÄanska ostrva, Britanska vg -Brittiska Jungfruöarna vg -விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, பிரிடà¯à®Ÿà®¿à®·à¯ vg -Ҷазираи ВирҷиниÑ, Бритониё vg -หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, อังà¸à¸¤à¸© vg -Virgin Adaları (İngiltere) vg -Virgin Utrawları, Britan vg -ВіргінÑькі оÑтрови (БританіÑ) vg -ÐÐ½Ð³Ð»Ð¸Ñ Ð’Ð¸Ñ€Ð¶Ð¸Ð½ Ороллари vg -Quần đảo Trinh nữ, Vưong quốc Anh vg -Iyes Viedjes, britanikes vg -英属维京群岛 vg -英屬維爾京群島 vg -Virgin Islands, U.S. vi -Virgin Eilande, VSA vi -الجزر العذراء, الولايات المتحدة vi -Virgin Adaları, ABÅž vi -ÐмÑрыканÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vi -ÐмериканÑки ВирджинÑки оÑтрови vi -ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° vi -DjeviÄanska ostrva, AmeriÄka vi -Illes Verges, Americanes vi -Panenské ostrovy, U.S. vi -Ynysoedd yr Wyryf, Americanaidd vi -Jomfruøerne vi -Virgin-Inseln, amerikanisch vi -ΠαÏθένοι Îήσοι, Η.Π.A. vi -Virgininsuloj, Usonaj vi -Islas Vírgenes Americanas vi -USA Neitsisaared vi -Estatu Batuar Irla Birjinak vi -جزایر ویرجین امریکا. vi -USA:n Neitsytsaaret vi -ÃŽles Vierges américaines vi -Virgin Eilannen, U.S. vi -Oileáin na Maighdean S.A.M. vi -Illas Virxes, U.S. vi -××™×™ הבתולה, ×רצות־הברית vi -वरà¥à¤œà¤¿à¤¨ आइलैंड, यू.à¤à¤¸. vi -DjeviÄansko otoÄje, SAD vi -Virgin-szigetek (USA) vi -Bandarísku Jómfrúareyjar vi -Isole Vergini Americane vi -米領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vi -កោះ​ស្មោង អាមáŸážšáž·áž€ vi -미국령 버진 ì œë„ vi -Virdžinu salas, ASV. vi -ДевÑтвени ОÑтрови, СÐД vi -Виржин арлууд, ÐÐУ vi -Kepulauan Virgin, U.S. vi -Jomfruøyene (USA) vi -Jumferninseln, U.S. vi -Virgin Eilanden, U.S. vi -Jomfruøyane (USA) vi -ਵੀਰਗੀਨ ਟਾਪੂ, ਅਮਰੀਕਾ vi -Wyspy Dziewicze (USA) vi -Ilhas Virgens, E.U.A. vi -Ilhas Virgens, EUA vi -Insulele Virgine, S.U.A. vi -ВиргинÑкие оÑтрова (СШÐ) vi -Ibirwa by'Isugi, U.S. vi -Panenské Ostrovy, Americké vi -DeviÅ¡ki otoki, ZDA vi -ДевичанÑка оÑтрва, СÐД vi -DeviÄanska ostrva, SAD vi -Amerikanska Jungfruöarna vi -விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, U.S. vi -Ҷазираи ВирҷиниÑ, Ш.М.Ð vi -หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² vi -Virgin Adaları (ABD) vi -Virgin Utrawları, AQÅž vi -ВіргінÑькі оÑтрови (СШÐ) vi -ÐҚШ Виржин Ороллари vi -Quần đảo Trinh nữ, Hoa Kỳ vi -Iyes Viedjes, etazunyinnes vi -美属维京群岛 vi -美屬維爾京群島 vi -Vietnam vn -Viëtnam vn -Ùييتنام vn -Vyetnam vn -Віетнам vn -Виетнам vn -ভিয়েতনাম vn -Vijetnam vn -Panenské ostrovy, U.K. vn -Fiet-nam vn -Βιετνάμ vn -Vjetnamio vn -ویتنام vn -Viëtnam vn -Vítneam vn -וייטנ×× vn -विà¤à¤¤à¤¨à¤¾à¤® vn -Vijetnam vn -Víetnam vn -ベトナム vn -វៀážážŽáž¶áž˜ vn -베트남 vn -ຫວງດນາມ vn -Vietnamas vn -Vjetnama vn -Виетнам vn -Витнам vn -Vjetnam vn -Viëtnam vn -ਵੀਅਤਨਾਮ vn -Wietnam vn -Vietname vn -Vietnã vn -Вьетнам vn -Viyetinamu vn -Вијетнам vn -Vijetnam vn -I-Vietnam vn -வியடà¯à®¨à®¾à®®à¯ vn -Ветнам vn -เวียตนาม vn -Ð’'єтнам vn -Ветнам vn -Việt Nam vn -è¶Šå— vn -è¶Šå— vn -Vanuatu vu -ÙØ§Ù†ÙˆØ§ØªÙˆ vu -Вануату vu -Вануату vu -ভানà§à§Ÿà¦¾à¦Ÿà§ vu -Fanwatw vu -Βανουάτου vu -Vanuatuo vu -وانواتو vu -Vanuatú vu -ונו×טו vu -वनौतू vu -Vanúatú vu -ãƒãƒŒã‚¢ãƒ„ vu -វ៉ានុយអាទុយ vu -바누아투 vu -ຈີນ vu -Вануату vu -Вануату vu -ਵਾਨà©à¨†à¨Ÿà©‚ vu -Vanatu vu -Вануату vu -Vanuwatu vu -Вануату vu -வனட௠vu -Вануату vu -à¹à¸§à¸™à¸±à¸§à¸•ู vu -Вануату vu -Вануату vu -瓦努阿图 vu -è¬é‚£æœ vu -Wallis and Futuna wf -Wallis en Futuna wf -واليس Ùˆ Ùوتونا wf -Vallis vÉ™ Futuna wf -ÐŽÐ¾Ð»Ñ–Ñ Ñ– Футуна wf -ОÑтрови Ð£Ð¾Ð»Ð¸Ñ Ð¸ Футина wf -ওয়ালিস à¦à¦¬à¦‚ ফà§à¦Ÿà§à¦¨à¦¾ wf -Wallis ha Futuna wf -Valis i Futuna wf -Wallis i Futuna wf -Wallis a Futuna wf -Ynysoedd Walis a Ffwtwna wf -Wallis- og Futuna-øerne wf -Wallis und Futuna wf -Βαλίς και ΦουτοÏνα wf -Valiso kaj Futuno wf -Wallis y Futuna wf -Wallis ja Futuna wf -Wallis eta Futuna wf -والیس Ùˆ Ùوتونا wf -Wallis ja Futuna wf -Wallis et Futuna wf -Wallis en Futuna wf -Bhailís agus Futúna wf -Wallis e Futuna wf -ו×ליס ופוטונה wf -वालिस तथा फà¥à¤¤à¥à¤¨à¤¾ wf -Wallis i Futuna wf -Wallis és Futuna wf -Wallis- og Fútúnaeyjar wf -Wallis e Futuna wf -ä»é ˜ãƒ¯ãƒªã‚¹ãƒ•ツナ諸島 wf -월리스 후투나 ì œë„ wf -ປັàºàº­àº´àº™àºžàº²àºš wf -Volisa salas un Futuna wf -Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf -ВилÑÐ¼Ñ Ð±Ð° футуна wf -Wallis dan Futuna wf -Wallis u Futuna wf -Wallis og Futuna wf -Wallis un Futuna wf -Wallis en Futuna wf -Wallis og Futuna wf -ਵਾਲਿਸ਼ ਤੇ ਫੂਟੂਨਾ wf -Wallis i Futuna wf -Wallis e Futuna wf -Wallis e Futuna wf -Wallis ÅŸi Futuna wf -ОÑтрова Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¸ Футуна wf -Walisi na Futuna wf -Wallis ja Futuna wf -Wallis a Futuna wf -Wallis in Futuna wf -Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf -Valis i Futuna wf -Wallis och Futuna wf -வாலிஸ௠மறà¯à®±à¯à®®à¯ பà¯à®¯à¯à®Ÿà®©à®¾ wf -УÑÐ»Ñ Ð²Ð° Футуна wf -วอลลิสà¹à¸¥à¸°à¸Ÿà¸¹à¸—ูนา wf -Wallis ve Futuna wf -Wallis wä Futuna wf -Ð£Ð¾Ð»Ð»Ð¸Ñ Ñ– Футуна wf -Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ð° Футуна Ороллари wf -Wallis và Futuna wf -Wallis et Futuna wf -瓦利斯和富图纳群岛 wf -瓦利斯群島和富圖ç´ç¾¤å³¶ wf -Samoa ws -ساموا ws -Самоа ws -Самоа ws -সামোয়া ws -Inizi Samoe ws -Σαμόα ws -Samoo ws -ساموآ ws -Samó ws -סמו××” ws -सामोआ ws -Szamoa ws -Samóa ws -サモア ws -សាមូអា ws -사모아 ì œë„ ws -ໂຊນາ ws -Самоа ws -Самолоа ws -ਸਾਮੋਆ ws -Самоа ws -Samowa ws -Самоа ws -சாமோயா ws -Самоа ws -ซามัว ws -Самоа ws -Самоа ws -Samowa ws -è¨æ‘©äºšç¾¤å²› ws -薩摩亞 ws -Yemen ye -اليمن ye -YÉ™mÉ™n ye -Емен ye -Йемен ye -ইয়েমেন ye -Ihlemeñ ye -Jemen ye -Iemen ye -Jemen ye -Yr Iemen ye -Jemen ye -Υεμένη ye -Jemeno ye -Jeemen ye -یمن ye -Jemen ye -Jemen ye -Jemen ye -Éimin ye -Iemen ye -תימן ye -यमन ye -Jemen ye -Jemen ye -Jemen ye -イエメン ye -áž™áŸáž˜áŸ‚áž“ ye -예멘 ye -ເດມອນ ye -Jemenas ye -Jemena ye -Јемен ye -Емен ye -Yaman ye -Jemen ye -Jemen ye -Jemen ye -Jemen ye -Jemen ye -ਯਮਨ ye -Jemen ye -Iémen ye -Йемен ye -Yemeni ye -Jemen ye -Jemen ye -Jemen ye -Јемен ye -Jemen ye -I-Yemen ye -Jemen ye -யேமன௠ye -Яман ye -เยเมน ye -Ємен ye -Яман ye -也门 ye -葉門 ye -Serbia and Montenegro yu -Serbië en Montenegro yu -Ð¡ÑŠÑ€Ð±Ð¸Ñ Ð¸ Черна гора yu -সারà§à¦¬à¦¿à§Ÿà¦¾ à¦à¦¬à¦‚ মনà§à¦Ÿà§‡à¦¨à¦¿à¦—à§à¦°à§‹ yu -Serbi ha Montenegro yu -Sèrbia i Montenegro yu -Srbsko a ÄŒerná hora yu -Serbien og Montenegro yu -Serbien und Montenegro yu -ΣεÏβία - ΜαυÏοβοÏνιο yu -Serbia y Montenegro yu -Serbia ja TÅ¡ernogooria yu -Serbia eta Montenegro yu -Serbia ja Montenegro yu -Serbie and Monténégro yu -Servië en Montenegro yu -Sérbia e Montenegro yu -Szerbia és Montenegró yu -Serbía og Svartfjallaland yu -Serbia e Montenegro yu -セルビアモンテãƒã‚°ãƒ­ yu -សែប៊ី និង ម៉ុងážáŸážŽáŸáž áŸ’ក្រូ yu -Serbija ir Juodkalnija yu -Србија и Црна Гора yu -Serbia og Montenegro yu -Serbien un Montenegro yu -Servië en Montenegro yu -Serbia og Montenegro yu -ਸਰਬੀਆ ਅਤੇ ਮਾਂਤਾਂਗਰੋ yu -Serbia i Czarnogóra yu -Sérvia e Montenegro yu -Sérvia e Montenegro yu -Ð¡ÐµÑ€Ð±Ð¸Ñ Ð¸ Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾Ñ€Ð¸Ñ yu -Seribiya na Montenegoro yu -Serbia ja Montenegro yu -Srbija in ÄŒrna gora yu -Србија и Црна Гора yu -Srbija i Crna Gora yu -Serbien och Montenegro yu -เซอร์เบีย à¹à¸¥à¸°à¸¡à¸­à¸™à¸•ิเนโà¸à¸£ yu -Sırbistan KaradaÄŸ yu -Serbia wä Montenegro yu -Ð¡ÐµÑ€Ð±Ñ–Ñ Ñ– Ð§Ð¾Ñ€Ð½Ð¾Ð³Ð¾Ñ€Ñ–Ñ yu -Ð¡ÐµÑ€Ð±Ð¸Ñ Ð²Ð° Монтенегро yu -塞尔维亚和黑山 yu -塞爾維亞和黑山 yu -South Africa za -Suid-Afrika za -جنوب Ø£ÙØ±ÙŠÙ‚يا za -CÉ™nubi Afrika za -ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ðфрыка za -Южна Ðфрика za -দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া za -Suafrika za -Južna Afrika za -Sudàfrica za -Jižní Afrika za -De Affrica za -Sydafrikanske republik za -Südafrika za -Îότια ΑφÏική za -Sudafriko za -Sudáfrica za -Lõuna-Aafrika za -Hego Afrika za -Ø¢ÙØ±ÛŒÙ‚ای جنوبی za -Etelä-Afrikka za -Suðurafrika za -Afrique du sud za -Sûd-Afrika za -An Afraic Theas za -Ãfrica do Sur za -×“×¨×•× ×פריקה za -दकà¥à¤·à¤¿à¤£à¥€ अफà¥à¤°à¥€à¤•ा za -Južna Afrika za -Dél-Afrika za -Afrika Selatan za -Suður-Afríka za -Sud Africa za -å—アフリカ za -អាហ្វ្រិក​ážáž¶áž„​ážáŸ’បូង za -남 아프리카 공화국 za -à»àº­àºšàºžàº´àºàº²à»ƒàº•້ za -Afrika, Pietų za -DienvidÄfrika za -Јужна Ðфрика za -Өмнөд африк za -Afrika Selatan za -Afrika t'Isfel za -Sør-Afrika za -Söödafrika za -Zuid-Afrika za -Sør-Afrika za -Afrika Borwa za -Sudafrica za -ਦੱਖਣੀ ਅਫਰੀਕਾ za -Afryka PoÅ‚udniowa za -Ãfrica do Sul za -Ãfrica do Sul za -Africa de Sud za -Ð®Ð¶Ð½Ð°Ñ Ðфрика za -Afurika Yepfo za -Lulli-Afrihká za -Južná Afrika za -Južna Afrika za -Јужна Ðфрика za -Južna Afrika za -I-South Africa za -Sydafrika za -தென௠ஆபà¯à®°à®¿à®•à¯à®•ா za -Ðфриқои Ҷанубӣ za -à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้ za -Güney Afrika za -Könyaq Afrika za -Південна Ðфрика za -Жанубий Ðфрика za -Afurika tshipembe za -Nam Phi za -Nonne Afrike za -Mzantsi Afrika za -å—éž za -å—éž za -Emzantsi Afrika za -Zambia zm -Zambië zm -زامبيا zm -Zambiya zm -Ð—Ð°Ð¼Ð±Ñ–Ñ zm -Ð—Ð°Ð¼Ð±Ð¸Ñ zm -জামবিয়া zm -Zambi zm -Zàmbia zm -Zambie zm -Sambia zm -Sambia zm -Ζάμπια zm -Zambio zm -Sambia zm -زامبیا zm -Sambia zm -Zambie zm -An tSaimbia zm -Zámbia zm -זמביה zm -ज़ामà¥à¤¬à¤¿à¤¯à¤¾ zm -Zambija zm -Sambía zm -ザンビア zm -ហ្សាំប៊ី zm -잠비아 zm -ຈາໄມàºàº²à»‰ zm -Zambija zm -Замбија zm -Замби zm -Å»ambia zm -Sambia zm -ਜੈਂਬੀਆ zm -Zâmbia zm -Zâmbia zm -Ð—Ð°Ð¼Ð±Ð¸Ñ zm -Zambiya zm -Zambija zm -Замбија zm -Zambija zm -ஜாமà¯à®ªà®¿à®¯à®¾ zm -Зомбиё zm -à¹à¸‹à¸¡à¹€à¸šà¸µà¸¢ zm -Ð—Ð°Ð¼Ð±Ñ–Ñ zm -Ð—Ð°Ð¼Ð±Ð¸Ñ zm -Zambeye zm -赞比亚 zm -尚比亞 zm -Zimbabwe zw -زيمبابوي zw -Zimbabve zw -Ð—Ñ‹Ð¼Ð±Ð°Ð±Ð²Ñ zw -Зимбабве zw -জিমà§à¦¬à¦¾à¦¬à§‹à§Ÿà§‡ zw -Zimbabve zw -Simbabwe zw -Simbabwe zw -Ζιμπάμπουε zw -Zimbabvo zw -زیمبابوه zw -An tSiombáib zw -Zimbabué zw -זימבבווה zw -जिमà¥à¤¬à¤¾à¤¬à¤µà¥‡ zw -Zimbabve zw -Simbabve zw -ジンãƒãƒ–エ zw -ហ្ស៊ីមបាបវ៉០zw -ì§ë°”브웨 zw -ລິຊາ zw -Zimbabve zw -Зимбабве zw -Замбабив zw -Å»imbabwe zw -Simbabwe zw -ਜਿੰਬਾਬਵੇਂ zw -Zimbabue zw -Зимбабве zw -Zimbabve zw -Зимбабве zw -Zimbabve zw -ஜிமà¯à®ªà®¾à®ªà¯‡ zw -Зимбобве zw -ซิมบับเว zw -Зімбабве zw -Зимбабве zw -Zimbabwè zw -津巴布韦 zw -è¾›å·´å¨ zw -Czech Republic cz diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp deleted file mode 100644 index bb89b6d00..000000000 --- a/kabc/distributionlist.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include -#include -#include - -#include "distributionlist.h" - -using namespace KABC; - -DistributionList::DistributionList( DistributionListManager *manager, - const TQString &name ) : - mManager( manager ), mName( name ) -{ - mManager->insert( this ); -} - -DistributionList::~DistributionList() -{ - mManager->remove( this ); -} - -void DistributionList::setName( const TQString &name ) -{ - mName = name; -} - -TQString DistributionList::name() const -{ - return mName; -} - -void DistributionList::insertEntry( const Addressee &a, const TQString &email ) -{ - Entry e( a, email ); - - TQValueList::Iterator it; - for( it = mEntries.begin(); it != mEntries.end(); ++it ) { - if ( (*it).addressee.uid() == a.uid() ) { - /** - We have to check if both email addresses contains no data, - a simple 'email1 == email2' wont work here - */ - if ( ( (*it).email.isNull() && email.isEmpty() ) || - ( (*it).email.isEmpty() && email.isNull() ) || - ( (*it).email == email ) ) { - *it = e; - return; - } - } - } - mEntries.append( e ); -} - -void DistributionList::removeEntry( const Addressee &a, const TQString &email ) -{ - TQValueList::Iterator it; - for( it = mEntries.begin(); it != mEntries.end(); ++it ) { - if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { - mEntries.remove( it ); - return; - } - } -} - -TQStringList DistributionList::emails() const -{ - TQStringList emails; - - Entry::List::ConstIterator it; - for( it = mEntries.begin(); it != mEntries.end(); ++it ) { - Addressee a = (*it).addressee; - TQString email = (*it).email.isEmpty() ? a.fullEmail() : - a.fullEmail( (*it).email ); - - if ( !email.isEmpty() ) { - emails.append( email ); - } - } - - return emails; -} - -DistributionList::Entry::List DistributionList::entries() const -{ - return mEntries; -} - -typedef TQValueList< QPair > MissingEntryList; - -class DistributionListManager::DistributionListManagerPrivate -{ - public: - AddressBook *mAddressBook; - TQMap< TQString, MissingEntryList > mMissingEntries; -}; - -DistributionListManager::DistributionListManager( AddressBook *ab ) - : d( new DistributionListManagerPrivate ) -{ - d->mAddressBook = ab; - mLists.setAutoDelete( true ); -} - -DistributionListManager::~DistributionListManager() -{ - mLists.clear(); - - delete d; - d = 0; -} - -DistributionList *DistributionListManager::list( const TQString &name ) -{ - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - if ( list->name() == name ) return list; - } - - return 0; -} - -void DistributionListManager::insert( DistributionList *l ) -{ - if ( !l ) - return; - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - if ( list->name() == l->name() ) { - mLists.remove( list ); - break; - } - } - mLists.append( l ); -} - -void DistributionListManager::remove( DistributionList *l ) -{ - if ( !l ) - return; - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - if ( list->name() == l->name() ) { - mLists.remove( list ); - return; - } - } -} - -TQStringList DistributionListManager::listNames() -{ - TQStringList names; - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - names.append( list->name() ); - } - - return names; -} - -bool DistributionListManager::load() -{ - KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); - - TQMap entryMap = cfg.entryMap( "DistributionLists" ); - cfg.setGroup( "DistributionLists" ); - - // clear old lists - mLists.clear(); - d->mMissingEntries.clear(); - - TQMap::ConstIterator it; - for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it ) { - TQString name = it.key(); - TQStringList value = cfg.readListEntry( name ); - - kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; - - DistributionList *list = new DistributionList( this, name ); - - MissingEntryList missingEntries; - TQStringList::ConstIterator entryIt = value.constBegin(); - while( entryIt != value.constEnd() ) { - TQString id = *entryIt++; - TQString email = *entryIt; - - kdDebug(5700) << "----- Entry " << id << endl; - - Addressee a = d->mAddressBook->findByUid( id ); - if ( !a.isEmpty() ) { - list->insertEntry( a, email ); - } else { - missingEntries.append( qMakePair( id, email ) ); - } - - if ( entryIt == value.end() ) - break; - ++entryIt; - } - - d->mMissingEntries.insert( name, missingEntries ); - } - - return true; -} - -bool DistributionListManager::save() -{ - kdDebug(5700) << "DistListManager::save()" << endl; - - KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); - - cfg.deleteGroup( "DistributionLists" ); - cfg.setGroup( "DistributionLists" ); - - DistributionList *list; - for( list = mLists.first(); list; list = mLists.next() ) { - kdDebug(5700) << " Saving '" << list->name() << "'" << endl; - - TQStringList value; - const DistributionList::Entry::List entries = list->entries(); - DistributionList::Entry::List::ConstIterator it; - for( it = entries.begin(); it != entries.end(); ++it ) { - value.append( (*it).addressee.uid() ); - value.append( (*it).email ); - } - - if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) { - const MissingEntryList missList = d->mMissingEntries[ list->name() ]; - MissingEntryList::ConstIterator missIt; - for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) { - value.append( (*missIt).first ); - value.append( (*missIt).second ); - } - } - - cfg.writeEntry( list->name(), value ); - } - - cfg.sync(); - - return true; -} - -DistributionListWatcher* DistributionListWatcher::mSelf = 0; - -DistributionListWatcher::DistributionListWatcher() - : TQObject( tqApp, "DistributionListWatcher" ) -{ - mDirWatch = new KDirWatch; - mDirWatch->addFile( locateLocal( "data", "kabc/distlists" ) ); - - connect( mDirWatch, TQT_SIGNAL( dirty( const TQString& ) ), TQT_SIGNAL( changed() ) ); - mDirWatch->startScan(); -} - -DistributionListWatcher::~DistributionListWatcher() -{ - delete mDirWatch; - mDirWatch = 0; -} - -DistributionListWatcher *DistributionListWatcher::self() -{ - kdWarning( !tqApp ) << "No TQApplication object available, you'll get a memleak!" << endl; - - if ( !mSelf ) - mSelf = new DistributionListWatcher(); - - return mSelf; -} - -#include "distributionlist.moc" diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h deleted file mode 100644 index 78d182467..000000000 --- a/kabc/distributionlist.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_DISTRIBUTIONLIST_H -#define KABC_DISTRIBUTIONLIST_H - -#include - -#include "addressbook.h" - -namespace KABC { - -class DistributionListManager; - -/** - @short Distribution list of email addresses - - This class represents a list of email addresses. Each email address is - associated with an address book entry. If the address book entry changes, the - entry in the distribution list is automatically updated. -*/ -class KABC_EXPORT DistributionList -{ - public: - /** - @short Distribution List Entry - - This class represents an entry of a distribution list. It consists of an - addressee and an email address. If the email address is null, the - preferred email address of the addressee is used. - */ - struct Entry - { - typedef TQValueList List; - - Entry() {} - Entry( const Addressee &_addressee, const TQString &_email ) : - addressee( _addressee ), email( _email ) {} - - Addressee addressee; - TQString email; - }; - - /** - Create distribution list object. - - @param manager Managing object of this list. - @param name Name of this list. - */ - DistributionList( DistributionListManager *manager, const TQString &name ); - - /** - Destructor. - */ - ~DistributionList(); - - /** - Set name of this list. The name is used as key by the - DistributinListManager. - */ - void setName( const TQString & ); - - /** - Get name of this list. - */ - TQString name() const; - - /** - Insert an entry into this distribution list. If the entry already exists - nothing happens. - */ - void insertEntry( const Addressee &, const TQString &email=TQString::null ); - - /** - Remove an entry from this distribution list. If the entry doesn't exist - nothing happens. - */ - void removeEntry( const Addressee &, const TQString &email=TQString::null ); - - /** - Return list of email addresses, which belong to this distributon list. - These addresses can be directly used by e.g. a mail client. - */ - TQStringList emails() const; - - /** - Return list of entries belonging to this distribution list. This function - is mainly useful for a distribution list editor. - */ - Entry::List entries() const; - - private: - DistributionListManager *mManager; - TQString mName; - - Entry::List mEntries; -}; - -/** - @short Manager of distribution lists - - This class represents a collection of distribution lists, which are associated - with a given address book. -*/ -class KABC_EXPORT DistributionListManager -{ - public: - /** - Create manager for given address book. - */ - DistributionListManager( AddressBook * ); - - /** - Destructor. - */ - ~DistributionListManager(); - - /** - Return distribution list with given name. - */ - DistributionList *list( const TQString &name ); // KDE4: add bool caseSensitive = true - - /** - Insert distribution list. If a list with this name already exists, nothing - happens. The passed object is deleted by the manager. - */ - void insert( DistributionList * ); - - /** - Remove distribution list. If a list with this name doesn't exist, nothing - happens. - */ - void remove( DistributionList * ); - - /** - Return names of all distribution lists managed by this manager. - */ - TQStringList listNames(); - - /** - Load distribution lists form disk. - */ - bool load(); - - /** - Save distribution lists to disk. - */ - bool save(); - - private: - class DistributionListManagerPrivate; - DistributionListManagerPrivate *d; - - TQPtrList mLists; -}; - -/** - @short Watchdog for distribution lists - - This class provides a changed() signal that i emitted when the - distribution lists has changed in some way. - - Exapmle: - - \code - KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() - - connect( watchdog, TQT_SIGNAL( changed() ), TQT_SLOT( doSomething() ) ); - \endcode -*/ - -class KABC_EXPORT DistributionListWatcher : public TQObject -{ - Q_OBJECT - - public: - /** - * Returns the watcher object. - */ - static DistributionListWatcher *self(); - - signals: - /** - * This signal is emmitted whenever the distribution lists has - * changed (if a list was added or removed, when a list was - * renamed or the entries of the list changed). - */ - void changed(); - - protected: - DistributionListWatcher(); - ~DistributionListWatcher(); - - private: - static DistributionListWatcher* mSelf; - KDirWatch *mDirWatch; -}; - -} -#endif diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp deleted file mode 100644 index b00b14d42..000000000 --- a/kabc/distributionlistdialog.cpp +++ /dev/null @@ -1,399 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "addressbook.h" -#include "addresseedialog.h" -#include "distributionlist.h" - -#include "distributionlistdialog.h" -#include "distributionlistdialog.moc" - -using namespace KABC; - -DistributionListDialog::DistributionListDialog( AddressBook *addressBook, TQWidget *parent) - : KDialogBase( parent, "", true, i18n("Configure Distribution Lists"), Ok, Ok, true) -{ - mEditor = new DistributionListEditorWidget( addressBook, this ); - setMainWidget( mEditor ); - - connect( this, TQT_SIGNAL( okClicked() ), mEditor, TQT_SLOT( save() ) ); -} - -DistributionListDialog::~DistributionListDialog() -{ -} - -// TODO KDE4: Add d-pointer to EmailSelector, make sEmailMap a member variable -static TQMap *sEmailMap = 0; - -EmailSelector::EmailSelector( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) : - KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, - parent ) -{ - if (!sEmailMap) - sEmailMap = new TQMap(); - TQFrame *topFrame = plainPage(); - TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - - mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), - topFrame ); - topLayout->addWidget( mButtonGroup ); - - TQStringList::ConstIterator it; - for( it = emails.begin(); it != emails.end(); ++it ) { - TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); - sEmailMap->insert( button, *it ); - if ( (*it) == current ) { - mButtonGroup->setButton(mButtonGroup->id(button)); - } - } -} - -TQString EmailSelector::selected() -{ - TQButton *button = mButtonGroup->selected(); - if ( button ) return (*sEmailMap)[button]; - return TQString::null; -} - -TQString EmailSelector::getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) -{ - EmailSelector *dlg = new EmailSelector( emails, current, parent ); - dlg->exec(); - - TQString result = dlg->selected(); - - delete dlg; - - return result; -} - -class EntryItem : public TQListViewItem -{ - public: - EntryItem( TQListView *parent, const Addressee &addressee, - const TQString &email=TQString::null ) : - TQListViewItem( parent ), - mAddressee( addressee ), - mEmail( email ) - { - setText( 0, addressee.realName() ); - if( email.isEmpty() ) { - setText( 1, addressee.preferredEmail() ); - setText( 2, i18n("Yes") ); - } else { - setText( 1, email ); - setText( 2, i18n("No") ); - } - } - - Addressee addressee() const - { - return mAddressee; - } - - TQString email() const - { - return mEmail; - } - - private: - Addressee mAddressee; - TQString mEmail; -}; - -DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, TQWidget *parent) : - TQWidget( parent ), - mAddressBook( addressBook ) -{ - kdDebug(5700) << "DistributionListEditor()" << endl; - - TQBoxLayout *topLayout = new TQVBoxLayout( this ); - topLayout->setSpacing( KDialog::spacingHint() ); - - TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; - - mNameCombo = new TQComboBox( this ); - nameLayout->addWidget( mNameCombo ); - connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); - - mNewButton = new TQPushButton( i18n("New List..."), this ); - nameLayout->addWidget( mNewButton ); - connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); - - mEditButton = new TQPushButton( i18n("Rename List..."), this ); - nameLayout->addWidget( mEditButton ); - connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) ); - - mRemoveButton = new TQPushButton( i18n("Remove List"), this ); - nameLayout->addWidget( mRemoveButton ); - connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); - - TQGridLayout *gridLayout = new TQGridLayout( topLayout, 3, 3 ); - gridLayout->setColStretch(1, 1); - - TQLabel *listLabel = new TQLabel( i18n("Available addresses:"), this ); - gridLayout->addWidget( listLabel, 0, 0 ); - - mListLabel = new TQLabel( this ); - gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); - - mAddresseeView = new TQListView( this ); - mAddresseeView->addColumn( i18n("Name") ); - mAddresseeView->addColumn( i18n("Preferred Email") ); - mAddresseeView->setAllColumnsShowFocus( true ); - gridLayout->addWidget( mAddresseeView, 1, 0 ); - connect( mAddresseeView, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionAddresseeViewChanged() ) ); - connect( mAddresseeView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - TQT_SLOT( addEntry() ) ); - - mAddEntryButton = new TQPushButton( i18n("Add Entry"), this ); - mAddEntryButton->setEnabled(false); - gridLayout->addWidget( mAddEntryButton, 2, 0 ); - connect( mAddEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); - - mEntryView = new TQListView( this ); - mEntryView->addColumn( i18n("Name") ); - mEntryView->addColumn( i18n("Email") ); - mEntryView->addColumn( i18n("Use Preferred") ); - mEntryView->setEnabled(false); - mEntryView->setAllColumnsShowFocus( true ); - gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 ); - connect( mEntryView, TQT_SIGNAL( selectionChanged() ), - TQT_SLOT( slotSelectionEntryViewChanged() ) ); - - mChangeEmailButton = new TQPushButton( i18n("Change Email..."), this ); - gridLayout->addWidget( mChangeEmailButton, 2, 1 ); - connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); - - mRemoveEntryButton = new TQPushButton( i18n("Remove Entry"), this ); - gridLayout->addWidget( mRemoveEntryButton, 2, 2 ); - connect( mRemoveEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); - - mManager = new DistributionListManager( mAddressBook ); - mManager->load(); - - updateAddresseeView(); - updateNameCombo(); -} - -DistributionListEditorWidget::~DistributionListEditorWidget() -{ - kdDebug(5700) << "~DistributionListEditor()" << endl; - - delete mManager; -} - -void DistributionListEditorWidget::save() -{ - mManager->save(); -} - -void DistributionListEditorWidget::slotSelectionEntryViewChanged() -{ - EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); - bool state=entryItem; - - mChangeEmailButton->setEnabled(state); - mRemoveEntryButton->setEnabled(state); -} - -void DistributionListEditorWidget::newList() -{ - bool ok; - TQString name = KInputDialog::getText( i18n( "New Distribution List" ), - i18n( "Please enter &name:" ), TQString::null, &ok ); - if (!ok) return; - - new DistributionList( mManager, name ); - - mNameCombo->clear(); - mNameCombo->insertStringList( mManager->listNames() ); - mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); - - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::editList() -{ - TQString oldName = mNameCombo->currentText(); - bool ok; - TQString name = KInputDialog::getText( i18n( "Distribution List" ), - i18n( "Please change &name:" ), oldName, &ok ); - if (!ok) return; - - DistributionList *list = mManager->list( oldName ); - list->setName( name ); - - mNameCombo->clear(); - mNameCombo->insertStringList( mManager->listNames() ); - mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); - - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::removeList() -{ - int result = KMessageBox::warningContinueCancel( this, - i18n("Delete distribution list '%1'?") .arg( mNameCombo->currentText() ), - TQString::null, KStdGuiItem::del() ); - - if ( result != KMessageBox::Continue ) return; - - mManager->remove( mManager->list( mNameCombo->currentText() ) ); - mNameCombo->removeItem( mNameCombo->currentItem() ); - - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::addEntry() -{ - AddresseeItem *addresseeItem = - static_cast( mAddresseeView->selectedItem() ); - - if( !addresseeItem ) { - kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; - return; - } - - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) { - kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; - return; - } - - list->insertEntry( addresseeItem->addressee() ); - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditorWidget::removeEntry() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EntryItem *entryItem = - static_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - list->removeEntry( entryItem->addressee(), entryItem->email() ); - delete entryItem; -} - -void DistributionListEditorWidget::changeEmail() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EntryItem *entryItem = - static_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - TQString email = EmailSelector::getEmail( entryItem->addressee().emails(), - entryItem->email(), this ); - list->removeEntry( entryItem->addressee(), entryItem->email() ); - list->insertEntry( entryItem->addressee(), email ); - - updateEntryView(); -} - -void DistributionListEditorWidget::updateEntryView() -{ - if ( mNameCombo->currentText().isEmpty() ) { - mListLabel->setText( i18n("Selected addressees:") ); - } else { - mListLabel->setText( i18n("Selected addresses in '%1':") - .arg( mNameCombo->currentText() ) ); - } - - mEntryView->clear(); - - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) { - mEditButton->setEnabled(false); - mRemoveButton->setEnabled(false); - mChangeEmailButton->setEnabled(false); - mRemoveEntryButton->setEnabled(false); - mAddresseeView->setEnabled(false); - mEntryView->setEnabled(false); - return; - } else { - mEditButton->setEnabled(true); - mRemoveButton->setEnabled(true); - mAddresseeView->setEnabled(true); - mEntryView->setEnabled(true); - } - - DistributionList::Entry::List entries = list->entries(); - DistributionList::Entry::List::ConstIterator it; - for( it = entries.begin(); it != entries.end(); ++it ) { - new EntryItem( mEntryView, (*it).addressee, (*it).email ); - } - - EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); - bool state=entryItem; - - mChangeEmailButton->setEnabled(state); - mRemoveEntryButton->setEnabled(state); -} - -void DistributionListEditorWidget::updateAddresseeView() -{ - mAddresseeView->clear(); - - AddressBook::Iterator it; - for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - new AddresseeItem( mAddresseeView, *it ); - } -} - -void DistributionListEditorWidget::updateNameCombo() -{ - mNameCombo->insertStringList( mManager->listNames() ); - - updateEntryView(); -} - -void DistributionListEditorWidget::slotSelectionAddresseeViewChanged() -{ - AddresseeItem *addresseeItem = - static_cast( mAddresseeView->selectedItem() ); - bool state=addresseeItem; - mAddEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); -} diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h deleted file mode 100644 index 1bd6fc788..000000000 --- a/kabc/distributionlistdialog.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_DISTRIBUTIONLISTDIALOG_H -#define KABC_DISTRIBUTIONLISTDIALOG_H - -#include - -#include - -class TQListView; -class TQComboBox; -class TQButtonGroup; - -namespace KABC { - -class AddressBook; -class DistributionListEditorWidget; -class DistributionListManager; - -/** - @short Frontend to create distribution lists - - Creating a new DistributionListDialog does automatically - load all addressees and distribution lists from the config - files. The changes will be saved when clicking the 'OK' - button. - - Example: - - \code - KABC::DistributionListDialog *dlg = new - KABC::DistributionListDialog( KABC::StdAddressBook::self(), this ); - - dlg->exec(); - \endcode -*/ -class KABC_EXPORT DistributionListDialog : public KDialogBase -{ - Q_OBJECT - - public: - /** - Constructor. - - @param ab The addressbook, the addressees should be used from - @param parent The parent widget - */ - DistributionListDialog( AddressBook *ab, TQWidget *parent ); - - /** - Destructor. - */ - virtual ~DistributionListDialog(); - - private: - DistributionListEditorWidget *mEditor; - - struct Data; - Data *d; -}; - -/** - @short Helper class -*/ -class KABC_EXPORT EmailSelector : public KDialogBase -{ - public: - EmailSelector( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - TQString selected(); - - static TQString getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - private: - TQButtonGroup *mButtonGroup; -}; - -/** - @short Helper class -*/ -class KABC_EXPORT DistributionListEditorWidget : public TQWidget -{ - Q_OBJECT - - public: - DistributionListEditorWidget( AddressBook *, TQWidget *parent ); - virtual ~DistributionListEditorWidget(); - - private slots: - void newList(); - void editList(); - void removeList(); - void addEntry(); - void removeEntry(); - void changeEmail(); - void updateEntryView(); - void updateAddresseeView(); - void updateNameCombo(); - void slotSelectionEntryViewChanged(); - void slotSelectionAddresseeViewChanged(); - void save(); - - private: - TQComboBox *mNameCombo; - TQLabel *mListLabel; - TQListView *mEntryView; - TQListView *mAddresseeView; - - AddressBook *mAddressBook; - DistributionListManager *mManager; - TQPushButton *mNewButton, *mEditButton, *mRemoveButton; - TQPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; - - struct Data; - Data *d; -}; - -} -#endif diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp deleted file mode 100644 index 573f0970a..000000000 --- a/kabc/distributionlisteditor.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "addressbook.h" -#include "addresseedialog.h" -#include "distributionlist.h" - -#include "distributionlisteditor.h" -#include "distributionlisteditor.moc" - -using namespace KABC; - -EmailSelectDialog::EmailSelectDialog( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) : - KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, - parent ) -{ - TQFrame *topFrame = plainPage(); - TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - - mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), - topFrame ); - mButtonGroup->setRadioButtonExclusive( true ); - topLayout->addWidget( mButtonGroup ); - - TQStringList::ConstIterator it; - for( it = emails.begin(); it != emails.end(); ++it ) { - TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); - if ( (*it) == current ) { - button->setDown( true ); - } - } -} - -TQString EmailSelectDialog::selected() -{ - TQButton *button = mButtonGroup->selected(); - if ( button ) return button->text(); - return TQString::null; -} - -TQString EmailSelectDialog::getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ) -{ - EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); - dlg->exec(); - - TQString result = dlg->selected(); - - delete dlg; - - return result; -} - -class EditEntryItem : public TQListViewItem -{ - public: - EditEntryItem( TQListView *parent, const Addressee &addressee, - const TQString &email=TQString::null ) : - TQListViewItem( parent ), - mAddressee( addressee ), - mEmail( email ) - { - setText( 0, addressee.realName() ); - if( email.isEmpty() ) { - setText( 1, addressee.preferredEmail() ); - setText( 2, i18n("Yes") ); - } else { - setText( 1, email ); - setText( 2, i18n("No") ); - } - } - - Addressee addressee() const - { - return mAddressee; - } - - TQString email() const - { - return mEmail; - } - - private: - Addressee mAddressee; - TQString mEmail; -}; - -DistributionListEditor::DistributionListEditor( AddressBook *addressBook, TQWidget *parent) : - TQWidget( parent ), - mAddressBook( addressBook ) -{ - kdDebug(5700) << "DistributionListEditor()" << endl; - - TQBoxLayout *topLayout = new TQVBoxLayout( this ); - topLayout->setMargin( KDialog::marginHint() ); - topLayout->setSpacing( KDialog::spacingHint() ); - - TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; - - mNameCombo = new TQComboBox( this ); - nameLayout->addWidget( mNameCombo ); - connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); - - newButton = new TQPushButton( i18n("New List"), this ); - nameLayout->addWidget( newButton ); - connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); - - removeButton = new TQPushButton( i18n("Remove List"), this ); - nameLayout->addWidget( removeButton ); - connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); - - mEntryView = new TQListView( this ); - mEntryView->addColumn( i18n("Name") ); - mEntryView->addColumn( i18n("Email") ); - mEntryView->addColumn( i18n("Use Preferred") ); - topLayout->addWidget( mEntryView ); - connect(mEntryView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionEntryViewChanged())); - - changeEmailButton = new TQPushButton( i18n("Change Email"), this ); - topLayout->addWidget( changeEmailButton ); - connect( changeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); - - removeEntryButton = new TQPushButton( i18n("Remove Entry"), this ); - topLayout->addWidget( removeEntryButton ); - connect( removeEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); - - addEntryButton = new TQPushButton( i18n("Add Entry"), this ); - topLayout->addWidget( addEntryButton ); - connect( addEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); - - mAddresseeView = new TQListView( this ); - mAddresseeView->addColumn( i18n("Name") ); - mAddresseeView->addColumn( i18n("Preferred Email") ); - topLayout->addWidget( mAddresseeView ); - - - connect(mAddresseeView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionAddresseeViewChanged())); - - mManager = new DistributionListManager( mAddressBook ); - mManager->load(); - - updateAddresseeView(); - updateNameCombo(); - removeButton->setEnabled(!mManager->listNames().isEmpty()); -} - -DistributionListEditor::~DistributionListEditor() -{ - kdDebug(5700) << "~DistributionListEditor()" << endl; - - mManager->save(); - delete mManager; -} - -void DistributionListEditor::slotSelectionEntryViewChanged() -{ - EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); - bool state = (entryItem != 0L); - - changeEmailButton->setEnabled(state); - removeEntryButton->setEnabled(state); -} - -void DistributionListEditor::newList() -{ - bool ok = false; - TQString name = KInputDialog::getText( i18n("New Distribution List"), - i18n("Please enter name:"), - TQString::null, &ok, this ); - if ( !ok ) - return; - - new DistributionList( mManager, name ); - - mNameCombo->insertItem( name ); - removeButton->setEnabled(true); - updateEntryView(); -} - -void DistributionListEditor::removeList() -{ - mManager->remove( mManager->list( mNameCombo->currentText() ) ); - mNameCombo->removeItem( mNameCombo->currentItem() ); - removeButton->setEnabled(!mManager->listNames().isEmpty()); - addEntryButton->setEnabled( !mNameCombo->currentText().isEmpty()); - updateEntryView(); -} - -void DistributionListEditor::addEntry() -{ - AddresseeItem *addresseeItem = - dynamic_cast( mAddresseeView->selectedItem() ); - - if( !addresseeItem ) { - kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; - return; - } - - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) { - kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; - return; - } - - list->insertEntry( addresseeItem->addressee() ); - updateEntryView(); - slotSelectionAddresseeViewChanged(); -} - -void DistributionListEditor::removeEntry() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EditEntryItem *entryItem = - dynamic_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - list->removeEntry( entryItem->addressee(), entryItem->email() ); - delete entryItem; -} - -void DistributionListEditor::changeEmail() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - EditEntryItem *entryItem = - dynamic_cast( mEntryView->selectedItem() ); - if ( !entryItem ) return; - - TQString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(), - entryItem->email(), this ); - list->removeEntry( entryItem->addressee(), entryItem->email() ); - list->insertEntry( entryItem->addressee(), email ); - - updateEntryView(); -} - -void DistributionListEditor::updateEntryView() -{ - DistributionList *list = mManager->list( mNameCombo->currentText() ); - if ( !list ) return; - - mEntryView->clear(); - DistributionList::Entry::List entries = list->entries(); - DistributionList::Entry::List::ConstIterator it; - for( it = entries.begin(); it != entries.end(); ++it ) { - new EditEntryItem( mEntryView, (*it).addressee, (*it).email ); - } - EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); - bool state = (entryItem != 0L); - - changeEmailButton->setEnabled(state); - removeEntryButton->setEnabled(state); -} - -void DistributionListEditor::updateAddresseeView() -{ - mAddresseeView->clear(); - - AddressBook::Iterator it; - for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - new AddresseeItem( mAddresseeView, *it ); - } -} - -void DistributionListEditor::updateNameCombo() -{ - mNameCombo->insertStringList( mManager->listNames() ); - - updateEntryView(); -} - -void DistributionListEditor::slotSelectionAddresseeViewChanged() -{ - AddresseeItem *addresseeItem = - dynamic_cast( mAddresseeView->selectedItem() ); - bool state = (addresseeItem != 0L); - addEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); -} diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h deleted file mode 100644 index faec280e6..000000000 --- a/kabc/distributionlisteditor.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_DISTRIBUTIONLISTEDITOR_H -#define KABC_DISTRIBUTIONLISTEDITOR_H - -#include - -#include - -class TQListView; -class TQComboBox; -class TQButtonGroup; - -namespace KABC { - -class AddressBook; -class DistributionListManager; - -class KABC_EXPORT EmailSelectDialog : public KDialogBase -{ - public: - EmailSelectDialog( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - TQString selected(); - - static TQString getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); - - private: - TQButtonGroup *mButtonGroup; -}; - -/** - @obsolete -*/ -class DistributionListEditor : public TQWidget -{ - Q_OBJECT - public: - DistributionListEditor( AddressBook *, TQWidget *parent ); - virtual ~DistributionListEditor(); - - private slots: - void newList(); - void removeList(); - void addEntry(); - void removeEntry(); - void changeEmail(); - void updateEntryView(); - void updateAddresseeView(); - void updateNameCombo(); - void slotSelectionEntryViewChanged(); - void slotSelectionAddresseeViewChanged(); - - private: - TQComboBox *mNameCombo; - TQListView *mEntryView; - TQListView *mAddresseeView; - - AddressBook *mAddressBook; - DistributionListManager *mManager; - TQPushButton *newButton, *removeButton; - TQPushButton *changeEmailButton,*removeEntryButton,*addEntryButton; -}; - -} - -#endif diff --git a/kabc/errorhandler.cpp b/kabc/errorhandler.cpp deleted file mode 100644 index d8ab650c7..000000000 --- a/kabc/errorhandler.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2002 Tobias Koenig - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include - -#include "errorhandler.h" - -using namespace KABC; - -void ConsoleErrorHandler::error( const TQString &msg ) -{ - // no debug area is ok here - kdError() << msg << endl; -} - - -void GUIErrorHandler::error( const TQString &msg ) -{ - KMessageBox::error( 0, msg, i18n( "Error in libkabc" ) ); -} - - -GuiErrorHandler::GuiErrorHandler( TQWidget *parent ) - : mParent( parent ) -{ -} - -void GuiErrorHandler::error( const TQString &msg ) -{ - if (tqApp) - KMessageBox::error( mParent, msg ); -} diff --git a/kabc/errorhandler.h b/kabc/errorhandler.h deleted file mode 100644 index 9a316541d..000000000 --- a/kabc/errorhandler.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2002 Tobias Koenig - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_ERRORHANDLER_H -#define KABC_ERRORHANDLER_H - -#include - -#include - -class TQWidget; - -namespace KABC { - -/** - Abstract class that provides displaying of error messages. - We need this to make libkabc gui independent on the one side - and provide user friendly error messages on the other side. - Use @p ConsoleErrorHandler or @p GuiErrorHandler in your - application or provide your own ErrorHandler. -*/ -class KABC_EXPORT ErrorHandler -{ - public: - /** - Show error message. - */ - virtual void error( const TQString &msg ) = 0; -}; - -/** - This class prints the error messages to stderr via kdError(). -*/ -class KABC_EXPORT ConsoleErrorHandler : public ErrorHandler -{ - public: - virtual void error( const TQString &msg ); -}; - -/** - This class shows messages boxes for every - error message. - - \deprecated Use GuiErrorHandler instead. -*/ -class KABC_EXPORT GUIErrorHandler : public ErrorHandler -{ - public: - virtual void error( const TQString &msg ); -}; - -/** - This class shows messages boxes for every - error message. -*/ -class KABC_EXPORT GuiErrorHandler : public ErrorHandler -{ - public: - /** - Create error handler. - - \param parent Widget which is used as parent for the error dialogs. - */ - GuiErrorHandler( TQWidget *parent ); - - virtual void error( const TQString &msg ); - - private: - TQWidget *mParent; - - class Private; - Private *d; -}; - -} - -#endif diff --git a/kabc/field.h b/kabc/field.h deleted file mode 100644 index 118ce2d51..000000000 --- a/kabc/field.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_FIELD_H -#define KABC_FIELD_H - -#include -#include - -#include "addressee.h" - -class TDEConfig; - -namespace KABC { - -class KABC_EXPORT Field -{ - class FieldImpl; - friend class FieldImpl; - -public: - typedef TQValueList List; - - /** - * @li @p All - - * @li @p Frequent - - * @li @p Address - - * @li @p Email - - * @li @p Personal - - * @li @p Organization - - * @li @p CustomCategory - - */ - enum FieldCategory - { - All = 0x0, - Frequent = 0x01, - Address = 0x02, - Email = 0x04, - Personal = 0x08, - Organization = 0x10, - CustomCategory = 0x20 - }; - - /** - * Returns the translated label for this field. - */ - virtual TQString label(); - - /** - * Returns the ored categories the field belongs to. - */ - virtual int category(); - - /** - * Returns the translated label for field category. - */ - static TQString categoryLabel( int category ); - - /** - * Returns a string representation of the value the field has in the given - * Addressee. Returns TQString::null, if it is not possible to convert the - * value to a string. - */ - virtual TQString value( const KABC::Addressee & ); - - /** - * Sets the value of the field in the given Addressee. Returns true on success - * or false, if the given string couldn't be converted to a valid value. - */ - virtual bool setValue( KABC::Addressee &, const TQString & ); - - /** - * Returns a string, that can be used for sorting. - */ - TQString sortKey( const KABC::Addressee & ); - - /** - * Returns, if the field is a user-defined field. - */ - virtual bool isCustom(); - - /** - * Returns, if the field is equal with @a field. - */ - virtual bool equals( Field *field ); - - /** - * Returns a list of all fields. - */ - static Field::List allFields(); - - /** - * Returns a list of the default fields. - */ - static Field::List defaultFields(); - - /** - * Creates a custom field. - * - * @param label The label for this field - * @param category The category of this field - * @param key Unique key for this field - * @param app Unique app name for this field - */ - static Field *createCustomField( const TQString &label, int category, - const TQString &key, const TQString &app ); - - /** - * Delete all fields from list. - */ - static void deleteFields(); - - /** - * Save the field settings to a config file. - * - * @param cfg The config file object - * @param identifier The unique identifier - * @param fields The list of the fields - */ - static void saveFields( TDEConfig *cfg, const TQString &identifier, - const Field::List &fields ); - /** - * This is the same as above, with the difference, that - * the list is stored in TDEGlobal::config() in group "KABCFields". - */ - static void saveFields( const TQString &identifier, - const Field::List &fields ); - - /** - * Load the field settings from a config file. - * - * @param cfg The config file object - * @param identifier The unique identifier - */ - static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier ); - - /** - * This is the same as above, with the difference, that - * the list is loaded from TDEGlobal::config() from group "KABCFields". - */ - static Field::List restoreFields( const TQString &identifier ); - -protected: - static void createField( int id, int category = 0 ); - static void createDefaultField( int id, int category = 0 ); - -private: - Field( FieldImpl * ); - virtual ~Field(); - - FieldImpl *mImpl; - - static Field::List mAllFields; - static Field::List mDefaultFields; - static Field::List mCustomFields; -}; - -} -#endif diff --git a/kabc/format.h b/kabc/format.h deleted file mode 100644 index ed036673c..000000000 --- a/kabc/format.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_FORMAT_H -#define KABC_FORMAT_H - -#include - -#include - -namespace KABC { - -class AddressBook; - -/** - @deprecated use FormatPlugin instead -*/ -class KABC_EXPORT_DEPRECATED Format -{ - public: - /** - Load addressbook from file. - */ - virtual bool load( AddressBook *, const TQString &fileName ) = 0; - /** - Save addressbook to file. - */ - virtual bool save( AddressBook *, const TQString &fileName ) = 0; -}; - -} - -#endif diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp deleted file mode 100644 index 17e7b0f33..000000000 --- a/kabc/formatfactory.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include - -#include "vcardformatplugin.h" - -#include "formatfactory.h" - -using namespace KABC; - -FormatFactory *FormatFactory::mSelf = 0; -static KStaticDeleter factoryDeleter; - -FormatFactory *FormatFactory::self() -{ - kdDebug(5700) << "FormatFactory::self()" << endl; - - if ( !mSelf ) - factoryDeleter.setObject( mSelf, new FormatFactory ); - - return mSelf; -} - -FormatFactory::FormatFactory() -{ - mFormatList.setAutoDelete( true ); - - // dummy entry for default format - FormatInfo *info = new FormatInfo; - info->library = ""; - info->nameLabel = i18n( "vCard" ); - info->descriptionLabel = i18n( "vCard Format" ); - mFormatList.insert( "vcard", info ); - - const TQStringList list = TDEGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true ); - for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) - { - KSimpleConfig config( *it, true ); - - if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) - continue; - - info = new FormatInfo; - - config.setGroup( "Plugin" ); - TQString type = config.readEntry( "Type" ); - info->library = config.readEntry( "X-TDE-Library" ); - - config.setGroup( "Misc" ); - info->nameLabel = config.readEntry( "Name" ); - info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) ); - - mFormatList.insert( type, info ); - } -} - -FormatFactory::~FormatFactory() -{ - mFormatList.clear(); -} - -TQStringList FormatFactory::formats() -{ - TQStringList retval; - - // make sure 'vcard' is the first entry - retval << "vcard"; - - TQDictIterator it( mFormatList ); - for ( ; it.current(); ++it ) - if ( it.currentKey() != "vcard" ) - retval << it.currentKey(); - - return retval; -} - -FormatInfo *FormatFactory::info( const TQString &type ) -{ - if ( type.isEmpty() ) - return 0; - else - return mFormatList[ type ]; -} - -FormatPlugin *FormatFactory::format( const TQString& type ) -{ - FormatPlugin *format = 0; - - if ( type.isEmpty() ) - return 0; - - if ( type == "vcard" ) { - format = new VCardFormatPlugin; - format->setType( type ); - format->setNameLabel( i18n( "vCard" ) ); - format->setDescriptionLabel( i18n( "vCard Format" ) ); - return format; - } - - FormatInfo *fi = mFormatList[ type ]; - if (!fi) - return 0; - TQString libName = fi->library; - - KLibrary *library = openLibrary( libName ); - if ( !library ) - return 0; - - void *format_func = library->symbol( "format" ); - - if ( format_func ) { - format = ((FormatPlugin* (*)())format_func)(); - format->setType( type ); - format->setNameLabel( fi->nameLabel ); - format->setDescriptionLabel( fi->descriptionLabel ); - } else { - kdDebug( 5700 ) << "'" << libName << "' is not a format plugin." << endl; - return 0; - } - - return format; -} - - -KLibrary *FormatFactory::openLibrary( const TQString& libName ) -{ - KLibrary *library = 0; - - TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) ); - - if ( path.isEmpty() ) { - kdDebug( 5700 ) << "No format plugin library was found!" << endl; - return 0; - } - - library = KLibLoader::self()->library( TQFile::encodeName( path ) ); - - if ( !library ) { - kdDebug( 5700 ) << "Could not load library '" << libName << "'" << endl; - return 0; - } - - return library; -} diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h deleted file mode 100644 index ff9da5504..000000000 --- a/kabc/formatfactory.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_FORMATFACTORY_H -#define KABC_FORMATFACTORY_H - -#include -#include - -#include -#include - -#include "formatplugin.h" - -namespace KABC { - -struct FormatInfo -{ - TQString library; - TQString nameLabel; - TQString descriptionLabel; -}; - -/** - * Class for loading format plugins. - * - * Example: - * - * \code - * KABC::FormatFactory *factory = KABC::FormatFactory::self(); - * - * TQStringList list = factory->formats(); - * TQStringList::Iterator it; - * for ( it = list.begin(); it != list.end(); ++it ) { - * KABC::FormatPlugin *format = factory->format( (*it) ); - * // do something with format - * } - * \endcode - */ -class KABC_EXPORT FormatFactory -{ - public: - - /** - Destructor. - */ - ~FormatFactory(); - - /** - * Returns the global format factory. - */ - static FormatFactory *self(); - - /** - * Returns a pointer to a format object or a null pointer - * if format type doesn't exist. - * - * @param type The type of the format, returned by formats() - */ - FormatPlugin *format( const TQString &type ); - - /** - * Returns a list of all available format types. - */ - TQStringList formats(); - - /** - * Returns the info structure for a special type. - */ - FormatInfo *info( const TQString &type ); - - protected: - FormatFactory(); - - private: - KLibrary *openLibrary( const TQString& libName ); - - static FormatFactory *mSelf; - - TQDict mFormatList; -}; - -} -#endif diff --git a/kabc/formatplugin.h b/kabc/formatplugin.h deleted file mode 100644 index 33f4beea0..000000000 --- a/kabc/formatplugin.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_FORMATPLUGIN_H -#define KABC_FORMATPLUGIN_H - -#include - -#include "plugin.h" -#include "resource.h" - -namespace KABC { - -class AddressBook; -class Addressee; - -/** - * @short Base class for address book formats. - * - * This class provides an abstract interface for ResourceFile and - * ResourceDir formats. - * - * @internal - */ -class KABC_EXPORT FormatPlugin : public Plugin -{ -public: - - /** - * Load single addressee from file. - */ - virtual bool load( Addressee &, TQFile *file ) = 0; - - /** - * Load whole addressbook from file. - */ - virtual bool loadAll( AddressBook *, Resource *, TQFile *file ) = 0; - - /** - * Save a single Addressee to file. - */ - virtual void save( const Addressee &, TQFile *file ) = 0; - - /** - * Save whole addressbook to file. - */ - virtual void saveAll( AddressBook *, Resource *, TQFile *file ) = 0; - - /** - * Checks if given file contains the right format - */ - virtual bool checkFormat( TQFile *file ) const = 0; -}; - -} -#endif diff --git a/kabc/formats/CMakeLists.txt b/kabc/formats/CMakeLists.txt deleted file mode 100644 index 60ea1c3fd..000000000 --- a/kabc/formats/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES binary.desktop DESTINATION ${DATA_INSTALL_DIR}/kabc/formats ) - - -##### kabcformat_binary ######################### - -set( target kabcformat_binary ) - -set( ${target}_SRCS - binaryformat.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kabc-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/formats/Makefile.am b/kabc/formats/Makefile.am deleted file mode 100644 index 57c2caaa3..000000000 --- a/kabc/formats/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -kde_module_LTLIBRARIES = kabcformat_binary.la - -kabcformat_binary_la_SOURCES = binaryformat.cpp -kabcformat_binary_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) \ - -no-undefined -kabcformat_binary_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(LIB_TDECORE) -kabcformat_binary_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -# these are the headers for your project -noinst_HEADERS = binaryformat.h - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabcformat_binary.pot - -linkdir = $(kde_datadir)/kabc/formats -link_DATA = binary.desktop -EXTRA_DIST = $(link_DATA) diff --git a/kabc/formats/binary.desktop b/kabc/formats/binary.desktop deleted file mode 100644 index 993286ad5..000000000 --- a/kabc/formats/binary.desktop +++ /dev/null @@ -1,89 +0,0 @@ -[Misc] -Name=Binary -Name[af]=Binêre -Name[ar]=ثنائي -Name[az]=İcraçı -Name[be]=Двайковы -Name[bg]=Двоичен -Name[bn]=বাইনারি -Name[br]=Binarel -Name[bs]=Binarno -Name[ca]=Binari -Name[cs]=Binární -Name[csb]=Binarny -Name[cy]=Deuaidd -Name[da]=Binær -Name[de]=Binär -Name[el]=Δυαδικό -Name[eo]=Duuma -Name[es]=Binario -Name[et]=Binaar -Name[eu]=Bitarra -Name[fa]=دوگانی -Name[fi]=Binääri -Name[fr]=Binaire -Name[fy]=Binêr -Name[ga]=Dénártha -Name[gl]=Binário -Name[he]=בינרית -Name[hi]=दà¥à¤µà¤¿à¤šà¤° -Name[hr]=Binarno -Name[hsb]=Binarny -Name[hu]=Bináris -Name[id]=Biner -Name[is]=Tvíunda -Name[it]=Binario -Name[ja]=ãƒã‚¤ãƒŠãƒª -Name[ka]=áƒáƒ áƒáƒ‘ითი -Name[kk]=Бинарлық -Name[km]=គោលពីរ -Name[ko]=ë°”ì´ë„ˆë¦¬ -Name[lb]=Binär -Name[lt]=Dvejetainis -Name[lv]=BinÄrs -Name[mk]=Бинарен -Name[mn]=Бинар -Name[ms]=Binari -Name[mt]=Binarju -Name[nb]=Binær -Name[nds]=Bineer -Name[ne]=बाइनरी -Name[nl]=Binair -Name[nn]=Binær -Name[nso]=Tselapedi -Name[pa]=ਬਾਈਨਰੀ -Name[pl]=Binarny -Name[pt]=Binário -Name[pt_BR]=Binário -Name[ro]=Binar -Name[ru]=Двоичный -Name[rw]=Nyabibiri -Name[se]=Binára -Name[sk]=Binárny -Name[sl]=DvojiÅ¡ko -Name[sq]=Binarë -Name[sr]=Бинарни -Name[sr@Latn]=Binarni -Name[ss]=Lokuhamab ngakubili -Name[sv]=Binär -Name[ta]=இரà¯à®®à®®à¯ -Name[te]=à°¦à±à°µà°¿à°¯à°¾à°¶à°‚ -Name[tg]=Дутартиба -Name[th]=ไบนารี -Name[tr]=İkili -Name[tt]=Binar -Name[uk]=Двійковий -Name[uz]=Binar -Name[uz@cyrillic]=Бинар -Name[ven]=Zwivhili -Name[vi]=Nhị phân -Name[wa]=Binaire -Name[xh]=Ephindwe kabini -Name[zh_CN]=二进制 -Name[zh_HK]=äºŒé€²ä½ -Name[zh_TW]=äºŒé€²ä½ -Name[zu]=Okuhambisana ngambili - -[Plugin] -Type=binary -X-TDE-Library=kabcformat_binary diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp deleted file mode 100644 index a82a017a3..000000000 --- a/kabc/formats/binaryformat.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include - -#include "addressbook.h" -#include "addressee.h" -#include "picture.h" -#include "sound.h" - -#include "binaryformat.h" - -#define BINARY_FORMAT_VERSION 1 - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT FormatPlugin *format() - { - return new BinaryFormat; - } -} - -bool BinaryFormat::load( Addressee &addressee, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::load()" << endl; - TQDataStream stream( file ); - - if ( !checkHeader( stream ) ) - return false; - - loadAddressee( addressee, stream ); - - return true; -} - -bool BinaryFormat::loadAll( AddressBook*, Resource *resource, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::loadAll()" << endl; - - TQDataStream stream( file ); - - if ( !checkHeader( stream ) ) - return false; - - TQ_UINT32 entries; - - stream >> entries; - - for ( uint i = 0; i < entries; ++i ) { - Addressee addressee; - loadAddressee( addressee, stream ); - addressee.setResource( resource ); - addressee.setChanged( false ); - resource->insertAddressee( addressee ); - } - - return true; -} - -void BinaryFormat::save( const Addressee &addressee, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::save()" << endl; - - TQDataStream stream( file ); - - writeHeader( stream ); - - TQ_UINT32 entries = 1; - stream << entries; - saveAddressee( addressee, stream ); -} - -void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) -{ - kdDebug(5700) << "BinaryFormat::saveAll()" << endl; - - TQ_UINT32 counter = 0; - TQDataStream stream( file ); - - writeHeader( stream ); - // set dummy number of entries - stream << counter; - - Resource::Iterator it; - for ( it = resource->begin(); it != resource->end(); ++it ) { - saveAddressee( (*it), stream ); - counter++; - (*it).setChanged( false ); - } - - // set real number of entries - stream.device()->at( 2 * sizeof( TQ_UINT32 ) ); - stream << counter; -} - -bool BinaryFormat::checkFormat( TQFile *file ) const -{ - kdDebug(5700) << "BinaryFormat::checkFormat()" << endl; - - TQDataStream stream( file ); - - return checkHeader( stream ); -} - -bool BinaryFormat::checkHeader( TQDataStream &stream ) const -{ - TQ_UINT32 magic, version; - - stream >> magic >> version; - - TQFile *file = dynamic_cast( stream.device() ); - - if ( !file ) { - kdError() << i18n("Not a file?") << endl; - return false; - } - - if ( magic != 0x2e93e ) { - kdError() << TQString(i18n("File '%1' is not binary format.").arg( file->name() )) << endl; - return false; - } - - if ( version != BINARY_FORMAT_VERSION ) { - kdError() << TQString(i18n("File '%1' is the wrong version.").arg( file->name() )) << endl; - return false; - } - - return true; -} - -void BinaryFormat::writeHeader( TQDataStream &stream ) -{ - TQ_UINT32 magic, version; - - magic = 0x2e93e; - version = BINARY_FORMAT_VERSION; - - stream << magic << version; -} - -void BinaryFormat::loadAddressee( Addressee &addressee, TQDataStream &stream ) -{ - stream >> addressee; -/* - // load pictures - Picture photo = addressee.photo(); - Picture logo = addressee.logo(); - - if ( photo.isIntern() ) { - TQImage img; - if ( !img.load( locateLocal( "data", "kabc/photos/" ) + addressee.uid() ) ) - kdDebug(5700) << "No photo available for '" << addressee.uid() << "'." << endl; - - addressee.setPhoto( img ); - } - - if ( logo.isIntern() ) { - TQImage img; - if ( !img.load( locateLocal( "data", "kabc/logos/" ) + addressee.uid() ) ) - kdDebug(5700) << "No logo available for '" << addressee.uid() << "'." << endl; - - addressee.setLogo( img ); - } - - // load sound - // TODO: load sound data from file -*/ -} - -void BinaryFormat::saveAddressee( const Addressee &addressee, TQDataStream &stream ) -{ - stream << addressee; -/* - // load pictures - Picture photo = addressee.photo(); - Picture logo = addressee.logo(); - - if ( photo.isIntern() ) { - TQImage img = photo.data(); - TQString fileName = locateLocal( "data", "kabc/photos/" ) + addressee.uid(); - - if ( !img.save( fileName, "PNG" ) ) - kdDebug(5700) << "Unable to save photo for '" << addressee.uid() << "'." << endl; - } - - if ( logo.isIntern() ) { - TQImage img = logo.data(); - TQString fileName = locateLocal( "data", "kabc/logos/" ) + addressee.uid(); - - if ( !img.save( fileName, "PNG" ) ) - kdDebug(5700) << "Unable to save logo for '" << addressee.uid() << "'." << endl; - } - - // save sound - // TODO: save the sound data to file -*/ -} diff --git a/kabc/formats/binaryformat.h b/kabc/formats/binaryformat.h deleted file mode 100644 index 09efde41a..000000000 --- a/kabc/formats/binaryformat.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_BINARYFORMAT_H -#define KABC_BINARYFORMAT_H - -#include "formatplugin.h" - -namespace KABC { - -class AddressBook; -class Addressee; - -/** - @short binary file format for addressbook entries. -*/ -class BinaryFormat : public FormatPlugin -{ -public: - /** - * Load single addressee from file. - */ - bool load( Addressee &, TQFile *file ); - - /** - * Load whole addressee from file. - */ - bool loadAll( AddressBook *, Resource *, TQFile *file ); - - /** - * Save single addressee to file. - */ - void save( const Addressee &, TQFile *file ); - - /** - * Save all addressees to file. - */ - void saveAll( AddressBook *, Resource *, TQFile *file ); - - /** - * Check for valid format of a file. - */ - bool checkFormat( TQFile *file ) const; - -private: - void loadAddressee( Addressee &, TQDataStream & ); - void saveAddressee( const Addressee &, TQDataStream & ); - bool checkHeader( TQDataStream & ) const; - void writeHeader( TQDataStream & ); -}; - -} -#endif diff --git a/kabc/geo.cpp b/kabc/geo.cpp deleted file mode 100644 index 44f9851e4..000000000 --- a/kabc/geo.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "geo.h" - -using namespace KABC; - -Geo::Geo() - : mLatitude( 91 ), mLongitude( 181 ), mValidLat( false ), mValidLong( false ) -{ -} - -Geo::Geo( float latitude, float longitude ) -{ - setLatitude( latitude ); - setLongitude( longitude ); -} - -void Geo::setLatitude( float latitude ) -{ - if ( latitude >= -90 && latitude <= 90 ) { - mLatitude = latitude; - mValidLat = true; - } else { - mLatitude = 91; - mValidLat = false; - } -} - -float Geo::latitude() const -{ - return mLatitude; -} - -void Geo::setLongitude( float longitude) -{ - if ( longitude >= -180 && longitude <= 180 ) { - mLongitude = longitude; - mValidLong = true; - } else { - mLongitude = 181; - mValidLong = false; - } -} - -float Geo::longitude() const -{ - return mLongitude; -} - -bool Geo::isValid() const -{ - return mValidLat && mValidLong; -} - -bool Geo::operator==( const Geo &g ) const -{ - if ( !g.isValid() && !isValid() ) return true; - if ( !g.isValid() || !isValid() ) return false; - if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return true; - return false; -} - -bool Geo::operator!=( const Geo &g ) const -{ - if ( !g.isValid() && !isValid() ) return false; - if ( !g.isValid() || !isValid() ) return true; - if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return false; - return true; -} - -TQString Geo::asString() const -{ - return "(" + TQString::number(mLatitude) + "," + TQString::number(mLongitude) + ")"; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Geo &geo ) -{ - return s << (float)geo.mLatitude << (float)geo.mLongitude; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Geo &geo ) -{ - s >> geo.mLatitude >> geo.mLongitude; - - geo.mValidLat = true; - geo.mValidLong = true; - - return s; -} diff --git a/kabc/geo.h b/kabc/geo.h deleted file mode 100644 index cac6abaff..000000000 --- a/kabc/geo.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_GEO_H -#define KABC_GEO_H - -#include - -#include - -namespace KABC { - -/** - @short Geographic position - - This class represents a geographic position. -*/ -class KABC_EXPORT Geo -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); - - public: - /** - Construct invalid geographics position object. - */ - Geo(); - - /** - Construct geographics position object. - - @param latitude Geographical latitude - @param longitude Geographical longitude - */ - Geo( float latitude, float longitude ); - - /** - Sets the latitude. - */ - void setLatitude( float ); - - /** - Returns the latitude. - */ - float latitude() const; - - /** - Sets the longitude. - */ - void setLongitude( float ); - - /** - Returns the longitude. - */ - float longitude() const; - - /** - Returns, if this object contains a valid geographical position. - */ - bool isValid() const; - - bool operator==( const Geo & ) const; - bool operator!=( const Geo & ) const; - - /** - Returns string representation of geographical position. - */ - TQString asString() const; - - private: - float mLatitude; - float mLongitude; - - bool mValid; - bool mValidLat; - bool mValidLong; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); - -} - -#endif diff --git a/kabc/kabc_manager.desktop b/kabc/kabc_manager.desktop deleted file mode 100644 index 0af910f52..000000000 --- a/kabc/kabc_manager.desktop +++ /dev/null @@ -1,76 +0,0 @@ -[Desktop Entry] -Name=Contacts -Name[af]=Kontakte -Name[ar]=المراسلين -Name[be]=Кантакты -Name[br]=Darempredoù -Name[bs]=Kontakti -Name[ca]=Contactes -Name[cs]=Kontakty -Name[csb]=ÅÄ…czbë -Name[cy]=Cysylltau -Name[da]=Kontakter -Name[de]=Kontakte -Name[el]=Επαφές -Name[eo]=Kontaktoj -Name[es]=Contactos -Name[et]=Kontaktid -Name[eu]=Kontaktuak -Name[fa]=تماسها -Name[fi]=Yhteystiedot -Name[fy]=Kontakten -Name[ga]=Teagmhálacha -Name[gl]=Contactos -Name[he]=×נשי קשר -Name[hi]=समà¥à¤ªà¤°à¥à¤• -Name[hr]=Kontakti -Name[hsb]=Adresy -Name[hu]=Névjegyek -Name[id]=Kontak -Name[is]=Tengiliðir -Name[it]=Contatti -Name[ja]=コンタクト -Name[ka]=კáƒáƒœáƒ¢áƒáƒ¥áƒ¢áƒ”ბი -Name[kk]=Контакттар -Name[km]=ទំនាក់ទំនង -Name[ku]=Tekilî -Name[lb]=Kontakter -Name[lt]=Kontaktai -Name[lv]=Kontakti -Name[mk]=Контакти -Name[ms]=Hubungan -Name[nb]=Kontakter -Name[nds]=Kontakten -Name[ne]=समà¥à¤ªà¤°à¥à¤• -Name[nl]=Contactpersonen -Name[nn]=Kontaktar -Name[pa]=ਸੰਪਰਕ -Name[pl]=Kontakty -Name[pt]=Contactos -Name[pt_BR]=Contatos -Name[ro]=Contacte -Name[ru]=Контакты -Name[rw]=Amaderesi -Name[se]=OktavuoÄ‘at -Name[sk]=Kontakty -Name[sl]=Stiki -Name[sr]=Контакти -Name[sr@Latn]=Kontakti -Name[sv]=Kontakter -Name[ta]=தொடரà¯à®ªà¯à®•ள௠-Name[te]=సంపà±à°°à°¦à°¿à°‚à°ªà±à°²à± -Name[tg]=Ðлоқаҳо -Name[th]=รายชื่อติดต่อ -Name[tr]=BaÄŸlantılar -Name[tt]=Elemtälär -Name[uk]=Контакти -Name[uz]=Aloqalar -Name[uz@cyrillic]=Ðлоқалар -Name[vi]=Liên lạc -Name[zh_CN]=è”系人 -Name[zh_HK]=è¯çµ¡äºº -Name[zh_TW]=è¯çµ¡äºº -Type=Service -ServiceTypes=KResources/Manager - -X-TDE-ResourceFamily=contact diff --git a/kabc/key.cpp b/kabc/key.cpp deleted file mode 100644 index 7c66579b3..000000000 --- a/kabc/key.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "key.h" - -using namespace KABC; - -Key::Key( const TQString &text, int type ) - : mTextData( text ), mIsBinary( false ), mType( type ) -{ - mId = TDEApplication::randomString(8); -} - -Key::~Key() -{ -} - -bool Key::operator==( const Key &k ) const -{ - if ( mIsBinary != k.mIsBinary ) return false; - if ( mIsBinary ) - if ( mBinaryData != k.mBinaryData ) return false; - else - if ( mTextData != k.mTextData ) return false; - if ( mType != k.mType ) return false; - if ( mCustomTypeString != k.mCustomTypeString ) return false; - - return true; -} - -bool Key::operator!=( const Key &k ) const -{ - return !( k == *this ); -} - -void Key::setId( const TQString &id ) -{ - mId = id; -} - -TQString Key::id() const -{ - return mId; -} - -void Key::setBinaryData( const TQByteArray &binary ) -{ - mBinaryData = binary; - mIsBinary = true; -} - -TQByteArray Key::binaryData() const -{ - return mBinaryData; -} - -void Key::setTextData( const TQString &text ) -{ - mTextData = text; - mIsBinary = false; -} - -TQString Key::textData() const -{ - return mTextData; -} - -bool Key::isBinary() const -{ - return mIsBinary; -} - -void Key::setType( int type ) -{ - mType = type; -} - -void Key::setCustomTypeString( const TQString &custom ) -{ - mCustomTypeString = custom; -} - -int Key::type() const -{ - return mType; -} - -TQString Key::customTypeString() const -{ - return mCustomTypeString; -} - -Key::TypeList Key::typeList() -{ - TypeList list; - list << X509; - list << PGP; - list << Custom; - - return list; -} - -TQString Key::typeLabel( int type ) -{ - switch ( type ) { - case X509: - return i18n( "X509" ); - break; - case PGP: - return i18n( "PGP" ); - break; - case Custom: - return i18n( "Custom" ); - break; - default: - return i18n( "Unknown type" ); - break; - } -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Key &key ) -{ - return s << key.mId << key.mIsBinary << key.mTextData << key.mBinaryData << - key.mCustomTypeString << key.mType; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Key &key ) -{ - s >> key.mId >> key.mIsBinary >> key.mTextData >> key.mBinaryData >> - key.mCustomTypeString >> key.mType; - - return s; -} diff --git a/kabc/key.h b/kabc/key.h deleted file mode 100644 index 08df0264d..000000000 --- a/kabc/key.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_KEY_H -#define KABC_KEY_H - -#include - -#include - -namespace KABC { - -/** - * @short A class to store an encryption key. - */ -class KABC_EXPORT Key -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); - -public: - typedef TQValueList List; - typedef TQValueList TypeList; - - /** - * Key types - * - * @li X509 - X509 key - * @li PGP - Pretty Good Privacy key - * @li Custom - Custom or IANA conform key - */ - enum Types { - X509, - PGP, - Custom - }; - - /** - * Constructor. - * - * @param text The text data. - * @param type The key type, see Types. - */ - Key( const TQString &text = TQString::null, int type = PGP ); - - /** - * Destructor. - */ - ~Key(); - - bool operator==( const Key & ) const; - bool operator!=( const Key & ) const; - - /** - * Sets the unique identifier. - */ - void setId( const TQString &id ); - - /** - * Returns the unique identifier. - */ - TQString id() const; - - /** - * Sets binary data. - */ - void setBinaryData( const TQByteArray &binary ); - - /** - * Returns the binary data. - */ - TQByteArray binaryData() const; - - /** - * Sets text data. - */ - void setTextData( const TQString &text ); - - /** - * Returns the text data. - */ - TQString textData() const; - - /** - * Returns whether the key contains binary or text data. - */ - bool isBinary() const; - - /** - * Sets the type, see Type. - */ - void setType( int type ); - - /** - * Sets custom type string. - */ - void setCustomTypeString( const TQString &custom ); - - /** - * Returns the type, see Type. - */ - int type() const; - - /** - * Returns the custom type string. - */ - TQString customTypeString() const; - - /** - * Returns a list of all available key types. - */ - static TypeList typeList(); - - /** - * Returns a translated label for a given key type. - */ - static TQString typeLabel( int type ); - -private: - TQByteArray mBinaryData; - TQString mId; - TQString mTextData; - TQString mCustomTypeString; - - int mIsBinary; - int mType; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); - -} -#endif diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp deleted file mode 100644 index 1c2b2d833..000000000 --- a/kabc/ldapclient.cpp +++ /dev/null @@ -1,427 +0,0 @@ -/* kldapclient.cpp - LDAP access - * Copyright (C) 2002 Klarälvdalens Datakonsult AB - * - * Author: Steffen Hansen - * - * Ported to KABC by Daniel Molkentin - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ldapclient.h" -#include "ldif.h" -#include "ldapurl.h" - -using namespace KABC; - -class LdapClient::LdapClientPrivate{ -public: - TQString bindDN; - TQString pwdBindDN; - LDIF ldif; -}; - -TQString LdapObject::toString() const -{ - TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); - for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { - TQString attr = it.key(); - for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { - result += TQString::fromUtf8( LDIF::assembleLine( attr, *it2, 76 ) ) + "\n"; - } - } - - return result; -} - -void LdapObject::clear() -{ - dn = TQString::null; - attrs.clear(); -} - -void LdapObject::assign( const LdapObject& that ) -{ - if ( &that != this ) { - dn = that.dn; - attrs = that.attrs; - client = that.client; - } -} - -LdapClient::LdapClient( TQObject* parent, const char* name ) - : TQObject( parent, name ), mJob( 0 ), mActive( false ) -{ - d = new LdapClientPrivate; -} - -LdapClient::~LdapClient() -{ - cancelQuery(); - delete d; d = 0; -} - -void LdapClient::setHost( const TQString& host ) -{ - mHost = host; -} - -void LdapClient::setPort( const TQString& port ) -{ - mPort = port; -} - -void LdapClient::setBase( const TQString& base ) -{ - mBase = base; -} - -void LdapClient::setBindDN( const TQString& bindDN ) -{ - d->bindDN = bindDN; -} - -void LdapClient::setPwdBindDN( const TQString& pwdBindDN ) -{ - d->pwdBindDN = pwdBindDN; -} - -void LdapClient::setAttrs( const TQStringList& attrs ) -{ - mAttrs = attrs; -} - -void LdapClient::startQuery( const TQString& filter ) -{ - cancelQuery(); - LDAPUrl url; - - url.setProtocol( "ldap" ); - url.setUser( d->bindDN ); - url.setPass( d->pwdBindDN ); - url.setHost( mHost ); - url.setPort( mPort.toUInt() ); - url.setDn( mBase ); - url.setAttributes( mAttrs ); - url.setScope( mScope == "one" ? LDAPUrl::One : LDAPUrl::Sub ); - url.setFilter( "("+filter+")" ); - - kdDebug(5700) << "Doing query: " << url.prettyURL() << endl; - - startParseLDIF(); - mActive = true; - mJob = TDEIO::get( url, false, false ); - connect( mJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); - connect( mJob, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), - this, TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString& ) ) ); - connect( mJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( slotDone() ) ); -} - -void LdapClient::cancelQuery() -{ - if ( mJob ) { - mJob->kill(); - mJob = 0; - } - - mActive = false; -} - -void LdapClient::slotData( TDEIO::Job*, const TQByteArray& data ) -{ -#ifndef NDEBUG // don't create the QString -// TQString str( data ); -// kdDebug(5700) << "LdapClient: Got \"" << str << "\"\n"; -#endif - parseLDIF( data ); -} - -void LdapClient::slotInfoMessage( TDEIO::Job*, const TQString & ) -{ - //tqDebug("Job said \"%s\"", info.latin1()); -} - -void LdapClient::slotDone() -{ - endParseLDIF(); - mActive = false; -#if 0 - for ( TQValueList::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) { - tqDebug( (*it).toString().latin1() ); - } -#endif - int err = mJob->error(); - if ( err && err != TDEIO::ERR_USER_CANCELED ) { - emit error( TDEIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); - } - emit done(); -} - -void LdapClient::startParseLDIF() -{ - mCurrentObject.clear(); - mLastAttrName = 0; - mLastAttrValue = 0; - mIsBase64 = false; - d->ldif.startParsing(); -} - -void LdapClient::endParseLDIF() -{ -} - -void LdapClient::parseLDIF( const TQByteArray& data ) -{ - if ( data.size() ) { - d->ldif.setLDIF( data ); - } else { - d->ldif.endLDIF(); - } - - LDIF::ParseVal ret; - TQString name; - do { - ret = d->ldif.nextItem(); - switch ( ret ) { - case LDIF::Item: - { - name = d->ldif.attr(); - // Must make a copy! TQByteArray is explicitely shared - TQByteArray value = d->ldif.val().copy(); - mCurrentObject.attrs[ name ].append( value ); - break; - } - case LDIF::EndEntry: - mCurrentObject.dn = d->ldif.dn(); - mCurrentObject.client = this; - emit result( mCurrentObject ); - mCurrentObject.clear(); - break; - default: - break; - } - } while ( ret != LDIF::MoreData ); -} - -TQString LdapClient::bindDN() const -{ - return d->bindDN; -} - -TQString LdapClient::pwdBindDN() const -{ - return d->pwdBindDN; -} - -LdapSearch::LdapSearch() - : mActiveClients( 0 ), mNoLDAPLookup( false ) -{ - if ( !KProtocolInfo::isKnownProtocol( KURL("ldap://localhost") ) ) { - mNoLDAPLookup = true; - return; - } - - // stolen from KAddressBook - TDEConfig config( "kabldaprc", true ); - config.setGroup( "LDAP" ); - int numHosts = config.readUnsignedNumEntry( "NumSelectedHosts"); - if ( !numHosts ) { - mNoLDAPLookup = true; - return; - } else { - for ( int j = 0; j < numHosts; j++ ) { - LdapClient* ldapClient = new LdapClient( this ); - - TQString host = config.readEntry( TQString( "SelectedHost%1" ).arg( j ), "" ).stripWhiteSpace(); - if ( !host.isEmpty() ) - ldapClient->setHost( host ); - - TQString port = TQString::number( config.readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) ) ); - if ( !port.isEmpty() ) - ldapClient->setPort( port ); - - TQString base = config.readEntry( TQString( "SelectedBase%1" ).arg( j ), "" ).stripWhiteSpace(); - if ( !base.isEmpty() ) - ldapClient->setBase( base ); - - TQString bindDN = config.readEntry( TQString( "SelectedBind%1" ).arg( j ) ).stripWhiteSpace(); - if ( !bindDN.isEmpty() ) - ldapClient->setBindDN( bindDN ); - - TQString pwdBindDN = config.readEntry( TQString( "SelectedPwdBind%1" ).arg( j ) ); - if ( !pwdBindDN.isEmpty() ) - ldapClient->setPwdBindDN( pwdBindDN ); - - TQStringList attrs; - attrs << "cn" << "mail" << "givenname" << "sn"; - ldapClient->setAttrs( attrs ); - - connect( ldapClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), - this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); - connect( ldapClient, TQT_SIGNAL( done() ), - this, TQT_SLOT( slotLDAPDone() ) ); - connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ), - this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); - - mClients.append( ldapClient ); - } - } - - connect( &mDataTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDataTimer() ) ); -} - -void LdapSearch::startSearch( const TQString& txt ) -{ - if ( mNoLDAPLookup ) - return; - - cancelSearch(); - - int pos = txt.find( '\"' ); - if( pos >= 0 ) - { - ++pos; - int pos2 = txt.find( '\"', pos ); - if( pos2 >= 0 ) - mSearchText = txt.mid( pos , pos2 - pos ); - else - mSearchText = txt.mid( pos ); - } else - mSearchText = txt; - - TQString filter = TQString( "|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*)" ) - .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); - - TQValueList< LdapClient* >::Iterator it; - for ( it = mClients.begin(); it != mClients.end(); ++it ) { - (*it)->startQuery( filter ); - ++mActiveClients; - } -} - -void LdapSearch::cancelSearch() -{ - TQValueList< LdapClient* >::Iterator it; - for ( it = mClients.begin(); it != mClients.end(); ++it ) - (*it)->cancelQuery(); - - mActiveClients = 0; - mResults.clear(); -} - -void LdapSearch::slotLDAPResult( const KABC::LdapObject& obj ) -{ - mResults.append( obj ); - if ( !mDataTimer.isActive() ) - mDataTimer.start( 500, true ); -} - -void LdapSearch::slotLDAPError( const TQString& ) -{ - slotLDAPDone(); -} - -void LdapSearch::slotLDAPDone() -{ - if ( --mActiveClients > 0 ) - return; - - finish(); -} - -void LdapSearch::slotDataTimer() -{ - TQStringList lst; - LdapResultList reslist; - makeSearchData( lst, reslist ); - if ( !lst.isEmpty() ) - emit searchData( lst ); - if ( !reslist.isEmpty() ) - emit searchData( reslist ); -} - -void LdapSearch::finish() -{ - mDataTimer.stop(); - - slotDataTimer(); // emit final bunch of data - emit searchDone(); -} - -void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) -{ - TQString search_text_upper = mSearchText.upper(); - - TQValueList< KABC::LdapObject >::ConstIterator it1; - for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) { - TQString name, mail, givenname, sn; - - LdapAttrMap::ConstIterator it2; - for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) { - TQString tmp = TQString::fromUtf8( (*it2).first(), (*it2).first().size() ); - if ( it2.key() == "cn" ) - name = tmp; // TODO loop? - else if( it2.key() == "mail" ) - mail = tmp; - else if( it2.key() == "givenName" ) - givenname = tmp; - else if( it2.key() == "sn" ) - sn = tmp; - } - - if( mail.isEmpty()) - continue; // nothing, bad entry - else if ( name.isEmpty() ) - ret.append( mail ); - else { - kdDebug(5700) << "<" << name << "><" << mail << ">" << endl; - ret.append( TQString( "%1 <%2>" ).arg( name ).arg( mail ) ); - } - - LdapResult sr; - sr.clientNumber = mClients.findIndex( (*it1).client ); - sr.name = name; - sr.email = mail; - resList.append( sr ); - } - - mResults.clear(); -} - -bool LdapSearch::isAvailable() const -{ - return !mNoLDAPLookup; -} - - - -#include "ldapclient.moc" diff --git a/kabc/ldapclient.h b/kabc/ldapclient.h deleted file mode 100644 index f43a644ce..000000000 --- a/kabc/ldapclient.h +++ /dev/null @@ -1,248 +0,0 @@ -/* kldapclient.h - LDAP access - * Copyright (C) 2002 Klarälvdalens Datakonsult AB - * - * Author: Steffen Hansen - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#ifndef KABC_LDAPCLIENT_H -#define KABC_LDAPCLIENT_H - - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace KABC { - -class LdapClient; -typedef TQValueList LdapAttrValue; -typedef TQMap LdapAttrMap; - -/** - * This class is internal. Binary compatibiliy might be broken any time - * without notification. Do not use it. - * - * We mean it! - * - */ -class KABC_EXPORT LdapObject -{ - public: - LdapObject() - : dn( TQString::null ), client( 0 ) {} - explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {} - LdapObject( const LdapObject& that ) { assign( that ); } - - LdapObject& operator=( const LdapObject& that ) - { - assign( that ); - return *this; - } - - TQString toString() const; - - void clear(); - - TQString dn; - LdapAttrMap attrs; - LdapClient* client; - - protected: - void assign( const LdapObject& that ); - - private: - //class LdapObjectPrivate* d; -}; - -/** - * This class is internal. Binary compatibiliy might be broken any time - * without notification. Do not use it. - * - * We mean it! - * - */ -class KABC_EXPORT LdapClient : public TQObject -{ - Q_OBJECT - - public: - LdapClient( TQObject* parent = 0, const char* name = 0 ); - virtual ~LdapClient(); - - /*! returns true if there is a query running */ - bool isActive() const { return mActive; } - - signals: - /*! Emitted when the query is done */ - void done(); - - /*! Emitted in case of error */ - void error( const TQString& ); - - /*! Emitted once for each object returned - * from the query - */ - void result( const KABC::LdapObject& ); - - public slots: - /*! - * Set the name or IP of the LDAP server - */ - void setHost( const TQString& host ); - TQString host() const { return mHost; } - - /*! - * Set the port of the LDAP server - * if using a nonstandard port - */ - void setPort( const TQString& port ); - TQString port() const { return mPort; } - - /*! - * Set the base DN - */ - void setBase( const TQString& base ); - TQString base() const { return mBase; } - - /*! - * Set the bind DN - */ - void setBindDN( const TQString& bindDN ); - TQString bindDN() const; - - /*! - * Set the bind password DN - */ - void setPwdBindDN( const TQString& pwdBindDN ); - TQString pwdBindDN() const; - - /*! Set the attributes that should be - * returned, or an empty list if - * all attributes are wanted - */ - void setAttrs( const TQStringList& attrs ); - TQStringList attrs() const { return mAttrs; } - - void setScope( const TQString scope ) { mScope = scope; } - - /*! - * Start the query with filter filter - */ - void startQuery( const TQString& filter ); - - /*! - * Abort a running query - */ - void cancelQuery(); - - protected slots: - void slotData( TDEIO::Job*, const TQByteArray &data ); - void slotInfoMessage( TDEIO::Job*, const TQString &info ); - void slotDone(); - - protected: - void startParseLDIF(); - void parseLDIF( const TQByteArray& data ); - void endParseLDIF(); - - TQString mHost; - TQString mPort; - TQString mBase; - TQString mScope; - TQStringList mAttrs; - - TQGuardedPtr mJob; - bool mActive; - - LdapObject mCurrentObject; - TQCString mBuf; - TQCString mLastAttrName; - TQCString mLastAttrValue; - bool mIsBase64; - - private: - class LdapClientPrivate; - LdapClientPrivate* d; -}; - -/** - * Structure describing one result returned by a LDAP query - */ -struct LdapResult { - TQString name; ///< full name - TQString email; ///< email - int clientNumber; ///< for sorting -}; -typedef TQValueList LdapResultList; - - -/** - * This class is internal. Binary compatibiliy might be broken any time - * without notification. Do not use it. - * - * We mean it! - * - */ -class KABC_EXPORT LdapSearch : public TQObject -{ - Q_OBJECT - - public: - LdapSearch(); - - void startSearch( const TQString& txt ); - void cancelSearch(); - bool isAvailable() const; - - signals: - /// Results, assembled as "Full Name " - /// (This signal can be emitted many times) - void searchData( const TQStringList& ); - /// Another form for the results, with separate fields - /// (This signal can be emitted many times) - void searchData( const KABC::LdapResultList& ); - void searchDone(); - - private slots: - void slotLDAPResult( const KABC::LdapObject& ); - void slotLDAPError( const TQString& ); - void slotLDAPDone(); - void slotDataTimer(); - - private: - void finish(); - void makeSearchData( TQStringList& ret, LdapResultList& resList ); - TQValueList< LdapClient* > mClients; - TQString mSearchText; - TQTimer mDataTimer; - int mActiveClients; - bool mNoLDAPLookup; - TQValueList< LdapObject > mResults; - - private: - class LdapSearchPrivate* d; -}; - -} -#endif // KABC_LDAPCLIENT_H diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp deleted file mode 100644 index 5996477a0..000000000 --- a/kabc/ldapconfigwidget.cpp +++ /dev/null @@ -1,626 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ldapconfigwidget.h" -#include "ldapconfigwidget.moc" - -using namespace KABC; - -LdapConfigWidget::LdapConfigWidget( TQWidget* parent, - const char* name, WFlags fl ) : TQWidget( parent, name, fl ) -{ - mProg = 0; - mFlags = 0; - mainLayout = new TQGridLayout( this, 12, 4, 0, - KDialog::spacingHint() ); -} - -LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent, - const char* name, WFlags fl ) : TQWidget( parent, name, fl ) -{ - mFlags = flags; - mProg = 0; - mainLayout = new TQGridLayout( this, 12, 4, 0, - KDialog::spacingHint() ); - initWidget(); -} - -LdapConfigWidget::~LdapConfigWidget() -{ -} - -void LdapConfigWidget::initWidget() -{ - TQLabel *label; - - mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0; - mPort = mVer = mTimeLimit = mSizeLimit = 0; - mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = 0; - mEditButton = mQueryMech = 0; - mMech = 0; - int row = 0; - int col; - - if ( mFlags & W_USER ) { - label = new TQLabel( i18n( "User:" ), this ); - mUser = new KLineEdit( this, "kcfg_ldapuser" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mUser, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_BINDDN ) { - label = new TQLabel( i18n( "Bind DN:" ), this ); - mBindDN = new KLineEdit( this, "kcfg_ldapbinddn" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mBindDN, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_REALM ) { - label = new TQLabel( i18n( "Realm:" ), this ); - mRealm = new KLineEdit( this, "kcfg_ldaprealm" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mRealm, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_PASS ) { - label = new TQLabel( i18n( "Password:" ), this ); - mPassword = new KLineEdit( this, "kcfg_ldappassword" ); - mPassword->setEchoMode( KLineEdit::Password ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mPassword, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_HOST ) { - label = new TQLabel( i18n( "Host:" ), this ); - mHost = new KLineEdit( this, "kcfg_ldaphost" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mHost, row, row, 1, 3 ); - row++; - } - - col = 0; - if ( mFlags & W_PORT ) { - label = new TQLabel( i18n( "Port:" ), this ); - mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" ); - mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mPort->setValue( 389 ); - - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mPort, row, col+1 ); - col += 2; - } - - if ( mFlags & W_VER ) { - label = new TQLabel( i18n( "LDAP version:" ), this ); - mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" ); - mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mVer->setValue( 3 ); - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mVer, row, col+1 ); - } - if ( mFlags & ( W_PORT | W_VER ) ) row++; - - col = 0; - if ( mFlags & W_SIZELIMIT ) { - label = new TQLabel( i18n( "Size limit:" ), this ); - mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" ); - mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mSizeLimit->setValue( 0 ); - mSizeLimit->setSpecialValueText( i18n("Default") ); - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mSizeLimit, row, col+1 ); - col += 2; - } - - if ( mFlags & W_TIMELIMIT ) { - label = new TQLabel( i18n( "Time limit:" ), this ); - mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" ); - mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); - mTimeLimit->setValue( 0 ); - mTimeLimit->setSuffix( i18n(" sec") ); - mTimeLimit->setSpecialValueText( i18n("Default") ); - mainLayout->addWidget( label, row, col ); - mainLayout->addWidget( mTimeLimit, row, col+1 ); - } - if ( mFlags & ( W_SIZELIMIT | W_TIMELIMIT ) ) row++; - - if ( mFlags & W_DN ) { - label = new TQLabel( i18n( "Distinguished Name", "DN:" ), this ); - mDn = new KLineEdit( this, "kcfg_ldapdn" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mDn, row, row, 1, 1 ); - //without host query doesn't make sense - if ( mHost ) { - TQPushButton *dnquery = new TQPushButton( i18n( "Query Server" ), this ); - connect( dnquery, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryDNClicked() ) ); - mainLayout->addMultiCellWidget( dnquery, row, row, 2, 3 ); - } - row++; - } - - if ( mFlags & W_FILTER ) { - label = new TQLabel( i18n( "Filter:" ), this ); - mFilter = new KLineEdit( this, "kcfg_ldapfilter" ); - - mainLayout->addWidget( label, row, 0 ); - mainLayout->addMultiCellWidget( mFilter, row, row, 1, 3 ); - row++; - } - - if ( mFlags & W_SECBOX ) { - TQHButtonGroup *btgroup = new TQHButtonGroup( i18n( "Security" ), this ); - mSecNO = new TQRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" ); - mSecTLS = new TQRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" ); - mSecSSL = new TQRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" ); - mainLayout->addMultiCellWidget( btgroup, row, row, 0, 3 ); - - connect( mSecNO, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); - connect( mSecTLS, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); - connect( mSecSSL, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPSPort( ) ) ); - - mSecNO->setChecked( true ); - row++; - } - - if ( mFlags & W_AUTHBOX ) { - - TQButtonGroup *authbox = - new TQButtonGroup( 3, Qt::Horizontal, i18n( "Authentication" ), this ); - - mAnonymous = new TQRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" ); - mSimple = new TQRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" ); - mSASL = new TQRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" ); - - label = new TQLabel( i18n( "SASL mechanism:" ), authbox ); - mMech = new KComboBox( false, authbox, "kcfg_ldapsaslmech" ); - mMech->setEditable( true ); - mMech->insertItem( "DIGEST-MD5" ); - mMech->insertItem( "GSSAPI" ); - mMech->insertItem( "PLAIN" ); - - //without host query doesn't make sense - if ( mHost ) { - mQueryMech = new TQPushButton( i18n( "Query Server" ), authbox ); - connect( mQueryMech, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryMechClicked() ) ); - } - - mainLayout->addMultiCellWidget( authbox, row, row+1, 0, 3 ); - - connect( mAnonymous, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setAnonymous(int) ) ); - connect( mSimple, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSimple(int) ) ); - connect( mSASL, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSASL(int) ) ); - - mAnonymous->setChecked( true ); - } - -} - -void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d ) -{ - LDIF::ParseVal ret; - - if ( d.size() ) { - mLdif.setLDIF( d ); - } else { - mLdif.endLDIF(); - } - do { - ret = mLdif.nextItem(); - if ( ret == LDIF::Item && mLdif.attr().lower() == mAttr ) { - mProg->progressBar()->advance( 1 ); - mQResult.push_back( TQString::fromUtf8( mLdif.val(), mLdif.val().size() ) ); - } - } while ( ret != LDIF::MoreData ); -} - -void LdapConfigWidget::loadResult( TDEIO::Job* job) -{ - int error = job->error(); - if ( error && error != TDEIO::ERR_USER_CANCELED ) - mErrorMsg = job->errorString(); - else - mErrorMsg = ""; - - mCancelled = false; - mProg->close(); -} - -void LdapConfigWidget::sendQuery() -{ - LDAPUrl _url; - - mQResult.clear(); - mCancelled = true; - - _url.setProtocol( ( mSecSSL && mSecSSL->isChecked() ) ? "ldaps" : "ldap" ); - if ( mHost ) _url.setHost( mHost->text() ); - if ( mPort ) _url.setPort( mPort->value() ); - _url.setDn( "" ); - _url.setAttributes( mAttr ); - _url.setScope( LDAPUrl::Base ); - if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); - if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls", "" ); - - kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl; - mLdif.startParsing(); - TDEIO::Job *job = TDEIO::get( _url, true, false ); - job->addMetaData("no-auth-prompt","true"); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( loadResult( TDEIO::Job* ) ) ); - - if ( mProg == NULL ) - mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); - else - mProg->setLabel( _url.prettyURL() ); - mProg->progressBar()->setValue( 0 ); - mProg->progressBar()->setTotalSteps( 1 ); - mProg->exec(); - if ( mCancelled ) { - kdDebug(5700) << "query cancelled!" << endl; - job->kill( true ); - } else { - if ( !mErrorMsg.isEmpty() ) KMessageBox::error( this, mErrorMsg ); - } -} - -void LdapConfigWidget::mQueryMechClicked() -{ - mAttr = "supportedsaslmechanisms"; - sendQuery(); - if ( !mQResult.isEmpty() ) { - mQResult.sort(); - mMech->clear(); - mMech->insertStringList( mQResult ); - } -} - -void LdapConfigWidget::mQueryDNClicked() -{ - mAttr = "namingcontexts"; - sendQuery(); - if ( !mQResult.isEmpty() ) mDn->setText( mQResult.first() ); -} - -void LdapConfigWidget::setAnonymous( int state ) -{ - if ( state == TQButton::Off ) return; - if ( mUser ) mUser->setEnabled(false); - if ( mPassword ) mPassword->setEnabled(false); - if ( mBindDN ) mBindDN->setEnabled(false); - if ( mRealm ) mRealm->setEnabled(false); - if ( mMech ) mMech->setEnabled(false); - if ( mQueryMech ) mQueryMech->setEnabled(false); -} - -void LdapConfigWidget::setSimple( int state ) -{ - if ( state == TQButton::Off ) return; - if ( mUser ) mUser->setEnabled(true); - if ( mPassword ) mPassword->setEnabled(true); - if ( mBindDN ) mBindDN->setEnabled(false); - if ( mRealm ) mRealm->setEnabled(false); - if ( mMech ) mMech->setEnabled(false); - if ( mQueryMech ) mQueryMech->setEnabled(false); -} - -void LdapConfigWidget::setSASL( int state ) -{ - if ( state == TQButton::Off ) return; - if ( mUser ) mUser->setEnabled(true); - if ( mPassword ) mPassword->setEnabled(true); - if ( mBindDN ) mBindDN->setEnabled(true); - if ( mRealm ) mRealm->setEnabled(true); - if ( mMech ) mMech->setEnabled(true); - if ( mQueryMech ) mQueryMech->setEnabled(true); -} - -void LdapConfigWidget::setLDAPPort() -{ - mPort->setValue( 389 ); -} - -void LdapConfigWidget::setLDAPSPort() -{ - mPort->setValue( 636 ); -} - - -LDAPUrl LdapConfigWidget::url() const -{ - LDAPUrl _url; - if ( mSecSSL && mSecSSL->isChecked() ) - _url.setProtocol( "ldaps" ); - else - _url.setProtocol( "ldap" ); - - if ( mUser ) _url.setUser( mUser->text() ); - if ( mPassword ) _url.setPass( mPassword->text() ); - if ( mHost ) _url.setHost( mHost->text() ); - if ( mPort ) _url.setPort( mPort->value() ); - if ( mDn ) _url.setDn( mDn->text() ); - if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); - if ( mSizeLimit && mSizeLimit->value() != 0 ) - _url.setExtension( "x-sizelimit", TQString::number( mSizeLimit->value() ) ); - if ( mTimeLimit && mTimeLimit->value() != 0 ) - _url.setExtension( "x-timelimit", TQString::number( mTimeLimit->value() ) ); - if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls","" ); - if ( mFilter && !mFilter->text().isEmpty() ) - _url.setFilter( mFilter->text() ); - if ( mSASL && mSASL->isChecked() ) { - _url.setExtension( "x-sasl", "" ); - _url.setExtension( "x-mech", mMech->currentText() ); - if ( mBindDN && !mBindDN->text().isEmpty() ) - _url.setExtension( "bindname", mBindDN->text() ); - if ( mRealm && !mRealm->text().isEmpty() ) - _url.setExtension( "x-realm", mRealm->text() ); - } - return ( _url ); -} - -void LdapConfigWidget::setUser( const TQString &user ) -{ - if ( mUser ) mUser->setText( user ); -} - -TQString LdapConfigWidget::user() const -{ - return ( mUser ? mUser->text() : TQString::null ); -} - -void LdapConfigWidget::setPassword( const TQString &password ) -{ - if ( mPassword ) mPassword->setText( password ); -} - -TQString LdapConfigWidget::password() const -{ - return ( mPassword ? mPassword->text() : TQString::null ); -} - -void LdapConfigWidget::setBindDN( const TQString &binddn ) -{ - if ( mBindDN ) mBindDN->setText( binddn ); -} - -TQString LdapConfigWidget::bindDN() const -{ - return ( mBindDN ? mBindDN->text() : TQString::null ); -} - -void LdapConfigWidget::setRealm( const TQString &realm ) -{ - if ( mRealm ) mRealm->setText( realm ); -} - -TQString LdapConfigWidget::realm() const -{ - return ( mRealm ? mRealm->text() : TQString::null ); -} - -void LdapConfigWidget::setHost( const TQString &host ) -{ - if ( mHost ) mHost->setText( host ); -} - -TQString LdapConfigWidget::host() const -{ - return ( mHost ? mHost->text() : TQString::null ); -} - -void LdapConfigWidget::setPort( int port ) -{ - if ( mPort ) mPort->setValue( port ); -} - -int LdapConfigWidget::port() const -{ - return ( mPort ? mPort->value() : 389 ); -} - -void LdapConfigWidget::setVer( int ver ) -{ - if ( mVer ) mVer->setValue( ver ); -} - -int LdapConfigWidget::ver() const -{ - return ( mVer ? mVer->value() : 3 ); -} - -void LdapConfigWidget::setDn( const TQString &dn ) -{ - if ( mDn ) mDn->setText( dn ); -} - -TQString LdapConfigWidget::dn() const -{ - return ( mDn ? mDn->text() : TQString::null ); -} - -void LdapConfigWidget::setFilter( const TQString &filter ) -{ - if ( mFilter ) mFilter->setText( filter ); -} - -TQString LdapConfigWidget::filter() const -{ - return ( mFilter ? mFilter->text() : TQString::null ); -} - -void LdapConfigWidget::setMech( const TQString &mech ) -{ - if ( mMech == 0 ) return; - if ( !mech.isEmpty() ) { - int i = 0; - while ( i < mMech->count() ) { - if ( mMech->text( i ) == mech ) break; - i++; - } - if ( i == mMech->count() ) mMech->insertItem( mech ); - mMech->setCurrentItem( i ); - } -} - -TQString LdapConfigWidget::mech() const -{ - return ( mMech ? mMech->currentText() : TQString::null ); -} - -void LdapConfigWidget::setSecNO( bool b ) -{ - if ( mSecNO ) mSecNO->setChecked( b ); -} - -bool LdapConfigWidget::isSecNO() const -{ - return ( mSecNO ? mSecNO->isChecked() : true ); -} - -void LdapConfigWidget::setSecTLS( bool b ) -{ - if ( mSecTLS ) mSecTLS->setChecked( b ); -} - -bool LdapConfigWidget::isSecTLS() const -{ - return ( mSecTLS ? mSecTLS->isChecked() : false ); -} - -void LdapConfigWidget::setSecSSL( bool b ) -{ - if ( mSecSSL ) mSecSSL->setChecked( b ); -} - -bool LdapConfigWidget::isSecSSL() const -{ - return ( mSecSSL ? mSecSSL->isChecked() : false ); -} - -void LdapConfigWidget::setAuthAnon( bool b ) -{ - if ( mAnonymous ) mAnonymous->setChecked( b ); -} - -bool LdapConfigWidget::isAuthAnon() const -{ - return ( mAnonymous ? mAnonymous->isChecked() : true ); -} - -void LdapConfigWidget::setAuthSimple( bool b ) -{ - if ( mSimple ) mSimple->setChecked( b ); -} - -bool LdapConfigWidget::isAuthSimple() const -{ - return ( mSimple ? mSimple->isChecked() : false ); -} - -void LdapConfigWidget::setAuthSASL( bool b ) -{ - if ( mSASL ) mSASL->setChecked( b ); -} - -bool LdapConfigWidget::isAuthSASL() const -{ - return ( mSASL ? mSASL->isChecked() : false ); -} - -void LdapConfigWidget::setSizeLimit( int sizelimit ) -{ - if ( mSizeLimit ) mSizeLimit->setValue( sizelimit ); -} - -int LdapConfigWidget::sizeLimit() const -{ - return ( mSizeLimit ? mSizeLimit->value() : 0 ); -} - -void LdapConfigWidget::setTimeLimit( int timelimit ) -{ - if ( mTimeLimit ) mTimeLimit->setValue( timelimit ); -} - -int LdapConfigWidget::timeLimit() const -{ - return ( mTimeLimit ? mTimeLimit->value() : 0 ); -} - -int LdapConfigWidget::flags() const -{ - return mFlags; -} - -void LdapConfigWidget::setFlags( int flags ) -{ - mFlags = flags; - - // First delete all the child widgets. - // FIXME: I hope it's correct - const TQObjectList ch = childrenListObject(); - TQObjectList ch2 = ch; - TQObject *obj; - TQWidget *widget; - - obj = ch2.first(); - while ( obj != 0 ) { - widget = dynamic_cast (obj); - if ( widget && TQT_BASE_OBJECT(widget->parent()) == TQT_BASE_OBJECT(this) ) { - mainLayout->remove( widget ); - delete ( widget ); - } - obj = ch2.next(); - } - // Re-create child widgets according to the new flags - initWidget(); -} diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h deleted file mode 100644 index 01074292e..000000000 --- a/kabc/ldapconfigwidget.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef LDAPCONFIGWIDGET_H -#define LDAPCONFIGWIDGET_H - -#include -#include -#include - -#include -#include -#include - -class TQGridLayout; -class TQSpinBox; -class TQPushButton; -class TQCheckBox; -class TQRadioButton; -class KComboBox; -class KLineEdit; -class KProgressDialog; - -namespace KABC { - - /** - @short LDAP Configuration widget - - This class can be used to query the user for LDAP connection parameters. - It's TDEConfigXT compatible, using widget names starting with kcfg_ - */ - - class KABC_EXPORT LdapConfigWidget : public TQWidget - { - Q_OBJECT - - TQ_PROPERTY( LCW_Flags flags READ flagsProp WRITE setFlagsProp ) - TQ_PROPERTY( TQString user READ user WRITE setUser ) - TQ_PROPERTY( TQString password READ password WRITE setPassword ) - TQ_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN ) - TQ_PROPERTY( TQString realm READ realm WRITE setRealm ) - TQ_PROPERTY( TQString host READ host WRITE setHost ) - TQ_PROPERTY( int port READ port WRITE setPort ) - TQ_PROPERTY( int ver READ ver WRITE setVer ) - TQ_PROPERTY( TQString dn READ dn WRITE setDn ) - TQ_PROPERTY( TQString filter READ filter WRITE setFilter ) - TQ_PROPERTY( TQString mech READ mech WRITE setMech ) - TQ_PROPERTY( bool secNO READ isSecNO WRITE setSecNO ) - TQ_PROPERTY( bool secSSL READ isSecSSL WRITE setSecSSL ) - TQ_PROPERTY( bool secTLS READ isSecSSL WRITE setSecTLS ) - TQ_PROPERTY( bool authAnon READ isAuthAnon WRITE setAuthAnon ) - TQ_PROPERTY( bool authSimple READ isAuthSimple WRITE setAuthSimple ) - TQ_PROPERTY( bool authSASL READ isAuthSASL WRITE setAuthSASL ) - TQ_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit ) - TQ_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit ) - TQ_SETS ( LCW_Flags ) - - public: - - enum LCW_Flags { - W_USER = 0x1, - W_PASS = 0x2, - W_BINDDN = 0x4, - W_REALM = 0x8, - W_HOST = 0x10, - W_PORT = 0x20, - W_VER = 0x40, - W_DN = 0x80, - W_FILTER = 0x100, - W_SECBOX = 0x400, - W_AUTHBOX = 0x800, - W_TIMELIMIT = 0x1000, - W_SIZELIMIT = 0x2000, - W_ALL = 0xFFFFFFF - }; - - /** Constructs an empty configuration widget. - * You need to call setFlags() after this. - */ - LdapConfigWidget( TQWidget* parent = 0, - const char* name = 0, WFlags fl = 0 ); - /** Constructs a configuration widget */ - LdapConfigWidget( int flags, TQWidget* parent = 0, - const char* name = 0, WFlags fl = 0 ); - /** Destructs a configuration widget */ - virtual ~LdapConfigWidget(); - - /** Sets the user name. Kconfig widget name: kcfg_ldapuser */ - void setUser( const TQString &user ); - /** Gets the user name. Kconfig widget name: kcfg_ldapuser */ - TQString user() const; - - /** Sets the password. Kconfig widget name: kcfg_ldappassword */ - void setPassword( const TQString &password ); - /** Gets the password. Kconfig widget name: kcfg_ldappassword */ - TQString password() const; - - /** - * Sets the bind dn. Useful for SASL proxy auth. - * Kconfig widget name: kcfg_ldapbinddn - */ - void setBindDN( const TQString &binddn ); - /** Gets the bind dn. Kconfig widget name: kcfg_ldapbinddn*/ - TQString bindDN() const; - - /** Sets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ - void setRealm( const TQString &realm ); - /** Gets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ - TQString realm() const; - - /** Sets the host name. Kconfig widget name: kcfg_ldaphost */ - void setHost( const TQString &host ); - /** Gets the host name. Kconfig widget name: kcfg_ldaphost */ - TQString host() const; - - /** Sets the LDAP port. Kconfig widget name: kcfg_ldapport */ - void setPort( int port ); - /** Gets the LDAP port. Kconfig widget name: kcfg_ldapport */ - int port() const; - - /** Sets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ - void setVer( int ver ); - /** Gets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ - int ver() const; - - /** Sets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ - void setDn( const TQString &dn ); - /** Gets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ - TQString dn() const; - - /** Sets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ - void setFilter( const TQString &filter ); - /** Gets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ - TQString filter() const; - - /** Sets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ - void setMech( const TQString &mech ); - /** Gets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ - TQString mech() const; - - /** - * Sets the configuration to no transport security. - * Kconfig widget name: kcfg_ldapnosec - */ - void setSecNO( bool b = true ); - /** - * Returns true if no transport security selected. - * Kconfig widget name: kcfg_ldapnosec - */ - bool isSecNO() const; - - /** - * Sets the configuration to TLS. - * Kconfig widget name: kcfg_ldaptls - */ - void setSecTLS( bool b = true ); - /** - * Returns true if TLS selected. - * Kconfig widget name: kcfg_ldaptls - */ - bool isSecTLS() const; - - /** - * Sets the configuration to SSL. - * Kconfig widget name: kcfg_ldapssl - */ - void setSecSSL( bool b = true ); - /** - * Returns true if SSL selected. - * Kconfig widget name: kcfg_ldapssl - */ - bool isSecSSL() const; - - /** - * Sets the authentication to anonymous. - * Kconfig widget name: kcfg_ldapanon - */ - void setAuthAnon( bool b = true ); - /** - * Returns true if Anonymous authentication selected. - * Kconfig widget name: kcfg_ldapanon - */ - bool isAuthAnon() const; - - /** - * Sets the authentication to simple. - * Kconfig widget name: kcfg_ldapsimple - */ - void setAuthSimple( bool b = true ); - /** - * Returns true if Simple authentication selected. - * Kconfig widget name: kcfg_ldapsimple - */ - bool isAuthSimple() const; - - /** - * Sets the authentication to SASL. - * Kconfig widget name: kcfg_ldapsasl - */ - void setAuthSASL( bool b = true ); - /** - * Returns true if SASL authentication selected. - * Kconfig widget name: kcfg_ldapsasl - */ - bool isAuthSASL() const; - - /** - * Sets the size limit. - * TDEConfig widget name: kcfg_ldapsizelimit - */ - void setSizeLimit( int sizelimit ); - /** - * Returns the size limit. - * TDEConfig widget name: kcfg_ldapsizelimit - */ - int sizeLimit() const; - - /** - * Sets the time limit. - * TDEConfig widget name: kcfg_ldaptimelimit - */ - void setTimeLimit( int timelimit ); - /** - * Returns the time limit. - * TDEConfig widget name: kcfg_ldaptimelimit - */ - int timeLimit() const; - - int flags() const; - void setFlags( int flags ); - inline LCW_Flags flagsProp() const { return (LCW_Flags)flags(); } - inline void setFlagsProp( LCW_Flags flags ) { setFlags((int)flags); } - - /** - * Returns a LDAP Url constructed from the settings given. - * Extensions are filled for use in the LDAP ioslave - */ - KABC::LDAPUrl url() const; - - private slots: - void setLDAPPort(); - void setLDAPSPort(); - void setAnonymous( int state ); - void setSimple( int state ); - void setSASL( int state ); - void mQueryDNClicked(); - void mQueryMechClicked(); - void loadData( TDEIO::Job*, const TQByteArray& ); - void loadResult( TDEIO::Job* ); - private: - - int mFlags; - LDIF mLdif; - TQStringList mQResult; - TQString mAttr; - - KLineEdit *mUser; - KLineEdit *mPassword; - KLineEdit *mHost; - TQSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit; - KLineEdit *mDn, *mBindDN, *mRealm; - KLineEdit *mFilter; - TQRadioButton *mAnonymous,*mSimple,*mSASL; - TQCheckBox *mSubTree; - TQPushButton *mEditButton; - TQPushButton *mQueryMech; - TQRadioButton *mSecNO,*mSecTLS,*mSecSSL; - KComboBox *mMech; - - TQString mErrorMsg; - bool mCancelled; - KProgressDialog *mProg; - - TQGridLayout *mainLayout; - class LDAPConfigWidgetPrivate; - LDAPConfigWidgetPrivate *d; - - void sendQuery(); - void initWidget(); - }; -} - -#endif diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp deleted file mode 100644 index 9032c16d3..000000000 --- a/kabc/ldapurl.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "ldapurl.h" - -using namespace KABC; - -LDAPUrl::LDAPUrl() -{ - m_scope = Base; -} - -LDAPUrl::LDAPUrl(const KURL &_url) - : KURL(_url), m_extensions() -{ - m_dn = path(); - if ( !TQDir::isRelativePath(m_dn) ) -#ifdef Q_WS_WIN - m_dn.remove(0,3); // e.g. "c:/" -#else - m_dn.remove(0,1); -#endif - parseQuery(); -} - -void LDAPUrl::setDn( const TQString &dn) -{ - m_dn = dn; - if ( !TQDir::isRelativePath(m_dn) ) -#ifdef Q_WS_WIN - m_dn.remove(0,3); // e.g. "c:/" -#else - m_dn.remove(0,1); -#endif - setPath(m_dn); -} - -bool LDAPUrl::hasExtension( const TQString &key ) const -{ - return m_extensions.contains( key ); -} - -LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const -{ - TQMap::const_iterator it; - - it = m_extensions.find( key ); - if ( it != m_extensions.constEnd() ) - return (*it); - else { - Extension ext; - ext.value = ""; - ext.critical = false; - return ext; - } -} - -TQString LDAPUrl::extension( const TQString &key, bool &critical ) const -{ - Extension ext; - - ext = extension( key ); - critical = ext.critical; - return ext.value; -} - -void LDAPUrl::setExtension( const TQString &key, const LDAPUrl::Extension &ext ) -{ - m_extensions[ key ] = ext; - updateQuery(); -} - -void LDAPUrl::setExtension( const TQString &key, const TQString &value, bool critical ) -{ - Extension ext; - ext.value = value; - ext.critical = critical; - setExtension( key, ext ); -} - -void LDAPUrl::removeExtension( const TQString &key ) -{ - m_extensions.remove( key ); - updateQuery(); -} - -void LDAPUrl::updateQuery() -{ - Extension ext; - TQMap::iterator it; - TQString q = "?"; - - // set the attributes to query - if ( m_attributes.count() > 0 ) q += m_attributes.join(","); - - // set the scope - q += "?"; - switch( m_scope ) { - case Sub: - q += "sub"; - break; - case One: - q += "one"; - break; - case Base: - q += "base"; - break; - } - - // set the filter - q += "?"; - if ( m_filter != "(objectClass=*)" && !m_filter.isEmpty() ) - q += m_filter; - - // set the extensions - q += "?"; - for ( it = m_extensions.begin(); it != m_extensions.end(); ++it ) { - if ( it.data().critical ) q += "!"; - q += it.key(); - if ( !it.data().value.isEmpty() ) - q += "=" + it.data().value; - q += ","; - } - while ( q.endsWith("?") || q.endsWith(",") ) - q.remove( q.length() - 1, 1 ); - - setQuery(q); - kdDebug(5700) << "LDAP URL updateQuery(): " << prettyURL() << endl; -} - -void LDAPUrl::parseQuery() -{ - Extension ext; - TQStringList extensions; - TQString q = query(); - // remove first ? - if (q.startsWith("?")) - q.remove(0,1); - - // split into a list - TQStringList url_items = TQStringList::split("?", q, true); - - m_attributes.clear(); - m_scope = Base; - m_filter = "(objectClass=*)"; - m_extensions.clear(); - - int i = 0; - for ( TQStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) { - switch (i) { - case 0: - m_attributes = TQStringList::split(",", (*it), false); - break; - case 1: - if ( (*it) == "sub" ) m_scope = Sub; else - if ( (*it) == "one") m_scope = One; - break; - case 2: - m_filter = decode_string( *it ); - break; - case 3: - extensions = TQStringList::split(",", (*it), false); - break; - } - } - - TQString name,value; - for ( TQStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) { - ext.critical = false; - name = decode_string( (*it).section('=',0,0) ).lower(); - value = decode_string( (*it).section('=',1) ); - if ( name.startsWith("!") ) { - ext.critical = true; - name.remove(0, 1); - } - kdDebug(5700) << "LDAPUrl extensions name= " << name << " value: " << value << endl; - ext.value = value.replace( "%2", "," ); - setExtension( name, ext ); - } -} diff --git a/kabc/ldapurl.h b/kabc/ldapurl.h deleted file mode 100644 index 0c2693758..000000000 --- a/kabc/ldapurl.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _K_LDAPURL_H_ -#define _K_LDAPURL_H_ - -#include -#include -#include - -#include - -namespace KABC { - -/** - * LDAPUrl - - * LDAPUrl implements an RFC 2255 compliant LDAP Url parser, with minimal - * differences. LDAP Urls implemented by this class has the following format: - * ldap[s]://[user[:password]@]hostname[:port]["/" [dn ["?" [attributes] - * ["?" [scope] ["?" [filter] ["?" extensions]]]]]] - */ - - - class KABC_EXPORT LDAPUrl : public KURL - { - public: - - struct Extension { - TQString value; - bool critical; - }; - - typedef enum Scope { Base, One, Sub }; - - /** Constructs an empty KLDAPUrl. */ - LDAPUrl(); - /** Constructs a KLDAPUrl from a KURL. */ - LDAPUrl( const KURL &url ); - - /** - * Returns the dn part of the LDAP Url (same as path(), but slash removed - * from the beginning). - */ - const TQString& dn() const { return m_dn; } - /** Sets the the dn part of the LDAP Url. */ - void setDn( const TQString &dn ); - - /** Returns the attributes part of the LDAP Url */ - const TQStringList &attributes() { return m_attributes; } - /** Sets the attributes part of the LDAP Url */ - void setAttributes( const TQStringList &attributes ) - { m_attributes=attributes; updateQuery(); } - - /** Returns the scope part of the LDAP Url */ - Scope scope() const { return m_scope; } - /** Sets the scope part of the LDAP Url */ - void setScope(Scope scope) { m_scope = scope; updateQuery(); } - - /** Returns the filter part of the LDAP Url */ - const TQString &filter() const { return m_filter; } - /** Sets the filter part of the LDAP Url */ - void setFilter( TQString filter ) { m_filter = filter; updateQuery(); } - - /** Returns if the specified extension exists in the LDAP Url */ - bool hasExtension( const TQString &key ) const; - /** Returns the specified extension */ - Extension extension( const TQString &key ) const; - /** Returns the specified extension */ - TQString extension( const TQString &key, bool &critical ) const; - /** Sets the specified extension key with the value and criticality in ext */ - void setExtension( const TQString &key, const Extension &ext ); - /** Sets the specified extension key with the value and criticality specified */ - void setExtension( const TQString &key, const TQString &value, bool critical = false ); - /** Removes the specified extension */ - void removeExtension( const TQString &key ); - /** Updates the query component from the attributes, scope, filter and extensions */ - void updateQuery(); - - protected: - void parseQuery(); - - private: - - TQMap m_extensions; - TQString m_dn; - TQStringList m_attributes; - Scope m_scope; - TQString m_filter; - }; -} - -#endif diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp deleted file mode 100644 index 408f5223f..000000000 --- a/kabc/ldif.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "ldif.h" - -using namespace KABC; - -LDIF::LDIF() -{ - startParsing(); -} - -LDIF::~LDIF() -{ -} - -TQCString LDIF::assembleLine( const TQString &fieldname, const TQByteArray &value, - uint linelen, bool url ) -{ - bool safe = false; - bool isDn; - TQCString result; - uint i; - - if ( url ) { - result = fieldname.utf8() + ":< " + TQCString( value.data(), value.size()+1 ); - } else { - isDn = fieldname.lower() == "dn"; - //SAFE-INIT-CHAR - if ( value.size() > 0 && value[0] > 0 && value[0] != '\n' && - value[0] != '\r' && value[0] != ':' && value[0] != '<' ) safe = true; - - //SAFE-CHAR - if ( safe ) { - for ( i=1; i < value.size(); i++ ) { - //allow utf-8 in Distinguished Names - if ( ( isDn && value[i] == 0 ) || - ( !isDn && value[i] <= 0 ) || - value[i] == '\r' || value[i] == '\n' ) { - safe = false; - break; - } - } - } - - if ( value.size() == 0 ) safe = true; - - if( safe ) { - result = fieldname.utf8() + ": " + TQCString( value.data(), value.size()+1 ); - } else { - result = fieldname.utf8() + ":: " + KCodecs::base64Encode( value, false ); - } - - if ( linelen > 0 ) { - i = (fieldname.length()+2) > linelen ? fieldname.length()+2 : linelen; - while ( i < result.length() ) { - result.insert( i, "\n " ); - i += linelen+2; - } - } - } - return result; -} - -TQCString LDIF::assembleLine( const TQString &fieldname, const TQCString &value, - uint linelen, bool url ) -{ - TQCString ret; - TQByteArray tmp; - uint valuelen = value.length(); - const char *data = value.data(); - - tmp.setRawData( data, valuelen ); - ret = assembleLine( fieldname, tmp, linelen, url ); - tmp.resetRawData( data, valuelen ); - return ret; - -} - -TQCString LDIF::assembleLine( const TQString &fieldname, const TQString &value, - uint linelen, bool url ) -{ - return assembleLine( fieldname, value.utf8(), linelen, url ); -} - -bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ) -{ - int position; - TQByteArray tmp; - int linelen; - const char *data; - -// kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl; - - position = line.find( ":" ); - if ( position == -1 ) { - // strange: we did not find a fieldname - fieldname = ""; - TQCString str; - str = line.stripWhiteSpace(); - linelen = str.length(); - data = str.data(); - tmp.setRawData( data, linelen ); - value = tmp.copy(); - tmp.resetRawData( data, linelen ); -// kdDebug(5700) << "value : " << value[0] << endl; - return false; - } - - linelen = line.length(); - - if ( linelen > ( position + 1 ) && line[ position + 1 ] == ':' ) { - // String is BASE64 encoded -> decode it now. - fieldname = TQString::fromUtf8( - line.left( position ).stripWhiteSpace() ); - if ( linelen <= ( position + 3 ) ) { - value.resize( 0 ); - return false; - } - data = &line.data()[ position + 3 ]; - tmp.setRawData( data, linelen - position - 3 ); - KCodecs::base64Decode( tmp, value ); - tmp.resetRawData( data, linelen - position - 3 ); - return false; - } - - if ( linelen > ( position + 1 ) && line[ position + 1 ] == '<' ) { - // String is an URL. - fieldname = TQString::fromUtf8( - line.left( position ).stripWhiteSpace() ); - if ( linelen <= ( position + 3 ) ) { - value.resize( 0 ); - return false; - } - data = &line.data()[ position + 3]; - tmp.setRawData( data, linelen - position - 3 ); - value = tmp.copy(); - tmp.resetRawData( data, linelen - position - 3 ); - return true; - } - - fieldname = TQString::fromUtf8(line.left( position ).stripWhiteSpace()); - if ( linelen <= ( position + 2 ) ) { - value.resize( 0 ); - return false; - } - data = &line.data()[ position + 2 ]; - tmp.setRawData( data, linelen - position - 2 ); - value = tmp.copy(); - tmp.resetRawData( data, linelen - position - 2 ); - return false; -} - -bool LDIF::splitControl( const TQCString &line, TQString &oid, bool &critical, - TQByteArray &value ) -{ - TQString tmp; - critical = false; - bool url = splitLine( line, tmp, value ); - - kdDebug(5700) << "splitControl: value: " << TQString(TQString::fromUtf8(value, value.size())) << endl; - if ( tmp.isEmpty() ) { - tmp = TQString::fromUtf8( value, value.size() ); - value.resize( 0 ); - } - if ( tmp.right( 4 ) == "true" ) { - critical = true; - tmp.truncate( tmp.length() - 5 ); - } else if ( tmp.right( 5 ) == "false" ) { - critical = false; - tmp.truncate( tmp.length() - 6 ); - } - oid = tmp; - return url; -} - -LDIF::ParseVal LDIF::processLine() -{ - - if ( mIsComment ) return None; - - ParseVal retval = None; - if ( mLastParseVal == EndEntry ) mEntryType = Entry_None; - - mUrl = splitLine( line, mAttr, mVal ); - - TQString attrLower = mAttr.lower(); - - switch ( mEntryType ) { - case Entry_None: - if ( attrLower == "version" ) { - if ( !mDn.isEmpty() ) retval = Err; - } else if ( attrLower == "dn" ) { - kdDebug(5700) << "ldapentry dn: " << TQString(TQString::fromUtf8( mVal, mVal.size() )) << endl; - mDn = TQString::fromUtf8( mVal, mVal.size() ); - mModType = Mod_None; - retval = NewEntry; - } else if ( attrLower == "changetype" ) { - if ( mDn.isEmpty() ) - retval = Err; - else { - TQString tmpval = TQString::fromUtf8( mVal, mVal.size() ); - kdDebug(5700) << "changetype: " << tmpval << endl; - if ( tmpval == "add" ) mEntryType = Entry_Add; - else if ( tmpval == "delete" ) mEntryType = Entry_Del; - else if ( tmpval == "modrdn" || tmpval == "moddn" ) { - mNewRdn = ""; - mNewSuperior = ""; - mDelOldRdn = true; - mEntryType = Entry_Modrdn; - } - else if ( tmpval == "modify" ) mEntryType = Entry_Mod; - else retval = Err; - } - } else if ( attrLower == "control" ) { - mUrl = splitControl( TQCString( mVal, mVal.size() + 1 ), mOid, mCritical, mVal ); - retval = Control; - } else if ( !mAttr.isEmpty() && mVal.size() > 0 ) { - mEntryType = Entry_Add; - retval = Item; - } - break; - case Entry_Add: - if ( mAttr.isEmpty() && mVal.size() == 0 ) - retval = EndEntry; - else - retval = Item; - break; - case Entry_Del: - if ( mAttr.isEmpty() && mVal.size() == 0 ) - retval = EndEntry; - else - retval = Err; - break; - case Entry_Mod: - if ( mModType == Mod_None ) { - kdDebug(5700) << "tdeio_ldap: new modtype " << mAttr << endl; - if ( mAttr.isEmpty() && mVal.size() == 0 ) { - retval = EndEntry; - } else if ( attrLower == "add" ) { - mModType = Mod_Add; - } else if ( attrLower == "replace" ) { - mModType = Mod_Replace; - mAttr = TQString::fromUtf8( mVal, mVal.size() ); - mVal.resize( 0 ); - retval = Item; - } else if ( attrLower == "delete" ) { - mModType = Mod_Del; - mAttr = TQString::fromUtf8( mVal, mVal.size() ); - mVal.resize( 0 ); - retval = Item; - } else { - retval = Err; - } - } else { - if ( mAttr.isEmpty() ) { - if ( TQString::fromUtf8( mVal, mVal.size() ) == "-" ) { - mModType = Mod_None; - } else if ( mVal.size() == 0 ) { - retval = EndEntry; - } else - retval = Err; - } else - retval = Item; - } - break; - case Entry_Modrdn: - if ( mAttr.isEmpty() && mVal.size() == 0 ) - retval = EndEntry; - else if ( attrLower == "newrdn" ) - mNewRdn = TQString::fromUtf8( mVal, mVal.size() ); - else if ( attrLower == "newsuperior" ) - mNewSuperior = TQString::fromUtf8( mVal, mVal.size() ); - else if ( attrLower == "deleteoldrdn" ) { - if ( mVal.size() > 0 && mVal[0] == '0' ) - mDelOldRdn = false; - else if ( mVal.size() > 0 && mVal[0] == '1' ) - mDelOldRdn = true; - else - retval = Err; - } else - retval = Err; - break; - } - return retval; -} - -LDIF::ParseVal LDIF::nextItem() -{ - ParseVal retval = None; - char c=0; - - while( retval == None ) { - if ( mPos < mLdif.size() ) { - c = mLdif[mPos]; - mPos++; - if ( mIsNewLine && c == '\r' ) continue; //handle \n\r line end - if ( mIsNewLine && ( c == ' ' || c == '\t' ) ) { //line folding - mIsNewLine = false; - continue; - } - if ( mIsNewLine ) { - mIsNewLine = false; - retval = processLine(); - mLastParseVal = retval; - line.resize( 0 ); - mIsComment = ( c == '#' ); - } - if ( c == '\n' || c == '\r' ) { - mLineNo++; - mIsNewLine = true; - continue; - } - } else { - retval = MoreData; - break; - } - - if ( !mIsComment ) line += c; - } - return retval; -} - -void LDIF::endLDIF() -{ - TQByteArray tmp( 3 ); - tmp[ 0 ] = '\n'; - tmp[ 1 ] = '\n'; - tmp[ 2 ] = '\n'; - mLdif = tmp; - mPos = 0; -} - -void LDIF::startParsing() -{ - mPos = mLineNo = 0; - mDelOldRdn = false; - mEntryType = Entry_None; - mModType = Mod_None; - mDn = mNewRdn = mNewSuperior = ""; - line = ""; - mIsNewLine = false; - mIsComment = false; - mLastParseVal = None; -} diff --git a/kabc/ldif.h b/kabc/ldif.h deleted file mode 100644 index f4da5f4f3..000000000 --- a/kabc/ldif.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Szombathelyi Gyorgy - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef _K_LDIF_H_ -#define _K_LDIF_H_ - -#include -#include -#include - -#include - -namespace KABC { - - /** - * LDIF - - * LDIF implements an RFC 2849 compliant LDIF parser. LDIF files are used to - * represent directory information on LDAP-based servers, or to describe a set - * of changes which are to be applied to a directory. - */ - - class KABC_EXPORT LDIF - { - public: - - enum ParseVal{ None, NewEntry, EndEntry, Item, Control, Err, MoreData }; - enum EntryType{ Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn }; - enum ModType{ Mod_None, Mod_Add, Mod_Replace, Mod_Del }; - LDIF(); - virtual ~LDIF(); - - /** - * Assembles fieldname and value into a valid LDIF line, BASE64 encodes the - * value if neccessary and optionally splits into more lines. - * @param fieldname The name of the entry. - * @param value The value of the entry. - * @param linelen Maximum length of the lines in the result. - * @param url If true, encode value as url ( use :< ). - */ - static TQCString assembleLine( const TQString &fieldname, - const TQByteArray &value, uint linelen=0, bool url=false ); - /** - * This is the same as the above function, the only difference that - * this accepts TQCString as the value. - */ - static TQCString assembleLine( const TQString &fieldname, - const TQCString &value, uint linelen=0, bool url=false ); - /** - * This is the same as the above function, the only difference that - * this accepts TQString as the value. - */ - static TQCString assembleLine( const TQString &fieldname, - const TQString &value, uint linelen=0, bool url=false ); - - /** - * Splits one line from an LDIF file to attribute and value components. - * @returns true if value is an URL, false otherwise - */ - static bool splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ); - /** - * Splits a control specification (without the "control:" directive) - * @param line is the control directive - * @param oid will contain the OID - * @param critical will contain the criticality of control - * @param value is the control value - */ - static bool splitControl( const TQCString &line, TQString &oid, bool &critical, - TQByteArray &value ); - /** - * Starts the parsing of a new LDIF - */ - void startParsing(); - /** - * Process one LDIF line - */ - ParseVal processLine(); - /** - * Process the LDIF until a complete item can be returned - * @returns NewEntry if a new DN encountered, - * Item if a new item returned, - * Err if the LDIF contains error, - * EndEntry if the parser reached the end of the current entry - * and MoreData if the parser encountered the end of the current chunk of - * the LDIF. If you want to finish the parsing after receiving - * MoreData, then call endLDIF(), so the parser can safely flush - * the current entry. - */ - ParseVal nextItem(); - /** - * Sets a chunk of LDIF. Call before startParsing(), or if nextItem() returned - * MoreData. - */ - void setLDIF( const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; } - /** - * Indicates the end of the LDIF file/stream. Call if nextItem() returned - * MoreData, but actually you don't have more data. - */ - void endLDIF(); - /** - * Returns the requested LDAP operation extracted from the current entry. - */ - EntryType entryType() const { return mEntryType; } - /** - * Returns the LDAP modify request type if entryType() returned Entry_Mod. - */ - int modType() const { return mModType; } - /** - * Returns the Distinguished Name of the current entry. - */ - const TQString& dn() const { return mDn; } - /** - * Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn. - */ - const TQString& newRdn() const { return mNewRdn; } - /** - * Returns the new parent of the entry if modType() returned Entry_Modrdn. - */ - const TQString& newSuperior() const { return mNewSuperior; } - /** - * Returns if the delete of the old RDN is required. - */ - bool delOldRdn() const { return mDelOldRdn; } - /** - * Returns the attribute name. - */ - const TQString& attr() const { return mAttr; } - /** - * Returns the attribute value. - */ - const TQByteArray& val() const { return mVal; } - /** - * Returns if val() is an url - */ - bool isUrl() const { return mUrl; } - /** - * Returns the criticality level when modType() returned Control. - */ - bool critical() const { return mCritical; } - /** - * Returns the OID when modType() returned Control. - */ - const TQString& oid() const { return mOid; } - /** - * Returns the line number which the parser processes. - */ - uint lineNo() const { return mLineNo; } - private: - int mModType; - bool mDelOldRdn, mUrl; - TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid; - TQByteArray mLdif, mVal; - EntryType mEntryType; - - bool mIsNewLine, mIsComment,mCritical; - ParseVal mLastParseVal; - uint mPos,mLineNo; - TQCString line; - - class LDIFPrivate; - LDIFPrivate *d; - }; -} - -#endif diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp deleted file mode 100644 index 4bf989395..000000000 --- a/kabc/ldifconverter.cpp +++ /dev/null @@ -1,573 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Helge Deller - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -/* - Useful links: - - http://tldp.org/HOWTO/LDAP-Implementation-HOWTO/schemas.html - - http://www.faqs.org/rfcs/rfc2849.html - - Not yet handled items: - - objectclass microsoftaddressbook - - info, - - initials, - - otherfacsimiletelephonenumber, - - otherpager, - - physicaldeliveryofficename, -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include "addressee.h" -#include "address.h" - -#include "ldif.h" -#include "ldifconverter.h" -#include "vcardconverter.h" - -using namespace KABC; - -/* generate LDIF stream */ - -bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, TQString &str ) -{ - AddresseeList::ConstIterator it; - for ( it = addrList.begin(); it != addrList.end(); ++it ) { - addresseeToLDIF( *it, str ); - } - return true; -} - - - -static void ldif_out( TQTextStream &t, TQString formatStr, TQString value ) -{ - if ( value.isEmpty() ) - return; - - TQCString txt = LDIF::assembleLine( formatStr, value, 72 ); - - // write the string - t << TQString::fromUtf8(txt) << "\n"; -} - -bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str ) -{ - if ( addr.isEmpty() ) - return false; - - TQTextStream t( str, IO_WriteOnly|IO_Append ); - t.setEncoding( TQTextStream::UnicodeUTF8 ); - - const Address homeAddr = addr.address( Address::Home ); - const Address workAddr = addr.address( Address::Work ); - - ldif_out( t, "dn", TQString( "cn=%1,mail=%2" ) - .arg( TQString(addr.formattedName()).simplifyWhiteSpace() ) - .arg( addr.preferredEmail() ) ); - ldif_out( t, "givenname", addr.givenName() ); - ldif_out( t, "sn", addr.familyName() ); - ldif_out( t, "cn", TQString(addr.formattedName()).simplifyWhiteSpace() ); - ldif_out( t, "uid", addr.uid() ); - ldif_out( t, "nickname", addr.nickName() ); - ldif_out( t, "xmozillanickname", addr.nickName() ); - - ldif_out( t, "mail", addr.preferredEmail() ); - if ( addr.emails().count() > 1 ) - ldif_out( t, "mozillasecondemail", addr.emails()[ 1 ] ); -//ldif_out( t, "mozilla_AIMScreenName: %1\n", "screen_name" ); - - ldif_out( t, "telephonenumber", addr.phoneNumber( PhoneNumber::Work ).number() ); - ldif_out( t, "facsimiletelephonenumber", addr.phoneNumber( PhoneNumber::Fax ).number() ); - ldif_out( t, "homephone", addr.phoneNumber( PhoneNumber::Home ).number() ); - ldif_out( t, "mobile", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 7 - ldif_out( t, "cellphone", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 4.x - ldif_out( t, "pager", addr.phoneNumber( PhoneNumber::Pager ).number() ); - ldif_out( t, "pagerphone", addr.phoneNumber( PhoneNumber::Pager ).number() ); - - ldif_out( t, "streethomeaddress", homeAddr.street() ); - ldif_out( t, "postalcode", workAddr.postalCode() ); - ldif_out( t, "postofficebox", workAddr.postOfficeBox() ); - - TQStringList streets = TQStringList::split( '\n', homeAddr.street() ); - if ( streets.count() > 0 ) - ldif_out( t, "homepostaladdress", streets[ 0 ] ); // Netscape 7 - if ( streets.count() > 1 ) - ldif_out( t, "mozillahomepostaladdress2", streets[ 1 ] ); // Netscape 7 - ldif_out( t, "mozillahomelocalityname", homeAddr.locality() ); // Netscape 7 - ldif_out( t, "mozillahomestate", homeAddr.region() ); - ldif_out( t, "mozillahomepostalcode", homeAddr.postalCode() ); - ldif_out( t, "mozillahomecountryname", Address::ISOtoCountry(homeAddr.country()) ); - ldif_out( t, "locality", workAddr.locality() ); - ldif_out( t, "streetaddress", workAddr.street() ); // Netscape 4.x - - streets = TQStringList::split( '\n', workAddr.street() ); - if ( streets.count() > 0 ) - ldif_out( t, "postaladdress", streets[ 0 ] ); - if ( streets.count() > 1 ) - ldif_out( t, "mozillapostaladdress2", streets[ 1 ] ); - ldif_out( t, "countryname", Address::ISOtoCountry(workAddr.country()) ); - ldif_out( t, "l", workAddr.locality() ); - ldif_out( t, "c", Address::ISOtoCountry(workAddr.country()) ); - ldif_out( t, "st", workAddr.region() ); - - ldif_out( t, "title", addr.title() ); - ldif_out( t, "vocation", addr.prefix() ); - ldif_out( t, "ou", addr.role() ); - ldif_out( t, "o", addr.organization() ); - ldif_out( t, "organization", addr.organization() ); - ldif_out( t, "organizationname", addr.organization() ); - - // Compatibility with older kabc versions. - if ( !addr.department().isEmpty() ) - ldif_out( t, "department", addr.department() ); - else - ldif_out( t, "department", addr.custom("KADDRESSBOOK", "X-Department") ); - - ldif_out( t, "workurl", addr.url().prettyURL() ); - ldif_out( t, "homeurl", addr.url().prettyURL() ); - ldif_out( t, "description", addr.note() ); - if (addr.revision().isValid()) - ldif_out(t, "modifytimestamp", dateToVCardString( TQT_TQDATETIME_OBJECT(addr.revision())) ); - - t << "objectclass: top\n"; - t << "objectclass: person\n"; - t << "objectclass: organizationalPerson\n"; - - t << "\n"; - - return true; -} - - -/* convert from LDIF stream */ - -bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt ) -{ - if (str.isEmpty()) - return true; - - bool endldif = false, end = false; - LDIF ldif; - LDIF::ParseVal ret; - const char *latinstr = str.latin1(); - int latinstrlen = tqstrlen( latinstr ); - TQByteArray data; - Addressee a; - Address homeAddr, workAddr; - - data.setRawData( latinstr, latinstrlen ); - ldif.setLDIF( data ); - if (!dt.isValid()) - dt = TQDateTime::currentDateTime(); - a.setRevision(dt); - homeAddr = Address( Address::Home ); - workAddr = Address( Address::Work ); - - do { - ret = ldif.nextItem(); - switch ( ret ) { - case LDIF::Item: { - TQString fieldname = ldif.attr().lower(); - TQString value = TQString::fromUtf8( ldif.val(), ldif.val().size() ); - evaluatePair( a, homeAddr, workAddr, fieldname, value ); - break; - } - case LDIF::EndEntry: - // if the new address is not empty, append it - if ( !a.formattedName().isEmpty() || !a.name().isEmpty() || - !a.familyName().isEmpty() ) { - if ( !homeAddr.isEmpty() ) - a.insertAddress( homeAddr ); - if ( !workAddr.isEmpty() ) - a.insertAddress( workAddr ); - addrList.append( a ); - } - a = Addressee(); - a.setRevision(dt); - homeAddr = Address( Address::Home ); - workAddr = Address( Address::Work ); - break; - case LDIF::MoreData: { - if ( endldif ) - end = true; - else { - ldif.endLDIF(); - endldif = true; - break; - } - } - default: - break; - } - } while ( !end ); - - data.resetRawData( latinstr, latinstrlen ); - - return true; -} - -bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, - Address &workAddr, - TQString &fieldname, TQString &value ) -{ - if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! - return false; - - if ( fieldname.startsWith("#") ) { - return true; - } - - if ( fieldname.isEmpty() && !a.note().isEmpty() ) { - // some LDIF export filters are borken and add additional - // comments on stand-alone lines. Just add them to the notes for now. - a.setNote( a.note() + "\n" + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "givenname" ) ) { - a.setGivenName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "xmozillanickname") || - fieldname == TQString::fromLatin1( "nickname") ) { - a.setNickName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "sn" ) ) { - a.setFamilyName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "uid" ) ) { - a.setUid( value ); - return true; - } - if ( fieldname == TQString::fromLatin1( "mail" ) || - fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla - if ( a.emails().findIndex( value ) == -1 ) - a.insertEmail( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "title" ) ) { - a.setTitle( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "vocation" ) ) { - a.setPrefix( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "cn" ) ) { - a.setFormattedName( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "o" ) || - fieldname == TQString::fromLatin1( "organization" ) || // Exchange - fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange - a.setOrganization( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "description" ) ) { -addComment: - if ( !a.note().isEmpty() ) - a.setNote( a.note() + "\n" ); - a.setNote( a.note() + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "custom1" ) || - fieldname == TQString::fromLatin1( "custom2" ) || - fieldname == TQString::fromLatin1( "custom3" ) || - fieldname == TQString::fromLatin1( "custom4" ) ) { - goto addComment; - } - - if ( fieldname == TQString::fromLatin1( "homeurl" ) || - fieldname == TQString::fromLatin1( "workurl" ) ) { - if (a.url().isEmpty()) { - a.setUrl( KURL( value ) ); - return true; - } - if ( a.url().prettyURL() == KURL(value).prettyURL() ) - return true; - // TODO: current version of kabc only supports one URL. - // TODO: change this with KDE 4 - } - - if ( fieldname == TQString::fromLatin1( "homephone" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla - fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla - a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "street" ) || - fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { - homeAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla - workAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla - workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { - workAddr.setPostalCode( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { - workAddr.setPostOfficeBox( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 - homeAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla - homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla - homeAddr.setLocality( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla - homeAddr.setRegion( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla - homeAddr.setPostalCode( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla - if ( value.length() <= 2 ) - value = Address::ISOtoCountry(value); - homeAddr.setCountry( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "locality" ) ) { - workAddr.setLocality( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x - workAddr.setStreet( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "countryname" ) || - fieldname == TQString::fromLatin1( "c" ) ) { // mozilla - if ( value.length() <= 2 ) - value = Address::ISOtoCountry(value); - workAddr.setCountry( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla - workAddr.setLocality( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "st" ) ) { - workAddr.setRegion( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "ou" ) ) { - a.setRole( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "department" ) ) { - a.setDepartment( value ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "member" ) ) { - // this is a mozilla list member (cn=xxx, mail=yyy) - TQStringList list( TQStringList::split( ',', value ) ); - TQString name, email; - - TQStringList::Iterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( (*it).startsWith( "cn=" ) ) - name = (*it).mid( 3 ).stripWhiteSpace(); - if ( (*it).startsWith( "mail=" ) ) - email = (*it).mid( 5 ).stripWhiteSpace(); - } - if ( !name.isEmpty() && !email.isEmpty() ) - email = " <" + email + ">"; - a.insertEmail( name + email ); - a.insertCategory( i18n( "List of Emails" ) ); - return true; - } - - if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { - if (value == TQString::fromLatin1("0Z")) // ignore - return true; - TQDateTime dt = VCardStringToDate( value ); - if ( dt.isValid() ) { - a.setRevision(dt); - return true; - } - } - - if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore - return true; - - kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") - .arg(a.formattedName()).arg(fieldname).arg(value)); - - return true; -} - -/* The following functions are obsoleted. Similar functionality can be found - * in the LDIF class */ - -bool LDIFConverter::parseSingleLine( Addressee &a, Address &homeAddr, - Address &workAddr, TQString &line ) -{ - if ( line.isEmpty() ) - return true; - - TQString fieldname, value; - TQByteArray val; - - LDIF::splitLine( line.latin1(), fieldname, val ); - value = TQString::fromUtf8( val.data(), val.size() ); - return evaluatePair( a, homeAddr, workAddr, fieldname, value); -} - - -bool LDIFConverter::splitLine( TQString &line, TQString &fieldname, TQString &value) -{ - TQByteArray val; - bool ret = LDIF::splitLine( line.latin1(), fieldname, val ); - value = TQString::fromUtf8( val.data(), val.size() ); - return ret; -} - - -TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, bool allowEncode ) -{ - if ( value.isEmpty() ) - return TQString(); - - // append format if not given - if (formatStr.find(':') == -1) - formatStr.append(": %1\n"); - - // check if base64-encoding is needed - bool printable = true; - unsigned int i, len; - len = value.length(); - for (i = 0; i=0) - formatStr.insert(p, ':'); - } - - // generate the new string and split it to 72 chars/line - TQCString txt = TQString(formatStr.arg(value)).utf8(); - - if (allowEncode) { - len = txt.length(); - if (len && txt[len-1] == '\n') - --len; - i = 72; - while (i < len) { - txt.insert(i, "\n "); - i += 72+1; - len += 2; - } - } - - return TQString::fromUtf8(txt); -} - diff --git a/kabc/ldifconverter.h b/kabc/ldifconverter.h deleted file mode 100644 index a8052a65f..000000000 --- a/kabc/ldifconverter.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Helge Deller - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 only as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_LDIFCONVERTER_H -#define KABC_LDIFCONVERTER_H - -#include -#include - -#include "addressee.h" -#include "addresseelist.h" - -namespace KABC { - - /** - * A set of functions to convert a string with LDIF information to addressees - * and vice versa. It is useful for addressbook import- and exportfilters - * and might be used to read and write Mozilla and Netscape addresssbooks. - */ - - namespace LDIFConverter { - - /** - * Converts a LDIF string to a list of addressees. - * - * @param str The vcard string. - * @param addrList The addresseelist. - * @param dt The date & time value of the last modification (e.g. file modification time). - * @since 3.2 - */ - KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); - - /** - * Converts a list of addressees to a LDIF string. - * - * @param addrList The addresseelist. - * @param str The LDIF string. - * @since 3.2 - */ - KABC_EXPORT bool addresseeToLDIF( const AddresseeList &addrList, TQString &str ); - - /** - * Converts an addressee to a LDIF string. - * - * @param addr The addressee. - * @param str The LDIF string. - * @since 3.2 - */ - KABC_EXPORT bool addresseeToLDIF( const Addressee &addr, TQString &str ); - - /** - * @deprecated - * Obsoleted - please use LDIF::assembleLine() - * Returns a LDIF compatible string representing a given field/value pair. - * If necessary, the value parameter will be base64encoded and split into multiple. - * This function will return an empty string if the given value is empty. - * - * @param field The LDAP field name or a complete LDIF field string (e.g. "cn" or "cn = %1\n"). - * @param value The value for this field. - * @param allowEncode Set to false if you wish no encoding of the value. - * @since 3.2 - */ - KABC_EXPORT TQString makeLDIFfieldString( TQString field, TQString value, bool allowEncode = true ) KDE_DEPRECATED; - - - - /* internal functions - do not use !! */ - - /** No need for this function anymore - use LDIF::splitLine() + evaluatePair() */ - KABC_EXPORT bool parseSingleLine( Addressee &a, - Address &homeAddr, Address &workAddr, TQString &line ); - - /** No need for this function anymore - use LDIF::splitLine() */ - KABC_EXPORT bool splitLine( TQString &line, TQString &fieldname, TQString &value); - - - KABC_EXPORT bool evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, - TQString &fieldname, TQString &value ); - - } - -} -#endif - diff --git a/kabc/lock.cpp b/kabc/lock.cpp deleted file mode 100644 index 8f64a3c23..000000000 --- a/kabc/lock.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001,2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "lock.h" - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -using namespace KABC; - -Lock::Lock( const TQString &identifier ) - : mIdentifier( identifier ) -{ - mIdentifier.replace( "/", "_" ); -} - -Lock::~Lock() -{ - unlock(); -} - -TQString Lock::locksDir() -{ - return locateLocal( "data", "kabc/lock/" ); -} - -bool Lock::readLockFile( const TQString &filename, int &pid, TQString &app ) -{ - TQFile file( filename ); - if ( !file.open( IO_ReadOnly ) ) return false; - - TQTextStream t( &file ); - pid = t.readLine().toInt(); - app = t.readLine(); - - return true; -} - -bool Lock::writeLockFile( const TQString &filename ) -{ - TQFile file( filename ); - if ( !file.open( IO_WriteOnly ) ) return false; - TQTextStream t( &file ); - t << ::getpid() << endl << TQString( TDEGlobal::instance()->instanceName() ); - - return true; -} - -TQString Lock::lockFileName() const -{ - return locksDir() + mIdentifier + ".lock"; -} - -bool Lock::lock() -{ - kdDebug(5700) << "Lock::lock()" << endl; - - TQString lockName = lockFileName(); - kdDebug(5700) << "-- lock name: " << lockName << endl; - - if ( TQFile::exists( lockName ) ) { // check if it is a stale lock file - int pid; - TQString app; - - if ( !readLockFile( lockFileName(), pid, app ) ) { - mError = i18n("Unable to open lock file."); - return false; - } - - int retval = ::kill( pid, 0 ); - if ( retval == -1 && errno == ESRCH ) { // process doesn't exists anymore - TQFile::remove( lockName ); - kdWarning(5700) << "Removed stale lock file from process '" << app << "'" - << endl; - } else { - TQString identifier( mIdentifier ); - identifier.replace( '_', '/' ); - - mError = i18n("The address book '%1' is locked by application '%2'.\nIf you believe this is incorrect, just remove the lock file from '%3'") - .arg( identifier ).arg( app ).arg( locateLocal( "data", "kabc/lock/*.lock" ) ); - return false; - } - } - - TQString lockUniqueName; - lockUniqueName = mIdentifier + kapp->randomString( 8 ); - mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); - kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; - - // Create unique file - writeLockFile( mLockUniqueName ); - - // Create lock file - int result = ::link( TQFile::encodeName( mLockUniqueName ), - TQFile::encodeName( lockName ) ); - - if ( result == 0 ) { - mError = ""; - emit locked(); - return true; - } - - // TODO: check stat - - mError = i18n("Error"); - return false; -} - -bool Lock::unlock() -{ - int pid; - TQString app; - if ( readLockFile( lockFileName(), pid, app ) ) { - if ( pid == getpid() ) { - TQFile::remove( lockFileName() ); - TQFile::remove( mLockUniqueName ); - emit unlocked(); - } else { - mError = i18n("Unlock failed. Lock file is owned by other process: %1 (%2)") - .arg( app ).arg( TQString::number( pid ) ); - kdDebug() << "Lock::unlock(): " << mError << endl; - return false; - } - } - - mError = ""; - return true; -} - -TQString Lock::error() const -{ - return mError; -} - -#include "lock.moc" diff --git a/kabc/lock.h b/kabc/lock.h deleted file mode 100644 index addc2032f..000000000 --- a/kabc/lock.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2001,2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_LOCK_H -#define KABC_LOCK_H - -#include -#include - -#include - -namespace KABC { - -/** - This class provides locking functionality for a file, directory or an - arbitrary string-represented resource. -*/ -class KABC_EXPORT Lock : public TQObject -{ - Q_OBJECT - public: - /** - Constructor. - - @param identifier An identifier for the resource to be locked, e.g. a file - name. - */ - Lock( const TQString &identifier ); - - /** - Destruct lock object. This also removes the lock on the resource. - */ - ~Lock(); - - /** - Lock resource. - */ - virtual bool lock(); - - /** - Unlock resource. - */ - virtual bool unlock(); - - virtual TQString error() const; - - TQString lockFileName() const; - - static bool readLockFile( const TQString &filename, int &pid, TQString &app ); - static bool writeLockFile( const TQString &filename ); - - static TQString locksDir(); - - signals: - void locked(); - void unlocked(); - - private: - TQString mIdentifier; - - TQString mLockUniqueName; - - TQString mError; - - class Private; - Private *d; -}; - -} - -#endif diff --git a/kabc/locknull.cpp b/kabc/locknull.cpp deleted file mode 100644 index 234c2c214..000000000 --- a/kabc/locknull.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "locknull.h" - -#include -#include - -using namespace KABC; - -LockNull::LockNull( bool allowAccess ) - : Lock( TQString::null ), mAllowAccess( allowAccess ) -{ -} - -LockNull::~LockNull() -{ - unlock(); -} - -bool LockNull::lock() -{ - if ( !mAllowAccess ) return false; - - kdWarning() << "LockNull::lock() force success. Doesn't actually lock." - << endl; - - emit locked(); - - return true; -} - -bool LockNull::unlock() -{ - emit unlocked(); - return true; -} - -TQString LockNull::error() const -{ - if ( mAllowAccess ) - return i18n("LockNull: All locks succeed but no actual locking is done."); - else - return i18n("LockNull: All locks fail."); -} diff --git a/kabc/locknull.h b/kabc/locknull.h deleted file mode 100644 index dfefe122a..000000000 --- a/kabc/locknull.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_LOCKNULL_H -#define KABC_LOCKNULL_H - -#include - -#include "lock.h" - -namespace KABC { - -/** - This class provides a lock without actually locking. It can be constructed in - two ways: One that let all locks succeed and one that let all locks fail. -*/ -class KABC_EXPORT LockNull : public Lock -{ - public: - LockNull( bool allowAccess ); - ~LockNull(); - - bool lock(); - bool unlock(); - - TQString error() const; - - private: - bool mAllowAccess; - - class Private; - Private *d; -}; - -} - -#endif diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp deleted file mode 100644 index adf8566f1..000000000 --- a/kabc/phonenumber.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "phonenumber.h" - -using namespace KABC; - -PhoneNumber::PhoneNumber() : - mType( Home ) -{ - init(); -} - -PhoneNumber::PhoneNumber( const TQString &number, int type ) : - mType( type ) -{ - init(); - - validateNumber( number ); -} - -PhoneNumber::~PhoneNumber() -{ -} - -void PhoneNumber::init() -{ - mId = TDEApplication::randomString( 8 ); -} - -void PhoneNumber::validateNumber( const TQString &number ) -{ - mNumber = number; - - // remove line breaks - mNumber = mNumber.replace( '\n', "" ); - mNumber = mNumber.replace( '\r', "" ); -} - -bool PhoneNumber::operator==( const PhoneNumber &p ) const -{ - if ( mNumber != p.mNumber ) return false; - if ( mType != p.mType ) return false; - - return true; -} - -bool PhoneNumber::operator!=( const PhoneNumber &p ) const -{ - return !( p == *this ); -} - -void PhoneNumber::setId( const TQString &id ) -{ - mId = id; -} - -TQString PhoneNumber::id() const -{ - return mId; -} - -void PhoneNumber::setNumber( const TQString &number ) -{ - validateNumber( number ); -} - -TQString PhoneNumber::number() const -{ - return mNumber; -} - -void PhoneNumber::setType( int type ) -{ - mType = type; -} - -int PhoneNumber::type() const -{ - return mType; -} - -TQString PhoneNumber::typeLabel() const -{ - TQString label; - bool first = true; - - const TypeList list = typeList(); - - TypeList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) { - if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { - label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); - if ( first ) - first = false; - } - } - - return label; -} - -TQString PhoneNumber::label() const -{ - return typeLabel( type() ); -} - -PhoneNumber::TypeList PhoneNumber::typeList() -{ - static TypeList list; - - if ( list.isEmpty() ) { - list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video - << Bbs << Modem << Car << Isdn << Pcs << Pager; - } - - return list; -} - -TQString PhoneNumber::label( int type ) -{ - return typeLabel( type ); -} - -TQString PhoneNumber::typeLabel( int type ) -{ - if ( type & Pref ) - return i18n( "Preferred phone", "Preferred" ); - - switch ( type ) { - case Home: - return i18n("Home phone", "Home"); - break; - case Work: - return i18n("Work phone", "Work"); - break; - case Msg: - return i18n("Messenger"); - break; - case Pref: - return i18n("Preferred Number"); - break; - case Voice: - return i18n("Voice"); - break; - case Fax: - return i18n("Fax"); - break; - case Cell: - return i18n("Mobile Phone", "Mobile" ); - break; - case Video: - return i18n("Video"); - break; - case Bbs: - return i18n("Mailbox"); - break; - case Modem: - return i18n("Modem"); - break; - case Car: - return i18n("Car Phone", "Car" ); - break; - case Isdn: - return i18n("ISDN"); - break; - case Pcs: - return i18n("PCS"); - break; - case Pager: - return i18n("Pager"); - break; - case Home | Fax: - return i18n("Home Fax"); - break; - case Work | Fax: - return i18n("Work Fax"); - break; - default: - return i18n("Other"); - } -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const PhoneNumber &phone ) -{ - return s << phone.mId << phone.mType << phone.mNumber; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, PhoneNumber &phone ) -{ - s >> phone.mId >> phone.mType >> phone.mNumber; - - return s; -} diff --git a/kabc/phonenumber.h b/kabc/phonenumber.h deleted file mode 100644 index 3e6ae0941..000000000 --- a/kabc/phonenumber.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_PHONENUMBER_H -#define KABC_PHONENUMBER_H - -#include -#include - -#include - -namespace KABC { - -/** - @short Phonenumber information. - - This class provides phone number information. A phone number is classified by - a type. The following types are available, it's possible to use multiple types - Types for a number by combining them through a logical or. -*/ -class KABC_EXPORT PhoneNumber -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); - - public: - typedef TQValueList List; - typedef TQValueList TypeList; - - /** - @li @p Home - Home number - @li @p Work - Office number - @li @p Msg - Messaging - @li @p Pref - Preferred number - @li @p Voice - Voice - @li @p Fax - Fax machine - @li @p Cell - Cell phone - @li @p Video - Video phone - @li @p Bbs - Mailbox - @li @p Modem - Modem - @li @p Car - Car phone - @li @p Isdn - ISDN connection - @li @p Pcs - Personal Communication Service - @li @p Pager - Pager - */ - enum Types { Home = 1, Work = 2, Msg = 4, Pref = 8, Voice = 16, Fax = 32, - Cell = 64, Video = 128, Bbs = 256, Modem = 512, Car = 1024, - Isdn = 2048, Pcs = 4096, Pager = 8192 }; - - /** - Create an empty phone number object. - */ - PhoneNumber(); - - /** - Create a phonenumber object. - - @param number Number - @param type Type as defined in enum. Multiple types can be - specified by combining them by a logical or. - */ - PhoneNumber( const TQString &number, int type = Home ); - - /** - Destructor. - */ - ~PhoneNumber(); - - bool operator==( const PhoneNumber & ) const; - bool operator!=( const PhoneNumber & ) const; - - /** - Sets the unique identifier. - */ - void setId( const TQString &id ); - - /** - Returns the unique identifier. - */ - TQString id() const; - - /** - Sets the number. - */ - void setNumber( const TQString & ); - - /** - Returns the number. - */ - TQString number() const; - - /** - Sets the type. Multiple types can be specified by combining them by - a logical or. - */ - void setType( int ); - - /** - Returns the type. Can be a multiple types combined by a logical or. - */ - int type() const; - - /** - Returns a translated string of all types the address has. - */ - TQString typeLabel() const; - - /** - Returns the translated label for phone number depending on its type. - */ - TQString label() const; - - /** - Returns a list of all available types - */ - static TypeList typeList(); - - /** - Returns the translated label for phone number type. - */ - static TQString typeLabel( int type ); - - /** - Returns the translated label for phone number type. - @obsolete - */ - static TQString label( int type ); - - private: - void init(); - void validateNumber( const TQString& ); - - TQString mId; - - int mType; - TQString mNumber; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); - -} - -#endif diff --git a/kabc/picture.cpp b/kabc/picture.cpp deleted file mode 100644 index 4ddd3f537..000000000 --- a/kabc/picture.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "picture.h" - -using namespace KABC; - -Picture::Picture() - : mIntern( false ) -{ -} - -Picture::Picture( const TQString &url ) - : mUrl( url ), mIntern( false ) -{ -} - -Picture::Picture( const TQImage &data ) - : mData( data ), mIntern( true ) -{ -} - -Picture::~Picture() -{ -} - -bool Picture::operator==( const Picture &p ) const -{ - if ( mIntern != p.mIntern ) return false; - - if ( mIntern ) { - if ( mData != p.mData ) - return false; - } else { - if ( mUrl != p.mUrl ) - return false; - } - - return true; -} - -bool Picture::operator!=( const Picture &p ) const -{ - return !( p == *this ); -} - -void Picture::setUrl( const TQString &url ) -{ - mUrl = url; - mIntern = false; -} - -void Picture::setData( const TQImage &data ) -{ - mData = data; - mIntern = true; -} - -void Picture::setType( const TQString &type ) -{ - mType = type; -} - -bool Picture::isIntern() const -{ - return mIntern; -} - -TQString Picture::url() const -{ - return mUrl; -} - -TQImage Picture::data() const -{ - return mData; -} - -TQString Picture::type() const -{ - return mType; -} - -TQString Picture::asString() const -{ - if ( mIntern ) - return "intern picture"; - else - return mUrl; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Picture &picture ) -{ - return s << picture.mIntern << picture.mUrl << picture.mType; -// return s << picture.mIntern << picture.mUrl << picture.mType << picture.mData; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Picture &picture ) -{ - s >> picture.mIntern >> picture.mUrl >> picture.mType; -// s >> picture.mIntern >> picture.mUrl >> picture.mType >> picture.mData; - return s; -} diff --git a/kabc/picture.h b/kabc/picture.h deleted file mode 100644 index e6ed690c2..000000000 --- a/kabc/picture.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_PICTURE_H -#define KABC_PICTURE_H - -#include - -#include - -namespace KABC { - -class KABC_EXPORT Picture -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); - -public: - - /** - * Consturctor. Creates an empty object. - */ - Picture(); - - /** - * Consturctor. - * - * @param url A URL that describes the position of the picture file. - */ - Picture( const TQString &url ); - - /** - * Consturctor. - * - * @param data The raw data of the picture. - */ - Picture( const TQImage &data ); - - /** - * Destructor. - */ - ~Picture(); - - - bool operator==( const Picture & ) const; - bool operator!=( const Picture & ) const; - - /** - * Sets a URL for the location of the picture file. When using this - * function, isIntern() will return 'false' until you use - * setData(). - * - * @param url The location URL of the picture file. - */ - void setUrl( const TQString &url ); - - /** - * Sets the raw data of the picture. When using this function, - * isIntern() will return 'true' until you use setUrl(). - * - * @param data The raw data of the picture. - */ - void setData( const TQImage &data ); - - /** - * Sets the type of the picture. - */ - void setType( const TQString &type ); - - /** - * Returns whether the picture is described by a URL (extern) or - * by the raw data (intern). - * When this method returns 'true' you can use data() to - * get the raw data. Otherwise you can request the URL of this - * picture by url() and load the raw data from that location. - */ - bool isIntern() const; - - /** - * Returns the location URL of this picture. - */ - TQString url() const; - - /** - * Returns the raw data of this picture. - */ - TQImage data() const; - - /** - * Returns the type of this picture. - */ - TQString type() const; - - /** - * Returns string representation of the picture. - */ - TQString asString() const; - -private: - TQString mUrl; - TQString mType; - TQImage mData; - - int mIntern; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); - -} -#endif diff --git a/kabc/plugin.cpp b/kabc/plugin.cpp deleted file mode 100644 index a53192559..000000000 --- a/kabc/plugin.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "plugin.h" - -using namespace KABC; - -Plugin::Plugin() -{ -} - -Plugin::~Plugin() -{ -} - -void Plugin::setType( const TQString& type ) -{ - mType = type; -} - -TQString Plugin::type() const -{ - return mType; -} - -void Plugin::setNameLabel( const TQString& label ) -{ - mNameLabel = label; -} - -TQString Plugin::nameLabel() const -{ - return mNameLabel; -} - -void Plugin::setDescriptionLabel( const TQString& label ) -{ - mDescriptionLabel = label; -} - -TQString Plugin::descriptionLabel() const -{ - return mDescriptionLabel; -} diff --git a/kabc/plugin.h b/kabc/plugin.h deleted file mode 100644 index 0c8e3b338..000000000 --- a/kabc/plugin.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_PLUGIN_H -#define KABC_PLUGIN_H - -#include - -#include - -namespace KABC { - -class KABC_EXPORT Plugin -{ -public: - Plugin(); - virtual ~Plugin(); - - virtual void setType( const TQString& type ); - virtual TQString type() const; - - virtual void setNameLabel( const TQString& label ); - virtual TQString nameLabel() const; - - virtual void setDescriptionLabel( const TQString& label ); - virtual TQString descriptionLabel() const; - -private: - TQString mType; - TQString mNameLabel; - TQString mDescriptionLabel; -}; - -} -#endif diff --git a/kabc/plugins/CMakeLists.txt b/kabc/plugins/CMakeLists.txt deleted file mode 100644 index 597486816..000000000 --- a/kabc/plugins/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( file ) -add_subdirectory( dir ) -add_subdirectory( net ) -add_subdirectory( ldaptdeio ) diff --git a/kabc/plugins/Makefile.am b/kabc/plugins/Makefile.am deleted file mode 100644 index bdedbec0f..000000000 --- a/kabc/plugins/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = file dir net ldaptdeio diff --git a/kabc/plugins/dir/CMakeLists.txt b/kabc/plugins/dir/CMakeLists.txt deleted file mode 100644 index 737d1144e..000000000 --- a/kabc/plugins/dir/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourcedir.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES dir.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_dir (library) ######################## - -set( target kabc_dir ) - -set( ${target}_SRCS - resourcedir.cpp resourcedirconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_dir (module) ######################### - -set( target kabc_dir ) - -set( ${target}_SRCS - resourcedirplugin.cpp -) - -tde_add_kpart( ${target} - SOURCES ${${target}_SRCS} - LINK kabc_dir-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/dir/Makefile.am b/kabc/plugins/dir/Makefile.am deleted file mode 100644 index 4b61d2828..000000000 --- a/kabc/plugins/dir/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_builddir) $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcedirconfig.h - -lib_LTLIBRARIES = libkabc_dir.la -libkabc_dir_la_SOURCES = resourcedir.cpp resourcedirconfig.cpp -libkabc_dir_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_dir_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDECORE) $(LIB_TDEFILE) $(LIB_TDEUI) -libkabc_dir_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -kde_module_LTLIBRARIES = kabc_dir.la -kabc_dir_la_SOURCES = resourcedirplugin.cpp -kabc_dir_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -kabc_dir_la_LIBADD = libkabc_dir.la $(LIB_QT) $(LIB_TDECORE) - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_dir.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourcedir.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = dir.desktop - -resourcedirplugin.lo: ../../addressee.h diff --git a/kabc/plugins/dir/dir.desktop b/kabc/plugins/dir/dir.desktop deleted file mode 100644 index a841040f9..000000000 --- a/kabc/plugins/dir/dir.desktop +++ /dev/null @@ -1,92 +0,0 @@ -[Desktop Entry] -Name=Directory -Name[af]=Gids -Name[ar]=دليل -Name[az]=CÉ™rgÉ™ -Name[be]=ТÑчка -Name[bn]=ডিরেকà§à¦Ÿà¦°à¦¿ -Name[br]=Renkell -Name[bs]=Direktorij -Name[ca]=Directori -Name[cs]=Adresář -Name[csb]=Katalog -Name[cy]=Cyfeiriadur -Name[da]=Mappe -Name[de]=Verzeichnis -Name[el]=Κατάλογος -Name[eo]=Dosierujo -Name[es]=Directorio -Name[et]=Kataloog -Name[eu]=Direktorioa -Name[fa]=Ùهرست راهنما -Name[fi]=Hakemisto -Name[fo]=Fíluskrá -Name[fr]=Dossier -Name[fy]=Map -Name[ga]=Comhadlann -Name[gl]=Directório -Name[he]=ספריה -Name[hi]=डिरेकà¥à¤Ÿà¥à¤°à¥€ -Name[hr]=Mapa -Name[hsb]=Zapisk -Name[hu]=Könyvtár -Name[id]=Direktori -Name[is]=Mappa -Name[it]=Cartella -Name[ja]=ディレクトリ -Name[ka]=დáƒáƒ¡áƒ¢áƒ -Name[kk]=Каталог -Name[km]=ážáž -Name[ko]=ìžë£Œë°© -Name[ku]=Peldank -Name[lb]=Verzeechnis -Name[lt]=Aplankas -Name[lv]=Direktorija -Name[mk]=Именик -Name[mn]=Лавлах -Name[ms]=Direktori -Name[mt]=Direttorju -Name[nb]=Katalog -Name[nds]=Orner -Name[ne]=डाइरेकà¥à¤Ÿà¤°à¥€ -Name[nl]=Map -Name[nn]=Katalog -Name[nso]=Tshupetso -Name[oc]=Directori -Name[pa]=ਡਾਇਰੈਕਟਰੀ -Name[pl]=Katalog -Name[pt]=Directoria -Name[pt_BR]=Diretório -Name[ro]=Director -Name[ru]=Каталог -Name[rw]=ububiko -Name[se]=Ohcu -Name[sk]=PrieÄinok -Name[sl]=Imenik -Name[sq]=Fioka -Name[sr]=ФаÑцикла -Name[sr@Latn]=Fascikla -Name[ss]=I-directory -Name[sv]=Katalog -Name[ta]=அடைவ௠-Name[te]=డైరకà±à°Ÿà°°à°¿ -Name[tg]=ФеҳраÑÑ‚ -Name[th]=ไดเรà¸à¸—อรี -Name[tr]=Dizin -Name[tt]=Törgäk -Name[uk]=Каталог -Name[uz]=Jild -Name[uz@cyrillic]=Жилд -Name[ven]=Tsumbavhulwo -Name[vi]=Thư mục -Name[wa]=Ridant -Name[xh]=Ulawulo -Name[zh_CN]=目录 -Name[zh_HK]=目錄 -Name[zh_TW]=目錄 -Name[zu]=Uhlu lwamafayela -X-TDE-Library=kabc_dir -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=dir diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp deleted file mode 100644 index 936eea6e4..000000000 --- a/kabc/plugins/dir/resourcedir.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "formatfactory.h" -#include "resourcedirconfig.h" -#include "stdaddressbook.h" -#include "lock.h" - -#include "resourcedir.h" - -using namespace KABC; - -extern "C" -{ - void *init_kabc_dir() - { - return new KRES::PluginFactory(); - } -} - - -ResourceDir::ResourceDir( const TDEConfig *config ) - : Resource( config ), mAsynchronous( false ) -{ - if ( config ) { - init( config->readPathEntry( "FilePath", StdAddressBook::directoryName() ), - config->readEntry( "FileFormat", "vcard" ) ); - } else { - init( StdAddressBook::directoryName(), "vcard" ); - } -} - -ResourceDir::ResourceDir( const TQString &path, const TQString &format ) - : Resource( 0 ), mAsynchronous( false ) -{ - init( path, format ); -} - -void ResourceDir::init( const TQString &path, const TQString &format ) -{ - mFormatName = format; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); - - if ( !mFormat ) { - mFormatName = "vcard"; - mFormat = factory->format( mFormatName ); - } - - mLock = 0; - - connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) ); - - setPath( path ); -} - -ResourceDir::~ResourceDir() -{ - delete mFormat; - mFormat = 0; -} - -void ResourceDir::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - if ( mPath == StdAddressBook::directoryName() ) - config->deleteEntry( "FilePath" ); - else - config->writePathEntry( "FilePath", mPath ); - - config->writeEntry( "FileFormat", mFormatName ); -} - -Ticket *ResourceDir::requestSaveTicket() -{ - kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl; - - if ( !addressBook() ) return 0; - - delete mLock; - mLock = new Lock( mPath ); - - if ( mLock->lock() ) { - addressBook()->emitAddressBookLocked(); - } else { - addressBook()->error( mLock->error() ); - kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock path '" - << mPath << "': " << mLock->error() << endl; - return 0; - } - - return createTicket( this ); -} - -void ResourceDir::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; - - delete mLock; - mLock = 0; -} - -bool ResourceDir::doOpen() -{ - TQDir dir( mPath ); - if ( !dir.exists() ) { // no directory available - return dir.mkdir( dir.path() ); - } else { - TQString testName = dir.entryList( TQDir::Files )[0]; - if ( testName.isNull() || testName.isEmpty() ) // no file in directory - return true; - - TQFile file( mPath + "/" + testName ); - if ( file.open( IO_ReadOnly ) ) - return true; - - if ( file.size() == 0 ) - return true; - - bool ok = mFormat->checkFormat( &file ); - file.close(); - return ok; - } -} - -void ResourceDir::doClose() -{ -} - -bool ResourceDir::load() -{ - kdDebug(5700) << "ResourceDir::load(): '" << mPath << "'" << endl; - - mAsynchronous = false; - - TQDir dir( mPath ); - TQStringList files = dir.entryList( TQDir::Files ); - - TQStringList::Iterator it; - bool ok = true; - for ( it = files.begin(); it != files.end(); ++it ) { - TQFile file( mPath + "/" + (*it) ); - - if ( !file.open( IO_ReadOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); - ok = false; - continue; - } - - if ( !mFormat->loadAll( addressBook(), this, &file ) ) - ok = false; - - file.close(); - } - - return ok; -} - -bool ResourceDir::asyncLoad() -{ - mAsynchronous = true; - - bool ok = load(); - if ( !ok ) - emit loadingError( this, i18n( "Loading resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit loadingFinished( this ); - - return ok; -} - -bool ResourceDir::save( Ticket * ) -{ - kdDebug(5700) << "ResourceDir::save(): '" << mPath << "'" << endl; - - Addressee::Map::Iterator it; - bool ok = true; - - mDirWatch.stopScan(); - - for ( it = mAddrMap.begin(); it != mAddrMap.end(); ++it ) { - if ( !it.data().changed() ) - continue; - - TQFile file( mPath + "/" + (*it).uid() ); - if ( !file.open( IO_WriteOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); - continue; - } - - mFormat->save( *it, &file ); - - // mark as unchanged - (*it).setChanged( false ); - - file.close(); - } - - mDirWatch.startScan(); - - return ok; -} - -bool ResourceDir::asyncSave( Ticket *ticket ) -{ - bool ok = save( ticket ); - if ( !ok ) - emit savingError( this, i18n( "Saving resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit savingFinished( this ); - - return ok; -} - -void ResourceDir::setPath( const TQString &path ) -{ - mDirWatch.stopScan(); - if ( mDirWatch.contains( mPath ) ) - mDirWatch.removeDir( mPath ); - - mPath = path; - mDirWatch.addDir( mPath, true ); - mDirWatch.startScan(); -} - -TQString ResourceDir::path() const -{ - return mPath; -} - -void ResourceDir::setFormat( const TQString &format ) -{ - mFormatName = format; - - if ( mFormat ) - delete mFormat; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); -} - -TQString ResourceDir::format() const -{ - return mFormatName; -} - -void ResourceDir::pathChanged() -{ - if ( !addressBook() ) - return; - - clear(); - if ( mAsynchronous ) - asyncLoad(); - else { - load(); - addressBook()->emitAddressBookChanged(); - } -} - -void ResourceDir::removeAddressee( const Addressee& addr ) -{ - TQFile::remove( mPath + "/" + addr.uid() ); - mAddrMap.erase( addr.uid() ); -} - -#include "resourcedir.moc" diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h deleted file mode 100644 index f62ee91ba..000000000 --- a/kabc/plugins/dir/resourcedir.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCEDIR_H -#define KABC_RESOURCEDIR_H - -#include -#include - -#include - -#include - -class TQTimer; - -namespace KABC { - -class FormatPlugin; -class Lock; - -/** - @internal -*/ -class KABC_EXPORT ResourceDir : public Resource -{ - Q_OBJECT - - public: - ResourceDir( const TDEConfig* ); - ResourceDir( const TQString &path, const TQString &type = "vcard" ); - ~ResourceDir(); - - virtual void writeConfig( TDEConfig* ); - - virtual bool doOpen(); - virtual void doClose(); - - virtual Ticket *requestSaveTicket(); - virtual void releaseSaveTicket( Ticket* ); - - virtual bool load(); - virtual bool asyncLoad(); - virtual bool save( Ticket* ticket ); - virtual bool asyncSave( Ticket* ticket ); - - /** - Set path to be used for saving. - */ - void setPath( const TQString & ); - - /** - Return path used for loading and saving the address book. - */ - TQString path() const; - - /** - Set the format by name. - */ - void setFormat( const TQString &format ); - - /** - Returns the format name. - */ - TQString format() const; - - /** - Remove a addressee from its source. - This method is mainly called by KABC::AddressBook. - */ - virtual void removeAddressee( const Addressee& addr ); - - protected slots: - void pathChanged(); - - protected: - void init( const TQString &path, const TQString &format ); - - private: - FormatPlugin *mFormat; - - KDirWatch mDirWatch; - - TQString mPath; - TQString mFormatName; - - Lock *mLock; - - bool mAsynchronous; - - class ResourceDirPrivate; - ResourceDirPrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp deleted file mode 100644 index 819d75d96..000000000 --- a/kabc/plugins/dir/resourcedirconfig.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include "formatfactory.h" -#include "resourcedir.h" -#include "stdaddressbook.h" - -#include "resourcedirconfig.h" - -using namespace KABC; - -ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name ) - : KRES::ConfigWidget( parent, name ) -{ - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, - KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Format:" ), this ); - mFormatBox = new KComboBox( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mFormatBox, 0, 1 ); - - label = new TQLabel( i18n( "Location:" ), this ); - mFileNameEdit = new KURLRequester( this ); - mFileNameEdit->setMode( KFile::Directory ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mFileNameEdit, 1, 1 ); - - FormatFactory *factory = FormatFactory::self(); - TQStringList formats = factory->formats(); - TQStringList::Iterator it; - for ( it = formats.begin(); it != formats.end(); ++it ) { - FormatInfo *info = factory->info( *it ); - if ( info ) { - mFormatTypes << (*it); - mFormatBox->insertItem( info->nameLabel ); - } - } - - mInEditMode = false; -} - -void ResourceDirConfig::setEditMode( bool value ) -{ - mFormatBox->setEnabled( !value ); - mInEditMode = value; -} - -void ResourceDirConfig::loadSettings( KRES::Resource *res ) -{ - ResourceDir *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; - return; - } - - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); - - mFileNameEdit->setURL( resource->path() ); - if ( mFileNameEdit->url().isEmpty() ) - mFileNameEdit->setURL( KABC::StdAddressBook::directoryName() ); -} - -void ResourceDirConfig::saveSettings( KRES::Resource *res ) -{ - ResourceDir *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; - return; - } - - if ( mInEditMode ) - resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); - - resource->setPath( mFileNameEdit->url() ); -} - -#include "resourcedirconfig.moc" diff --git a/kabc/plugins/dir/resourcedirconfig.h b/kabc/plugins/dir/resourcedirconfig.h deleted file mode 100644 index 9df1778d3..000000000 --- a/kabc/plugins/dir/resourcedirconfig.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCEDIRCONFIG_H -#define RESOURCEDIRCONFIG_H - -#include -#include - -#include - -namespace KABC { - -class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget -{ - Q_OBJECT - -public: - ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 ); - - void setEditMode( bool value ); - -public slots: - void loadSettings( KRES::Resource* ); - void saveSettings( KRES::Resource* ); - -private: - KComboBox* mFormatBox; - KURLRequester* mFileNameEdit; - - TQStringList mFormatTypes; - - bool mInEditMode; -}; - -} -#endif diff --git a/kabc/plugins/dir/resourcedirplugin.cpp b/kabc/plugins/dir/resourcedirplugin.cpp deleted file mode 100644 index a2bd6d138..000000000 --- a/kabc/plugins/dir/resourcedirplugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourcedir.h" -#include "resourcedirconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_dir() - { - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/evolution/Makefile.am b/kabc/plugins/evolution/Makefile.am deleted file mode 100644 index fd7b9be3b..000000000 --- a/kabc/plugins/evolution/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourceevo.h dbwrapper.h - -kde_module_LTLIBRARIES = kabc_evo.la - -kabc_evo_la_SOURCES = dbwrapper.cpp resourceevo.cpp - -kabc_evo_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kabc_evo_la_LIBADD = ../../../kabc/libkabc.la ../../../tdeui/libtdeui.la -ldb ../../../kabc/vcardparser/libvcards.la - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_evolution.pot - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = evolution.desktop diff --git a/kabc/plugins/evolution/README b/kabc/plugins/evolution/README deleted file mode 100644 index 7dfefce00..000000000 --- a/kabc/plugins/evolution/README +++ /dev/null @@ -1,15 +0,0 @@ -A Resource using DB3 to access the evolution -addressbook make sure the wombat is not running -In future versions I may use bonobo to access it... - - -DESIGN: -The Format vs Resource idea is somehow not applyable to the -Evolution PAS - -Format would be vCard and Resource would be DB3.. -BUT -Format get's a QFile* pointer which is just not usable -with a DB3 -INSTEAD we will use the vCardImpl directly to convert -a string to Addressee \ No newline at end of file diff --git a/kabc/plugins/evolution/dbwrapper.cpp b/kabc/plugins/evolution/dbwrapper.cpp deleted file mode 100644 index fbdff165a..000000000 --- a/kabc/plugins/evolution/dbwrapper.cpp +++ /dev/null @@ -1,187 +0,0 @@ -#include - -#include - -#include "dbwrapper.h" - - -using namespace Evolution; - -struct DBIterator::Data { - DBWrapper *wrapper; - TQString key; - TQString data; - DBC* cursor; - bool atEnd; -}; - -DBIterator::DBIterator( DBWrapper* wra) { - data = new Data; - data->wrapper = wra; - data->atEnd = false; - data->cursor = 0l; -} -DBIterator::DBIterator( const DBIterator& copy ) { - data = new Data; - data->wrapper = copy.data->wrapper; - data->key = copy.data->key; - data->data = copy.data->data; - data->atEnd = copy.data->atEnd; - if (copy.data->cursor ) - copy.data->cursor->c_dup(copy.data->cursor, &data->cursor, 0 ); - else - data->cursor = 0l; -} -DBIterator::~DBIterator() { - if (data->cursor) - data->cursor->c_close(data->cursor); - delete data; -} -DBIterator& DBIterator::operator=( const DBIterator& rhs ) { - if ( *this == rhs ) - return *this; - if (data->cursor) - data->cursor->c_close(data->cursor); - delete data; - data = new Data; - data->wrapper = rhs.data->wrapper; - data->key = rhs.data->key; - data->data = rhs.data->data; - data->atEnd = rhs.data->atEnd; - if ( rhs.data->cursor ) - rhs.data->cursor->c_dup(rhs.data->cursor, &data->cursor, 0 ); - else - data->cursor = 0l; - - return *this; -} -TQString DBIterator::key()const{ - return data->key; -} -TQString DBIterator::value()const { - return data->data; -} -TQString DBIterator::operator*() { - return data->data; -} -DBIterator& DBIterator::operator++() { - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - if ( data->cursor ) - if ( data->cursor->c_get(data->cursor, &key, &val,DB_NEXT ) != 0 ) - data->atEnd = true; - data->key = TQString::fromUtf8( (char*)key.data, key.size ); - data->data = TQString::fromUtf8( (char*)val.data, val.size ); - return *this; -} -DBIterator& DBIterator::operator--() { - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - if ( data->cursor ) - if ( data->cursor->c_get(data->cursor, &key, &val,DB_PREV ) != 0 ) - data->atEnd = true; - data->key = TQString::fromUtf8( (char*)key.data, key.size ); - data->data = TQString::fromUtf8( (char*)val.data, val.size ); - return *this; -} -bool DBIterator::operator==( const DBIterator& rhs ) { - if ( data->atEnd && data->atEnd == rhs.data->atEnd ) return true; - - return false; -} -bool DBIterator::operator!=( const DBIterator& rhs ) { - return !this->operator==(rhs ); -} -struct DBWrapper::Data { - DB* db; - bool only; -}; -DBWrapper::DBWrapper() { - data = new Data; - (void)db_create(&data->db, NULL, 0 ); - data->only = false; -} -DBWrapper::~DBWrapper() { - data->db->close(data->db, 0 ); - delete data; -} -bool DBWrapper::open( const TQString& file, bool on) { - data->only = on; - return !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 ); -} -bool DBWrapper::save() { - return true; -} -DBIterator DBWrapper::begin() { - DBIterator it(this); - DBC* cursor; - DBT key, val; - int ret; - ret = data->db->cursor(data->db, NULL, &cursor, 0 ); - if (ret ) { - it.data->atEnd = true; - return it; - } - - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - ret = cursor->c_get(cursor, &key, &val, DB_FIRST ); - if (ret ) { - it.data->atEnd = true; - return it; - } - - it.data->cursor = cursor; - it.data->key = TQString::fromUtf8((char*)key.data, key.size ); - it.data->data = TQString::fromUtf8((char*)val.data, val.size ); - - return it; -} -DBIterator DBWrapper::end() { - DBIterator it(this); - it.data->atEnd = true; - - return it; -} -bool DBWrapper::find( const TQString& _key, TQString& _val ) { - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - - TQCString db_key = _key.local8Bit(); - key.data = db_key.data(); - key.size = db_key.size(); - - int ret = data->db->get(data->db, NULL, &key, &val, 0 ); - if (!ret) { - _val = TQString::fromUtf8( (char*)val.data, val.size ); - tqWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data ); - return true; - } - return false; -} -bool DBWrapper::add( const TQString& _key, const TQString& _val ) { - TQCString db_key = _key.local8Bit(); - TQCString db_val = _val.local8Bit(); - DBT key, val; - ::memset(&key, 0, sizeof(key) ); - ::memset(&val, 0, sizeof(val) ); - - key.data = db_key.data(); - key.size = db_key.size(); - val.data = db_val.data(); - val.size = db_val.size(); - - return !data->db->put(data->db, NULL, &key, &val, 0 ); -} -bool DBWrapper::remove( const TQString& _key ) { - TQCString db_key = _key.local8Bit(); - DBT key; - memset(&key, 0, sizeof(key) ); - key.data = db_key.data(); - key.size = db_key.size(); - - return !data->db->del(data->db, NULL, &key, 0 ); -} diff --git a/kabc/plugins/evolution/dbwrapper.h b/kabc/plugins/evolution/dbwrapper.h deleted file mode 100644 index e5e0a2c33..000000000 --- a/kabc/plugins/evolution/dbwrapper.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef KABC_EVOLUTION_DB_WRAPPER -#define KABC_EVOLUTION_DB_WRAPPER - -#include - -#include -#include - -namespace Evolution { - - class DBWrapper; - class DBIterator { - friend class DBWrapper; - public: - DBIterator( DBWrapper* = 0l ); - ~DBIterator(); - - DBIterator( const DBIterator& ); - DBIterator &operator=( const DBIterator& ); - - TQString key()const; - TQString value()const; - - TQString operator*(); - - DBIterator &operator++(); - DBIterator &operator--(); - - bool operator==( const DBIterator& ); - bool operator!=( const DBIterator& ); - private: - struct Data; - Data* data; - }; - class DBWrapper { - public: - DBWrapper(); - ~DBWrapper(); - - TQString lastError()const; - - bool open( const TQString& file, bool readOnly = false); - bool save(); - DBIterator begin(); - DBIterator end(); - - bool find( const TQString& key, TQString& value ); - bool add( const TQString& key, const TQString& val ); - bool remove( const TQString& key ); - private: - // DBT element( const TQString& ); - struct Data; - Data* data; - - }; - -} - - -#endif diff --git a/kabc/plugins/evolution/evolution.desktop b/kabc/plugins/evolution/evolution.desktop deleted file mode 100644 index 98030e906..000000000 --- a/kabc/plugins/evolution/evolution.desktop +++ /dev/null @@ -1,26 +0,0 @@ -[Desktop Entry] -Name=Evolution -Name[be]=Ð­Ð²Ð°Ð»ÑŽÑ†Ñ‹Ñ -Name[bn]=ইভোলিউশন -Name[eo]=Evoluo -Name[fa]=اوولوشن -Name[hi]=à¤à¤µà¥‰à¤²à¥à¤¯à¥‚शन -Name[ko]=ì—볼루션 -Name[mn]=Хөгжил -Name[ne]=इभोलà¥à¤¯à¥à¤¸à¤¨ -Name[pa]=à¨à¨µà©‚ਲੇਸ਼ਨ -Name[sr]=Еволуција -Name[sr@Latn]=Evolucija -Name[ta]=படிபà¯à®ªà®Ÿà®¿à®¯à®¾à®© வளரà¯à®šà¯à®šà®¿ -Name[te]=ఎవలà±à°¯à±à°·à°¨à± -Name[th]=เอฟโวลูชัน -Name[tt]=ÜseÅŸ -Name[ven]=Tsikoni -Name[wa]=Evolucion -Name[xh]=Utshintsho lwendawo ngokwenqanawa -Name[zu]=Evolushini -X-TDE-Library=kabc_evo -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=evolution diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp deleted file mode 100644 index 415e9928a..000000000 --- a/kabc/plugins/evolution/resourceevo.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include - -#include -#include -#include - -#include - -#include - -#include "dbwrapper.h" -#include "resourceevo.h" - -using namespace Evolution; -using namespace KABC; - -class EvolutionFactory : public KRES::PluginFactoryBase -{ - public: - KRES::Resource *resource( const TDEConfig *config ) - { - return new ResourceEvolution( config ); - } - - KRES::ConfigWidget *configWidget( TQWidget * ) - { - return 0; - } -}; - -extern "C" -{ - KDE_EXPORT void *init_kabc_evo() - { - return ( new EvolutionFactory() ); - } -} - -ResourceEvolution::ResourceEvolution( const TDEConfig* conf ) - : Resource( conf ), mWrap(0l) -{ - m_isOpen = false; -} -ResourceEvolution::~ResourceEvolution() { - delete mWrap; -} -bool ResourceEvolution::doOpen() { - mWrap = new DBWrapper; - if (!mWrap->open( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) { - return false; - } - - TQString val; - if (!mWrap->find( "PAS-DB-VERSION", val ) ) - return false; - - if (!val.startsWith("0.2") ) - return false; - - m_isOpen = true; - - return true; -} -void ResourceEvolution::doClose() { - delete mWrap; - mWrap = 0l; - m_isOpen = false; -} -Ticket* ResourceEvolution::requestSaveTicket() { - if ( !addressBook() ) return 0; - return createTicket( this ); -} -/* - * skip the first key - */ - -bool ResourceEvolution::load() { - /* doOpen never get's called :( */ - if (!doOpen()) return false; - if (!mWrap ) return false; // open first! - - DBIterator it = mWrap->begin(); - // skip the "PAS-DB-VERSION" - - for ( ; it != mWrap->end(); ++it ) { - if ( it.key().startsWith("PAS-DB-VERSION") ) - continue; - - tqWarning( "val:%s", it.value().latin1() ); - VCardTool tool; - TQString str = it.value().stripWhiteSpace(); - Addressee::List list = tool.parseVCards( str ); - if (!list.first().isEmpty() ) { - Addressee adr = list.first(); - adr.setResource(this); - addressBook()->insertAddressee( adr ); - } - } - return true; -} -bool ResourceEvolution::save( Ticket* ticket ) { - delete ticket; - if (!m_isOpen ) return false; - - // just delete the summary so evolution will regenerate it - // on next start up - (void)TQFile::remove( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" ); - - - AddressBook::Iterator it; - Addressee::List list; - for ( it = addressBook()->begin(); it !=addressBook()->end(); ++it ) { - if ( (*it).resource() != this || !(*it).changed() ) - continue; - - // remove, convert add set unchanged false - list.clear(); - mWrap->remove( (*it).uid() ); - VCardTool tool; - list.append( (*it) ); - mWrap->add( (*it).uid(), tool.createVCards( list, VCard::v2_1) ); - - (*it).setChanged( false ); - } - - return true; -} -void ResourceEvolution::removeAddressee( const Addressee& rem) { - if (!m_isOpen) return; - - mWrap->remove( rem.uid() ); -} diff --git a/kabc/plugins/evolution/resourceevo.h b/kabc/plugins/evolution/resourceevo.h deleted file mode 100644 index 29e163e1c..000000000 --- a/kabc/plugins/evolution/resourceevo.h +++ /dev/null @@ -1,23 +0,0 @@ -#include "resource.h" - -namespace Evolution { - class DBWrapper; -} - -namespace KABC { - class ResourceEvolution : public Resource { - public: - ResourceEvolution( const TDEConfig* config ); - ~ResourceEvolution(); - - bool doOpen(); - void doClose(); - Ticket* requestSaveTicket(); - bool load(); - bool save( Ticket* ticket ); - void removeAddressee( const Addressee& ); - private: - Evolution::DBWrapper *mWrap; - bool m_isOpen : 1; - }; -} diff --git a/kabc/plugins/file/CMakeLists.txt b/kabc/plugins/file/CMakeLists.txt deleted file mode 100644 index f8847d7e9..000000000 --- a/kabc/plugins/file/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourcefile.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES file.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_file (library) ####################### - -set( target kabc_file ) - -set( ${target}_SRCS - resourcefile.cpp resourcefileconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_file (module) ######################## - -set( target kabc_file ) - -set( ${target}_SRCS - resourcefileplugin.cpp -) - -tde_add_kpart( ${target} - SOURCES ${${target}_SRCS} - LINK kabc_file-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/file/Makefile.am b/kabc/plugins/file/Makefile.am deleted file mode 100644 index b1530d97d..000000000 --- a/kabc/plugins/file/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcefileconfig.h - -lib_LTLIBRARIES = libkabc_file.la -libkabc_file_la_SOURCES = resourcefile.cpp resourcefileconfig.cpp -libkabc_file_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_file_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEFILE) $(LIB_TDECORE) $(LIB_TDEUI) -libkabc_file_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - - -kde_module_LTLIBRARIES = kabc_file.la -kabc_file_la_SOURCES = resourcefileplugin.cpp -kabc_file_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -kabc_file_la_LIBADD = libkabc_file.la $(LIB_QT) $(LIB_TDECORE) -kabc_file_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_file.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourcefile.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = file.desktop diff --git a/kabc/plugins/file/file.desktop b/kabc/plugins/file/file.desktop deleted file mode 100644 index 1359dd1c6..000000000 --- a/kabc/plugins/file/file.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Name=File -Name[af]=Lêer -Name[ar]=ملÙÙ‘ -Name[az]=Fayl -Name[be]=Файл -Name[bn]=ফাইল -Name[br]=Restr -Name[bs]=Datoteka -Name[ca]=Fitxer -Name[cs]=Soubor -Name[csb]=Lopk -Name[cy]=Ffeil -Name[da]=Fil -Name[de]=Datei -Name[el]=ΑÏχείο -Name[eo]=Dosiero -Name[es]=Archivo -Name[et]=Fail -Name[eu]=Fitxategia -Name[fa]=پرونده -Name[fi]=Tiedosto -Name[fr]=Fichier -Name[fy]=Triem -Name[ga]=Comhad -Name[gl]=Ficheiro -Name[he]=קובץ -Name[hi]=फ़ाइल -Name[hr]=Datoteka -Name[hsb]=Dataja -Name[hu]=Fájl -Name[id]=Berkas -Name[is]=Skrá -Name[ja]=ファイル -Name[ka]=ფáƒáƒ˜áƒšáƒ˜ -Name[kk]=Файл -Name[km]=ឯកសារ -Name[ko]=íŒŒì¼ -Name[lb]=Datei -Name[lt]=Byla -Name[lv]=Fails -Name[mk]=Датотека -Name[mn]=Файл -Name[ms]=Fail -Name[nb]=Fil -Name[nds]=Datei -Name[ne]=फाइल -Name[nl]=Bestand -Name[nn]=Fil -Name[pa]=ਫਾਇਲ -Name[pl]=Plik -Name[pt]=Ficheiro -Name[pt_BR]=Arquivo -Name[ro]=FiÅŸier -Name[ru]=Файл -Name[rw]=Idosiye -Name[se]=Fiila -Name[sk]=Súbor -Name[sl]=Datoteka -Name[sq]=Skedë -Name[sr]=Фајл -Name[sr@Latn]=Fajl -Name[sv]=Fil -Name[ta]=கோபà¯à®ªà¯ -Name[te]=దసà±à°¤à±à°°à°‚ -Name[tg]=Файл -Name[th]=à¹à¸Ÿà¹‰à¸¡ -Name[tr]=Dosya -Name[tt]=Birem -Name[uk]=Файл -Name[uz]=Fayl -Name[uz@cyrillic]=Файл -Name[vi]=Tập tin -Name[wa]=Fitchî -Name[zh_CN]=文件 -Name[zh_HK]=檔案 -Name[zh_TW]=檔案 -X-TDE-Library=kabc_file -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=file diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp deleted file mode 100644 index 7c99782c3..000000000 --- a/kabc/plugins/file/resourcefile.cpp +++ /dev/null @@ -1,395 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2001,2003 Cornelius Schumacher - Copyright (c) 2006 Tom Abers - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "formatfactory.h" -#include "resourcefileconfig.h" -#include "stdaddressbook.h" -#include "lock.h" - -#include "resourcefile.h" - -using namespace KABC; - -ResourceFile::ResourceFile( const TDEConfig *config ) - : Resource( config ), mFormat( 0 ), - mAsynchronous( false ) -{ - TQString fileName, formatName; - - if ( config ) { - fileName = config->readPathEntry( "FileName", StdAddressBook::fileName() ); - formatName = config->readEntry( "FileFormat", "vcard" ); - } else { - fileName = StdAddressBook::fileName(); - formatName = "vcard"; - } - - init( fileName, formatName ); -} - -ResourceFile::ResourceFile( const TQString &fileName, - const TQString &formatName ) - : Resource( 0 ), mFormat( 0 ), - mAsynchronous( false ) -{ - init( fileName, formatName ); -} - -void ResourceFile::init( const TQString &fileName, const TQString &formatName ) -{ - mFormatName = formatName; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); - - if ( !mFormat ) { - mFormatName = "vcard"; - mFormat = factory->format( mFormatName ); - } - - connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( fileChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( fileChanged() ) ); - connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( fileChanged() ) ); - - setFileName( fileName ); - - mLock = 0; -} - -ResourceFile::~ResourceFile() -{ - delete mFormat; - mFormat = 0; -} - -void ResourceFile::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - if ( mFileName == StdAddressBook::fileName() ) - config->deleteEntry( "FileName" ); - else - config->writePathEntry( "FileName", mFileName ); - - config->writeEntry( "FileFormat", mFormatName ); -} - -Ticket *ResourceFile::requestSaveTicket() -{ - kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; - - if ( !addressBook() ) return 0; - - delete mLock; - mLock = new Lock( mFileName ); - - if ( mLock->lock() ) { - addressBook()->emitAddressBookLocked(); - } else { - addressBook()->error( mLock->error() ); - kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock file '" - << mFileName << "': " << mLock->error() << endl; - return 0; - } - - return createTicket( this ); -} - -void ResourceFile::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; - - delete mLock; - mLock = 0; - - addressBook()->emitAddressBookUnlocked(); -} - -bool ResourceFile::doOpen() -{ - TQFile file( mFileName ); - - if ( !file.exists() ) { - // try to create the file - bool ok = file.open( IO_WriteOnly ); - if ( ok ) - file.close(); - - return ok; - } else { - TQFileInfo fileInfo( mFileName ); - if ( readOnly() || !fileInfo.isWritable() ) { - if ( !file.open( IO_ReadOnly ) ) - return false; - } else { - if ( !file.open( IO_ReadWrite ) ) - return false; - } - - if ( file.size() == 0 ) { - file.close(); - kdDebug() << "File size is zero. Evaluating backups" << endl; - for (int i=0; i!=20; i++) - { - TQFile backup( mFileName + "__" + TQString::number(i) ); - kdDebug() << "Evaluating" << backup.name() << " size: " << backup.size() << endl; - if ( backup.size() != 0 ) - { - kdDebug() << "Restoring backup " << i << endl; - const TQString src = mFileName + "__" + TQString::number(i); - const TQString dest = mFileName; - - // remove dest - TQFile::remove( dest ); - - // copy src to dest - if ( backup.open( IO_ReadOnly ) ) { - const TQByteArray data = backup.readAll(); - - TQFile out( dest ); - if ( out.open( IO_WriteOnly ) ) { - out.writeBlock( data ); - out.close(); - } - - backup.close(); - } - return true; - } - } - return true; - } - - bool ok = mFormat->checkFormat( &file ); - file.close(); - - return ok; - } -} - -void ResourceFile::doClose() -{ -} - -bool ResourceFile::load() -{ - kdDebug(5700) << "ResourceFile::load(): '" << mFileName << "'" << endl; - - mAsynchronous = false; - - TQFile file( mFileName ); - if ( !file.open( IO_ReadOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) ); - return false; - } - - clear(); - - return mFormat->loadAll( addressBook(), this, &file ); -} - -bool ResourceFile::asyncLoad() -{ - kdDebug(5700) << "ResourceFile::asyncLoad()" << endl; - - mAsynchronous = true; - - bool ok = load(); - - if ( !ok ) - emitLoadingError(); - else - emitLoadingFinished(); - - return true; -} - -bool ResourceFile::save( Ticket * ) -{ - kdDebug(5700) << "ResourceFile::save()" << endl; - - // Only do the logrotate dance when the __0 file is not 0 bytes. - TQFile file( mFileName + "__0" ); - if ( file.size() != 0 ) { - const TQString last = mFileName + "__20"; - kdDebug() << "deleting " << last << endl; - - TQFile::remove( last ); - - for (int i=19; i>=0; i--) - { - const TQString src = mFileName + "__" + TQString::number(i); - const TQString dest = mFileName + "__" + TQString::number(i+1); - kdDebug() << "moving " << src << " -> " << dest << endl; - - // copy src to dest - TQFile in( src ); - if ( in.open( IO_ReadOnly ) ) { - const TQByteArray data = in.readAll(); - - TQFile out( dest ); - if ( out.open( IO_WriteOnly ) ) { - out.writeBlock( data ); - out.close(); - } - - in.close(); - } - - // remove src - TQFile::remove( src ); - } - } else - kdDebug() << "Not starting logrotate __0 is 0 bytes." << endl; - - TQString extension = "__0"; - (void) KSaveFile::backupFile( mFileName, TQString::null /*directory*/, - extension ); - - mDirWatch.stopScan(); - - KSaveFile saveFile( mFileName ); - bool ok = false; - - if ( saveFile.status() == 0 && saveFile.file() ) { - mFormat->saveAll( addressBook(), this, saveFile.file() ); - ok = saveFile.close(); - } - - if ( !ok ) { - saveFile.abort(); - addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); - } - - mDirWatch.startScan(); - - return ok; -} - -bool ResourceFile::asyncSave( Ticket *ticket ) -{ - kdDebug(5700) << "ResourceFile::asyncSave()" << endl; - - bool ok = save( ticket ); - - if ( !ok ) - TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingError() ) ); - else - TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingFinished() ) ); - - return ok; -} - -void ResourceFile::setFileName( const TQString &fileName ) -{ - mDirWatch.stopScan(); - if ( mDirWatch.contains( mFileName ) ) - mDirWatch.removeFile( mFileName ); - - mFileName = fileName; - - mDirWatch.addFile( mFileName ); - mDirWatch.startScan(); -} - -TQString ResourceFile::fileName() const -{ - return mFileName; -} - -void ResourceFile::setFormat( const TQString &format ) -{ - mFormatName = format; - delete mFormat; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); -} - -TQString ResourceFile::format() const -{ - return mFormatName; -} - -void ResourceFile::fileChanged() -{ - kdDebug(5700) << "ResourceFile::fileChanged(): " << mFileName << endl; - - if ( !addressBook() ) - return; - - if ( mAsynchronous ) - asyncLoad(); - else { - load(); - kdDebug() << "addressBookChanged() " << endl; - addressBook()->emitAddressBookChanged(); - } -} - -void ResourceFile::removeAddressee( const Addressee &addr ) -{ - TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) ); - TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) ); - TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) ); - - mAddrMap.erase( addr.uid() ); -} - -void ResourceFile::emitSavingFinished() -{ - emit savingFinished( this ); -} - -void ResourceFile::emitSavingError() -{ - emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mFileName ) ); -} - -void ResourceFile::emitLoadingFinished() -{ - emit loadingFinished( this ); -} - -void ResourceFile::emitLoadingError() -{ - emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mFileName ) ); -} - -#include "resourcefile.moc" diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h deleted file mode 100644 index 3d2efe85f..000000000 --- a/kabc/plugins/file/resourcefile.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCEFILE_H -#define KABC_RESOURCEFILE_H - -#include -#include - -#include - -#include - -namespace KABC { - -class FormatPlugin; -class ResourceConfigWidget; -class Lock; - -/** - This resource allows access to a local file. -*/ -class KABC_EXPORT ResourceFile : public Resource -{ - Q_OBJECT - - public: - /** - Constructor. - - @param cfg The config object where custom resource settings are stored. - */ - ResourceFile( const TDEConfig *cfg ); - - /** - Construct file resource on file @arg fileName using format @arg formatName. - */ - ResourceFile( const TQString &fileName, const TQString &formatName = "vcard" ); - - /** - Destructor. - */ - ~ResourceFile(); - - /** - Writes the config back. - */ - virtual void writeConfig( TDEConfig *cfg ); - - /** - Tries to open the file and checks for the proper format. - This method should be called before load(). - */ - virtual bool doOpen(); - - /** - Closes the file again. - */ - virtual void doClose(); - - /** - Requests a save ticket, that is used by save() - */ - virtual Ticket *requestSaveTicket(); - - virtual void releaseSaveTicket( Ticket* ); - - /** - Loads all addressees from file to the address book. - Returns true if all addressees could be loaded otherwise false. - */ - virtual bool load(); - - virtual bool asyncLoad(); - - /** - Saves all addresses from address book to file. - Returns true if all addressees could be saved otherwise false. - - @param ticket The ticket returned by requestSaveTicket() - */ - virtual bool save( Ticket *ticket ); - - virtual bool asyncSave( Ticket *ticket ); - - /** - Set name of file to be used for saving. - */ - void setFileName( const TQString & ); - - /** - Return name of file used for loading and saving the address book. - */ - TQString fileName() const; - - /** - Sets a new format by name. - */ - void setFormat( const TQString &name ); - - /** - Returns the format name. - */ - TQString format() const; - - /** - Remove a addressee from its source. - This method is mainly called by KABC::AddressBook. - */ - virtual void removeAddressee( const Addressee& addr ); - - private slots: - void emitLoadingFinished(); - void emitLoadingError(); - void emitSavingFinished(); - void emitSavingError(); - - protected slots: - void fileChanged(); - - protected: - void init( const TQString &fileName, const TQString &format ); - - bool lock( const TQString &fileName ); - void unlock( const TQString &fileName ); - - private: - TQString mFileName; - TQString mFormatName; - - FormatPlugin *mFormat; - - Lock *mLock; - - KDirWatch mDirWatch; - - bool mAsynchronous; - - class ResourceFilePrivate; - ResourceFilePrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp deleted file mode 100644 index 92b07594f..000000000 --- a/kabc/plugins/file/resourcefileconfig.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include - -#include "formatfactory.h" -#include "resourcefile.h" -#include "stdaddressbook.h" - -#include "resourcefileconfig.h" - -using namespace KABC; - -ResourceFileConfig::ResourceFileConfig( TQWidget* parent, const char* name ) - : ConfigWidget( parent, name ) -{ - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, - KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Format:" ), this ); - mFormatBox = new KComboBox( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mFormatBox, 0, 1 ); - - label = new TQLabel( i18n( "Location:" ), this ); - mFileNameEdit = new KURLRequester( this ); - - connect( mFileNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( checkFilePermissions( const TQString & ) ) ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mFileNameEdit, 1, 1 ); - - FormatFactory *factory = FormatFactory::self(); - TQStringList formats = factory->formats(); - TQStringList::Iterator it; - for ( it = formats.begin(); it != formats.end(); ++it ) { - FormatInfo *info = factory->info( *it ); - if ( info ) { - mFormatTypes << (*it); - mFormatBox->insertItem( info->nameLabel ); - } - } - - mInEditMode = false; -} - -void ResourceFileConfig::setEditMode( bool value ) -{ - mFormatBox->setEnabled( !value ); - mInEditMode = value; -} - -void ResourceFileConfig::loadSettings( KRES::Resource *res ) -{ - ResourceFile *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceFileConfig::loadSettings(): cast failed" << endl; - return; - } - - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); - - mFileNameEdit->setURL( resource->fileName() ); - if ( mFileNameEdit->url().isEmpty() ) - mFileNameEdit->setURL( KABC::StdAddressBook::fileName() ); -} - -void ResourceFileConfig::saveSettings( KRES::Resource *res ) -{ - ResourceFile *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceFileConfig::saveSettings(): cast failed" << endl; - return; - } - - if ( !mInEditMode ) - resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); - - resource->setFileName( mFileNameEdit->url() ); -} - -void ResourceFileConfig::checkFilePermissions( const TQString& fileName ) -{ - // If file exist but is not writeable... - if ( access( TQFile::encodeName( fileName ), F_OK ) == 0 ) - emit setReadOnly( access( TQFile::encodeName( fileName ), W_OK ) < 0 ); -} - -#include "resourcefileconfig.moc" diff --git a/kabc/plugins/file/resourcefileconfig.h b/kabc/plugins/file/resourcefileconfig.h deleted file mode 100644 index 18c217eda..000000000 --- a/kabc/plugins/file/resourcefileconfig.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCEFILECONFIG_H -#define RESOURCEFILECONFIG_H - -#include -#include - -#include - -namespace KABC { - -class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget -{ - Q_OBJECT - -public: - ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 ); - - void setEditMode( bool value ); - -public slots: - void loadSettings( KRES::Resource *resource ); - void saveSettings( KRES::Resource *resource ); - -protected slots: - void checkFilePermissions( const TQString& fileName ); - -private: - KComboBox* mFormatBox; - KURLRequester* mFileNameEdit; - bool mInEditMode; - - TQStringList mFormatTypes; -}; - -} - -#endif diff --git a/kabc/plugins/file/resourcefileplugin.cpp b/kabc/plugins/file/resourcefileplugin.cpp deleted file mode 100644 index 4dce19bc0..000000000 --- a/kabc/plugins/file/resourcefileplugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourcefile.h" -#include "resourcefileconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_file() - { - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/ldaptdeio/CMakeLists.txt b/kabc/plugins/ldaptdeio/CMakeLists.txt deleted file mode 100644 index 75098cc9d..000000000 --- a/kabc/plugins/ldaptdeio/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefiles -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourceldaptdeio.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES ldaptdeio.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_ldaptdeio ############################## - -set( target kabc_ldaptdeio ) - -set( ${target}_SRCS - resourceldaptdeio.cpp resourceldaptdeioconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_ldaptdeio ############################## - -set( target kabc_ldaptdeio ) - -set( ${target}_SRCS - resourceldaptdeioplugin.cpp -) - -tde_add_kpart( ${target} - SOURCES ${${target}_SRCS} - LINK kabc_ldaptdeio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/ldaptdeio/Makefile.am b/kabc/plugins/ldaptdeio/Makefile.am deleted file mode 100644 index 9c2d31ad7..000000000 --- a/kabc/plugins/ldaptdeio/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourceldaptdeioconfig.h - -lib_LTLIBRARIES = libkabc_ldaptdeio.la -libkabc_ldaptdeio_la_SOURCES = resourceldaptdeio.cpp resourceldaptdeioconfig.cpp -libkabc_ldaptdeio_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_ldaptdeio_la_LIBADD = $(LIB_KABC) $(LIB_KIO) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEUI) $(LIB_TDECORE) -libkabc_ldaptdeio_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -kde_module_LTLIBRARIES = kabc_ldaptdeio.la -kabc_ldaptdeio_la_SOURCES = resourceldaptdeioplugin.cpp -kabc_ldaptdeio_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kabc_ldaptdeio_la_LIBADD = libkabc_ldaptdeio.la $(LIB_QT) $(LIB_TDECORE) - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_ldaptdeio.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourceldaptdeio.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = ldaptdeio.desktop - -resourceldaptdeioplugin.lo: ../../addressee.h diff --git a/kabc/plugins/ldaptdeio/ldaptdeio.desktop b/kabc/plugins/ldaptdeio/ldaptdeio.desktop deleted file mode 100644 index 9bcd13337..000000000 --- a/kabc/plugins/ldaptdeio/ldaptdeio.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=LDAP -Name[bn]=à¦à¦²-ডি-à¦-পি (LDAP) -Name[hi]=à¤à¤²à¤¡à¥€à¤à¤ªà¥€ (LDAP) -Name[te]=à°Žà°²à±à°¡à°¿à°à°ªà°¿ -X-TDE-Library=kabc_ldaptdeio -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=ldaptdeio diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeio.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeio.cpp deleted file mode 100644 index b28289ecb..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeio.cpp +++ /dev/null @@ -1,1041 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "resourceldaptdeio.h" -#include "resourceldaptdeioconfig.h" - -using namespace KABC; - -// Hack from Netaccess -void tqt_enter_modal( TQWidget *widget ); -void tqt_leave_modal( TQWidget *widget ); - -class ResourceLDAPTDEIO::ResourceLDAPTDEIOPrivate -{ - public: - LDIF mLdif; - bool mTLS,mSSL,mSubTree; - TQString mResultDn; - Addressee mAddr; - Address mAd; - Resource::Iterator mSaveIt; - bool mSASL; - TQString mMech; - TQString mRealm, mBindDN; - LDAPUrl mLDAPUrl; - int mVer, mSizeLimit, mTimeLimit, mRDNPrefix; - int mError; - int mCachePolicy; - bool mReadOnly; - bool mAutoCache; - TQString mCacheDst; - KTempFile *mTmp; -}; - -ResourceLDAPTDEIO::ResourceLDAPTDEIO( const TDEConfig *config ) - : Resource( config ) -{ - d = new ResourceLDAPTDEIOPrivate; - if ( config ) { - TQMap attrList; - TQStringList attributes = config->readListEntry( "LdapAttributes" ); - for ( uint pos = 0; pos < attributes.count(); pos += 2 ) - mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] ); - - mUser = config->readEntry( "LdapUser" ); - mPassword = KStringHandler::obscure( config->readEntry( "LdapPassword" ) ); - mDn = config->readEntry( "LdapDn" ); - mHost = config->readEntry( "LdapHost" ); - mPort = config->readNumEntry( "LdapPort", 389 ); - mFilter = config->readEntry( "LdapFilter" ); - mAnonymous = config->readBoolEntry( "LdapAnonymous" ); - d->mTLS = config->readBoolEntry( "LdapTLS" ); - d->mSSL = config->readBoolEntry( "LdapSSL" ); - d->mSubTree = config->readBoolEntry( "LdapSubTree" ); - d->mSASL = config->readBoolEntry( "LdapSASL" ); - d->mMech = config->readEntry( "LdapMech" ); - d->mRealm = config->readEntry( "LdapRealm" ); - d->mBindDN = config->readEntry( "LdapBindDN" ); - d->mVer = config->readNumEntry( "LdapVer", 3 ); - d->mTimeLimit = config->readNumEntry( "LdapTimeLimit", 0 ); - d->mSizeLimit = config->readNumEntry( "LdapSizeLimit", 0 ); - d->mRDNPrefix = config->readNumEntry( "LdapRDNPrefix", 0 ); - d->mCachePolicy = config->readNumEntry( "LdapCachePolicy", 0 ); - d->mAutoCache = config->readBoolEntry( "LdapAutoCache", true ); - } else { - mPort = 389; - mAnonymous = true; - mUser = mPassword = mHost = mFilter = mDn = ""; - d->mMech = d->mRealm = d->mBindDN = ""; - d->mTLS = d->mSSL = d->mSubTree = d->mSASL = false; - d->mVer = 3; d->mRDNPrefix = 0; - d->mTimeLimit = d->mSizeLimit = 0; - d->mCachePolicy = Cache_No; - d->mAutoCache = true; - } - d->mCacheDst = TDEGlobal::dirs()->saveLocation("cache", "ldaptdeio") + "/" + - type() + "_" + identifier(); - init(); -} - -ResourceLDAPTDEIO::~ResourceLDAPTDEIO() -{ - delete d; -} - -void ResourceLDAPTDEIO::enter_loop() -{ - TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); - dummy.setFocusPolicy( TQ_NoFocus ); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); -} - -void ResourceLDAPTDEIO::entries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) -{ - TDEIO::UDSEntryListConstIterator it = list.begin(); - TDEIO::UDSEntryListConstIterator end = list.end(); - for (; it != end; ++it) { - TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); - for( ; it2 != (*it).end(); it2++ ) { - if ( (*it2).m_uds == TDEIO::UDS_URL ) { - KURL tmpurl( (*it2).m_str ); - d->mResultDn = tmpurl.path(); - kdDebug(7125) << "findUid(): " << d->mResultDn << endl; - if ( d->mResultDn.startsWith("/") ) d->mResultDn.remove(0,1); - return; - } - } - } -} - -void ResourceLDAPTDEIO::listResult( TDEIO::Job *job) -{ - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) - mErrorMsg = job->errorString(); - else - mErrorMsg = ""; - tqApp->exit_loop(); -} - -TQString ResourceLDAPTDEIO::findUid( const TQString &uid ) -{ - LDAPUrl url( d->mLDAPUrl ); - TDEIO::UDSEntry entry; - - mErrorMsg = d->mResultDn = ""; - - url.setAttributes("dn"); - url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); - url.setExtension( "x-dir", "one" ); - - kdDebug(7125) << "ResourceLDAPTDEIO::findUid() uid: " << uid << " url " << - url.prettyURL() << endl; - - TDEIO::ListJob * listJob = TDEIO::listDir( url, false /* no GUI */ ); - connect( listJob, - TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList& ) ), - TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); - connect( listJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( listResult( TDEIO::Job* ) ) ); - - enter_loop(); - return d->mResultDn; -} - -TQCString ResourceLDAPTDEIO::addEntry( const TQString &attr, const TQString &value, bool mod ) -{ - TQCString tmp; - if ( !attr.isEmpty() ) { - if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n"; - tmp += LDIF::assembleLine( attr, value ) + "\n"; - if ( mod ) tmp += "-\n"; - } - return ( tmp ); -} - -bool ResourceLDAPTDEIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, - const TQString &olddn ) -{ - TQCString tmp; - TQString dn; - TQByteArray data; - bool mod = false; - - if ( olddn.isEmpty() ) { - //insert new entry - switch ( d->mRDNPrefix ) { - case 1: - dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," +mDn; - break; - case 0: - default: - dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," +mDn; - break; - } - } else { - //modify existing entry - mod = true; - if ( olddn.startsWith( mAttributes[ "uid" ] ) ) { - dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," + olddn.section( ',', 1 ); - } else if ( olddn.startsWith( mAttributes[ "commonName" ] ) ) { - dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," + - olddn.section( ',', 1 ); - } else { - dn = olddn; - } - - if ( olddn.lower() != dn.lower() ) { - tmp = LDIF::assembleLine( "dn", olddn ) + "\n"; - tmp += "changetype: modrdn\n"; - tmp += LDIF::assembleLine( "newrdn", dn.section( ',', 0, 0 ) ) + "\n"; - tmp += "deleteoldrdn: 1\n\n"; - } - } - - - tmp += LDIF::assembleLine( "dn", dn ) + "\n"; - if ( mod ) tmp += "changetype: modify\n"; - if ( !mod ) { - tmp += "objectClass: top\n"; - TQStringList obclass = TQStringList::split( ',', mAttributes[ "objectClass" ] ); - for ( TQStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) { - tmp += LDIF::assembleLine( "objectClass", *it ) + "\n"; - } - } - - tmp += addEntry( mAttributes[ "commonName" ], addr.assembledName(), mod ); - tmp += addEntry( mAttributes[ "formattedName" ], addr.formattedName(), mod ); - tmp += addEntry( mAttributes[ "givenName" ], addr.givenName(), mod ); - tmp += addEntry( mAttributes[ "familyName" ], addr.familyName(), mod ); - tmp += addEntry( mAttributes[ "uid" ], addr.uid(), mod ); - - PhoneNumber number; - number = addr.phoneNumber( PhoneNumber::Home ); - tmp += addEntry( mAttributes[ "phoneNumber" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Work ); - tmp += addEntry( mAttributes[ "telephoneNumber" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Fax ); - tmp += addEntry( mAttributes[ "facsimileTelephoneNumber" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Cell ); - tmp += addEntry( mAttributes[ "mobile" ], number.number().utf8(), mod ); - number = addr.phoneNumber( PhoneNumber::Pager ); - tmp += addEntry( mAttributes[ "pager" ], number.number().utf8(), mod ); - - tmp += addEntry( mAttributes[ "description" ], addr.note(), mod ); - tmp += addEntry( mAttributes[ "title" ], addr.title(), mod ); - tmp += addEntry( mAttributes[ "organization" ], addr.organization(), mod ); - - Address ad = addr.address( Address::Home ); - if ( !ad.isEmpty() ) { - tmp += addEntry( mAttributes[ "street" ], ad.street(), mod ); - tmp += addEntry( mAttributes[ "state" ], ad.region(), mod ); - tmp += addEntry( mAttributes[ "city" ], ad.locality(), mod ); - tmp += addEntry( mAttributes[ "postalcode" ], ad.postalCode(), mod ); - } - - TQStringList emails = addr.emails(); - TQStringList::ConstIterator mailIt = emails.begin(); - - if ( !mAttributes[ "mail" ].isEmpty() ) { - if ( mod ) tmp += - LDIF::assembleLine( "replace", mAttributes[ "mail" ] ) + "\n"; - if ( mailIt != emails.end() ) { - tmp += LDIF::assembleLine( mAttributes[ "mail" ], *mailIt ) + "\n"; - mailIt ++; - } - if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += "-\n"; - } - - if ( !mAttributes[ "mailAlias" ].isEmpty() ) { - if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += - LDIF::assembleLine( "replace", mAttributes[ "mailAlias" ] ) + "\n"; - for ( ; mailIt != emails.end(); ++mailIt ) { - tmp += LDIF::assembleLine( mAttributes[ "mailAlias" ], *mailIt ) + "\n" ; - } - if ( mod ) tmp += "-\n"; - } - - if ( !mAttributes[ "jpegPhoto" ].isEmpty() ) { - TQByteArray pic; - TQBuffer buffer( pic ); - buffer.open( IO_WriteOnly ); - addr.photo().data().save( &buffer, "JPEG" ); - - if ( mod ) tmp += - LDIF::assembleLine( "replace", mAttributes[ "jpegPhoto" ] ) + "\n"; - tmp += LDIF::assembleLine( mAttributes[ "jpegPhoto" ], pic, 76 ) + "\n"; - if ( mod ) tmp += "-\n"; - } - - tmp += "\n"; - kdDebug(7125) << "ldif: " << TQString(TQString::fromUtf8(tmp)) << endl; - ldif = tmp; - return true; -} - -void ResourceLDAPTDEIO::setReadOnly( bool value ) -{ - //save the original readonly flag, because offline using disables writing - d->mReadOnly = true; - Resource::setReadOnly( value ); -} - -void ResourceLDAPTDEIO::init() -{ - if ( mPort == 0 ) mPort = 389; - - /** - If you want to add new attributes, append them here, add a - translation string in the ctor of AttributesDialog and - handle them in the load() method below. - These are the default values - */ - if ( !mAttributes.contains("objectClass") ) - mAttributes.insert( "objectClass", "inetOrgPerson" ); - if ( !mAttributes.contains("commonName") ) - mAttributes.insert( "commonName", "cn" ); - if ( !mAttributes.contains("formattedName") ) - mAttributes.insert( "formattedName", "displayName" ); - if ( !mAttributes.contains("familyName") ) - mAttributes.insert( "familyName", "sn" ); - if ( !mAttributes.contains("givenName") ) - mAttributes.insert( "givenName", "givenName" ); - if ( !mAttributes.contains("mail") ) - mAttributes.insert( "mail", "mail" ); - if ( !mAttributes.contains("mailAlias") ) - mAttributes.insert( "mailAlias", "" ); - if ( !mAttributes.contains("phoneNumber") ) - mAttributes.insert( "phoneNumber", "homePhone" ); - if ( !mAttributes.contains("telephoneNumber") ) - mAttributes.insert( "telephoneNumber", "telephoneNumber" ); - if ( !mAttributes.contains("facsimileTelephoneNumber") ) - mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); - if ( !mAttributes.contains("mobile") ) - mAttributes.insert( "mobile", "mobile" ); - if ( !mAttributes.contains("pager") ) - mAttributes.insert( "pager", "pager" ); - if ( !mAttributes.contains("description") ) - mAttributes.insert( "description", "description" ); - - if ( !mAttributes.contains("title") ) - mAttributes.insert( "title", "title" ); - if ( !mAttributes.contains("street") ) - mAttributes.insert( "street", "street" ); - if ( !mAttributes.contains("state") ) - mAttributes.insert( "state", "st" ); - if ( !mAttributes.contains("city") ) - mAttributes.insert( "city", "l" ); - if ( !mAttributes.contains("organization") ) - mAttributes.insert( "organization", "o" ); - if ( !mAttributes.contains("postalcode") ) - mAttributes.insert( "postalcode", "postalCode" ); - - if ( !mAttributes.contains("uid") ) - mAttributes.insert( "uid", "uid" ); - if ( !mAttributes.contains("jpegPhoto") ) - mAttributes.insert( "jpegPhoto", "jpegPhoto" ); - - d->mLDAPUrl = KURL(); - if ( !mAnonymous ) { - d->mLDAPUrl.setUser( mUser ); - d->mLDAPUrl.setPass( mPassword ); - } - d->mLDAPUrl.setProtocol( d->mSSL ? "ldaps" : "ldap"); - d->mLDAPUrl.setHost( mHost ); - d->mLDAPUrl.setPort( mPort ); - d->mLDAPUrl.setDn( mDn ); - - if (!mAttributes.empty()) { - TQMap::Iterator it; - TQStringList attr; - for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { - if ( !it.data().isEmpty() && it.key() != "objectClass" ) - attr.append( it.data() ); - } - d->mLDAPUrl.setAttributes( attr ); - } - - d->mLDAPUrl.setScope( d->mSubTree ? LDAPUrl::Sub : LDAPUrl::One ); - if ( !mFilter.isEmpty() && mFilter != "(objectClass=*)" ) - d->mLDAPUrl.setFilter( mFilter ); - d->mLDAPUrl.setExtension( "x-dir", "base" ); - if ( d->mTLS ) d->mLDAPUrl.setExtension( "x-tls", "" ); - d->mLDAPUrl.setExtension( "x-ver", TQString::number( d->mVer ) ); - if ( d->mSizeLimit ) - d->mLDAPUrl.setExtension( "x-sizelimit", TQString::number( d->mSizeLimit ) ); - if ( d->mTimeLimit ) - d->mLDAPUrl.setExtension( "x-timelimit", TQString::number( d->mTimeLimit ) ); - if ( d->mSASL ) { - d->mLDAPUrl.setExtension( "x-sasl", "" ); - if ( !d->mBindDN.isEmpty() ) d->mLDAPUrl.setExtension( "bindname", d->mBindDN ); - if ( !d->mMech.isEmpty() ) d->mLDAPUrl.setExtension( "x-mech", d->mMech ); - if ( !d->mRealm.isEmpty() ) d->mLDAPUrl.setExtension( "x-realm", d->mRealm ); - } - - d->mReadOnly = readOnly(); - - kdDebug(7125) << "resource_ldaptdeio url: " << d->mLDAPUrl.prettyURL() << endl; -} - -void ResourceLDAPTDEIO::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - config->writeEntry( "LdapUser", mUser ); - config->writeEntry( "LdapPassword", KStringHandler::obscure( mPassword ) ); - config->writeEntry( "LdapDn", mDn ); - config->writeEntry( "LdapHost", mHost ); - config->writeEntry( "LdapPort", mPort ); - config->writeEntry( "LdapFilter", mFilter ); - config->writeEntry( "LdapAnonymous", mAnonymous ); - config->writeEntry( "LdapTLS", d->mTLS ); - config->writeEntry( "LdapSSL", d->mSSL ); - config->writeEntry( "LdapSubTree", d->mSubTree ); - config->writeEntry( "LdapSASL", d->mSASL ); - config->writeEntry( "LdapMech", d->mMech ); - config->writeEntry( "LdapVer", d->mVer ); - config->writeEntry( "LdapTimeLimit", d->mTimeLimit ); - config->writeEntry( "LdapSizeLimit", d->mSizeLimit ); - config->writeEntry( "LdapRDNPrefix", d->mRDNPrefix ); - config->writeEntry( "LdapRealm", d->mRealm ); - config->writeEntry( "LdapBindDN", d->mBindDN ); - config->writeEntry( "LdapCachePolicy", d->mCachePolicy ); - config->writeEntry( "LdapAutoCache", d->mAutoCache ); - - TQStringList attributes; - TQMap::Iterator it; - for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) - attributes << it.key() << it.data(); - - config->writeEntry( "LdapAttributes", attributes ); -} - -Ticket *ResourceLDAPTDEIO::requestSaveTicket() -{ - if ( !addressBook() ) { - kdDebug(7125) << "no addressbook" << endl; - return 0; - } - - return createTicket( this ); -} - -void ResourceLDAPTDEIO::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; -} - -bool ResourceLDAPTDEIO::doOpen() -{ - return true; -} - -void ResourceLDAPTDEIO::doClose() -{ -} - -void ResourceLDAPTDEIO::createCache() -{ - d->mTmp = NULL; - if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) { - d->mTmp = new KTempFile( d->mCacheDst, "tmp" ); - d->mTmp->setAutoDelete( true ); - } -} - -void ResourceLDAPTDEIO::activateCache() -{ - if ( d->mTmp && d->mError == 0 ) { - d->mTmp->close(); - rename( TQFile::encodeName( d->mTmp->name() ), TQFile::encodeName( d->mCacheDst ) ); - } - if ( d->mTmp ) { - delete d->mTmp; - d->mTmp = 0; - } -} - -TDEIO::Job *ResourceLDAPTDEIO::loadFromCache() -{ - TDEIO::Job *job = NULL; - if ( d->mCachePolicy == Cache_Always || - ( d->mCachePolicy == Cache_NoConnection && - d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) { - - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - //initialize ldif parser - d->mLdif.startParsing(); - - Resource::setReadOnly( true ); - - KURL url( d->mCacheDst ); - job = TDEIO::get( url, true, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - } - return job; -} - -bool ResourceLDAPTDEIO::load() -{ - kdDebug(7125) << "ResourceLDAPTDEIO::load()" << endl; - TDEIO::Job *job; - - clear(); - //clear the addressee - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - //initialize ldif parser - d->mLdif.startParsing(); - - //set to original settings, offline use will disable writing - Resource::setReadOnly( d->mReadOnly ); - - createCache(); - if ( d->mCachePolicy != Cache_Always ) { - job = TDEIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); - enter_loop(); - } - - job = loadFromCache(); - if ( job ) { - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); - enter_loop(); - } - if ( mErrorMsg.isEmpty() ) { - kdDebug(7125) << "ResourceLDAPTDEIO load ok!" << endl; - return true; - } else { - kdDebug(7125) << "ResourceLDAPTDEIO load finished with error: " << mErrorMsg << endl; - addressBook()->error( mErrorMsg ); - return false; - } -} - -bool ResourceLDAPTDEIO::asyncLoad() -{ - clear(); - //clear the addressee - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - //initialize ldif parser - d->mLdif.startParsing(); - - Resource::setReadOnly( d->mReadOnly ); - - createCache(); - if ( d->mCachePolicy != Cache_Always ) { - TDEIO::Job *job = TDEIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( result( TDEIO::Job* ) ) ); - } else { - result( NULL ); - } - return true; -} - -void ResourceLDAPTDEIO::data( TDEIO::Job *, const TQByteArray &data ) -{ - if ( data.size() ) { - d->mLdif.setLDIF( data ); - if ( d->mTmp ) { - d->mTmp->file()->writeBlock( data ); - } - } else { - d->mLdif.endLDIF(); - } - - LDIF::ParseVal ret; - TQString name; - TQByteArray value; - do { - ret = d->mLdif.nextItem(); - switch ( ret ) { - case LDIF::NewEntry: - kdDebug(7125) << "new entry: " << d->mLdif.dn() << endl; - break; - case LDIF::Item: - name = d->mLdif.attr().lower(); - value = d->mLdif.val(); - if ( name == mAttributes[ "commonName" ].lower() ) { - if ( !d->mAddr.formattedName().isEmpty() ) { - TQString fn = d->mAddr.formattedName(); - d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); - d->mAddr.setFormattedName( fn ); - } else - d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "formattedName" ].lower() ) { - d->mAddr.setFormattedName( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "givenName" ].lower() ) { - d->mAddr.setGivenName( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "mail" ].lower() ) { - d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), true ); - } else if ( name == mAttributes[ "mailAlias" ].lower() ) { - d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), false ); - } else if ( name == mAttributes[ "phoneNumber" ].lower() ) { - PhoneNumber phone; - phone.setNumber( TQString::fromUtf8( value, value.size() ) ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "telephoneNumber" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Work ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "facsimileTelephoneNumber" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Fax ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "mobile" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Cell ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "pager" ].lower() ) { - PhoneNumber phone( TQString::fromUtf8( value, value.size() ), - PhoneNumber::Pager ); - d->mAddr.insertPhoneNumber( phone ); - } else if ( name == mAttributes[ "description" ].lower() ) { - d->mAddr.setNote( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "title" ].lower() ) { - d->mAddr.setTitle( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "street" ].lower() ) { - d->mAd.setStreet( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "state" ].lower() ) { - d->mAd.setRegion( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "city" ].lower() ) { - d->mAd.setLocality( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "postalcode" ].lower() ) { - d->mAd.setPostalCode( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "organization" ].lower() ) { - d->mAddr.setOrganization( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "familyName" ].lower() ) { - d->mAddr.setFamilyName( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "uid" ].lower() ) { - d->mAddr.setUid( TQString::fromUtf8( value, value.size() ) ); - } else if ( name == mAttributes[ "jpegPhoto" ].lower() ) { - KABC::Picture photo; - TQImage img( value ); - if ( !img.isNull() ) { - photo.setData( img ); - photo.setType( "image/jpeg" ); - d->mAddr.setPhoto( photo ); - } - } - - break; - case LDIF::EndEntry: { - d->mAddr.setResource( this ); - d->mAddr.insertAddress( d->mAd ); - d->mAddr.setChanged( false ); - insertAddressee( d->mAddr ); - //clear the addressee - d->mAddr = Addressee(); - d->mAd = Address( Address::Home ); - } - break; - default: - break; - } - } while ( ret != LDIF::MoreData ); -} - -void ResourceLDAPTDEIO::loadCacheResult( TDEIO::Job *job ) -{ - mErrorMsg = ""; - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { - mErrorMsg = job->errorString(); - } - if ( !mErrorMsg.isEmpty() ) - emit loadingError( this, mErrorMsg ); - else - emit loadingFinished( this ); -} - -void ResourceLDAPTDEIO::result( TDEIO::Job *job ) -{ - mErrorMsg = ""; - if ( job ) { - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { - mErrorMsg = job->errorString(); - } - } else { - d->mError = 0; - } - activateCache(); - - TDEIO::Job *cjob; - cjob = loadFromCache(); - if ( cjob ) { - connect( cjob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( loadCacheResult( TDEIO::Job* ) ) ); - } else { - if ( !mErrorMsg.isEmpty() ) - emit loadingError( this, mErrorMsg ); - else - emit loadingFinished( this ); - } -} - -bool ResourceLDAPTDEIO::save( Ticket* ) -{ - kdDebug(7125) << "ResourceLDAPTDEIO save" << endl; - - d->mSaveIt = begin(); - TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); - enter_loop(); - if ( mErrorMsg.isEmpty() ) { - kdDebug(7125) << "ResourceLDAPTDEIO save ok!" << endl; - return true; - } else { - kdDebug(7125) << "ResourceLDAPTDEIO finished with error: " << mErrorMsg << endl; - addressBook()->error( mErrorMsg ); - return false; - } -} - -bool ResourceLDAPTDEIO::asyncSave( Ticket* ) -{ - kdDebug(7125) << "ResourceLDAPTDEIO asyncSave" << endl; - d->mSaveIt = begin(); - TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( saveResult( TDEIO::Job* ) ) ); - return true; -} - -void ResourceLDAPTDEIO::syncLoadSaveResult( TDEIO::Job *job ) -{ - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) - mErrorMsg = job->errorString(); - else - mErrorMsg = ""; - activateCache(); - - tqApp->exit_loop(); -} - -void ResourceLDAPTDEIO::saveResult( TDEIO::Job *job ) -{ - d->mError = job->error(); - if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) - emit savingError( this, job->errorString() ); - else - emit savingFinished( this ); -} - -void ResourceLDAPTDEIO::saveData( TDEIO::Job*, TQByteArray& data ) -{ - while ( d->mSaveIt != end() && - !(*d->mSaveIt).changed() ) d->mSaveIt++; - - if ( d->mSaveIt == end() ) { - kdDebug(7125) << "ResourceLDAPTDEIO endData" << endl; - data.resize(0); - return; - } - - kdDebug(7125) << "ResourceLDAPTDEIO saveData: " << (*d->mSaveIt).assembledName() << endl; - - AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) ); -// kdDebug(7125) << "ResourceLDAPTDEIO save LDIF: " << TQString::fromUtf8(data) << endl; - // mark as unchanged - (*d->mSaveIt).setChanged( false ); - - d->mSaveIt++; -} - -void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr ) -{ - TQString dn = findUid( addr.uid() ); - - kdDebug(7125) << "ResourceLDAPTDEIO: removeAddressee: " << dn << endl; - - if ( !mErrorMsg.isEmpty() ) { - addressBook()->error( mErrorMsg ); - return; - } - if ( !dn.isEmpty() ) { - kdDebug(7125) << "ResourceLDAPTDEIO: found uid: " << dn << endl; - LDAPUrl url( d->mLDAPUrl ); - url.setPath( "/" + dn ); - url.setExtension( "x-dir", "base" ); - url.setScope( LDAPUrl::Base ); - if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); - } else { - //maybe it's not saved yet - mAddrMap.erase( addr.uid() ); - } -} - - -void ResourceLDAPTDEIO::setUser( const TQString &user ) -{ - mUser = user; -} - -TQString ResourceLDAPTDEIO::user() const -{ - return mUser; -} - -void ResourceLDAPTDEIO::setPassword( const TQString &password ) -{ - mPassword = password; -} - -TQString ResourceLDAPTDEIO::password() const -{ - return mPassword; -} - -void ResourceLDAPTDEIO::setDn( const TQString &dn ) -{ - mDn = dn; -} - -TQString ResourceLDAPTDEIO::dn() const -{ - return mDn; -} - -void ResourceLDAPTDEIO::setHost( const TQString &host ) -{ - mHost = host; -} - -TQString ResourceLDAPTDEIO::host() const -{ - return mHost; -} - -void ResourceLDAPTDEIO::setPort( int port ) -{ - mPort = port; -} - -int ResourceLDAPTDEIO::port() const -{ - return mPort; -} - -void ResourceLDAPTDEIO::setVer( int ver ) -{ - d->mVer = ver; -} - -int ResourceLDAPTDEIO::ver() const -{ - return d->mVer; -} - -void ResourceLDAPTDEIO::setSizeLimit( int sizelimit ) -{ - d->mSizeLimit = sizelimit; -} - -int ResourceLDAPTDEIO::sizeLimit() -{ - return d->mSizeLimit; -} - -void ResourceLDAPTDEIO::setTimeLimit( int timelimit ) -{ - d->mTimeLimit = timelimit; -} - -int ResourceLDAPTDEIO::timeLimit() -{ - return d->mTimeLimit; -} - -void ResourceLDAPTDEIO::setFilter( const TQString &filter ) -{ - mFilter = filter; -} - -TQString ResourceLDAPTDEIO::filter() const -{ - return mFilter; -} - -void ResourceLDAPTDEIO::setIsAnonymous( bool value ) -{ - mAnonymous = value; -} - -bool ResourceLDAPTDEIO::isAnonymous() const -{ - return mAnonymous; -} - -void ResourceLDAPTDEIO::setIsTLS( bool value ) -{ - d->mTLS = value; -} - -bool ResourceLDAPTDEIO::isTLS() const -{ - return d->mTLS; -} -void ResourceLDAPTDEIO::setIsSSL( bool value ) -{ - d->mSSL = value; -} - -bool ResourceLDAPTDEIO::isSSL() const -{ - return d->mSSL; -} - -void ResourceLDAPTDEIO::setIsSubTree( bool value ) -{ - d->mSubTree = value; -} - -bool ResourceLDAPTDEIO::isSubTree() const -{ - return d->mSubTree; -} - -void ResourceLDAPTDEIO::setAttributes( const TQMap &attributes ) -{ - mAttributes = attributes; -} - -TQMap ResourceLDAPTDEIO::attributes() const -{ - return mAttributes; -} - -void ResourceLDAPTDEIO::setRDNPrefix( int value ) -{ - d->mRDNPrefix = value; -} - -int ResourceLDAPTDEIO::RDNPrefix() const -{ - return d->mRDNPrefix; -} - -void ResourceLDAPTDEIO::setIsSASL( bool value ) -{ - d->mSASL = value; -} - -bool ResourceLDAPTDEIO::isSASL() const -{ - return d->mSASL; -} - -void ResourceLDAPTDEIO::setMech( const TQString &mech ) -{ - d->mMech = mech; -} - -TQString ResourceLDAPTDEIO::mech() const -{ - return d->mMech; -} - -void ResourceLDAPTDEIO::setRealm( const TQString &realm ) -{ - d->mRealm = realm; -} - -TQString ResourceLDAPTDEIO::realm() const -{ - return d->mRealm; -} - -void ResourceLDAPTDEIO::setBindDN( const TQString &binddn ) -{ - d->mBindDN = binddn; -} - -TQString ResourceLDAPTDEIO::bindDN() const -{ - return d->mBindDN; -} - -void ResourceLDAPTDEIO::setCachePolicy( int pol ) -{ - d->mCachePolicy = pol; -} - -int ResourceLDAPTDEIO::cachePolicy() const -{ - return d->mCachePolicy; -} - -void ResourceLDAPTDEIO::setAutoCache( bool value ) -{ - d->mAutoCache = value; -} - -bool ResourceLDAPTDEIO::autoCache() -{ - return d->mAutoCache; -} - -TQString ResourceLDAPTDEIO::cacheDst() const -{ - return d->mCacheDst; -} - - -#include "resourceldaptdeio.moc" diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeio.h b/kabc/plugins/ldaptdeio/resourceldaptdeio.h deleted file mode 100644 index 5c9282b9c..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeio.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - Copyright (c) 2004 Szombathelyi György - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCELDAP_H -#define KABC_RESOURCELDAP_H - -#include -#include -#include - -class TDEConfig; - -namespace KABC { - -class KABC_EXPORT ResourceLDAPTDEIO : public Resource -{ - Q_OBJECT - - public: - enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always }; - - ResourceLDAPTDEIO( const TDEConfig* ); - virtual ~ResourceLDAPTDEIO(); - /** - * Call this after you used one of the set... methods - */ - virtual void init(); - - virtual void writeConfig( TDEConfig* ); - - virtual bool doOpen(); - virtual void doClose(); - - virtual Ticket *requestSaveTicket(); - virtual void releaseSaveTicket( Ticket* ); - - virtual bool readOnly() const { return Resource::readOnly(); } - virtual void setReadOnly( bool value ); - - virtual bool load(); - virtual bool asyncLoad(); - virtual bool save( Ticket * ticket ); - virtual bool asyncSave( Ticket * ticket ); - - virtual void removeAddressee( const Addressee& addr ); - - void setUser( const TQString &user ); - TQString user() const; - - void setPassword( const TQString &password ); - TQString password() const; - - void setRealm( const TQString &realm ); - TQString realm() const; - - void setBindDN( const TQString &binddn ); - TQString bindDN() const; - - void setDn( const TQString &dn ); - TQString dn() const; - - void setHost( const TQString &host ); - TQString host() const; - - void setPort( int port ); - int port() const; - - void setVer( int ver ); - int ver() const; - - void setSizeLimit( int sizelimit ); - int sizeLimit(); - - void setTimeLimit( int timelimit ); - int timeLimit(); - - void setFilter( const TQString &filter ); - TQString filter() const; - - void setIsAnonymous( bool value ); - bool isAnonymous() const; - - void setAttributes( const TQMap &attributes ); - TQMap attributes() const; - - void setRDNPrefix( int value ); - int RDNPrefix() const; - - void setIsTLS( bool value ); - bool isTLS() const ; - - void setIsSSL( bool value ); - bool isSSL() const; - - void setIsSubTree( bool value ); - bool isSubTree() const ; - - void setIsSASL( bool value ); - bool isSASL() const ; - - void setMech( const TQString &mech ); - TQString mech() const; - - void setCachePolicy( int pol ); - int cachePolicy() const; - - void setAutoCache( bool value ); - bool autoCache(); - - TQString cacheDst() const; - -protected slots: - void entries( TDEIO::Job*, const TDEIO::UDSEntryList& ); - void data( TDEIO::Job*, const TQByteArray& ); - void result( TDEIO::Job* ); - void listResult( TDEIO::Job* ); - void syncLoadSaveResult( TDEIO::Job* ); - void saveResult( TDEIO::Job* ); - void saveData( TDEIO::Job*, TQByteArray& ); - void loadCacheResult( TDEIO::Job* ); - - private: - TQString mUser; - TQString mPassword; - TQString mDn; - TQString mHost; - TQString mFilter; - int mPort; - bool mAnonymous; - TQMap mAttributes; - - KURL mLDAPUrl; - int mGetCounter; //KDE 4: remove - bool mErrorOccured; //KDE 4: remove - TQString mErrorMsg; - TQMap mJobMap; //KDE 4: remove - - TDEIO::Job *loadFromCache(); - void createCache(); - void activateCache(); - void enter_loop(); - TQCString addEntry( const TQString &attr, const TQString &value, bool mod ); - TQString findUid( const TQString &uid ); - bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, - const TQString &olddn ); - - class ResourceLDAPTDEIOPrivate; - ResourceLDAPTDEIOPrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp deleted file mode 100644 index f53ee7d30..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp +++ /dev/null @@ -1,388 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "resourceldaptdeio.h" - -#include "resourceldaptdeioconfig.h" -#include "resourceldaptdeioconfig.moc" - -using namespace KABC; - -ResourceLDAPTDEIOConfig::ResourceLDAPTDEIOConfig( TQWidget* parent, const char* name ) - : KRES::ConfigWidget( parent, name ) -{ - TQBoxLayout *mainLayout = new TQVBoxLayout( this ); - mainLayout->setAutoAdd( true ); - cfg = new LdapConfigWidget( LdapConfigWidget::W_ALL, this ); - - mSubTree = new TQCheckBox( i18n( "Sub-tree query" ), this ); - TQHBox *box = new TQHBox( this ); - box->setSpacing( KDialog::spacingHint() ); - mEditButton = new TQPushButton( i18n( "Edit Attributes..." ), box ); - mCacheButton = new TQPushButton( i18n( "Offline Use..." ), box ); - - connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editAttributes() ) ); - connect( mCacheButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCache() ) ); -} - -void ResourceLDAPTDEIOConfig::loadSettings( KRES::Resource *res ) -{ - ResourceLDAPTDEIO *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceLDAPTDEIOConfig::loadSettings(): cast failed" << endl; - return; - } - - cfg->setUser( resource->user() ); - cfg->setPassword( resource->password() ); - cfg->setRealm( resource->realm() ); - cfg->setBindDN( resource->bindDN() ); - cfg->setHost( resource->host() ); - cfg->setPort( resource->port() ); - cfg->setVer( resource->ver() ); - cfg->setTimeLimit( resource->timeLimit() ); - cfg->setSizeLimit( resource->sizeLimit() ); - cfg->setDn( resource->dn() ); - cfg->setFilter( resource->filter() ); - cfg->setMech( resource->mech() ); - if ( resource->isTLS() ) cfg->setSecTLS(); - else if ( resource->isSSL() ) cfg->setSecSSL(); - else cfg->setSecNO(); - if ( resource->isAnonymous() ) cfg->setAuthAnon(); - else if ( resource->isSASL() ) cfg->setAuthSASL(); - else cfg->setAuthSimple(); - - mSubTree->setChecked( resource->isSubTree() ); - mAttributes = resource->attributes(); - mRDNPrefix = resource->RDNPrefix(); - mCachePolicy = resource->cachePolicy(); - mCacheDst = resource->cacheDst(); - mAutoCache = resource->autoCache(); -} - -void ResourceLDAPTDEIOConfig::saveSettings( KRES::Resource *res ) -{ - ResourceLDAPTDEIO *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceLDAPTDEIOConfig::saveSettings(): cast failed" << endl; - return; - } - - resource->setUser( cfg->user() ); - resource->setPassword( cfg->password() ); - resource->setRealm( cfg->realm() ); - resource->setBindDN( cfg->bindDN() ); - resource->setHost( cfg->host() ); - resource->setPort( cfg->port() ); - resource->setVer( cfg->ver() ); - resource->setTimeLimit( cfg->timeLimit() ); - resource->setSizeLimit( cfg->sizeLimit() ); - resource->setDn( cfg->dn() ); - resource->setFilter( cfg->filter() ); - resource->setIsAnonymous( cfg->isAuthAnon() ); - resource->setIsSASL( cfg->isAuthSASL() ); - resource->setMech( cfg->mech() ); - resource->setIsTLS( cfg->isSecTLS() ); - resource->setIsSSL( cfg->isSecSSL() ); - resource->setIsSubTree( mSubTree->isChecked() ); - resource->setAttributes( mAttributes ); - resource->setRDNPrefix( mRDNPrefix ); - resource->setCachePolicy( mCachePolicy ); - resource->init(); - -} - -void ResourceLDAPTDEIOConfig::editAttributes() -{ - AttributesDialog dlg( mAttributes, mRDNPrefix, this ); - if ( dlg.exec() ) { - mAttributes = dlg.attributes(); - mRDNPrefix = dlg.rdnprefix(); - } -} - -void ResourceLDAPTDEIOConfig::editCache() -{ - LDAPUrl src; - TQStringList attr; - - src = cfg->url(); - src.setScope( mSubTree->isChecked() ? LDAPUrl::Sub : LDAPUrl::One ); - if (!mAttributes.empty()) { - TQMap::Iterator it; - TQStringList attr; - for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { - if ( !it.data().isEmpty() && it.key() != "objectClass" ) - attr.append( it.data() ); - } - src.setAttributes( attr ); - } - src.setExtension( "x-dir", "base" ); - OfflineDialog dlg( mAutoCache, mCachePolicy, src, mCacheDst, this ); - if ( dlg.exec() ) { - mCachePolicy = dlg.cachePolicy(); - mAutoCache = dlg.autoCache(); - } - -} - -AttributesDialog::AttributesDialog( const TQMap &attributes, - int rdnprefix, - TQWidget *parent, const char *name ) - : KDialogBase( Plain, i18n( "Attributes Configuration" ), Ok | Cancel, - Ok, parent, name, true, true ) -{ - mNameDict.setAutoDelete( true ); - mNameDict.insert( "objectClass", new TQString( i18n( "Object classes" ) ) ); - mNameDict.insert( "commonName", new TQString( i18n( "Common name" ) ) ); - mNameDict.insert( "formattedName", new TQString( i18n( "Formatted name" ) ) ); - mNameDict.insert( "familyName", new TQString( i18n( "Family name" ) ) ); - mNameDict.insert( "givenName", new TQString( i18n( "Given name" ) ) ); - mNameDict.insert( "organization", new TQString( i18n( "Organization" ) ) ); - mNameDict.insert( "title", new TQString( i18n( "Title" ) ) ); - mNameDict.insert( "street", new TQString( i18n( "Street" ) ) ); - mNameDict.insert( "state", new TQString( i18n( "State" ) ) ); - mNameDict.insert( "city", new TQString( i18n( "City" ) ) ); - mNameDict.insert( "postalcode", new TQString( i18n( "Postal code" ) ) ); - mNameDict.insert( "mail", new TQString( i18n( "Email" ) ) ); - mNameDict.insert( "mailAlias", new TQString( i18n( "Email alias" ) ) ); - mNameDict.insert( "phoneNumber", new TQString( i18n( "Telephone number" ) ) ); - mNameDict.insert( "telephoneNumber", new TQString( i18n( "Work telephone number" ) ) ); - mNameDict.insert( "facsimileTelephoneNumber", new TQString( i18n( "Fax number" ) ) ); - mNameDict.insert( "mobile", new TQString( i18n( "Cell phone number" ) ) ); - mNameDict.insert( "pager", new TQString( i18n( "Pager" ) ) ); - mNameDict.insert( "description", new TQString( i18n( "Note" ) ) ); - mNameDict.insert( "uid", new TQString( i18n( "UID" ) ) ); - mNameDict.insert( "jpegPhoto", new TQString( i18n( "Photo" ) ) ); - - // default map - mDefaultMap.insert( "objectClass", "inetOrgPerson" ); - mDefaultMap.insert( "commonName", "cn" ); - mDefaultMap.insert( "formattedName", "displayName" ); - mDefaultMap.insert( "familyName", "sn" ); - mDefaultMap.insert( "givenName", "givenName" ); - mDefaultMap.insert( "title", "title" ); - mDefaultMap.insert( "street", "street" ); - mDefaultMap.insert( "state", "st" ); - mDefaultMap.insert( "city", "l" ); - mDefaultMap.insert( "organization", "o" ); - mDefaultMap.insert( "postalcode", "postalCode" ); - mDefaultMap.insert( "mail", "mail" ); - mDefaultMap.insert( "mailAlias", "" ); - mDefaultMap.insert( "phoneNumber", "homePhone" ); - mDefaultMap.insert( "telephoneNumber", "telephoneNumber" ); - mDefaultMap.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); - mDefaultMap.insert( "mobile", "mobile" ); - mDefaultMap.insert( "pager", "pager" ); - mDefaultMap.insert( "description", "description" ); - mDefaultMap.insert( "uid", "uid" ); - mDefaultMap.insert( "jpegPhoto", "jpegPhoto" ); - - // overwrite the default values here - TQMap kolabMap, netscapeMap, evolutionMap, outlookMap; - - // kolab - kolabMap.insert( "formattedName", "display-name" ); - kolabMap.insert( "mailAlias", "mailalias" ); - - // evolution - evolutionMap.insert( "formattedName", "fileAs" ); - - mMapList.append( attributes ); - mMapList.append( kolabMap ); - mMapList.append( netscapeMap ); - mMapList.append( evolutionMap ); - mMapList.append( outlookMap ); - - TQFrame *page = plainPage(); - TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1, - 0, spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Template:" ), page ); - layout->addWidget( label, 0, 0 ); - mMapCombo = new KComboBox( page ); - layout->addWidget( mMapCombo, 0, 1 ); - - mMapCombo->insertItem( i18n( "User Defined" ) ); - mMapCombo->insertItem( i18n( "Kolab" ) ); - mMapCombo->insertItem( i18n( "Netscape" ) ); - mMapCombo->insertItem( i18n( "Evolution" ) ); - mMapCombo->insertItem( i18n( "Outlook" ) ); - connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) ); - - label = new TQLabel( i18n( "RDN prefix attribute:" ), page ); - layout->addWidget( label, 1, 0 ); - mRDNCombo = new KComboBox( page ); - layout->addWidget( mRDNCombo, 1, 1 ); - mRDNCombo->insertItem( i18n( "commonName" ) ); - mRDNCombo->insertItem( i18n( "UID" ) ); - mRDNCombo->setCurrentItem( rdnprefix ); - - TQMap::ConstIterator it; - int i, j = 0; - for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) { - if ( mNameDict[ it.key() ] == 0 ) { - i--; - continue; - } - if ( (uint)(i - 2) == ( mNameDict.count() >> 1 ) ) { - i = 0; - j = 2; - } - kdDebug(7125) << "itkey: " << it.key() << " i: " << i << endl; - label = new TQLabel( *mNameDict[ it.key() ] + ":", page ); - KLineEdit *lineedit = new KLineEdit( page ); - mLineEditDict.insert( it.key(), lineedit ); - lineedit->setText( it.data() ); - label->setBuddy( lineedit ); - layout->addWidget( label, i, j ); - layout->addWidget( lineedit, i, j+1 ); - } - - for ( i = 1; i < mMapCombo->count(); i++ ) { - TQDictIterator it2( mLineEditDict ); - for ( ; it2.current(); ++it2 ) { - if ( mMapList[ i ].contains( it2.currentKey() ) ) { - if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break; - } else { - if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break; - } - } - if ( !it2.current() ) { - mMapCombo->setCurrentItem( i ); - break; - } - } - - TDEAcceleratorManager::manage( this ); -} - -AttributesDialog::~AttributesDialog() -{ -} - -TQMap AttributesDialog::attributes() const -{ - TQMap map; - - TQDictIterator it( mLineEditDict ); - for ( ; it.current(); ++it ) - map.insert( it.currentKey(), it.current()->text() ); - - return map; -} - -int AttributesDialog::rdnprefix() const -{ - return mRDNCombo->currentItem(); -} - -void AttributesDialog::mapChanged( int pos ) -{ - - // apply first the default and than the spezific changes - TQMap::Iterator it; - for ( it = mDefaultMap.begin(); it != mDefaultMap.end(); ++it ) - mLineEditDict[ it.key() ]->setText( it.data() ); - - for ( it = mMapList[ pos ].begin(); it != mMapList[ pos ].end(); ++it ) { - if ( !it.data().isEmpty() ) { - KLineEdit *le = mLineEditDict[ it.key() ]; - if ( le ) le->setText( it.data() ); - } - } -} - -OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, - const TQString &dst, TQWidget *parent, const char *name ) - : KDialogBase( Plain, i18n( "Offline Configuration" ), Ok | Cancel, - Ok, parent, name, true, true ) -{ - TQFrame *page = plainPage(); - TQVBoxLayout *layout = new TQVBoxLayout( page ); - layout->setAutoAdd( true ); - - mSrc = src; mDst = dst; - mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal, - i18n("Offline Cache Policy"), page ); - - TQRadioButton *bt; - new TQRadioButton( i18n("Do not use offline cache"), mCacheGroup ); - bt = new TQRadioButton( i18n("Use local copy if no connection"), mCacheGroup ); - new TQRadioButton( i18n("Always use local copy"), mCacheGroup ); - mCacheGroup->setButton( cachePolicy ); - - mAutoCache = new TQCheckBox( i18n("Refresh offline cache automatically"), - page ); - mAutoCache->setChecked( autoCache ); - mAutoCache->setEnabled( bt->isChecked() ); - - connect( bt, TQT_SIGNAL(toggled(bool)), mAutoCache, TQT_SLOT(setEnabled(bool)) ); - - TQPushButton *lcache = new TQPushButton( i18n("Load into Cache"), page ); - connect( lcache, TQT_SIGNAL( clicked() ), TQT_SLOT( loadCache() ) ); -} - -OfflineDialog::~OfflineDialog() -{ -} - -bool OfflineDialog::autoCache() const -{ - return mAutoCache->isChecked(); -} - -int OfflineDialog::cachePolicy() const -{ - return mCacheGroup->selectedId(); -} - -void OfflineDialog::loadCache() -{ - if ( TDEIO::NetAccess::download( mSrc, mDst, this ) ) { - KMessageBox::information( this, - i18n("Successfully downloaded directory server contents!") ); - } else { - KMessageBox::error( this, - i18n("An error occurred downloading directory server contents into file %1.").arg(mDst) ); - } -} diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h deleted file mode 100644 index 0fde41d64..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 - 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCELDAPCONFIG_H -#define RESOURCELDAPCONFIG_H - -#include -#include -#include -#include - -#include -#include -#include -#include - - -class TQCheckBox; -class TQPushButton; -class TQSpinBox; -class TQString; - -class KComboBox; -class KLineEdit; - -namespace KABC { - -class KABC_EXPORT ResourceLDAPTDEIOConfig : public KRES::ConfigWidget -{ - Q_OBJECT - - public: - ResourceLDAPTDEIOConfig( TQWidget* parent = 0, const char* name = 0 ); - - public slots: - void loadSettings( KRES::Resource* ); - void saveSettings( KRES::Resource* ); - - private slots: - void editAttributes(); - void editCache(); - private: - TQPushButton *mEditButton, *mCacheButton; - LdapConfigWidget *cfg; - TQCheckBox *mSubTree; - TQMap mAttributes; - int mRDNPrefix, mCachePolicy; - bool mAutoCache; - TQString mCacheDst; -}; - -class AttributesDialog : public KDialogBase -{ - Q_OBJECT - - public: - AttributesDialog( const TQMap &attributes, int rdnprefix, - TQWidget *parent, const char *name = 0 ); - ~AttributesDialog(); - - TQMap attributes() const; - int rdnprefix() const; - - private slots: - void mapChanged( int pos ); - - private: - enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap }; - - KComboBox *mMapCombo, *mRDNCombo; - TQValueList< TQMap > mMapList; - TQMap mDefaultMap; - TQDict mLineEditDict; - TQDict mNameDict; -}; - -class OfflineDialog : public KDialogBase -{ - Q_OBJECT - - public: - OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, - const TQString &dst, TQWidget *parent, const char *name = 0 ); - ~OfflineDialog(); - - int cachePolicy() const; - bool autoCache() const; - - private slots: - void loadCache(); - - private: - KURL mSrc; - TQString mDst; - TQButtonGroup *mCacheGroup; - TQCheckBox *mAutoCache; -}; - -} - -#endif diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp deleted file mode 100644 index ac08e8e2b..000000000 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourceldaptdeio.h" -#include "resourceldaptdeioconfig.h" - -#include -#include - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_ldaptdeio() - { - TDEGlobal::locale()->insertCatalogue("kabc_ldaptdeio"); - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/net/CMakeLists.txt b/kabc/plugins/net/CMakeLists.txt deleted file mode 100644 index e92fbfc32..000000000 --- a/kabc/plugins/net/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR}/kabc - - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdeio - ${CMAKE_SOURCE_DIR}/tdeio/tdefile -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - resourcenet.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### other data ################################ - -install( FILES net.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) - - -##### kabc_net (library) ######################## - -set( target kabc_net ) - -set( ${target}_SRCS - resourcenet.cpp resourcenetconfig.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 1.0.0 - LINK kabc-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kabc_net (module) ######################### - -set( target kabc_net ) - -set( ${target}_SRCS - resourcenetplugin.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kabc_net-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kabc/plugins/net/Makefile.am b/kabc/plugins/net/Makefile.am deleted file mode 100644 index ca0ece015..000000000 --- a/kabc/plugins/net/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcenetconfig.h - -lib_LTLIBRARIES = libkabc_net.la -libkabc_net_la_SOURCES = resourcenet.cpp resourcenetconfig.cpp -libkabc_net_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined -libkabc_net_la_LIBADD = $(top_builddir)/kabc/libkabc.la $(LIB_KIO) -libkabc_net_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h - -kde_module_LTLIBRARIES = kabc_net.la -kabc_net_la_SOURCES = resourcenetplugin.cpp -kabc_net_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -L../../../tdecore/.libs/ -ltdecore -kabc_net_la_LIBADD = libkabc_net.la - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_net.pot - -kabcincludedir = $(includedir)/kabc -kabcinclude_HEADERS = resourcenet.h - -servicedir = $(kde_servicesdir)/tderesources/kabc -service_DATA = net.desktop - -resourcenetplugin.lo: ../../addressee.h diff --git a/kabc/plugins/net/net.desktop b/kabc/plugins/net/net.desktop deleted file mode 100644 index 2c72c202d..000000000 --- a/kabc/plugins/net/net.desktop +++ /dev/null @@ -1,90 +0,0 @@ -[Desktop Entry] -Name=Network -Name[af]=Netwerk -Name[ar]=الشبكة -Name[az]=ŞəbÉ™kÉ™ -Name[be]=Сетка -Name[bn]=নেটওয়ারà§à¦• -Name[br]=Rouedad -Name[bs]=Mreža -Name[ca]=Xarxa -Name[cs]=Síť -Name[csb]=Sec -Name[cy]=Rhydwaith -Name[da]=Netværk -Name[de]=Netzwerk -Name[el]=Δίκτυο -Name[eo]=Reto -Name[es]=Red -Name[et]=Võrk -Name[eu]=Sarea -Name[fa]=شبکه -Name[fi]=Verkko -Name[fr]=Réseau -Name[fy]=Netwurk -Name[ga]=Líonra -Name[gl]=Rede -Name[he]=רשת -Name[hi]=नेटवरà¥à¤• -Name[hr]=Mreža -Name[hsb]=Syć -Name[hu]=Hálózat -Name[id]=Jaringan -Name[is]=Net -Name[it]=Rete -Name[ja]=ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ -Name[ka]=ქსელი -Name[kk]=Желі -Name[km]=បណ្ážáž¶áž‰ -Name[ko]=ë„¤íŠ¸ì›Œí¬ -Name[ku]=Tor -Name[lb]=Netzwierk -Name[lt]=Tinklas -Name[lv]=TÄ«kls -Name[mi]=Hao -Name[mk]=Мрежа -Name[mn]=СүлжÑÑ -Name[ms]=Jaringan -Name[nds]=Nettwark -Name[ne]=सञà¥à¤œà¤¾à¤² -Name[nl]=Netwerk -Name[nn]=Nettverk -Name[nso]=Kgokagano -Name[oc]=Resèu -Name[pa]=ਨੈੱਟਵਰਕ -Name[pl]=Sieć -Name[pt]=Rede -Name[pt_BR]=Rede -Name[ro]=ReÅ£ea -Name[ru]=Сеть -Name[rw]=Urusobe -Name[se]=Fierbmi -Name[sk]=SieÅ¥ -Name[sl]=Omrežje -Name[sq]=Rrjeta -Name[sr]=Мрежа -Name[sr@Latn]=Mreža -Name[ss]=Luchungechunge -Name[sv]=Nätverk -Name[ta]=பிணையம௠-Name[te]=కలన జాలం -Name[tg]=Шабака -Name[th]=ระบบเครือข่าย -Name[tr]=AÄŸ -Name[tt]=Çeltär -Name[uk]=Мережа -Name[uz]=Tarmoq -Name[uz@cyrillic]=Tarмоқ -Name[ven]=Vhukwamani -Name[vi]=mạng -Name[wa]=Rantoele -Name[xh]=Umsebenzi womnatha -Name[zh_CN]=网络 -Name[zh_HK]=網絡 -Name[zh_TW]=網路 -Name[zu]=Umsebenzi wokuxhumana okusakazekile -X-TDE-Library=kabc_net -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=contact -X-TDE-ResourceType=net diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp deleted file mode 100644 index 9ef909904..000000000 --- a/kabc/plugins/net/resourcenet.cpp +++ /dev/null @@ -1,393 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "formatfactory.h" -#include "resourcenetconfig.h" -#include "stdaddressbook.h" - -#include "resourcenet.h" - -using namespace KABC; - -class ResourceNet::ResourceNetPrivate -{ - public: - TDEIO::Job *mLoadJob; - bool mIsLoading; - - TDEIO::Job *mSaveJob; - bool mIsSaving; - - TQString mLastErrorString; -}; - -ResourceNet::ResourceNet( const TDEConfig *config ) - : Resource( config ), mFormat( 0 ), - mTempFile( 0 ), - d( new ResourceNetPrivate ) -{ - if ( config ) { - init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) ); - } else { - init( KURL(), TQString("vcard").latin1() ); - } -} - -ResourceNet::ResourceNet( const KURL &url, const TQString &format ) - : Resource( 0 ), mFormat( 0 ), - mTempFile( 0 ), - d( new ResourceNetPrivate ) -{ - init( url, format ); -} - -void ResourceNet::init( const KURL &url, const TQString &format ) -{ - d->mLoadJob = 0; - d->mIsLoading = false; - d->mSaveJob = 0; - d->mIsSaving = false; - - mFormatName = format; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); - if ( !mFormat ) { - mFormatName = TQString("vcard").latin1(); - mFormat = factory->format( mFormatName ); - } - - setUrl( url ); -} - -ResourceNet::~ResourceNet() -{ - if ( d->mIsLoading ) - d->mLoadJob->kill(); - if ( d->mIsSaving ) - d->mSaveJob->kill(); - - delete d; - d = 0; - - delete mFormat; - mFormat = 0; - - deleteLocalTempFile(); -} - -void ResourceNet::writeConfig( TDEConfig *config ) -{ - Resource::writeConfig( config ); - - config->writePathEntry( "NetUrl", mUrl.url() ); - config->writeEntry( "NetFormat", mFormatName ); -} - -Ticket *ResourceNet::requestSaveTicket() -{ - kdDebug(5700) << "ResourceNet::requestSaveTicket()" << endl; - - return createTicket( this ); -} - -void ResourceNet::releaseSaveTicket( Ticket *ticket ) -{ - delete ticket; -} - -bool ResourceNet::doOpen() -{ - return true; -} - -void ResourceNet::doClose() -{ -} - -bool ResourceNet::load() -{ - TQString tempFile; - - if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) { - addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); - return false; - } - - TQFile file( tempFile ); - if ( !file.open( IO_ReadOnly ) ) { - addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); - TDEIO::NetAccess::removeTempFile( tempFile ); - return false; - } - - bool result = clearAndLoad( &file ); - if ( !result ) - addressBook()->error( i18n( "Problems during parsing file '%1'." ).arg( tempFile ) ); - - TDEIO::NetAccess::removeTempFile( tempFile ); - - return result; -} - -bool ResourceNet::clearAndLoad( TQFile *file ) -{ - clear(); - return mFormat->loadAll( addressBook(), this, file ); -} - -bool ResourceNet::asyncLoad() -{ - if ( d->mIsLoading ) { - abortAsyncLoading(); - } - - if (d->mIsSaving) { - kdWarning(5700) << "Aborted asyncLoad() because we're still asyncSave()ing!" << endl; - return false; - } - - bool ok = createLocalTempFile(); - if ( ok ) - mTempFile->sync(); - ok = mTempFile->close(); - - if ( !ok ) { - emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); - deleteLocalTempFile(); - return false; - } - - KURL dest; - dest.setPath( mTempFile->name() ); - - TDEIO::Scheduler::checkSlaveOnHold( true ); - d->mLoadJob = TDEIO::file_copy( mUrl, dest, -1, true, false, false ); - d->mIsLoading = true; - connect( d->mLoadJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( downloadFinished( TDEIO::Job* ) ) ); - - return true; -} - -void ResourceNet::abortAsyncLoading() -{ - kdDebug(5700) << "ResourceNet::abortAsyncLoading()" << endl; - - if ( d->mLoadJob ) { - d->mLoadJob->kill(); // result not emitted - d->mLoadJob = 0; - } - - deleteLocalTempFile(); - d->mIsLoading = false; -} - -void ResourceNet::abortAsyncSaving() -{ - kdDebug(5700) << "ResourceNet::abortAsyncSaving()" << endl; - - if ( d->mSaveJob ) { - d->mSaveJob->kill(); // result not emitted - d->mSaveJob = 0; - } - - deleteLocalTempFile(); - d->mIsSaving = false; -} - -bool ResourceNet::save( Ticket* ) -{ - kdDebug(5700) << "ResourceNet::save()" << endl; - - if (d->mIsSaving) { - abortAsyncSaving(); - } - - KTempFile tempFile; - tempFile.setAutoDelete( true ); - bool ok = false; - - if ( tempFile.status() == 0 && tempFile.file() ) { - saveToFile( tempFile.file() ); - tempFile.sync(); - ok = tempFile.close(); - } - - if ( !ok ) { - addressBook()->error( i18n( "Unable to save file '%1'." ).arg( tempFile.name() ) ); - return false; - } - - ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); - if ( !ok ) - addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) ); - - return ok; -} - -bool ResourceNet::asyncSave( Ticket* ) -{ - kdDebug(5700) << "ResourceNet::asyncSave()" << endl; - - if (d->mIsSaving) { - abortAsyncSaving(); - } - - if (d->mIsLoading) { - kdWarning(5700) << "Aborted asyncSave() because we're still asyncLoad()ing!" << endl; - return false; - } - - bool ok = createLocalTempFile(); - if ( ok ) { - saveToFile( mTempFile->file() ); - mTempFile->sync(); - ok = mTempFile->close(); - } - - if ( !ok ) { - emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mTempFile->name() ) ); - deleteLocalTempFile(); - return false; - } - - KURL src; - src.setPath( mTempFile->name() ); - - TDEIO::Scheduler::checkSlaveOnHold( true ); - d->mIsSaving = true; - d->mSaveJob = TDEIO::file_copy( src, mUrl, -1, true, false, false ); - connect( d->mSaveJob, TQT_SIGNAL( result( TDEIO::Job* ) ), - this, TQT_SLOT( uploadFinished( TDEIO::Job* ) ) ); - - return true; -} - -bool ResourceNet::createLocalTempFile() -{ - deleteStaleTempFile(); - mTempFile = new KTempFile(); - mTempFile->setAutoDelete( true ); - return mTempFile->status() == 0; -} - -void ResourceNet::deleteStaleTempFile() -{ - if ( hasTempFile() ) { - kdDebug(5700) << "stale temp file detected " << mTempFile->name() << endl; - deleteLocalTempFile(); - } -} - -void ResourceNet::deleteLocalTempFile() -{ - delete mTempFile; - mTempFile = 0; -} - -void ResourceNet::saveToFile( TQFile *file ) -{ - mFormat->saveAll( addressBook(), this, file ); -} - -void ResourceNet::setUrl( const KURL &url ) -{ - mUrl = url; -} - -KURL ResourceNet::url() const -{ - return mUrl; -} - -void ResourceNet::setFormat( const TQString &name ) -{ - mFormatName = name; - if ( mFormat ) - delete mFormat; - - FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); -} - -TQString ResourceNet::format() const -{ - return mFormatName; -} - -void ResourceNet::downloadFinished( TDEIO::Job* ) -{ - kdDebug(5700) << "ResourceNet::downloadFinished()" << endl; - - d->mIsLoading = false; - - if ( !hasTempFile() || mTempFile->status() != 0 ) { - d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" ); - TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) ); - return; - } - - TQFile file( mTempFile->name() ); - if ( file.open( IO_ReadOnly ) ) { - if ( clearAndLoad( &file ) ) - emit loadingFinished( this ); - else - emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mTempFile->name() ) ); - } - else { - emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); - } - - deleteLocalTempFile(); -} - -void ResourceNet::uploadFinished( TDEIO::Job *job ) -{ - kdDebug(5700) << "ResourceFile::uploadFinished()" << endl; - - d->mIsSaving = false; - - if ( job->error() ) - emit savingError( this, job->errorString() ); - else - emit savingFinished( this ); - - deleteLocalTempFile(); -} - -void ResourceNet::signalError() -{ - emit loadingError( this, d->mLastErrorString ); - d->mLastErrorString.truncate( 0 ); -} - -#include "resourcenet.moc" diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h deleted file mode 100644 index 940627ecb..000000000 --- a/kabc/plugins/net/resourcenet.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCENET_H -#define KABC_RESOURCENET_H - -#include - -#include - -#include - -class TQFile; -class TQTimer; -class KTempFile; - -namespace TDEIO { -class Job; -} - -namespace KABC { - -class FormatPlugin; - -/** - @internal -*/ -class KABC_EXPORT ResourceNet : public Resource -{ - Q_OBJECT - - public: - ResourceNet( const TDEConfig* ); - ResourceNet( const KURL &url, const TQString &format ); - ~ResourceNet(); - - virtual void writeConfig( TDEConfig* ); - - virtual bool doOpen(); - virtual void doClose(); - - virtual Ticket *requestSaveTicket(); - virtual void releaseSaveTicket( Ticket* ); - - virtual bool load(); - virtual bool asyncLoad(); - virtual bool save( Ticket* ticket ); - virtual bool asyncSave( Ticket* ticket ); - - /** - Set url of directory to be used for saving. - */ - void setUrl( const KURL & ); - - /** - Return url of directory used for loading and saving the address book. - */ - KURL url() const; - - /** - Sets a new format by name. - */ - void setFormat( const TQString &name ); - - /** - Returns the format name. - */ - TQString format() const; - - protected: - void init( const KURL &url, const TQString &format ); - - private slots: - void downloadFinished( TDEIO::Job* ); - void uploadFinished( TDEIO::Job* ); - void signalError(); - - private: - bool clearAndLoad( TQFile *file ); - void saveToFile( TQFile *file ); - bool hasTempFile() const { return mTempFile != 0; } - void abortAsyncLoading(); - void abortAsyncSaving(); - bool createLocalTempFile(); - void deleteLocalTempFile(); - void deleteStaleTempFile(); - - FormatPlugin *mFormat; - TQString mFormatName; - - KURL mUrl; - KTempFile *mTempFile; - - class ResourceNetPrivate; - ResourceNetPrivate *d; -}; - -} - -#endif diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp deleted file mode 100644 index b441fbd98..000000000 --- a/kabc/plugins/net/resourcenetconfig.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include - -#include "formatfactory.h" -#include "resourcenet.h" -#include "stdaddressbook.h" - -#include "resourcenetconfig.h" - -using namespace KABC; - -ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name ) - : ConfigWidget( parent, name ), mInEditMode( false ) -{ - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, - KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n( "Format:" ), this ); - mFormatBox = new KComboBox( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mFormatBox, 0, 1 ); - - label = new TQLabel( i18n( "Location:" ), this ); - mUrlEdit = new KURLRequester( this ); - mUrlEdit->setMode( KFile::File ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mUrlEdit, 1, 1 ); - - FormatFactory *factory = FormatFactory::self(); - TQStringList formats = factory->formats(); - TQStringList::Iterator it; - for ( it = formats.begin(); it != formats.end(); ++it ) { - FormatInfo *info = factory->info( *it ); - if ( info ) { - mFormatTypes << (*it); - mFormatBox->insertItem( info->nameLabel ); - } - } -} - -void ResourceNetConfig::setEditMode( bool value ) -{ - mFormatBox->setEnabled( !value ); - mInEditMode = value; -} - -void ResourceNetConfig::loadSettings( KRES::Resource *res ) -{ - ResourceNet *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceNetConfig::loadSettings(): cast failed" << endl; - return; - } - - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); - - mUrlEdit->setURL( resource->url().url() ); -} - -void ResourceNetConfig::saveSettings( KRES::Resource *res ) -{ - ResourceNet *resource = dynamic_cast( res ); - - if ( !resource ) { - kdDebug(5700) << "ResourceNetConfig::saveSettings(): cast failed" << endl; - return; - } - - if ( !mInEditMode ) - resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); - - resource->setUrl( KURL( mUrlEdit->url() ) ); -} - -#include "resourcenetconfig.moc" diff --git a/kabc/plugins/net/resourcenetconfig.h b/kabc/plugins/net/resourcenetconfig.h deleted file mode 100644 index 3c8986122..000000000 --- a/kabc/plugins/net/resourcenetconfig.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCENETCONFIG_H -#define RESOURCENETCONFIG_H - -#include -#include - -#include - -namespace KABC { - -class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget -{ - Q_OBJECT - - public: - ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 ); - - void setEditMode( bool value ); - - public slots: - void loadSettings( KRES::Resource *resource ); - void saveSettings( KRES::Resource *resource ); - - private: - KComboBox* mFormatBox; - KURLRequester* mUrlEdit; - - TQStringList mFormatTypes; - bool mInEditMode; -}; - -} -#endif diff --git a/kabc/plugins/net/resourcenetplugin.cpp b/kabc/plugins/net/resourcenetplugin.cpp deleted file mode 100644 index 189bab051..000000000 --- a/kabc/plugins/net/resourcenetplugin.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "resourcenet.h" -#include "resourcenetconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_net() - { - return new KRES::PluginFactory(); - } -} diff --git a/kabc/plugins/sql/Makefile.am b/kabc/plugins/sql/Makefile.am deleted file mode 100644 index 3fa3986ce..000000000 --- a/kabc/plugins/sql/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) - -# these are the headers for your project -noinst_HEADERS = resourcesql.h resourcesqlconfig.h - -kde_module_LTLIBRARIES = kabc_sql.la - -kabc_sql_la_SOURCES = resourcesql.cpp resourcesqlconfig.cpp - -kabc_sql_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kabc_sql_la_LIBADD = ../../libkabc.la ../../../tdeui/libtdeui.la - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kabc_sql.pot - -linkdir = $(kde_datadir)/tderesources/contact -link_DATA = sql.desktop -EXTRA_DIST = $(link_DATA) diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp deleted file mode 100644 index 150fe54eb..000000000 --- a/kabc/plugins/sql/resourcesql.cpp +++ /dev/null @@ -1,338 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include - -#include "resourcesql.h" -#include "resourcesqlconfig.h" - -using namespace KABC; - -extern "C" -{ - KDE_EXPORT void *init_kabc_sql() - { - return new KRES::PluginFactory(); - } -} - -ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config ) - : Resource( ab ), mDb( 0 ) -{ - TQString user, password, db, host; - - user = config->readEntry( "SqlUser" ); - password = cryptStr( config->readEntry( "SqlPassword " ) ); - db = config->readEntry( "SqlName" ); - host = config->readEntry( "SqlHost" ); - - init( user, password, db, host ); -} - -ResourceSql::ResourceSql( AddressBook *ab, const TQString &user, - const TQString &password, const TQString &db, const TQString &host ) - : Resource( ab ), mDb( 0 ) -{ - init( user, password, db, host ); -} - -void ResourceSql::init( const TQString &user, const TQString &password, - const TQString &db, const TQString &host ) -{ - mUser = user; - mPassword = password; - mDbName = db; - mHost = host; -} - -Ticket *ResourceSql::requestSaveTicket() -{ - if ( !addressBook() ) { - kdDebug(5700) << "no addressbook" << endl; - return 0; - } - - return createTicket( this ); -} - -bool ResourceSql::open() -{ - TQStringList drivers = TQSqlDatabase::drivers(); - for ( TQStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) { - kdDebug(5700) << "Driver: " << (*it) << endl; - } - - mDb = TQSqlDatabase::addDatabase( "QMYSQL3" ); - - if ( !mDb ) { - kdDebug(5700) << "Error. Unable to connect to database." << endl; - return false; - } - - mDb->setDatabaseName( mDbName ); - mDb->setUserName( mUser ); - mDb->setPassword( mPassword ); - mDb->setHostName( mHost ); - - if ( !mDb->open() ) { - kdDebug(5700) << "Error. Unable to open database '" << mDbName << "'." << endl; - return false; - } - - return true; -} - -void ResourceSql::close() -{ - mDb->close(); -} - -bool ResourceSql::load() -{ - TQSqlQuery query( "select addressId, name, familyName, givenName, " - "additionalName, prefix, suffix, nickname, birthday, " - "mailer, timezone, geo_latitude, geo_longitude, title, " - "role, organization, note, productId, revision, " - "sortString, url from kaddressbook_main_" + mUser ); - - while ( query.next() ) { - TQString addrId = query.value(0).toString(); - - Addressee addr; - addr.setResource( this ); - addr.setUid( addrId ); - addr.setName( query.value(1).toString() ); - addr.setFamilyName( query.value(2).toString() ); - addr.setGivenName( query.value(3).toString() ); - addr.setAdditionalName( query.value(4).toString() ); - addr.setPrefix( query.value(5).toString() ); - addr.setSuffix( query.value(6).toString() ); - addr.setNickName( query.value(7).toString() ); - addr.setBirthday( query.value(8).toDateTime() ); - addr.setMailer( query.value(9).toString() ); - addr.setTimeZone( TimeZone( query.value(10).toInt() ) ); - addr.setGeo( Geo( query.value(11).toDouble(), query.value(12).toDouble() ) ); - addr.setTitle( query.value(13).toString() ); - addr.setRole( query.value(14).toString() ); - addr.setOrganization( query.value(15).toString() ); - addr.setNote( query.value(16).toString() ); - addr.setProductId( query.value(17).toString() ); - addr.setRevision( query.value(18).toDateTime() ); - addr.setSortString( query.value(19).toString() ); - addr.setUrl( query.value(20).toString() ); - - // emails - { - TQSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails " - "where addressId = '" + addrId + "'" ); - while ( emailsQuery.next() ) - addr.insertEmail( emailsQuery.value( 0 ).toString(), - emailsQuery.value( 1 ).toInt() ); - } - - // phones - { - TQSqlQuery phonesQuery( "select number, type from kaddressbook_phones " - "where addressId = '" + addrId + "'" ); - while ( phonesQuery.next() ) - addr.insertPhoneNumber( PhoneNumber( phonesQuery.value( 0 ).toString(), - phonesQuery.value( 1 ).toInt() ) ); - } - - // addresses - { - TQSqlQuery addressesQuery( "select postOfficeBox, extended, street, " - "locality, region, postalCode, country, label, type " - "from kaddressbook_addresses where addressId = '" + addrId + "'" ); - while ( addressesQuery.next() ) { - Address a; - a.setPostOfficeBox( addressesQuery.value(0).toString() ); - a.setExtended( addressesQuery.value(1).toString() ); - a.setStreet( addressesQuery.value(2).toString() ); - a.setLocality( addressesQuery.value(3).toString() ); - a.setRegion( addressesQuery.value(4).toString() ); - a.setPostalCode( addressesQuery.value(5).toString() ); - a.setCountry( addressesQuery.value(6).toString() ); - a.setLabel( addressesQuery.value(7).toString() ); - a.setType( addressesQuery.value(8).toInt() ); - - addr.insertAddress( a ); - } - } - - // categories - { - TQSqlQuery categoriesQuery( "select category from kaddressbook_categories " - "where addressId = '" + addrId + "'" ); - while ( categoriesQuery.next() ) - addr.insertCategory( categoriesQuery.value( 0 ).toString() ); - } - - // customs - { - TQSqlQuery customsQuery( "select app, name, value from kaddressbook_customs " - "where addressId = '" + addrId + "'" ); - while ( customsQuery.next() ) - addr.insertCustom( customsQuery.value( 0 ).toString(), - customsQuery.value( 1 ).toString(), - customsQuery.value( 2 ).toString()); - } - - addressBook()->insertAddressee( addr ); - } - - return true; -} - -bool ResourceSql::save( Ticket * ) -{ - // we have to delete all entries for this user and reinsert them - TQSqlQuery query( "select addressId from kaddressbook_main_" + mUser ); - - while ( query.next() ) { - TQString addrId = query.value( 0 ).toString(); - TQSqlQuery q; - - q.exec( "DELETE FROM kaddressbook_emails WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_phones WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_addresses WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_categories WHERE addressId = '" + addrId + "'" ); - q.exec( "DELETE FROM kaddressbook_customs WHERE addressId = '" + addrId + "'" ); - - q.exec( "DELETE FROM kaddressbook_main_" + mUser + " WHERE addressId = '" + addrId + "'" ); - } - - // let's start... - AddressBook::Iterator it; - for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { - if ( (*it).resource() != this && (*it).resource() != 0 ) // save only my and new entries - continue; - - TQString uid = (*it).uid(); - - query.exec( "INSERT INTO kaddressbook_main_" + mUser + " VALUES ('" + - (*it).uid() + "','" + - (*it).name() + "','" + - (*it).familyName() + "','" + - (*it).givenName() + "','" + - (*it).additionalName() + "','" + - (*it).prefix() + "','" + - (*it).suffix() + "','" + - (*it).nickName() + "','" + - (*it).birthday().toString( Qt::ISODate ) + "','" + - (*it).mailer() + "','" + - TQString::number( (*it).timeZone().offset() ) + "','" + - TQString::number( (*it).geo().latitude() ) + "','" + - TQString::number( (*it).geo().longitude() ) + "','" + - (*it).title() + "','" + - (*it).role() + "','" + - (*it).organization() + "','" + - (*it).note() + "','" + - (*it).productId() + "','" + - (*it).revision().toString( Qt::ISODate ) + "','" + - (*it).sortString() + "','" + - (*it).url().url() + "')" - ); - - // emails - { - TQStringList emails = (*it).emails(); - TQStringList::ConstIterator it; - bool preferred = true; - for( it = emails.begin(); it != emails.end(); ++it ) { - query.exec("INSERT INTO kaddressbook_emails VALUES ('" + - uid + "','" + - (*it) + "','" + - TQString::number(preferred) + "')"); - preferred = false; - } - } - - // phonenumbers - { - PhoneNumber::List phoneNumberList = (*it).phoneNumbers(); - PhoneNumber::List::ConstIterator it; - for( it = phoneNumberList.begin(); it != phoneNumberList.end(); ++it ) { - query.exec("INSERT INTO kaddressbook_phones VALUES ('" + - uid + "','" + - (*it).number() + "','" + - TQString::number( (*it).type() ) + "')"); - } - } - - // postal addresses - { - Address::List addressList = (*it).addresses(); - Address::List::ConstIterator it; - for( it = addressList.begin(); it != addressList.end(); ++it ) { - query.exec("INSERT INTO kaddressbook_addresses VALUES ('" + - uid + "','" + - (*it).postOfficeBox() + "','" + - (*it).extended() + "','" + - (*it).street() + "','" + - (*it).locality() + "','" + - (*it).region() + "','" + - (*it).postalCode() + "','" + - (*it).country() + "','" + - (*it).label() + "','" + - TQString::number( (*it).type() ) + "')"); - } - } - - // categories - { - TQStringList categories = (*it).categories(); - TQStringList::ConstIterator it; - for( it = categories.begin(); it != categories.end(); ++it ) - query.exec("INSERT INTO kaddressbook_categories VALUES ('" + - uid + "','" + - (*it) + "')"); - } - - // customs - { - TQStringList list = (*it).customs(); - TQStringList::ConstIterator it; - for( it = list.begin(); it != list.end(); ++it ) { - int dashPos = (*it).find( '-' ); - int colonPos = (*it).find( ':' ); - TQString app = (*it).left( dashPos ); - TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 ); - TQString value = (*it).right( (*it).length() - colonPos - 1 ); - - query.exec("INSERT INTO kaddressbook_categories VALUES ('" + - uid + "','" + app + "','" + name + "','" + value + "')"); - } - } - } - - return true; -} - -TQString ResourceSql::identifier() const -{ - return mHost + "_" + mDbName; -} diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h deleted file mode 100644 index 770e5b73b..000000000 --- a/kabc/plugins/sql/resourcesql.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCESQL_H -#define KABC_RESOURCESQL_H - -#include - -#include "addressbook.h" -#include "resource.h" - -class TQSqlDatabase; - -namespace KABC { - -class ResourceSql : public Resource -{ -public: - ResourceSql( AddressBook *ab, const TQString &user, const TQString &password, - const TQString &db, const TQString &host ); - ResourceSql( AddressBook *ab, const TDEConfig * ); - - bool open(); - void close(); - - Ticket *requestSaveTicket(); - - bool load(); - bool save( Ticket * ticket ); - - TQString identifier() const; - -private: - void init(const TQString &user, const TQString &password, - const TQString &db, const TQString &host ); - - TQString mUser; - TQString mPassword; - TQString mDbName; - TQString mHost; - - TQSqlDatabase *mDb; -}; - -} -#endif diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp deleted file mode 100644 index f62890c3d..000000000 --- a/kabc/plugins/sql/resourcesqlconfig.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "resource.h" -#include "resourcesqlconfig.h" - -using namespace KABC; - -ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) - : ResourceConfigWidget( parent, name ) -{ - resize( 290, 170 ); - - TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 ); - - TQLabel *label = new TQLabel( i18n( "Username:" ), this ); - mUser = new KLineEdit( this ); - - mainLayout->addWidget( label, 0, 0 ); - mainLayout->addWidget( mUser, 0, 1 ); - - label = new TQLabel( i18n( "Password:" ), this ); - mPassword = new KLineEdit( this ); - mPassword->setEchoMode( KLineEdit::Password ); - - mainLayout->addWidget( label, 1, 0 ); - mainLayout->addWidget( mPassword, 1, 1 ); - - label = new TQLabel( i18n( "Host:" ), this ); - mHost = new KLineEdit( this ); - - mainLayout->addWidget( label, 2, 0 ); - mainLayout->addWidget( mHost, 2, 1 ); - - label = new TQLabel( i18n( "Port:" ), this ); - TQVBox *box = new TQVBox(this); - mPort = new TQSpinBox(0, 65535, 1, box ); - mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); - mPort->setValue(389); - new TQWidget(box, "dummy"); - - mainLayout->addWidget( label, 3, 0 ); - mainLayout->addWidget( box, 3, 1 ); - - label = new TQLabel( i18n( "Database:" ), this ); - mDbName = new KLineEdit( this ); - - mainLayout->addWidget( label, 4, 0 ); - mainLayout->addWidget( mDbName, 4, 1 ); -} - -void ResourceSqlConfig::loadSettings( TDEConfig *config ) -{ - mUser->setText( config->readEntry( "SqlUser" ) ); - mPassword->setText( KABC::Resource::cryptStr( config->readEntry( "SqlPassword" ) ) ); - mDbName->setText( config->readEntry( "SqlName" ) ); - mHost->setText( config->readEntry( "SqlHost" ) ); - mPort->setValue( config->readNumEntry( "SqlPort" ) ); -} - -void ResourceSqlConfig::saveSettings( TDEConfig *config ) -{ - config->writeEntry( "SqlUser", mUser->text() ); - config->writeEntry( "SqlPassword", KABC::Resource::cryptStr( mPassword->text() ) ); - config->writeEntry( "SqlName", mDbName->text() ); - config->writeEntry( "SqlHost", mHost->text() ); - config->writeEntry( "SqlPort", mPort->value() ); -} - -#include "resourcesqlconfig.moc" diff --git a/kabc/plugins/sql/resourcesqlconfig.h b/kabc/plugins/sql/resourcesqlconfig.h deleted file mode 100644 index ae2de7d6d..000000000 --- a/kabc/plugins/sql/resourcesqlconfig.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef RESOURCESQLCONFIG_H -#define RESOURCESQLCONFIG_H - -#include "resourceconfigwidget.h" - -class KLineEdit; -class TQSpinBox; - -namespace KABC { - -class ResourceSqlConfig : public ResourceConfigWidget -{ - Q_OBJECT - -public: - ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 ); - -public slots: - void loadSettings( TDEConfig *config ); - void saveSettings( TDEConfig *config ); - -private: - KLineEdit* mUser; - KLineEdit* mPassword; - KLineEdit* mDbName; - KLineEdit* mHost; - TQSpinBox* mPort; -}; - -} -#endif diff --git a/kabc/plugins/sql/sql.desktop b/kabc/plugins/sql/sql.desktop deleted file mode 100644 index 4ac553008..000000000 --- a/kabc/plugins/sql/sql.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Misc] -Name=SQL -Name[bn]=à¦à¦¸-কিউ-à¦à¦² (SQL) -Name[hi]=à¤à¤¸à¤•à¥à¤¯à¥‚à¤à¤² (SQL) -Name[ss]=I-SQL -Name[te]=à°à°¸à±à°•à±à°¯à±à°Žà°²à± - -[Plugin] -Type=sql -X-TDE-Library=kabc_sql diff --git a/kabc/resource.cpp b/kabc/resource.cpp deleted file mode 100644 index 57c8588e8..000000000 --- a/kabc/resource.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include "resource.h" - -using namespace KABC; - -Ticket::Ticket( Resource *resource ) - : mResource( resource ) -{ -} - -Ticket::~Ticket() -{ -/* FIXME: avoid cycle deletion - if ( mResource ) - mResource->releaseSaveTicket( this ); -*/ -} - -Resource *Ticket::resource() -{ - return mResource; -} - -struct Resource::Iterator::IteratorData -{ - Addressee::Map::Iterator mIt; -}; - -struct Resource::ConstIterator::ConstIteratorData -{ - Addressee::Map::ConstIterator mIt; -}; - -Resource::Iterator::Iterator() -{ - d = new IteratorData; -} - -Resource::Iterator::Iterator( const Resource::Iterator &i ) -{ - d = new IteratorData; - d->mIt = i.d->mIt; -} - -Resource::Iterator &Resource::Iterator::operator=( const Resource::Iterator &i ) -{ - if ( this == &i ) - return *this; - delete d; - - d = new IteratorData; - d->mIt = i.d->mIt; - return *this; -} - -Resource::Iterator::~Iterator() -{ - delete d; -} - -const Addressee &Resource::Iterator::operator*() const -{ - return d->mIt.data(); -} - -Addressee &Resource::Iterator::operator*() -{ - return d->mIt.data(); -} - -Resource::Iterator &Resource::Iterator::operator++() -{ - (d->mIt)++; - return *this; -} - -Resource::Iterator &Resource::Iterator::operator++( int ) -{ - (d->mIt)++; - return *this; -} - -Resource::Iterator &Resource::Iterator::operator--() -{ - (d->mIt)--; - return *this; -} - -Resource::Iterator &Resource::Iterator::operator--( int ) -{ - (d->mIt)--; - return *this; -} - -bool Resource::Iterator::operator==( const Iterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool Resource::Iterator::operator!=( const Iterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - -Resource::ConstIterator::ConstIterator() -{ - d = new ConstIteratorData; -} - -Resource::ConstIterator::ConstIterator( const Resource::ConstIterator &i ) -{ - d = new ConstIteratorData; - d->mIt = i.d->mIt; -} - -Resource::ConstIterator::ConstIterator( const Resource::Iterator &i ) -{ - d = new ConstIteratorData; - d->mIt = i.d->mIt; -} - -Resource::ConstIterator &Resource::ConstIterator::operator=( const Resource::ConstIterator &i ) -{ - if ( this == &i ) - return *this; - delete d; - - d = new ConstIteratorData; - d->mIt = i.d->mIt; - return *this; -} - -Resource::ConstIterator::~ConstIterator() -{ - delete d; -} - -const Addressee &Resource::ConstIterator::operator*() const -{ - return *(d->mIt); -} - -Resource::ConstIterator &Resource::ConstIterator::operator++() -{ - (d->mIt)++; - return *this; -} - -Resource::ConstIterator &Resource::ConstIterator::operator++( int ) -{ - (d->mIt)++; - return *this; -} - -Resource::ConstIterator &Resource::ConstIterator::operator--() -{ - (d->mIt)--; - return *this; -} - -Resource::ConstIterator &Resource::ConstIterator::operator--( int ) -{ - (d->mIt)--; - return *this; -} - -bool Resource::ConstIterator::operator==( const ConstIterator &it ) -{ - return ( d->mIt == it.d->mIt ); -} - -bool Resource::ConstIterator::operator!=( const ConstIterator &it ) -{ - return ( d->mIt != it.d->mIt ); -} - - -Resource::Resource( const TDEConfig *config ) - : KRES::Resource( config ), mAddressBook( 0 ) -{ -} - -Resource::~Resource() -{ -} - -Resource::Iterator Resource::begin() -{ - Iterator it; - it.d->mIt = mAddrMap.begin(); - - return it; -} - -Resource::ConstIterator Resource::begin() const -{ - ConstIterator it; - it.d->mIt = mAddrMap.constBegin(); - return it; -} - -Resource::Iterator Resource::end() -{ - Iterator it; - it.d->mIt = mAddrMap.end(); - - return it; -} - -Resource::ConstIterator Resource::end() const -{ - ConstIterator it; - it.d->mIt = mAddrMap.constEnd(); - return it; -} - -void Resource::writeConfig( TDEConfig *config ) -{ - KRES::Resource::writeConfig( config ); -} - -void Resource::setAddressBook( AddressBook *ab ) -{ - mAddressBook = ab; -} - -AddressBook *Resource::addressBook() -{ - return mAddressBook; -} - -Ticket *Resource::createTicket( Resource *resource ) -{ - return new Ticket( resource ); -} - -void Resource::insertAddressee( const Addressee &addr ) -{ - mAddrMap.insert( addr.uid(), addr ); -} - -void Resource::removeAddressee( const Addressee &addr ) -{ - mAddrMap.erase( addr.uid() ); -} - -Addressee Resource::findByUid( const TQString &uid ) -{ - Addressee::Map::ConstIterator it = mAddrMap.find( uid ); - - if ( it != mAddrMap.end() ) - return it.data(); - - return Addressee(); -} - -Addressee::List Resource::findByName( const TQString &name ) -{ - Addressee::List results; - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) { - if ( name == (*it).name() ) - results.append( *it ); - } - - return results; -} - -Addressee::List Resource::findByEmail( const TQString &email ) -{ - Addressee::List results; - const TQString lowerEmail = email.lower(); - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) { - const TQStringList mailList = (*it).emails(); - for ( TQStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) { - if ( lowerEmail == (*ite).lower() ) - results.append( *it ); - } - } - - return results; -} - -Addressee::List Resource::findByCategory( const TQString &category ) -{ - Addressee::List results; - - ConstIterator it; - for ( it = begin(); it != end(); ++it ) { - if ( (*it).hasCategory( category) ) { - results.append( *it ); - } - } - - return results; -} - -void Resource::clear() -{ - mAddrMap.clear(); -} - -bool Resource::asyncLoad() -{ - bool ok = load(); - if ( !ok ) - emit loadingError( this, i18n( "Loading resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit loadingFinished( this ); - - return ok; -} - -bool Resource::asyncSave( Ticket *ticket ) { - bool ok = save( ticket ); - if ( !ok ) - emit savingError( this, i18n( "Saving resource '%1' failed!" ) - .arg( resourceName() ) ); - else - emit savingFinished( this ); - - return ok; -} - -#include "resource.moc" diff --git a/kabc/resource.h b/kabc/resource.h deleted file mode 100644 index 0f5167e7b..000000000 --- a/kabc/resource.h +++ /dev/null @@ -1,319 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCE_H -#define KABC_RESOURCE_H - -#include - -#include "addressbook.h" -#include "plugin.h" - -namespace KABC { - -/** - * @short Helper class for handling coordinated save of address books. - * - * This class is used as helper class for saving address book. - * @see requestSaveTicket(), save(). - */ -class KABC_EXPORT Ticket -{ - friend class Resource; - - public: - ~Ticket(); - - Resource *resource(); - - private: - Ticket( Resource *resource ); - - Resource *mResource; -}; - -/** - * @internal - */ -class KABC_EXPORT Resource : public KRES::Resource -{ - Q_OBJECT - - public: - - /** - @short Resource Iterator - - This class provides an iterator for resource entries. - By default it points to a TQValueList::Iterator, - but you can reimplement this class to fit your own needs. - */ - class KABC_EXPORT Iterator - { - public: - Iterator(); - Iterator( const Iterator & ); - virtual ~Iterator(); - - virtual Iterator &operator=( const Iterator & ); - virtual const Addressee &operator*() const; - virtual Addressee &operator*(); - virtual Iterator &operator++(); - virtual Iterator &operator++( int ); - virtual Iterator &operator--(); - virtual Iterator &operator--( int ); - virtual bool operator==( const Iterator &it ); - virtual bool operator!=( const Iterator &it ); - - struct IteratorData; - IteratorData *d; - }; - - /** - @short Resource Const Iterator - - This class provides a const iterator for resource entries. - */ - class KABC_EXPORT ConstIterator - { - public: - ConstIterator(); - ConstIterator( const ConstIterator & ); - ConstIterator( const Iterator & ); - virtual ~ConstIterator(); - - virtual ConstIterator &operator=( const ConstIterator & ); - virtual const Addressee &operator*() const ; - virtual ConstIterator &operator++(); - virtual ConstIterator &operator++( int ); - virtual ConstIterator &operator--(); - virtual ConstIterator &operator--( int ); - virtual bool operator==( const ConstIterator &it ); - virtual bool operator!=( const ConstIterator &it ); - - struct ConstIteratorData; - ConstIteratorData *d; - }; - - /** - Constructor. - - @param config The config object where the derived classes can - read out their settings. - */ - Resource( const TDEConfig *config ); - - /** - Destructor. - */ - virtual ~Resource(); - - /** - Returns an iterator pointing to the first addressee in the resource. - This iterator equals end() if the resource is empty. - */ - virtual ConstIterator begin() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - virtual Iterator begin(); - - /** - Returns an iterator pointing to the last addressee in the resource. - This iterator equals begin() if the resource is empty. - */ - virtual ConstIterator end() const; - - /** - This is an overloaded member function, provided for convenience. It - behaves essentially like the above function. - */ - virtual Iterator end(); - - /** - Returns a pointer to the addressbook. - */ - AddressBook *addressBook(); - - /** - Writes the resource specific config to file. - */ - virtual void writeConfig( TDEConfig *config ); - - /** - Request a ticket, you have to pass through save() to - allow locking. The resource has to create its locks - in this function. - */ - virtual Ticket *requestSaveTicket() = 0; - - /** - Releases the ticket previousely requested with requestSaveTicket(). - The resource has to remove its locks in this function. - This function is also responsible for deleting the ticket. - */ - virtual void releaseSaveTicket( Ticket* ) = 0; - - /** - Loads all addressees synchronously. - - @returns Whether the loading was successfully. - */ - virtual bool load() = 0; - - /** - Loads all addressees asyncronously. You have to make sure that either - the loadingFinished() or loadingError() signal is emitted from within - this function. - - The default implementation simply calls the synchronous load. - - @return Whether the synchronous part of loading was successfully. - */ - virtual bool asyncLoad(); - - /** - Insert an addressee into the resource. - */ - virtual void insertAddressee( const Addressee& ); - - /** - Removes an addressee from resource. - */ - virtual void removeAddressee( const Addressee& addr ); - - /** - Saves all addressees synchronously. - - @param ticket You have to release the ticket later with - releaseSaveTicket() explicitely. - @return Whether the saving was successfully. - */ - virtual bool save( Ticket *ticket ) = 0; - - /** - Saves all addressees asynchronously. You have to make sure that either - the savingFinished() or savingError() signal is emitted from within - this function. - - The default implementation simply calls the synchronous save. - - @param ticket You have to release the ticket later with - releaseSaveTicket() explicitely. - @return Whether the saving was successfully. - */ - virtual bool asyncSave( Ticket *ticket ); - - /** - Searches an addressee with the specified unique identifier. - - @param uid The unique identifier you are looking for. - @return The addressee with the specified unique identifier or an - empty addressee. - */ - virtual Addressee findByUid( const TQString &uid ); - - /** - Searches all addressees which match the specified name. - - @param name The name you are looking for. - @return A list of all matching addressees. - */ - virtual Addressee::List findByName( const TQString &name ); - - /** - Searches all addressees which match the specified email address. - - @param email The email address you are looking for. - @return A list of all matching addressees. - */ - virtual Addressee::List findByEmail( const TQString &email ); - - /** - Searches all addressees which belongs to the specified category. - - @param category The category you are looking for. - @return A list of all matching addressees. - */ - virtual Addressee::List findByCategory( const TQString &category ); - - /** - Removes all addressees from the resource. - */ - virtual void clear(); - - /** - @internal - - Sets the address book of the resource. - */ - void setAddressBook( AddressBook* ); - - signals: - /** - This signal is emitted when the resource has finished the loading of all - addressees from the backend to the internal cache. - - @param resource The pointer to the resource which emitted this signal. - */ - void loadingFinished( Resource *resource ); - - /** - This signal is emitted when an error occured during loading the - addressees from the backend to the internal cache. - - @param resource The pointer to the resource which emitted this signal. - @param msg A translated error message. - */ - void loadingError( Resource *resource, const TQString &msg ); - - /** - This signal is emitted when the resource has finished the saving of all - addressees from the internal cache to the backend. - - @param resource The pointer to the resource which emitted this signal. - */ - void savingFinished( Resource *resource ); - - /** - This signal is emitted when an error occured during saving the - addressees from the internal cache to the backend. - - @param resource The pointer to the resource which emitted this signal. - @param msg A translated error message. - */ - void savingError( Resource *resource, const TQString &msg ); - - protected: - Ticket *createTicket( Resource * ); - Addressee::Map mAddrMap; - - private: - AddressBook *mAddressBook; - - class ResourcePrivate; - ResourcePrivate *d; -}; - -} - -#endif diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp deleted file mode 100644 index 3b6e25752..000000000 --- a/kabc/resourceselectdialog.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include - -#include -#include - -#include "resource.h" -#include "addressbook.h" - -#include "resourceselectdialog.h" - -using namespace KABC; - -ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, const char *name ) - : KDialog( parent, name, true ) -{ - setCaption( i18n( "Resource Selection" ) ); - resize( 300, 200 ); - - TQVBoxLayout *mainLayout = new TQVBoxLayout( this ); - mainLayout->setMargin( marginHint() ); - - TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); - groupBox->setTitle( i18n( "Resources" ) ); - - mResourceId = new TDEListBox( groupBox ); - - mainLayout->addWidget( groupBox ); - - mainLayout->addSpacing( 10 ); - - KButtonBox *buttonBox = new KButtonBox( this ); - - buttonBox->addStretch(); - buttonBox->addButton( KStdGuiItem::ok(), TQT_TQOBJECT(this), TQT_SLOT( accept() ) ); - buttonBox->addButton( KStdGuiItem::cancel(), TQT_TQOBJECT(this), TQT_SLOT( reject() ) ); - buttonBox->layout(); - - mainLayout->addWidget( buttonBox ); - - // setup listbox - uint counter = 0; - TQPtrList list = ab->resources(); - for ( uint i = 0; i < list.count(); ++i ) { - Resource *resource = list.at( i ); - if ( resource && !resource->readOnly() ) { - mResourceMap.insert( counter, resource ); - mResourceId->insertItem( resource->resourceName() ); - counter++; - } - } - - mResourceId->setCurrentItem( 0 ); -} - -Resource *ResourceSelectDialog::resource() -{ - if ( mResourceId->currentItem() != -1 ) - return mResourceMap[ mResourceId->currentItem() ]; - else - return 0; -} - -Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent ) -{ - TQPtrList resources = ab->resources(); - if ( resources.count() == 1 ) return resources.first(); - - Resource *found = 0; - Resource *r = resources.first(); - while( r ) { - if ( !r->readOnly() ) { - if ( found ) { - found = 0; - break; - } else { - found = r; - } - } - r = resources.next(); - } - if ( found ) return found; - - ResourceSelectDialog dlg( ab, parent ); - if ( dlg.exec() == KDialog::Accepted ) return dlg.resource(); - else return 0; -} - -#include "resourceselectdialog.moc" diff --git a/kabc/resourceselectdialog.h b/kabc/resourceselectdialog.h deleted file mode 100644 index f5f2d6984..000000000 --- a/kabc/resourceselectdialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_RESOURCESELECTDIALOG_H -#define KABC_RESOURCESELECTDIALOG_H - -#include - -#include -#include - -class TDEListBox; - -namespace KABC { - -class AddressBook; -class Resource; - -/** - This class is @deprecated, use KRES::SelectDialog instead. - */ -class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog -{ - Q_OBJECT - - public: - ResourceSelectDialog( AddressBook *ab, TQWidget *parent = 0, - const char *name = 0); - Resource *resource(); - - static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 ); - - private: - TDEListBox *mResourceId; - TQMap mResourceMap; -}; - -} - -#endif diff --git a/kabc/scripts/Makefile.am b/kabc/scripts/Makefile.am deleted file mode 100644 index 7715fba5c..000000000 --- a/kabc/scripts/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_DIST = $(srcdir)/makeaddressee \ - $(srcdir)/addressee.src.cpp \ - $(srcdir)/addressee.src.h \ - $(srcdir)/entrylist \ - $(srcdir)/field.src.cpp - diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp deleted file mode 100644 index 9aff3a708..000000000 --- a/kabc/scripts/addressee.src.cpp +++ /dev/null @@ -1,1127 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - Copyright (c) 2003 Carsten Pfeiffer - Copyright (c) 2005 Ingo Kloecker - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include - -#include "addresseehelper.h" -#include "field.h" -#include "resource.h" -#include "sortmode.h" - -#include "addressee.h" - -using namespace KABC; - -static bool matchBinaryPattern( int value, int pattern ); - -template -static bool listEquals( const TQValueList&, const TQValueList& ); -static bool emailsEquals( const TQStringList&, const TQStringList& ); - -KABC::SortMode *Addressee::mSortMode = 0; - -struct Addressee::AddresseeData : public TDEShared -{ - TQString uid; - TQString uri; - --VARIABLES-- - - PhoneNumber::List phoneNumbers; - Address::List addresses; - Key::List keys; - TQStringList emails; - TQStringList categories; - TQStringList custom; - - Resource *resource; - - bool empty :1; - bool changed :1; -}; - -Addressee::AddresseeData* Addressee::shared_null = 0; - -Addressee::AddresseeData* Addressee::makeSharedNull() -{ - Addressee::shared_null = new AddresseeData; - shared_null->_TDEShared_ref(); //just in case (we should add KSD) - shared_null->empty = true; - shared_null->changed = false; - shared_null->resource = 0; - return shared_null; -} - -Addressee::Addressee() -{ - mData = shared_null ? shared_null : makeSharedNull(); -} - -Addressee::~Addressee() -{ -} - -Addressee::Addressee( const Addressee &a ) -{ - mData = a.mData; -} - -Addressee &Addressee::operator=( const Addressee &a ) -{ - if ( this == &a ) - return (*this); - - mData = a.mData; - return (*this); -} - -void Addressee::detach() -{ - if ( mData.data() == shared_null ) { - mData = new AddresseeData; - mData->empty = true; - mData->changed = false; - mData->resource = 0; - mData->uid = TDEApplication::randomString( 10 ); - return; - } else if ( mData.count() == 1 ) return; - - AddresseeData data = *mData; - mData = new AddresseeData( data ); -} - -bool Addressee::operator==( const Addressee &a ) const -{ - if ( uid() != a.uid() ) { - kdDebug(5700) << "uid differs" << endl; - return false; - } - --EQUALSTEST-- - if ( ( mData->url.isValid() || a.mData->url.isValid() ) && - ( mData->url != a.mData->url ) ) { - kdDebug(5700) << "url differs" << endl; - return false; - } - if ( !listEquals( mData->phoneNumbers, a.mData->phoneNumbers ) ) { - kdDebug(5700) << "phoneNumbers differs" << endl; - return false; - } - if ( !listEquals( mData->addresses, a.mData->addresses ) ) { - kdDebug(5700) << "addresses differs" << endl; - return false; - } - if ( !listEquals( mData->keys, a.mData->keys ) ) { - kdDebug(5700) << "keys differs" << endl; - return false; - } - if ( !emailsEquals( mData->emails, a.mData->emails ) ) { - kdDebug(5700) << "emails differs" << endl; - return false; - } - if ( !listEquals( mData->categories, a.mData->categories ) ) { - kdDebug(5700) << "categories differs" << endl; - return false; - } - if ( !listEquals( mData->custom, a.mData->custom ) ) { - kdDebug(5700) << "custom differs" << endl; - return false; - } - - return true; -} - -bool Addressee::operator!=( const Addressee &a ) const -{ - return !( a == *this ); -} - -bool Addressee::isEmpty() const -{ - return mData->empty; -} - -void Addressee::setUid( const TQString &id ) -{ - if ( id == mData->uid ) return; - detach(); - mData->empty = false; - mData->uid = id; -} - -TQString Addressee::uid() const -{ - return mData->uid; -} - -TQString Addressee::uidLabel() -{ - return i18n("Unique Identifier"); -} - -void Addressee::setUri( const TQString &id ) -{ - if ( id == mData->uri ) return; - detach(); - mData->empty = false; - mData->uri = id; -} - -TQString Addressee::uri() const -{ - return mData->uri; -} - -TQString Addressee::uriLabel() -{ - return i18n("Unique Resource Identifier"); -} - ---DEFINITIONS-- - -void Addressee::setNameFromString( const TQString &s ) -{ - TQString str = s; - //remove enclosing quotes from string - if ( str.length() > 1 && s[ 0 ] == '"' && s[ s.length() - 1 ] == '"' ) - str = s.mid( 1, s.length() - 2 ); - - setFormattedName( str ); - setName( str ); - - // clear all name parts - setPrefix( TQString() ); - setGivenName( TQString() ); - setAdditionalName( TQString() ); - setFamilyName( TQString() ); - setSuffix( TQString() ); - - if ( str.isEmpty() ) - return; - - TQString spaceStr = " "; - TQString emptyStr = ""; - AddresseeHelper *helper = AddresseeHelper::self(); - - int i = str.find( ',' ); - if( i < 0 ) { - TQStringList parts = TQStringList::split( spaceStr, str ); - int leftOffset = 0; - int rightOffset = parts.count() - 1; - - TQString suffix; - while ( rightOffset >= 0 ) { - if ( helper->containsSuffix( parts[ rightOffset ] ) ) { - suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); - rightOffset--; - } else - break; - } - setSuffix( suffix ); - - if ( rightOffset < 0 ) - return; - - TQStringList inclusionList; - for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) { - if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) { - inclusionList.prepend( parts[ rightOffset - n ] ); - } else - break; - } - - if ( !inclusionList.isEmpty() ) { - setFamilyName( inclusionList.join( " " ) + spaceStr + parts[ rightOffset ] ); - rightOffset -= inclusionList.count(); - } else { - if ( helper->tradeAsFamilyName() ) - setFamilyName( parts[ rightOffset ] ); - else - setGivenName( parts[ rightOffset ] ); - } - - TQString prefix; - while ( leftOffset < rightOffset ) { - if ( helper->containsTitle( parts[ leftOffset ] ) ) { - prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } else - break; - } - setPrefix( prefix ); - - if ( leftOffset < rightOffset ) { - setGivenName( parts[ leftOffset ] ); - leftOffset++; - } - - TQString additionalName; - while ( leftOffset < rightOffset ) { - additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } - setAdditionalName( additionalName ); - } else { - TQString part1 = str.left( i ); - TQString part2 = str.mid( i + 1 ); - - TQStringList parts = TQStringList::split( spaceStr, part1 ); - int leftOffset = 0; - int rightOffset = parts.count() - 1; - - if ( parts.count() > 0 ) { - - TQString suffix; - while ( rightOffset >= 0 ) { - if ( helper->containsSuffix( parts[ rightOffset ] ) ) { - suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); - rightOffset--; - } else - break; - } - setSuffix( suffix ); - - if ( rightOffset - 1 >= 0 && helper->containsPrefix( parts[ rightOffset - 1 ].lower() ) ) { - setFamilyName( parts[ rightOffset - 1 ] + spaceStr + parts[ rightOffset ] ); - rightOffset--; - } else - setFamilyName( parts[ rightOffset ] ); - - TQString prefix; - while ( leftOffset < rightOffset ) { - if ( helper->containsTitle( parts[ leftOffset ] ) ) { - prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } else - break; - } - } else { - setPrefix( "" ); - setFamilyName( "" ); - setSuffix( "" ); - } - - parts = TQStringList::split( spaceStr, part2 ); - - leftOffset = 0; - rightOffset = parts.count(); - - if ( parts.count() > 0 ) { - - TQString prefix; - while ( leftOffset < rightOffset ) { - if ( helper->containsTitle( parts[ leftOffset ] ) ) { - prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } else - break; - } - setPrefix( prefix ); - - if ( leftOffset < rightOffset ) { - setGivenName( parts[ leftOffset ] ); - leftOffset++; - } - - TQString additionalName; - while ( leftOffset < rightOffset ) { - additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); - leftOffset++; - } - setAdditionalName( additionalName ); - } else { - setGivenName( "" ); - setAdditionalName( "" ); - } - } -} - -TQString Addressee::realName() const -{ - TQString n( formattedName() ); - if ( !n.isEmpty() ) - return n; - - n = assembledName(); - if ( !n.isEmpty() ) - return n; - - n = name(); - if ( !n.isEmpty() ) - return n; - - return organization(); -} - -TQString Addressee::assembledName() const -{ - TQString name = prefix() + " " + givenName() + " " + additionalName() + " " + - familyName() + " " + suffix(); - - return name.simplifyWhiteSpace(); -} - -TQString Addressee::fullEmail( const TQString &email ) const -{ - TQString e; - if ( email.isNull() ) { - e = preferredEmail(); - } else { - e = email; - } - if ( e.isEmpty() ) return TQString(); - - TQString text; - if ( realName().isEmpty() ) - text = e; - else { - TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ); - if ( realName().find( needQuotes ) != -1 ) { - TQString name = realName(); - name.replace( "\"", "\\\"" ); - text = "\"" + name + "\" <" + e + ">"; - } else - text = realName() + " <" + e + ">"; - } - - return text; -} - -void Addressee::insertEmail( const TQString &email, bool preferred ) -{ - if ( email.simplifyWhiteSpace().isEmpty() ) - return; - - detach(); - mData->empty = false; - - TQStringList::Iterator it = mData->emails.find( email ); - - if ( it != mData->emails.end() ) { - if ( !preferred || it == mData->emails.begin() ) return; - mData->emails.remove( it ); - mData->emails.prepend( email ); - } else { - if ( preferred ) { - mData->emails.prepend( email ); - } else { - mData->emails.append( email ); - } - } -} - -void Addressee::removeEmail( const TQString &email ) -{ - detach(); - - TQStringList::Iterator it = mData->emails.find( email ); - if ( it == mData->emails.end() ) return; - - mData->emails.remove( it ); -} - -TQString Addressee::preferredEmail() const -{ - if ( mData->emails.count() == 0 ) return TQString(); - else return mData->emails.first(); -} - -TQStringList Addressee::emails() const -{ - return mData->emails; -} -void Addressee::setEmails( const TQStringList& emails ) { - detach(); - - mData->emails = emails; -} -void Addressee::insertPhoneNumber( const PhoneNumber &phoneNumber ) -{ - detach(); - mData->empty = false; - - PhoneNumber::List::Iterator it; - for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { - if ( (*it).id() == phoneNumber.id() ) { - *it = phoneNumber; - return; - } - } - if ( !phoneNumber.number().simplifyWhiteSpace().isEmpty() ) - mData->phoneNumbers.append( phoneNumber ); -} - -void Addressee::removePhoneNumber( const PhoneNumber &phoneNumber ) -{ - detach(); - - PhoneNumber::List::Iterator it; - for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { - if ( (*it).id() == phoneNumber.id() ) { - mData->phoneNumbers.remove( it ); - return; - } - } -} - -PhoneNumber Addressee::phoneNumber( int type ) const -{ - PhoneNumber phoneNumber( "", type ); - PhoneNumber::List::ConstIterator it; - for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - if ( (*it).type() & PhoneNumber::Pref ) - return (*it); - else if ( phoneNumber.number().isEmpty() ) - phoneNumber = (*it); - } - } - - return phoneNumber; -} - -PhoneNumber::List Addressee::phoneNumbers() const -{ - return mData->phoneNumbers; -} - -PhoneNumber::List Addressee::phoneNumbers( int type ) const -{ - PhoneNumber::List list; - - PhoneNumber::List::ConstIterator it; - for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - list.append( *it ); - } - } - return list; -} - -PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const -{ - PhoneNumber::List::ConstIterator it; - for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { - if ( (*it).id() == id ) { - return *it; - } - } - return PhoneNumber(); -} - -void Addressee::insertKey( const Key &key ) -{ - detach(); - mData->empty = false; - - Key::List::Iterator it; - for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { - if ( (*it).id() == key.id() ) { - *it = key; - return; - } - } - mData->keys.append( key ); -} - -void Addressee::removeKey( const Key &key ) -{ - detach(); - - Key::List::Iterator it; - for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { - if ( (*it).id() == key.id() ) { - mData->keys.remove( key ); - return; - } - } -} - -Key Addressee::key( int type, TQString customTypeString ) const -{ - Key::List::ConstIterator it; - for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { - if ( (*it).type() == type ) { - if ( type == Key::Custom ) { - if ( customTypeString.isEmpty() ) { - return *it; - } else { - if ( (*it).customTypeString() == customTypeString ) - return (*it); - } - } else { - return *it; - } - } - } - return Key( TQString(), type ); -} - -void Addressee::setKeys( const Key::List& list ) -{ - detach(); - mData->keys = list; -} - -Key::List Addressee::keys() const -{ - return mData->keys; -} - -Key::List Addressee::keys( int type, TQString customTypeString ) const -{ - Key::List list; - - Key::List::ConstIterator it; - for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { - if ( (*it).type() == type ) { - if ( type == Key::Custom ) { - if ( customTypeString.isEmpty() ) { - list.append( *it ); - } else { - if ( (*it).customTypeString() == customTypeString ) - list.append( *it ); - } - } else { - list.append( *it ); - } - } - } - return list; -} - -Key Addressee::findKey( const TQString &id ) const -{ - Key::List::ConstIterator it; - for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { - if ( (*it).id() == id ) { - return *it; - } - } - return Key(); -} - -TQString Addressee::asString() const -{ - return "Smith, agent Smith..."; -} - -void Addressee::dump() const -{ - kdDebug(5700) << "Addressee {" << endl; - - kdDebug(5700) << " Uid: '" << uid() << "'" << endl; - - --DEBUG-- - - kdDebug(5700) << " Emails {" << endl; - const TQStringList e = emails(); - TQStringList::ConstIterator it; - for( it = e.begin(); it != e.end(); ++it ) { - kdDebug(5700) << " " << (*it) << endl; - } - kdDebug(5700) << " }" << endl; - - kdDebug(5700) << " PhoneNumbers {" << endl; - const PhoneNumber::List p = phoneNumbers(); - PhoneNumber::List::ConstIterator it2; - for( it2 = p.begin(); it2 != p.end(); ++it2 ) { - kdDebug(5700) << " Type: " << int((*it2).type()) << " Number: " << (*it2).number() << endl; - } - kdDebug(5700) << " }" << endl; - - const Address::List a = addresses(); - Address::List::ConstIterator it3; - for( it3 = a.begin(); it3 != a.end(); ++it3 ) { - (*it3).dump(); - } - - kdDebug(5700) << " Keys {" << endl; - const Key::List k = keys(); - Key::List::ConstIterator it4; - for( it4 = k.begin(); it4 != k.end(); ++it4 ) { - kdDebug(5700) << " Type: " << int((*it4).type()) << - " Key: " << (*it4).textData() << - " CustomString: " << (*it4).customTypeString() << endl; - } - kdDebug(5700) << " }" << endl; - - kdDebug(5700) << "}" << endl; -} - - -void Addressee::insertAddress( const Address &address ) -{ - if ( address.isEmpty() ) - return; - - detach(); - mData->empty = false; - - Address::List::Iterator it; - for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { - if ( (*it).id() == address.id() ) { - *it = address; - return; - } - } - - mData->addresses.append( address ); -} - -void Addressee::removeAddress( const Address &address ) -{ - detach(); - - Address::List::Iterator it; - for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { - if ( (*it).id() == address.id() ) { - mData->addresses.remove( it ); - return; - } - } -} - -Address Addressee::address( int type ) const -{ - Address address( type ); - Address::List::ConstIterator it; - for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - if ( (*it).type() & Address::Pref ) - return (*it); - else if ( address.isEmpty() ) - address = (*it); - } - } - - return address; -} - -Address::List Addressee::addresses() const -{ - return mData->addresses; -} - -Address::List Addressee::addresses( int type ) const -{ - Address::List list; - - Address::List::ConstIterator it; - for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { - if ( matchBinaryPattern( (*it).type(), type ) ) { - list.append( *it ); - } - } - - return list; -} - -Address Addressee::findAddress( const TQString &id ) const -{ - Address::List::ConstIterator it; - for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { - if ( (*it).id() == id ) { - return *it; - } - } - return Address(); -} - -void Addressee::insertCategory( const TQString &c ) -{ - detach(); - mData->empty = false; - - if ( mData->categories.findIndex( c ) != -1 ) return; - - mData->categories.append( c ); -} - -void Addressee::removeCategory( const TQString &c ) -{ - detach(); - - TQStringList::Iterator it = mData->categories.find( c ); - if ( it == mData->categories.end() ) return; - - mData->categories.remove( it ); -} - -bool Addressee::hasCategory( const TQString &c ) const -{ - return ( mData->categories.findIndex( c ) != -1 ); -} - -void Addressee::setCategories( const TQStringList &c ) -{ - detach(); - mData->empty = false; - - mData->categories = c; -} - -TQStringList Addressee::categories() const -{ - return mData->categories; -} - -void Addressee::insertCustom( const TQString &app, const TQString &name, - const TQString &value ) -{ - if ( value.isEmpty() || name.isEmpty() || app.isEmpty() ) return; - - detach(); - mData->empty = false; - - TQString qualifiedName = app + "-" + name + ":"; - - TQStringList::Iterator it; - for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { - if ( (*it).startsWith( qualifiedName ) ) { - (*it) = qualifiedName + value; - return; - } - } - - mData->custom.append( qualifiedName + value ); -} - -void Addressee::removeCustom( const TQString &app, const TQString &name) -{ - detach(); - - TQString qualifiedName = app + "-" + name + ":"; - - TQStringList::Iterator it; - for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { - if ( (*it).startsWith( qualifiedName ) ) { - mData->custom.remove( it ); - return; - } - } -} - -TQString Addressee::custom( const TQString &app, const TQString &name ) const -{ - TQString qualifiedName = app + "-" + name + ":"; - TQString value; - - TQStringList::ConstIterator it; - for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) { - if ( (*it).startsWith( qualifiedName ) ) { - value = (*it).mid( (*it).find( ":" ) + 1 ); - break; - } - } - - return value; -} - -void Addressee::setCustoms( const TQStringList &l ) -{ - detach(); - mData->empty = false; - - mData->custom = l; -} - -TQStringList Addressee::customs() const -{ - return mData->custom; -} - -void Addressee::parseEmailAddress( const TQString &rawEmail, TQString &fullName, - TQString &email) -{ - // This is a simplified version of KPIM::splitAddress(). - - fullName = ""; - email = ""; - if ( rawEmail.isEmpty() ) - return; // KPIM::AddressEmpty; - - // The code works on 8-bit strings, so convert the input to UTF-8. - TQCString address = rawEmail.utf8(); - - TQCString displayName; - TQCString addrSpec; - TQCString comment; - - // The following is a primitive parser for a mailbox-list (cf. RFC 2822). - // The purpose is to extract a displayable string from the mailboxes. - // Comments in the addr-spec are not handled. No error checking is done. - - enum { TopLevel, InComment, InAngleAddress } context = TopLevel; - bool inQuotedString = false; - int commentLevel = 0; - bool stop = false; - - for ( char* p = address.data(); *p && !stop; ++p ) { - switch ( context ) { - case TopLevel : { - switch ( *p ) { - case '"' : inQuotedString = !inQuotedString; - displayName += *p; - break; - case '(' : if ( !inQuotedString ) { - context = InComment; - commentLevel = 1; - } - else - displayName += *p; - break; - case '<' : if ( !inQuotedString ) { - context = InAngleAddress; - } - else - displayName += *p; - break; - case '\\' : // quoted character - displayName += *p; - ++p; // skip the '\' - if ( *p ) - displayName += *p; - else - //return KPIM::UnexpectedEnd; - goto ABORT_PARSING; - break; - case ',' : if ( !inQuotedString ) { - //if ( allowMultipleAddresses ) - // stop = true; - //else - // return KPIM::UnexpectedComma; - goto ABORT_PARSING; - } - else - displayName += *p; - break; - default : displayName += *p; - } - break; - } - case InComment : { - switch ( *p ) { - case '(' : ++commentLevel; - comment += *p; - break; - case ')' : --commentLevel; - if ( commentLevel == 0 ) { - context = TopLevel; - comment += ' '; // separate the text of several comments - } - else - comment += *p; - break; - case '\\' : // quoted character - comment += *p; - ++p; // skip the '\' - if ( *p ) - comment += *p; - else - //return KPIM::UnexpectedEnd; - goto ABORT_PARSING; - break; - default : comment += *p; - } - break; - } - case InAngleAddress : { - switch ( *p ) { - case '"' : inQuotedString = !inQuotedString; - addrSpec += *p; - break; - case '>' : if ( !inQuotedString ) { - context = TopLevel; - } - else - addrSpec += *p; - break; - case '\\' : // quoted character - addrSpec += *p; - ++p; // skip the '\' - if ( *p ) - addrSpec += *p; - else - //return KPIM::UnexpectedEnd; - goto ABORT_PARSING; - break; - default : addrSpec += *p; - } - break; - } - } // switch ( context ) - } - -ABORT_PARSING: - displayName = displayName.stripWhiteSpace(); - comment = comment.stripWhiteSpace(); - addrSpec = addrSpec.stripWhiteSpace(); - - fullName = TQString::fromUtf8( displayName ); - email = TQString::fromUtf8( addrSpec ); - - // check for errors - if ( inQuotedString ) - return; // KPIM::UnbalancedQuote; - if ( context == InComment ) - return; // KPIM::UnbalancedParens; - if ( context == InAngleAddress ) - return; // KPIM::UnclosedAngleAddr; - - if ( addrSpec.isEmpty() ) { - if ( displayName.isEmpty() ) - return; // KPIM::NoAddressSpec; - else { - //addrSpec = displayName; - //displayName.truncate( 0 ); - // Address of the form "foo@bar" or "foo@bar (Name)". - email = fullName; - fullName = TQString::fromUtf8( comment ); - } - } - - // Check that we do not have any extra characters on the end of the - // strings - unsigned int len = fullName.length(); - if ( fullName[ 0 ] == '"' && fullName[ len - 1 ] == '"' ) - fullName = fullName.mid( 1, len - 2 ); -} - -void Addressee::setResource( Resource *resource ) -{ - detach(); - mData->resource = resource; -} - -Resource *Addressee::resource() const -{ - return mData->resource; -} - -void Addressee::setChanged( bool value ) -{ - detach(); - mData->changed = value; -} - -bool Addressee::changed() const -{ - return mData->changed; -} - -void Addressee::setSortMode( KABC::SortMode *mode ) -{ - mSortMode = mode; -} - -bool Addressee::operator< ( const Addressee &addr ) -{ - if ( !mSortMode ) - return false; - else - return mSortMode->lesser( *this, addr ); -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Addressee &a ) -{ - if (!a.mData) return s; - - s << a.uid(); - - --STREAMOUT-- - s << a.mData->phoneNumbers; - s << a.mData->addresses; - s << a.mData->emails; - s << a.mData->categories; - s << a.mData->custom; - s << a.mData->keys; - return s; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Addressee &a ) -{ - if (!a.mData) - return s; - - a.detach(); - - s >> a.mData->uid; - - --STREAMIN-- - s >> a.mData->phoneNumbers; - s >> a.mData->addresses; - s >> a.mData->emails; - s >> a.mData->categories; - s >> a.mData->custom; - s >> a.mData->keys; - - a.mData->empty = false; - - return s; -} - -bool matchBinaryPattern( int value, int pattern ) -{ - /** - We want to match all telephonnumbers/addresses which have the bits in the - pattern set. More are allowed. - if pattern == 0 we have a special handling, then we want only those with - exactly no bit set. - */ - if ( pattern == 0 ) - return ( value == 0 ); - else - return ( pattern == ( pattern & value ) ); -} - -template -bool listEquals( const TQValueList &list, const TQValueList &pattern ) -{ - if ( list.count() != pattern.count() ) - return false; - - for ( uint i = 0; i < list.count(); ++i ) - if ( pattern.find( list[ i ] ) == pattern.end() ) - return false; - - return true; -} - -bool emailsEquals( const TQStringList &list, const TQStringList &pattern ) -{ - if ( list.count() != pattern.count() ) - return false; - - if ( list.first() != pattern.first() ) - return false; - - TQStringList::ConstIterator it; - for ( it = list.begin(); it != list.end(); ++it ) - if ( pattern.find( *it ) == pattern.end() ) - return false; - - return true; -} diff --git a/kabc/scripts/addressee.src.h b/kabc/scripts/addressee.src.h deleted file mode 100644 index 9cadfd41e..000000000 --- a/kabc/scripts/addressee.src.h +++ /dev/null @@ -1,407 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_ADDRESSEE_H -#define KABC_ADDRESSEE_H - -#include -#include -#include -#include - -#include -#include - -#include "address.h" -#include "agent.h" -#include "geo.h" -#include "key.h" -#include "phonenumber.h" -#include "picture.h" -#include "secrecy.h" -#include "sound.h" -#include "timezone.h" - -namespace KABC { - -class Resource; -class Field; -class SortMode; - -/** - @short address book entry - - This class represents an entry in the address book. - - The data of this class is implicitly shared. You can pass this class by value. - - If you need the name of a field for presenting it to the user you should use - the functions ending in Label(). They return a translated string which can be - used as label for the corresponding field. - - About the name fields: - - givenName() is the first name and familyName() the last name. In some - countries the family name comes first, that's the reason for the - naming. formattedName() is the full name with the correct formatting. - It is used as an override, when the correct formatting can't be generated - from the other name fields automatically. - - realName() returns a fully formatted name(). It uses formattedName, if set, - otherwise it constucts the name from the name fields. As fallback, if - nothing else is set it uses name(). - - name() is the NAME type of RFC2426. It can be used as internal name for the - data enty, but shouldn't be used for displaying the data to the user. - */ -class KABC_EXPORT Addressee -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); - - public: - typedef TQValueList List; - typedef TQMap Map; - - /** - Construct an empty address book entry. - */ - Addressee(); - ~Addressee(); - - Addressee( const Addressee & ); - Addressee &operator=( const Addressee & ); - - bool operator==( const Addressee & ) const; - bool operator!=( const Addressee & ) const; - - /** - Return, if the address book entry is empty. - */ - bool isEmpty() const; - - /** - Set unique identifier. - */ - void setUid( const TQString &uid ); - /** - Return unique identifier. - */ - TQString uid() const; - /** - Return translated label for uid field. - */ - static TQString uidLabel(); - - /** - Set unique resource identifier. - */ - void setUri( const TQString &uid ); - /** - Return unique resource identifier. - */ - TQString uri() const; - /** - Return translated label for uri field. - */ - static TQString uriLabel(); - - --DECLARATIONS-- - /** - Set name fields by parsing the given string and trying to associate the - parts of the string with according fields. This function should probably - be a bit more clever. - */ - void setNameFromString( const TQString & ); - - /** - Return the name of the addressee. This is calculated from all the name - fields. - */ - TQString realName() const; - - /** - Return the name that consists of all name parts. - */ - TQString assembledName() const; - - /** - Return email address including real name. - - @param email Email address to be used to construct the full email string. - If this is TQString::null the preferred email address is used. - */ - TQString fullEmail( const TQString &email=TQString::null ) const; - - /** - Insert an email address. If the email address already exists in this - addressee it is not duplicated. - - @param email Email address - @param preferred Set to true, if this is the preferred email address of - the addressee. - */ - void insertEmail( const TQString &email, bool preferred=false ); - - /** - Remove email address. If the email address doesn't exist, nothing happens. - */ - void removeEmail( const TQString &email ); - - /** - Return preferred email address. This is the first email address or the - last one added with insertEmail() with a set preferred parameter. - */ - TQString preferredEmail() const; - - /** - Return list of all email addresses. - */ - TQStringList emails() const; - - /** - Set the emails to @p list. - The first email address gets the preferred one! - @param list The list of email addresses. - */ - void setEmails( const TQStringList& list); - - /** - Insert a phone number. If a phone number with the same id already exists - in this addressee it is not duplicated. - */ - void insertPhoneNumber( const PhoneNumber &phoneNumber ); - - /** - Remove phone number. If no phone number with the given id exists for this - addresse nothing happens. - */ - void removePhoneNumber( const PhoneNumber &phoneNumber ); - - /** - Return phone number, which matches the given type. - */ - PhoneNumber phoneNumber( int type ) const; - - /** - Return list of all phone numbers. - */ - PhoneNumber::List phoneNumbers() const; - - /** - Return list of phone numbers with a special type. - */ - PhoneNumber::List phoneNumbers( int type ) const; - - /** - Return phone number with the given id. - */ - PhoneNumber findPhoneNumber( const TQString &id ) const; - - /** - Insert a key. If a key with the same id already exists - in this addressee it is not duplicated. - */ - void insertKey( const Key &key ); - - /** - Remove a key. If no key with the given id exists for this - addresse nothing happens. - */ - void removeKey( const Key &key ); - - /** - Return key, which matches the given type. - If @p type == Key::Custom you can specify a string - that should match. If you leave the string empty, the first - key with a custom value is returned. - */ - Key key( int type, TQString customTypeString = TQString::null ) const; - - /** - Return list of all keys. - */ - Key::List keys() const; - - /** - Set the list of keys - @param keys The keys to be set. - */ - void setKeys( const Key::List& keys); - - /** - Return list of keys with a special type. - If @p type == Key::Custom you can specify a string - that should match. If you leave the string empty, all custom - keys will be returned. - */ - Key::List keys( int type, TQString customTypeString = TQString::null ) const; - - /** - Return key with the given id. - */ - Key findKey( const TQString &id ) const; - - /** - Insert an address. If an address with the same id already exists - in this addressee it is not duplicated. - */ - void insertAddress( const Address &address ); - - /** - Remove address. If no address with the given id exists for this - addresse nothing happens. - */ - void removeAddress( const Address &address ); - - /** - Return address, which matches the given type. - */ - Address address( int type ) const; - - /** - Return list of all addresses. - */ - Address::List addresses() const; - - /** - Return list of addresses with a special type. - */ - Address::List addresses( int type ) const; - - /** - Return address with the given id. - */ - Address findAddress( const TQString &id ) const; - - /** - Insert category. If the category already exists it is not duplicated. - */ - void insertCategory( const TQString & ); - - /** - Remove category. - */ - void removeCategory( const TQString & ); - - /** - Return, if addressee has the given category. - */ - bool hasCategory( const TQString & ) const; - - /** - Set categories to given value. - */ - void setCategories( const TQStringList & ); - - /** - Return list of all set categories. - */ - TQStringList categories() const; - - /** - Insert custom entry. The entry is identified by the name of the inserting - application and a unique name. If an entry with the given app and name - already exists its value is replaced with the new given value. - - An empty value isn't allowed (nothing happens if this is called with - any of the three arguments being empty) - */ - void insertCustom( const TQString &app, const TQString &name, - const TQString &value ); - - /** - Remove custom entry. - */ - void removeCustom( const TQString &app, const TQString &name ); - - /** - Return value of custom entry, identified by app and entry name. - */ - TQString custom( const TQString &app, const TQString &name ) const; - - /** - Set all custom entries. - */ - void setCustoms( const TQStringList & ); - - /** - Return list of all custom entries. - */ - TQStringList customs() const; - - /** - Parse full email address. The result is given back in fullName and email. - */ - static void parseEmailAddress( const TQString &rawEmail, TQString &fullName, - TQString &email ); - - /** - Debug output. - */ - void dump() const; - - /** - Returns string representation of the addressee. - */ - TQString asString() const; - - /** - Set resource where the addressee is from. - */ - void setResource( Resource *resource ); - - /** - Return pointer to resource. - */ - Resource *resource() const; - - /** - Mark addressee as changed. - */ - void setChanged( bool value ); - - /** - Return whether the addressee is changed. - */ - bool changed() const; - - static void setSortMode( KABC::SortMode *mode ); - - bool operator< ( const Addressee &addr ); - - private: - void detach(); - - struct AddresseeData; - mutable TDESharedPtr mData; - - private: - static AddresseeData* shared_null; - static AddresseeData* makeSharedNull(); - static KABC::SortMode *mSortMode; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); - -} - -#endif diff --git a/kabc/scripts/createisomap.pl b/kabc/scripts/createisomap.pl deleted file mode 100755 index 897cd4896..000000000 --- a/kabc/scripts/createisomap.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -# -# Create a translation table countryname->iso-code from the entry.desktop -# files in tdebase/l10n/*/ -# -# USAGE EXAMPLE: -# ./createisomap.pl $TDEDIR/share/locale/l10n > countrytransl.map -# -# Don't laugh at me. I put this together with an old perl book, perl -# being a language I've never used before. - -@entries = <$ARGV[0]/*/entry.desktop>; -chomp @entries; -foreach $entry (@entries) { - local ( $entryiso, @entryfile, @mappings ); - # print "--> $entry\n"; - $entryiso = $entry; - $entryiso =~ s/$ARGV[0]\///; - $entryiso =~ s/\/entry\.desktop//; - # print " $entryiso\n"; - open (IN, $entry); - @entryfile = ; - close IN; - chomp @entryfile; - foreach $entryfileline (@entryfile) { - if ( $entryfileline =~ /^Name.*=(.*)$/ ) { - # push (@mappings, $1 . "\t" . $entryiso ); - print "$1\t$entryiso\n"; - } - } -} - -# add some convenience entries which aren't part of the entry.desktop files - -print "Czech Republic\tcz\n"; diff --git a/kabc/scripts/entrylist b/kabc/scripts/entrylist deleted file mode 100644 index 87c342a06..000000000 --- a/kabc/scripts/entrylist +++ /dev/null @@ -1,82 +0,0 @@ -# This file describes the fields of an address book entry. -# -# The following comma-separated fields are used: -# -# Control: A generates accessor functions. -# L generates a static function for returning a tranlsated label -# F generates a Field id and object for generic field handling -# E generate an equality test in Addressee::operator==(). -# Field Name : A descriptive name which is shown to the user. -# Comment : A comment helping translators to understand the field name -# Type : C++ type of field. -# Identifier : A string used in code as variable name etc. -# Field Category : Categories the field belongs to (see Field::FieldCategory). -# Output function: Function used to convert type to string for debug output (optional) - -ALE,name,,TQString,name - -ALFE,formatted name,,TQString,formattedName,Frequent - -ALFE,family name,,TQString,familyName,Frequent -ALFE,given name,,TQString,givenName,Frequent -ALFE,additional names,,TQString,additionalName -ALFE,honorific prefixes,,TQString,prefix -ALFE,honorific suffixes,,TQString,suffix - -ALFE,nick name,,TQString,nickName,Personal - -ALFE,birthday,,TQDateTime,birthday,Personal,.toString() - -#Address address -LF,home address street,,TQString,homeAddressStreet,Address|Personal -LF,home address city,,TQString,homeAddressLocality,Address|Personal -LF,home address state,,TQString,homeAddressRegion,Address|Personal -LF,home address zip code,,TQString,homeAddressPostalCode,Address|Personal -LF,home address country,,TQString,homeAddressCountry,Address|Personal -LF,home address label,,TQString,homeAddressLabel,Address|Personal - -LF,business address street,,TQString,businessAddressStreet,Address|Organization -LF,business address city,,TQString,businessAddressLocality,Address|Organization -LF,business address state,,TQString,businessAddressRegion,Address|Organization -LF,business address zip code,,TQString,businessAddressPostalCode,Address|Organization -LF,business address country,,TQString,businessAddressCountry,Address|Organization -LF,business address label,,TQString,businessAddressLabel,Address|Organization - -#phoneNumbers -LF,home phone,,TQString,homePhone,Personal|Frequent -LF,business phone,,TQString,businessPhone,Organization|Frequent -LF,mobile phone,,TQString,mobilePhone,Frequent -LF,home fax,,TQString,homeFax -LF,business fax,,TQString,businessFax -LF,car phone,,TQString,carPhone -LF,ISDN,,TQString,isdn -LF,pager,,TQString,pager - -#emails -LF,email address,,TQString,email,Email|Frequent - -ALFE,mail client,,TQString,mailer,Email - -ALE,time zone,,TimeZone,timeZone,,.asString() -ALE,geographic position,,Geo,geo,,.asString() - -ALFE,title,person,TQString,title,Organization -ALFE,role,person in organization,TQString,role,Organization -ALFE,organization,,TQString,organization,Organization -ALFE,department,,TQString,department,Organization - -ALFE,note,,TQString,note - -ALE,product identifier,,TQString,productId -ALE,revision date,,TQDateTime,revision,,.toString() - -ALE,sort string,,TQString,sortString - -ALF,homepage,,KURL,url,,.url() - -ALE,security class,,Secrecy,secrecy,,.asString() - -ALE,logo,,Picture,logo,,.asString() -ALE,photo,,Picture,photo,,.asString() -ALE,sound,,Sound,sound,,.asString() -ALE,agent,,Agent,agent,,.asString() diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp deleted file mode 100644 index 2c80810b7..000000000 --- a/kabc/scripts/field.src.cpp +++ /dev/null @@ -1,512 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "field.h" -#include "address.h" - -using namespace KABC; - -class Field::FieldImpl -{ - public: - FieldImpl( int fieldId, int category = 0, - const TQString &label = TQString::null, - const TQString &key = TQString::null, - const TQString &app = TQString::null ) - : mFieldId( fieldId ), mCategory( category ), mLabel( label ), - mKey( key ), mApp( app ) {} - - enum FieldId - { - CustomField, - --ENUMS-- - }; - - int fieldId() { return mFieldId; } - int category() { return mCategory; } - - TQString label() { return mLabel; } - TQString key() { return mKey; } - TQString app() { return mApp; } - - private: - int mFieldId; - int mCategory; - - TQString mLabel; - TQString mKey; - TQString mApp; -}; - - -Field::List Field::mAllFields; -Field::List Field::mDefaultFields; -Field::List Field::mCustomFields; - - -Field::Field( FieldImpl *impl ) -{ - mImpl = impl; -} - -Field::~Field() -{ - delete mImpl; -} - -TQString Field::label() -{ - switch ( mImpl->fieldId() ) { - --CASELABEL-- - case FieldImpl::CustomField: - return mImpl->label(); - default: - return i18n("Unknown Field"); - } -} - -int Field::category() -{ - return mImpl->category(); -} - -TQString Field::categoryLabel( int category ) -{ - switch ( category ) { - case All: - return i18n("All"); - case Frequent: - return i18n("Frequent"); - case Address: - return i18n("street/postal","Address"); - case Email: - return i18n("Email"); - case Personal: - return i18n("Personal"); - case Organization: - return i18n("Organization"); - case CustomCategory: - return i18n("Custom"); - default: - return i18n("Undefined"); - } -} - -TQString Field::value( const KABC::Addressee &a ) -{ - switch ( mImpl->fieldId() ) { - --CASEVALUE-- - case FieldImpl::Email: - return a.preferredEmail(); - case FieldImpl::Birthday: - if ( a.birthday().isValid() ) - return a.birthday().date().toString( Qt::ISODate ); - else - return TQString::null; - case FieldImpl::Url: - return a.url().prettyURL(); - case FieldImpl::HomePhone: - { - PhoneNumber::List::ConstIterator it; - - { - // check for preferred number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home | PhoneNumber::Pref ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) - return (*it).number(); - } - - { - // check for normal home number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) - return (*it).number(); - } - - return TQString::null; - } - case FieldImpl::BusinessPhone: - { - PhoneNumber::List::ConstIterator it; - - { - // check for preferred number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work | PhoneNumber::Pref ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) - return (*it).number(); - } - - { - // check for normal work number - const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work ); - for ( it = list.begin(); it != list.end(); ++it ) - if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) - return (*it).number(); - } - - return TQString::null; - } - case FieldImpl::MobilePhone: - return a.phoneNumber( PhoneNumber::Cell ).number(); - case FieldImpl::HomeFax: - return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); - case FieldImpl::BusinessFax: - return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); - case FieldImpl::CarPhone: - return a.phoneNumber( PhoneNumber::Car ).number(); - case FieldImpl::Isdn: - return a.phoneNumber( PhoneNumber::Isdn ).number(); - case FieldImpl::Pager: - return a.phoneNumber( PhoneNumber::Pager ).number(); - case FieldImpl::HomeAddressStreet: - return a.address( Address::Home ).street(); - case FieldImpl::HomeAddressLocality: - return a.address( Address::Home ).locality(); - case FieldImpl::HomeAddressRegion: - return a.address( Address::Home ).region(); - case FieldImpl::HomeAddressPostalCode: - return a.address( Address::Home ).postalCode(); - case FieldImpl::HomeAddressCountry: - return a.address( Address::Home ).country(); - case FieldImpl::HomeAddressLabel: - return a.address( Address::Home ).label(); - case FieldImpl::BusinessAddressStreet: - return a.address( Address::Work ).street(); - case FieldImpl::BusinessAddressLocality: - return a.address( Address::Work ).locality(); - case FieldImpl::BusinessAddressRegion: - return a.address( Address::Work ).region(); - case FieldImpl::BusinessAddressPostalCode: - return a.address( Address::Work ).postalCode(); - case FieldImpl::BusinessAddressCountry: - return a.address( Address::Work ).country(); - case FieldImpl::BusinessAddressLabel: - return a.address( Address::Work ).label(); - case FieldImpl::CustomField: - return a.custom( mImpl->app(), mImpl->key() ); - default: - return TQString::null; - } -} - -bool Field::setValue( KABC::Addressee &a, const TQString &value ) -{ - switch ( mImpl->fieldId() ) { - --CASESETVALUE-- - case FieldImpl::MobilePhone: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Cell ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::HomeFax: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::BusinessFax: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::CarPhone: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Car ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::Isdn: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Isdn ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::Pager: - { - PhoneNumber number = a.phoneNumber( PhoneNumber::Pager ); - number.setNumber( value ); - a.insertPhoneNumber( number ); - return true; - } - case FieldImpl::HomeAddressStreet: - { - KABC::Address address = a.address( Address::Home ); - address.setStreet( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressLocality: - { - KABC::Address address = a.address( Address::Home ); - address.setLocality( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressRegion: - { - KABC::Address address = a.address( Address::Home ); - address.setRegion( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressPostalCode: - { - KABC::Address address = a.address( Address::Home ); - address.setPostalCode( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressCountry: - { - KABC::Address address = a.address( Address::Home ); - address.setCountry( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::HomeAddressLabel: - { - KABC::Address address = a.address( Address::Home ); - address.setLabel( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressStreet: - { - KABC::Address address = a.address( Address::Work ); - address.setStreet( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressLocality: - { - KABC::Address address = a.address( Address::Work ); - address.setLocality( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressRegion: - { - KABC::Address address = a.address( Address::Work ); - address.setRegion( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressPostalCode: - { - KABC::Address address = a.address( Address::Work ); - address.setPostalCode( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressCountry: - { - KABC::Address address = a.address( Address::Work ); - address.setCountry( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::BusinessAddressLabel: - { - KABC::Address address = a.address( Address::Work ); - address.setLabel( value ); - a.insertAddress( address ); - return true; - } - case FieldImpl::Birthday: - a.setBirthday( TQT_TQDATE_OBJECT(TQDate::fromString( value, Qt::ISODate )) ); - return true; - case FieldImpl::CustomField: - a.insertCustom( mImpl->app(), mImpl->key(), value ); - return true; - default: - return false; - } -} - -TQString Field::sortKey( const KABC::Addressee &a ) -{ - switch ( mImpl->fieldId() ) { - --CASEVALUE-- - case FieldImpl::Birthday: - if ( a.birthday().isValid() ) { - TQDate date = TQT_TQDATE_OBJECT(a.birthday().date()); - TQString key; - key.sprintf( "%02d-%02d", date.month(), date.day() ); - return key; - } else - return TQString( "00-00" ); - default: - return value( a ).lower(); - } -} - -bool Field::isCustom() -{ - return mImpl->fieldId() == FieldImpl::CustomField; -} - -Field::List Field::allFields() -{ - if ( mAllFields.isEmpty() ) { - --CREATEFIELDS-- - } - - return mAllFields; -} - -Field::List Field::defaultFields() -{ - if ( mDefaultFields.isEmpty() ) { - createDefaultField( FieldImpl::FormattedName ); - createDefaultField( FieldImpl::Email ); - } - - return mDefaultFields; -} - -void Field::createField( int id, int category ) -{ - mAllFields.append( new Field( new FieldImpl( id, category ) ) ); -} - -void Field::createDefaultField( int id, int category ) -{ - mDefaultFields.append( new Field( new FieldImpl( id, category ) ) ); -} - -void Field::deleteFields() -{ - Field::List::ConstIterator it; - - for ( it = mAllFields.constBegin(); it != mAllFields.constEnd(); ++it ) { - delete (*it); - } - mAllFields.clear(); - - for ( it = mDefaultFields.constBegin(); it != mDefaultFields.constEnd(); ++it ) { - delete (*it); - } - mDefaultFields.clear(); - - for ( it = mCustomFields.constBegin(); it != mCustomFields.constEnd(); ++it ) { - delete (*it); - } - mCustomFields.clear(); -} - -void Field::saveFields( const TQString &identifier, - const Field::List &fields ) -{ - TDEConfig *cfg = TDEGlobal::config(); - TDEConfigGroupSaver( cfg, "KABCFields" ); - - saveFields( cfg, identifier, fields ); -} - -void Field::saveFields( TDEConfig *cfg, const TQString &identifier, - const Field::List &fields ) -{ - TQValueList fieldIds; - - int custom = 0; - Field::List::ConstIterator it; - for( it = fields.begin(); it != fields.end(); ++it ) { - fieldIds.append( (*it)->mImpl->fieldId() ); - if( (*it)->isCustom() ) { - TQStringList customEntry; - customEntry << (*it)->mImpl->label(); - customEntry << (*it)->mImpl->key(); - customEntry << (*it)->mImpl->app(); - cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" + - TQString::number( custom++ ), customEntry ); - } - } - - cfg->writeEntry( identifier, fieldIds ); -} - -Field::List Field::restoreFields( const TQString &identifier ) -{ - TDEConfig *cfg = TDEGlobal::config(); - TDEConfigGroupSaver( cfg, "KABCFields" ); - - return restoreFields( cfg, identifier ); -} - -Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier ) -{ - const TQValueList fieldIds = cfg->readIntListEntry( identifier ); - - Field::List fields; - - int custom = 0; - TQValueList::ConstIterator it; - for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { - FieldImpl *f = 0; - if ( (*it) == FieldImpl::CustomField ) { - TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" + - identifier + "_" + - TQString::number( custom++ ) ); - f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ], - customEntry[ 1 ], customEntry[ 2 ] ); - } else { - f = new FieldImpl( *it ); - } - fields.append( new Field( f ) ); - } - - return fields; -} - -bool Field::equals( Field *field ) -{ - bool sameId = ( mImpl->fieldId() == field->mImpl->fieldId() ); - - if ( !sameId ) return false; - - if ( mImpl->fieldId() != FieldImpl::CustomField ) return true; - - return mImpl->key() == field->mImpl->key(); -} - -Field *Field::createCustomField( const TQString &label, int category, - const TQString &key, const TQString &app ) -{ - Field *field = new Field( new FieldImpl( FieldImpl::CustomField, - category | CustomCategory, - label, key, app ) ); - mCustomFields.append( field ); - - return field; -} diff --git a/kabc/scripts/makeaddressee b/kabc/scripts/makeaddressee deleted file mode 100755 index fa955b0bf..000000000 --- a/kabc/scripts/makeaddressee +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/perl - -my $srcdir; -$srcdir = `dirname $0` || die "Can't determine \$srcdir."; -chomp $srcdir; - -if (!open( ENTRIES, "$srcdir/entrylist" ) ) { - print "Can't open $srcdir/entrylist\n"; - exit 1; -} - - while() { - if (/^#/) { next; } - chop; - @entries = split /,/; - if (!/^.+,(\w+),(\w+)/) { next; } - push @entryCtrl, @entries[0]; - push @entryRealNames, @entries[1]; - push @entryComments, @entries[2]; - push @entryTypes, @entries[3]; - push @entryNames, @entries[4]; - push @entryCategory, @entries[5]; - push @entryDebug, @entries[6]; - } - -close ENTRIES; - -if (!open( H_IN, "$srcdir/addressee.src.h" ) ) { - print "Can't open $srcdir/addressee.src.h\n"; - exit 1; -} -if (!open( H_OUT, ">../addressee.h" ) ) { - print "Can't open addressee.h\n"; - exit 1; -} - print H_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; - - while( ) { - if (/--DECLARATIONS--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print H_OUT " /**\n"; - print H_OUT " Set $entryRealNames[$i].\n"; - print H_OUT " */\n"; - print H_OUT " void set" . ucfirst($entryNames[$i]); - print H_OUT "( const $entryTypes[$i] &$entryNames[$i] );\n"; - - print H_OUT " /**\n"; - print H_OUT " Return $entryRealNames[$i].\n"; - print H_OUT " */\n"; - print H_OUT " $entryTypes[$i] $entryNames[$i]() const;\n"; - } - - if ( $entryCtrl[$i] !~ /L/ ) { next; } - print H_OUT " /**\n"; - print H_OUT " Return translated label for $entryNames[$i] field.\n"; - print H_OUT " */\n"; - print H_OUT " static TQString $entryNames[$i]Label();\n\n"; - } - } else { - print H_OUT; - } - } - -close H_OUT; -close H_IN; - -if (!open( CPP_IN, "$srcdir/addressee.src.cpp" ) ) { - print "Can't open $srcdir/addressee.src.cpp\n"; - exit 1; -} -if (!open( CPP_OUT, ">../addressee.cpp" ) ) { - print "Can't open addressee.cpp\n"; - exit 1; -} - print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; - - while( ) { - if (/--VARIABLES--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - print CPP_OUT " $entryTypes[$i] $entryNames[$i];\n"; - } - } elsif (/--DEFINITIONS--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print CPP_OUT "void Addressee::set" . ucfirst($entryNames[$i]); - print CPP_OUT "( const $entryTypes[$i] &$entryNames[$i] )\n{\n"; - print CPP_OUT " if ( $entryNames[$i] == mData->$entryNames[$i] ) return;\n"; - print CPP_OUT " detach();\n mData->empty = false;\n"; - print CPP_OUT " mData->$entryNames[$i] = $entryNames[$i];\n}\n\n"; - - print CPP_OUT "$entryTypes[$i] Addressee::$entryNames[$i]() const\n{\n"; - print CPP_OUT " return mData->$entryNames[$i];\n}\n\n"; - } - - if ( $entryCtrl[$i] !~ /L/ ) { next; } - @labelwords = split ' ', $entryRealNames[$i]; - for( $j=0; $j < @labelwords; ++$j ) { - $labelwords[$j] = ucfirst $labelwords[$j]; - } - $label = join ' ', @labelwords; - print CPP_OUT "TQString Addressee::$entryNames[$i]Label()\n{\n"; - if ( $entryComments[$i] ) { - print CPP_OUT " return i18n(\"$entryComments[$i]\",\"$label\");\n"; - } else { - print CPP_OUT " return i18n(\"$label\");\n"; - } - print CPP_OUT "}\n\n\n"; - } - } elsif (/--EQUALSTEST--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /E/ ) { - if ( $entryNames[$i] !~ "revision" ) { - if ( $entryTypes[$i] =~ "TQString" ) { - print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] &&\n"; - print CPP_OUT " !( mData->$entryNames[$i].isEmpty() && a.mData->$entryNames[$i].isEmpty() ) ) {\n"; - print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; - print CPP_OUT " return false;\n"; - print CPP_OUT " }\n"; - } else { - print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] ) {\n"; - print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; - print CPP_OUT " return false;\n"; - print CPP_OUT " }\n"; - } - } - } - } - } elsif (/--STREAMOUT--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print CPP_OUT " s << a.mData->$entryNames[$i];\n"; - } - } - } elsif (/--STREAMIN--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] =~ /A/ ) { - print CPP_OUT " s >> a.mData->$entryNames[$i];\n"; - } - } - } elsif (/--DEBUG--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - print CPP_OUT " kdDebug(5700) << \" " . ucfirst($entryNames[$i]); - print CPP_OUT ": '\" << $entryNames[$i]()$entryDebug[$i] << \"'\" << endl;\n"; - } - } else { - print CPP_OUT; - } - } - -close CPP_OUT; -close CPP_IN; - -if (!open( CPP_IN, "$srcdir/field.src.cpp" ) ) { - print "Can't open $srcdir/field.src.cpp\n"; - exit 1; -} -if (!open( CPP_OUT, ">../field.cpp" ) ) { - print "Can't open field.cpp\n"; - exit 1; -} - print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; - - while( ) { - if (/--ENUMS--/) { - $first = 1; - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $first ) { $first = 0; } - else { print CPP_OUT ",\n"; } - print CPP_OUT " " . ucfirst($entryNames[$i]); - } - print CPP_OUT "\n"; - } elsif (/--CASELABEL--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryCtrl[$i] !~ /L/ ) { next; } - print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; - print CPP_OUT " return Addressee::$entryNames[$i]Label();\n"; - } - } elsif (/--CASEVALUE--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryTypes[$i] ne "TQString" ) { next; } - print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; - print CPP_OUT " return a.$entryNames[$i]();\n"; - } - } elsif (/--CASESETVALUE--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /A/ ) { next; } - if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryTypes[$i] ne "TQString" ) { next; } - print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; - print CPP_OUT " a.set" . ucfirst($entryNames[$i]) . "( value );\n"; - print CPP_OUT " return true;\n"; - } - } elsif (/--CREATEFIELDS--/) { - for( $i=0; $i<@entryNames; ++$i ) { - if ( $entryCtrl[$i] !~ /F/ ) { next; } - print CPP_OUT " createField( FieldImpl::" . ucfirst($entryNames[$i]); - if ( $entryCategory[$i] ) { - print CPP_OUT ", $entryCategory[$i]"; - } - print CPP_OUT " );\n"; - } - } else { - print CPP_OUT; - } - } - -close CPP_OUT; -close CPP_IN; diff --git a/kabc/secrecy.cpp b/kabc/secrecy.cpp deleted file mode 100644 index 7ec439b0c..000000000 --- a/kabc/secrecy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "secrecy.h" - -using namespace KABC; - -Secrecy::Secrecy( int type ) - : mType( type ) -{ -} - -bool Secrecy::operator==( const Secrecy &s ) const -{ - return ( mType == s.mType ); -} - -bool Secrecy::operator!=( const Secrecy &s ) const -{ - return !( *this == s ); -} - -bool Secrecy::isValid() const -{ - return mType != Invalid; -} - -void Secrecy::setType( int type ) -{ - mType = type; -} - -int Secrecy::type() const -{ - return mType; -} - -Secrecy::TypeList Secrecy::typeList() -{ - static TypeList list; - - if ( list.isEmpty() ) - list << Public << Private << Confidential; - - return list; -} - -TQString Secrecy::typeLabel( int type ) -{ - switch ( type ) { - case Public: - return i18n( "Public" ); - break; - case Private: - return i18n( "Private" ); - break; - case Confidential: - return i18n( "Confidential" ); - break; - default: - return i18n( "Unknown type" ); - break; - } -} - -TQString Secrecy::asString() const -{ - return typeLabel( mType ); -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Secrecy &secrecy ) -{ - return s << secrecy.mType; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Secrecy &secrecy ) -{ - s >> secrecy.mType; - - return s; -} diff --git a/kabc/secrecy.h b/kabc/secrecy.h deleted file mode 100644 index 5cc60b11d..000000000 --- a/kabc/secrecy.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_SECRECY_H -#define KABC_SECRECY_H - -#include - -#include - -namespace KABC { - -class KABC_EXPORT Secrecy -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Secrecy & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Secrecy & ); - -public: - typedef TQValueList TypeList; - - /** - * Secrecy types - * - * @li Public - for public access - * @li Private - only private access - * @li Confidential - access for confidential persons - */ - enum Types { - Public, - Private, - Confidential, - Invalid - }; - - /** - * Constructor. - * - * @param type The secrecy type, see Types. - */ - Secrecy( int type = Invalid ); - - bool operator==( const Secrecy & ) const; - bool operator!=( const Secrecy & ) const; - - /** - Returns if the Secrecy object has a valid value. - */ - bool isValid() const; - - /** - * Sets the type, see Types. - */ - void setType( int type ); - - /** - * Returns the type, see Types. - */ - int type() const; - - /** - * Returns a list of all available secrecy types. - */ - static TypeList typeList(); - - /** - * Returns a translated label for a given secrecy type. - */ - static TQString typeLabel( int type ); - - /** - * For debug. - */ - TQString asString() const; - -private: - int mType; -}; - -KABC_EXPORT TQDataStream& operator<<( TQDataStream &s, const Secrecy &secrecy ); -KABC_EXPORT TQDataStream& operator>>( TQDataStream &s, Secrecy &secrecy ); - -} -#endif diff --git a/kabc/sortmode.cpp b/kabc/sortmode.cpp deleted file mode 100644 index ee9a6f82d..000000000 --- a/kabc/sortmode.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "sortmode.h" - -using namespace KABC; - -NameSortMode::NameSortMode() - : mNameType( FormattedName ), mAscendingOrder( true ), d( 0 ) -{ - mNameType = FormattedName; -} - -NameSortMode::NameSortMode( NameType type, bool ascending ) - : mNameType( type ), mAscendingOrder( ascending ), d( 0 ) -{ -} - -bool NameSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const -{ - bool lesser = false; - - switch ( mNameType ) { - case FormattedName: - lesser = TQString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0; - break; - case FamilyName: - lesser = TQString::localeAwareCompare( first.familyName(), second.familyName() ) < 0; - break; - case GivenName: - lesser = TQString::localeAwareCompare( first.givenName(), second.givenName() ) < 0; - break; - default: - lesser = false; - break; - } - - if ( !mAscendingOrder ) - lesser = !lesser; - - return lesser; -} - -FieldSortMode::FieldSortMode( KABC::Field *field, bool ascending ) - : mField( field ), mAscendingOrder( ascending ), d( 0 ) -{ -} - -bool FieldSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const -{ - if ( !mField ) - return false; - else { - bool lesser = TQString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0; - if ( !mAscendingOrder ) - lesser = !lesser; - - return lesser; - } -} diff --git a/kabc/sortmode.h b/kabc/sortmode.h deleted file mode 100644 index 9768fc8c5..000000000 --- a/kabc/sortmode.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2004 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_SORTMODE_H -#define KABC_SORTMODE_H - -#include - -#include - -namespace KABC { - -/** - @short Sort method for sorting an addressee list. - - This interface should be reimplemented by classes which shall act as - SortModes for KABC::AddresseeList. -*/ -class KABC_EXPORT SortMode -{ - public: - /** - Reimplement this method and return whether the first contact is 'smaller' - than the second. - */ - virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const = 0; -}; - -class KABC_EXPORT NameSortMode : public SortMode -{ - public: - enum NameType - { - FormattedName, - FamilyName, - GivenName - }; - - /** - Constructor. - - Creates a NameSortMethod with FormattedName as name type set. - */ - NameSortMode(); - - /** - Constructor. - - Creates a NameSortMethod with the specified name type. - - @param type The name type. - @param ascending true for ascending sort, false for descending. - */ - NameSortMode( NameType type, bool ascending = true ); - - /** - Returns whether the first contact is 'smaller' then the second. - */ - virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; - - private: - NameType mNameType; - bool mAscendingOrder; - - class NameSortModePrivate; - NameSortModePrivate *d; -}; - -class KABC_EXPORT FieldSortMode : public SortMode -{ - public: - /** - Constructor. - - Creates a FieldSortMethod with the specified field. - - @param field The field. - @param ascending true for ascending sort, false for descending. - */ - FieldSortMode( KABC::Field *field, bool ascending = true ); - - /** - Returns whether the first contact is 'smaller' then the second. - */ - virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; - - private: - KABC::Field *mField; - bool mAscendingOrder; - - class FieldSortModePrivate; - FieldSortModePrivate *d; -}; - -} - -#endif diff --git a/kabc/sound.cpp b/kabc/sound.cpp deleted file mode 100644 index cf645be83..000000000 --- a/kabc/sound.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "sound.h" - -#include - -using namespace KABC; - -Sound::Sound() - : mIntern( false ) -{ -} - -Sound::Sound( const TQString &url ) - : mUrl( url ), mIntern( false ) -{ -} - -Sound::Sound( const TQByteArray &data ) - : mData( data ), mIntern( true ) -{ -} - -Sound::~Sound() -{ -} - -bool Sound::operator==( const Sound &s ) const -{ - if ( mIntern != s.mIntern ) return false; - - if ( mIntern ) { - if ( mData != s.mData ) - return false; - } else { - if ( mUrl != s.mUrl ) - return false; - } - - return true; -} - -bool Sound::operator!=( const Sound &s ) const -{ - return !( s == *this ); -} - -void Sound::setUrl( const TQString &url ) -{ - mUrl = url; - mIntern = false; -} - -void Sound::setData( const TQByteArray &data ) -{ - mData = data; - mIntern = true; -} - -bool Sound::isIntern() const -{ - return mIntern; -} - -bool Sound::isEmpty() const -{ - return (!mIntern) && mUrl.isEmpty(); - -} - -TQString Sound::url() const -{ - return mUrl; -} - -TQByteArray Sound::data() const -{ - return mData; -} - -TQString Sound::asString() const -{ - if ( mIntern ) - return "intern sound"; - else - return mUrl; -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const Sound &sound ) -{ - return s << sound.mIntern << sound.mUrl; -// return s << sound.mIntern << sound.mUrl << sound.mData; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, Sound &sound ) -{ - s >> sound.mIntern >> sound.mUrl; -// s >> sound.mIntern >> sound.mUrl >> sound.mData; - return s; -} diff --git a/kabc/sound.h b/kabc/sound.h deleted file mode 100644 index 98dcf320b..000000000 --- a/kabc/sound.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_SOUND_H -#define KABC_SOUND_H - -#include -#include - -#include - -namespace KABC { - -/** @short Class that holds a Sound clip for a contact. - * - * The sound can be played doing something like this: - * - * \code - * KTempFile tmp; - * if(sound.isIntern()) { - * tmp.file()->tqwriteBlock( sound.data() ); - * tmp.close(); - * KAudioPlayer::play( tmp.name() ); - * } else if(!sound.url().isEmpty()) { - * TQString tmpFile; - * if(!TDEIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) - * { - * KMessageBox::error(0L, - * TDEIO::NetAccess::lastErrorString(), - * i18n("Failed to download sound file"), - * KMessageBox::Notify - * ); - * return; - * } - * KAudioPlayer::play( tmpFile ); - * } - * \endcode - * - * Unfortunetly KAudioPlayer::play is ASync, so to delete the temporary file, the best you can really do is set a timer. - * - */ -class KABC_EXPORT Sound -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); - -public: - - /** - * Consturctor. Creates an empty object. - */ - Sound(); - - /** - * Consturctor. - * - * @param url A URL that describes the position of the sound file. - */ - Sound( const TQString &url ); - - /** - * Consturctor. - * - * @param data The raw data of the sound. - */ - Sound( const TQByteArray &data ); - - /** - * Destructor. - */ - ~Sound(); - - - bool operator==( const Sound & ) const; - bool operator!=( const Sound & ) const; - - /** - * Sets a URL for the location of the sound file. When using this - * function, isIntern() will return 'false' until you use - * setData(). - * - * @param url The location URL of the sound file. - */ - void setUrl( const TQString &url ); - - /** - * Test if this sound file has been set. - * Just does: !isIntern() && url.isEmpty() - * @since 3.4 - */ - bool isEmpty() const; - - /** - * Sets the raw data of the sound. When using this function, - * isIntern() will return 'true' until you use setUrl(). - * - * @param data The raw data of the sound. - */ - void setData( const TQByteArray &data ); - - /** - * Returns whether the sound is described by a URL (extern) or - * by the raw data (intern). - * When this method returns 'true' you can use data() to - * get the raw data. Otherwise you can request the URL of this - * sound by url() and load the raw data from that location. - */ - bool isIntern() const; - - /** - * Returns the location URL of this sound. - */ - TQString url() const; - - /** - * Returns the raw data of this sound. - */ - TQByteArray data() const; - - /** - * Returns string representation of the sound. - */ - TQString asString() const; - -private: - TQString mUrl; - TQByteArray mData; - - int mIntern; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); - -} -#endif diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp deleted file mode 100644 index c887fcb83..000000000 --- a/kabc/stdaddressbook.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "resource.h" - -#include "stdaddressbook.h" - -using namespace KABC; - -StdAddressBook *StdAddressBook::mSelf = 0; -bool StdAddressBook::mAutomaticSave = true; - -static KStaticDeleter addressBookDeleter; - -TQString StdAddressBook::fileName() -{ - return locateLocal( "data", "kabc/std.vcf" ); -} - -TQString StdAddressBook::directoryName() -{ - return locateLocal( "data", "kabc/stdvcf" ); -} - -void StdAddressBook::handleCrash() -{ -} - -StdAddressBook *StdAddressBook::self() -{ - if ( !mSelf ) - addressBookDeleter.setObject( mSelf, new StdAddressBook ); - - return mSelf; -} - -StdAddressBook *StdAddressBook::self( bool asynchronous ) -{ - if ( !mSelf ) - addressBookDeleter.setObject( mSelf, new StdAddressBook( asynchronous ) ); - - return mSelf; -} - -StdAddressBook::StdAddressBook() - : AddressBook( "" ) -{ - kdDebug(5700) << "StdAddressBook::StdAddressBook()" << endl; - - init( false ); -} - -StdAddressBook::StdAddressBook( bool asynchronous ) - : AddressBook( "" ) -{ - kdDebug(5700) << "StdAddressBook::StdAddressBook( bool )" << endl; - - init( asynchronous ); -} - -StdAddressBook::~StdAddressBook() -{ - if ( mAutomaticSave ) - saveAll(); -} - -void StdAddressBook::init( bool asynchronous ) -{ - KRES::Manager *manager = resourceManager(); - - KRES::Manager::ActiveIterator it; - for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { - (*it)->setAddressBook( this ); - if ( !(*it)->open() ) { - error( TQString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); - continue; - } - connect( *it, TQT_SIGNAL( loadingFinished( Resource* ) ), - this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); - connect( *it, TQT_SIGNAL( savingFinished( Resource* ) ), - this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); - - connect( *it, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); - connect( *it, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), - this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); - } - - Resource *res = standardResource(); - if ( !res ) { - res = manager->createResource( "file" ); - if ( res ) - addResource( res ); - else - kdDebug(5700) << "No resource available!!!" << endl; - } - - setStandardResource( res ); - manager->writeConfig(); - - if ( asynchronous ) - asyncLoad(); - else - load(); -} - -bool StdAddressBook::saveAll() -{ - kdDebug(5700) << "StdAddressBook::saveAll()" << endl; - bool ok = true; - - deleteRemovedAddressees(); - - KRES::Manager::ActiveIterator it; - KRES::Manager *manager = resourceManager(); - for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { - if ( !(*it)->readOnly() && (*it)->isOpen() ) { - Ticket *ticket = requestSaveTicket( *it ); - if ( !ticket ) { - error( i18n( "Unable to save to resource '%1'. It is locked." ) - .arg( (*it)->resourceName() ) ); - return false; - } - - if ( !AddressBook::save( ticket ) ) { - ok = false; - releaseSaveTicket( ticket ); - } - } - } - - return ok; -} - -bool StdAddressBook::save() -{ - kdDebug(5700) << "StdAddressBook::save()" << endl; - - if ( mSelf ) - return mSelf->saveAll(); - else - return true; -} - -void StdAddressBook::close() -{ - addressBookDeleter.destructObject(); -} - -void StdAddressBook::setAutomaticSave( bool enable ) -{ - mAutomaticSave = enable; -} - -bool StdAddressBook::automaticSave() -{ - return mAutomaticSave; -} - -// should get const for 4.X -Addressee StdAddressBook::whoAmI() -{ - TDEConfig config( "kabcrc" ); - config.setGroup( "General" ); - - return findByUid( config.readEntry( "WhoAmI" ) ); -} - -void StdAddressBook::setWhoAmI( const Addressee &addr ) -{ - TDEConfig config( "kabcrc" ); - config.setGroup( "General" ); - - config.writeEntry( "WhoAmI", addr.uid() ); -} diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h deleted file mode 100644 index 935b2bad1..000000000 --- a/kabc/stdaddressbook.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_STDADDRESSBOOK_H -#define KABC_STDADDRESSBOOK_H - -#include "addressbook.h" - -namespace KABC { - -/** - Standard KDE address book - - This class provides access to the standard KDE address book shared by all - applications. - - It's implemented as a singleton. Use self() to get the address book - object. On the first self() call the address book also gets loaded. - - Example: - - \code - KABC::AddressBook *ab = KABC::StdAddressBook::self(); - - AddressBook::Ticket *ticket = ab->requestSaveTicket(); - - if ( ticket ) { - KABC::AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { - kdDebug() << "UID=" << (*it).uid() << endl; - - // do some other stuff - } - - KABC::StdAddressBook::save( ticket ); - } - \endcode -*/ -class KABC_EXPORT StdAddressBook : public AddressBook -{ - public: - - /** - Destructor. - */ - ~StdAddressBook(); - - /** - Returns the standard addressbook object. It also loads all resources of - the users standard address book synchronously. - */ - static StdAddressBook *self(); - - /** - This is the same as above, but with specified behaviour of resource loading. - - @param asynchronous When true, the resources are loaded asynchronous, that - means you have the data foremost the addressBookChanged() - signal has been emitted. So connect to this signal when - using this method! - */ - static StdAddressBook *self( bool asynchronous ); - - /** - Saves the standard address book to disk. - - @deprecated Use AddressBook::save( Ticket* ) instead - */ - static bool save() KDE_DEPRECATED; - - /** - @deprecated There is no need to call this function anymore. - */ - static void handleCrash() KDE_DEPRECATED; - - /** - Returns the default file name for vcard-based addressbook - */ - static TQString fileName(); - - /** - Returns the default directory name for vcard-based addressbook - */ - static TQString directoryName(); - - /** - Sets the automatic save property of the address book. - - @param state If true, the address book is saved automatically - at destruction time, otherwise you have to call - AddressBook::save( Ticket* ). - */ - static void setAutomaticSave( bool state ); - - /** - Closes the address book. Depending on automaticSave() it will - save the address book first. - */ - static void close(); - - /** - Returns whether the address book is saved at destruction time. - See also setAutomaticSave(). - */ - static bool automaticSave(); - - /** - Returns the contact, that is associated with the owner of the - address book. This contact should be used by other programs - to access user specific data. - */ - Addressee whoAmI(); - - /** - Sets the users contact. See whoAmI() for more information. - - @param addr The users contact. - */ - void setWhoAmI( const Addressee &addr ); - - protected: - StdAddressBook(); - StdAddressBook( bool asynchronous ); - - void init( bool asynchronous ); - bool saveAll(); - - private: - static StdAddressBook *mSelf; - static bool mAutomaticSave; -}; - -} - -#endif - diff --git a/kabc/tdeab2tdeabc.cpp b/kabc/tdeab2tdeabc.cpp deleted file mode 100644 index f03a80f45..000000000 --- a/kabc/tdeab2tdeabc.cpp +++ /dev/null @@ -1,476 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "stdaddressbook.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, - { "quiet", "", 0 }, - { "o", 0, 0 }, - { "override", I18N_NOOP( "Override existing entries" ), "1" }, - TDECmdLineLastOption -}; - -void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) -{ - kdDebug() << "KMAILENTRY: " << kmailEntry << endl; - - TQString entry = kmailEntry.simplifyWhiteSpace(); - if ( entry.isEmpty() ) return; - - TQString email; - TQString name; - TQString comment; - - if ( entry.at( entry.length() -1 ) == ')' ) { - int br = entry.findRev( '(' ); - if ( br >= 0 ) { - comment = entry.mid( br + 1, entry.length() - br - 2 ); - entry.truncate( br ); - if ( entry.at( entry.length() - 1 ).isSpace() ) { - entry.truncate( br - 1 ); - } - } - } - - int posSpace = entry.findRev( ' ' ); - if ( posSpace < 0 ) { - email = entry; - if ( !comment.isEmpty() ) { - name = comment; - comment = ""; - } - } else { - email = entry.mid( posSpace + 1 ); - name = entry.left( posSpace ); - } - - if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { - email = email.mid( 1, email.length() - 2 ); - } - if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { - name = name.mid( 1, name.length() - 2 ); - } - if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { - name = name.mid( 1, name.length() - 2 ); - } - - if ( name.at( name.length() -1 ) == ')' ) { - int br = name.findRev( '(' ); - if ( br >= 0 ) { - comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; - name.truncate( br ); - if ( name.at( name.length() - 1 ).isSpace() ) { - name.truncate( br - 1 ); - } - } - } - - kdDebug() << " EMAIL : " << email << endl; - kdDebug() << " NAME : " << name << endl; - kdDebug() << " COMMENT : " << comment << endl; - - KABC::Addressee::List al = ab->findByEmail( email ); - if ( al.isEmpty() ) { - KABC::Addressee a; - a.setNameFromString( name ); - a.insertEmail( email ); - a.setNote( comment ); - - ab->insertAddressee( a ); - - kdDebug() << "--INSERTED: " << a.realName() << endl; - } -} - -void importKMailAddressBook( KABC::AddressBook *ab ) -{ - TQString fileName = locateLocal( "data", "kmail/addressbook" ); - TQString kmailConfigName = locate( "config", "kmailrc" ); - if ( !kmailConfigName.isEmpty() ) { - TDEConfig cfg( kmailConfigName ); - cfg.setGroup( "Addressbook" ); - fileName = cfg.readPathEntry( "default", fileName ); - } - if ( !TDEStandardDirs::exists( fileName ) ) { - kdDebug(5700) << "Couldn't find KMail addressbook." << endl; - return; - } - - TQFile f( fileName ); - if ( !f.open(IO_ReadOnly) ) { - kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl; - return; - } - - TQStringList kmailEntries; - - TQTextStream t( &f ); - while ( !t.eof() ) { - kmailEntries.append( t.readLine() ); - } - f.close(); - - TQStringList::ConstIterator it; - for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { - if ( (*it).at( 0 ) == '#' ) continue; - bool insideQuote = false; - int end = (*it).length() - 1; - for ( int i = end; i; i-- ) { - if ( (*it).at( i ) == '"' ) { - if ( insideQuote ) - insideQuote = false; - else - insideQuote = true; - } else if ( (*it).at( i ) == ',' && !insideQuote ) { - readKMailEntry( (*it).mid( i + 1, end - i ), ab ); - end = i - 1; - } - } - - readKMailEntry( (*it).mid( 0, end + 1 ), ab ); - } -} - -void readKAddressBookEntries( const TQString &dataString, Addressee &a ) -{ - // Strip "KMail:1.0" prefix and "[EOS]" suffix. - TQString str = dataString.mid( 11, dataString.length() - 24 ); - - TQStringList entries = TQStringList::split( "\n[EOR]\n ", str ); - - Address homeAddress( Address::Home ); - Address businessAddress( Address::Work ); - Address otherAddress; - - TQStringList::ConstIterator it; - for ( it = entries.begin(); it != entries.end(); ++it ) { - int pos = (*it).find( "\n" ); - TQString fieldName = (*it).left( pos ); - TQString fieldValue = (*it).mid( pos + 2 ); - - if ( fieldName == "X-HomeFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home | - PhoneNumber::Fax ) ); - } else if ( fieldName == "X-OtherPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) ); - } else if ( fieldName == "X-PrimaryPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) ); - } else if ( fieldName == "X-BusinessFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work | - PhoneNumber::Fax ) ); - } else if ( fieldName == "X-CarPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) ); - } else if ( fieldName == "X-MobilePhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) ); - } else if ( fieldName == "X-ISDN" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) ); - } else if ( fieldName == "X-OtherFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) ); - } else if ( fieldName == "X-Pager" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) ); - } else if ( fieldName == "X-BusinessPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) ); - } else if ( fieldName == "X-HomePhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) ); - } else if ( fieldName == "X-HomeAddress" ) { - homeAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-HomeAddressStreet" ) { - homeAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-HomeAddressCity" ) { - homeAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-HomeAddressPostalCode" ) { - homeAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-HomeAddressState" ) { - homeAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-HomeAddressCountry" ) { - homeAddress.setCountry( fieldValue ); - } else if ( fieldName == "X-BusinessAddress" ) { - businessAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-BusinessAddressStreet" ) { - businessAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-BusinessAddressCity" ) { - businessAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-BusinessAddressPostalCode" ) { - businessAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-BusinessAddressState" ) { - businessAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-BusinessAddressCountry" ) { - businessAddress.setCountry( fieldValue ); - } else if ( fieldName == "X-OtherAddress" ) { - otherAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-OtherAddressStreet" ) { - otherAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-OtherAddressCity" ) { - otherAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-OtherAddressPostalCode" ) { - otherAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-OtherAddressState" ) { - otherAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-OtherAddressCountry" ) { - otherAddress.setCountry( fieldValue ); - } else if ( fieldName == "NICKNAME" ) { - a.setNickName( fieldValue ); - } else if ( fieldName == "ORG" ) { - a.setOrganization( fieldValue ); - } else if ( fieldName == "ROLE" ) { - a.setRole( fieldValue ); - } else if ( fieldName == "BDAY" ) { - a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) ); - } else if ( fieldName == "WEBPAGE" ) { - a.setUrl( KURL( fieldValue ) ); - } else if ( fieldName == "N" ) { - } else if ( fieldName == "X-FirstName" ) { - } else if ( fieldName == "X-MiddleName" ) { - } else if ( fieldName == "X-LastName" ) { - } else if ( fieldName == "X-Title" ) { - } else if ( fieldName == "X-Suffix" ) { - } else if ( fieldName == "X-FileAs" ) { - } else if ( fieldName == "EMAIL" ) { - a.insertEmail( fieldValue, true ); - } else if ( fieldName == "X-E-mail2" ) { - a.insertEmail( fieldValue ); - } else if ( fieldName == "X-E-mail3" ) { - a.insertEmail( fieldValue ); - } else if ( fieldName == "X-Notes" ) { - } else { - a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue ); - } - } - - if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress ); - if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress ); - if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress ); -} - -void importKab( KABC::AddressBook *ab, bool override, bool quiet ) -{ - TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" ); - fileName += "addressbook.kab"; - if ( !TQFile::exists( fileName ) ) { - if ( !quiet ) { - KMessageBox::error( 0, "" + i18n( "Address book file %1 not found! Make sure the old address book is located there and you have read permission for this file." ) - .arg( fileName ) + "" ); - } - kdDebug(5700) << "No KDE 2 addressbook found." << endl; - return; - } - - kdDebug(5700) << "Converting old-style kab addressbook to " - "new-style kabc addressbook." << endl; - - KabAPI kab( 0 ); - if ( kab.init() != ::AddressBook::NoError ) { - kdDebug(5700) << "Error initing kab" << endl; - exit( 1 ); - } - - KabKey key; - ::AddressBook::Entry entry; - - int num = kab.addressbook()->noOfEntries(); - - kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl; - - for ( int i = 0; i < num; ++i ) { - if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) { - kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl; - continue; - } - if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) { - kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl; - continue; - } - - Addressee a; - - // Convert custom entries - int count = 0; - bool idFound = false; - TQStringList::ConstIterator customIt; - for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { - if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { - a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); - idFound = true; - } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { - readKAddressBookEntries( *customIt, a ); - } else { - a.insertCustom( "tdeab2tdeabc", TQString::number( count++ ), *customIt ); - } - } - if ( idFound ) { - if ( !override ) continue; - } else { - entry.custom << "X-KABC-UID:" + a.uid(); - ::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry ); - if ( error != ::AddressBook::NoError ) { - kdDebug(5700) << "kab.change returned with error " << error << endl; - } else { - kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl; - } - } - - a.setTitle( entry.title ); - a.setFormattedName( entry.fn ); - a.setPrefix( entry.nameprefix ); - a.setGivenName( entry.firstname ); - a.setAdditionalName( entry.middlename ); - a.setFamilyName( entry.lastname ); - a.setBirthday( entry.birthday ); - - TQStringList::ConstIterator emailIt; - for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt ) - a.insertEmail( *emailIt ); - - TQStringList::ConstIterator phoneIt; - for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) { - int kabType = (*phoneIt++).toInt(); - if ( phoneIt == entry.telephone.end() ) break; - TQString number = *phoneIt; - int type = 0; - if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice; - else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice; - else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax; - else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem; - a.insertPhoneNumber( PhoneNumber( number, type ) ); - } - - if ( entry.URLs.count() > 0 ) { - a.setUrl( KURL( entry.URLs.first() ) ); - if ( entry.URLs.count() > 1 ) { - kdWarning() << "More than one URL. Ignoring all but the first." << endl; - } - } - - int noAdr = entry.noOfAddresses(); - for ( int j = 0; j < noAdr; ++j ) { - ::AddressBook::Entry::Address kabAddress; - entry.getAddress( j, kabAddress ); - - Address adr; - - adr.setStreet( kabAddress.address ); - adr.setPostalCode( kabAddress.zip ); - adr.setLocality( kabAddress.town ); - adr.setCountry( kabAddress.country ); - adr.setRegion( kabAddress.state ); - - TQString label; - if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n"; - if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n"; - if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n"; - if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n"; - if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n"; - if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n"; - adr.setLabel( label ); - - a.insertAddress( adr ); - } - - TQString note = entry.comment; - - if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1; - if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2; - if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3; - if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4; - - if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " ); - - TQStringList::ConstIterator talkIt; - for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) { - note += "\nTalk: " + (*talkIt); - } - - a.setNote( note ); - - a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix - - a.setCategories( entry.categories ); - - kdDebug(5700) << "Addressee: " << a.familyName() << endl; - - ab->insertAddressee( a ); - } - - kab.save( true ); -} - -int main( int argc, char **argv ) -{ - TDEAboutData aboutData( "tdeab2tdeabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" ); - aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - bool override = false; - - if ( args->isSet( "override" ) ) { - kdDebug() << "Override existing entries." << endl; - - override = true; - } - - bool quiet = false; - - if ( args->isSet( "quiet" ) ) - quiet = true; - - if ( args->isSet( "disable-autostart" ) ) { - kdDebug() << "Disable autostart." << endl; - - TDEConfig *config = app.config(); - config->setGroup( "Startup" ); - config->writeEntry( "EnableAutostart", false ); - } - - KABC::AddressBook *kabcBook = StdAddressBook::self(); - - importKMailAddressBook( kabcBook ); - - importKab( kabcBook, override, quiet ); - - StdAddressBook::save(); - - kdDebug(5700) << "Saved kabc addressbook to '" << kabcBook->identifier() << "'" << endl; -} - diff --git a/kabc/tdeab2tdeabc.desktop b/kabc/tdeab2tdeabc.desktop deleted file mode 100644 index 945f044d4..000000000 --- a/kabc/tdeab2tdeabc.desktop +++ /dev/null @@ -1,105 +0,0 @@ -[Desktop Entry] -Name=tdeab2tdeabc -Name[af]=kab-na-kabc -Name[csb]=Kònwersëjô adresowi knéżczi -Name[eo]=Konvertilo de "kab" al "kabc" -Name[fr]=KAB2KABC -Name[fy]=Kab2kabc -Name[hu]=Kab2kabc -Name[it]=Kab2Kabc -Name[nl]=Kab2kabc -Name[pl]=Konwersja książki adresowej -Name[pt_BR]=Conversão de kab para kabc -Name[ro]=Kab2kabc -Name[sv]=Kab2kabc -Name[te]=కెఎబి2కెఎబిసి -Name[zu]=i-tdeab2tdeabc -Exec=tdeab2tdeabc --disable-autostart --quiet -Icon=misc -Type=Application -Comment=libkab to libkabc conversion tool. -Comment[af]=libkab na libkabc omskakeling program. -Comment[ar]=أداة تحويل libkab إلى libkabc. -Comment[az]=libkab - libkabc dönüşdürmÉ™ vasitÉ™si. -Comment[be]=ІнÑтрумент пераўтварÑÐ½Ð½Ñ libkab у libkabc. -Comment[bg]=Програма за конвертиране на libkab до libkabc. -Comment[bn]=libkab থেকে libkabc-তে পরিবরà§à¦¤à¦¨ করার পà§à¦°à§‹à¦—à§à¦°à¦¾à¦®à¥¤ -Comment[bs]=alat za pretvaranje libkab u libkabc. -Comment[ca]=Eina de conversió de libkab a libkabc. -Comment[cs]=PÅ™evod dat z libkab do libkabc. -Comment[csb]=Nôrzãdze do kònwersëji z libkab do libkabc. -Comment[cy]=erfyn trosi libkab i libkabc -Comment[da]=libkab-til-libkabc-konverteringsværktøj. -Comment[de]=Konvertierung von libkab in libkabc -Comment[el]=ΕÏγαλείο μετατÏοπής από το libkab στο libkabc. -Comment[eo]=Konvertilo de "libkab" al "libkabc" -Comment[es]=Conversor libkab a libkabc. -Comment[et]=libkab -> libkabc teisendamine -Comment[eu]=libkab-etik libkabc-era bihurtzeko tresna. -Comment[fa]=ابزار تبدیل libkab به libcabc. -Comment[fi]=libkab-libkabc -muunnin -Comment[fr]=Outil de conversion de libkab vers libkabc. -Comment[fy]=Konversjeprogramma fan libkab nei libkabc. -Comment[ga]=Uirlis tiontaithe ó libkab go libkabc. -Comment[gl]=Ferramenta de conversión de libkab a libkabc. -Comment[he]=כלי המרה מ־libkab ל־libkabc -Comment[hi]=libkab से libkabc बदलने वाला औजार -Comment[hr]=Alat za pretvaranje iz libkab u libkabc -Comment[hsb]=libkab -> libkabc konwerter -Comment[hu]=libkab -> libkabc konvertáló. -Comment[id]=konverter libkab ke libkabc. -Comment[is]=libkab í libkabc breytingatól. -Comment[it]=Strumento di conversione da libkab a libkabc. -Comment[ja]=libkab ã‹ã‚‰ libkabc ã¸ã®å¤‰æ›ãƒ„ール -Comment[ka]=libkab => libkabc გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ხელსáƒáƒ¬áƒ§áƒ. -Comment[kk]=libkab дегеннен libkabc дегенге айналдыру құралы. -Comment[km]=ឧបករណáŸâ€‹áž”ម្លែង​ពី libkab ទៅ libkabc -Comment[ko]=libkabì„ libkabc로 바꿔주는 연장. -Comment[lb]=libkab op libkabc Konvertéierungs-Hëllefsmëttel. -Comment[lt]=libkab į libkabc konvertavimo įrankis. -Comment[lv]=libkab uz libkabc kovertēšanas rÄ«ks. -Comment[mk]=алатка за претворање од libkab во libkabc. -Comment[mn]=libkab-Ð°Ð°Ñ libkabc-руу хөрвүүлÑгч -Comment[ms]=perkakasan penukaran libkab to libkabc. -Comment[mt]=Għodda għall-konverżjoni libkab għal libkabc -Comment[nb]=libkab til libkabc konverteringsverktøy. -Comment[nds]=Warktüüch för't Ümwanneln vun libkab na libkabc. -Comment[ne]=libkab to libkabc रूपानà¥à¤¤à¤°à¤£ उपकरण । -Comment[nl]=Conversieprogramma van libkab naar libkabc. -Comment[nn]=Konverterer libkab til libkabc -Comment[nso]=Sebereka sa phetosetso ya libkab go libkabc -Comment[pa]=libkab ਤੋ libkabc ਤਬਦੀਲੀ ਸੰਦ। -Comment[pl]=NarzÄ™dzie do konwersji z libkab do libkabc. -Comment[pt]=Ferramenta de conversão de libkab para libkabc. -Comment[pt_BR]=Ferramenta de conversão de libkab para libkabc. -Comment[ro]=Utilitar de conversie de la "libkab" la "libkabc". -Comment[ru]=утилита Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ libkab в libkabc. -Comment[rw]=Igikoresho cy'ihindura libkab muri libkabc. -Comment[se]=konverterenreaidu libkab:as libkabc:ai -Comment[sk]=Prevod dát z libkab do libkabc. -Comment[sl]=Orodje za pretvorbo iz libkab v libkabc -Comment[sq]=Vegla për shëndrimin e libkab në libkabc. -Comment[sr]=Ðлат за конверзију из libkab-а у libkabc. -Comment[sr@Latn]=Alat za konverziju iz libkab-a u libkabc. -Comment[ss]=Lithulusi lekutjintja le-libkab kuya ku-libkabc. -Comment[sv]=Konverteringsverktyg frÃ¥n libkab till libkabc -Comment[ta]=libkab இலிரà¯à®¨à¯à®¤à¯ libkabc கà¯à®•௠மாறà¯à®±à¯à®®à¯ கரà¯à®µà®¿. -Comment[te]=libkab à°¨à±à°‚à°šà°¿ libkabc కౠమారà±à°šà± పనిమà±à°Ÿà±à°Ÿà± -Comment[tg]=аÑбоби дигаргунÑози libkab ба libkabc -Comment[th]=เครื่องมือเปลี่ยน libkab เป็น libkabc -Comment[tr]=libkab' tan libkabc' ye dönüştürme aracı -Comment[tt]=libkab-›libkabc äyländerü qoralı. -Comment[uk]=ЗаÑіб Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ libkab до libkabc. -Comment[uz]=libkab'ni libkabc'ga aylantiradigan vosita. -Comment[uz@cyrillic]=libkab'ни libkabc'га айлантирадиган воÑита. -Comment[ven]=Tshishumiswa tsha u shandukisa libkab itshi ya kha libkabc -Comment[vi]=Công cụ chuyển đổi libkab sang libkabc. -Comment[xh]=libkab kwi libkabc isixhobo sokuguqulela. -Comment[zh_CN]=libkab 到 libkabc 的转æ¢å·¥å…·ã€‚ -Comment[zh_HK]=libkab 至 libkabc 的轉æ›å·¥å…· -Comment[zh_TW]=libkab 至 libkabc 轉æ›å·¥å…· -Comment[zu]=Ithuluzi lokuguqula le-libkab kuyaku-libkabc -Terminal=false -NoDisplay=true -X-TDE-autostart-condition=tdeab2tdeabcrc:Startup:EnableAutostart:true -OnlyShowIn=TDE; diff --git a/kabc/tests/Makefile.am b/kabc/tests/Makefile.am deleted file mode 100644 index 961d12bd4..000000000 --- a/kabc/tests/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# Make sure $(all_includes) remains last! -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ - -I$(srcdir)/../vcardparser/ -I$(srcdir)/../vcard/include \ - -I$(srcdir)/../vcard/include/generated \ - -I$(srcdir)/../vcardparser $(all_includes) -LDADD = ../libkabc.la - -METASOURCES = AUTO - -check_PROGRAMS = testlock testldapclient - -testlock_LDFLAGS = $(all_libraries) -testlock_SOURCES = testlock.cpp - -testldapclient_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testldapclient_SOURCES = testldapclient.cpp - -EXTRA_PROGRAMS = testkabc testkabcdlg testdistlist bigread bigwrite testdb \ - testaddressee testaddresseelist testaddressfmt kabcargl testaddresslineedit - -testkabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testkabc_SOURCES = testkabc.cpp - -testaddressee_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddressee_SOURCES = testaddressee.cpp - -testaddresseelist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddresseelist_SOURCES = testaddresseelist.cpp - -testaddressfmt_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddressfmt_SOURCES = testaddressfmt.cpp - -testkabcdlg_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testkabcdlg_SOURCES = testkabcdlg.cpp - -testdistlist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testdistlist_SOURCES = testdistlist.cpp - -testaddresslineedit_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testaddresslineedit_SOURCES = testaddresslineedit.cpp - -bigread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -bigread_LDADD = ../libkabc.la $(top_builddir)/kabc/plugins/file/libkabc_file.la -bigread_SOURCES = bigread.cpp - -bigwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -bigwrite_LDADD = ../libkabc.la $(top_builddir)/kabc/plugins/file/libkabc_file.la -bigwrite_SOURCES = bigwrite.cpp - -testdb_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testdb_SOURCES = testdb.cpp - -kabcargl_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kabcargl_SOURCES = kabcargl.cpp - diff --git a/kabc/tests/bigread.cpp b/kabc/tests/bigread.cpp deleted file mode 100644 index 5ea2393dc..000000000 --- a/kabc/tests/bigread.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "vcardformat.h" -#include "plugins/file/resourcefile.h" -#if 0 -#include "resourcesql.h" -#endif - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("bigread","BigReadKabc","0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app( false, false ); - - AddressBook ab; - - ResourceFile r( "my.kabc", "vcard2" ); - ab.addResource( &r ); - -#if 0 - ResourceSql rsql( &ab, "root", "kde4ever", "localhost" ); - ab.addResource( &rsql ); -#endif - - struct tms start; - - times( &start ); - -#if 0 - kdDebug() << "utime : " << int( start.tms_utime ) << endl; - kdDebug() << "stime : " << int( start.tms_stime ) << endl; - kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; -#endif - - kdDebug() << "Start load" << endl; - ab.load(); - kdDebug() << "Finished load" << endl; - - struct tms end; - - times( &end ); - -#if 0 - kdDebug() << "utime : " << int( end.tms_utime ) << endl; - kdDebug() << "stime : " << int( end.tms_stime ) << endl; - kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; -#endif - - kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; - kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; - -// ab.dump(); -} diff --git a/kabc/tests/bigwrite.cpp b/kabc/tests/bigwrite.cpp deleted file mode 100644 index 167f5d44d..000000000 --- a/kabc/tests/bigwrite.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "vcardformat.h" -#include "plugins/file/resourcefile.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("bigwrite","BigWriteKabc","0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app( false, false ); - - AddressBook ab; - ResourceFile r( "my.kabc", "vcard" ); - ab.addResource( &r ); - - for( int i = 0; i < 5000; ++i ) { - Addressee a; - a.setGivenName( "number" + TQString::number( i ) ); - a.setFamilyName( "Name" ); - a.insertEmail( TQString::number( i ) + "@domain" ); - - ab.insertAddressee( a ); - } - printf( "\n" ); - - Ticket *t = ab.requestSaveTicket( &r ); - if ( t ) { - struct tms start; - - times( &start ); - -#if 0 - kdDebug() << "utime : " << int( start.tms_utime ) << endl; - kdDebug() << "stime : " << int( start.tms_stime ) << endl; - kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; -#endif - - if ( !ab.save( t ) ) { - kdDebug() << "Can't save." << endl; - } - - struct tms end; - - times( &end ); - -#if 0 - kdDebug() << "utime : " << int( end.tms_utime ) << endl; - kdDebug() << "stime : " << int( end.tms_stime ) << endl; - kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; - kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; -#endif - - kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; - kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; - - } else { - kdDebug() << "No ticket for save." << endl; - } -} diff --git a/kabc/tests/kabcargl.cpp b/kabc/tests/kabcargl.cpp deleted file mode 100644 index 589c973f2..000000000 --- a/kabc/tests/kabcargl.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "stdaddressbook.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("kabcargl","Fix broken pre3.0rc3 format","0.1"); - aboutData.addAuthor("Cornelius Schumacher", 0, "schumacher@kde.org"); - - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app; - - TQString filename = StdAddressBook::fileName(); - - TQFile f( filename ); - if ( !f.open( IO_ReadOnly ) ) { - kdDebug() << "Error opening file '" << filename << "' for reading." << endl; - return 1; - } - - TQTextStream t( &f ); - t.setEncoding(TQTextStream::UnicodeUTF8); - TQString text = t.read(); - f.close(); - - text = TQString::fromUtf8( text.local8Bit() ); - text.replace( "\n", "\r\n" ); - - if ( !f.open( IO_WriteOnly ) ) { - kdDebug() << "Error opening file '" << filename << "' for writing." << endl; - return 1; - } - - TQTextStream t2( &f ); - t2.setEncoding(TQTextStream::UnicodeUTF8); - t2 << text; - f.close(); -} diff --git a/kabc/tests/testaddressee.cpp b/kabc/tests/testaddressee.cpp deleted file mode 100644 index 09f95d29b..000000000 --- a/kabc/tests/testaddressee.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "plugins/file/resourcefile.h" -#include "formats/binaryformat.h" -#include "vcardformat.h" -#include "phonenumber.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "save", "", 0 }, - { "number", "", 0 }, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testaddressee","TestAddressee","0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); - - kdDebug() << "Creating a" << endl; - Addressee a; - - kdDebug() << "tick1" << endl; - a.setGivenName("Hans"); - kdDebug() << "tick2" << endl; - a.setPrefix("Dr."); - - kdDebug() << "Creating b" << endl; - Addressee b( a ); - - kdDebug() << "tack1" << endl; - a.setFamilyName("Wurst"); - kdDebug() << "tack2" << endl; - a.setNickName("hansi"); - - kdDebug() << "Creating c" << endl; - Addressee c = a; - - kdDebug() << "tock1" << endl; - c.setGivenName("Eberhard"); - - a.dump(); - b.dump(); - c.dump(); -} diff --git a/kabc/tests/testaddresseelist.cpp b/kabc/tests/testaddresseelist.cpp deleted file mode 100644 index 10fa4aaef..000000000 --- a/kabc/tests/testaddresseelist.cpp +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "addresseelist.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "save", "", 0 }, - { "number", "", 0 }, - TDECmdLineLastOption -}; - -int main(int /*argc*/,char /* **argv*/) -{ -/* TDEAboutData aboutData("testaddresseelist","TestAddresseeList","0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); */ - - kdDebug() << "Creating addressees" << endl; - Addressee a, b, c, d, e, f; - a.setGivenName ("Peter"); - a.setFamilyName("Pan"); - a.setFormattedName("Pan, Peter"); - a.setUid("Asdf"); - b.setGivenName ("Phileas"); - b.setFamilyName("Fogg"); - b.setFormattedName("Fogg, Phileas"); - b.setUid("Rsdf"); - c.setGivenName ("Jim"); - c.setFamilyName("Hawkins"); - c.setFormattedName("Hawkins, Jim"); - c.setUid("Fhwn"); - d.setGivenName ("John"); - d.setFamilyName("Silver"); - d.setPrefix ("Long"); - d.setFormattedName("Long John Silver"); - d.setUid("Z2hk"); - e.setGivenName ("Alice"); - e.setFamilyName("Liddel"); - e.setFormattedName("Liddel, Alice"); - e.setUid("kk45"); - f.setGivenName ("Edmond"); - f.setFamilyName("Dantes"); - f.setFormattedName("Dantes, Edmond"); - f.setUid("78ze"); - - kdDebug() << "Adding to list" << endl; - AddresseeList list; - list.append(a); - list.append(b); - list.append(c); - list.append(d); - list.append(e); - list.append(f); - - list.sortBy(FamilyName); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Rsdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="kk45" - && (*list.at(4)).uid()=="Asdf" - && (*list.at(5)).uid()=="Z2hk" - ) ) { - kdError() << "SORTING BY FAMILY NAME NOT CORRECT!" << endl; - kdDebug() << "list sorted by family name:" << endl; - list.dump(); - } else { - kdDebug() << "Sorting by family name correct." << endl; - } - list.setReverseSorting(true); - list.sort(); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Rsdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="kk45" - && (*list.at(1)).uid()=="Asdf" - && (*list.at(0)).uid()=="Z2hk" - ) ) { - kdError() << "REVERSE SORTING BY FAMILY NAME NOT CORRECT!" << endl; - kdDebug() << "list reverse sorted by family name:" << endl; - list.dump(); - } else { - kdDebug() << "Reverse sorting by family name correct." << endl; - } - - list.setReverseSorting(false); - list.sortBy(FormattedName); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Rsdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="kk45" - && (*list.at(4)).uid()=="Z2hk" - && (*list.at(5)).uid()=="Asdf" - ) ) { - kdError() << "SORTING BY FORMATTED NAME NOT CORRECT!" << endl; - kdDebug() << "list sorted by formatted name:" << endl; - list.dump(); - } else { - kdDebug() << "Sorting by formatted name correct." << endl; - } - list.setReverseSorting(true); - list.sort(); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Rsdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="kk45" - && (*list.at(1)).uid()=="Z2hk" - && (*list.at(0)).uid()=="Asdf" - ) ) { - kdError() << "REVERSE SORTING BY FORMATTED NAME NOT CORRECT!" << endl; - kdDebug() << "list reverse sorted by formatted name:" << endl; - list.dump(); - } else { - kdDebug() << "Reverse sorting by formatted name correct." << endl; - } - - - list.setReverseSorting(false); - list.sortBy(Uid); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Asdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="Rsdf" - && (*list.at(4)).uid()=="Z2hk" - && (*list.at(5)).uid()=="kk45" - ) ) { - kdError() << "SORTING BY UID NOT CORRECT!" << endl; - kdDebug() << "list sorted by Uid:" << endl; - list.dump(); - } else { - kdDebug() << "Sorting by Uid correct." << endl; - } - list.setReverseSorting(true); - list.sortBy(Uid); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Asdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="Rsdf" - && (*list.at(1)).uid()=="Z2hk" - && (*list.at(0)).uid()=="kk45" - ) ) { - kdError() << "REVERSE SORTING BY UID NOT CORRECT!" << endl; - kdDebug() << "list sorted by Uid:" << endl; - list.dump(); - } else { - kdDebug() << "Reverse sorting by Uid correct." << endl; - } - - // zero, one or two entries might give errors in a poor sorting - // implementation - kdDebug() << "sorting empty list" << endl; - AddresseeList list2; - list2.sort(); - - kdDebug() << "sorting one entry list" << endl; - list2.append(a); - list2.sort(); - - kdDebug() << "sorting two entry list" << endl; - list2.append(f); - list2.setReverseSorting(false); - list2.sort(); - if ( !( (*list2.at(0)).uid()=="78ze" - && (*list2.at(1)).uid()=="Asdf" - ) ) { - kdError() << "SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; - kdDebug() << "list sorted by formatted name, two entries:" << endl; - list2.dump(); - } else { - kdDebug() << "Sorting by FormattedName in a two entry list correct." << endl; - } - list2.setReverseSorting(true); - list2.sort(); - if ( !( (*list2.at(1)).uid()=="78ze" - && (*list2.at(0)).uid()=="Asdf" - ) ) { - kdError() << "REVERSE SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; - kdDebug() << "list reverse sorted by formatted name, two entries:" << endl; - list2.dump(); - } else { - kdDebug() << "Reverse sorting by FormattedName in a two entry list correct." << endl; - } - -} - - diff --git a/kabc/tests/testaddressfmt.cpp b/kabc/tests/testaddressfmt.cpp deleted file mode 100644 index ca13a116c..000000000 --- a/kabc/tests/testaddressfmt.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "address.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - { "save", "", 0 }, - { "number", "", 0 }, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testaddressfmt","TestAddressFormat","0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - - TDEApplication app; - - Address a; - a.setStreet("Lummerlandstr. 1"); - a.setPostalCode("12345"); - a.setLocality("Lummerstadt"); - a.setCountry ("Germany"); - - Address b; - b.setStreet("457 Foobar Ave"); - b.setPostalCode("1A2B3C"); - b.setLocality("Nervousbreaktown"); - b.setRegion("DC"); - b.setCountry("United States of America"); - - Address c; - c.setStreet("Lummerlandstr. 1"); - c.setPostalCode("12345"); - c.setLocality("Lummerstadt"); - c.setCountry ("Deutschland"); - - Address d; - d.setStreet("Lummerlandstr. 1"); - d.setPostalCode("12345"); - d.setLocality("Lummerstadt"); - d.setCountry (""); - - tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); - tqDebug( a.formattedAddress("Jim Knopf").latin1() ); - tqDebug( "-------------------------------------\nShould have US address formatting, local country formatting\n" ); - tqDebug( b.formattedAddress("Huck Finn").latin1() ); - tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); - tqDebug( c.formattedAddress("Jim Knopf").latin1() ); - tqDebug( "-------------------------------------\nShould have local address formatting, local country formatting\n" ); - tqDebug( d.formattedAddress("Jim Knopf").latin1() ); -} - - diff --git a/kabc/tests/testaddresslineedit.cpp b/kabc/tests/testaddresslineedit.cpp deleted file mode 100644 index 7315aef7e..000000000 --- a/kabc/tests/testaddresslineedit.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -#include - -#include "addresslineedit.h" - -using namespace KABC; - -int main( int argc,char **argv ) -{ - TDEAboutData aboutData( "testaddresslineedit", - I18N_NOOP( "Test Address LineEdit" ), "0.1" ); - TDECmdLineArgs::init( argc, argv, &aboutData ); - - TDEApplication app; - - AddressLineEdit *lineEdit = new AddressLineEdit( 0 ); - - lineEdit->show(); - app.setMainWidget( lineEdit ); - - TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); - - app.exec(); - - delete lineEdit; -} diff --git a/kabc/tests/testdb.cpp b/kabc/tests/testdb.cpp deleted file mode 100644 index fd4e4f6c1..000000000 --- a/kabc/tests/testdb.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "vcardformat.h" -#include "resourcesql.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testdb","TestKabcDB","0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - -// TDEApplication app( false, false ); - TDEApplication app; - - AddressBook ab; - - ResourceSql r( &ab, "root", "kde4ever", "localhost" ); - if ( ! r.open() ) { - kdDebug() << "Failed to open resource." << endl; - } - - r.load( &ab ); - - r.close(); - - ab.dump(); -} diff --git a/kabc/tests/testdistlist.cpp b/kabc/tests/testdistlist.cpp deleted file mode 100644 index 0f0e90f90..000000000 --- a/kabc/tests/testdistlist.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "stdaddressbook.h" - -#include "distributionlisteditor.h" -#include "distributionlist.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - {"list ", I18N_NOOP("Show distribution list with name "), 0}, - TDECmdLineLastOption -}; - - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testdistlist",I18N_NOOP("Test Distribution Lists"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->isSet("list")) { - TQString name = args->getOption("list"); - - DistributionListManager *manager = - new DistributionListManager( StdAddressBook::self() ); - manager->load(); - DistributionList *list = manager->list( name ); - if ( !list ) { - kdDebug() << "No list with name '" << name << "'" << endl; - return 1; - } else { - kdDebug() << "RESULT: " << list->emails().join(", ") << endl; - return 0; - } - } - - DistributionListEditor *editor = - new DistributionListEditor( StdAddressBook::self(), 0 ); - - editor->show(); - app.setMainWidget(editor); - - TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); - - app.exec(); - - delete editor; -} diff --git a/kabc/tests/testkabc.cpp b/kabc/tests/testkabc.cpp deleted file mode 100644 index 3caea88f1..000000000 --- a/kabc/tests/testkabc.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "geo.h" -#include "secrecy.h" -#include "stdaddressbook.h" -#include "timezone.h" -#include "key.h" -#include "agent.h" -#include "vcardconverter.h" - -using namespace KABC; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testkabc",I18N_NOOP("TestKabc"),"0.1"); - TDECmdLineArgs::init(argc, argv, &aboutData); - - TDEApplication app( false, false ); - AddressBook *ab = StdAddressBook::self(); - -#define READ - -#ifdef READ - AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { - TQString vcard; - VCardConverter converter; - converter.addresseeToVCard( *it, vcard ); - kdDebug() << "card=" << vcard << endl; - } -#else - Addressee addr; - - addr.setGivenName("Tobias"); - addr.setFamilyName("Koenig"); - - - Picture pic; - TQImage img; - img.load("/home/tobias/test.png"); -/* - pic.setData(img); - pic.setType(TQImage::imageFormat("/home/tobias/test.png")); -*/ - pic.setUrl("http://www.mypict.de"); - addr.setLogo( pic ); - - ab->insertAddressee( addr ); - - StdAddressBook::save(); -#endif - - return 0; -} diff --git a/kabc/tests/testkabcdlg.cpp b/kabc/tests/testkabcdlg.cpp deleted file mode 100644 index 24225cc1b..000000000 --- a/kabc/tests/testkabcdlg.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include "addresseedialog.h" - -using namespace KABC; - -static const TDECmdLineOptions options[] = -{ - {"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0}, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testkabcdlg",I18N_NOOP("TestKabc"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->isSet("multiple")) { - Addressee::List al = AddresseeDialog::getAddressees( 0 ); - Addressee::List::ConstIterator it; - kdDebug() << "Selected Addressees:" << endl; - for( it = al.begin(); it != al.end(); ++it ) { - kdDebug() << " " << (*it).fullEmail() << endl; - } - } else { - Addressee a = AddresseeDialog::getAddressee( 0 ); - - if ( !a.isEmpty() ) { - kdDebug() << "Selected Addressee:" << endl; - a.dump(); - } else { - kdDebug() << "No Addressee selected." << endl; - } - } -} diff --git a/kabc/tests/testldapclient.cpp b/kabc/tests/testldapclient.cpp deleted file mode 100644 index df9fd6226..000000000 --- a/kabc/tests/testldapclient.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "testldapclient.h" - -#include -#include -#include - -#include - -#include -#include - -int main(int argc, char *argv[]) -{ - TDEApplication::disableAutoDcopRegistration(); - TDECmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0); - TDEApplication app; - - TestLDAPClient test; - test.setup(); - test.runAll(); - test.cleanup(); - kdDebug() << "All tests OK." << endl; - return 0; -} - -void TestLDAPClient::setup() -{ -} - -void TestLDAPClient::runAll() -{ - testIntevation(); -} - -bool TestLDAPClient::check(const TQString& txt, TQString a, TQString b) -{ - if (a.isEmpty()) - a = TQString::null; - if (b.isEmpty()) - b = TQString::null; - if (a == b) { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; - } - else { - kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; - cleanup(); - exit(1); - } - return true; -} - -void TestLDAPClient::cleanup() -{ - mClient = 0; -} - -void TestLDAPClient::testIntevation() -{ - kdDebug() << k_funcinfo << endl; - mClient = new LdapClient( this ); - - mClient->setHost( "ca.intevation.de" ); - mClient->setPort( "389" ); - mClient->setBase( "o=Intevation GmbH,c=de" ); - - // Same list as in kaddressbook's ldapsearchdialog - TQStringList attrs; - attrs << "l" << "Company" << "co" << "department" << "description" << "mail" << "facsimileTelephoneNumber" << "cn" << "homePhone" << "mobile" << "o" << "pager" << "postalAddress" << "st" << "street" << "title" << "uid" << "telephoneNumber" << "postalCode" << "objectClass"; - // the list from ldapclient.cpp - //attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass"; - mClient->setAttrs( attrs ); - - // Taken from LdapSearch - //TQString mSearchText = TQString::fromUtf8( "Till" ); - //TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" ) - // .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); - - // For some reason a fromUtf8 broke the search for me (no results). - // But this certainly looks fishy, it might break on non-utf8 systems. - TQString filter = "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(|(cn=*Ägypten MDK*)(sn=*Ägypten MDK*))"; - - connect( mClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), - this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); - connect( mClient, TQT_SIGNAL( done() ), - this, TQT_SLOT( slotLDAPDone() ) ); - connect( mClient, TQT_SIGNAL( error( const TQString& ) ), - this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); - mClient->startQuery( filter ); - kapp->eventLoop()->enterLoop(); - delete mClient; mClient = 0; -} - -// from kaddressbook... ugly though... -static TQString asUtf8( const TQByteArray &val ) -{ - if ( val.isEmpty() ) - return TQString::null; - - const char *data = val.data(); - - //TQString::fromUtf8() bug workaround - if ( data[ val.size() - 1 ] == '\0' ) - return TQString::fromUtf8( data, val.size() - 1 ); - else - return TQString::fromUtf8( data, val.size() ); -} - -static TQString join( const KABC::LdapAttrValue& lst, const TQString& sep ) -{ - TQString res; - bool already = false; - for ( KABC::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - if ( already ) - res += sep; - already = TRUE; - res += asUtf8( *it ); - } - return res; -} - -void TestLDAPClient::slotLDAPResult( const KABC::LdapObject& obj ) -{ - TQString cn = join( obj.attrs[ "cn" ], ", " ); - kdDebug() << " cn:" << cn << endl; - assert( !obj.attrs[ "mail" ].isEmpty() ); - TQString mail = join( obj.attrs[ "mail" ], ", " ); - kdDebug() << " mail:" << mail << endl; - assert( mail.contains( '@' ) ); -} - -void TestLDAPClient::slotLDAPError( const TQString& err ) -{ - kdDebug() << k_funcinfo << err << endl; - ::exit( 1 ); -} - -void TestLDAPClient::slotLDAPDone() -{ - kdDebug() << k_funcinfo << endl; - kapp->eventLoop()->exitLoop(); -} - -#include "testldapclient.moc" diff --git a/kabc/tests/testldapclient.h b/kabc/tests/testldapclient.h deleted file mode 100644 index 1995914c3..000000000 --- a/kabc/tests/testldapclient.h +++ /dev/null @@ -1,51 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef TESTLDAPCLIENT_H -#define TESTLDAPCLIENT_H - -#include - -#include "../ldapclient.h" -typedef KABC::LdapClient LdapClient; - -class TestLDAPClient : public TQObject -{ - Q_OBJECT - -public: - TestLDAPClient() {} - void setup(); - void runAll(); - void cleanup(); - - // tests - void testIntevation(); - -private slots: - void slotLDAPResult( const KABC::LdapObject& ); - void slotLDAPError( const TQString& ); - void slotLDAPDone(); - -private: - bool check(const TQString& txt, TQString a, TQString b); - - LdapClient* mClient; -}; - -#endif diff --git a/kabc/tests/testlock.cpp b/kabc/tests/testlock.cpp deleted file mode 100644 index 632c690a6..000000000 --- a/kabc/tests/testlock.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "testlock.h" - -#include "stdaddressbook.h" - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -using namespace KABC; - -LockWidget::LockWidget( const TQString &identifier ) -{ - TQVBoxLayout *topLayout = new TQVBoxLayout( this ); - topLayout->setMargin( KDialog::marginHint() ); - topLayout->setSpacing( KDialog::spacingHint() ); - - if ( identifier.isEmpty() ) { - mLock = 0; - } else { - mLock = new Lock( identifier ); - - int pid = getpid(); - - TQLabel *pidLabel = new TQLabel( "Process ID: " + TQString::number( pid ), - this ); - topLayout->addWidget( pidLabel ); - - TQHBoxLayout *identifierLayout = new TQHBoxLayout( topLayout ); - - TQLabel *resourceLabel = new TQLabel( "Identifier:", this ); - identifierLayout->addWidget( resourceLabel ); - - TQLabel *resourceIdentifier = new TQLabel( identifier, this ); - identifierLayout->addWidget( resourceIdentifier ); - - mStatus = new TQLabel( "Status: Unlocked", this ); - topLayout->addWidget( mStatus ); - - TQPushButton *button = new TQPushButton( "Lock", this ); - topLayout->addWidget( button ); - connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( lock() ) ); - - button = new TQPushButton( "Unlock", this ); - topLayout->addWidget( button ); - connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( unlock() ) ); - } - - mLockView = new TQListView( this ); - topLayout->addWidget( mLockView ); - mLockView->addColumn( "Lock File" ); - mLockView->addColumn( "PID" ); - mLockView->addColumn( "Locking App" ); - - updateLockView(); - - TQPushButton *quitButton = new TQPushButton( "Quit", this ); - topLayout->addWidget( quitButton ); - connect( quitButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) ); - - KDirWatch *watch = KDirWatch::self(); - connect( watch, TQT_SIGNAL( dirty( const TQString & ) ), - TQT_SLOT( updateLockView() ) ); - connect( watch, TQT_SIGNAL( created( const TQString & ) ), - TQT_SLOT( updateLockView() ) ); - connect( watch, TQT_SIGNAL( deleted( const TQString & ) ), - TQT_SLOT( updateLockView() ) ); - watch->addDir( Lock::locksDir() ); - watch->startScan(); -} - -LockWidget::~LockWidget() -{ - delete mLock; -} - -void LockWidget::updateLockView() -{ - mLockView->clear(); - - TQDir dir( Lock::locksDir() ); - - TQStringList files = dir.entryList( "*.lock" ); - - TQStringList::ConstIterator it; - for( it = files.begin(); it != files.end(); ++it ) { - if ( *it == "." || *it == ".." ) continue; - - TQString app; - int pid; - if ( !Lock::readLockFile( dir.filePath( *it ), pid, app ) ) { - kdWarning() << "Unable to open lock file '" << *it << "'" << endl; - } else { - new TQListViewItem( mLockView, *it, TQString::number( pid ), app ); - } - } -} - -void LockWidget::lock() -{ - if ( !mLock->lock() ) { - KMessageBox::sorry( this, mLock->error() ); - } else { - mStatus->setText( "Status: Locked" ); - } -} - -void LockWidget::unlock() -{ - if ( !mLock->unlock() ) { - KMessageBox::sorry( this, mLock->error() ); - } else { - mStatus->setText( "Status: Unlocked" ); - } -} - - -static const TDECmdLineOptions options[] = -{ - { "a", 0, 0 }, - { "addressbook", "Standard address book", 0 }, - { "d", 0, 0 }, - { "diraddressbook", "Standard address book directory resource", 0 }, - { "+identifier", "Identifier of resource to be locked, e.g. filename", 0 }, - TDECmdLineLastOption -}; - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testlock",I18N_NOOP("Test libkabc Lock"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TQString identifier; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if ( args->count() == 1 ) { - identifier = args->arg( 0 ); - } else if ( args->count() != 0 ) { - std::cerr << "Usage: testlock " << std::endl; - return 1; - } - - if ( args->isSet( "addressbook" ) ) { - if ( args->count() == 1 ) { - std::cerr << "Ignoring resource identifier" << std::endl; - } - identifier = StdAddressBook::fileName(); - } - - if ( args->isSet( "diraddressbook" ) ) { - if ( args->count() == 1 ) { - std::cerr << "Ignoring resource identifier" << std::endl; - } - identifier = StdAddressBook::directoryName(); - } - - LockWidget mainWidget( identifier ); - - kapp->setMainWidget( &mainWidget ); - mainWidget.show(); - - return app.exec(); -} - -#include "testlock.moc" diff --git a/kabc/tests/testlock.h b/kabc/tests/testlock.h deleted file mode 100644 index a94d4e8c6..000000000 --- a/kabc/tests/testlock.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_TESTLOCK_H -#define KABC_TESTLOCK_H - -#include "lock.h" - -#include - -class TQLabel; -class TQListView; - -class KABC_EXPORT LockWidget : public TQWidget -{ - Q_OBJECT - public: - LockWidget( const TQString &identifier ); - ~LockWidget(); - - protected slots: - void lock(); - void unlock(); - - void updateLockView(); - - private: - KABC::Lock *mLock; - - TQLabel *mStatus; - TQListView *mLockView; -}; - -#endif diff --git a/kabc/timezone.cpp b/kabc/timezone.cpp deleted file mode 100644 index 59a184c6d..000000000 --- a/kabc/timezone.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "timezone.h" - -using namespace KABC; - -TimeZone::TimeZone() : - mOffset( 0 ), mValid( false ) -{ -} - -TimeZone::TimeZone( int offset ) : - mOffset( offset ), mValid( true ) -{ -} - -void TimeZone::setOffset( int offset ) -{ - mOffset = offset; - mValid = true; -} - -int TimeZone::offset() const -{ - return mOffset; -} - -bool TimeZone::isValid() const -{ - return mValid; -} - -bool TimeZone::operator==( const TimeZone &t ) const -{ - if ( !t.isValid() && !isValid() ) return true; - if ( !t.isValid() || !isValid() ) return false; - if ( t.mOffset == mOffset ) return true; - return false; -} - -bool TimeZone::operator!=( const TimeZone &t ) const -{ - if ( !t.isValid() && !isValid() ) return false; - if ( !t.isValid() || !isValid() ) return true; - if ( t.mOffset != mOffset ) return true; - return false; -} - -TQString TimeZone::asString() const -{ - return TQString::number( mOffset ); -} - -TQDataStream &KABC::operator<<( TQDataStream &s, const TimeZone &zone ) -{ - return s << zone.mOffset; -} - -TQDataStream &KABC::operator>>( TQDataStream &s, TimeZone &zone ) -{ - s >> zone.mOffset; - zone.mValid = true; - - return s; -} diff --git a/kabc/timezone.h b/kabc/timezone.h deleted file mode 100644 index 8705797fb..000000000 --- a/kabc/timezone.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_TIMEZONE_H -#define KABC_TIMEZONE_H - -#include - -#include - -namespace KABC { - -/** - * @short Time zone information. - * - * This class stores information about a time zone. - */ -class KABC_EXPORT TimeZone -{ - friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); - friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); - -public: - - /** - * Construct invalid time zone. - */ - TimeZone(); - - /** - * Construct time zone. - * - * @param offset Offset in minutes relative to UTC. - */ - TimeZone( int offset ); - - /** - * Set time zone offset relative to UTC. - * - * @param offset Offset in minutes. - */ - void setOffset( int offset ); - - /** - * Return offset in minutes relative to UTC. - */ - int offset() const; - - /** - * Return, if this time zone object is valid. - */ - bool isValid() const; - - bool operator==( const TimeZone & ) const; - bool operator!=( const TimeZone & ) const; - - /** - * Return string representation of time zone offset. - */ - TQString asString() const; - -private: - int mOffset; // Offset in minutes - - bool mValid; -}; - -KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); -KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); - -} -#endif diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp deleted file mode 100644 index 5ad56f4fb..000000000 --- a/kabc/vcard/AdrParam.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include - -using namespace VCARD; - -AdrParam::AdrParam() - : Param() -{ -} - -AdrParam::AdrParam(const AdrParam & x) - : Param(x), - adrTypeList_ (x.adrTypeList_) -{ -} - -AdrParam::AdrParam(const TQCString & s) - : Param(s) -{ -} - - AdrParam & -AdrParam::operator = (AdrParam & x) -{ - if (*this == x) return *this; - - adrTypeList_ = x.adrTypeList(); - textParam_ = x.textParam(); - - Param::operator = (x); - return *this; -} - - AdrParam & -AdrParam::operator = (const TQCString & s) -{ - Param::operator = (s); - - adrTypeList_.clear(); - textParam_.truncate(0); - - return *this; -} - - bool -AdrParam::operator == (AdrParam & x) -{ - parse(); - - if (!x.textParam().isEmpty()) - return (x.textParam_ == textParam_); - - if (x.adrTypeList().count() != adrTypeList_.count()) - return false; - - TQStrListIterator it(x.adrTypeList_); - - for (; it.current(); ++it) - if (!adrTypeList_.find(it.current())) - return false; - - return true; -} - -AdrParam::~AdrParam() -{ -} - - void -AdrParam::_parse() -{ - adrTypeList_.clear(); - - if (strRep_.left(4) != "TYPE") { - textParam_ = strRep_; - return; - } - - if (!strRep_.contains('=')) - return; - - RTokenise(strRep_, ",", adrTypeList_); -} - - void -AdrParam::_assemble() -{ - if (!textParam_.isEmpty()) { - strRep_ = textParam_; - return; - } - - TQStrListIterator it(adrTypeList_); - - for (; it.current(); ++it) { - - strRep_ += it.current(); - - if (it.current() != adrTypeList_.last()) - strRep_ += ','; - } -} diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp deleted file mode 100644 index 535ba6980..000000000 --- a/kabc/vcard/AdrValue.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include -#include - -using namespace VCARD; - -AdrValue::AdrValue() - : Value() -{ -} - -AdrValue::AdrValue(const AdrValue & x) - : Value(x), - poBox_ (x.poBox_), - extAddress_ (x.extAddress_), - street_ (x.street_), - locality_ (x.locality_), - region_ (x.region_), - postCode_ (x.postCode_), - countryName_ (x.countryName_) -{ -} - -AdrValue::AdrValue(const TQCString & s) - : Value(s) -{ -} - - AdrValue & -AdrValue::operator = (AdrValue & x) -{ - if (*this == x) return *this; - - poBox_ = x.poBox_; - extAddress_ = x.extAddress_; - street_ = x.street_; - locality_ = x.locality_; - region_ = x.region_; - postCode_ = x.postCode_; - countryName_ = x.countryName_; - - Value::operator = (x); - return *this; -} - - AdrValue & -AdrValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -AdrValue::operator == (AdrValue & x) -{ - parse(); - x.parse(); - - return ( - poBox_ == x.poBox_ && - extAddress_ == x.extAddress_ && - street_ == x.street_ && - locality_ == x.locality_ && - region_ == x.region_ && - postCode_ == x.postCode_ && - countryName_ == x.countryName_); -} - -AdrValue::~AdrValue() -{ -} - - AdrValue * -AdrValue::clone() -{ - return new AdrValue( *this ); -} - - void -AdrValue::_parse() -{ - vDebug("AdrValue::_parse()"); - - TQStrList l; - RTokenise(strRep_, ";", l); - - for (unsigned int i = 0; i < l.count(); i++) { - - switch (i) { - - case 0: poBox_ = l.at(0); break; - case 1: extAddress_ = l.at(1); break; - case 2: street_ = l.at(2); break; - case 3: locality_ = l.at(3); break; - case 4: region_ = l.at(4); break; - case 5: postCode_ = l.at(5); break; - case 6: countryName_ = l.at(6); break; - default: break; - } - } -} - - void -AdrValue::_assemble() -{ - vDebug("AdrValue::_assemble"); - - strRep_ = poBox_; - strRep_ += ";" + extAddress_; - strRep_ += ";" + street_; - strRep_ += ";" + locality_; - strRep_ += ";" + region_; - strRep_ += ";" + postCode_; - strRep_ += ";" + countryName_; -} - diff --git a/kabc/vcard/AgentParam.cpp b/kabc/vcard/AgentParam.cpp deleted file mode 100644 index 9e4531b02..000000000 --- a/kabc/vcard/AgentParam.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -AgentParam::AgentParam() - : Param() -{ -} - -AgentParam::AgentParam(const AgentParam & x) - : Param(x), - refer_ (x.refer_), - uri_ (x.uri_) -{ -} - -AgentParam::AgentParam(const TQCString & s) - : Param(s) -{ -} - - AgentParam & -AgentParam::operator = (AgentParam & x) -{ - if (*this == x) return *this; - - refer_ = x.refer_; - uri_ = x.uri_; - - Param::operator = (x); - return *this; -} - - AgentParam & -AgentParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -AgentParam::operator == (AgentParam & x) -{ - parse(); - - if (refer_) - return (x.refer() && uri_ == x.uri_); - - return !x.refer(); -} - -AgentParam::~AgentParam() -{ -} - - void -AgentParam::_parse() -{ - if (strRep_.isEmpty()) { - refer_ = false; - return; - } - - refer_ = true; - uri_ = strRep_; -} - - void -AgentParam::_assemble() -{ - if (!refer_) { - strRep_.truncate(0); - return; - } - - strRep_ = uri_.asString(); - return; -} diff --git a/kabc/vcard/AgentValue.cpp b/kabc/vcard/AgentValue.cpp deleted file mode 100644 index 7d356f8d7..000000000 --- a/kabc/vcard/AgentValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -AgentValue::AgentValue() - : Value() -{ -} - -AgentValue::AgentValue(const AgentValue & x) - : Value(x) -{ -} - -AgentValue::AgentValue(const TQCString & s) - : Value(s) -{ -} - - AgentValue & -AgentValue::operator = (AgentValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - AgentValue & -AgentValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -AgentValue::operator == (AgentValue & x) -{ - x.parse(); - return false; -} - -AgentValue::~AgentValue() -{ -} - - void -AgentValue::_parse() -{ -} - - void -AgentValue::_assemble() -{ -} - diff --git a/kabc/vcard/CMakeLists.txt b/kabc/vcard/CMakeLists.txt deleted file mode 100644 index 8ad988434..000000000 --- a/kabc/vcard/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${CMAKE_CURRENT_SOURCE_DIR}/include/generated - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### vcard ##################################### - -set( target vcard ) - -set( ${target}_SRCS - vCard-all.cpp -) - -tde_add_library( ${target} SHARED - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK tdecore-shared - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/kabc/vcard/ClassValue.cpp b/kabc/vcard/ClassValue.cpp deleted file mode 100644 index 21417f87b..000000000 --- a/kabc/vcard/ClassValue.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -ClassValue::ClassValue() - : Value() -{ -} - -ClassValue::ClassValue(const ClassValue & x) - : Value(x), - classType_(x.classType_) -{ -} - -ClassValue::ClassValue(const TQCString & s) - : Value(s) -{ -} - - ClassValue & -ClassValue::operator = (ClassValue & x) -{ - if (*this == x) return *this; - x.parse(); - - classType_ = x.classType_; - - Value::operator = (x); - return *this; -} - - ClassValue & -ClassValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -ClassValue::operator == (ClassValue & x) -{ - x.parse(); - return ( classType_ == x.classType_ ); -} - -ClassValue::~ClassValue() -{ -} - - ClassValue * -ClassValue::clone() -{ - return new ClassValue( *this ); -} - - void -ClassValue::_parse() -{ - if (tqstricmp(strRep_, "PUBLIC") == 0) - classType_ = Public; - - else if (tqstricmp(strRep_, "PRIVATE") == 0) - classType_ = Private; - - else if (tqstricmp(strRep_, "CONFIDENTIAL") == 0) - classType_ = Confidential; - - else classType_ = Other; -} - - void -ClassValue::_assemble() -{ - switch (classType_) { - - case Public: - strRep_ = "PUBLIC"; - break; - - case Private: - strRep_ = "PRIVATE"; - break; - - case Confidential: - strRep_ = "CONFIDENTIAL"; - break; - - default: - break; - } -} - diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp deleted file mode 100644 index 52bcdf4f5..000000000 --- a/kabc/vcard/ContentLine.cpp +++ /dev/null @@ -1,302 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -using namespace VCARD; - -ContentLine::ContentLine() - : Entity(), - value_(0), - paramType_( ParamUnknown ), - valueType_( ValueUnknown ), - entityType_( EntityUnknown ) -{ -} - -ContentLine::ContentLine(const ContentLine & x) - : Entity(x), - group_ (x.group_), - name_ (x.name_), - paramList_(x.paramList_), - value_(x.value_->clone()), - paramType_( x.paramType_ ), - valueType_( x.valueType_ ), - entityType_( x.entityType_ ) -{ -} - -ContentLine::ContentLine(const TQCString & s) - : Entity(s), - value_(0), - paramType_( ParamUnknown ), - valueType_( ValueUnknown ), - entityType_( EntityUnknown ) -{ -} - - ContentLine & -ContentLine::operator = (ContentLine & x) -{ - if (*this == x) return *this; - - paramList_ = x.paramList(); - value_ = x.value_->clone(); - - Entity::operator = (x); - return *this; -} - - ContentLine & -ContentLine::operator = (const TQCString & s) -{ - Entity::operator = (s); - delete value_; - value_ = 0; - return *this; -} - - bool -ContentLine::operator == (ContentLine & x) -{ - x.parse(); - - TQPtrListIterator it(x.paramList()); - - if (!paramList_.find(it.current())) - return false; - - return true; -} - -ContentLine::~ContentLine() -{ - delete value_; - value_ = 0; -} - - void -ContentLine::_parse() -{ - vDebug("parse"); - - // Unqote newlines - strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" ); - - int split = strRep_.find(':'); - - if (split == -1) { // invalid content line - vDebug("No ':'"); - return; - } - - TQCString firstPart(strRep_.left(split)); - TQCString valuePart(strRep_.mid(split + 1)); - - split = firstPart.find('.'); - - if (split != -1) { - group_ = firstPart.left(split); - firstPart = firstPart.mid(split + 1); - } - - vDebug("Group == " + group_); - vDebug("firstPart == " + firstPart); - vDebug("valuePart == " + valuePart); - - // Now we have the group, the name and param list together and the value. - - TQStrList l; - - RTokenise(firstPart, ";", l); - - if (l.count() == 0) {// invalid - no name ! - vDebug("No name for this content line !"); - return; - } - - name_ = l.at(0); - - // Now we have the name, so the rest of 'l' is the params. - // Remove the name part. - l.remove(0u); - - entityType_ = EntityNameToEntityType(name_); - paramType_ = EntityTypeToParamType(entityType_); - - unsigned int i = 0; - - // For each parameter, create a new parameter of the correct type. - - TQStrListIterator it(l); - - for (; it.current(); ++it, i++) { - - TQCString str = *it; - - split = str.find("="); - if (split < 0 ) { - vDebug("No '=' in parameter."); - continue; - } - - TQCString paraName = str.left(split); - TQCString paraValue = str.mid(split + 1); - - TQStrList paraValues; - RTokenise(paraValue, ",", paraValues); - - TQStrListIterator it2( paraValues ); - - for(; it2.current(); ++it2) { - - Param *p = new Param; - p->setName( paraName ); - p->setValue( *it2 ); - - paramList_.append(p); - } - } - - // Create a new value of the correct type. - - valueType_ = EntityTypeToValueType(entityType_); - -// kdDebug(5710) << "valueType: " << valueType_ << endl; - - switch (valueType_) { - - case ValueSound: value_ = new SoundValue; break; - case ValueAgent: value_ = new AgentValue; break; - case ValueAddress: value_ = new AdrValue; break; - case ValueTel: value_ = new TelValue; break; - case ValueTextBin: value_ = new TextBinValue; break; - case ValueOrg: value_ = new OrgValue; break; - case ValueN: value_ = new NValue; break; - case ValueUTC: value_ = new UTCValue; break; - case ValueURI: value_ = new URIValue; break; - case ValueClass: value_ = new ClassValue; break; - case ValueFloat: value_ = new FloatValue; break; - case ValueImage: value_ = new ImageValue; break; - case ValueDate: value_ = new DateValue; break; - case ValueTextList: value_ = new TextListValue; break; - case ValueGeo: value_ = new GeoValue; break; - case ValueText: - case ValueUnknown: - default: value_ = new TextValue; break; - } - - *value_ = valuePart; -} - - void -ContentLine::_assemble() -{ - vDebug("Assemble (argl) - my name is \"" + name_ + "\""); - strRep_.truncate(0); - - TQCString line; - - if (!group_.isEmpty()) - line += group_ + '.'; - - line += name_; - - vDebug("Adding parameters"); - ParamListIterator it(paramList_); - - for (; it.current(); ++it) - line += ";" + it.current()->asString(); - - vDebug("Adding value"); - if (value_ != 0) - line += ":" + value_->asString(); - else { - vDebug("No value"); - } - - // Quote newlines - line = line.replace( TQRegExp( "\n" ), "\\n" ); - - // Fold lines longer than 72 chars - const int maxLen = 72; - uint cursor = 0; - while( line.length() > ( cursor + 1 ) * maxLen ) { - strRep_ += line.mid( cursor * maxLen, maxLen ); - strRep_ += "\r\n "; - ++cursor; - } - strRep_ += line.mid( cursor * maxLen ); -} - - void -ContentLine::clear() -{ - group_.truncate(0); - name_.truncate(0); - paramList_.clear(); - delete value_; - value_ = 0; - paramType_ = ParamUnknown; - valueType_ = ValueUnknown; - entityType_ = EntityUnknown; -} diff --git a/kabc/vcard/DateParam.cpp b/kabc/vcard/DateParam.cpp deleted file mode 100644 index ffaf4b3f6..000000000 --- a/kabc/vcard/DateParam.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -DateParam::DateParam() - : Param() -{ -} - -DateParam::DateParam(const DateParam & x) - : Param(x) -{ -} - -DateParam::DateParam(const TQCString & s) - : Param(s) -{ -} - - DateParam & -DateParam::operator = (DateParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - DateParam & -DateParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -DateParam::operator == (DateParam & x) -{ - x.parse(); - - return false; -} - -DateParam::~DateParam() -{ -} - - void -DateParam::_parse() -{ -} - - void -DateParam::_assemble() -{ -} - diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp deleted file mode 100644 index 9f578a158..000000000 --- a/kabc/vcard/DateValue.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include -#include -#include - -using namespace VCARD; - -DateValue::DateValue() - : Value() -{ - vDebug("DateValue::DateValue()"); -} - -DateValue::DateValue( - unsigned int year, - unsigned int month, - unsigned int day, - unsigned int hour, - unsigned int minute, - unsigned int second, - double secFrac, - bool zonePositive, - unsigned int zoneHour, - unsigned int zoneMinute) - : Value (), - year_ (year), - month_ (month), - day_ (day), - hour_ (hour), - minute_ (minute), - second_ (second), - zoneHour_ (zoneHour), - zoneMinute_ (zoneMinute), - secFrac_ (secFrac), - zonePositive_ (zonePositive), - hasTime_(true) -{ - parsed_ = true; - assembled_ = false; -} - -DateValue::DateValue(const TQDate & d) - : Value (), - year_ (d.year()), - month_ (d.month()), - day_ (d.day()), - hasTime_(false) -{ - parsed_ = true; - assembled_ = false; -} - -DateValue::DateValue(const TQDateTime & d) - : Value (), - year_ (d.date().year()), - month_ (d.date().month()), - day_ (d.date().day()), - hour_ (d.time().hour()), - minute_ (d.time().minute()), - second_ (d.time().second()), - hasTime_(true) -{ - parsed_ = true; - assembled_ = false; -} - -DateValue::DateValue(const DateValue & x) - : Value(x) -{ - year_ = x.year_; - month_ = x.month_; - day_ = x.day_; - hour_ = x.hour_; - minute_ = x.minute_; - second_ = x.second_; - zoneHour_ = x.zoneHour_; - zoneMinute_ = x.zoneMinute_; - secFrac_ = x.secFrac_; - hasTime_ = x.hasTime_; -} - -DateValue::DateValue(const TQCString & s) - : Value(s) -{ -} - - DateValue & -DateValue::operator = (DateValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - DateValue & -DateValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -DateValue::operator == (DateValue & x) -{ - x.parse(); - return false; -} - -DateValue::~DateValue() -{ -} - - DateValue * -DateValue::clone() -{ - return new DateValue( *this ); -} - - void -DateValue::_parse() -{ - vDebug("DateValue::_parse()"); - - // date = date-full-year ["-"] date-month ["-"] date-mday - // time = time-hour [":"] time-minute [":"] time-second [":"] - // [time-secfrac] [time-zone] - - int timeSep = strRep_.find('T'); - - TQCString dateStr; - TQCString timeStr; - - if (timeSep == -1) { - - dateStr = strRep_; - vDebug("Has date string \"" + dateStr + "\""); - - } else { - - dateStr = strRep_.left(timeSep); - vDebug("Has date string \"" + dateStr + "\""); - - timeStr = strRep_.mid(timeSep + 1); - vDebug("Has time string \"" + timeStr + "\""); - } - - /////////////////////////////////////////////////////////////// DATE - - dateStr.replace(TQRegExp("-"), ""); - - kdDebug(5710) << "dateStr: " << dateStr << endl; - - year_ = dateStr.left(4).toInt(); - month_ = dateStr.mid(4, 2).toInt(); - day_ = dateStr.right(2).toInt(); - - if (timeSep == -1) { - hasTime_ = false; - return; // No time, done. - } - else - hasTime_ = true; - - /////////////////////////////////////////////////////////////// TIME - - /////////////////////////////////////////////////////////////// ZONE - - int zoneSep = timeStr.find('Z'); - - if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { - - TQCString zoneStr(timeStr.mid(zoneSep + 1)); - vDebug("zoneStr == " + zoneStr); - - zonePositive_ = (zoneStr[0] == '+'); - zoneHour_ = zoneStr.mid(1, 2).toInt(); - zoneMinute_ = zoneStr.right(2).toInt(); - - timeStr.remove(zoneSep, timeStr.length() - zoneSep); - } - - //////////////////////////////////////////////////// SECOND FRACTION - - int secFracSep = timeStr.findRev(','); - - if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. - TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); - secFrac_ = quirkafleeg.toDouble(); - } - - /////////////////////////////////////////////////////////////// HMS - - timeStr.replace(TQRegExp(":"), ""); - - hour_ = timeStr.left(2).toInt(); - minute_ = timeStr.mid(2, 2).toInt(); - second_ = timeStr.mid(4, 2).toInt(); -} - - void -DateValue::_assemble() -{ - vDebug("DateValue::_assemble"); - - TQCString year; - TQCString month; - TQCString day; - - year.setNum( year_ ); - month.setNum( month_ ); - day.setNum( day_ ); - - if ( month.length() < 2 ) month.prepend( "0" ); - if ( day.length() < 2 ) day.prepend( "0" ); - - strRep_ = year + '-' + month + '-' + day; - - if ( hasTime_ ) { - TQCString hour; - TQCString minute; - TQCString second; - - hour.setNum( hour_ ); - minute.setNum( minute_ ); - second.setNum( second_ ); - - if ( hour.length() < 2 ) hour.prepend( "0" ); - if ( minute.length() < 2 ) minute.prepend( "0" ); - if ( second.length() < 2 ) second.prepend( "0" ); - - strRep_ += 'T' + hour + ':' + minute + ':' + second + 'Z'; - } -} - - unsigned int -DateValue::year() -{ - parse(); - return year_; -} - - unsigned int -DateValue::month() -{ - parse(); - return month_; -} - - unsigned int -DateValue::day() -{ - parse(); - return day_; -} - unsigned int -DateValue::hour() -{ - parse(); - return hour_; -} - - unsigned int -DateValue::minute() -{ - parse(); - return minute_; -} - - unsigned int -DateValue::second() -{ - parse(); - return second_; -} - - double -DateValue::secondFraction() -{ - parse(); - return secFrac_; -} - - bool -DateValue::zonePositive() -{ - parse(); - return zonePositive_; -} - - unsigned int -DateValue::zoneHour() -{ - parse(); - return zoneHour_; -} - - unsigned int -DateValue::zoneMinute() -{ - parse(); - return zoneMinute_; -} - - void -DateValue::setYear(unsigned int i) -{ - year_ = i; - assembled_ = false; -} - - void -DateValue::setMonth(unsigned int i) -{ - month_ = i; - assembled_ = false; -} - - void -DateValue::setDay(unsigned int i) -{ - day_ = i; - assembled_ = false; -} - - void -DateValue::setHour(unsigned int i) -{ - hour_ = i; - assembled_ = false; -} - - void -DateValue::setMinute(unsigned int i) -{ - minute_ = i; - assembled_ = false; -} - - void -DateValue::setSecond(unsigned int i) -{ - second_ = i; - assembled_ = false; -} - - void -DateValue::setSecondFraction(double d) -{ - secFrac_ = d; - assembled_ = false; -} - - void -DateValue::setZonePositive(bool b) -{ - zonePositive_ = b; - assembled_ = false; -} - - void -DateValue::setZoneHour(unsigned int i) -{ - zoneHour_ = i; - assembled_ = false; -} - - void -DateValue::setZoneMinute(unsigned int i) -{ - zoneMinute_ = i; - assembled_ = false; -} - - TQDate -DateValue::qdate() -{ - parse(); - TQDate d(year_, month_, day_); - return d; -} - - TQTime -DateValue::qtime() -{ - parse(); - TQTime t(hour_, minute_, second_); -// t.setMs(1 / secFrac_); - return t; -} - - TQDateTime -DateValue::qdt() -{ - parse(); - TQDateTime dt; - dt.setDate(qdate()); - dt.setTime(qtime()); - return dt; -} - - bool -DateValue::hasTime() -{ - parse(); - return hasTime_; -} - diff --git a/kabc/vcard/EmailParam.cpp b/kabc/vcard/EmailParam.cpp deleted file mode 100644 index 7daf19ccc..000000000 --- a/kabc/vcard/EmailParam.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include - -using namespace VCARD; - -EmailParam::EmailParam() - : Param() -{ - vDebug("ctor"); -} - -EmailParam::EmailParam(const EmailParam & x) - : Param(x), - emailType_ (x.emailType_), - pref_ (x.pref_) -{ -} - -EmailParam::EmailParam(const TQCString & s) - : Param(s) -{ -} - - EmailParam & -EmailParam::operator = (EmailParam & x) -{ - if (*this == x) return *this; - - emailType_ = x.emailType(); - pref_ = x.pref_; - - Param::operator = (x); - return *this; -} - - EmailParam & -EmailParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -EmailParam::operator == (EmailParam & x) -{ - parse(); - - if (pref_) - return (x.pref_ && x.emailType() == emailType_); - - return !x.pref(); -} - -EmailParam::~EmailParam() -{ -} - - void -EmailParam::_parse() -{ -#if 0 - Param::parseToList(); - - SubParamListIterator it(subParamList_); - - pref_ = true; - emailType_ = ""; - - for (; it.current(); ++it) { - - if (tqstricmp(it.current()->name(), "TYPE") == 0) { - emailType_ = it.current()->value(); - continue; - } - - if (tqstricmp(it.current()->name(), "PREF") == 0) { - pref_ = true; - } - } -#endif -} - - void -EmailParam::_assemble() -{ - strRep_ = "TYPE="; - strRep_ += emailType_; - - if (pref_) - strRep_ += ",PREF"; -} - diff --git a/kabc/vcard/Entity.cpp b/kabc/vcard/Entity.cpp deleted file mode 100644 index 5eaf6a1d0..000000000 --- a/kabc/vcard/Entity.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -using namespace VCARD; - -Entity::Entity() - : parsed_ (false), - assembled_ (true) -{ - // empty -} - -Entity::Entity(const Entity & e) - : strRep_ (e.strRep_), - parsed_ (e.parsed_), - assembled_ (e.assembled_) -{ - // empty -} - -Entity::Entity(const TQCString & s) - : strRep_ (s), - parsed_ (false), - assembled_ (true) -{ - // empty -} - - Entity & -Entity::operator = (const Entity & e) -{ - if (this == &e) return *this; - - strRep_ = e.strRep_; - parsed_ = e.parsed_; - assembled_ = e.assembled_; - - return *this; -} - - Entity & -Entity::operator = (const TQCString & s) -{ - strRep_ = s; - parsed_ = false; - assembled_ = true; - - return *this; -} - - bool -Entity::operator == (Entity & e) -{ - return asString() == e.asString(); -} - - bool -Entity::operator != (Entity & e) -{ - return !(*this == e); -} - - bool -Entity::operator == (const TQCString & s) -{ - return asString() == s; -} - - bool -Entity::operator != (const TQCString & s) -{ - return !(*this == s); -} - -Entity::~Entity() -{ - // empty -} - - TQCString -Entity::asString() -{ -// vDebug("Entity::asString()"); - assemble(); - - return strRep_; -} - - void -Entity::parse() -{ -// vDebug( "Entity::parse()" ); - - if (!parsed_) _parse(); - - parsed_ = true; - assembled_ = false; -} - - void -Entity::assemble() -{ -// vDebug( "Entity::assemble()" ); - - if (assembled_) return; - - parse(); - _assemble(); - - assembled_ = true; -} - diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp deleted file mode 100644 index bcb48f98a..000000000 --- a/kabc/vcard/Enum.cpp +++ /dev/null @@ -1,490 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -#include - -using namespace VCARD; - -// There are 31 possible types, not including extensions. -// URI is a custom field designed to store the upstream URI for each contact -// in order to handle certain limited CardDAV systems such as Zimbra - const TQCString -VCARD::paramNames [] = -{ - "NAME", - "PROFILE", - "SOURCE", - "FN", - "N", - "NICKNAME", - "PHOTO", - "BDAY", - "ADR", - "LABEL", - "TEL", - "EMAIL", - "MAILER", - "TZ", - "GEO", - "TITLE", - "ROLE", - "LOGO", - "AGENT", - "ORG", - "CATEGORIES", - "NOTE", - "PRODID", - "REV", - "SORT-STRING", - "SOUND", - "UID", - "URL", - "VERSION", - "CLASS", - "KEY", - "URI" -}; - - const ParamType -VCARD::paramTypesTable[] = { - ParamNone, // NAME - ParamNone, // PROFILE - ParamSource, // SOURCE - ParamText, // FN - ParamText, // N - ParamText, // NICKNAME - ParamImage, // PHOTO (inline/refer) - ParamDate, // BDAY ("VALUE = "date-time/date) - ParamAddrText, // ADR (adr-param/text-param) - ParamAddrText, // LABEL (adr-param/text-param) - ParamTel, // TEL - ParamEmail, // EMAIL - ParamText, // MAILER - ParamNone, // TZ - ParamNone, // GEO - ParamText, // TITLE - ParamText, // ROLE - ParamImage, // LOGO - ParamAgent, // AGENT - ParamText, // ORG - ParamText, // CATEGORIES - ParamText, // NOTE - ParamNone, // PRODID - ParamDate, // REV - ParamText, // SORT-STRING - ParamSound, // SOUND - ParamNone, // UID - ParamNone, // URL - ParamNone, // VERSION - ParamNone, // CLASS - ParamTextBin, // KEY - ParamTextNS, // X - ParamNone // URI -}; - - ParamType -VCARD::EntityTypeToParamType(EntityType e) -{ - ParamType t(ParamUnknown); - - switch (e) { - - //---------------------------------------------------------------// - case EntityAgent: t = ParamAgent; break; - //---------------------------------------------------------------// - case EntitySound: t = ParamSound; break; - //---------------------------------------------------------------// - case EntitySource: t = ParamSource; break; - //---------------------------------------------------------------// - case EntityTelephone: t = ParamTel; break; - //---------------------------------------------------------------// - case EntityEmail: t = ParamEmail; break; - //---------------------------------------------------------------// - case EntityKey: t = ParamTextBin; break; - //---------------------------------------------------------------// - case EntityExtension: t = ParamTextNS; break; - //---------------------------------------------------------------// - case EntityAddress: - case EntityLabel: t = ParamAddrText; break; - //---------------------------------------------------------------// - case EntityBirthday: - case EntityRevision: t = ParamDate; break; - //---------------------------------------------------------------// - case EntityPhoto: - case EntityLogo: t = ParamImage; break; - //---------------------------------------------------------------// - case EntityOrganisation: - case EntityTitle: - case EntityRole: - case EntityFullName: - case EntityMailer: - case EntityN: - case EntitySortString: - case EntityNickname: - case EntityCategories: - case EntityNote: t = ParamText; break; - //---------------------------------------------------------------// - case EntityProductID: - case EntityTimeZone: - case EntityUID: - case EntityURL: - case EntityClass: - case EntityGeo: - case EntityName: - case EntityVersion: - case EntityProfile: - case EntityURI: - default: t = ParamNone; break; - //---------------------------------------------------------------// - - } - - return t; -} - - ValueType -VCARD::EntityTypeToValueType(EntityType e) -{ - ValueType t(ValueUnknown); - - switch (e) { - - //---------------------------------------------------------------// - case EntitySound: t = ValueSound; break; - //---------------------------------------------------------------// - case EntityAgent: t = ValueAgent; break; - //---------------------------------------------------------------// - case EntityAddress: t = ValueAddress; break; - //---------------------------------------------------------------// - case EntityTelephone: t = ValueTel; break; - //---------------------------------------------------------------// - case EntityKey: t = ValueTextBin; break; - //---------------------------------------------------------------// - case EntityOrganisation: t = ValueOrg; break; - //---------------------------------------------------------------// - case EntityN: t = ValueN; break; - //---------------------------------------------------------------// - case EntityTimeZone: t = ValueUTC; break; - //---------------------------------------------------------------// - case EntityClass: t = ValueClass; break; - //---------------------------------------------------------------// - case EntityGeo: t = ValueGeo; break; - //---------------------------------------------------------------// - case EntitySource: - case EntityURL: t = ValueURI; break; - //---------------------------------------------------------------// - case EntityPhoto: - case EntityLogo: t = ValueImage; break; - //---------------------------------------------------------------// - case EntityBirthday: - case EntityRevision: t = ValueDate; break; - //---------------------------------------------------------------// - case EntityCategories: - case EntityNickname: t = ValueTextList; break; - //---------------------------------------------------------------// - case EntityLabel: - case EntityExtension: - case EntityEmail: - case EntityTitle: - case EntityRole: - case EntityFullName: - case EntityMailer: - case EntityProductID: - case EntityName: - case EntitySortString: - case EntityVersion: - case EntityProfile: - case EntityUID: - case EntityNote: - case EntityURI: - default: t = ValueText; break; - //---------------------------------------------------------------// - - } - - return t; -} - - TQCString -VCARD::EntityTypeToParamName(EntityType e) -{ - if ( e > EntityUnknown ) e = EntityUnknown; - return paramNames[ int( e ) ]; -} - - EntityType -VCARD::EntityNameToEntityType(const TQCString & s) -{ - if (s.isEmpty()) return EntityUnknown; - - EntityType t(EntityUnknown); - - switch (s[0]) { - - case 'A': - if (s == "ADR") - t = EntityAddress; - else if (s == "AGENT") - t = EntityAgent; - break; - - case 'B': - if (s == "BDAY") - t = EntityBirthday; - break; - - case 'C': - if (s == "CATEGORIES") - t = EntityCategories; - else if (s == "CLASS") - t = EntityClass; - break; - - case 'E': - if (s == "EMAIL") - t = EntityEmail; - break; - - case 'F': - if (s == "FN") - t = EntityFullName; - break; - - case 'G': - if (s == "GEO") - t = EntityGeo; - break; - - case 'K': - if (s == "KEY") - t = EntityKey; - break; - - case 'L': - if (s == "LABEL") - t = EntityLabel; - else if (s == "LOGO") - t = EntityLogo; - break; - - case 'M': - if (s == "MAILER") - t = EntityMailer; - break; - - case 'N': - if (s == "N") - t = EntityN; - else if (s == "NAME") - t = EntityName; - else if (s == "NICKNAME") - t = EntityNickname; - else if (s == "NOTE") - t = EntityNote; - break; - - case 'O': - if (s == "ORG") - t = EntityOrganisation; - break; - - case 'P': - if (s == "PHOTO") - t = EntityPhoto; - else if (s == "PRODID") - t = EntityProductID; - else if (s == "PROFILE") - t = EntityProfile; - break; - - case 'R': - if (s == "REV") - t = EntityRevision; - else if (s == "ROLE") - t = EntityRole; - break; - - case 'S': - if (s == "SORT-STRING") - t = EntitySortString; - else if (s == "SOUND") - t = EntitySound; - else if (s == "SOURCE") - t = EntitySource; - break; - - case 'T': - if (s == "TEL") - t = EntityTelephone; - else if (s == "TITLE") - t = EntityTitle; - else if (s == "TZ") - t = EntityTimeZone; - break; - - case 'U': - if (s == "UID") - t = EntityUID; - else if (s == "URL") - t = EntityURL; - else if (s == "URI") - t = EntityURI; - case 'V': - if (s == "VERSION") - t = EntityVersion; - break; - - case 'X': - if (s.left(2) == "X-") - t = EntityExtension; - break; - - default: - - t = EntityUnknown; - } - - return t; -} - -// The copyright notice below refers to the base64 codec functions used below, -// which are modified from the original sources. - -/* - * Original version Copyright 1988 by The Leland Stanford Junior University - * Copyright 1998 by the University of Washington - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notices appear in all copies and that both the - * above copyright notices and this permission notice appear in supporting - * documentation, and that the name of the University of Washington or The - * Leland Stanford Junior University not be used in advertising or publicity - * pertaining to distribution of the software without specific, written prior - * permission. This software is made available "as is", and - * THE UNIVERSITY OF WASHINGTON AND THE LELAND STANFORD JUNIOR UNIVERSITY - * DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE, - * INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF - * WASHINGTON OR THE LELAND STANFORD JUNIOR UNIVERSITY BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -static char B64[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -// the mime base64 disctionary used for decoding -static signed char b64dec[] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30 - -1, -1, -1,-19, -1, -1, -1,-16, -4, -4, // 40 -19 == '+' -16 == '/' - -4, -4, -4, -4, -4, -4, -4, -4, -1, -1, // 50 -4 == '0' - -1, 0, -1, -1, -1, 65, 65, 65, 65, 65, // 60 0 == '=' 65 == 'A' - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 70 - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 80 - 65, -1, -1, -1, -1, -1, -1, 71, 71, 71, // 90 71 == 'a' - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 100 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 110 - 71, 71, 71, -1, -1, -1, -1, -1, -1, -1, // 120 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 130 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 140 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 150 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 160 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 170 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 180 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 190 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 200 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 210 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 220 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 230 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 240 - -1, -1, -1, -1, -1, -1, -1 // 250 -}; - - char * -VCARD::decodeBase64(const char * s, unsigned long srcl, unsigned long & len) -{ - register unsigned char c; - register unsigned long e(0); - len = 0; - unsigned const char * src = (unsigned const char *)s; - char * ret = new char[srcl + (srcl / 4 + 1)]; - register char *d = ret; - while (srcl--) { // Critical loop - c = *src++; - int dec = b64dec[c]; - if (dec == -1) continue; - if (c == '=') { - switch (e++) { - case 3: e = 0; break; - case 2: if (*src == '=') break; - default: delete [] ret; ret = 0; return 0; break; - } - continue; - } - c -= dec; - if (e == 0) { *d = c << 2; ++e; continue; } - switch (e) { - case 1: *d |= c >> 4; *++d = c << 4; break; - case 2: *d |= c >> 2; *++d = c << 6; break; - case 3: *d++ |= c; e = 0; continue; break; - } - ++e; - } - len = d - (char *)ret; - return ret; -} - - - char * -VCARD::encodeBase64(const char * src, unsigned long srcl, unsigned long & destl) -{ - register const unsigned char *s = (unsigned char *)src; - register unsigned long i = ((srcl + 2) / 3) * 4; - destl = i += 2 * ((i / 60) + 1); - i = 0; - char * ret = new char[destl]; - register unsigned char *d((unsigned char *)ret); - while (srcl != 0) { // Critical loop - *d++ = B64[s[0] >> 2]; - *d++ = B64[((s[0] << 4) + (--srcl == 0 ? 0 : s[1] >> 4)) & 0x3f]; - *d++ = srcl == 0 ? '=' : - B64[((s[1] << 2) + (--srcl == 0 ? 0 : s[2] >> 6)) & 0x3f]; - *d++ = srcl == 0 ? '=' : B64[s[2] & 0x3f]; - if (srcl != 0) srcl--; - if (++i == 15) { i = 0; *d++ = '\r'; *d++ = '\n'; } - s += 3; - } - *d = '\r'; *++d = '\n'; *++d = '\0'; - return ret; -} - diff --git a/kabc/vcard/FloatValue.cpp b/kabc/vcard/FloatValue.cpp deleted file mode 100644 index ac1f2c6b5..000000000 --- a/kabc/vcard/FloatValue.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -FloatValue::FloatValue() - : Value() -{ -} - -FloatValue::FloatValue(float f) - : Value (), - value_ (f) -{ - parsed_ = true; -} - -FloatValue::FloatValue(const FloatValue & x) - : Value(x) -{ - value_ = x.value_; -} - -FloatValue::FloatValue(const TQCString & s) - : Value(s) -{ -} - - FloatValue & -FloatValue::operator = (FloatValue & x) -{ - if (*this == x) return *this; - - x.parse(); - value_ = x.value_; - - Value::operator = (x); - return *this; -} - - FloatValue & -FloatValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -FloatValue::operator == (FloatValue & x) -{ - x.parse(); - return (value_ == x.value_); -} - -FloatValue::~FloatValue() -{ -} - - void -FloatValue::_parse() -{ - bool negative(false); - - if (strRep_[0] == '-' || strRep_[1] == '+') { - - if (strRep_[0] == '-') - negative = true; - - strRep_.remove(0, 1); - } - - value_ = strRep_.toFloat(); - if (negative) - value_ = -value_; -} - - void -FloatValue::_assemble() -{ - strRep_ = TQCString().setNum(value_); -} - - float -FloatValue::value() -{ - parse(); - return value_; -} - - void -FloatValue::setValue(float f) -{ - parsed_ = true; - value_ = f; -} - diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp deleted file mode 100644 index 2bac28c1e..000000000 --- a/kabc/vcard/GeoValue.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - This file is part of libvcard. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -GeoValue::GeoValue() - : Value() -{ -} - -GeoValue::GeoValue(const GeoValue & x) - : Value(x), latitude_(x.latitude_), longitude_(x.longitude_) -{ -} - -GeoValue::GeoValue(const TQCString & s) - : Value(s) -{ -} - - GeoValue & -GeoValue::operator = (GeoValue & x) -{ - if (*this == x) return *this; - - latitude_ = x.latitude_; - longitude_ = x.longitude_; - - Value::operator = (x); - return *this; -} - - GeoValue & -GeoValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -GeoValue::operator == (GeoValue & x) -{ - x.parse(); - - if ( latitude_ != x.latitude_ ) return false; - if ( longitude_ != x.longitude_ ) return false; - - return true; -} - -GeoValue::~GeoValue() -{ -} - - GeoValue * -GeoValue::clone() -{ - return new GeoValue( *this ); -} - - void -GeoValue::_parse() -{ - int semiColon = strRep_.find( ";" ); - - if ( semiColon == -1 ) // invalid - return; - - latitude_ = strRep_.left( semiColon ).toFloat(); - longitude_ = strRep_.mid( semiColon + 1, strRep_.length() - semiColon ).toFloat(); -} - - void -GeoValue::_assemble() -{ - strRep_.sprintf( "%.6f;%.6f", latitude_, longitude_ ); -} diff --git a/kabc/vcard/ImageParam.cpp b/kabc/vcard/ImageParam.cpp deleted file mode 100644 index 69611eeab..000000000 --- a/kabc/vcard/ImageParam.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -ImageParam::ImageParam() - : Param() -{ -} - -ImageParam::ImageParam(const ImageParam & x) - : Param(x) -{ -} - -ImageParam::ImageParam(const TQCString & s) - : Param(s) -{ -} - - ImageParam & -ImageParam::operator = (ImageParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - ImageParam & -ImageParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -ImageParam::operator == (ImageParam & x) -{ - x.parse(); - return false; -} - -ImageParam::~ImageParam() -{ -} - - void -ImageParam::_parse() -{ -} - - void -ImageParam::_assemble() -{ -} - diff --git a/kabc/vcard/ImageValue.cpp b/kabc/vcard/ImageValue.cpp deleted file mode 100644 index 5d8d29bb7..000000000 --- a/kabc/vcard/ImageValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -ImageValue::ImageValue() - : Value() -{ -} - -ImageValue::ImageValue(const ImageValue & x) - : Value(x) -{ -} - -ImageValue::ImageValue(const TQCString & s) - : Value(s) -{ -} - - ImageValue & -ImageValue::operator = (ImageValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - ImageValue & -ImageValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -ImageValue::operator == (ImageValue & x) -{ - x.parse(); - return false; -} - -ImageValue::~ImageValue() -{ -} - - void -ImageValue::_parse() -{ -} - - void -ImageValue::_assemble() -{ -} - diff --git a/kabc/vcard/ImgValue.cpp b/kabc/vcard/ImgValue.cpp deleted file mode 100644 index 42889acd8..000000000 --- a/kabc/vcard/ImgValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -ImgValue::ImgValue() - : Value() -{ -} - -ImgValue::ImgValue(const ImgValue & x) - : Value(x) -{ -} - -ImgValue::ImgValue(const TQCString & s) - : Value(s) -{ -} - - ImgValue & -ImgValue::operator = (ImgValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - ImgValue & -ImgValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -ImgValue::operator == (ImgValue & x) -{ - x.parse(); - return false; -} - -ImgValue::~ImgValue() -{ -} - - void -ImgValue::_parse() -{ -} - - void -ImgValue::_assemble() -{ -} - diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp deleted file mode 100644 index f7e5a759e..000000000 --- a/kabc/vcard/LangValue.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -LangValue::LangValue() - : Value() -{ -} - -LangValue::LangValue(const LangValue & x) - : Value(x) -{ -} - -LangValue::LangValue(const TQCString & s) - : Value(s) -{ -} - - LangValue & -LangValue::operator = (LangValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - LangValue & -LangValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -LangValue::operator == (LangValue & x) -{ - x.parse(); - return false; -} - -LangValue::~LangValue() -{ -} - - void -LangValue::_parse() -{ - TQStrList l; - RTokenise(strRep_, "-", l); - - if (l.count() == 0) return; - - primary_ = l.at(0); - - l.remove(0u); - - subtags_ = l; -} - - void -LangValue::_assemble() -{ - strRep_ = primary_; - - TQStrListIterator it(subtags_); - - for (; it.current(); ++it) - strRep_ += TQCString('-') + it.current(); -} - - TQCString -LangValue::primary() -{ - parse(); - return primary_; -} - - TQStrList -LangValue::subtags() -{ - parse(); - return subtags_; -} - - void -LangValue::setPrimary(const TQCString & s) -{ - parse(); - primary_ = s; -} - - void -LangValue::setSubTags(const TQStrList & l) -{ - parse(); - subtags_ = l; -} - diff --git a/kabc/vcard/Makefile.am b/kabc/vcard/Makefile.am deleted file mode 100644 index e8a33c3a9..000000000 --- a/kabc/vcard/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDES = \ - -I$(srcdir)/include \ - -I$(srcdir)/include/generated \ - $(all_includes) - -### KDE 4.0: either make noinst or rename to something like libkvcard -lib_LTLIBRARIES = libvcard.la - -libvcard_la_SOURCES = vCard-all.cpp -libvcard_la_LDFLAGS = $(all_libraries) -libvcard_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) - -check_PROGRAMS = testwrite testread - -testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testwrite_LDADD = libvcard.la -testwrite_SOURCES = testwrite.cpp - -testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testread_LDADD = libvcard.la -testread_SOURCES = testread.cpp diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp deleted file mode 100644 index e63268134..000000000 --- a/kabc/vcard/NValue.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include -#include -#include -#include - -using namespace VCARD; - -NValue::NValue() - : Value() -{ - vDebug("ctor"); -} - -NValue::NValue(const NValue & x) - : Value(x), - family_ (x.family_), - given_ (x.given_), - middle_ (x.middle_), - prefix_ (x.prefix_), - suffix_ (x.suffix_) -{ -} - -NValue::NValue(const TQCString & s) - : Value(s) -{ - vDebug("ctor"); -} - - NValue & -NValue::operator = (NValue & x) -{ - if (*this == x) return *this; - - family_ = x.family_; - given_ = x.given_; - middle_ = x.middle_; - prefix_ = x.prefix_; - suffix_ = x.suffix_; - - Value::operator = (x); - return *this; -} - - NValue & -NValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -NValue::operator == (NValue & x) -{ - x.parse(); - - return ( - family_ == x.family_ && - given_ == x.given_ && - middle_ == x.middle_ && - prefix_ == x.prefix_ && - suffix_ == x.suffix_); -} - -NValue::~NValue() -{ -} - - NValue * -NValue::clone() -{ - return new NValue( *this ); -} - - void -NValue::_parse() -{ - TQStrList l; - RTokenise(strRep_, ";", l); - - for (unsigned int i = 0; i < l.count(); i++) { - - switch (i) { - case 0: family_ = l.at(0); break; - case 1: given_ = l.at(1); break; - case 2: middle_ = l.at(2); break; - case 3: prefix_ = l.at(3); break; - case 4: suffix_ = l.at(4); break; - default: break; - } - } -} - - void -NValue::_assemble() -{ - strRep_ = family_; - strRep_ += ";" + given_; - strRep_ += ";" + middle_; - strRep_ += ";" + prefix_; - strRep_ += ";" + suffix_; -} - diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp deleted file mode 100644 index 94ca18243..000000000 --- a/kabc/vcard/OrgValue.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -OrgValue::OrgValue() - : Value() -{ -} - -OrgValue::OrgValue(const OrgValue & x) - : Value(x) -{ -} - -OrgValue::OrgValue(const TQCString & s) - : Value(s) -{ -} - - OrgValue & -OrgValue::operator = (OrgValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - OrgValue & -OrgValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -OrgValue::operator == (OrgValue & x) -{ - x.parse(); - return false; -} - -OrgValue::~OrgValue() -{ -} - - void -OrgValue::_parse() -{ - RTokenise(strRep_, ";", valueList_); -} - - void -OrgValue::_assemble() -{ - bool first(true); - - TQStrListIterator it(valueList_); - - for (; it.current(); ++it) { - if (!first) strRep_ += ';'; - strRep_ += it.current(); - first = false; - } -} - - unsigned int -OrgValue::numValues() -{ - parse(); - return valueList_.count(); -} - - TQCString -OrgValue::value(unsigned int i) -{ - parse(); - return valueList_.at(i); -} - diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp deleted file mode 100644 index 8c5ad9e2c..000000000 --- a/kabc/vcard/Param.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -Param::Param() - : Entity(), - name_(""), - value_("") -{ -} - -Param::Param(const Param & x) - : Entity(x), - name_(x.name_), - value_(x.value_) -{ -} - -Param::Param(const TQCString & s) - : Entity(s), - name_(""), - value_("") -{ -} - - Param & -Param::operator = (Param & x) -{ - if (*this == x) return *this; - - Entity::operator = (x); - name_ = x.name_; - value_ = x.value_; - - return *this; -} - - Param & -Param::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -Param::operator == (Param & x) -{ - x.parse(); - return false; -} - -Param::~Param() -{ -} - - void -Param::_parse() -{ -} - - void -Param::_assemble() -{ - strRep_ = name_ + "=" + value_; -} - -Param::Param(const TQCString &name, const TQCString &value) - : Entity(), - name_(name), - value_(value) -{ - parsed_ = true; - assembled_ = false; -} - - void -Param::setName(const TQCString & name) -{ - name_ = name; - - assembled_ = false; -} - - void -Param::setValue(const TQCString & value) -{ - value_ = value; - - assembled_ = false; -} - - TQCString -Param::name() -{ - return name_; -} - - TQCString -Param::value() -{ - return value_; -} diff --git a/kabc/vcard/PhoneNumberValue.cpp b/kabc/vcard/PhoneNumberValue.cpp deleted file mode 100644 index 02a1266fe..000000000 --- a/kabc/vcard/PhoneNumberValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -PhoneNumberValue::PhoneNumberValue() - : Value() -{ -} - -PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) - : Value(x) -{ -} - -PhoneNumberValue::PhoneNumberValue(const TQCString & s) - : Value(s) -{ -} - - PhoneNumberValue & -PhoneNumberValue::operator = (PhoneNumberValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - PhoneNumberValue & -PhoneNumberValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -PhoneNumberValue::operator == (PhoneNumberValue & x) -{ - x.parse(); - return false; -} - -PhoneNumberValue::~PhoneNumberValue() -{ -} - - void -PhoneNumberValue::_parse() -{ -} - - void -PhoneNumberValue::_assemble() -{ -} - diff --git a/kabc/vcard/README b/kabc/vcard/README deleted file mode 100644 index 18a9daf4a..000000000 --- a/kabc/vcard/README +++ /dev/null @@ -1,15 +0,0 @@ -libvcard (C) 1999 Rik Hemsley -Written for the KDE project. - -This software is licensed under the MIT license. - -A vCard 3.0 parser based on the same principles that librmm (from Empath) uses. - -It's small and very fast due to parsing and assembly of object being lazy. - -There is a base64 codec declared in Enum.h - -Feedback welcome. - -Rik - diff --git a/kabc/vcard/RToken.cpp b/kabc/vcard/RToken.cpp deleted file mode 100644 index 582a9e1c7..000000000 --- a/kabc/vcard/RToken.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include -#include - -namespace VCARD -{ - - TQ_UINT32 -RTokenise(const char * str, const char * delim, TQStrList & l) -{ - // FIXME no stderr ! - l.clear(); - - if (!delim || !str || strlen(delim) == 0 || strlen(str) == 0) return 0; - - char * len = (char *)(str + strlen(str)); // End of string. - - register char * rstart = new char[strlen(str) + 1]; - register char * r = rstart; - - - register const char * i = str; // Cursor. - - while (i <= len) { - - if (*i == '\\') { // Escaped chars go straight through. - *r++ = *i++; - if (i <= len) - *r++ = *i++; - continue; - } - - if (strchr(delim, *i) != 0) { - // We hit a delimiter. If we have some text, make a new token. - // This has the effect that multiple delimiters are collapsed. - // cs: We mustn't collapse multiple delimiters, otherwise we - // lose empty fields. - *r = '\0'; -// if (r != rstart) { - l.append(rstart); -// } - r = rstart; - ++i; - continue; - } - - *r++ = *i++; - } - - // Catch last token -// if (r != rstart) { - *r = '\0'; - l.append(rstart); -// } - - r = 0; - - delete [] rstart; - - return l.count(); -} - -} diff --git a/kabc/vcard/SoundValue.cpp b/kabc/vcard/SoundValue.cpp deleted file mode 100644 index 5be75d358..000000000 --- a/kabc/vcard/SoundValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -SoundValue::SoundValue() - : Value() -{ -} - -SoundValue::SoundValue(const SoundValue & x) - : Value(x) -{ -} - -SoundValue::SoundValue(const TQCString & s) - : Value(s) -{ -} - - SoundValue & -SoundValue::operator = (SoundValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - SoundValue & -SoundValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -SoundValue::operator == (SoundValue & x) -{ - x.parse(); - return false; -} - -SoundValue::~SoundValue() -{ -} - - void -SoundValue::_parse() -{ -} - - void -SoundValue::_assemble() -{ -} - diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp deleted file mode 100644 index 6a0e772ac..000000000 --- a/kabc/vcard/SourceParam.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -SourceParam::SourceParam() - : Param(), - type_(SourceParam::TypeUnknown) -{ -} - -SourceParam::SourceParam(const SourceParam & x) - : Param(x), - type_ (x.type_), - par_ (x.par_), - val_ (x.val_) -{ -} - -SourceParam::SourceParam(const TQCString & s) - : Param(s), - type_(SourceParam::TypeUnknown) -{ -} - - SourceParam & -SourceParam::operator = (SourceParam & x) -{ - if (*this == x) return *this; - type_ = x.type(); - par_ = x.par(); - val_ = x.val(); - - Param::operator = (x); - return *this; -} - - SourceParam & -SourceParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -SourceParam::operator == (SourceParam & x) -{ - x.parse(); - return false; -} - -SourceParam::~SourceParam() -{ -} - - void -SourceParam::_parse() -{ - int i = strRep_.find('='); - if (i == -1) // Invalid - return; - - par_ = strRep_.left(i); - val_ = strRep_.right(strRep_.length() - i - 1); - - if (tqstricmp(par_, "VALUE") == 0 && tqstricmp(val_, "uri") == 0) - type_ = TypeValue; - else if (tqstricmp(par_, "CONTEXT") == 0 && tqstricmp(val_, "word") == 0) - type_ = TypeContext; - else if (tqstrnicmp(par_, "X-", 2) == 0) { - type_ = TypeX; - } - else type_ = TypeUnknown; - -} - - void -SourceParam::_assemble() -{ - if (type_ == TypeValue) - strRep_ = "VALUE=uri"; - else if (type_ == TypeContext) - strRep_ = "CONTEXT=word"; - else if (type_ == TypeX) - strRep_ = par_ + "=" + val_; - else strRep_ = ""; -} - diff --git a/kabc/vcard/TelParam.cpp b/kabc/vcard/TelParam.cpp deleted file mode 100644 index 072b1dc81..000000000 --- a/kabc/vcard/TelParam.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TelParam::TelParam() - : Param() -{ -} - -TelParam::TelParam(const TelParam & x) - : Param(x) -{ -} - -TelParam::TelParam(const TQCString & s) - : Param(s) -{ -} - - TelParam & -TelParam::operator = (TelParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - TelParam & -TelParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -TelParam::operator == (TelParam & x) -{ - x.parse(); - return false; -} - -TelParam::~TelParam() -{ -} - - void -TelParam::_parse() -{ -} - - void -TelParam::_assemble() -{ -} - diff --git a/kabc/vcard/TelValue.cpp b/kabc/vcard/TelValue.cpp deleted file mode 100644 index c9c1b85aa..000000000 --- a/kabc/vcard/TelValue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TelValue::TelValue() - : Value() -{ -} - -TelValue::TelValue(const TelValue & x) - : Value(x) -{ -} - -TelValue::TelValue(const TQCString & s) - : Value(s) -{ -} - - TelValue & -TelValue::operator = (TelValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - TelValue & -TelValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TelValue::operator == (TelValue & x) -{ - x.parse(); - return false; -} - -TelValue::~TelValue() -{ -} - - void -TelValue::_parse() -{ -} - - void -TelValue::_assemble() -{ -} - diff --git a/kabc/vcard/TextBinParam.cpp b/kabc/vcard/TextBinParam.cpp deleted file mode 100644 index 4e0ebadff..000000000 --- a/kabc/vcard/TextBinParam.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TextBinParam::TextBinParam() - : Param() -{ -} - -TextBinParam::TextBinParam(const TextBinParam & x) - : Param(x) -{ -} - -TextBinParam::TextBinParam(const TQCString & s) - : Param(s) -{ -} - - TextBinParam & -TextBinParam::operator = (TextBinParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - TextBinParam & -TextBinParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -TextBinParam::operator == (TextBinParam & x) -{ - x.parse(); - return false; -} - -TextBinParam::~TextBinParam() -{ -} - - void -TextBinParam::_parse() -{ -} - - void -TextBinParam::_assemble() -{ -} - diff --git a/kabc/vcard/TextBinValue.cpp b/kabc/vcard/TextBinValue.cpp deleted file mode 100644 index e7da0b7c6..000000000 --- a/kabc/vcard/TextBinValue.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include -#include - -using namespace VCARD; - -TextBinValue::TextBinValue() - : Value() -{ -} - -TextBinValue::TextBinValue(const TextBinValue & x) - : Value(x) -{ - mIsBinary_ = x.mIsBinary_; - mData_ = x.mData_; - mUrl_ = x.mUrl_; -} - -TextBinValue::TextBinValue(const TQCString & s) - : Value(s) -{ -} - - TextBinValue & -TextBinValue::operator = (TextBinValue & x) -{ - if (*this == x) return *this; - - mIsBinary_ = x.mIsBinary_; - mData_ = x.mData_; - mUrl_ = x.mUrl_; - - Value::operator = (x); - return *this; -} - - TextBinValue & -TextBinValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TextBinValue::operator == (TextBinValue & x) -{ - x.parse(); - - if ( mIsBinary_ != x.mIsBinary_ ) return false; - if ( mData_ != x.mData_ ) return false; - if ( mUrl_ != x.mUrl_ ) return false; - - return true; -} - -TextBinValue::~TextBinValue() -{ -} - - TextBinValue * -TextBinValue::clone() -{ - return new TextBinValue( *this ); -} - - void -TextBinValue::_parse() -{ -} - - void -TextBinValue::_assemble() -{ - if ( mIsBinary_ ) { - strRep_ = KCodecs::base64Encode( mData_ ); - } else - strRep_ = mUrl_.utf8(); -} - diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp deleted file mode 100644 index 2bec2e181..000000000 --- a/kabc/vcard/TextListValue.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -#include - -using namespace VCARD; - -TextListValue::TextListValue() - : Value() -{ -} - -TextListValue::TextListValue(const TextListValue & x) - : Value(x) -{ -} - -TextListValue::TextListValue(const TQCString & s) - : Value(s) -{ -} - - TextListValue & -TextListValue::operator = (TextListValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - TextListValue & -TextListValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TextListValue::operator == (TextListValue & x) -{ - x.parse(); - return false; -} - -TextListValue::~TextListValue() -{ -} - - void -TextListValue::_parse() -{ - RTokenise(strRep_, ";", valueList_); -} - - void -TextListValue::_assemble() -{ - bool first(true); - - TQStrListIterator it(valueList_); - - for (; it.current(); ++it) { - if (!first) strRep_ += ';'; - strRep_ += it.current(); - first = false; - } -} - - unsigned int -TextListValue::numValues() -{ - parse(); - return valueList_.count(); -} - - TQCString -TextListValue::value(unsigned int i) -{ - parse(); - return valueList_.at(i); -} - diff --git a/kabc/vcard/TextParam.cpp b/kabc/vcard/TextParam.cpp deleted file mode 100644 index b353483ec..000000000 --- a/kabc/vcard/TextParam.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TextParam::TextParam() - : Param() -{ -} - -TextParam::TextParam(const TextParam & x) - : Param(x) -{ -} - -TextParam::TextParam(const TQCString & s) - : Param(s) -{ -} - - TextParam & -TextParam::operator = (TextParam & x) -{ - if (*this == x) return *this; - - Param::operator = (x); - return *this; -} - - TextParam & -TextParam::operator = (const TQCString & s) -{ - Param::operator = (s); - return *this; -} - - bool -TextParam::operator == (TextParam & x) -{ - x.parse(); - - return false; -} - -TextParam::~TextParam() -{ -} - - void -TextParam::_parse() -{ -} - - void -TextParam::_assemble() -{ -} - diff --git a/kabc/vcard/TextValue.cpp b/kabc/vcard/TextValue.cpp deleted file mode 100644 index cf8e0673f..000000000 --- a/kabc/vcard/TextValue.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -TextValue::TextValue() - : Value() -{ -} - -TextValue::TextValue(const TextValue & x) - : Value(x) -{ -} - -TextValue::TextValue(const TQCString & s) - : Value(s) -{ -} - - TextValue & -TextValue::operator = (TextValue & x) -{ - if (*this == x) return *this; - - Value::operator = (x); - return *this; -} - - TextValue & -TextValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -TextValue::operator == (TextValue & x) -{ - return strRep_ == x.strRep_; -} - -TextValue::~TextValue() -{ -} - - TextValue * -TextValue::clone() -{ - return new TextValue( *this ); -} - - void -TextValue::_parse() -{ -} - - void -TextValue::_assemble() -{ -} - diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp deleted file mode 100644 index bba8db0fa..000000000 --- a/kabc/vcard/URIValue.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -URIValue::URIValue() - : Value() -{ -} - -URIValue::URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart) - : Value(), - scheme_ (scheme), - schemeSpecificPart_ (schemeSpecificPart) -{ - parsed_ = true; -} - -URIValue::URIValue(const URIValue & x) - : Value (x), - scheme_ (x.scheme_), - schemeSpecificPart_ (x.schemeSpecificPart_) -{ -} - -URIValue::URIValue(const TQCString & s) - : Value(s) -{ -} - - URIValue & -URIValue::operator = (URIValue & x) -{ - if (*this == x) return *this; - - scheme_ = x.scheme_; - schemeSpecificPart_ = x.schemeSpecificPart_; - - Value::operator = (x); - return *this; -} - - URIValue & -URIValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -URIValue::operator == (URIValue & x) -{ - x.parse(); - return ( - (scheme_ == x.scheme_) && - (schemeSpecificPart_ == x.schemeSpecificPart_)); - - return false; -} - -URIValue::~URIValue() -{ -} - - void -URIValue::_parse() -{ - int split = strRep_.find(':'); - if (split == -1) - return; - - scheme_ = strRep_.left(split); - schemeSpecificPart_ = strRep_.mid(split + 1); -} - - void -URIValue::_assemble() -{ - strRep_ = scheme_ + ':' + schemeSpecificPart_; -} - - TQCString -URIValue::scheme() -{ - parse(); - return scheme_; -} - - TQCString -URIValue::schemeSpecificPart() -{ - parse(); - return schemeSpecificPart_; -} - - void -URIValue::setScheme(const TQCString & s) -{ - parse(); - scheme_ = s; -} - - void -URIValue::setSchemeSpecificPart(const TQCString & s) -{ - parse(); - schemeSpecificPart_ = s; -} - diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp deleted file mode 100644 index 30473661f..000000000 --- a/kabc/vcard/UTCValue.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include - -using namespace VCARD; - -UTCValue::UTCValue() - : Value() -{ -} - -UTCValue::UTCValue(const UTCValue & x) - : Value(x), positive_(x.positive_), hour_(x.hour_), minute_(x.minute_) - -{ -} - -UTCValue::UTCValue(const TQCString & s) - : Value(s) -{ -} - - UTCValue & -UTCValue::operator = (UTCValue & x) -{ - if (*this == x) return *this; - - positive_ = x.positive_; - hour_ = x.hour_; - minute_ = x.minute_; - - Value::operator = (x); - return *this; -} - - UTCValue & -UTCValue::operator = (const TQCString & s) -{ - Value::operator = (s); - return *this; -} - - bool -UTCValue::operator == (UTCValue & x) -{ - x.parse(); - - if (positive_ != x.positive_) return false; - if (hour_ != x.hour_) return false; - if (minute_ != x.minute_) return false; - - return true; -} - -UTCValue::~UTCValue() -{ -} - - UTCValue * -UTCValue::clone() -{ - return new UTCValue( *this ); -} - - void -UTCValue::_parse() -{ - if ( strRep_.isEmpty() ) - return; - - positive_ = ( strRep_[0] == '+' ); - - int colon = strRep_.find( ':' ); - - if ( colon == -1 ) // Not valid. - return; - - hour_ = strRep_.mid( 1, 2 ).toInt(); - minute_ = strRep_.right( 2 ).toInt(); -} - - void -UTCValue::_assemble() -{ - strRep_.sprintf( "%c%.2i:%.2i", (positive_ ? '+' : '-'), hour_, minute_ ); -} - diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp deleted file mode 100644 index eb3f57f6e..000000000 --- a/kabc/vcard/VCard.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -#include -#include -#include -#include - -#include - -using namespace VCARD; - -VCard::VCard() - : Entity() -{ - contentLineList_.setAutoDelete( true ); -} - -VCard::VCard(const VCard & x) - : Entity(x), - group_(x.group_), - contentLineList_(x.contentLineList_) -{ -} - -VCard::VCard(const TQCString & s) - : Entity(s) -{ -} - - VCard & -VCard::operator = (VCard & x) -{ - if (*this == x) return *this; - - group_ = x.group(); - contentLineList_ = x.contentLineList_; - - Entity::operator = (x); - return *this; -} - - VCard & -VCard::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -VCard::operator == (VCard & x) -{ - x.parse(); - return false; -} - -VCard::~VCard() -{ -} - - void -VCard::_parse() -{ - vDebug("parse() called"); - TQStrList l; - - RTokenise(strRep_, "\r\n", l); - - if (l.count() < 3) { // Invalid VCARD ! - vDebug("Invalid vcard"); - return; - } - - // Get the first line - TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace(); - - vDebug("Begin line == \"" + beginLine + "\""); - - // Remove extra blank lines - while (TQCString(l.last()).isEmpty()) - l.remove(l.last()); - - // Now we know this is the last line - TQCString endLine = l.last(); - - // Trash the first and last lines as we have seen them. - l.remove(0u); - l.remove(l.last()); - - /////////////////////////////////////////////////////////////// - // FIRST LINE - - int split = beginLine.find(':'); - - if (split == -1) { // invalid, no BEGIN - vDebug("No split"); - return; - } - - TQCString firstPart(beginLine.left(split)); - TQCString valuePart(beginLine.mid(split + 1)); - - split = firstPart.find('.'); - - if (split != -1) { - group_ = firstPart.left(split); - firstPart = firstPart.right(firstPart.length() - split - 1); - } - - if (tqstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN ! - vDebug("No BEGIN"); - return; - } - - if (tqstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard ! - vDebug("No VCARD"); - return; - } - - /////////////////////////////////////////////////////////////// - // CONTENT LINES - // - vDebug("Content lines"); - - // Handle folded lines. - - TQStrList refolded; - - TQStrListIterator it(l); - - TQCString cur; - - for (; it.current(); ++it) { - - cur = it.current(); - - ++it; - - while ( - it.current() && - it.current()[0] == ' ' && - strlen(it.current()) != 1) - { - cur += it.current() + 1; - ++it; - } - - --it; - - refolded.append(cur); - } - - TQStrListIterator it2(refolded); - - for (; it2.current(); ++it2) { - - vDebug("New contentline using \"" + TQCString(it2.current()) + "\""); - ContentLine * cl = new ContentLine(it2.current()); - - cl->parse(); - - contentLineList_.append(cl); - } - - /////////////////////////////////////////////////////////////// - // LAST LINE - - split = endLine.find(':'); - - if (split == -1) // invalid, no END - return; - - firstPart = endLine.left(split); - valuePart = endLine.right(firstPart.length() - split - 1); - - split = firstPart.find('.'); - - if (split != -1) { - group_ = firstPart.left(split); - firstPart = firstPart.right(firstPart.length() - split - 1); - } - - if (tqstricmp(firstPart, "END") != 0) // No END ! - return; - - if (tqstricmp(valuePart, "VCARD") != 0) // Not a vcard ! - return; -} - - void -VCard::_assemble() -{ - vDebug("Assembling vcard"); - strRep_ = "BEGIN:VCARD\r\n"; - strRep_ += "VERSION:3.0\r\n"; - - TQPtrListIterator it(contentLineList_); - - for (; it.current(); ++it) - strRep_ += it.current()->asString() + "\r\n"; - - strRep_ += "END:VCARD\r\n"; -} - - bool -VCard::has(EntityType t) -{ - parse(); - return contentLine(t) == 0 ? false : true; -} - - bool -VCard::has(const TQCString & s) -{ - parse(); - return contentLine(s) == 0 ? false : true; -} - - void -VCard::add(const ContentLine & cl) -{ - parse(); - ContentLine * c = new ContentLine(cl); - contentLineList_.append(c); -} - - void -VCard::add(const TQCString & s) -{ - parse(); - ContentLine * c = new ContentLine(s); - contentLineList_.append(c); -} - - ContentLine * -VCard::contentLine(EntityType t) -{ - parse(); - TQPtrListIterator it(contentLineList_); - - for (; it.current(); ++it) - if (it.current()->entityType() == t) - return it.current(); - - return 0; -} - - ContentLine * -VCard::contentLine(const TQCString & s) -{ - parse(); - TQPtrListIterator it(contentLineList_); - - for (; it.current(); ++it) - if (it.current()->entityType() == EntityNameToEntityType(s)) - return it.current(); - - return 0; -} - diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp deleted file mode 100644 index 1f8cea5b1..000000000 --- a/kabc/vcard/VCardEntity.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include - -#include -#include - -using namespace VCARD; - -VCardEntity::VCardEntity() - : Entity() -{ -} - -VCardEntity::VCardEntity(const VCardEntity & x) - : Entity(x) -{ -} - -VCardEntity::VCardEntity(const TQCString & s) - : Entity(s) -{ -} - - VCardEntity & -VCardEntity::operator = (VCardEntity & x) -{ - if (*this == x) return *this; - - Entity::operator = (x); - return *this; -} - - VCardEntity & -VCardEntity::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -VCardEntity::operator == (VCardEntity & x) -{ - x.parse(); - return false; -} - -VCardEntity::~VCardEntity() -{ -} - - void -VCardEntity::_parse() -{ - vDebug("parse"); - TQCString s(strRep_); - - int i = s.find(TQRegExp("BEGIN:VCARD", false)); - - while (i != -1) { - - i = s.find(TQRegExp("BEGIN:VCARD", false), 11); - - TQCString cardStr(s.left(i)); - - VCard * v = new VCard(cardStr); - - cardList_.append(v); - - v->parse(); - - s.remove(0, i); - } -} - - void -VCardEntity::_assemble() -{ - VCardListIterator it(cardList_); - - for (; it.current(); ++it) - strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. -} - - VCardList & -VCardEntity::cardList() -{ - parse(); - return cardList_; -} - - void -VCardEntity::setCardList(const VCardList & l) -{ - parse(); - cardList_ = l; -} - diff --git a/kabc/vcard/Value.cpp b/kabc/vcard/Value.cpp deleted file mode 100644 index c95c0712b..000000000 --- a/kabc/vcard/Value.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -using namespace VCARD; - -Value::Value() - : Entity() -{ -} - -Value::Value(const Value & x) - : Entity(x) -{ -} - -Value::Value(const TQCString & s) - : Entity(s) -{ -} - - Value & -Value::operator = (Value & x) -{ - if (*this == x) return *this; - - Entity::operator = (x); - return *this; -} - - Value & -Value::operator = (const TQCString & s) -{ - Entity::operator = (s); - return *this; -} - - bool -Value::operator == (Value & x) -{ - x.parse(); - return false; -} - -Value::~Value() -{ -} - - void -Value::_parse() -{ -} - - void -Value::_assemble() -{ - vDebug("Value::_assemble()"); -} - diff --git a/kabc/vcard/include/VCard.h b/kabc/vcard/include/VCard.h deleted file mode 100644 index 17b50e8f2..000000000 --- a/kabc/vcard/include/VCard.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef VCARD_H -#define VCARD_H - -#include "VCardAdrParam.h" -#include "VCardAdrValue.h" -#include "VCardAgentParam.h" -#include "VCardAgentValue.h" -#include "VCardClassValue.h" -#include "VCardContentLine.h" -#include "VCardDateParam.h" -#include "VCardDateValue.h" -#include "VCardDefines.h" -#include "VCardEmailParam.h" -#include "VCardEntity.h" -#include "VCardEnum.h" -#include "VCardFloatValue.h" -#include "VCardGeoValue.h" -#include "VCardGroup.h" -#include "VCardImageParam.h" -#include "VCardImageValue.h" -#include "VCardImgValue.h" -#include "VCardLangValue.h" -#include "VCardNValue.h" -#include "VCardOrgValue.h" -#include "VCardParam.h" -#include "VCardPhoneNumberValue.h" -#include "VCardRToken.h" -#include "VCardSoundValue.h" -#include "VCardSourceParam.h" -#include "VCardTelParam.h" -#include "VCardTelValue.h" -#include "VCardTextBinParam.h" -#include "VCardTextBinValue.h" -#include "VCardTextListValue.h" -#include "VCardTextParam.h" -#include "VCardTextValue.h" -#include "VCardURIValue.h" -#include "VCardUTCValue.h" -#include "VCardVCard.h" -#include "VCardVCardEntity.h" -#include "VCardValue.h" - -#endif diff --git a/kabc/vcard/include/VCardAdrParam.h b/kabc/vcard/include/VCardAdrParam.h deleted file mode 100644 index d40165f4a..000000000 --- a/kabc/vcard/include/VCardAdrParam.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ADRPARAM_H -#define ADRPARAM_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AdrParam : public Param -{ - -#include "AdrParam-generated.h" - - TQStrList adrTypeList() - { parse(); return adrTypeList_; } - - TQCString textParam() - { parse(); return textParam_; } - - void setAdrTypeList(const TQStrList & l) - { adrTypeList_ = l; assembled_ = false; } - - void setTextParam(const TQCString & s) - { textParam_ = s; assembled_ = false; } - - enum AdrType { - AdrDom, AdrIntl, AdrPostal, AdrParcel, AdrHome, AdrWork, AdrPref, - AdrIANA, AdrX - }; - - private: - - TQStrList adrTypeList_; - TQCString textParam_; -}; -} - -#endif diff --git a/kabc/vcard/include/VCardAdrValue.h b/kabc/vcard/include/VCardAdrValue.h deleted file mode 100644 index 94ed93aee..000000000 --- a/kabc/vcard/include/VCardAdrValue.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ADRVALUE_H -#define ADRVALUE_H - -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AdrValue : public Value -{ - -#include "AdrValue-generated.h" - - AdrValue *clone(); - - void setPOBox(const TQCString & s) - { poBox_ = s; assembled_ = false; } - - void setExtAddress(const TQCString & s) - { extAddress_ = s; assembled_ = false; } - - void setStreet(const TQCString & s) - { street_ = s; assembled_ = false; } - - void setLocality(const TQCString & s) - { locality_ = s; assembled_ = false; } - - void setRegion(const TQCString & s) - { region_ = s; assembled_ = false; } - - void setPostCode(const TQCString & s) - { postCode_ = s; assembled_ = false; } - - void setCountryName(const TQCString & s) - { countryName_ = s; assembled_ = false; } - - TQCString poBox() { parse(); return poBox_; } - TQCString extAddress() { parse(); return extAddress_; } - TQCString street() { parse(); return street_; } - TQCString locality() { parse(); return locality_; } - TQCString region() { parse(); return region_; } - TQCString postCode() { parse(); return postCode_; } - TQCString countryName() { parse(); return countryName_; } - - private: - - TQCString poBox_; - TQCString extAddress_; - TQCString street_; - TQCString locality_; - TQCString region_; - TQCString postCode_; - TQCString countryName_; -}; - -} - -#endif - diff --git a/kabc/vcard/include/VCardAgentParam.h b/kabc/vcard/include/VCardAgentParam.h deleted file mode 100644 index 90c3bd528..000000000 --- a/kabc/vcard/include/VCardAgentParam.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef AGENTPARAM_H -#define AGENTPARAM_H - -#include - -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AgentParam : public Param -{ - -#include "AgentParam-generated.h" - - bool refer() - { parse(); return refer_; } - - URIValue uri() - { parse(); return uri_; } - - void setRefer(bool b) - { refer_ = b; assembled_ = false; } - - void setURI(const TQCString & s) - { uri_ = s; assembled_ = false; } - - private: - - bool refer_; - URIValue uri_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardAgentValue.h b/kabc/vcard/include/VCardAgentValue.h deleted file mode 100644 index dd68145c9..000000000 --- a/kabc/vcard/include/VCardAgentValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef AGENTVALUE_H -#define AGENTVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT AgentValue : public Value -{ - -#include "AgentValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardClassValue.h b/kabc/vcard/include/VCardClassValue.h deleted file mode 100644 index 5de79167b..000000000 --- a/kabc/vcard/include/VCardClassValue.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef CLASSVALUE_H -#define CLASSVALUE_H - -#include - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ClassValue : public Value -{ - -#include "ClassValue-generated.h" - - enum ClassType { - Public, Private, Confidential, Other - }; - - ClassValue *clone(); - - void setType( int type ) { classType_ = type; assembled_ = false; parsed_ = true; } - int type() { parse(); return classType_; } - - private: - int classType_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardContentLine.h b/kabc/vcard/include/VCardContentLine.h deleted file mode 100644 index ea59444a0..000000000 --- a/kabc/vcard/include/VCardContentLine.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef CONTENTLINE_H -#define CONTENTLINE_H - -#include - -#include "VCardEnum.h" -#include "VCardEntity.h" -#include "VCardParam.h" -#include "VCardValue.h" - -namespace VCARD -{ - -class KVCARD_EXPORT ContentLine : public Entity -{ - -#include "ContentLine-generated.h" - - TQCString group() { parse(); return group_; } - TQCString name() { parse(); return name_; } - Value * value() { parse(); return value_; } - ParamList paramList() { parse(); return paramList_; } - ParamType paramType() { parse(); return paramType_; } - ValueType valueType() { parse(); return valueType_; } - EntityType entityType() { parse(); return entityType_; } - - void setGroup (const TQCString & s) - { group_ = s; assembled_ = false; } - - void setName (const TQCString & s) - { name_ = s; assembled_ = false; } - - void setValue (Value *s) - { value_ = s; assembled_ = false; } - - void setParamList (const ParamList & l) - { paramList_ = l; assembled_ = false; } - - void clear (); - - private: - - TQCString group_; - TQCString name_; - TQPtrList paramList_; - Value * value_; - - ParamType paramType_; - ValueType valueType_; - EntityType entityType_; -}; -} - -#endif diff --git a/kabc/vcard/include/VCardDateParam.h b/kabc/vcard/include/VCardDateParam.h deleted file mode 100644 index 410eae6b7..000000000 --- a/kabc/vcard/include/VCardDateParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef DATEPARAM_H -#define DATEPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT DateParam : public Param -{ - -#include "DateParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardDateValue.h b/kabc/vcard/include/VCardDateValue.h deleted file mode 100644 index 4f2e2fe7f..000000000 --- a/kabc/vcard/include/VCardDateValue.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef DATEVALUE_H -#define DATEVALUE_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT DateValue : public Value -{ -#include "DateValue-generated.h" - - DateValue( - unsigned int year, - unsigned int month, - unsigned int day, - unsigned int hour = 0, - unsigned int minute = 0, - unsigned int second = 0, - double secFrac = 0, - bool zonePositive = true, - unsigned int zoneHour = 0, - unsigned int zoneMinute = 0); - - DateValue(const TQDate &); - DateValue(const TQDateTime &); - - DateValue *clone(); - - bool hasTime(); - - unsigned int year(); - unsigned int month(); - unsigned int day(); - unsigned int hour(); - unsigned int minute(); - unsigned int second(); - double secondFraction(); - bool zonePositive(); - unsigned int zoneHour(); - unsigned int zoneMinute(); - - void setYear (unsigned int); - void setMonth (unsigned int); - void setDay (unsigned int); - void setHour (unsigned int); - void setMinute (unsigned int); - void setSecond (unsigned int); - void setSecondFraction (double); - void setZonePositive (bool); - void setZoneHour (unsigned int); - void setZoneMinute (unsigned int); - - TQDate qdate(); - TQTime qtime(); - TQDateTime qdt(); - - private: - - unsigned int year_, month_, day_, - hour_, minute_, second_, - zoneHour_, zoneMinute_; - - double secFrac_; - - bool zonePositive_; - - bool hasTime_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardDefines.h b/kabc/vcard/include/VCardDefines.h deleted file mode 100644 index e778bc24f..000000000 --- a/kabc/vcard/include/VCardDefines.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1998 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VCARD_DEFINES_H -#define VCARD_DEFINES_H - -#include - -#ifdef VCARD_DEBUG -#define vDebug(a) kdDebug(5710) << a << endl; -#else -#define vDebug(a) -#endif - -#if 0 -#ifndef NDEBUG -# include -# include -# ifdef __GNUG__ -# define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ - << __LINE__ << "): " << TQCString((a)).data() << endl; -# else -# define vDebug(a) cerr << className() << ": " \ - << TQCString((a)).data() << endl; -# endif -#else -# define vDebug(a) -#endif -#endif - -#endif // Included this file - diff --git a/kabc/vcard/include/VCardEmailParam.h b/kabc/vcard/include/VCardEmailParam.h deleted file mode 100644 index 1fe558afd..000000000 --- a/kabc/vcard/include/VCardEmailParam.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef EMAILPARAM_H -#define EMAILPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT EmailParam : public Param -{ - -#include "EmailParam-generated.h" - - TQCString emailType() { parse(); return emailType_; } - bool pref() { parse(); return pref_; } - - void setEmailType(const TQCString & s) - { emailType_ = s; assembled_ = false; } - - void setPref(bool b) - { pref_ = b; assembled_ = false; } - - private: - - TQCString emailType_; - bool pref_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardEntity.h b/kabc/vcard/include/VCardEntity.h deleted file mode 100644 index e87c5f1a6..000000000 --- a/kabc/vcard/include/VCardEntity.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ENTITY_H -#define ENTITY_H - -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Entity -{ - public: - - Entity(); - Entity(const Entity & e); - Entity(const TQCString & s); - - virtual Entity & operator = (const Entity & e); - virtual Entity & operator = (const TQCString & s); - - virtual bool operator == (Entity & e); - virtual bool operator != (Entity & e); - virtual bool operator == (const TQCString & s); - virtual bool operator != (const TQCString & s); - - virtual ~Entity(); - - TQCString asString(); - - virtual void parse(); - virtual void assemble(); - - virtual void _parse() = 0; - virtual void _assemble() = 0; - - protected: - - TQCString strRep_; - bool parsed_; - bool assembled_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardEnum.h b/kabc/vcard/include/VCardEnum.h deleted file mode 100644 index 4552ccdbc..000000000 --- a/kabc/vcard/include/VCardEnum.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ENUM_H -#define ENUM_H - -#include - -#include - -namespace VCARD -{ - -extern const TQCString paramNames []; - -enum EntityType { - EntityName, - EntityProfile, - EntitySource, - EntityFullName, - EntityN, - EntityNickname, - EntityPhoto, - EntityBirthday, - EntityAddress, - EntityLabel, - EntityTelephone, - EntityEmail, - EntityMailer, - EntityTimeZone, - EntityGeo, - EntityTitle, - EntityRole, - EntityLogo, - EntityAgent, - EntityOrganisation, - EntityCategories, - EntityNote, - EntityProductID, - EntityRevision, - EntitySortString, - EntitySound, - EntityUID, - EntityURI, - EntityURL, - EntityVersion, - EntityClass, - EntityKey, - EntityExtension, - EntityUnknown -}; - -enum ValueType { - ValueSound, - ValueAgent, - ValueAddress, - ValueTel, - ValueTextBin, - ValueOrg, - ValueN, - ValueUTC, - ValueURI, - ValueClass, - ValueFloat, - ValueImage, - ValueDate, - ValueTextList, - ValueText, - ValueGeo, - ValueUnknown -}; - -enum ParamType { - ParamUnknown, - ParamNone, - ParamSource, - ParamText, - ParamImage, - ParamDate, - ParamAddrText, - ParamTel, - ParamEmail, - ParamMailer, - ParamAgent, - ParamTextBin, - ParamTextNS, - ParamSound -}; - -extern const ParamType paramTypesTable[]; - -KVCARD_EXPORT ParamType EntityTypeToParamType(EntityType); -KVCARD_EXPORT ValueType EntityTypeToValueType(EntityType); -KVCARD_EXPORT TQCString EntityTypeToParamName(EntityType); -KVCARD_EXPORT EntityType EntityNameToEntityType(const TQCString &); - -KVCARD_EXPORT char * encodeBase64(const char *, unsigned long, unsigned long &); -KVCARD_EXPORT char * decodeBase64(const char *, unsigned long, unsigned long &); - -} - -#endif - diff --git a/kabc/vcard/include/VCardFloatValue.h b/kabc/vcard/include/VCardFloatValue.h deleted file mode 100644 index 45a6823be..000000000 --- a/kabc/vcard/include/VCardFloatValue.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef FLOATVALUE_H -#define FLOATVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT FloatValue : public Value -{ - -#include "FloatValue-generated.h" - - FloatValue(float); - - float value(); - void setValue(float); - - private: - - float value_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardGeoValue.h b/kabc/vcard/include/VCardGeoValue.h deleted file mode 100644 index 4228587a4..000000000 --- a/kabc/vcard/include/VCardGeoValue.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - This file is part of libvcard. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef GEOVALUE_H -#define GEOVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT GeoValue : public Value -{ - -#include "GeoValue-generated.h" - - GeoValue *clone(); - - void setLatitude( float lat ) { latitude_ = lat; assembled_ = false; } - void setLongitude( float lon ) { longitude_ = lon; assembled_ = false; } - - float latitude() { parse(); return latitude_; } - float longitude() { parse(); return longitude_; } - - private: - float latitude_; - float longitude_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardGroup.h b/kabc/vcard/include/VCardGroup.h deleted file mode 100644 index ce884f100..000000000 --- a/kabc/vcard/include/VCardGroup.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef GROUP_H -#define GROUP_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Group : public Entity -{ -#include "Group-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardImageParam.h b/kabc/vcard/include/VCardImageParam.h deleted file mode 100644 index 10ab8a3f5..000000000 --- a/kabc/vcard/include/VCardImageParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef IMGPARAM_H -#define IMGPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ImageParam : public Param -{ - -#include "ImageParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardImageValue.h b/kabc/vcard/include/VCardImageValue.h deleted file mode 100644 index 45fbcad9c..000000000 --- a/kabc/vcard/include/VCardImageValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef IMAGEVALUE_H -#define IMAGEVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ImageValue : public Value -{ - -#include "ImageValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardImgValue.h b/kabc/vcard/include/VCardImgValue.h deleted file mode 100644 index 7d4bbfa2d..000000000 --- a/kabc/vcard/include/VCardImgValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef IMGVALUE_H -#define IMGVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT ImgValue : public Value -{ -#include "ImgValue-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardLangValue.h b/kabc/vcard/include/VCardLangValue.h deleted file mode 100644 index 7767d52fa..000000000 --- a/kabc/vcard/include/VCardLangValue.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef LANGVALUE_H -#define LANGVALUE_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT LangValue : public Value -{ -#include "LangValue-generated.h" - - TQCString primary(); - TQStrList subtags(); - - void setPrimary(const TQCString &); - void setSubTags(const TQStrList &); - - TQCString primary_; - TQStrList subtags_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardNValue.h b/kabc/vcard/include/VCardNValue.h deleted file mode 100644 index 9db37fbbc..000000000 --- a/kabc/vcard/include/VCardNValue.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef NVALUE_H -#define NVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT NValue : public Value -{ -#include "NValue-generated.h" - NValue *clone(); - - TQCString family() { parse(); return family_; } - TQCString given() { parse(); return given_; } - TQCString middle() { parse(); return middle_; } - TQCString prefix() { parse(); return prefix_; } - TQCString suffix() { parse(); return suffix_; } - - void setFamily (const TQCString & s) { family_ = s; assembled_ = false; } - void setGiven (const TQCString & s) { given_ = s; assembled_ = false; } - void setMiddle (const TQCString & s) { middle_ = s; assembled_ = false; } - void setPrefix (const TQCString & s) { prefix_ = s; assembled_ = false; } - void setSuffix (const TQCString & s) { suffix_ = s; assembled_ = false; } - - private: - - TQCString family_, given_, middle_, prefix_, suffix_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardOrgValue.h b/kabc/vcard/include/VCardOrgValue.h deleted file mode 100644 index a2bd803e5..000000000 --- a/kabc/vcard/include/VCardOrgValue.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef ORGVALUE_H -#define ORGVALUE_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT OrgValue : public Value -{ - -#include "OrgValue-generated.h" - - unsigned int numValues(); - TQCString value(unsigned int); - - private: - - TQStrList valueList_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardParam.h b/kabc/vcard/include/VCardParam.h deleted file mode 100644 index 93d70f06b..000000000 --- a/kabc/vcard/include/VCardParam.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef PARAM_H -#define PARAM_H - -#include -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Param : public Entity -{ - -#include "Param-generated.h" - - Param(const TQCString &name, const TQCString &value); - - void setName(const TQCString &); - void setValue(const TQCString &); - - TQCString name(); - TQCString value(); - - private: - - TQCString name_; - TQCString value_; -}; - -typedef TQPtrList ParamList; -typedef TQPtrListIterator ParamListIterator; - -} - -#endif diff --git a/kabc/vcard/include/VCardPhoneNumberValue.h b/kabc/vcard/include/VCardPhoneNumberValue.h deleted file mode 100644 index 3f9e106ca..000000000 --- a/kabc/vcard/include/VCardPhoneNumberValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef PHONENUMBERVALUE_H -#define PHONENUMBERVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT PhoneNumberValue : public Value -{ -#include "PhoneNumberValue-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardRToken.h b/kabc/vcard/include/VCardRToken.h deleted file mode 100644 index 17a3943d3..000000000 --- a/kabc/vcard/include/VCardRToken.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef RTOKEN_H -#define RTOKEN_H - -#include - -#include - -namespace VCARD -{ - -KVCARD_EXPORT TQ_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l); - -} - -#endif - diff --git a/kabc/vcard/include/VCardSndValue.h b/kabc/vcard/include/VCardSndValue.h deleted file mode 100644 index 09a3a8238..000000000 --- a/kabc/vcard/include/VCardSndValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef SNDVALUE_H -#define SNDVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT SndValue : public Value -{ -#include "SndValue-generated.h" -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardSoundValue.h b/kabc/vcard/include/VCardSoundValue.h deleted file mode 100644 index 61858f058..000000000 --- a/kabc/vcard/include/VCardSoundValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef SOUNDVALUE_H -#define SOUNDVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT SoundValue : public Value -{ - -#include "SoundValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardSourceParam.h b/kabc/vcard/include/VCardSourceParam.h deleted file mode 100644 index 1d9d03d47..000000000 --- a/kabc/vcard/include/VCardSourceParam.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef SOURCEPARAM_H -#define SOURCEPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT SourceParam : public Param -{ - -#include "SourceParam-generated.h" - - enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX }; - - SourceParamType type() { parse(); return type_;} - TQCString par() { parse(); return par_; } - TQCString val() { parse(); return val_; } - - void setType(SourceParamType t) { type_ = t; assembled_ = false; } - void setPar(const TQCString & s) { par_ = s; assembled_ = false; } - void setVal(const TQCString & s) { val_ = s; assembled_ = false; } - - private: - - SourceParamType type_; - // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" - TQCString par_, val_; // Sub-parameter, value -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTelParam.h b/kabc/vcard/include/VCardTelParam.h deleted file mode 100644 index 9eea5da2f..000000000 --- a/kabc/vcard/include/VCardTelParam.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TELPARAM_H -#define TELPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TelParam : public Param -{ -#include "TelParam-generated.h" - - enum TelType { - TelHome, TelWork, TelPref, TelVoice, TelFex, TelMsg, TelCell, - TelPager, TelBBS, TelModem, TelCar, TelISDN, TelVideo, TelPCS, - TelIANA, TelX - }; - - private: - - TQPtrList types_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTelValue.h b/kabc/vcard/include/VCardTelValue.h deleted file mode 100644 index 043a45aa9..000000000 --- a/kabc/vcard/include/VCardTelValue.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TELVALUE_H -#define TELVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TelValue : public Value -{ - -#include "TelValue-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextBinParam.h b/kabc/vcard/include/VCardTextBinParam.h deleted file mode 100644 index 5a681ad48..000000000 --- a/kabc/vcard/include/VCardTextBinParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTBINPARAM_H -#define TEXTBINPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextBinParam : public Param -{ - -#include "TextBinParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextBinValue.h b/kabc/vcard/include/VCardTextBinValue.h deleted file mode 100644 index 316fa7832..000000000 --- a/kabc/vcard/include/VCardTextBinValue.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTBINVALUE_H -#define TEXTBINVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextBinValue : public Value -{ - -#include "TextBinValue-generated.h" - - TextBinValue *clone(); - - bool isBinary() { parse(); return mIsBinary_; } - TQByteArray data() { parse(); return mData_; } - TQString url() { parse(); return mUrl_; } - - void setData( const TQByteArray &data ) - { - mData_ = data; - mIsBinary_ = true; - assembled_ = false; - } - - void setUrl( const TQString &url ) - { - mUrl_ = url; - mIsBinary_ = false; - assembled_ = false; - } - - private: - int mIsBinary_; - TQByteArray mData_; - TQString mUrl_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextListValue.h b/kabc/vcard/include/VCardTextListValue.h deleted file mode 100644 index 53760c75a..000000000 --- a/kabc/vcard/include/VCardTextListValue.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTLISTVALUE_H -#define TEXTLISTVALUE_H - -#include - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextListValue : public Value -{ - -#include "TextListValue-generated.h" - - unsigned int numValues(); - TQCString value(unsigned int); - - private: - - TQStrList valueList_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextParam.h b/kabc/vcard/include/VCardTextParam.h deleted file mode 100644 index d593c0578..000000000 --- a/kabc/vcard/include/VCardTextParam.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTPARAM_H -#define TEXTPARAM_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextParam : public Param -{ - -#include "TextParam-generated.h" - - private: -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardTextValue.h b/kabc/vcard/include/VCardTextValue.h deleted file mode 100644 index 66eed32a8..000000000 --- a/kabc/vcard/include/VCardTextValue.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef TEXTVALUE_H -#define TEXTVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT TextValue : public Value -{ -#include "TextValue-generated.h" - - TextValue *clone(); -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardURIValue.h b/kabc/vcard/include/VCardURIValue.h deleted file mode 100644 index 696887774..000000000 --- a/kabc/vcard/include/VCardURIValue.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef URIVALUE_H -#define URIVALUE_H - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT URIValue : public Value -{ -#include "URIValue-generated.h" - - URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart); - - TQCString scheme(); - TQCString schemeSpecificPart(); - - void setScheme (const TQCString &); - void setSchemeSpecificPart (const TQCString &); - - private: - - TQCString scheme_; - TQCString schemeSpecificPart_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardUTCValue.h b/kabc/vcard/include/VCardUTCValue.h deleted file mode 100644 index cb09ccf00..000000000 --- a/kabc/vcard/include/VCardUTCValue.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef UTCVALUE_H -#define UTCVALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT UTCValue : public Value -{ - -#include "UTCValue-generated.h" - - UTCValue *clone(); - - void setPositive( int p ) { positive_ = p; assembled_ = false; } - void setHour( int h ) { hour_ = h; assembled_ = false; } - void setMinute( int m ) { minute_ = m; assembled_ = false; } - - bool positive() { parse(); return positive_; } - unsigned int hour() { parse(); return hour_; } - unsigned int minute() { parse(); return minute_; } - - private: - - bool positive_; - unsigned int hour_; - unsigned int minute_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardVCard.h b/kabc/vcard/include/VCardVCard.h deleted file mode 100644 index 53563e8c0..000000000 --- a/kabc/vcard/include/VCardVCard.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VCARD_VCARD_H -#define VCARD_VCARD_H - -#include -#include - -#include -#include -#include - -namespace VCARD -{ - -class KVCARD_EXPORT VCard : public Entity -{ - -#include "VCard-generated.h" - - bool has(EntityType); - bool has(const TQCString &); - - void add(const ContentLine &); - void add(const TQCString &); - - ContentLine * contentLine(EntityType); - ContentLine * contentLine(const TQCString &); - - TQCString group() { parse(); return group_; } - - TQPtrList contentLineList() { parse(); return contentLineList_; } - - private: - - TQCString group_; - TQPtrList contentLineList_; -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardVCardEntity.h b/kabc/vcard/include/VCardVCardEntity.h deleted file mode 100644 index 422790c22..000000000 --- a/kabc/vcard/include/VCardVCardEntity.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VCARD_ENTITY_H -#define VCARD_ENTITY_H - -#include -#include - -#include -#include -#include - -namespace VCARD -{ - -typedef TQPtrList VCardList; -typedef TQPtrListIterator VCardListIterator; - -class KVCARD_EXPORT VCardEntity : public Entity -{ - -#include "VCardEntity-generated.h" - - void setCardList(const VCardList & l); - VCardList & cardList(); - - private: - - VCardList cardList_; - -}; - -} - -#endif diff --git a/kabc/vcard/include/VCardValue.h b/kabc/vcard/include/VCardValue.h deleted file mode 100644 index 3c167d70a..000000000 --- a/kabc/vcard/include/VCardValue.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - libvcard - vCard parsing library for vCard version 3.0 - - Copyright (C) 1999 Rik Hemsley rik@kde.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef VALUE_H -#define VALUE_H - -#include - -#include - -namespace VCARD -{ - -class KVCARD_EXPORT Value : public Entity -{ -#include "Value-generated.h" - - virtual Value *clone() { return new Value( *this ); } -}; - -typedef TQPtrList ValueList; -typedef TQPtrListIterator ValueListIterator; - -} - -#endif diff --git a/kabc/vcard/include/generated/AdrParam-generated.h b/kabc/vcard/include/generated/AdrParam-generated.h deleted file mode 100644 index 1afdcd36a..000000000 --- a/kabc/vcard/include/generated/AdrParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AdrParam(); -AdrParam(const AdrParam&); -AdrParam(const TQCString&); -AdrParam & operator = (AdrParam&); -AdrParam & operator = (const TQCString&); -bool operator ==(AdrParam&); -bool operator !=(AdrParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AdrParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AdrParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AdrParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/AdrValue-generated.h b/kabc/vcard/include/generated/AdrValue-generated.h deleted file mode 100644 index 9882d1186..000000000 --- a/kabc/vcard/include/generated/AdrValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AdrValue(); -AdrValue(const AdrValue&); -AdrValue(const TQCString&); -AdrValue & operator = (AdrValue&); -AdrValue & operator = (const TQCString&); -bool operator ==(AdrValue&); -bool operator !=(AdrValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AdrValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AdrValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AdrValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/AgentParam-generated.h b/kabc/vcard/include/generated/AgentParam-generated.h deleted file mode 100644 index 07b87d106..000000000 --- a/kabc/vcard/include/generated/AgentParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AgentParam(); -AgentParam(const AgentParam&); -AgentParam(const TQCString&); -AgentParam & operator = (AgentParam&); -AgentParam & operator = (const TQCString&); -bool operator ==(AgentParam&); -bool operator !=(AgentParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AgentParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AgentParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AgentParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/AgentValue-generated.h b/kabc/vcard/include/generated/AgentValue-generated.h deleted file mode 100644 index e2866bb8f..000000000 --- a/kabc/vcard/include/generated/AgentValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -AgentValue(); -AgentValue(const AgentValue&); -AgentValue(const TQCString&); -AgentValue & operator = (AgentValue&); -AgentValue & operator = (const TQCString&); -bool operator ==(AgentValue&); -bool operator !=(AgentValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {AgentValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~AgentValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "AgentValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ClassValue-generated.h b/kabc/vcard/include/generated/ClassValue-generated.h deleted file mode 100644 index e10c65568..000000000 --- a/kabc/vcard/include/generated/ClassValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ClassValue(); -ClassValue(const ClassValue&); -ClassValue(const TQCString&); -ClassValue & operator = (ClassValue&); -ClassValue & operator = (const TQCString&); -bool operator ==(ClassValue&); -bool operator !=(ClassValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ClassValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ClassValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ClassValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ContentLine-generated.h b/kabc/vcard/include/generated/ContentLine-generated.h deleted file mode 100644 index ad2ac7649..000000000 --- a/kabc/vcard/include/generated/ContentLine-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ContentLine(); -ContentLine(const ContentLine&); -ContentLine(const TQCString&); -ContentLine & operator = (ContentLine&); -ContentLine & operator = (const TQCString&); -bool operator ==(ContentLine&); -bool operator !=(ContentLine& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ContentLine a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ContentLine(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ContentLine"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/DateParam-generated.h b/kabc/vcard/include/generated/DateParam-generated.h deleted file mode 100644 index 75e7ad72d..000000000 --- a/kabc/vcard/include/generated/DateParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -DateParam(); -DateParam(const DateParam&); -DateParam(const TQCString&); -DateParam & operator = (DateParam&); -DateParam & operator = (const TQCString&); -bool operator ==(DateParam&); -bool operator !=(DateParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {DateParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~DateParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "DateParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/DateValue-generated.h b/kabc/vcard/include/generated/DateValue-generated.h deleted file mode 100644 index cf0eb40d8..000000000 --- a/kabc/vcard/include/generated/DateValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -DateValue(); -DateValue(const DateValue&); -DateValue(const TQCString&); -DateValue & operator = (DateValue&); -DateValue & operator = (const TQCString&); -bool operator ==(DateValue&); -bool operator !=(DateValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {DateValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~DateValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "DateValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/EmailParam-generated.h b/kabc/vcard/include/generated/EmailParam-generated.h deleted file mode 100644 index 46ae1f80f..000000000 --- a/kabc/vcard/include/generated/EmailParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -EmailParam(); -EmailParam(const EmailParam&); -EmailParam(const TQCString&); -EmailParam & operator = (EmailParam&); -EmailParam & operator = (const TQCString&); -bool operator ==(EmailParam&); -bool operator !=(EmailParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {EmailParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~EmailParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "EmailParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/FloatValue-generated.h b/kabc/vcard/include/generated/FloatValue-generated.h deleted file mode 100644 index 155f52ae1..000000000 --- a/kabc/vcard/include/generated/FloatValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -FloatValue(); -FloatValue(const FloatValue&); -FloatValue(const TQCString&); -FloatValue & operator = (FloatValue&); -FloatValue & operator = (const TQCString&); -bool operator ==(FloatValue&); -bool operator !=(FloatValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {FloatValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~FloatValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "FloatValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/GeoValue-generated.h b/kabc/vcard/include/generated/GeoValue-generated.h deleted file mode 100644 index b525e8c21..000000000 --- a/kabc/vcard/include/generated/GeoValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -GeoValue(); -GeoValue(const GeoValue&); -GeoValue(const TQCString&); -GeoValue & operator = (GeoValue&); -GeoValue & operator = (const TQCString&); -bool operator ==(GeoValue&); -bool operator !=(GeoValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {GeoValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~GeoValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "GeoValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Group-generated.h b/kabc/vcard/include/generated/Group-generated.h deleted file mode 100644 index 38e1c2a3a..000000000 --- a/kabc/vcard/include/generated/Group-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -Group(); -Group(const Group&); -Group(const TQCString&); -Group & operator = (Group&); -Group & operator = (const TQCString&); -bool operator ==(Group&); -bool operator !=(Group& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {Group a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~Group(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "Group"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImageParam-generated.h b/kabc/vcard/include/generated/ImageParam-generated.h deleted file mode 100644 index 78a5a97cf..000000000 --- a/kabc/vcard/include/generated/ImageParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImageParam(); -ImageParam(const ImageParam&); -ImageParam(const TQCString&); -ImageParam & operator = (ImageParam&); -ImageParam & operator = (const TQCString&); -bool operator ==(ImageParam&); -bool operator !=(ImageParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImageParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImageParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ImageParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImageValue-generated.h b/kabc/vcard/include/generated/ImageValue-generated.h deleted file mode 100644 index 882081fbc..000000000 --- a/kabc/vcard/include/generated/ImageValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImageValue(); -ImageValue(const ImageValue&); -ImageValue(const TQCString&); -ImageValue & operator = (ImageValue&); -ImageValue & operator = (const TQCString&); -bool operator ==(ImageValue&); -bool operator !=(ImageValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImageValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImageValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "ImageValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImgParam-generated.h b/kabc/vcard/include/generated/ImgParam-generated.h deleted file mode 100644 index 04132c857..000000000 --- a/kabc/vcard/include/generated/ImgParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImgParam(); -ImgParam(const ImgParam&); -ImgParam(const TQCString&); -ImgParam & operator = (ImgParam&); -ImgParam & operator = (const TQCString&); -bool operator ==(ImgParam&); -bool operator !=(ImgParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImgParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImgParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -virtual const char * className() const { return "ImgParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ImgValue-generated.h b/kabc/vcard/include/generated/ImgValue-generated.h deleted file mode 100644 index 0774de9bf..000000000 --- a/kabc/vcard/include/generated/ImgValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -ImgValue(); -ImgValue(const ImgValue&); -ImgValue(const TQCString&); -ImgValue & operator = (ImgValue&); -ImgValue & operator = (const TQCString&); -bool operator ==(ImgValue&); -bool operator !=(ImgValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {ImgValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~ImgValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -virtual const char * className() const { return "ImgValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/LangValue-generated.h b/kabc/vcard/include/generated/LangValue-generated.h deleted file mode 100644 index c4930c59e..000000000 --- a/kabc/vcard/include/generated/LangValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -LangValue(); -LangValue(const LangValue&); -LangValue(const TQCString&); -LangValue & operator = (LangValue&); -LangValue & operator = (const TQCString&); -bool operator ==(LangValue&); -bool operator !=(LangValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {LangValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~LangValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "LangValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/NValue-generated.h b/kabc/vcard/include/generated/NValue-generated.h deleted file mode 100644 index d78715ec0..000000000 --- a/kabc/vcard/include/generated/NValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -NValue(); -NValue(const NValue&); -NValue(const TQCString&); -NValue & operator = (NValue&); -NValue & operator = (const TQCString&); -bool operator ==(NValue&); -bool operator !=(NValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {NValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~NValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "NValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Name-generated.h b/kabc/vcard/include/generated/Name-generated.h deleted file mode 100644 index 17d56e680..000000000 --- a/kabc/vcard/include/generated/Name-generated.h +++ /dev/null @@ -1,22 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -V_Name(); -V_Name(const V_Name&); -V_Name(const TQCString&); -V_Name & operator = (V_Name&); -V_Name & operator = (const TQCString&); -bool operator ==(V_Name&); -bool operator !=(V_Name& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {V_Name a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~V_Name(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/OrgValue-generated.h b/kabc/vcard/include/generated/OrgValue-generated.h deleted file mode 100644 index 661ecf5a3..000000000 --- a/kabc/vcard/include/generated/OrgValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -OrgValue(); -OrgValue(const OrgValue&); -OrgValue(const TQCString&); -OrgValue & operator = (OrgValue&); -OrgValue & operator = (const TQCString&); -bool operator ==(OrgValue&); -bool operator !=(OrgValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {OrgValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~OrgValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "OrgValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Param-generated.h b/kabc/vcard/include/generated/Param-generated.h deleted file mode 100644 index bf63e7166..000000000 --- a/kabc/vcard/include/generated/Param-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -Param(); -Param(const Param&); -Param(const TQCString&); -Param & operator = (Param&); -Param & operator = (const TQCString&); -bool operator ==(Param&); -bool operator !=(Param& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {Param a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~Param(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "Param"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ParamName-generated.h b/kabc/vcard/include/generated/ParamName-generated.h deleted file mode 100644 index 60b1e12d5..000000000 --- a/kabc/vcard/include/generated/ParamName-generated.h +++ /dev/null @@ -1,22 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -V_ParamName(); -V_ParamName(const V_ParamName&); -V_ParamName(const TQCString&); -V_ParamName & operator = (V_ParamName&); -V_ParamName & operator = (const TQCString&); -bool operator ==(V_ParamName&); -bool operator !=(V_ParamName& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {V_ParamName a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~V_ParamName(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/ParamValue-generated.h b/kabc/vcard/include/generated/ParamValue-generated.h deleted file mode 100644 index f31a166c6..000000000 --- a/kabc/vcard/include/generated/ParamValue-generated.h +++ /dev/null @@ -1,22 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -V_ParamValue(); -V_ParamValue(const V_ParamValue&); -V_ParamValue(const TQCString&); -V_ParamValue & operator = (V_ParamValue&); -V_ParamValue & operator = (const TQCString&); -bool operator ==(V_ParamValue&); -bool operator !=(V_ParamValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {V_ParamValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~V_ParamValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/PhoneNumberValue-generated.h b/kabc/vcard/include/generated/PhoneNumberValue-generated.h deleted file mode 100644 index f0eb6b4f4..000000000 --- a/kabc/vcard/include/generated/PhoneNumberValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -PhoneNumberValue(); -PhoneNumberValue(const PhoneNumberValue&); -PhoneNumberValue(const TQCString&); -PhoneNumberValue & operator = (PhoneNumberValue&); -PhoneNumberValue & operator = (const TQCString&); -bool operator ==(PhoneNumberValue&); -bool operator !=(PhoneNumberValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {PhoneNumberValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~PhoneNumberValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "PhoneNumberValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/SoundValue-generated.h b/kabc/vcard/include/generated/SoundValue-generated.h deleted file mode 100644 index 64081be0b..000000000 --- a/kabc/vcard/include/generated/SoundValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -SoundValue(); -SoundValue(const SoundValue&); -SoundValue(const TQCString&); -SoundValue & operator = (SoundValue&); -SoundValue & operator = (const TQCString&); -bool operator ==(SoundValue&); -bool operator !=(SoundValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {SoundValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~SoundValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "SoundValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/SourceParam-generated.h b/kabc/vcard/include/generated/SourceParam-generated.h deleted file mode 100644 index e3b13bca1..000000000 --- a/kabc/vcard/include/generated/SourceParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -SourceParam(); -SourceParam(const SourceParam&); -SourceParam(const TQCString&); -SourceParam & operator = (SourceParam&); -SourceParam & operator = (const TQCString&); -bool operator ==(SourceParam&); -bool operator !=(SourceParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {SourceParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~SourceParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "SourceParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TelParam-generated.h b/kabc/vcard/include/generated/TelParam-generated.h deleted file mode 100644 index 9f8f24270..000000000 --- a/kabc/vcard/include/generated/TelParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TelParam(); -TelParam(const TelParam&); -TelParam(const TQCString&); -TelParam & operator = (TelParam&); -TelParam & operator = (const TQCString&); -bool operator ==(TelParam&); -bool operator !=(TelParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TelParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TelParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TelParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TelValue-generated.h b/kabc/vcard/include/generated/TelValue-generated.h deleted file mode 100644 index 600da7727..000000000 --- a/kabc/vcard/include/generated/TelValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TelValue(); -TelValue(const TelValue&); -TelValue(const TQCString&); -TelValue & operator = (TelValue&); -TelValue & operator = (const TQCString&); -bool operator ==(TelValue&); -bool operator !=(TelValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TelValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TelValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TelValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextBinParam-generated.h b/kabc/vcard/include/generated/TextBinParam-generated.h deleted file mode 100644 index 37dc56e55..000000000 --- a/kabc/vcard/include/generated/TextBinParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextBinParam(); -TextBinParam(const TextBinParam&); -TextBinParam(const TQCString&); -TextBinParam & operator = (TextBinParam&); -TextBinParam & operator = (const TQCString&); -bool operator ==(TextBinParam&); -bool operator !=(TextBinParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextBinParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextBinParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextBinParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextBinValue-generated.h b/kabc/vcard/include/generated/TextBinValue-generated.h deleted file mode 100644 index 4c9580421..000000000 --- a/kabc/vcard/include/generated/TextBinValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextBinValue(); -TextBinValue(const TextBinValue&); -TextBinValue(const TQCString&); -TextBinValue & operator = (TextBinValue&); -TextBinValue & operator = (const TQCString&); -bool operator ==(TextBinValue&); -bool operator !=(TextBinValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextBinValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextBinValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextBinValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextListValue-generated.h b/kabc/vcard/include/generated/TextListValue-generated.h deleted file mode 100644 index 8babb0d9f..000000000 --- a/kabc/vcard/include/generated/TextListValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextListValue(); -TextListValue(const TextListValue&); -TextListValue(const TQCString&); -TextListValue & operator = (TextListValue&); -TextListValue & operator = (const TQCString&); -bool operator ==(TextListValue&); -bool operator !=(TextListValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextListValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextListValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextListValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextNSParam-generated.h b/kabc/vcard/include/generated/TextNSParam-generated.h deleted file mode 100644 index bd8e74b07..000000000 --- a/kabc/vcard/include/generated/TextNSParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextNSParam(); -TextNSParam(const TextNSParam&); -TextNSParam(const TQCString&); -TextNSParam & operator = (TextNSParam&); -TextNSParam & operator = (const TQCString&); -bool operator ==(TextNSParam&); -bool operator !=(TextNSParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextNSParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextNSParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextNSParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextParam-generated.h b/kabc/vcard/include/generated/TextParam-generated.h deleted file mode 100644 index 54ae611a5..000000000 --- a/kabc/vcard/include/generated/TextParam-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextParam(); -TextParam(const TextParam&); -TextParam(const TQCString&); -TextParam & operator = (TextParam&); -TextParam & operator = (const TQCString&); -bool operator ==(TextParam&); -bool operator !=(TextParam& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextParam a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextParam(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextParam"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/TextValue-generated.h b/kabc/vcard/include/generated/TextValue-generated.h deleted file mode 100644 index 5b56b54a7..000000000 --- a/kabc/vcard/include/generated/TextValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -TextValue(); -TextValue(const TextValue&); -TextValue(const TQCString&); -TextValue & operator = (TextValue&); -TextValue & operator = (const TQCString&); -bool operator ==(TextValue&); -bool operator !=(TextValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {TextValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~TextValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "TextValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/URIValue-generated.h b/kabc/vcard/include/generated/URIValue-generated.h deleted file mode 100644 index 5a691e6d6..000000000 --- a/kabc/vcard/include/generated/URIValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -URIValue(); -URIValue(const URIValue&); -URIValue(const TQCString&); -URIValue & operator = (URIValue&); -URIValue & operator = (const TQCString&); -bool operator ==(URIValue&); -bool operator !=(URIValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {URIValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~URIValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "URIValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/UTCValue-generated.h b/kabc/vcard/include/generated/UTCValue-generated.h deleted file mode 100644 index 0c6edfb46..000000000 --- a/kabc/vcard/include/generated/UTCValue-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -UTCValue(); -UTCValue(const UTCValue&); -UTCValue(const TQCString&); -UTCValue & operator = (UTCValue&); -UTCValue & operator = (const TQCString&); -bool operator ==(UTCValue&); -bool operator !=(UTCValue& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {UTCValue a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~UTCValue(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "UTCValue"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/VCard-generated.h b/kabc/vcard/include/generated/VCard-generated.h deleted file mode 100644 index 4f36d11da..000000000 --- a/kabc/vcard/include/generated/VCard-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -VCard(); -VCard(const VCard&); -VCard(const TQCString&); -VCard & operator = (VCard&); -VCard & operator = (const TQCString&); -bool operator ==(VCard&); -bool operator !=(VCard& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {VCard a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~VCard(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "VCard"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/VCardEntity-generated.h b/kabc/vcard/include/generated/VCardEntity-generated.h deleted file mode 100644 index 4e973e62a..000000000 --- a/kabc/vcard/include/generated/VCardEntity-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -VCardEntity(); -VCardEntity(const VCardEntity&); -VCardEntity(const TQCString&); -VCardEntity & operator = (VCardEntity&); -VCardEntity & operator = (const TQCString&); -bool operator ==(VCardEntity&); -bool operator !=(VCardEntity& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {VCardEntity a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~VCardEntity(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "VCardEntity"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/Value-generated.h b/kabc/vcard/include/generated/Value-generated.h deleted file mode 100644 index 935d137b6..000000000 --- a/kabc/vcard/include/generated/Value-generated.h +++ /dev/null @@ -1,23 +0,0 @@ -// XXX Automatically generated. DO NOT EDIT! XXX // - -public: -Value(); -Value(const Value&); -Value(const TQCString&); -Value & operator = (Value&); -Value & operator = (const TQCString&); -bool operator ==(Value&); -bool operator !=(Value& x) {return !(*this==x);} -bool operator ==(const TQCString& s) {Value a(s);return(*this==a);} -bool operator != (const TQCString& s) {return !(*this == s);} - -virtual ~Value(); -void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} - -void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} - -void _parse(); -void _assemble(); -const char * className() const { return "Value"; } - -// End of automatically generated code // diff --git a/kabc/vcard/include/generated/generate b/kabc/vcard/include/generated/generate deleted file mode 100755 index 926dbf136..000000000 --- a/kabc/vcard/include/generated/generate +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cat headerBodies | awk -f generateHeaders.awk diff --git a/kabc/vcard/include/generated/generateHeaders.awk b/kabc/vcard/include/generated/generateHeaders.awk deleted file mode 100755 index 471db11b4..000000000 --- a/kabc/vcard/include/generated/generateHeaders.awk +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/awk -f - -{ - outfile = $1 "-generated.h" - name = $1 - - OFS="" - - print "// XXX Automatically generated. DO NOT EDIT! XXX //\n" > outfile - print "// WARNING! All changes made in this file will be lost!\n" > outfile - - if ($2 == "v") { pre = "virtual " } else { pre = "" } - - print "public:" >> outfile - print name "();" >> outfile - print name "(const " name "&);" >> outfile - print name "(const QCString&);" >> outfile - print pre name " & operator = (" name "&);" >> outfile - print pre name " & operator = (const QCString&);" >> outfile - print pre "bool operator ==(" name "&);" >> outfile - print pre "bool operator !=(" name "& x) {return !(*this==x);}" \ - >> outfile - print pre "bool operator ==(const QCString& s) {" name " a(s);" \ - "return(*this==a);} " >> outfile - print pre "bool operator != (const QCString& s) {return !(*this == s);}\n" \ - >> outfile - print "virtual ~" name "();" >> outfile - print pre "void parse() " \ - "{if(!parsed_) _parse();parsed_=true;assembled_=false;}\n" \ - >> outfile - print pre "void assemble() " \ - "{if(assembled_) return;parse();_assemble();assembled_=true;}\n" \ - >> outfile - print pre "void _parse();" >> outfile - print pre "void _assemble();" >> outfile - print pre "const char * className() const { return \"" name "\"; }" \ - >> outfile - - print "\n// End of automatically generated code //" >> outfile -} - diff --git a/kabc/vcard/include/generated/headerBodies b/kabc/vcard/include/generated/headerBodies deleted file mode 100644 index 5e77b2b5e..000000000 --- a/kabc/vcard/include/generated/headerBodies +++ /dev/null @@ -1,34 +0,0 @@ -AdrParam Param -AdrValue Value -AgentParam Param -ContentLine Entity -DateParam Param -DateValue Value -EmailParam Param -GeoValue Value -Group Entity -ImageParam Param -ImageValue Value -LangValue Value -NValue Value -Param Entity -PhoneNumberValue Value -SourceParam Param -TelParam Param -TextParam Param -TextNSParam Param -TextValue Value -TextBinParam Param -URIValue Value -VCard Entity -VCardEntity Entity -Value Entity -SoundValue Value -AgentValue Value -TelValue Value -TextBinValue Value -OrgValue Value -UTCValue Value -ClassValue Value -FloatValue Value -TextListValue Value diff --git a/kabc/vcard/testread.cpp b/kabc/vcard/testread.cpp deleted file mode 100644 index 3a33c7d54..000000000 --- a/kabc/vcard/testread.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include -#include -#include - -#include -#include - -#include - -using namespace std; - -int main(int argc, char * argv[]) -{ - if (argc != 2) { - cerr << "Usage: " << argv[0] << " " << endl; - exit(1); - } - - TQFile f(argv[1]); - - TQCString str; - - if (!f.open(IO_ReadOnly)) { - cerr << "Couldn't open file \"" << argv[1] << endl; - exit(1); - } - - TQTextStream t(&f); - - while (!t.eof()) - str += t.readLine().utf8() + '\n'; - - using namespace VCARD; - - // Iterate through all vCards in the file. - - cout << "--------- begin ----------" << endl; - cout << str.data(); - cout << "--------- end ----------" << endl; - - VCardEntity e(str); - - VCardListIterator it(e.cardList()); - - for (; it.current(); ++it) { - - cerr << "****************** VCARD ********************" << endl; - - // Create a vcard using the string representation. - VCard & v (*it.current()); - - if (v.has(EntityEmail)) { - cerr << "Email parameter found" << endl; - - TQCString s = v.contentLine(EntityEmail)->value()->asString(); - - cerr << "Email value == " << s << endl; - } - - if (v.has(EntityNickname)) { - cerr << "Nickname parameter found" << endl; - - cerr << "Nickname value == " << - v.contentLine(EntityNickname)->value()->asString() << - endl; - } - - if (v.has(EntityRevision)) { - - cerr << "Revision parameter found" << endl; - - DateValue * d = - (DateValue *) - v.contentLine(EntityRevision)->value(); - - assert(d != 0); - - cerr << "Revision date: " << endl; - cerr << "Day : " << d->day() << endl; - cerr << "Month : " << d->month() << endl; - cerr << "Year : " << d->year() << endl; - - if (d->hasTime()) { - cerr << "Revision date has a time component" << endl; - cerr << "Revision time: " << endl; - cerr << "Hour : " << d->hour() << endl; - cerr << "Minute : " << d->minute() << endl; - cerr << "Second : " << d->second() << endl; - - } - else cerr << "Revision date does NOT have a time component" << endl; - } - - if (v.has(EntityURL)) { - cerr << "URL Parameter found" << endl; - - cerr << "URL Value == " << - v.contentLine(EntityURL)->value()->asString() << - endl; - - URIValue * urlVal = - (URIValue *)v.contentLine(EntityURL)->value(); - - assert(urlVal != 0); - - cerr << "URL scheme == " << - urlVal->scheme() << endl; - - cerr << "URL scheme specific part == " << - urlVal->schemeSpecificPart() << endl; - } - - if (v.has(EntityN)) { - cerr << "N Parameter found" << endl; - - NValue * n = - (NValue *)(v.contentLine(EntityN)->value()); - - cerr << "Family name == " << n->family() << endl; - cerr << "Given name == " << n->given() << endl; - cerr << "Middle name == " << n->middle() << endl; - cerr << "Prefix == " << n->prefix() << endl; - cerr << "Suffix == " << n->suffix() << endl; - } - - cerr << "***************** END VCARD ******************" << endl; - } -} - diff --git a/kabc/vcard/testwrite.cpp b/kabc/vcard/testwrite.cpp deleted file mode 100644 index 67f8eb20a..000000000 --- a/kabc/vcard/testwrite.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -int main(int argc,char **argv) -{ - TDEAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1"); - TDECmdLineArgs::init(argc,argv,&aboutData); - - TDEApplication app; - - kdDebug() << "Test Write VCard" << endl; - - using namespace VCARD; - - VCard v; - - ContentLine cl1; - cl1.setName(EntityTypeToParamName(EntityName)); - cl1.setValue(new TextValue("Hans Wurst")); - v.add(cl1); - - ContentLine cl2; - cl2.setName(EntityTypeToParamName(EntityTelephone)); - cl2.setValue(new TelValue("12345")); - ParamList p; - p.append( new TelParam("home") ); - p.append( new TelParam("fax") ); - cl2.setParamList( p ); - v.add(cl2); - - TQCString str = v.asString(); - - kdDebug() << "--- VCard begin ---" << endl - << str - << "--- VCard end ---" << endl; -} diff --git a/kabc/vcard/vCard-all.cpp b/kabc/vcard/vCard-all.cpp deleted file mode 100644 index 07bbcd2bb..000000000 --- a/kabc/vcard/vCard-all.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "AdrParam.cpp" -#include "AdrValue.cpp" -#include "AgentParam.cpp" -#include "AgentValue.cpp" -#include "ClassValue.cpp" -#include "ContentLine.cpp" -#include "DateParam.cpp" -#include "DateValue.cpp" -#include "EmailParam.cpp" -#include "Entity.cpp" -#include "Enum.cpp" -#include "FloatValue.cpp" -#include "GeoValue.cpp" -#include "ImageParam.cpp" -#include "ImageValue.cpp" -#include "ImgValue.cpp" -#include "LangValue.cpp" -#include "NValue.cpp" -#include "OrgValue.cpp" -#include "Param.cpp" -#include "PhoneNumberValue.cpp" -#include "RToken.cpp" -#include "SoundValue.cpp" -#include "SourceParam.cpp" -#include "TelParam.cpp" -#include "TelValue.cpp" -#include "TextBinParam.cpp" -#include "TextBinValue.cpp" -#include "TextListValue.cpp" -#include "TextParam.cpp" -#include "TextValue.cpp" -#include "URIValue.cpp" -#include "UTCValue.cpp" -#include "VCard.cpp" -#include "VCardEntity.cpp" -#include "Value.cpp" - diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp deleted file mode 100644 index 8a3bfcaea..000000000 --- a/kabc/vcard21parser.cpp +++ /dev/null @@ -1,608 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Mark Westcott - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "vcard21parser.h" -#include "vcardconverter.h" - -using namespace KABC; - -bool VCardLineX::isValid() const -{ - // Invalid: if it is "begin:vcard" or "end:vcard" - if ( name == VCARD_BEGIN_N || name == VCARD_END_N ) - return false; - - if ( name[0] == 'x' && name[1] == '-' ) // A custom x- line - return true; - - // This is long but it makes it a bit faster (and saves me from using - // a tree which is probably the ideal situation, but a bit memory heavy) - switch( name[0] ) { - case 'a': - if ( name == VCARD_ADR && qualified && - (qualifiers.contains(VCARD_ADR_DOM) || - qualifiers.contains(VCARD_ADR_INTL) || - qualifiers.contains(VCARD_ADR_POSTAL) || - qualifiers.contains(VCARD_ADR_HOME) || - qualifiers.contains(VCARD_ADR_WORK) || - qualifiers.contains(VCARD_ADR_PREF) - ) ) - return true; - - if ( name == VCARD_AGENT ) - return true; - break; - - case 'b': - if ( name == VCARD_BDAY ) - return true; - break; - - case 'c': - if ( name == VCARD_CATEGORIES ) - return true; - if ( name == VCARD_CLASS && qualified && - (qualifiers.contains(VCARD_CLASS_PUBLIC) || - qualifiers.contains(VCARD_CLASS_PRIVATE) || - qualifiers.contains(VCARD_CLASS_CONFIDENTIAL) - ) ) - return true; - break; - - case 'e': - if ( name == VCARD_EMAIL && qualified && - (qualifiers.contains(VCARD_EMAIL_INTERNET) || - qualifiers.contains(VCARD_EMAIL_PREF) || - qualifiers.contains(VCARD_EMAIL_X400) - ) ) - return true; - break; - - case 'f': - if ( name == VCARD_FN ) - return true; - break; - - case 'g': - if ( name == VCARD_GEO ) - return true; - break; - - case 'k': - if ( name == VCARD_KEY && qualified && - (qualifiers.contains(VCARD_KEY_X509) || - qualifiers.contains(VCARD_KEY_PGP) - ) ) - return true; - break; - - case 'l': - if ( name == VCARD_LABEL ) - return true; - if ( name == VCARD_LOGO ) - return true; - break; - - case 'm': - if ( name == VCARD_MAILER ) - return true; - break; - - case 'n': - if ( name == VCARD_N ) - return true; - if ( name == VCARD_NAME ) - return true; - if ( name == VCARD_NICKNAME ) - return true; - if ( name == VCARD_NOTE ) - return true; - break; - - case 'o': - if ( name == VCARD_ORG ) - return true; - break; - - case 'p': - if ( name == VCARD_PHOTO ) - return true; - if ( name == VCARD_PROFILE ) - return true; - if ( name == VCARD_PRODID ) - return true; - break; - - case 'r': - if ( name == VCARD_ROLE ) - return true; - if ( name == VCARD_REV ) - return true; - break; - - case 's': - if ( name == VCARD_SOURCE ) - return true; - if ( name == VCARD_SOUND ) - return true; - break; - - case 't': - if ( name == VCARD_TEL && qualified && - (qualifiers.contains(VCARD_TEL_HOME) || - qualifiers.contains(VCARD_TEL_WORK) || - qualifiers.contains(VCARD_TEL_PREF) || - qualifiers.contains(VCARD_TEL_VOICE) || - qualifiers.contains(VCARD_TEL_FAX) || - qualifiers.contains(VCARD_TEL_MSG) || - qualifiers.contains(VCARD_TEL_CELL) || - qualifiers.contains(VCARD_TEL_PAGER) || - qualifiers.contains(VCARD_TEL_BBS) || - qualifiers.contains(VCARD_TEL_MODEM) || - qualifiers.contains(VCARD_TEL_CAR) || - qualifiers.contains(VCARD_TEL_ISDN) || - qualifiers.contains(VCARD_TEL_VIDEO) || - qualifiers.contains(VCARD_TEL_PCS) - ) ) - return true; - if ( name == VCARD_TZ ) - return true; - if ( name == VCARD_TITLE ) - return true; - break; - - case 'u': - if ( name == VCARD_URL ) - return true; - if ( name == VCARD_UID ) - return true; - break; - - case 'v': - if ( name == VCARD_VERSION ) - return true; - break; - default: - break; - } - - return false; -} - - -VCard21Parser::VCard21Parser() -{ -} - -VCard21Parser::~VCard21Parser() -{ -} - -void VCard21Parser::readFromString(KABC::AddressBook *addressbook, const TQString &data) -{ - KABC::Addressee mAddressee = readFromString(data); - addressbook->insertAddressee(mAddressee); -} - -KABC::Addressee VCard21Parser::readFromString( const TQString &data) -{ - KABC::Addressee addressee; - VCard21ParserImpl *vCard = VCard21ParserImpl::parseVCard(data); - TQString tmpStr; - - // Check if parsing failed - if (vCard == 0) - { - kdDebug() << "Parsing failed" << endl; - return addressee; - } - //set the addressees name and formated name - TQStringList tmpList = vCard->getValues(VCARD_N); - TQString formattedName = ""; - if (tmpList.count() > 0) - addressee.setFamilyName(tmpList[0]); - if (tmpList.count() > 1) - addressee.setGivenName(tmpList[1]); - if (tmpList.count() > 2) - addressee.setAdditionalName(tmpList[2]); - if (tmpList.count() > 3) - addressee.setPrefix(tmpList[3]); - if (tmpList.count() > 4) - addressee.setSuffix(tmpList[4]); - - tmpStr = (vCard->getValue(VCARD_FN)); - if (!tmpStr.isEmpty()) - addressee.setFormattedName(tmpStr); - - //set the addressee's nick name - tmpStr = vCard->getValue(VCARD_NICKNAME); - addressee.setNickName(tmpStr); - //set the addressee's organization - tmpStr = vCard->getValue(VCARD_ORG); - addressee.setOrganization(tmpStr); - //set the addressee's title - tmpStr = vCard->getValue(VCARD_TITLE); - addressee.setTitle(tmpStr); - //set the addressee's email - we can only deal with two. The preferenced one and one other. - tmpStr = vCard->getValue(VCARD_EMAIL, VCARD_EMAIL_INTERNET); - addressee.insertEmail(tmpStr, false); - tmpStr = vCard->getValue(VCARD_EMAIL,VCARD_EMAIL_PREF); - addressee.insertEmail(tmpStr, true); - //set the addressee's url - tmpStr = vCard->getValue(VCARD_URL); - if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_WORK); - if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_HOME); - if (!tmpStr.isEmpty()) { - addressee.setUrl(KURL(tmpStr)); - } - - //set the addressee's birthday - tmpStr = vCard->getValue(VCARD_BDAY); - addressee.setBirthday(VCardStringToDate(tmpStr)); - - //set the addressee's phone numbers - for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { - if ( (*i).name == VCARD_TEL ) { - int type = 0; - if ( (*i).qualified ) { - if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) - type |= PhoneNumber::Home; - if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) - type |= PhoneNumber::Work; - if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) - type |= PhoneNumber::Pref; - // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) - // type |= PhoneNumber::Voice; - if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) - type |= PhoneNumber::Fax; - if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) - type |= PhoneNumber::Msg; - if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) - type |= PhoneNumber::Cell; - if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) - type |= PhoneNumber::Pager; - if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) - type |= PhoneNumber::Bbs; - if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) - type |= PhoneNumber::Modem; - if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) - type |= PhoneNumber::Car; - if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) - type |= PhoneNumber::Isdn; - if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) - type |= PhoneNumber::Video; - if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) - type |= PhoneNumber::Pcs; - } - addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); - } - } - - //set the addressee's addresses - for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { - if ( (*i).name == VCARD_ADR ) { - int type = 0; - if ( (*i).qualified ) { - if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) - type |= Address::Dom; - if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) - type |= Address::Intl; - if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) - type |= Address::Postal; - if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) - type |= Address::Parcel; - if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) - type |= Address::Home; - if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) - type |= Address::Work; - if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) - type |= Address::Pref; - } - addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); - } - } - - //set the addressee's delivery label - tmpStr = vCard->getValue(VCARD_LABEL); - if (!tmpStr.isEmpty()) { - tmpStr.replace("\r\n","\n"); - Address tmpAddress; - tmpAddress.setLabel(tmpStr); - addressee.insertAddress(tmpAddress); - } - - //set the addressee's notes - tmpStr = vCard->getValue(VCARD_NOTE); - tmpStr.replace("\r\n","\n"); - addressee.setNote(tmpStr); - - //set the addressee's timezone - tmpStr = vCard->getValue(VCARD_TZ); - TimeZone tmpZone(tmpStr.toInt()); - addressee.setTimeZone(tmpZone); - - //set the addressee's geographical position - tmpList = vCard->getValues(VCARD_GEO); - if (tmpList.count()==2) - { - tmpStr = tmpList[0]; - float glat = tmpStr.toFloat(); - tmpStr = tmpList[1]; - float glong = tmpStr.toFloat(); - Geo tmpGeo(glat,glong); - addressee.setGeo(tmpGeo); - } - - //set the last revision date - tmpStr = vCard->getValue(VCARD_REV); - addressee.setRevision(VCardStringToDate(tmpStr)); - - //set the role of the addressee - tmpStr = vCard->getValue(VCARD_ROLE); - addressee.setRole(tmpStr); - - delete vCard; - - return addressee; -} - - - -KABC::Address VCard21Parser::readAddressFromQStringList ( const TQStringList &data, const int type ) -{ - KABC::Address mAddress; - mAddress.setType( type ); - - if ( data.count() > 0 ) - mAddress.setPostOfficeBox( data[0] ); - if ( data.count() > 1 ) - mAddress.setExtended( data[1] ); - if ( data.count() > 2 ) - mAddress.setStreet( data[2] ); - if ( data.count() > 3 ) - mAddress.setLocality( data[3] ); - if ( data.count() > 4 ) - mAddress.setRegion( data[4] ); - if ( data.count() > 5 ) - mAddress.setPostalCode( data[5] ); - if ( data.count() > 6 ) - mAddress.setCountry( data[6] ); - - return mAddress; -} - - -VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err ) -{ - int _err = 0; - int _state = VC_STATE_BEGIN; - - TQValueList *vcdata; - TQValueList lines; - - vcdata = new TQValueList; - - lines = TQStringList::split( TQRegExp( "[\x0d\x0a]" ), vc ); - - // for each line in the vCard - for ( TQStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) { - VCardLineX _vcl; - - // take spaces off the end - ugly but necessary hack - for ( int g = (*j).length()-1; g > 0 && (*j)[g].isSpace(); --g ) - (*j)[g] = 0; - - // first token: - // verify state, update if necessary - if ( _state & VC_STATE_BEGIN) { - if ( !tqstricmp( (*j).latin1(), VCARD_BEGIN ) ) { - _state = VC_STATE_BODY; - continue; - } else { - _err = VC_ERR_NO_BEGIN; - break; - } - } else if ( _state & VC_STATE_BODY ) { - if ( !tqstricmp( (*j).latin1(), VCARD_END ) ) { - _state |= VC_STATE_END; - break; - } - - // split into two tokens - int colon = (*j).find( ':' ); - if ( colon < 0 ) { - _err = VC_ERR_INVALID_LINE; - break; - } - - TQString key = (*j).left( colon ); - TQString value = (*j).mid( colon + 1 ); - - // check for qualifiers and - // set name, qualified, qualifier(s) - TQStringList keyTokens = TQStringList::split( ';', key ); - bool qp = false, first_pass = true; - bool b64 = false; - - if ( keyTokens.count() > 0 ) { - _vcl.qualified = false; - _vcl.name = keyTokens[ 0 ].lower(); - - for ( TQStringList::Iterator z = keyTokens.begin(); z != keyTokens.end(); ++z ) { - TQString zz = (*z).lower(); - if ( zz == VCARD_QUOTED_PRINTABLE || zz == VCARD_ENCODING_QUOTED_PRINTABLE ) { - qp = true; - } else if ( zz == VCARD_BASE64 ) { - b64 = true; - } else if ( !first_pass ) { - _vcl.qualified = true; - _vcl.qualifiers.append( zz ); - } - first_pass = false; - } - } else { - _err = VC_ERR_INVALID_LINE; - } - - if ( _err != 0 ) - break; - - if ( _vcl.name == VCARD_VERSION ) - _state |= VC_STATE_HAVE_VERSION; - - if ( _vcl.name == VCARD_N || _vcl.name == VCARD_FN ) - _state |= VC_STATE_HAVE_N; - - // second token: - // split into tokens by ; - // add to parameters vector - if ( b64 ) { - if ( value[ value.length() - 1 ] != '=' ) - do { - value += *( ++j ); - } while ( (*j)[ (*j).length() - 1 ] != '=' ); - } else { - if ( qp ) { // join any split lines - while ( value[ value.length() - 1 ] == '=' ) { - value.remove( value.length() - 1, 1 ); - value.append(*( ++j )); - } - } - _vcl.parameters = TQStringList::split( ';', value, true ); - if ( qp ) { // decode the quoted printable - for ( TQStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) - *z = KCodecs::quotedPrintableDecode( TQCString((*z).latin1()) ); - } - } - } else { - _err = VC_ERR_INTERNAL; - break; - } - - // validate VCardLineX - if ( !_vcl.isValid() ) { - _err = VC_ERR_INVALID_LINE; - break; - } - - // add to vector - vcdata->append( _vcl ); - } - - // errors to check at the last minute (exit state related) - if ( _err == 0 ) { - if ( !( _state & VC_STATE_END ) ) // we have to have an end!! - _err = VC_ERR_NO_END; - - if ( !( _state & VC_STATE_HAVE_N ) || // we have to have the mandatories! - !( _state & VC_STATE_HAVE_VERSION ) ) - _err = VC_ERR_MISSING_MANDATORY; - } - - // set the error message if we can, and only return an object - // if the vCard was valid. - if ( err ) - *err = _err; - - if ( _err != 0 ) { - delete vcdata; - return 0; - } - - return new VCard21ParserImpl( vcdata ); -} - -VCard21ParserImpl::VCard21ParserImpl() - : _vcdata( 0 ) -{ -} - -VCard21ParserImpl::VCard21ParserImpl(TQValueList *_vcd) - : _vcdata(_vcd) -{ -} - -VCard21ParserImpl::~VCard21ParserImpl() -{ - delete _vcdata; - _vcdata = 0; -} - -TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& qualifier) -{ - TQString failed; - const TQString lowname = name.lower(); - const TQString lowqualifier = qualifier.lower(); - - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { - if ((*i).parameters.count() > 0) - return (*i).parameters[0]; - else return failed; - } - } - return failed; -} - - -TQString VCard21ParserImpl::getValue(const TQString& name) -{ - TQString failed; - const TQString lowname = name.lower(); - - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && !(*i).qualified) { - if ((*i).parameters.count() > 0) - return (*i).parameters[0]; - else return failed; - } - } - return failed; -} - - -TQStringList VCard21ParserImpl::getValues(const TQString& name) -{ - const TQString lowname = name.lower(); - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && !(*i).qualified) - return (*i).parameters; - } - // failed. - return TQStringList(); -} - -TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& qualifier) -{ - const TQString lowname = name.lower(); - const TQString lowqualifier = qualifier.lower(); - for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) - return (*i).parameters; - } - // failed. - return TQStringList(); -} - - diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h deleted file mode 100644 index 0eb66fa93..000000000 --- a/kabc/vcard21parser.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is part of libkabc. - - Copyright (c) 2002 Mark Westcott - Copyright (c) 2000 George Staikos - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARD21FORMAT_H -#define KABC_VCARD21FORMAT_H - -#include -#include -#include -#include -#include -#include - -#include "addressee.h" -#include "addressbook.h" -#include "phonenumber.h" - - -#define VCARD_BEGIN "begin:vcard" -#define VCARD_END "end:vcard" -#define VCARD_BEGIN_N "begin" -#define VCARD_END_N "end" -#define VCARD_VERSION "version" - -#define VCARD_FN "fn" -#define VCARD_N "n" - -// optional -#define VCARD_NAME "name" -#define VCARD_NICKNAME "nickname" -#define VCARD_PHOTO "photo" -#define VCARD_BDAY "bday" -#define VCARD_ADR "adr" - -// types -#define VCARD_ADR_DOM "dom" -#define VCARD_ADR_INTL "intl" -#define VCARD_ADR_POSTAL "postal" -#define VCARD_ADR_PARCEL "parcel" -#define VCARD_ADR_HOME "home" -#define VCARD_ADR_WORK "work" -#define VCARD_ADR_PREF "pref" -// values -#define VCARD_ADR_POBOX "PO Box" -#define VCARD_ADR_EXTADR "Extended Address" -#define VCARD_ADR_STREET "Street" -#define VCARD_ADR_LOCALITY "Locality" -#define VCARD_ADR_REGION "Region" -#define VCARD_ADR_POSTCODE "Postal Code" -#define VCARD_ADR_COUNTRY "Country Name" -#define VCARD_LABEL "label" -#define VCARD_PROFILE "profile" -#define VCARD_SOURCE "source" -#define VCARD_TEL "tel" -// types -#define VCARD_TEL_HOME "home" -#define VCARD_TEL_WORK "work" -#define VCARD_TEL_PREF "pref" -#define VCARD_TEL_VOICE "voice" -#define VCARD_TEL_FAX "fax" -#define VCARD_TEL_MSG "msg" -#define VCARD_TEL_CELL "cell" -#define VCARD_TEL_PAGER "pager" -#define VCARD_TEL_BBS "bbs" -#define VCARD_TEL_MODEM "modem" -#define VCARD_TEL_CAR "car" -#define VCARD_TEL_ISDN "isdn" -#define VCARD_TEL_VIDEO "video" -#define VCARD_TEL_PCS "pcs" -#define VCARD_EMAIL "email" -// types -#define VCARD_EMAIL_PREF "pref" -#define VCARD_EMAIL_INTERNET "internet" -#define VCARD_EMAIL_X400 "x400" -#define VCARD_TZ "tz" -#define VCARD_GEO "geo" -#define VCARD_MAILER "mailer" -#define VCARD_TITLE "title" -#define VCARD_ROLE "role" -#define VCARD_LOGO "logo" -#define VCARD_AGENT "agent" -#define VCARD_ORG "org" -#define VCARD_CATEGORIES "categories" -#define VCARD_NOTE "note" -#define VCARD_PRODID "prodid" -#define VCARD_REV "rev" -#define VCARD_SOUND "sound" -#define VCARD_UID "uid" -#define VCARD_URL "url" -#define VCARD_CLASS "class" -#define VCARD_CLASS_PUBLIC "public" -#define VCARD_CLASS_PRIVATE "private" -#define VCARD_CLASS_CONFIDENTIAL "confidential" -#define VCARD_KEY "key" -// types -#define VCARD_KEY_X509 "x509" -#define VCARD_KEY_PGP "pgp" - -#define VCARD_QUOTED_PRINTABLE "quoted-printable" -// this one is a temporary hack until we support TYPE=VALUE -#define VCARD_ENCODING_QUOTED_PRINTABLE "encoding=quoted-printable" -#define VCARD_BASE64 "base64" - -#define VC_STATE_BEGIN 1 -#define VC_STATE_BODY 2 -#define VC_STATE_END 4 -#define VC_STATE_HAVE_N 8 -#define VC_STATE_HAVE_VERSION 16 - -#define VC_ERR_NO_BEGIN 1 -#define VC_ERR_NO_END 2 -#define VC_ERR_INVALID_LINE 3 -#define VC_ERR_INTERNAL 4 -#define VC_ERR_INVALID_NAME 5 -#define VC_ERR_MISSING_MANDATORY 6 - -namespace KABC { - -class AddressBook; - -/** - @deprecated use VCardConverter instead. - */ -class KABC_EXPORT_DEPRECATED VCard21Parser -{ -public: - - /** - * Constructor. - */ - VCard21Parser(); - - /** - * Destructor. - */ - virtual ~VCard21Parser(); - - /** - * Parses a string in vcard2.1 format and saves the single addressees - * to the address book. - * - * @param ab The address book. - * @param str The vcard string. - */ - void readFromString( KABC::AddressBook *ab, const TQString &str ); - - /** - * FIXME: we need a writeToString method - * TQString writeToString (KABC::AddressBook *); - */ - - /** - * Parses a string in vcard2.1 format and returns the inherent addressee. - */ - KABC::Addressee readFromString( const TQString &data); - - /** - * Helper method to store a address. - * - * @param data A string list, that is filled with 'street', 'house number' ... - * @param type The type of the returned address. - */ - static KABC::Address readAddressFromQStringList (const TQStringList &data, const int type); -}; - -} - -/** - * @short Helper class - */ -class KABC_EXPORT VCardLineX -{ -public: - TQString name; - bool qualified; - TQValueList qualifiers; - TQValueList parameters; - bool isValid() const; -}; - -/** - * @short Helper class - */ -class KABC_EXPORT VCard21ParserImpl -{ - friend class VCardLineX; - -public: - VCard21ParserImpl(); - virtual ~VCard21ParserImpl(); - static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = NULL); - TQString getValue(const TQString& name, const TQString& qualifier); - TQString getValue(const TQString& name); - TQStringList getValues(const TQString& name, const TQString& qualifier); - TQStringList getValues(const TQString& name); - - TQValueList *_vcdata; - -private: - VCard21ParserImpl (TQValueList *_vcd); -}; - -#endif diff --git a/kabc/vcardconverter.cpp b/kabc/vcardconverter.cpp deleted file mode 100644 index d575b019c..000000000 --- a/kabc/vcardconverter.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcard21parser.h" -#include "vcardformatimpl.h" -#include "vcardtool.h" - -#include "vcardconverter.h" - -using namespace KABC; - -struct VCardConverter::VCardConverterData -{ - VCard21Parser vcard21parser; - VCardFormatImpl vcard30parser; -}; - -VCardConverter::VCardConverter() - : d( new VCardConverterData ) -{ -} - -VCardConverter::~VCardConverter() -{ - delete d; - d = 0; -} - -TQString VCardConverter::createVCard( const Addressee &addr, Version version ) -{ - Addressee::List list; - list.append( addr ); - - return createVCards( list, version ); -} - -TQString VCardConverter::createVCards( Addressee::List list, Version version ) -{ - VCardTool tool; - - return tool.createVCards( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) ); -} - -Addressee VCardConverter::parseVCard( const TQString& vcard ) -{ - Addressee::List list = parseVCards( vcard ); - - return list[ 0 ]; -} - -Addressee::List VCardConverter::parseVCards( const TQString& vcard ) -{ - VCardTool tool; - - return tool.parseVCards( vcard ); -} - -// ---------------------------- deprecated stuff ---------------------------- // - -bool VCardConverter::vCardToAddressee( const TQString &str, Addressee &addr, Version version ) -{ - if ( version == v2_1 ) { - addr = d->vcard21parser.readFromString( str ); - return true; - } - - if ( version == v3_0 ) - return d->vcard30parser.readFromString( str, addr ); - - return false; -} - -bool VCardConverter::addresseeToVCard( const Addressee &addr, TQString &str, Version version ) -{ - if ( version == v2_1 ) - return false; - - if ( version == v3_0 ) - return d->vcard30parser.writeToString( addr, str ); - - return false; -} - - -/* Helper functions */ - -TQString KABC::dateToVCardString( const TQDateTime &dateTime ) -{ - return dateTime.toString("yyyyMMddThhmmssZ"); -} - -TQString KABC::dateToVCardString( const TQDate &date ) -{ - return date.toString("yyyyMMdd"); -} - -TQDateTime KABC::VCardStringToDate( const TQString &dateString ) -{ - TQDate date; - TQTime time; - TQString d( dateString ); - - d = d.remove('-').remove(':'); - - if (d.length()>=8) - date = TQDate( d.mid(0,4).toUInt(), d.mid(4,2).toUInt(), d.mid(6,2).toUInt() ); - if (d.length()>9 && d[8].upper()=='T') - time = TQTime( d.mid(9,2).toUInt(), d.mid(11,2).toUInt(), d.mid(13,2).toUInt() ); - - return TQDateTime( date, time ); -} - diff --git a/kabc/vcardconverter.h b/kabc/vcardconverter.h deleted file mode 100644 index ab09279f2..000000000 --- a/kabc/vcardconverter.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2002 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDCONVERTER_H -#define KABC_VCARDCONVERTER_H - -#include - -#include "addressee.h" - -namespace KABC { - -/** - @short Class to converting contact objects into vCard format and vice versa. - - This class implements reading and writing of contact using from/to the - vCard format. Currently vCard version 2.1 and 3.0 is supported. - - Example: - - \code - - TQFile file( "myfile.vcf" ); - file.open( IO_ReadOnly ); - - TQString data = file.readAll(); - - VCardConverter converter; - Addressee::List list = converter.parseVCards( data ); - - // print formatted name of first contact - tqDebug( "name=%s", list[ 0 ].formattedName().latin1() ); - - \endcode -*/ -class KABC_EXPORT VCardConverter -{ - public: - - /** - @li v2_1 - VCard format version 2.1 - @li v3_0 - VCard format version 3.0 - */ - enum Version - { - v2_1, - v3_0 - }; - - /** - Constructor. - */ - VCardConverter(); - - /** - Destructor. - */ - ~VCardConverter(); - - /** - Creates a string in vCard format which contains the given - contact. - - @param addr The contact object - @param version The version of the generated vCard format - */ - TQString createVCard( const Addressee &addr, Version version = v3_0 ); - - /** - Creates a string in vCard format which contains the given - list of contact. - - @param list The list of contact objects - @param version The version of the generated vCard format - */ - // FIXME: Add error handling - TQString createVCards( Addressee::List list, Version version = v3_0 ); - - // FIXME: Add "createVCards( AddressBook * )" - - /** - Parses a string in vCard format and returns the first contact. - */ - Addressee parseVCard( const TQString& vcard ); - - /** - Parses a string in vCard format and returns a list of contact objects. - */ - // FIXME: Add error handling - Addressee::List parseVCards( const TQString& vcard ); - - // FIXME: Add "bool parseVCards( AddressBook *, const TQString &vcard )" - - /** - @deprecated - */ - bool vCardToAddressee( const TQString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED; - - /** - @deprecated - */ - bool addresseeToVCard( const Addressee&, TQString&, Version version = v3_0 ) KDE_DEPRECATED; - - private: - /** - Split a string and replaces escaped separators on the fly with - unescaped ones. - */ - TQStringList splitString( const TQChar &sep, const TQString &value ); - - struct VCardConverterData; - VCardConverterData *d; -}; - - -/** - Helper functions - */ - -/** - * Converts a TQDateTime to a date string as it is used in VCard and LDIF files. - * The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z") - * @param dateTime date and time to be converted - * @since 3.2 - */ -KABC_EXPORT TQString dateToVCardString( const TQDateTime &dateTime ); - -/** - * Converts a TQDate to a short date string as it is used in VCard and LDIF files. - * The return value is in the form "yyyyMMdd" (e.g. "20031201") - * @param date date to be converted - * @since 3.2 - */ -KABC_EXPORT TQString dateToVCardString( const TQDate &date ); - -/** - * Converts a date string as it is used in VCard and LDIF files to a TQDateTime value. - * If the date string does not contain a time value, it will be returned as 00:00:00. - * (e.g. "20031201T120000" will return a TQDateTime for 2003-12-01 at 12:00) - * @param dateString string representing the date and time. - * @since 3.2 - */ -KABC_EXPORT TQDateTime VCardStringToDate( const TQString &dateString ); - -} -#endif diff --git a/kabc/vcardformat.cpp b/kabc/vcardformat.cpp deleted file mode 100644 index 147aa4259..000000000 --- a/kabc/vcardformat.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcardformatimpl.h" - -#include "vcardformat.h" - -using namespace KABC; - -VCardFormat::VCardFormat() -{ - mImpl = new VCardFormatImpl; -} - -VCardFormat::~VCardFormat() -{ - delete mImpl; -} - -bool VCardFormat::load( AddressBook *addressBook, const TQString &fileName ) -{ - TQFile f( fileName ); - if ( !f.open( IO_ReadOnly ) ) return false; - - bool result = mImpl->loadAll( addressBook, 0, &f ); - - f.close(); - - return result; -} - -bool VCardFormat::save( AddressBook *addressBook, const TQString &fileName ) -{ - TQFile f( fileName ); - if ( !f.open( IO_WriteOnly ) ) return false; - - mImpl->saveAll( addressBook, 0, &f ); - - f.close(); - - return true; -} diff --git a/kabc/vcardformat.h b/kabc/vcardformat.h deleted file mode 100644 index 8194056cb..000000000 --- a/kabc/vcardformat.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KABC_VCARDFORMAT_H -#define KABC_VCARDFORMAT_H - -#include - -#include "format.h" - -namespace KABC { - -class AddressBook; -class VCardFormatImpl; - -/** - @deprecated use VCardFormatPlugin instead. - */ -class KABC_EXPORT_DEPRECATED VCardFormat : public Format { - public: - VCardFormat(); - virtual ~VCardFormat(); - - bool load( AddressBook *, const TQString &fileName ); - bool save( AddressBook *, const TQString &fileName ); - - private: - VCardFormatImpl *mImpl; -}; - -} - -#endif diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp deleted file mode 100644 index ebaf337b0..000000000 --- a/kabc/vcardformatimpl.cpp +++ /dev/null @@ -1,1001 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#include -#include - -#include -#include -#include -#include - -#include - -#include "addressbook.h" -#include "vcardformatimpl.h" - -using namespace KABC; -using namespace VCARD; - -bool VCardFormatImpl::load( Addressee &addressee, TQFile *file ) -{ - kdDebug(5700) << "VCardFormat::load()" << endl; - - TQByteArray fdata = file->readAll(); - TQCString data(fdata.data(), fdata.size()+1); - - VCardEntity e( data ); - - VCardListIterator it( e.cardList() ); - - if ( it.current() ) { - VCARD::VCard v(*it.current()); - loadAddressee( addressee, v ); - return true; - } - - return false; -} - -bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, TQFile *file ) -{ - kdDebug(5700) << "VCardFormat::loadAll()" << endl; - - TQByteArray fdata = file->readAll(); - TQCString data(fdata.data(), fdata.size()+1); - - VCardEntity e( data ); - - VCardListIterator it( e.cardList() ); - - for (; it.current(); ++it) { - VCARD::VCard v(*it.current()); - Addressee addressee; - loadAddressee( addressee, v ); - addressee.setResource( resource ); - addressBook->insertAddressee( addressee ); - } - - return true; -} - -void VCardFormatImpl::save( const Addressee &addressee, TQFile *file ) -{ - VCardEntity vcards; - VCardList vcardlist; - vcardlist.setAutoDelete( true ); - - VCARD::VCard *v = new VCARD::VCard; - - saveAddressee( addressee, v, false ); - - vcardlist.append( v ); - vcards.setCardList( vcardlist ); - - TQCString vcardData = vcards.asString(); - file->writeBlock( (const char*)vcardData, vcardData.length() ); -} - -void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, TQFile *file ) -{ - VCardEntity vcards; - VCardList vcardlist; - vcardlist.setAutoDelete( true ); - - AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { - if ( (*it).resource() == resource ) { - VCARD::VCard *v = new VCARD::VCard; - saveAddressee( (*it), v, false ); - (*it).setChanged( false ); - vcardlist.append( v ); - } - } - - vcards.setCardList( vcardlist ); - - TQCString vcardData = vcards.asString(); - file->writeBlock( (const char*)vcardData, vcardData.length() ); -} - -bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v ) -{ - TQPtrList contentLines = v.contentLineList(); - ContentLine *cl; - - for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - TQCString n = cl->name(); - if ( n.left( 2 ) == "X-" ) { - n = n.mid( 2 ); - int posDash = n.find( "-" ); - addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ), - TQString::fromUtf8( n.mid( posDash + 1 ) ), - TQString::fromUtf8( cl->value()->asString() ) ); - continue; - } - - EntityType type = cl->entityType(); - switch( type ) { - - case EntityUID: - addressee.setUid( readTextValue( cl ) ); - break; - - case EntityURI: - addressee.setUri( readTextValue( cl ) ); - break; - - case EntityEmail: - addressee.insertEmail( readTextValue( cl ) ); - break; - - case EntityName: - addressee.setName( readTextValue( cl ) ); - break; - - case EntityFullName: - addressee.setFormattedName( readTextValue( cl ) ); - break; - - case EntityURL: - addressee.setUrl( KURL( readTextValue( cl ) ) ); - break; - - case EntityNickname: - addressee.setNickName( readTextValue( cl ) ); - break; - - case EntityLabel: - // not yet supported by kabc - break; - - case EntityMailer: - addressee.setMailer( readTextValue( cl ) ); - break; - - case EntityTitle: - addressee.setTitle( readTextValue( cl ) ); - break; - - case EntityRole: - addressee.setRole( readTextValue( cl ) ); - break; - - case EntityOrganisation: - addressee.setOrganization( readTextValue( cl ) ); - break; - - case EntityNote: - addressee.setNote( readTextValue( cl ) ); - break; - - case EntityProductID: - addressee.setProductId( readTextValue( cl ) ); - break; - - case EntitySortString: - addressee.setSortString( readTextValue( cl ) ); - break; - - case EntityN: - readNValue( cl, addressee ); - break; - - case EntityAddress: - addressee.insertAddress( readAddressValue( cl ) ); - break; - - case EntityTelephone: - addressee.insertPhoneNumber( readTelephoneValue( cl ) ); - break; - - case EntityCategories: - addressee.setCategories( TQStringList::split( ",", readTextValue( cl ) ) ); - break; - - case EntityBirthday: - addressee.setBirthday( readDateValue( cl ) ); - break; - - case EntityRevision: - addressee.setRevision( readDateTimeValue( cl ) ); - break; - - case EntityGeo: - addressee.setGeo( readGeoValue( cl ) ); - break; - - case EntityTimeZone: - addressee.setTimeZone( readUTCValue( cl ) ); - break; - - case EntityVersion: - break; - - case EntityClass: - addressee.setSecrecy( readClassValue( cl ) ); - break; - - case EntityKey: - addressee.insertKey( readKeyValue( cl ) ); - break; - - case EntityPhoto: - addressee.setPhoto( readPictureValue( cl, EntityPhoto, addressee ) ); - break; - - case EntityLogo: - addressee.setLogo( readPictureValue( cl, EntityLogo, addressee ) ); - break; - - case EntityAgent: - addressee.setAgent( readAgentValue( cl ) ); - break; - - case EntitySound: - addressee.setSound( readSoundValue( cl, addressee ) ); - break; - - default: - kdDebug(5700) << "VCardFormat::load(): Unsupported entity: " - << int( type ) << ": " << cl->asString() << endl; - break; - } - } - - for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - EntityType type = cl->entityType(); - if ( type == EntityLabel ) { - int type = readAddressParam( cl ); - Address address = addressee.address( type ); - if ( address.isEmpty() ) - address.setType( type ); - - address.setLabel( TQString::fromUtf8( cl->value()->asString() ) ); - addressee.insertAddress( address ); - } - } - - return true; -} - -void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v, bool intern ) -{ - ContentLine cl; - TQString value; - - addTextValue( v, EntityName, addressee.name() ); - addTextValue( v, EntityUID, addressee.uid() ); - addTextValue( v, EntityURI, addressee.uri() ); - addTextValue( v, EntityFullName, addressee.formattedName() ); - - TQStringList emails = addressee.emails(); - TQStringList::ConstIterator it4; - for( it4 = emails.begin(); it4 != emails.end(); ++it4 ) { - addTextValue( v, EntityEmail, *it4 ); - } - - TQStringList customs = addressee.customs(); - TQStringList::ConstIterator it5; - for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { - addCustomValue( v, *it5 ); - } - - addTextValue( v, EntityURL, addressee.url().url() ); - - addNValue( v, addressee ); - - addTextValue( v, EntityNickname, addressee.nickName() ); - addTextValue( v, EntityMailer, addressee.mailer() ); - addTextValue( v, EntityTitle, addressee.title() ); - addTextValue( v, EntityRole, addressee.role() ); - addTextValue( v, EntityOrganisation, addressee.organization() ); - addTextValue( v, EntityNote, addressee.note() ); - addTextValue( v, EntityProductID, addressee.productId() ); - addTextValue( v, EntitySortString, addressee.sortString() ); - - Address::List addresses = addressee.addresses(); - Address::List::ConstIterator it3; - for( it3 = addresses.begin(); it3 != addresses.end(); ++it3 ) { - addAddressValue( v, *it3 ); - addLabelValue( v, *it3 ); - } - - PhoneNumber::List phoneNumbers = addressee.phoneNumbers(); - PhoneNumber::List::ConstIterator it2; - for( it2 = phoneNumbers.begin(); it2 != phoneNumbers.end(); ++it2 ) { - addTelephoneValue( v, *it2 ); - } - - Key::List keys = addressee.keys(); - Key::List::ConstIterator it6; - for( it6 = keys.begin(); it6 != keys.end(); ++it6 ) { - addKeyValue( v, *it6 ); - } - - addTextValue( v, EntityCategories, addressee.categories().join(",") ); - - addDateValue( v, EntityBirthday, TQT_TQDATE_OBJECT(addressee.birthday().date()) ); - addDateTimeValue( v, EntityRevision, TQT_TQDATETIME_OBJECT(addressee.revision()) ); - addGeoValue( v, addressee.geo() ); - addUTCValue( v, addressee.timeZone() ); - - addClassValue( v, addressee.secrecy() ); - - addPictureValue( v, EntityPhoto, addressee.photo(), addressee, intern ); - addPictureValue( v, EntityLogo, addressee.logo(), addressee, intern ); - - addAgentValue( v, addressee.agent() ); - - addSoundValue( v, addressee.sound(), addressee, intern ); -} - -void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt ) -{ - if ( txt.isEmpty() ) return; - - ContentLine cl; - cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() ); - TQString value = txt.mid( txt.find( ":" ) + 1 ); - if ( value.isEmpty() ) - return; - cl.setValue( new TextValue( value.utf8() ) ); - v->add(cl); -} - -void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const TQString &txt ) -{ - if ( txt.isEmpty() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - cl.setValue( new TextValue( txt.utf8() ) ); - v->add(cl); -} - -void VCardFormatImpl::addDateValue( VCARD::VCard *vcard, EntityType type, - const TQDate &date ) -{ - if ( !date.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - - DateValue *v = new DateValue( date ); - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addDateTimeValue( VCARD::VCard *vcard, EntityType type, - const TQDateTime &dateTime ) -{ - if ( !dateTime.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - - DateValue *v = new DateValue( dateTime ); - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addAddressValue( VCARD::VCard *vcard, const Address &a ) -{ - if ( a.isEmpty() ) - return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityAddress ) ); - - AdrValue *v = new AdrValue; - v->setPOBox( a.postOfficeBox().utf8() ); - v->setExtAddress( a.extended().utf8() ); - v->setStreet( a.street().utf8() ); - v->setLocality( a.locality().utf8() ); - v->setRegion( a.region().utf8() ); - v->setPostCode( a.postalCode().utf8() ); - v->setCountryName( a.country().utf8() ); - cl.setValue( v ); - - addAddressParam( &cl, a.type() ); - - vcard->add( cl ); -} - -void VCardFormatImpl::addLabelValue( VCARD::VCard *vcard, const Address &a ) -{ - if ( a.label().isEmpty() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityLabel ) ); - cl.setValue( new TextValue( a.label().utf8() ) ); - - addAddressParam( &cl, a.type() ); - - vcard->add( cl ); -} - -void VCardFormatImpl::addAddressParam( ContentLine *cl, int type ) -{ - ParamList params; - if ( type & Address::Dom ) params.append( new Param( "TYPE", "dom" ) ); - if ( type & Address::Intl ) params.append( new Param( "TYPE", "intl" ) ); - if ( type & Address::Parcel ) params.append( new Param( "TYPE", "parcel" ) ); - if ( type & Address::Postal ) params.append( new Param( "TYPE", "postal" ) ); - if ( type & Address::Work ) params.append( new Param( "TYPE", "work" ) ); - if ( type & Address::Home ) params.append( new Param( "TYPE", "home" ) ); - if ( type & Address::Pref ) params.append( new Param( "TYPE", "pref" ) ); - cl->setParamList( params ); -} - -void VCardFormatImpl::addGeoValue( VCARD::VCard *vcard, const Geo &geo ) -{ - if ( !geo.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityGeo ) ); - - GeoValue *v = new GeoValue; - v->setLatitude( geo.latitude() ); - v->setLongitude( geo.longitude() ); - - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addUTCValue( VCARD::VCard *vcard, const TimeZone &tz ) -{ - if ( !tz.isValid() ) return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityTimeZone ) ); - - UTCValue *v = new UTCValue; - - v->setPositive( tz.offset() >= 0 ); - v->setHour( (tz.offset() / 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); - v->setMinute( (tz.offset() % 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); - - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::addClassValue( VCARD::VCard *vcard, const Secrecy &secrecy ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityClass ) ); - - ClassValue *v = new ClassValue; - switch ( secrecy.type() ) { - case Secrecy::Public: - v->setType( (int)ClassValue::Public ); - break; - case Secrecy::Private: - v->setType( (int)ClassValue::Private ); - break; - case Secrecy::Confidential: - v->setType( (int)ClassValue::Confidential ); - break; - } - - cl.setValue( v ); - vcard->add(cl); -} - - -Address VCardFormatImpl::readAddressValue( ContentLine *cl ) -{ - Address a; - AdrValue *v = (AdrValue *)cl->value(); - a.setPostOfficeBox( TQString::fromUtf8( v->poBox() ) ); - a.setExtended( TQString::fromUtf8( v->extAddress() ) ); - a.setStreet( TQString::fromUtf8( v->street() ) ); - a.setLocality( TQString::fromUtf8( v->locality() ) ); - a.setRegion( TQString::fromUtf8( v->region() ) ); - a.setPostalCode( TQString::fromUtf8( v->postCode() ) ); - a.setCountry( TQString::fromUtf8( v->countryName() ) ); - - a.setType( readAddressParam( cl ) ); - - return a; -} - -int VCardFormatImpl::readAddressParam( ContentLine *cl ) -{ - int type = 0; - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "TYPE" ) { - if ( (*it)->value() == "dom" ) type |= Address::Dom; - else if ( (*it)->value() == "intl" ) type |= Address::Intl; - else if ( (*it)->value() == "parcel" ) type |= Address::Parcel; - else if ( (*it)->value() == "postal" ) type |= Address::Postal; - else if ( (*it)->value() == "work" ) type |= Address::Work; - else if ( (*it)->value() == "home" ) type |= Address::Home; - else if ( (*it)->value() == "pref" ) type |= Address::Pref; - } - } - return type; -} - -void VCardFormatImpl::addNValue( VCARD::VCard *vcard, const Addressee &a ) -{ - ContentLine cl; - cl.setName(EntityTypeToParamName( EntityN ) ); - NValue *v = new NValue; - v->setFamily( TQString(a.familyName()).utf8() ); - v->setGiven( TQString(a.givenName()).utf8() ); - v->setMiddle( TQString(a.additionalName()).utf8() ); - v->setPrefix( TQString(a.prefix()).utf8() ); - v->setSuffix( TQString(a.suffix()).utf8() ); - - cl.setValue( v ); - vcard->add(cl); -} - -void VCardFormatImpl::readNValue( ContentLine *cl, Addressee &a ) -{ - NValue *v = (NValue *)cl->value(); - a.setFamilyName( TQString::fromUtf8( v->family() ) ); - a.setGivenName( TQString::fromUtf8( v->given() ) ); - a.setAdditionalName( TQString::fromUtf8( v->middle() ) ); - a.setPrefix( TQString::fromUtf8( v->prefix() ) ); - a.setSuffix( TQString::fromUtf8( v->suffix() ) ); -} - -void VCardFormatImpl::addTelephoneValue( VCARD::VCard *v, const PhoneNumber &p ) -{ - if ( p.number().isEmpty() ) - return; - - ContentLine cl; - cl.setName(EntityTypeToParamName(EntityTelephone)); - cl.setValue(new TelValue( p.number().utf8() )); - - ParamList params; - if( p.type() & PhoneNumber::Home ) params.append( new Param( "TYPE", "home" ) ); - if( p.type() & PhoneNumber::Work ) params.append( new Param( "TYPE", "work" ) ); - if( p.type() & PhoneNumber::Msg ) params.append( new Param( "TYPE", "msg" ) ); - if( p.type() & PhoneNumber::Pref ) params.append( new Param( "TYPE", "pref" ) ); - if( p.type() & PhoneNumber::Voice ) params.append( new Param( "TYPE", "voice" ) ); - if( p.type() & PhoneNumber::Fax ) params.append( new Param( "TYPE", "fax" ) ); - if( p.type() & PhoneNumber::Cell ) params.append( new Param( "TYPE", "cell" ) ); - if( p.type() & PhoneNumber::Video ) params.append( new Param( "TYPE", "video" ) ); - if( p.type() & PhoneNumber::Bbs ) params.append( new Param( "TYPE", "bbs" ) ); - if( p.type() & PhoneNumber::Modem ) params.append( new Param( "TYPE", "modem" ) ); - if( p.type() & PhoneNumber::Car ) params.append( new Param( "TYPE", "car" ) ); - if( p.type() & PhoneNumber::Isdn ) params.append( new Param( "TYPE", "isdn" ) ); - if( p.type() & PhoneNumber::Pcs ) params.append( new Param( "TYPE", "pcs" ) ); - if( p.type() & PhoneNumber::Pager ) params.append( new Param( "TYPE", "pager" ) ); - cl.setParamList( params ); - - v->add(cl); -} - -PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) -{ - PhoneNumber p; - TelValue *value = (TelValue *)cl->value(); - p.setNumber( TQString::fromUtf8( value->asString() ) ); - - int type = 0; - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "TYPE" ) { - if ( (*it)->value() == "home" ) type |= PhoneNumber::Home; - else if ( (*it)->value() == "work" ) type |= PhoneNumber::Work; - else if ( (*it)->value() == "msg" ) type |= PhoneNumber::Msg; - else if ( (*it)->value() == "pref" ) type |= PhoneNumber::Pref; - else if ( (*it)->value() == "voice" ) type |= PhoneNumber::Voice; - else if ( (*it)->value() == "fax" ) type |= PhoneNumber::Fax; - else if ( (*it)->value() == "cell" ) type |= PhoneNumber::Cell; - else if ( (*it)->value() == "video" ) type |= PhoneNumber::Video; - else if ( (*it)->value() == "bbs" ) type |= PhoneNumber::Bbs; - else if ( (*it)->value() == "modem" ) type |= PhoneNumber::Modem; - else if ( (*it)->value() == "car" ) type |= PhoneNumber::Car; - else if ( (*it)->value() == "isdn" ) type |= PhoneNumber::Isdn; - else if ( (*it)->value() == "pcs" ) type |= PhoneNumber::Pcs; - else if ( (*it)->value() == "pager" ) type |= PhoneNumber::Pager; - } - } - p.setType( type ); - - return p; -} - -TQString VCardFormatImpl::readTextValue( ContentLine *cl ) -{ - VCARD::Value *value = cl->value(); - if ( value ) { - return TQString::fromUtf8( value->asString() ); - } else { - kdDebug(5700) << "No value: " << cl->asString() << endl; - return TQString::null; - } -} - -TQDate VCardFormatImpl::readDateValue( ContentLine *cl ) -{ - DateValue *dateValue = (DateValue *)cl->value(); - if ( dateValue ) - return dateValue->qdate(); - else - return TQDate(); -} - -TQDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl ) -{ - DateValue *dateValue = (DateValue *)cl->value(); - if ( dateValue ) - return dateValue->qdt(); - else - return TQDateTime(); -} - -Geo VCardFormatImpl::readGeoValue( ContentLine *cl ) -{ - GeoValue *geoValue = (GeoValue *)cl->value(); - if ( geoValue ) { - Geo geo( geoValue->latitude(), geoValue->longitude() ); - return geo; - } else - return Geo(); -} - -TimeZone VCardFormatImpl::readUTCValue( ContentLine *cl ) -{ - UTCValue *utcValue = (UTCValue *)cl->value(); - if ( utcValue ) { - TimeZone tz; - tz.setOffset(((utcValue->hour()*60)+utcValue->minute())*(utcValue->positive() ? 1 : -1)); - return tz; - } else - return TimeZone(); -} - -Secrecy VCardFormatImpl::readClassValue( ContentLine *cl ) -{ - ClassValue *classValue = (ClassValue *)cl->value(); - if ( classValue ) { - Secrecy secrecy; - switch ( classValue->type() ) { - case ClassValue::Public: - secrecy.setType( Secrecy::Public ); - break; - case ClassValue::Private: - secrecy.setType( Secrecy::Private ); - break; - case ClassValue::Confidential: - secrecy.setType( Secrecy::Confidential ); - break; - } - - return secrecy; - } else - return Secrecy(); -} - -void VCardFormatImpl::addKeyValue( VCARD::VCard *vcard, const Key &key ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityKey ) ); - - ParamList params; - if ( key.isBinary() ) { - cl.setValue( new TextValue( KCodecs::base64Encode( key.binaryData() ) ) ); - params.append( new Param( "ENCODING", "b" ) ); - } else { - cl.setValue( new TextValue( key.textData().utf8() ) ); - } - - switch ( key.type() ) { - case Key::X509: - params.append( new Param( "TYPE", "X509" ) ); - break; - case Key::PGP: - params.append( new Param( "TYPE", "PGP" ) ); - break; - case Key::Custom: - params.append( new Param( "TYPE", key.customTypeString().utf8() ) ); - break; - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Key VCardFormatImpl::readKeyValue( VCARD::ContentLine *cl ) -{ - Key key; - bool isBinary = false; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) - isBinary = true; - if ( (*it)->name() == "TYPE" ) { - if ( (*it)->value().isEmpty() ) - continue; - if ( (*it)->value() == "X509" ) - key.setType( Key::X509 ); - else if ( (*it)->value() == "PGP" ) - key.setType( Key::PGP ); - else { - key.setType( Key::Custom ); - key.setCustomTypeString( TQString::fromUtf8( (*it)->value() ) ); - } - } - } - - - if ( isBinary ) { - TQByteArray data; - KCodecs::base64Decode( v->asString().stripWhiteSpace(), data ); - key.setBinaryData( data ); - } else { - key.setTextData( TQString::fromUtf8( v->asString() ) ); - } - - return key; -} - - -void VCardFormatImpl::addAgentValue( VCARD::VCard *vcard, const Agent &agent ) -{ - if ( agent.isIntern() && !agent.addressee() ) - return; - - if ( !agent.isIntern() && agent.url().isEmpty() ) - return; - - ContentLine cl; - cl.setName( EntityTypeToParamName( EntityAgent ) ); - - ParamList params; - if ( agent.isIntern() ) { - TQString vstr; - Addressee *addr = agent.addressee(); - if ( addr ) { - writeToString( (*addr), vstr ); - vstr.replace( ":", "\\:" ); - vstr.replace( ",", "\\," ); - vstr.replace( ";", "\\;" ); - vstr.replace( "\r\n", "\\n" ); - cl.setValue( new TextValue( vstr.utf8() ) ); - } else - return; - } else { - cl.setValue( new TextValue( agent.url().utf8() ) ); - params.append( new Param( "VALUE", "uri" ) ); - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl ) -{ - Agent agent; - bool isIntern = true; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "VALUE" && (*it)->value() == "uri" ) - isIntern = false; - } - - if ( isIntern ) { - TQString vstr = TQString::fromUtf8( v->asString() ); - vstr.replace( "\\n", "\r\n" ); - vstr.replace( "\\:", ":" ); - vstr.replace( "\\,", "," ); - vstr.replace( "\\;", ";" ); - Addressee *addr = new Addressee; - readFromString( vstr, *addr ); - agent.setAddressee( addr ); - } else { - agent.setUrl( TQString::fromUtf8( v->asString() ) ); - } - - return agent; -} - -void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType type, const Picture &pic, const Addressee &addr, bool intern ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( type ) ); - - if ( pic.isIntern() && pic.data().isNull() ) - return; - - if ( !pic.isIntern() && pic.url().isEmpty() ) - return; - - ParamList params; - if ( pic.isIntern() ) { - TQImage img = pic.data(); - if ( intern ) { // only for vCard export we really write the data inline - TQByteArray data; - TQDataStream s( data, IO_WriteOnly ); - s.setVersion( 4 ); // to produce valid png files - s << img; - cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); - } else { // save picture in cache - TQString dir; - if ( type == EntityPhoto ) - dir = "photos"; - if ( type == EntityLogo ) - dir = "logos"; - - img.save( locateLocal( "data", "kabc/" + dir + "/" + addr.uid() ), pic.type().utf8() ); - cl.setValue( new TextValue( "" ) ); - } - params.append( new Param( "ENCODING", "b" ) ); - if ( !pic.type().isEmpty() ) - params.append( new Param( "TYPE", pic.type().utf8() ) ); - } else { - cl.setValue( new TextValue( pic.url().utf8() ) ); - params.append( new Param( "VALUE", "uri" ) ); - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::EntityType type, const Addressee &addr ) -{ - Picture pic; - bool isInline = false; - TQString picType; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) - isInline = true; - if ( (*it)->name() == "TYPE" && !(*it)->value().isEmpty() ) - picType = TQString::fromUtf8( (*it)->value() ); - } - - if ( isInline ) { - TQImage img; - if ( v->asString() == "" ) { // no picture inline stored => picture is in cache - TQString dir; - if ( type == EntityPhoto ) - dir = "photos"; - if ( type == EntityLogo ) - dir = "logos"; - - img.load( locateLocal( "data", "kabc/" + dir + "/" + addr.uid() ) ); - } else { - TQByteArray data; - KCodecs::base64Decode( v->asString(), data ); - img.loadFromData( data ); - } - pic.setData( img ); - pic.setType( picType ); - } else { - pic.setUrl( TQString::fromUtf8( v->asString() ) ); - } - - return pic; -} - -void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, const Addressee &addr, bool intern ) -{ - ContentLine cl; - cl.setName( EntityTypeToParamName( EntitySound ) ); - - if ( sound.isIntern() && sound.data().isNull() ) - return; - - if ( !sound.isIntern() && sound.url().isEmpty() ) - return; - - ParamList params; - if ( sound.isIntern() ) { - TQByteArray data = sound.data(); - if ( intern ) { // only for vCard export we really write the data inline - cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); - } else { // save sound in cache - TQFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_WriteOnly ) ) { - file.writeBlock( data ); - } - cl.setValue( new TextValue( "" ) ); - } - params.append( new Param( "ENCODING", "b" ) ); - } else { - cl.setValue( new TextValue( sound.url().utf8() ) ); - params.append( new Param( "VALUE", "uri" ) ); - } - - cl.setParamList( params ); - vcard->add( cl ); -} - -Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &addr ) -{ - Sound sound; - bool isInline = false; - TextValue *v = (TextValue *)cl->value(); - - ParamList params = cl->paramList(); - ParamListIterator it( params ); - for( ; it.current(); ++it ) { - if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) - isInline = true; - } - - if ( isInline ) { - TQByteArray data; - if ( v->asString() == "" ) { // no sound inline stored => sound is in cache - TQFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_ReadOnly ) ) { - data = file.readAll(); - file.close(); - } - } else { - KCodecs::base64Decode( v->asString(), data ); - } - sound.setData( data ); - } else { - sound.setUrl( TQString::fromUtf8( v->asString() ) ); - } - - return sound; -} - -bool VCardFormatImpl::readFromString( const TQString &vcard, Addressee &addressee ) -{ - VCardEntity e( vcard.utf8() ); - VCardListIterator it( e.cardList() ); - - if ( it.current() ) { - VCARD::VCard v(*it.current()); - loadAddressee( addressee, v ); - return true; - } - - return false; -} - -bool VCardFormatImpl::writeToString( const Addressee &addressee, TQString &vcard ) -{ - VCardEntity vcards; - VCardList vcardlist; - vcardlist.setAutoDelete( true ); - - VCARD::VCard *v = new VCARD::VCard; - - saveAddressee( addressee, v, true ); - - vcardlist.append( v ); - vcards.setCardList( vcardlist ); - vcard = TQString::fromUtf8( vcards.asString() ); - - return true; -} diff --git a/kabc/vcardformatimpl.h b/kabc/vcardformatimpl.h deleted file mode 100644 index 78c466a86..000000000 --- a/kabc/vcardformatimpl.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDFORMATIMPL_H -#define KABC_VCARDFORMATIMPL_H - -#include -#include - -#include "address.h" -#include "addressee.h" - -#ifdef __CYGWIN__ -#include -#else -#include -#endif - -namespace KABC { - -class AddressBook; - -/** - @deprecated use VCardFormatPlugin instead. - */ -class KABC_EXPORT_DEPRECATED VCardFormatImpl -{ - public: - bool load( Addressee &, TQFile *file ); - bool loadAll( AddressBook *, Resource *, TQFile *file ); - void save( const Addressee &, TQFile *file ); - void saveAll( AddressBook *, Resource *, TQFile *file ); - - bool readFromString( const TQString &vcard, Addressee &addr ); - bool writeToString( const Addressee &addressee, TQString &vcard ); - - protected: - bool loadAddressee( Addressee &, VCARD::VCard & ); - void saveAddressee( const Addressee &, VCARD::VCard *, bool intern ); - - void addTextValue (VCARD::VCard *, VCARD::EntityType, const TQString & ); - TQString readTextValue( VCARD::ContentLine * ); - - void addDateValue( VCARD::VCard *, VCARD::EntityType, const TQDate & ); - TQDate readDateValue( VCARD::ContentLine * ); - - void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const TQDateTime & ); - TQDateTime readDateTimeValue( VCARD::ContentLine * ); - - void addAddressValue( VCARD::VCard *, const Address & ); - Address readAddressValue( VCARD::ContentLine * ); - - void addLabelValue( VCARD::VCard *, const Address & ); - - void addTelephoneValue( VCARD::VCard *, const PhoneNumber & ); - PhoneNumber readTelephoneValue( VCARD::ContentLine * ); - - void addNValue( VCARD::VCard *, const Addressee & ); - void readNValue( VCARD::ContentLine *, Addressee & ); - - void addCustomValue( VCARD::VCard *, const TQString & ); - - void addAddressParam( VCARD::ContentLine *, int ); - int readAddressParam( VCARD::ContentLine * ); - - void addGeoValue( VCARD::VCard *, const Geo & ); - Geo readGeoValue( VCARD::ContentLine * ); - - void addUTCValue( VCARD::VCard *, const TimeZone & ); - TimeZone readUTCValue( VCARD::ContentLine * ); - - void addClassValue( VCARD::VCard *, const Secrecy & ); - Secrecy readClassValue( VCARD::ContentLine * ); - - void addKeyValue( VCARD::VCard *, const Key & ); - Key readKeyValue( VCARD::ContentLine * ); - - void addPictureValue( VCARD::VCard *, VCARD::EntityType, const Picture &, const Addressee &, bool ); - Picture readPictureValue( VCARD::ContentLine *, VCARD::EntityType, const Addressee &addr ); - - void addSoundValue( VCARD::VCard *, const Sound &, const Addressee &, bool ); - Sound readSoundValue( VCARD::ContentLine *, const Addressee &addr ); - - void addAgentValue( VCARD::VCard *, const Agent & ); - Agent readAgentValue( VCARD::ContentLine * ); -}; - -} -#endif diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp deleted file mode 100644 index 6194cd0fe..000000000 --- a/kabc/vcardformatplugin.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include "address.h" -#include "addressee.h" -#include "vcardconverter.h" - -#include "vcardformatplugin.h" - -using namespace KABC; - -VCardFormatPlugin::VCardFormatPlugin() -{ -} - -VCardFormatPlugin::~VCardFormatPlugin() -{ -} - -bool VCardFormatPlugin::load( Addressee &addressee, TQFile *file ) -{ - TQString data; - - TQTextStream t( file ); - t.setEncoding( TQTextStream::Latin1 ); - data = t.read(); - - VCardConverter converter; - Addressee::List l = converter.parseVCards( data ); - - if ( ! l.first().isEmpty() ) { - addressee = l.first(); - return true; - } - - return false; -} - -bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, TQFile *file ) -{ - TQString data; - - TQTextStream t( file ); - t.setEncoding( TQTextStream::Latin1 ); - data = t.read(); - - VCardConverter converter; - - Addressee::List l = converter.parseVCards( data ); - - Addressee::List::iterator itr; - for ( itr = l.begin(); itr != l.end(); ++itr) { - Addressee addressee = *itr; - addressee.setResource( resource ); - addressee.setChanged( false ); - resource->insertAddressee( addressee ); - } - - return true; -} - -void VCardFormatPlugin::save( const Addressee &addressee, TQFile *file ) -{ - VCardConverter converter ; - Addressee::List vcardlist; - - - vcardlist.append( addressee ); - - TQTextStream t( file ); - t.setEncoding( TQTextStream::UnicodeUTF8 ); - t << converter.createVCards( vcardlist ); -} - -void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, TQFile *file ) -{ - VCardConverter converter; - Addressee::List vcardlist; - - Resource::Iterator it; - for ( it = resource->begin(); it != resource->end(); ++it ) { - (*it).setChanged( false ); - vcardlist.append( *it ); - } - - TQTextStream t( file ); - t.setEncoding( TQTextStream::UnicodeUTF8 ); - t << converter.createVCards( vcardlist ); -} - -bool VCardFormatPlugin::checkFormat( TQFile *file ) const -{ - TQString line; - - file->readLine( line, 1024 ); - line = line.stripWhiteSpace(); - if ( line == "BEGIN:VCARD" ) - return true; - else - return false; -} diff --git a/kabc/vcardformatplugin.h b/kabc/vcardformatplugin.h deleted file mode 100644 index 5ac7e49c2..000000000 --- a/kabc/vcardformatplugin.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDFORMATPLUGIN_H -#define KABC_VCARDFORMATPLUGIN_H - -#include "formatplugin.h" - -namespace KABC { - -class AddressBook; -class Addressee; - -/** - @short Interface of vCard backend for address book. - - This class implements the file format interface of address book entries for - the vCard format. -*/ -class KABC_EXPORT VCardFormatPlugin : public FormatPlugin -{ - public: - VCardFormatPlugin(); - virtual ~VCardFormatPlugin(); - - bool load( Addressee &, TQFile *file ); - bool loadAll( AddressBook *, Resource *, TQFile *file ); - void save( const Addressee &, TQFile *file ); - void saveAll( AddressBook *, Resource *, TQFile *file ); - - bool checkFormat( TQFile *file ) const; - - private: - struct VCardFormatPrivate; - VCardFormatPrivate *d; -}; - -} -#endif diff --git a/kabc/vcardparser/CMakeLists.txt b/kabc/vcardparser/CMakeLists.txt deleted file mode 100644 index 2c6fa112a..000000000 --- a/kabc/vcardparser/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - vcard.h vcardline.h vcardparser.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) - - -##### vcards #################################### - -set( target vcards ) - -set( ${target}_SRCS - vcard.cpp vcardline.cpp vcardparser.cpp -) - -tde_add_library( ${target} STATIC_PIC - SOURCES ${${target}_SRCS} -) diff --git a/kabc/vcardparser/Makefile.am b/kabc/vcardparser/Makefile.am deleted file mode 100644 index 53e4e42ab..000000000 --- a/kabc/vcardparser/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) - -noinst_LTLIBRARIES = libvcards.la -libvcards_la_SOURCES = vcard.cpp vcardline.cpp vcardparser.cpp - -vcardsincludedir = $(includedir)/kabc -vcardsinclude_HEADERS = vcard.h vcardline.h vcardparser.h - -check_PROGRAMS = testread testwrite testread2 - -testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testread_LDADD = libvcards.la $(top_builddir)/kabc/libkabc.la -testread_SOURCES = testread.cpp - -testread2_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testread2_LDADD = libvcards.la $(top_builddir)/kabc/libkabc.la -testread2_SOURCES = testread2.cpp testutils.cpp - -testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -testwrite_LDADD = libvcards.la $(top_builddir)/kabc/libkabc.la -testwrite_SOURCES = testwrite.cpp - -TESTFILES = vcard1.vcf vcard2.vcf vcard3.vcf vcard4.vcf vcard6.vcf vcard7.vcf - -check-local: testread - rm -f FAILED; \ - for i in $(TESTFILES); \ - do perl $(top_srcdir)/kabc/vcardparser/checkvcard.pl \ - $(top_srcdir)/kabc/vcardparser/tests/$$i; \ - done; \ - [ ! -e FAILED ] diff --git a/kabc/vcardparser/README.testing b/kabc/vcardparser/README.testing deleted file mode 100644 index a7794931d..000000000 --- a/kabc/vcardparser/README.testing +++ /dev/null @@ -1,15 +0,0 @@ -For testing the vcardparser there are some test files and a small testsuite -automatically checking for regressions. The tests directory contains some vCard -files and correpsonding reference output files (with an additional ".ref" -suffix). For running the geression test do "make check". This will compile some -test programs, parse the test files, write them out as vCard again and compare -the output to the reference file. The check fails, if there are unexpected -differences and shows which lines differed. - -For creating a new test put a vCard file to be parsed into the tests directory. -Create a reference file by running "testread" on the test file. It will put out -the parsed data as vCard again on stdout. Carefully check the output, manually -correct any errors and save the result as reference file in the tests directory. -Now add the filename to the TESTFILES variable in Makefile.am and run "make -check". If the check fails adapt the reference file or fix the bugs in the -parser, whatever is appropriate. diff --git a/kabc/vcardparser/checkvcard.pl b/kabc/vcardparser/checkvcard.pl deleted file mode 100755 index 67160ea4a..000000000 --- a/kabc/vcardparser/checkvcard.pl +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/perl - -if ( @ARGV != 1 ) { - print STDERR "Missing arg: filename\n"; - exit 1; -} - -$file = $ARGV[0]; - -if ( !open( IN, "$file" ) ) { - print STDERR "Unable to open '$file'\n"; - exit 1; -} - -while( ) { - if (/^VERSION:(.*)$/ ) { - $version = $1; - if ( $version eq "2.1" ) { $options = "--vcard21"; } - } -} - -close IN; - -$ref = "$file.ref"; - -if ( !open( REF, "$ref" ) ) { - print STDERR "Unable to open $ref\n"; - exit 1; -} - -while( ) { - push @ref, $_; -} - -close REF; - -if ( !open( READ, "./testread $file $options 2> /dev/null |" ) ) { - print STDERR "Unable to open testread\n"; - exit 1; -} - -print "Checking '$file':\n"; - -$gotsomething = 0; -$error = 0; -$i = 0; -while( ) { - $gotsomething = 1; - $out = $_; - $ref = @ref[$i++]; - - if ( $out ne $ref ) { - if ( $ref =~ /^UID/ && $out =~ /^UID/ ) { next; } - $error++; - print " Expected : $ref"; - print " Parser output : $out"; - } -} - -close READ; - -if ( $gotsomething == 0 ) { - print "\n FAILED: testread didn't output anything\n"; - system "touch FAILED"; - exit 1; -} -if ( $error > 0 ) { - print "\n FAILED: $error errors found.\n"; - system "touch FAILED"; - exit 1; -} else { - print " OK\n"; -} - -exit 0; diff --git a/kabc/vcardparser/testread.cpp b/kabc/vcardparser/testread.cpp deleted file mode 100644 index 6c3405ef9..000000000 --- a/kabc/vcardparser/testread.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - This file is part of libkabc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "vcardconverter.h" -#include "vcard.h" - -static const TDECmdLineOptions options[] = -{ - {"vcard21", I18N_NOOP("vCard 2.1"), 0}, - {"+inputfile", I18N_NOOP("Input file"), 0}, - TDECmdLineLastOption -}; - -int main( int argc, char **argv ) -{ - TDEApplication::disableAutoDcopRegistration(); - - TDEAboutData aboutData( "testread", "vCard test reader", "0.1" ); - aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app( false, false ); - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if ( args->count() != 1 ) { - std::cerr << "Missing argument" << std::endl; - return 1; - } - - TQString inputFile( args->arg( 0 ) ); - - TQFile file( inputFile ); - if ( !file.open( IO_ReadOnly ) ) { - tqDebug( "Unable to open file '%s' for reading!", file.name().latin1() ); - return 1; - } - - TQString text; - - TQTextStream s( &file ); - s.setEncoding( TQTextStream::Latin1 ); - text = s.read(); - file.close(); - - KABC::VCardConverter converter; - KABC::Addressee::List list = converter.parseVCards( text ); - - if ( args->isSet( "vcard21" ) ) { - text = converter.createVCards( list, KABC::VCardConverter::v2_1 ); // uses version 2.1 - } else { - text = converter.createVCards( list ); // uses version 3.0 - } - - std::cout << text.utf8(); - - return 0; -} diff --git a/kabc/vcardparser/testread2.cpp b/kabc/vcardparser/testread2.cpp deleted file mode 100644 index ba73081e7..000000000 --- a/kabc/vcardparser/testread2.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "testutils.h" -#include -#include -#include - -using namespace KABC; - -int -main() -{ - Addressee::List l = vCardsAsAddresseeList(); - TQString vcards = vCardsAsText(); - - VCardConverter vct; - - Addressee::List parsed = vct.parseVCards( vcards ); - - if ( l.size() != parsed.size() ) { - kdDebug()<<"\tSize - FAILED : "< -#include -#include - -using namespace KABC; - -Addressee -vcard1() -{ - Addressee addr; - - addr.setName( "Frank Dawson" ); - addr.setOrganization( "Lotus Development Corporation" ); - addr.setUrl( KURL( "http://home.earthlink.net/~fdawson") ); - addr.insertEmail( "fdawson@earthlink.net" ); - addr.insertEmail( "Frank_Dawson@Lotus.com", true ); - addr.insertPhoneNumber( PhoneNumber("+1-919-676-9515",PhoneNumber::Voice|PhoneNumber::Msg - |PhoneNumber::Work ) ); - addr.insertPhoneNumber( PhoneNumber("+1-919-676-9564",PhoneNumber::Fax |PhoneNumber::Work )); - Address a( Address::Work | Address::Postal | Address::Parcel ); - a.setStreet( "6544 Battleford Drive" ); - a.setLocality( "Raleigh" ); - a.setRegion( "NC" ); - a.setPostalCode( "27613-3502" ); - a.setCountry( "U.S.A." ); - addr.insertAddress( a ); - return addr; -} - -Addressee -vcard2() -{ - Addressee addr; - - addr.setName( "Tim Howes" ); - addr.setOrganization( "Netscape Communications Corp." ); - addr.insertEmail( "howes@netscape.com" ); - addr.insertPhoneNumber( PhoneNumber("+1-415-937-3419",PhoneNumber::Voice|PhoneNumber::Msg - |PhoneNumber::Work) ); - addr.insertPhoneNumber( PhoneNumber("+1-415-528-4164",PhoneNumber::Fax |PhoneNumber::Work) ); - Address a( Address::Work ); - a.setStreet( "501 E. Middlefield Rd." ); - a.setLocality( "Mountain View" ); - a.setRegion( "CA" ); - a.setPostalCode( "94043" ); - a.setCountry( "U.S.A." ); - addr.insertAddress( a ); - return addr; -} - -Addressee -vcard3() -{ - Addressee addr; - - addr.setName( "ian geiser" ); - addr.setOrganization( "Source eXtreme" ); - addr.insertEmail( "geiseri@yahoo.com" ); - addr.setTitle( "VP of Engineering" ); - return addr; -} - - -QString -vcardAsText( const TQString& location ) -{ - TQString line; - TQFile file( location ); - if ( file.open( IO_ReadOnly ) ) { - TQTextStream stream( &file ); - if ( !stream.eof() ) { - line = stream.read(); - } - file.close(); - } - return line; -} - -Addressee::List -vCardsAsAddresseeList() -{ - Addressee::List l; - - l.append( vcard1() ); - l.append( vcard2() ); - l.append( vcard3() ); - - return l; -} - -QString -vCardsAsText() -{ - TQString vcards = vcardAsText( "tests/vcard1.vcf" ); - vcards += vcardAsText( "tests/vcard2.vcf" ); - vcards += vcardAsText( "tests/vcard3.vcf" ); - - return vcards; -} diff --git a/kabc/vcardparser/testutils.h b/kabc/vcardparser/testutils.h deleted file mode 100644 index 4f2024177..000000000 --- a/kabc/vcardparser/testutils.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef TESTUTILS_H -#define TESTUTILS_H - -#include -#include - -KABC::Addressee vcard1(); -KABC::Addressee vcard2(); -KABC::Addressee vcard3(); -KABC::Addressee::List vCardsAsAddresseeList(); -TQString vCardAsText( const TQString& location ); -TQString vCardsAsText(); - -#endif diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp deleted file mode 100644 index 5a58bd8a8..000000000 --- a/kabc/vcardparser/testwrite.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - This file is part of libkabc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "vcardconverter.h" - -int main( int argc, char **argv ) -{ - TDEAboutData aboutData( "testwrite", "vCard test writer", "0.1" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - - TDEApplication app( false, false ); - - - KABC::Addressee addressee; - - addressee.setNameFromString( "Mr. Tobias Koenig Jr." ); - addressee.setNickName( "tokoe" ); - addressee.setBirthday( TQDate( 1982, 7, 19 ) ); - addressee.setMailer( "mutt1.2" ); - addressee.setTimeZone( KABC::TimeZone( +2 ) ); - - KABC::Geo geo; - geo.setLatitude( 30 ); - geo.setLongitude( 51 ); - addressee.setGeo( geo ); - - addressee.setTitle( "nerd" ); - addressee.setRole( "Maintainer" ); - addressee.setOrganization( "KDE" ); - addressee.setNote( "nerver\ntouch a running system" ); - addressee.setProductId( "testId" ); - addressee.setRevision( TQDateTime::currentDateTime() ); - addressee.setSortString( "koenig" ); - addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); - addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); -/* - TQImage img; - img.load( "testimg.png", "PNG" ); - KABC::Picture photo; - photo.setData( img ); - addressee.setPhoto( photo ); - - TQImage img2; - img2.load( "testimg.png", "PNG" ); - KABC::Picture logo; - logo.setData( img2 ); - addressee.setLogo( logo ); - - TQFile soundFile( "testsound.wav" ); - soundFile.open( IO_ReadOnly ); - TQByteArray data = soundFile.readAll(); - soundFile.close(); - KABC::Sound sound; - sound.setData( data ); - addressee.setSound( sound ); -*/ - addressee.insertEmail( "tokoe@kde.org", true ); - addressee.insertEmail( "tokoe82@yahoo.de", true ); - - KABC::PhoneNumber phone1( "3541523475", KABC::PhoneNumber::Pref | KABC::PhoneNumber::Home ); - KABC::PhoneNumber phone2( "+46745673475", KABC::PhoneNumber::Work ); - addressee.insertPhoneNumber( phone1 ); - addressee.insertPhoneNumber( phone2 ); - - KABC::Key key( "secret key", KABC::Key::X509 ); - addressee.insertKey( key ); - - TQStringList categories; - categories << "Friends" << "School" << "KDE"; - addressee.setCategories( categories ); - - KABC::Address a( KABC::Address::Work | KABC::Address::Postal | KABC::Address::Parcel ); - a.setStreet( "6544 Battleford Drive" ); - a.setLocality( "Raleigh" ); - a.setRegion( "NC" ); - a.setPostalCode( "27613-3502" ); - a.setCountry( "U.S.A." ); - addressee.insertAddress( a ); - - addressee.insertCustom( "1hsdf", "ertuer", "iurt" ); - addressee.insertCustom( "2hsdf", "ertuer", "iurt" ); - addressee.insertCustom( "3hsdf", "ertuer", "iurt" ); - - KABC::Addressee::List list; - for ( int i = 0; i < 1000; ++i ) { - KABC::Addressee addr = addressee; - addr.setUid( TQString::number( i ) ); - list.append( addr ); - } - - KABC::VCardConverter converter; - TQString txt = converter.createVCards( list ); - - TQFile file( "out.vcf" ); - file.open( IO_WriteOnly ); - - TQTextStream s( &file ); - s.setEncoding( TQTextStream::UnicodeUTF8 ); - s << txt; - file.close(); - - return 0; -} diff --git a/kabc/vcardparser/vcard.cpp b/kabc/vcardparser/vcard.cpp deleted file mode 100644 index 30a8e1c49..000000000 --- a/kabc/vcardparser/vcard.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcard.h" - -using namespace KABC; - -VCard::VCard() -{ -} - -VCard::VCard( const VCard& vcard ) -{ - mLineMap = vcard.mLineMap; -} - -VCard::~VCard() -{ -} - -VCard& VCard::operator=( const VCard& vcard ) -{ - if ( &vcard == this ) - return *this; - - mLineMap = vcard.mLineMap; - - return *this; -} - -void VCard::clear() -{ - mLineMap.clear(); -} - -TQStringList VCard::identifiers() const -{ - return mLineMap.keys(); -} - -void VCard::addLine( const VCardLine& line ) -{ - mLineMap[ line.identifier() ].append( line ); -} - -VCardLine::List VCard::lines( const TQString& identifier ) const -{ - LineMap::ConstIterator it = mLineMap.find( identifier ); - if ( it == mLineMap.end() ) - return VCardLine::List(); - - return *it; -} - -VCardLine VCard::line( const TQString& identifier ) const -{ - LineMap::ConstIterator it = mLineMap.find( identifier ); - if ( it == mLineMap.end() ) - return VCardLine(); - - if ( (*it).isEmpty() ) - return VCardLine(); - else - return (*it).first(); -} - -void VCard::setVersion( Version version ) -{ - mLineMap.erase( "VERSION" ); - - VCardLine line; - line.setIdentifier( "VERSION" ); - if ( version == v2_1 ) - line.setIdentifier( "2.1" ); - else if ( version == v3_0 ) - line.setIdentifier( "3.0" ); - - mLineMap[ "VERSION" ].append( line ); -} - -VCard::Version VCard::version() const -{ - LineMap::ConstIterator versionEntry = mLineMap.find( "VERSION" ); - if ( versionEntry == mLineMap.end() ) - return v3_0; - - VCardLine line = ( *versionEntry )[ 0 ]; - if ( line.value() == "2.1" ) - return v2_1; - else - return v3_0; -} diff --git a/kabc/vcardparser/vcard.h b/kabc/vcardparser/vcard.h deleted file mode 100644 index 6afeeda26..000000000 --- a/kabc/vcardparser/vcard.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef VCARDPARSER_VCARD_H -#define VCARDPARSER_VCARD_H - -#include "vcardline.h" -#include -#include -#include - -namespace KABC { - -class VCard -{ - public: - typedef TQValueList List; - typedef TQMap< TQString, VCardLine::List > LineMap; - - enum Version { v2_1, v3_0 }; - - VCard(); - VCard( const VCard& ); - - ~VCard(); - - VCard& operator=( const VCard& ); - - /** - * Removes all lines from the vCard. - */ - void clear(); - - /** - * Returns a list of all identifiers that exists in the - * vCard. - */ - TQStringList identifiers() const; - - /** - * Adds a VCardLine to the VCard - */ - void addLine( const VCardLine& line ); - - /** - * Returns all lines of the vcard with a special identifier. - */ - VCardLine::List lines( const TQString& identifier ) const; - - /** - * Returns only the first line of the vcard with a special identifier. - */ - VCardLine line( const TQString& identifier ) const; - - /** - * Set the version of the vCard. - */ - void setVersion( Version version ); - - /** - * Returns the version of this vCard. - */ - Version version() const; - - private: - LineMap mLineMap; - - class VCardPrivate; - VCardPrivate *d; -}; - -} - -#endif diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp deleted file mode 100644 index 6680cf7d0..000000000 --- a/kabc/vcardparser/vcardline.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "vcardline.h" - -using namespace KABC; - -class VCardLine::VCardLinePrivate -{ - public: - TQString mGroup; -}; - -VCardLine::VCardLine() - : d( 0 ) -{ -} - -VCardLine::VCardLine( const TQString &identifier ) - : d( 0 ) -{ - mIdentifier = identifier; -} - -VCardLine::VCardLine( const TQString &identifier, const TQVariant &value ) - : d( 0 ) -{ - mIdentifier = identifier; - mValue = value; -} - -VCardLine::VCardLine( const VCardLine& line ) - : d( 0 ) -{ - mParamMap = line.mParamMap; - mValue = line.mValue; - mIdentifier = line.mIdentifier; -} - -VCardLine::~VCardLine() -{ - delete d; - d = 0; -} - -VCardLine& VCardLine::operator=( const VCardLine& line ) -{ - if ( &line == this ) - return *this; - - mParamMap = line.mParamMap; - mValue = line.mValue; - mIdentifier = line.mIdentifier; - - return *this; -} - -void VCardLine::setIdentifier( const TQString& identifier ) -{ - mIdentifier = identifier; -} - -TQString VCardLine::identifier() const -{ - return mIdentifier; -} - -void VCardLine::setValue( const TQVariant& value ) -{ - mValue = value; -} - -TQVariant VCardLine::value() const -{ - return mValue; -} - -void VCardLine::setGroup( const TQString& group ) -{ - if ( !d ) - d = new VCardLinePrivate(); - - d->mGroup = group; -} - -TQString VCardLine::group() const -{ - if ( d ) - return d->mGroup; - else - return TQString(); -} - -bool VCardLine::hasGroup() const -{ - if ( !d ) - return false; - else - return d->mGroup.isEmpty(); -} - -TQStringList VCardLine::parameterList() const -{ - return mParamMap.keys(); -} - -void VCardLine::addParameter( const TQString& param, const TQString& value ) -{ - TQStringList &list = mParamMap[ param ]; - if ( list.findIndex( value ) == -1 ) // not included yet - list.append( value ); -} - -TQStringList VCardLine::parameters( const TQString& param ) const -{ - ParamMap::ConstIterator it = mParamMap.find( param ); - if ( it == mParamMap.end() ) - return TQStringList(); - else - return *it; -} - -TQString VCardLine::parameter( const TQString& param ) const -{ - ParamMap::ConstIterator it = mParamMap.find( param ); - if ( it == mParamMap.end() ) - return TQString::null; - else { - if ( (*it).isEmpty() ) - return TQString::null; - else - return (*it).first(); - } -} diff --git a/kabc/vcardparser/vcardline.h b/kabc/vcardparser/vcardline.h deleted file mode 100644 index 92fe743f6..000000000 --- a/kabc/vcardparser/vcardline.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef VCARDLINE_H -#define VCARDLINE_H - -#include -#include -#include -#include -#include - -namespace KABC { - -class VCardLine -{ - public: - typedef TQValueList List; - typedef TQMap ParamMap; - - VCardLine(); - VCardLine( const TQString &identifier ); - VCardLine( const TQString &identifier, const TQVariant &value ); - VCardLine( const VCardLine& ); - - ~VCardLine(); - - VCardLine& operator=( const VCardLine& ); - - /** - * Sets the identifier of this line e.g. UID, FN, CLASS - */ - void setIdentifier( const TQString& identifier ); - - /** - * Returns the identifier of this line. - */ - TQString identifier() const; - - /** - * Sets the value of of this line. - */ - void setValue( const TQVariant& value ); - - /** - * Returns the value of this line. - */ - TQVariant value() const; - - /** - * Sets the group the line belongs to. - */ - void setGroup( const TQString& group ); - - /** - * Returns the group the line belongs to. - */ - TQString group() const; - - /** - * Returns whether the line belongs to a group. - */ - bool hasGroup() const; - - /** - * Returns all parameters. - */ - TQStringList parameterList() const; - - /** - * Add a new parameter to the line. - */ - void addParameter( const TQString& param, const TQString& value ); - - /** - * Returns the values of a special parameter. - * You can get a list of all parameters with paramList(). - */ - TQStringList parameters( const TQString& param ) const; - - /** - * Returns only the first value of a special parameter. - * You can get a list of all parameters with paramList(). - */ - TQString parameter( const TQString& param ) const; - - private: - ParamMap mParamMap; - TQString mIdentifier; - TQVariant mValue; - - class VCardLinePrivate; - VCardLinePrivate *d; -}; - -} - -#endif diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp deleted file mode 100644 index aed9ebd39..000000000 --- a/kabc/vcardparser/vcardparser.cpp +++ /dev/null @@ -1,297 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include - -#include "vcardparser.h" - -#define FOLD_WIDTH 75 - -using namespace KABC; - -static TQString backslash( "\\\\" ); -static TQString comma( "\\," ); -static TQString newline( "\\n" ); -static TQString cr( "\\r" ); - -static void addEscapes( TQString &str ) -{ - str.replace( '\\', backslash ); - str.replace( ',', comma ); - str.replace( '\r', cr ); - str.replace( '\n', newline ); -} - -static void removeEscapes( TQString &str ) -{ - str.replace( cr, "\\r" ); - str.replace( newline, "\n" ); - str.replace( comma, "," ); - str.replace( backslash, "\\" ); -} - -VCardParser::VCardParser() -{ -} - -VCardParser::~VCardParser() -{ -} - -VCard::List VCardParser::parseVCards( const TQString& text ) -{ - static TQRegExp sep( "[\x0d\x0a]" ); - - VCard currentVCard; - VCard::List vCardList; - TQString currentLine; - - const TQStringList lines = TQStringList::split( sep, text ); - TQStringList::ConstIterator it; - - bool inVCard = false; - TQStringList::ConstIterator linesEnd( lines.end() ); - for ( it = lines.begin(); it != linesEnd; ++it ) { - - if ( (*it).isEmpty() ) // empty line - continue; - - if ( (*it)[ 0 ] == ' ' || (*it)[ 0 ] == '\t' ) { // folded line => append to previous - currentLine += TQString( *it ).remove( 0, 1 ); - continue; - } else { - if ( inVCard && !currentLine.isEmpty() ) { // now parse the line - int colon = currentLine.find( ':' ); - if ( colon == -1 ) { // invalid line - currentLine = (*it); - continue; - } - - VCardLine vCardLine; - const TQString key = currentLine.left( colon ).stripWhiteSpace(); - TQString value = currentLine.mid( colon + 1 ); - - TQStringList params = TQStringList::split( ';', key ); - - // check for group - if ( params[0].find( '.' ) != -1 ) { - const TQStringList groupList = TQStringList::split( '.', params[0] ); - vCardLine.setGroup( groupList[0] ); - vCardLine.setIdentifier( groupList[1] ); - } else - vCardLine.setIdentifier( params[0] ); - - if ( params.count() > 1 ) { // find all parameters - TQStringList::ConstIterator paramIt = params.begin(); - for ( ++paramIt; paramIt != params.end(); ++paramIt ) { - TQStringList pair = TQStringList::split( '=', *paramIt ); - if ( pair.size() == 1 ) { - // correct the 2.1 'standard' - if ( pair[0].lower() == "quoted-printable" ) { - pair[0] = "encoding"; - pair[1] = "quoted-printable"; - } else if ( pair[0].lower() == "base64" ) { - pair[0] = "encoding"; - pair[1] = "base64"; - } else { - pair.prepend( "type" ); - } - } - // This is pretty much a faster pair[1].contains( ',' )... - if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format - const TQStringList args = TQStringList::split( ',', pair[ 1 ] ); - TQStringList::ConstIterator argIt; - for ( argIt = args.begin(); argIt != args.end(); ++argIt ) - vCardLine.addParameter( pair[0].lower(), *argIt ); - } else - vCardLine.addParameter( pair[0].lower(), pair[1] ); - } - } - - removeEscapes( value ); - - TQByteArray output; - bool wasBase64Encoded = false; - - params = vCardLine.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data - TQByteArray input; - input = TQCString(value.latin1()); - if ( vCardLine.parameter( "encoding" ).lower() == "b" || - vCardLine.parameter( "encoding" ).lower() == "base64" ) { - KCodecs::base64Decode( input, output ); - wasBase64Encoded = true; - } - else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) { - // join any qp-folded lines - while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) { - value = value.remove( value.length() - 1, 1 ) + (*it); - ++it; - } - input = TQCString(value.latin1()); - KCodecs::quotedPrintableDecode( input, output ); - } - } else { - output = TQCString(value.latin1()); - } - - if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data - TQTextCodec *codec = - TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() ); - if ( codec ) { - vCardLine.setValue( codec->toUnicode( output ) ); - } else { - vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); - } - } else if ( wasBase64Encoded ) { - vCardLine.setValue( output ); - } else { // if charset not given, assume it's in UTF-8 (as used in previous KDE versions) - vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); - } - - currentVCard.addLine( vCardLine ); - } - - // we do not save the start and end tag as vcardline - if ( (*it).lower().startsWith( "begin:vcard" ) ) { - inVCard = true; - currentLine.setLength( 0 ); - currentVCard.clear(); // flush vcard - continue; - } - - if ( (*it).lower().startsWith( "end:vcard" ) ) { - inVCard = false; - vCardList.append( currentVCard ); - currentLine.setLength( 0 ); - currentVCard.clear(); // flush vcard - continue; - } - - currentLine = (*it); - } - } - - return vCardList; -} - -TQString VCardParser::createVCards( const VCard::List& list ) -{ - TQString text; - TQString textLine; - TQString encodingType; - TQStringList idents; - TQStringList params; - TQStringList values; - TQStringList::ConstIterator identIt; - TQStringList::Iterator paramIt; - TQStringList::ConstIterator valueIt; - - VCardLine::List lines; - VCardLine::List::ConstIterator lineIt; - VCard::List::ConstIterator cardIt; - - bool hasEncoding; - - text.reserve( list.size() * 300 ); // reserve memory to be more efficient - - // iterate over the cards - VCard::List::ConstIterator listEnd( list.end() ); - for ( cardIt = list.begin(); cardIt != listEnd; ++cardIt ) { - text.append( "BEGIN:VCARD\r\n" ); - - idents = (*cardIt).identifiers(); - for ( identIt = idents.constBegin(); identIt != idents.constEnd(); ++identIt ) { - lines = (*cardIt).lines( (*identIt) ); - - // iterate over the lines - for ( lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt ) { - if ( !(*lineIt).value().asString().isEmpty() ) { - if ((*lineIt).identifier() != TQString("URI")) { - if ( (*lineIt).hasGroup() ) - textLine = (*lineIt).group() + "." + (*lineIt).identifier(); - else - textLine = (*lineIt).identifier(); - - params = (*lineIt).parameterList(); - hasEncoding = false; - if ( params.count() > 0 ) { // we have parameters - for ( paramIt = params.begin(); paramIt != params.end(); ++paramIt ) { - if ( (*paramIt) == "encoding" ) { - hasEncoding = true; - encodingType = (*lineIt).parameter( "encoding" ).lower(); - } - - values = (*lineIt).parameters( *paramIt ); - for ( valueIt = values.constBegin(); valueIt != values.constEnd(); ++valueIt ) { - textLine.append( ";" + (*paramIt).upper() ); - if ( !(*valueIt).isEmpty() ) - textLine.append( "=" + (*valueIt) ); - } - } - } - - if ( hasEncoding ) { // have to encode the data - TQByteArray input, output; - if ( encodingType == "b" ) { - input = (*lineIt).value().toByteArray(); - KCodecs::base64Encode( input, output ); - } else if ( encodingType == "quoted-printable" ) { - input = (*lineIt).value().toString().utf8(); - input.resize( input.size() - 1 ); // strip \0 - KCodecs::quotedPrintableEncode( input, output, false ); - } - - TQString value( output ); - addEscapes( value ); - textLine.append( ":" + value ); - } else { - TQString value( (*lineIt).value().asString() ); - addEscapes( value ); - textLine.append( ":" + value ); - } - - if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line - for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) - text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" ); - } else - text.append( textLine + "\r\n" ); - } - else { - // URIs can be full of weird symbols, etc. so bypass all checks - textLine = (*lineIt).identifier(); - TQString value( (*lineIt).value().asString() ); - addEscapes( value ); - textLine.append( ":" + value ); - text.append( textLine + "\r\n" ); - } - } - } - } - - text.append( "END:VCARD\r\n" ); - text.append( "\r\n" ); - } - - return text; -} diff --git a/kabc/vcardparser/vcardparser.h b/kabc/vcardparser/vcardparser.h deleted file mode 100644 index da5fdd46e..000000000 --- a/kabc/vcardparser/vcardparser.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef VCARDPARSER_H -#define VCARDPARSER_H - -#include "vcard.h" - -namespace KABC { - -class VCardParser -{ - public: - VCardParser(); - ~VCardParser(); - - static VCard::List parseVCards( const TQString& text ); - static TQString createVCards( const VCard::List& list ); - - private: - class VCardParserPrivate; - VCardParserPrivate *d; -}; - -} - -#endif diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp deleted file mode 100644 index 295360a03..000000000 --- a/kabc/vcardtool.cpp +++ /dev/null @@ -1,896 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include - -#include "agent.h" -#include "key.h" -#include "picture.h" -#include "secrecy.h" -#include "sound.h" - -#include "vcardtool.h" - -using namespace KABC; - -static bool needsEncoding( const TQString &value ) -{ - uint length = value.length(); - for ( uint i = 0; i < length; ++i ) { - char c = value.at( i ).latin1(); - if ( (c < 33 || c > 126) && c != ' ' && c != '=' ) - return true; - } - - return false; -} - -VCardTool::VCardTool() -{ - mAddressTypeMap.insert( "dom", Address::Dom ); - mAddressTypeMap.insert( "intl", Address::Intl ); - mAddressTypeMap.insert( "postal", Address::Postal ); - mAddressTypeMap.insert( "parcel", Address::Parcel ); - mAddressTypeMap.insert( "home", Address::Home ); - mAddressTypeMap.insert( "work", Address::Work ); - mAddressTypeMap.insert( "pref", Address::Pref ); - - mPhoneTypeMap.insert( "HOME", PhoneNumber::Home ); - mPhoneTypeMap.insert( "WORK", PhoneNumber::Work ); - mPhoneTypeMap.insert( "MSG", PhoneNumber::Msg ); - mPhoneTypeMap.insert( "PREF", PhoneNumber::Pref ); - mPhoneTypeMap.insert( "VOICE", PhoneNumber::Voice ); - mPhoneTypeMap.insert( "FAX", PhoneNumber::Fax ); - mPhoneTypeMap.insert( "CELL", PhoneNumber::Cell ); - mPhoneTypeMap.insert( "VIDEO", PhoneNumber::Video ); - mPhoneTypeMap.insert( "BBS", PhoneNumber::Bbs ); - mPhoneTypeMap.insert( "MODEM", PhoneNumber::Modem ); - mPhoneTypeMap.insert( "CAR", PhoneNumber::Car ); - mPhoneTypeMap.insert( "ISDN", PhoneNumber::Isdn ); - mPhoneTypeMap.insert( "PCS", PhoneNumber::Pcs ); - mPhoneTypeMap.insert( "PAGER", PhoneNumber::Pager ); -} - -VCardTool::~VCardTool() -{ -} - -// TODO: make list a const& -TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) -{ - VCard::List vCardList; - - Addressee::List::ConstIterator addrIt; - Addressee::List::ConstIterator listEnd( list.constEnd() ); - for ( addrIt = list.constBegin(); addrIt != listEnd; ++addrIt ) { - VCard card; - TQStringList::ConstIterator strIt; - - // ADR + LABEL - const Address::List addresses = (*addrIt).addresses(); - for ( Address::List::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { - TQStringList address; - - bool isEmpty = ( (*it).postOfficeBox().isEmpty() && - (*it).extended().isEmpty() && - (*it).street().isEmpty() && - (*it).locality().isEmpty() && - (*it).region().isEmpty() && - (*it).postalCode().isEmpty() && - (*it).country().isEmpty() ); - - address.append( (*it).postOfficeBox().replace( ';', "\\;" ) ); - address.append( (*it).extended().replace( ';', "\\;" ) ); - address.append( (*it).street().replace( ';', "\\;" ) ); - address.append( (*it).locality().replace( ';', "\\;" ) ); - address.append( (*it).region().replace( ';', "\\;" ) ); - address.append( (*it).postalCode().replace( ';', "\\;" ) ); - address.append( (*it).country().replace( ';', "\\;" ) ); - - VCardLine adrLine( "ADR", address.join( ";" ) ); - if ( version == VCard::v2_1 && needsEncoding( address.join( ";" ) ) ) { - adrLine.addParameter( "charset", "UTF-8" ); - adrLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - - VCardLine labelLine( "LABEL", (*it).label() ); - if ( version == VCard::v2_1 && needsEncoding( (*it).label() ) ) { - labelLine.addParameter( "charset", "UTF-8" ); - labelLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - - bool hasLabel = !(*it).label().isEmpty(); - TQMap::ConstIterator typeIt; - for ( typeIt = mAddressTypeMap.constBegin(); typeIt != mAddressTypeMap.constEnd(); ++typeIt ) { - if ( typeIt.data() & (*it).type() ) { - adrLine.addParameter( "TYPE", typeIt.key() ); - if ( hasLabel ) - labelLine.addParameter( "TYPE", typeIt.key() ); - } - } - - if ( !isEmpty ) - card.addLine( adrLine ); - if ( hasLabel ) - card.addLine( labelLine ); - } - - // AGENT - card.addLine( createAgent( version, (*addrIt).agent() ) ); - - // BDAY - card.addLine( VCardLine( "BDAY", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).birthday()) ) ) ); - - // CATEGORIES - if ( version == VCard::v3_0 ) { - TQStringList categories = (*addrIt).categories(); - TQStringList::Iterator catIt; - for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) - (*catIt).replace( ',', "\\," ); - - VCardLine catLine( "CATEGORIES", categories.join( "," ) ); - if ( version == VCard::v2_1 && needsEncoding( categories.join( "," ) ) ) { - catLine.addParameter( "charset", "UTF-8" ); - catLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - - card.addLine( catLine ); - } - - // CLASS - if ( version == VCard::v3_0 ) { - card.addLine( createSecrecy( (*addrIt).secrecy() ) ); - } - - // EMAIL - const TQStringList emails = (*addrIt).emails(); - bool pref = true; - for ( strIt = emails.begin(); strIt != emails.end(); ++strIt ) { - VCardLine line( "EMAIL", *strIt ); - if ( pref == true && emails.count() > 1 ) { - line.addParameter( "TYPE", "PREF" ); - pref = false; - } - card.addLine( line ); - } - - // FN - VCardLine fnLine( "FN", TQString((*addrIt).formattedName()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).formattedName() ) ) { - fnLine.addParameter( "charset", "UTF-8" ); - fnLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( fnLine ); - - // GEO - Geo geo = (*addrIt).geo(); - if ( geo.isValid() ) { - TQString str; - str.sprintf( "%.6f;%.6f", geo.latitude(), geo.longitude() ); - card.addLine( VCardLine( "GEO", str ) ); - } - - // KEY - const Key::List keys = (*addrIt).keys(); - Key::List::ConstIterator keyIt; - for ( keyIt = keys.begin(); keyIt != keys.end(); ++keyIt ) - card.addLine( createKey( *keyIt ) ); - - // LOGO - card.addLine( createPicture( "LOGO", (*addrIt).logo() ) ); - - // MAILER - VCardLine mailerLine( "MAILER", TQString((*addrIt).mailer()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).mailer() ) ) { - mailerLine.addParameter( "charset", "UTF-8" ); - mailerLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( mailerLine ); - - // N - TQStringList name; - name.append( (*addrIt).familyName().replace( ';', "\\;" ) ); - name.append( (*addrIt).givenName().replace( ';', "\\;" ) ); - name.append( (*addrIt).additionalName().replace( ';', "\\;" ) ); - name.append( (*addrIt).prefix().replace( ';', "\\;" ) ); - name.append( (*addrIt).suffix().replace( ';', "\\;" ) ); - - VCardLine nLine( "N", name.join( ";" ) ); - if ( version == VCard::v2_1 && needsEncoding( name.join( ";" ) ) ) { - nLine.addParameter( "charset", "UTF-8" ); - nLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( nLine ); - - // NAME - VCardLine nameLine( "NAME", TQString((*addrIt).name()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).name() ) ) { - nameLine.addParameter( "charset", "UTF-8" ); - nameLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( nameLine ); - - // NICKNAME - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "NICKNAME", TQString((*addrIt).nickName()) ) ); - - // NOTE - VCardLine noteLine( "NOTE", TQString((*addrIt).note()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).note() ) ) { - noteLine.addParameter( "charset", "UTF-8" ); - noteLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( noteLine ); - - // ORG - TQStringList organization; - organization.append( ( *addrIt ).organization().replace( ';', "\\;" ) ); - if ( !( *addrIt ).department().isEmpty() ) - organization.append( ( *addrIt ).department().replace( ';', "\\;" ) ); - VCardLine orgLine( "ORG", organization.join( ";" ) ); - if ( version == VCard::v2_1 && needsEncoding( organization.join( ";" ) ) ) { - orgLine.addParameter( "charset", "UTF-8" ); - orgLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( orgLine ); - - // PHOTO - card.addLine( createPicture( "PHOTO", (*addrIt).photo() ) ); - - // PROID - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "PRODID", TQString((*addrIt).productId()) ) ); - - // REV - card.addLine( VCardLine( "REV", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).revision()) ) ) ); - - // ROLE - VCardLine roleLine( "ROLE", TQString((*addrIt).role()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).role() ) ) { - roleLine.addParameter( "charset", "UTF-8" ); - roleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( roleLine ); - - // SORT-STRING - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "SORT-STRING", TQString((*addrIt).sortString()) ) ); - - // SOUND - card.addLine( createSound( (*addrIt).sound() ) ); - - // TEL - const PhoneNumber::List phoneNumbers = (*addrIt).phoneNumbers(); - PhoneNumber::List::ConstIterator phoneIt; - for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) { - VCardLine line( "TEL", (*phoneIt).number() ); - - TQMap::ConstIterator typeIt; - for ( typeIt = mPhoneTypeMap.constBegin(); typeIt != mPhoneTypeMap.constEnd(); ++typeIt ) { - if ( typeIt.data() & (*phoneIt).type() ) - line.addParameter( "TYPE", typeIt.key() ); - } - - card.addLine( line ); - } - - // TITLE - VCardLine titleLine( "TITLE", TQString((*addrIt).title()) ); - if ( version == VCard::v2_1 && needsEncoding( (*addrIt).title() ) ) { - titleLine.addParameter( "charset", "UTF-8" ); - titleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( titleLine ); - - // TZ - TimeZone timeZone = (*addrIt).timeZone(); - if ( timeZone.isValid() ) { - TQString str; - - int neg = 1; - if ( timeZone.offset() < 0 ) - neg = -1; - - str.sprintf( "%c%02d:%02d", ( timeZone.offset() >= 0 ? '+' : '-' ), - ( timeZone.offset() / 60 ) * neg, - ( timeZone.offset() % 60 ) * neg ); - - card.addLine( VCardLine( "TZ", str ) ); - } - - // UID - card.addLine( VCardLine( "UID", (*addrIt).uid() ) ); - - // UID - card.addLine( VCardLine( "URI", (*addrIt).uri() ) ); - - // URL - card.addLine( VCardLine( "URL", (*addrIt).url().url() ) ); - - // VERSION - if ( version == VCard::v2_1 ) - card.addLine( VCardLine( "VERSION", "2.1" ) ); - if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "VERSION", "3.0" ) ); - - // X- - const TQStringList customs = (*addrIt).customs(); - for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) { - TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) ); - TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 ); - if ( value.isEmpty() ) - continue; - - VCardLine line( identifier, value ); - if ( version == VCard::v2_1 && needsEncoding( value ) ) { - line.addParameter( "charset", "UTF-8" ); - line.addParameter( "encoding", "QUOTED-PRINTABLE" ); - } - card.addLine( line ); - } - - vCardList.append( card ); - } - - return VCardParser::createVCards( vCardList ); -} - -Addressee::List VCardTool::parseVCards( const TQString& vcard ) -{ - static const TQChar semicolonSep( ';' ); - static const TQChar commaSep( ',' ); - TQString identifier; - - Addressee::List addrList; - const VCard::List vCardList = VCardParser::parseVCards( vcard ); - - VCard::List::ConstIterator cardIt; - VCard::List::ConstIterator listEnd( vCardList.end() ); - for ( cardIt = vCardList.begin(); cardIt != listEnd; ++cardIt ) { - Addressee addr; - - const TQStringList idents = (*cardIt).identifiers(); - TQStringList::ConstIterator identIt; - TQStringList::ConstIterator identEnd( idents.end() ); - for ( identIt = idents.begin(); identIt != identEnd; ++identIt ) { - const VCardLine::List lines = (*cardIt).lines( (*identIt) ); - VCardLine::List::ConstIterator lineIt; - - // iterate over the lines - for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { - identifier = (*lineIt).identifier().lower(); - // ADR - if ( identifier == "adr" ) { - Address address; - const TQStringList addrParts = splitString( semicolonSep, (*lineIt).value().asString() ); - if ( addrParts.count() > 0 ) - address.setPostOfficeBox( addrParts[ 0 ] ); - if ( addrParts.count() > 1 ) - address.setExtended( addrParts[ 1 ] ); - if ( addrParts.count() > 2 ) - address.setStreet( addrParts[ 2 ] ); - if ( addrParts.count() > 3 ) - address.setLocality( addrParts[ 3 ] ); - if ( addrParts.count() > 4 ) - address.setRegion( addrParts[ 4 ] ); - if ( addrParts.count() > 5 ) - address.setPostalCode( addrParts[ 5 ] ); - if ( addrParts.count() > 6 ) - address.setCountry( addrParts[ 6 ] ); - - int type = 0; - - const TQStringList types = (*lineIt).parameters( "type" ); - for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) - type += mAddressTypeMap[ (*it).lower() ]; - - address.setType( type ); - addr.insertAddress( address ); - } - - // AGENT - else if ( identifier == "agent" ) - addr.setAgent( parseAgent( *lineIt ) ); - - // BDAY - else if ( identifier == "bday" ) - addr.setBirthday( parseDateTime( (*lineIt).value().asString() ) ); - - // CATEGORIES - else if ( identifier == "categories" ) { - const TQStringList categories = splitString( commaSep, (*lineIt).value().asString() ); - addr.setCategories( categories ); - } - - // CLASS - else if ( identifier == "class" ) - addr.setSecrecy( parseSecrecy( *lineIt ) ); - - // EMAIL - else if ( identifier == "email" ) { - const TQStringList types = (*lineIt).parameters( "type" ); - addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 ); - } - - // FN - else if ( identifier == "fn" ) - addr.setFormattedName( (*lineIt).value().asString() ); - - // GEO - else if ( identifier == "geo" ) { - Geo geo; - - const TQStringList geoParts = TQStringList::split( ';', (*lineIt).value().asString(), true ); - geo.setLatitude( geoParts[ 0 ].toFloat() ); - geo.setLongitude( geoParts[ 1 ].toFloat() ); - - addr.setGeo( geo ); - } - - // KEY - else if ( identifier == "key" ) - addr.insertKey( parseKey( *lineIt ) ); - - // LABEL - else if ( identifier == "label" ) { - int type = 0; - - const TQStringList types = (*lineIt).parameters( "type" ); - for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) - type += mAddressTypeMap[ (*it).lower() ]; - - bool available = false; - KABC::Address::List addressList = addr.addresses(); - KABC::Address::List::Iterator it; - for ( it = addressList.begin(); it != addressList.end(); ++it ) { - if ( (*it).type() == type ) { - (*it).setLabel( (*lineIt).value().asString() ); - addr.insertAddress( *it ); - available = true; - break; - } - } - - if ( !available ) { // a standalone LABEL tag - KABC::Address address( type ); - address.setLabel( (*lineIt).value().asString() ); - addr.insertAddress( address ); - } - } - - // LOGO - else if ( identifier == "logo" ) - addr.setLogo( parsePicture( *lineIt ) ); - - // MAILER - else if ( identifier == "mailer" ) - addr.setMailer( (*lineIt).value().asString() ); - - // N - else if ( identifier == "n" ) { - const TQStringList nameParts = splitString( semicolonSep, (*lineIt).value().asString() ); - if ( nameParts.count() > 0 ) - addr.setFamilyName( nameParts[ 0 ] ); - if ( nameParts.count() > 1 ) - addr.setGivenName( nameParts[ 1 ] ); - if ( nameParts.count() > 2 ) - addr.setAdditionalName( nameParts[ 2 ] ); - if ( nameParts.count() > 3 ) - addr.setPrefix( nameParts[ 3 ] ); - if ( nameParts.count() > 4 ) - addr.setSuffix( nameParts[ 4 ] ); - } - - // NAME - else if ( identifier == "name" ) - addr.setName( (*lineIt).value().asString() ); - - // NICKNAME - else if ( identifier == "nickname" ) - addr.setNickName( (*lineIt).value().asString() ); - - // NOTE - else if ( identifier == "note" ) - addr.setNote( (*lineIt).value().asString() ); - - // ORGANIZATION - else if ( identifier == "org" ) { - const TQStringList orgParts = splitString( semicolonSep, (*lineIt).value().asString() ); - if ( orgParts.count() > 0 ) - addr.setOrganization( orgParts[ 0 ] ); - if ( orgParts.count() > 1 ) - addr.setDepartment( orgParts[ 1 ] ); - } - - // PHOTO - else if ( identifier == "photo" ) - addr.setPhoto( parsePicture( *lineIt ) ); - - // PROID - else if ( identifier == "prodid" ) - addr.setProductId( (*lineIt).value().asString() ); - - // REV - else if ( identifier == "rev" ) - addr.setRevision( parseDateTime( (*lineIt).value().asString() ) ); - - // ROLE - else if ( identifier == "role" ) - addr.setRole( (*lineIt).value().asString() ); - - // SORT-STRING - else if ( identifier == "sort-string" ) - addr.setSortString( (*lineIt).value().asString() ); - - // SOUND - else if ( identifier == "sound" ) - addr.setSound( parseSound( *lineIt ) ); - - // TEL - else if ( identifier == "tel" ) { - PhoneNumber phone; - phone.setNumber( (*lineIt).value().asString() ); - - int type = 0; - - const TQStringList types = (*lineIt).parameters( "type" ); - for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) - type += mPhoneTypeMap[(*it).upper()]; - - phone.setType( type ); - - addr.insertPhoneNumber( phone ); - } - - // TITLE - else if ( identifier == "title" ) - addr.setTitle( (*lineIt).value().asString() ); - - // TZ - else if ( identifier == "tz" ) { - TimeZone tz; - const TQString date = (*lineIt).value().asString(); - - int hours = date.mid( 1, 2).toInt(); - int minutes = date.mid( 4, 2 ).toInt(); - int offset = ( hours * 60 ) + minutes; - offset = offset * ( date[ 0 ] == '+' ? 1 : -1 ); - - tz.setOffset( offset ); - addr.setTimeZone( tz ); - } - - // UID - else if ( identifier == "uid" ) - addr.setUid( (*lineIt).value().asString() ); - - // URI - else if ( identifier == "uri" ) - addr.setUri( (*lineIt).value().asString() ); - - // URL - else if ( identifier == "url" ) - addr.setUrl( KURL( (*lineIt).value().asString() ) ); - - // X- - else if ( identifier.startsWith( "x-" ) ) { - const TQString key = (*lineIt).identifier().mid( 2 ); - int dash = key.find( "-" ); - addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() ); - } - } - } - - addrList.append( addr ); - } - - return addrList; -} - -TQDateTime VCardTool::parseDateTime( const TQString &str ) -{ - TQDateTime dateTime; - - if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd) - dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(), - str.mid( 6, 2 ).toInt() ) ); - - if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss - dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), - str.mid( 17, 2 ).toInt() ) ); - - } else { // is extended format yyyy-mm-dd - dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(), - str.mid( 8, 2 ).toInt() ) ); - - if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss - dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), - str.mid( 17, 2 ).toInt() ) ); - } - - return dateTime; -} - -TQString VCardTool::createDateTime( const TQDateTime &dateTime ) -{ - TQString str; - - if ( dateTime.date().isValid() ) { - str.sprintf( "%4d-%02d-%02d", dateTime.date().year(), dateTime.date().month(), - dateTime.date().day() ); - if ( dateTime.time().isValid() ) { - TQString tmp; - tmp.sprintf( "T%02d:%02d:%02dZ", dateTime.time().hour(), dateTime.time().minute(), - dateTime.time().second() ); - str += tmp; - } - } - - return str; -} - -Picture VCardTool::parsePicture( const VCardLine &line ) -{ - Picture pic; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) { - TQImage img; - img.loadFromData( line.value().asByteArray() ); - pic.setData( img ); - } else if ( params.findIndex( "value" ) != -1 ) { - if ( line.parameter( "value" ).lower() == "uri" ) - pic.setUrl( line.value().asString() ); - } - - if ( params.findIndex( "type" ) != -1 ) - pic.setType( line.parameter( "type" ) ); - - return pic; -} - -VCardLine VCardTool::createPicture( const TQString &identifier, const Picture &pic ) -{ - VCardLine line( identifier ); - - if ( pic.isIntern() ) { - if ( !pic.data().isNull() ) { - TQByteArray input; - TQBuffer buffer( input ); - buffer.open( IO_WriteOnly ); - - TQImageIO iio( &buffer, "JPEG" ); - iio.setImage( pic.data() ); - iio.setQuality( 100 ); - iio.write(); - - line.setValue( input ); - line.addParameter( "encoding", "b" ); - line.addParameter( "type", "image/jpeg" ); - } - } else if ( !pic.url().isEmpty() ) { - line.setValue( pic.url() ); - line.addParameter( "value", "URI" ); - } - - return line; -} - -Sound VCardTool::parseSound( const VCardLine &line ) -{ - Sound snd; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) - snd.setData( line.value().asByteArray() ); - else if ( params.findIndex( "value" ) != -1 ) { - if ( line.parameter( "value" ).lower() == "uri" ) - snd.setUrl( line.value().asString() ); - } - -/* TODO: support sound types - if ( params.contains( "type" ) ) - snd.setType( line.parameter( "type" ) ); -*/ - - return snd; -} - -VCardLine VCardTool::createSound( const Sound &snd ) -{ - VCardLine line( "SOUND" ); - - if ( snd.isIntern() ) { - if ( !snd.data().isEmpty() ) { - line.setValue( snd.data() ); - line.addParameter( "encoding", "b" ); - // TODO: need to store sound type!!! - } - } else if ( !snd.url().isEmpty() ) { - line.setValue( snd.url() ); - line.addParameter( "value", "URI" ); - } - - return line; -} - -Key VCardTool::parseKey( const VCardLine &line ) -{ - Key key; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) - key.setBinaryData( line.value().asByteArray() ); - else - key.setTextData( line.value().asString() ); - - if ( params.findIndex( "type" ) != -1 ) { - if ( line.parameter( "type" ).lower() == "x509" ) - key.setType( Key::X509 ); - else if ( line.parameter( "type" ).lower() == "pgp" ) - key.setType( Key::PGP ); - else { - key.setType( Key::Custom ); - key.setCustomTypeString( line.parameter( "type" ) ); - } - } - - return key; -} - -VCardLine VCardTool::createKey( const Key &key ) -{ - VCardLine line( "KEY" ); - - if ( key.isBinary() ) { - if ( !key.binaryData().isEmpty() ) { - line.setValue( key.binaryData() ); - line.addParameter( "encoding", "b" ); - } - } else if ( !key.textData().isEmpty() ) - line.setValue( key.textData() ); - - if ( key.type() == Key::X509 ) - line.addParameter( "type", "X509" ); - else if ( key.type() == Key::PGP ) - line.addParameter( "type", "PGP" ); - else if ( key.type() == Key::Custom ) - line.addParameter( "type", key.customTypeString() ); - - return line; -} - -Secrecy VCardTool::parseSecrecy( const VCardLine &line ) -{ - Secrecy secrecy; - - if ( line.value().asString().lower() == "public" ) - secrecy.setType( Secrecy::Public ); - if ( line.value().asString().lower() == "private" ) - secrecy.setType( Secrecy::Private ); - if ( line.value().asString().lower() == "confidential" ) - secrecy.setType( Secrecy::Confidential ); - - return secrecy; -} - -VCardLine VCardTool::createSecrecy( const Secrecy &secrecy ) -{ - VCardLine line( "CLASS" ); - - int type = secrecy.type(); - - if ( type == Secrecy::Public ) - line.setValue( "PUBLIC" ); - else if ( type == Secrecy::Private ) - line.setValue( "PRIVATE" ); - else if ( type == Secrecy::Confidential ) - line.setValue( "CONFIDENTIAL" ); - - return line; -} - -Agent VCardTool::parseAgent( const VCardLine &line ) -{ - Agent agent; - - const TQStringList params = line.parameterList(); - if ( params.findIndex( "value" ) != -1 ) { - if ( line.parameter( "value" ).lower() == "uri" ) - agent.setUrl( line.value().asString() ); - } else { - TQString str = line.value().asString(); - str.replace( "\\n", "\r\n" ); - str.replace( "\\N", "\r\n" ); - str.replace( "\\;", ";" ); - str.replace( "\\:", ":" ); - str.replace( "\\,", "," ); - - const Addressee::List list = parseVCards( str ); - if ( list.count() > 0 ) { - Addressee *addr = new Addressee; - *addr = list[ 0 ]; - agent.setAddressee( addr ); - } - } - - return agent; -} - -VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent ) -{ - VCardLine line( "AGENT" ); - - if ( agent.isIntern() ) { - if ( agent.addressee() != 0 ) { - Addressee::List list; - list.append( *agent.addressee() ); - - TQString str = createVCards( list, version ); - str.replace( "\r\n", "\\n" ); - str.replace( ";", "\\;" ); - str.replace( ":", "\\:" ); - str.replace( ",", "\\," ); - line.setValue( str ); - } - } else if ( !agent.url().isEmpty() ) { - line.setValue( agent.url() ); - line.addParameter( "value", "URI" ); - } - - return line; -} - -TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str ) -{ - TQStringList list; - TQString value( str ); - - int start = 0; - int pos = value.find( sep, start ); - - while ( pos != -1 ) { - if ( value[ pos - 1 ] != '\\' ) { - if ( pos > start && pos <= (int)value.length() ) - list << value.mid( start, pos - start ); - else - list << TQString::null; - - start = pos + 1; - pos = value.find( sep, start ); - } else { - if ( pos != 0 ) { - value.replace( pos - 1, 2, sep ); - pos = value.find( sep, pos ); - } else - pos = value.find( sep, pos + 1 ); - } - } - - int l = value.length() - 1; - if ( value.mid( start, l - start + 1 ).length() > 0 ) - list << value.mid( start, l - start + 1 ); - else - list << TQString::null; - - return list; -} diff --git a/kabc/vcardtool.h b/kabc/vcardtool.h deleted file mode 100644 index fbf959613..000000000 --- a/kabc/vcardtool.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2003 Tobias Koenig - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KABC_VCARDTOOL_H -#define KABC_VCARDTOOL_H - -#include "addressee.h" -#include "vcardparser.h" - -class TQDateTime; - -namespace KABC { - -class Agent; -class Key; -class Picture; -class Secrecy; -class Sound; - -class KABC_EXPORT VCardTool -{ - public: - VCardTool(); - ~VCardTool(); - - /** - Creates a string that contains the addressees from the list in - the vCard format. - */ - TQString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 ); - - /** - Parses the string and returns a list of addressee objects. - */ - Addressee::List parseVCards( const TQString& vcard ); - - private: - /** - Split a string and replaces escaped separators on the fly with - unescaped ones. - */ - TQStringList splitString( const TQChar &sep, const TQString &value ); - - TQDateTime parseDateTime( const TQString &str ); - TQString createDateTime( const TQDateTime &dateTime ); - - Picture parsePicture( const VCardLine &line ); - VCardLine createPicture( const TQString &identifier, const Picture &pic ); - - Sound parseSound( const VCardLine &line ); - VCardLine createSound( const Sound &snd ); - - Key parseKey( const VCardLine &line ); - VCardLine createKey( const Key &key ); - - Secrecy parseSecrecy( const VCardLine &line ); - VCardLine createSecrecy( const Secrecy &secrecy ); - - Agent parseAgent( const VCardLine &line ); - VCardLine createAgent( VCard::Version version, const Agent &agent ); - - TQMap mAddressTypeMap; - TQMap mPhoneTypeMap; - - class VCardToolPrivate; - VCardToolPrivate *d; -}; - -} - -#endif diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index d904e16ce..9bbe317df 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -27,7 +27,7 @@ #include "katejscript.h" #include "kateview.h" -#include +#include #include #include diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index 5a1a085c2..f29ec9915 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -23,7 +23,7 @@ #include "katedocument.h" #include "kateview.h" -#include +#include #include #include #include diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp index 7d930570d..61f81fadf 100644 --- a/kate/part/katebuffer.cpp +++ b/kate/part/katebuffer.cpp @@ -31,7 +31,7 @@ #include "kateautoindent.h" #include -#include +#include #include #include diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp index ad8943328..09dd46f13 100644 --- a/kate/part/katecmds.cpp +++ b/kate/part/katecmds.cpp @@ -32,7 +32,7 @@ #include "../interfaces/katecmd.h" #include -#include +#include #include #include diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp index 9c8e0856f..ed4eaacd2 100644 --- a/kate/part/kateconfig.cpp +++ b/kate/part/kateconfig.cpp @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 03257735c..1b8ce89eb 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -53,15 +53,15 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index 1928ec225..e42bfb0bd 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -49,24 +49,24 @@ #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h index a2a2c6408..adc0dc92a 100644 --- a/kate/part/katedocument.h +++ b/kate/part/katedocument.h @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/kate/part/katedocumenthelpers.cpp b/kate/part/katedocumenthelpers.cpp index e50906b0d..b2e43758f 100644 --- a/kate/part/katedocumenthelpers.cpp +++ b/kate/part/katedocumenthelpers.cpp @@ -25,7 +25,7 @@ #include "kateview.h" #include -#include +#include KateBrowserExtension::KateBrowserExtension( KateDocument* doc ) : KParts::BrowserExtension( doc, "katepartbrowserextension" ), diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp index eb760aaff..d6a9e0d59 100644 --- a/kate/part/katefactory.cpp +++ b/kate/part/katefactory.cpp @@ -34,7 +34,7 @@ #include "../interfaces/katecmd.h" #include -#include +#include #include #include diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index f0b01ef2d..281bf7e2d 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/katefont.cpp b/kate/part/katefont.cpp index 29955d7e2..c00953469 100644 --- a/kate/part/katefont.cpp +++ b/kate/part/katefont.cpp @@ -21,7 +21,7 @@ #include "katefont.h" -#include +#include #include diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index f6d5ae315..119b718fb 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -33,16 +33,16 @@ #include "kateconfig.h" #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp index f3a5cd548..cab335312 100644 --- a/kate/part/katejscript.cpp +++ b/kate/part/katejscript.cpp @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp index 46cf531a7..375b0b7d4 100644 --- a/kate/part/kateluaindentscript.cpp +++ b/kate/part/kateluaindentscript.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include extern "C" { #include diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 6f22b2407..e66119747 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -35,7 +35,7 @@ #include #include // for spacingHint() #include -#include +#include #include #include #include // for loginName diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 388513f17..5b71c92e8 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -27,7 +27,7 @@ #include "kateview.h" #include "katerenderer.h" -#include +#include #include #include #include @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index 9d0dc896b..930e4d906 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -31,9 +31,9 @@ #include "kateconfig.h" #include "katehighlight.h" -#include +#include #include -#include +#include #include #include #include diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index fc7e943cf..494e52894 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include KateSpell::KateSpell( KateView* view ) : TQObject( view ) diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp index d90f5de73..700daa9da 100644 --- a/kate/part/katesyntaxdocument.cpp +++ b/kate/part/katesyntaxdocument.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp index 6c701e1ed..005892607 100644 --- a/kate/part/katetextline.cpp +++ b/kate/part/katetextline.cpp @@ -23,7 +23,7 @@ #include "katetextline.h" #include "katerenderer.h" -#include +#include #include diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index 92d1bb97e..821cb0faf 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -57,10 +57,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index e8df70aa8..dd52451b0 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -33,10 +33,10 @@ #include "kateviewinternal.h" #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp index a687c5523..c2b0ca4db 100644 --- a/kate/part/kateviewinternal.cpp +++ b/kate/part/kateviewinternal.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index a503020c3..1b6decfe3 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index 495233d40..3f87f1580 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index 567262a64..e2e3d354a 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -28,10 +28,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index a36c9dc60..7cb01ccc9 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index d3b762b8e..e14cd9249 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include //END includes diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index 4a3d34207..26dce06d0 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kded/kbuildimageiofactory.cpp b/kded/kbuildimageiofactory.cpp index 267af31f6..b5873cad8 100644 --- a/kded/kbuildimageiofactory.cpp +++ b/kded/kbuildimageiofactory.cpp @@ -20,10 +20,10 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include -#include +#include #include #include diff --git a/kded/kbuildprotocolinfofactory.cpp b/kded/kbuildprotocolinfofactory.cpp index f3fe698d4..921e55ab9 100644 --- a/kded/kbuildprotocolinfofactory.cpp +++ b/kded/kbuildprotocolinfofactory.cpp @@ -21,11 +21,11 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include #include -#include +#include #include KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() : diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp index 7d9406d36..6f127caf2 100644 --- a/kded/kbuildservicefactory.cpp +++ b/kded/kbuildservicefactory.cpp @@ -23,10 +23,10 @@ #include "kresourcelist.h" #include "kmimetype.h" -#include +#include #include #include -#include +#include #include #include diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp index 76f27ba57..3903a6b39 100644 --- a/kded/kbuildservicegroupfactory.cpp +++ b/kded/kbuildservicegroupfactory.cpp @@ -21,11 +21,11 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include #include -#include +#include #include KBuildServiceGroupFactory::KBuildServiceGroupFactory() : diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp index 351b7847a..da2863347 100644 --- a/kded/kbuildservicetypefactory.cpp +++ b/kded/kbuildservicetypefactory.cpp @@ -21,11 +21,11 @@ #include "tdesycocadict.h" #include "kresourcelist.h" -#include +#include #include #include #include -#include +#include #include #include diff --git a/kded/kded.cpp b/kded/kded.cpp index b6e6b523f..947d3b816 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/kded/khostname.cpp b/kded/khostname.cpp index 7585e0ad0..c78152b97 100644 --- a/kded/khostname.cpp +++ b/kded/khostname.cpp @@ -30,9 +30,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kded/tde-menu.cpp b/kded/tde-menu.cpp index 4ad6bc3db..4cf7a843e 100644 --- a/kded/tde-menu.cpp +++ b/kded/tde-menu.cpp @@ -26,8 +26,8 @@ #include "tdeaboutdata.h" #include "tdeapplication.h" #include "tdecmdlineargs.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kservice.h" #include "kservicegroup.h" #include "kstandarddirs.h" diff --git a/kded/tdebuildsycoca.cpp b/kded/tdebuildsycoca.cpp index aa03c2c94..4325162f7 100644 --- a/kded/tdebuildsycoca.cpp +++ b/kded/tdebuildsycoca.cpp @@ -42,12 +42,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ #ifdef KBUILDSYCOCA_GUI // KBUILDSYCOCA_GUI is used on win32 to build // GUI version of tdebuildsycoca, so-called "tdebuildsycocaw". # include -# include +# include bool silent; bool showprogress; #endif diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index e2dc603ba..408c6af9a 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -23,7 +23,7 @@ #include // getenv #include -#include +#include #include #include #include diff --git a/kdewidgets/CMakeLists.txt b/kdewidgets/CMakeLists.txt index a0a6f29df..19768e7ef 100644 --- a/kdewidgets/CMakeLists.txt +++ b/kdewidgets/CMakeLists.txt @@ -61,6 +61,6 @@ add_custom_command( OUTPUT kdewidgets.cpp tde_add_kpart( ${target} AUTOMOC SOURCES ${${target}_SRCS} - LINK kabc-shared + LINK tdeabc-shared DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer ) diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets index c81df5394..81b5ba82a 100644 --- a/kdewidgets/kde.widgets +++ b/kdewidgets/kde.widgets @@ -272,7 +272,7 @@ Group=Display (KDE) ConstructorArgs=(parent, 210, 16) [KABC::LdapConfigWidget] -IncludeFile=kabc/ldapconfigwidget.h +IncludeFile=tdeabc/ldapconfigwidget.h ToolTip=A widget which allows the user to set up LDAP connection parameters Group=Input (KDE) ConstructorArgs=(KABC::LdapConfigWidget::W_ALL, parent, name) diff --git a/kdewidgets/tests/test.widgets b/kdewidgets/tests/test.widgets index 30758f69e..aa5ade889 100644 --- a/kdewidgets/tests/test.widgets +++ b/kdewidgets/tests/test.widgets @@ -261,7 +261,7 @@ Group=Display (KDE) ConstructorArgs=(parent, 210, 16) [KABC::AddressLineEdit] -IncludeFile=kabc/addresslineedit.h +IncludeFile=tdeabc/addresslineedit.h ToolTip=A lineedit with LDAP and kabc completion. Group=Input (KDE) ConstructorArgs=(parent, true, name) diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp index d0a1b7323..51f0b913a 100644 --- a/kdoctools/meinproc.cpp +++ b/kdoctools/meinproc.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kdoctools/tdeio_help.cpp b/kdoctools/tdeio_help.cpp index d9f306b43..7b9d2a36e 100644 --- a/kdoctools/tdeio_help.cpp +++ b/kdoctools/tdeio_help.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kdoctools/xslt.cpp b/kdoctools/xslt.cpp index 2eb03cfbc..498e6b2c8 100644 --- a/kdoctools/xslt.cpp +++ b/kdoctools/xslt.cpp @@ -12,7 +12,7 @@ #include #include #include "tdeio_help.h" -#include +#include #include #include #include diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp index d174bf893..22251002c 100644 --- a/kimgio/dds.cpp +++ b/kimgio/dds.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include // sqrtf diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp index d839ffe30..bcf916836 100644 --- a/kimgio/eps.cpp +++ b/kimgio/eps.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include "eps.h" diff --git a/kimgio/exr.cpp b/kimgio/exr.cpp index c28cb799b..563c151a2 100644 --- a/kimgio/exr.cpp +++ b/kimgio/exr.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/kimgio/gimp.h b/kimgio/gimp.h index 114ffdc0f..7da1a45f8 100644 --- a/kimgio/gimp.h +++ b/kimgio/gimp.h @@ -21,7 +21,7 @@ * */ -#include +#include /* * These are the constants and functions I extracted from The GIMP source diff --git a/kimgio/hdr.cpp b/kimgio/hdr.cpp index 82cba5c12..5f1832f02 100644 --- a/kimgio/hdr.cpp +++ b/kimgio/hdr.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include typedef TQ_UINT8 uchar; diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp index 2200c948c..5de8fff8e 100644 --- a/kimgio/jp2.cpp +++ b/kimgio/jp2.cpp @@ -12,7 +12,7 @@ #ifdef HAVE_STDINT_H #include #endif -#include +#include #include #include #include diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp index 4e4ad1f56..ccdbd3d97 100644 --- a/kinit/autostart.cpp +++ b/kinit/autostart.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index f6b4a3e59..1dc03002d 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -54,11 +54,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #ifdef HAVE_SYS_PRCTL_H #include @@ -68,7 +68,7 @@ #endif #if defined Q_WS_X11 && ! defined K_WS_QTONLY -#include // schroder +#include // schroder #endif #include diff --git a/kinit/tdelauncher.cpp b/kinit/tdelauncher.cpp index 7b75bfaf5..f7ca08678 100644 --- a/kinit/tdelauncher.cpp +++ b/kinit/tdelauncher.cpp @@ -32,16 +32,16 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #if defined Q_WS_X11 && ! defined K_WS_QTONLY -#include // schroder +#include // schroder #endif diff --git a/kinit/tdelauncher_main.cpp b/kinit/tdelauncher_main.cpp index d59cfb86f..747050668 100644 --- a/kinit/tdelauncher_main.cpp +++ b/kinit/tdelauncher_main.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "tdelauncher_cmds.h" diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index ccbde83d6..8c31712cb 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -21,12 +21,12 @@ #include "downloaddialog.h" #include "downloaddialog.moc" -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/knewstuff/engine.cpp b/knewstuff/engine.cpp index a22750f8b..2b33e85f5 100644 --- a/knewstuff/engine.cpp +++ b/knewstuff/engine.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include "knewstuff.h" diff --git a/knewstuff/entry.cpp b/knewstuff/entry.cpp index 56dd375f4..00f7df522 100644 --- a/knewstuff/entry.cpp +++ b/knewstuff/entry.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include using namespace KNS; diff --git a/knewstuff/ghns.cpp b/knewstuff/ghns.cpp index dfe86a2a4..0702f16bb 100644 --- a/knewstuff/ghns.cpp +++ b/knewstuff/ghns.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp index 07034b454..b652ba4a8 100644 --- a/knewstuff/knewstuff.cpp +++ b/knewstuff/knewstuff.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "engine.h" diff --git a/knewstuff/knewstuffbutton.cpp b/knewstuff/knewstuffbutton.cpp index 3ad0d6ac6..3baa83397 100644 --- a/knewstuff/knewstuffbutton.cpp +++ b/knewstuff/knewstuffbutton.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include "downloaddialog.h" #include "knewstuffbutton.h" diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp index aa94559b9..ef6a37456 100644 --- a/knewstuff/knewstuffgeneric.cpp +++ b/knewstuff/knewstuffgeneric.cpp @@ -24,11 +24,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include "entry.h" diff --git a/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp index b61924243..67374800e 100644 --- a/knewstuff/knewstuffsecure.cpp +++ b/knewstuff/knewstuffsecure.cpp @@ -18,10 +18,10 @@ //kde includes #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp index d5da6bdde..20f1668f7 100644 --- a/knewstuff/provider.cpp +++ b/knewstuff/provider.cpp @@ -21,9 +21,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp index ddc0b2ef3..f71558ecd 100644 --- a/knewstuff/providerdialog.cpp +++ b/knewstuff/providerdialog.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include "engine.h" #include "provider.h" diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp index d9ad85a7c..d161c2969 100644 --- a/knewstuff/security.cpp +++ b/knewstuff/security.cpp @@ -22,9 +22,9 @@ //kde includes #include #include -#include +#include #include -#include +#include #include #include diff --git a/knewstuff/tdehotnewstuff.cpp b/knewstuff/tdehotnewstuff.cpp index 87d735330..fb9e92a9b 100644 --- a/knewstuff/tdehotnewstuff.cpp +++ b/knewstuff/tdehotnewstuff.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp index 82b6d18f7..3494c5230 100644 --- a/knewstuff/testnewstuff.cpp +++ b/knewstuff/testnewstuff.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp index 98f8f60c7..f4b3dd50e 100644 --- a/knewstuff/uploaddialog.cpp +++ b/knewstuff/uploaddialog.cpp @@ -27,10 +27,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp index 9de7f1bfd..f271113ca 100644 --- a/kstyles/highcontrast/config/highcontrastconfig.cpp +++ b/kstyles/highcontrast/config/highcontrastconfig.cpp @@ -28,8 +28,8 @@ DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include +#include +#include #include "highcontrastconfig.h" diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index 5c083632e..a169de874 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -24,7 +24,7 @@ #include "klegacystyle.h" #include "klegacystyle.moc" -#include +#include #include #define INCLUDE_MENUITEM_DEF diff --git a/kstyles/klegacy/plugin.cpp b/kstyles/klegacy/plugin.cpp index 5d3a58492..558b54e73 100644 --- a/kstyles/klegacy/plugin.cpp +++ b/kstyles/klegacy/plugin.cpp @@ -1,5 +1,5 @@ #include "klegacystyle.h" -#include +#include extern "C" { TDEStyle* allocate(); diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index 4cc374e5d..a164821b1 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -53,7 +53,7 @@ Port version 0.9.7 #include #include #include -#include +#include #include #include #include diff --git a/kstyles/plastik/config/plastitdeconf.cpp b/kstyles/plastik/config/plastitdeconf.cpp index 8d3e4acfd..38cda2426 100644 --- a/kstyles/plastik/config/plastitdeconf.cpp +++ b/kstyles/plastik/config/plastitdeconf.cpp @@ -30,8 +30,8 @@ DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include +#include +#include #include #include diff --git a/kstyles/utils/installtheme/main.cpp b/kstyles/utils/installtheme/main.cpp index 274c2d335..3ce63dfdf 100644 --- a/kstyles/utils/installtheme/main.cpp +++ b/kstyles/utils/installtheme/main.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kstyles/web/plugin.cpp b/kstyles/web/plugin.cpp index 6ab10ebd8..bd4371ce3 100644 --- a/kstyles/web/plugin.cpp +++ b/kstyles/web/plugin.cpp @@ -1,4 +1,4 @@ -#include +#include #include "webstyle.h" extern "C" diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index d96688ee0..b3b461954 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include diff --git a/libtdemid/deviceman.cc b/libtdemid/deviceman.cc index b8210af6d..fec0ff090 100644 --- a/libtdemid/deviceman.cc +++ b/libtdemid/deviceman.cc @@ -67,7 +67,7 @@ #if 1 #include -#include +#include #include #endif diff --git a/libtdescreensaver/main.cpp b/libtdescreensaver/main.cpp index f9d8ccb17..073d7845d 100644 --- a/libtdescreensaver/main.cpp +++ b/libtdescreensaver/main.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp index c37214ecd..f36220886 100644 --- a/networkstatus/connectionmanager.cpp +++ b/networkstatus/connectionmanager.cpp @@ -20,8 +20,8 @@ */ #include -#include -#include +#include +#include #include #include "clientiface_stub.h" diff --git a/networkstatus/networkstatusindicator.cpp b/networkstatus/networkstatusindicator.cpp index 957d6f739..a77f1c1fd 100644 --- a/networkstatus/networkstatusindicator.cpp +++ b/networkstatus/networkstatusindicator.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "connectionmanager.h" diff --git a/tdeabc/CMakeLists.txt b/tdeabc/CMakeLists.txt new file mode 100644 index 000000000..e0ec832d0 --- /dev/null +++ b/tdeabc/CMakeLists.txt @@ -0,0 +1,123 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( vcard ) +add_subdirectory( vcardparser ) +add_subdirectory( formats ) +add_subdirectory( plugins ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include + ${CMAKE_CURRENT_SOURCE_DIR}/vcard/include/generated + ${CMAKE_CURRENT_SOURCE_DIR}/vcardparser + + # external includes + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/kab +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + address.h addressbook.h addresseedialog.h + agent.h distributionlist.h distributionlistdialog.h + distributionlisteditor.h errorhandler.h field.h + format.h formatfactory.h formatplugin.h geo.h key.h + phonenumber.h picture.h plugin.h resource.h secrecy.h + resourceselectdialog.h sound.h stdaddressbook.h + timezone.h vcardconverter.h vcardformat.h lock.h + vcardformatplugin.h ldifconverter.h addresslineedit.h + ldapclient.h addresseelist.h locknull.h ldif.h + ldapurl.h ldapconfigwidget.h sortmode.h + ${CMAKE_CURRENT_BINARY_DIR}/addressee.h + DESTINATION ${INCLUDE_INSTALL_DIR}/tdeabc ) + + +##### other data ################################ + +install( FILES tdeab2tdeabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) +install( FILES kabc_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources ) +install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/tdeabc ) + + +##### generated files ########################### +# FIXME this hack make compatibility with out-of-source mode + +file( COPY + scripts/makeaddressee scripts/addressee.src.cpp + scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp + DESTINATION scripts ) + +add_custom_command( + OUTPUT addressee.cpp addressee.h field.cpp + COMMAND perl + ARGS makeaddressee + DEPENDS scripts/addressee.src.cpp scripts/addressee.src.h scripts/entrylist scripts/field.src.cpp + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts +) + + +##### tdeabc ###################################### + +set( target tdeabc ) + +set( ${target}_SRCS + address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp + agent.cpp distributionlist.cpp distributionlistdialog.cpp + distributionlisteditor.cpp errorhandler.cpp field.cpp + formatfactory.cpp geo.cpp key.cpp phonenumber.cpp + picture.cpp plugin.cpp resource.cpp resourceselectdialog.cpp + secrecy.cpp sound.cpp stdaddressbook.cpp timezone.cpp + vcard21parser.cpp vcardconverter.cpp vcardformat.cpp + vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp + addresslineedit.cpp ldapclient.cpp addresseelist.cpp + vcardtool.cpp addresseehelper.cpp lock.cpp locknull.cpp + ldif.cpp ldapurl.cpp ldapconfigwidget.cpp sortmode.cpp + addresseehelper.skel +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.2.0 + LINK vcards-static vcard-shared tdeio-shared tderesources-shared + DEPENDENCIES addressee.h dcopidl + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### tdeab2tdeabc ################################## + +set( target tdeab2tdeabc ) + +set( ${target}_SRCS + tdeab2tdeabc.cpp +) + +tde_add_executable( ${target} + SOURCES ${${target}_SRCS} + LINK kab-static tdeabc-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/tdeabc/HACKING b/tdeabc/HACKING new file mode 100644 index 000000000..429ae0865 --- /dev/null +++ b/tdeabc/HACKING @@ -0,0 +1,100 @@ +Coding Style +============ + +See http://korganizer.kde.org/hacking.html for an HTML version. + +Formatting +---------- + +- No Tabs. +- Indent with 2 spaces. +- A line must not have more than 80 chars. +- Put Spaces between brackets and arguments of functions. +- For if, else, while and similar statements put the brackets on the same line + as the statement. +- Function and class definitions have their brackets on separate lines. + +Example: + +void MyClass::myFunction() +{ + if ( blah == fasel ) { + blubbVariable = arglValue; + } else { + blubbVariable = oerxValue; + } +} + + +Header Formatting +----------------- + +- General formatting rules apply. +- Access modifiers are indented. +- Put curly brackets of class definition on its own line. +- Double inclusion protection defines are all upper case letters and are + composed of the namespace (if available), the classname and a H suffix + separated by underscores. +- Inside a namespace there is no indentation. + +Example: + +#ifndef XKJ_MYCLASS_H +#define XKJ_MYCLASS_H + +namespace XKJ { + +class MyClass +{ + public: + MyClass(); + + private: + int mMyInt; +}; + +} + +#endif + + +API docs +-------- + +- Each public function must have a Doxygen compatible comment in the header +- Use C-style comments without additional asterisks +- Indent correctly. +- Comments should be grammatically correct, e.g. sentences start with uppercase + letters and end with a full stop. +- Be concise. + +Example: + + /** + This function makes tea. + + @param cups number of cups. + @result tea + */ + Tea makeTea( int cups ); + + +Class and File Names +-------------------- + +- Put classes in files, which have the same name as the class, but only + lower-case letters. +- Designer-generated files should have a name classname_base.ui and shoul + contain a class called ClassnameBase. +- Classes inheriting from designer-generated classes have the same name as the + generated class, but without the Base suffix. + +Class and Variable Names +------------------------ + +- For class, variable, function names seperate multiple words by upper-casing + the words precedeed by other words. +- Class names start with an upper-case letter. +- Function names start with a lower-case letter. +- Variable names start with a lower-case letter. +- Member variables of a class start with "m" followed by an upper-case letter. diff --git a/tdeabc/HOWTO b/tdeabc/HOWTO new file mode 100644 index 000000000..3941b2033 --- /dev/null +++ b/tdeabc/HOWTO @@ -0,0 +1,372 @@ +The KDE Address Book Framework +=============================== + +The KDE address book framework tries to provide an easy to use and powerful +mechanism to handle contacts in all KDE applications. + +If you want to make use of it, this small introduction to programming +with libkabc may be helpful. + + +General Concepts +================= + +In libkabc the storage and management of contacts is devided in 2 layers. + +****************** +Management Layer * +****************** + + .-------------------. + | KABC::AddressBook | + .--------------------------------. + | KABC::Addressee | => Iterators + | KABC::Addressee | + | KABC::Addressee | => Search functions + | ... | + `--------------------------------' + | + - - - - - - - - - - - | - - - - - - - - - - - - - + | +*************** | +Storage Layer * | +*************** | ....................... + | . . - Network + .---------------. | . .---------------. . + | ResourceFile |----+-----| ResourceLDAP | . + `---------------' | . `---------------' . + .---------------. | . .---------------. . + | ResourceDir |----+-----| ResourceNet | . + `---------------' . `---------------' . + . . + ....................... + + +The Management Layer +--------------------- +The Management Layer consists of the two classes KABC::AddressBook and +KABC::Addressee. KABC::AddressBook is a container for KABC::Addressee objects +and provides 2 kinds of access methods. +1) Iterators + With iterators you can iterate over each of the contacts of the + address book and perform an action on it + +2) Search functions + With search functions you can search for contacts with special attributes + such as "all contacts with the name 'Harald'" + +The class KABC::Addressee represents a single contact and contains all data +a vCard could store (as specified in RFC 2426). + +The Storage Layer +------------------ +The Storage Layer consists of the class KABC::Resource and its derived classes. +These classes are used by KABC::AddressBook to load and store the contacts to +the single backends. +At the moment libkabc provides 4 types of resources: +1) ResourceFile + - stores all contacts in a single file + +2) ResourceDir + - stores each contact in its own file with the unique identifier of the + contact as a filename, will all of the files together in one directory + +3) ResourceLDAP + - stores all of the contacts on a LDAP server + +4) ResourceNet + - stores all contacts in a single file, which can be accessable via HTTP, + FTP, Fish, WebDAV, POP3, IMAP or whatever the KIO frame work supports + +In general the developer does not have to take how to save the single contacts. +He just has to plug one of the above mentioned resources into KABC::AddressBook +and perform a save action. + +Examples +========= +Like a picture, C/C++ code is worth a 1000 words I'd like to give you a +lot of examples now, how to use libkabc for several tasks: + + +Using KABC::StdAddressBook and Iterators +----------------------------------------- +Normally you have to plugin the resources manually into the addressbook object +and call the load() function before you can access the contacts, but there is +a special class KABC::StdAddressBook, which loads all resources of the standard +address book of the user automatically. You can use it the following way: + + + #include + + 1: KABC::AddressBook *ab = KABC::StdAddressBook::self(); + 2: KABC::AddressBook::Iterator it; + 3: for ( it = ab->begin(); it != ab->end(); ++it ) { + 4: KABC::Addressee addr = (*it); + 5: + 6: kdDebug() << "Name = " << addr.formattedName() << endl; + 7: } + +The above example prints out the names of all the contacts in the user's address +book. In line 1 you retrieve a pointer to the user's standard address book +(provided by KABC::StdAddressBook via a singleton design pattern). +In line 2 an iterator is defined, which is used in line 3 to iterate over the +whole address book. The assignment in line 4 is intended only to show more +clearly how iterators function. +You could also use (*it).formattedName() directly. In line 6 the formatted name +of the current contact is printed out to stderr. +As you can see that's all magic, and it's quite easy ;) + + +Using KABC::AddressBook manually +--------------------------------- +In some cases you don't want to load the user's standard address book, but, +for example, just a single vCard. For this purpose you have to use the +class KABC::AddressBook and handle the resource stuff manually. +The following code will create a file resource and save a contact into it: + + + #include + #include + + 1: KABC::AddressBook ab; + 2: + 3: // create a file resource + 4: KABC::Resource *res = new KABC::ResourceFile( "/home/user/myvcard.vcf", "vcard" ); + 5: + 6: if ( !ab.addResource( res ) ) { + 7: kdDebug() << "Unable to open resource" << endl; + 8: return 1; + 9: } +10: +11: if ( !ab.load() ) { +12: kdDebug() << "Unable to load address book!" << endl; +13: return 2; +14: } +15: +16: KABC::Addressee addr; +17: addr.setNameFromString( "Otto Harald Meyer" ); +18: addr.setBirthday( QDate( 1982, 07, 19 ) ); +19: addr.setNickName( "otto" ); +20: addr.setMailer( "kmail" ); +21: +22: // TZ +23: KABC::TimeZone tz( 60 ); // takes time shift in minutes as argument +24: addr.setTimeZone( tz ); +25: +26: // GEO +27: KABC::Geo geo( 52.5, 13.36 ); // takes latitude and longitude as argument +28: addr.setGeo( geo ); +29: +30: addr.setTitle( "dude, the" ); +31: addr.setRole( "developer" ); +32: addr.setOrganization( "KDE e.V." ); +33: addr.setNote( "Yet another senseless note..." ); +34: addr.setUrl( KURL( "http://kaddressbook.org" ) ); +35: +36: // CLASS +37: KABC::Secrecy secrecy( KABC::Secrecy::Confidential ); +38: addr.setSecrecy( secrecy ); +39: +40: // PHOTO or LOGO +41: KABC::Picture photo; +42: QImage img; +43: if ( img.load( "face.png", "PNG" ) ) { +44: photo.setData( img ); +45: photo.setType( "image/png" ); +46: addr.setPhoto( photo ); +47: } +48: +49: addr.insertEmail( "otto@kde.se", true ); // preferred email +50: addr.insertEmail( "otti@yahoo.com", false ); +51: +52: // TEL +53: KABC::PhoneNumber phoneHome( "0351 5466738", KABC::PhoneNumber::Home ); +54: KABC::PhoneNumber phoneWork( "0351 2335411", KABC::PhoneNumber::Work ); +55: addr.insertPhoneNumber( phoneHome ); +56: addr.insertPhoneNumber( phoneWork ); +57: +58: // ADR +59: KABC::Address homeAddr( KABC::Address::Home ); +60: homeAddr.setStreet( "Milliwaystreet 42" ); +61: homeAddr.setLocality( "London" ); +62: homeAddr.setRegion( "Saxony" ); +63: homeAddr.setPostalCode( "43435" ); +64: homeAddr.setCountry( "Germany" ); +65: addr.insertAddress( homeAddr ); +66: +67: addr.insertCategory( "LUG-Dresden-Members" ); +68: +69: addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", "21.04.2009" ); +70: +71: ab.insertAddressee( addr ); // will be assigned to the standard resource +72: // automatically +73: +74: KABC::Ticket *ticket = ab.requestSaveTicket( res ); +75: if ( !ticket ) { +76: kdError() << "Resource is locked by other application!" << endl; +77: } else { +78: if ( !ab.save( ticket ) ) { +79: kdError() << "Saving failed!" << endl; +80: ab.releaseSaveTicket( ticket ); +81: } +82: +83: } +84: +85: return 0; + +In line 1 the KABC::AddressBook is created. In line 4 you creat the +KABC::ResourceFile (which will handle the loading/saving). +The resource takes 2 arguments, the first is the file name and the +second one the file format. At the moment libkabc supports two file formats: +1) vCard, as specified in RFC 2426 +2) Binary, which increases performance during loading and saving + +In line 6 we try to plug the resource into the addressbook. The addressbook +class tries to open the resource immediately and returns whether opening was +successful. We add here only one resource, but you can add as many resources +as you want. + +In line 11 we try to load all contacts from the backends into the address book. +As before, it returns whether opening was successful. + +In line 16 a KABC::Addressee is created, which we will fill now with data, +before inserting it into the KABC::AddressBook. +The setNameFromString() function in the following line takes a string as +argument and tries to parse it into the single name components such as: given +name, family name, additional names, honoric prefix and honoric suffix. +You can set these values manually as well by calling + addr.setGivenName( "Otto" ); +and + addr.setFamilyName( "Meyer" ); +etc. etc. + +In line 23 we use the class KABC::TimeZone to store the timezone. This class +takes the time shift in minutes. + +In line 27 the KABC::Geo class is used for storing the geographical +information. The arguments are the latitude and longitude as float values. + +KABC::Secrecy in line 37 represents the CLASS entity of a vCard and can take +KABC::Secrecy::Public, KABC::Secrecy::Private or KABC::Secrecy::Confidential +as argument. + +In line 41 we make use of KABC::Picture class to store the photo of the +contact. This class can contain either an URL or the raw image data in form +of a QImage, in this example we use the latter. + +In line 43 we try to load the image "face.png" from the local directory and +assign this QImage to the KABC::Picture class via the setData() function. +Additionally we set the type of the picture to "image/png". + +From 49 - 50 we insert 2 email addresses with the first one as preferred +(second argument is true). + +In 53 and the following 3 lines we add two telephone numbers. For this purpose +libkabc provides the KABC::PhoneNumber class, which takes the phone number in +string representation as first argument and the type as second. The types can +be combined, so 'KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax' would be +the Home Fax. + +In line 59 we create a KABC::Address object and set the single parts in the +following lines. + +In line 67 we assign the contact to a special category. + +A contact can also contain custom entries, which are not specified in the API, +so you can add custom values with insertCustom() as shown in line 69. +The first argument of this function should be the name of the application, so +2 applications which use the same custom entry accidentally, do not overwrite +the data for each other. The second argument contains the name of the +custom entry and the third argument the value in string representation. + +In line 71 we finally insert the KABC::Addressee object into the +KABC::AddressBook. Since we have only one resource loaded, the contact is +automatically assigned to this resource. If you have several writeable +resources loaded, you should ask the user which resource the contact shall +belong to and assign the selected resource to the contact with + KABC::Addressee.setResource( KABC::Resource *resource ); +before inserting it into the address book. + +To prevent multiple access to one resource and possible resulting data loss +we have to lock the resource before saving our changes. +For this purpose KABC::AddressBook provides the function + requestSaveTicket( KABC::Resource* ) +which takes a pointer to the resource which shall be saved as argument and +returns a so called 'Save Ticket' if locking succeeded or a null pointer +if the resource is already locked by another application. + +So when we retrieved a valid ticket in line 74, we try to save our changes in +line 78. +The KABC::AddressBook::save() function takes the save ticket as argument and +returns whether saving succeeded. It also releases the save ticket when successful. + +Important! +If the save() call fails, you have to release the save ticket manually, as is +done in line 80, otherwise possible locks, created by the resources, won't be +removed. + +You can see also, that manual use is quite easy for the KABC::AddressBook class +and for the ResourceFile. For more information about the API of KABC::Addressee +please take a look at the official API documentation or the header files. + + +Distribution Lists +------------------- +libkabc provides so called distribution lists to group contacts. These lists +just store the uid of contacts, so they can be used for every kind of contact +grouping. There are 2 classes which handle the whole distribution list tasks, +KABC::DistributionListManager and KABC::DistributionList. The first one keeps +track of all available distribution lists and the latter one is the +representation of one list. + + + #include + #include + + 1: KABC::DistributionListManager manager( KABC::StdAddressBook::self() ); + 2: + 3: // load the lists + 4: manager.load(); + 5: + 6: QStringList listNames = manager.listNames(); + 7: QStringList::Iterator it; + 8: for ( it = listNames.begin(); it != listNames.end(); ++it ) { + 9: KABC::DistributionList *list = manager.list( *it ); +10: kdDebug() << list->name() << endl; +11: +12: QStringList emails = list->emails(); +13: QStringList::Iterator eit; +14: for ( eit = emails.begin(); eit != emails.end(); ++eit ) +15: kdDebug() << QString( "\t%1" ).arg( (*eit).latin1() ) << endl; +16: } + +In the first line a KABC::DistributionListManager is created. The manager takes +a pointer to a KABC::AddressBook, because he has to resolve the stored uids to +currently available email addresses. +In line 4 the manager loads all distribution lists from the central config file +$HOME/.trinity/share/apps/tdeabc/distlists. +The next line queries the names of all available distribution lists, which are +used in line 9 to retrieve a pointer to the specific list. +Now that you have a KABC::DistributionList object, you can performe the +following actions on it: + - set / get the name + - insert an entry + - remove an entry + - get a list of all email addresses + - get a list of all entries (which includes the uids) + +In line 12 we query all email addresses of every resource and print them out. + + contains also the declaration for the class +KABC::DistributionListWatcher. This class exists only once per application and +its only job is to emit a signal as soon as the distribution list file has +changed. So to make your application aware of changes use the following code: + + + #include + + 1: connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ), + 2: this, SLOT( slotDistributionListChanged() ) ); + +You see, as usual, easy ;) + diff --git a/tdeabc/Makefile.am b/tdeabc/Makefile.am new file mode 100644 index 000000000..57e72aec2 --- /dev/null +++ b/tdeabc/Makefile.am @@ -0,0 +1,72 @@ +SUBDIRS = vcard vcardparser . formats plugins scripts tests + +# Make sure $(all_includes) remains last! +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ + -I$(srcdir)/vcard/include -I$(srcdir)/vcardparser/ \ + -I$(srcdir)/vcard/include/generated \ + -I$(srcdir)/vcardparser $(all_includes) + +field.cpp: addressee.h addressee.cpp +addressee.cpp: addressee.h +addressee.cpp addressee.h field.cpp: \ + $(srcdir)/scripts/makeaddressee \ + $(srcdir)/scripts/addressee.src.cpp \ + $(srcdir)/scripts/addressee.src.h \ + $(srcdir)/scripts/entrylist \ + $(srcdir)/scripts/field.src.cpp + mysrcdir=`cd $(srcdir)/scripts && pwd` ;\ + cd scripts && $(PERL) $$mysrcdir/makeaddressee + +CLEANFILES = addressee.h addressee.cpp field.cpp + +lib_LTLIBRARIES = libkabc.la +libkabc_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 3:0:2 -no-undefined +libkabc_la_LIBADD = vcard/libvcard.la vcardparser/libvcards.la $(LIB_KIO) \ + $(top_builddir)/tderesources/libtderesources.la $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE) +libkabc_la_COMPILE_FIRST = addressee.h + +libkabc_la_SOURCES = \ + address.cpp addressbook.cpp addressee.cpp addresseedialog.cpp agent.cpp \ + distributionlist.cpp distributionlistdialog.cpp distributionlisteditor.cpp \ + errorhandler.cpp field.cpp formatfactory.cpp geo.cpp key.cpp \ + phonenumber.cpp picture.cpp plugin.cpp resource.cpp \ + resourceselectdialog.cpp secrecy.cpp sound.cpp stdaddressbook.cpp \ + timezone.cpp vcard21parser.cpp vcardconverter.cpp vcardformat.cpp \ + vcardformatimpl.cpp vcardformatplugin.cpp ldifconverter.cpp addresslineedit.cpp \ + ldapclient.cpp addresseelist.cpp vcardtool.cpp addresseehelper.cpp \ + addresseehelper.skel lock.cpp locknull.cpp ldif.cpp ldapurl.cpp ldapconfigwidget.cpp \ + sortmode.cpp + + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = address.h addressbook.h addressee.h addresseedialog.h \ + agent.h distributionlist.h distributionlistdialog.h distributionlisteditor.h \ + errorhandler.h field.h format.h formatfactory.h formatplugin.h geo.h key.h \ + phonenumber.h picture.h plugin.h resource.h \ + resourceselectdialog.h secrecy.h sound.h stdaddressbook.h timezone.h \ + vcardconverter.h vcardformat.h vcardformatplugin.h ldifconverter.h \ + addresslineedit.h ldapclient.h addresseelist.h lock.h locknull.h ldif.h \ + ldapurl.h ldapconfigwidget.h sortmode.h + +METASOURCES = AUTO + +bin_PROGRAMS = tdeab2tdeabc + +tdeab2tdeabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdeab2tdeabc_LDADD = libkabc.la ../kab/libkab.la +tdeab2tdeabc_SOURCES = tdeab2tdeabc.cpp + +autostart_DATA = tdeab2tdeabc.desktop +autostartdir = $(datadir)/autostart + +manager_DATA = kabc_manager.desktop +managerdir = $(kde_servicesdir)/tderesources + +DOXYGEN_REFERENCES = tdecore tdeui + +map_DATA = countrytransl.map +mapdir = $(kde_datadir)/kabc + +EXTRA_DIST = $(map_DATA) + +include ../admin/Doxyfile.am diff --git a/tdeabc/README b/tdeabc/README new file mode 100644 index 000000000..46d21b9b6 --- /dev/null +++ b/tdeabc/README @@ -0,0 +1,28 @@ +LIBKABC - new address book API for KDE + +PURPOSE: + +libkabc provides an API for address book data. This can be used by all KDE +application using data of this type, e.g. KAddressBook, KMail, KOrganizer, +KPilot etc. It is meant as replacement for libkab (in tdebase/kab). + +FEATURES: + +- Value based interface, addressbook entry data is implicitly shared. +- Address book entries are identified by a unique id. +- vCard backend (RFC 2425 / RFC 2426). +- Locking mechanism to support concurrent access to the address book by + multiple processes. +- Notification on change of addressbook by other process. +- Dialog for selecting address book entries, supports mouse and keyboard + selection, supports automatic name completion. +- GUI client for viewing, modifying address book data. This is aimed at + developers not end users. +- Tool for converting data, written with libkab, to libkabc format. +- Multiple backends (resources) for storing entries e.g. LDAP + +AUTHOR: Cornelius Schumacher + +LICENCE: LPGL + +DATE: 13 Oct 2001 diff --git a/tdeabc/README.AddressFormat b/tdeabc/README.AddressFormat new file mode 100644 index 000000000..8079e4914 --- /dev/null +++ b/tdeabc/README.AddressFormat @@ -0,0 +1,66 @@ +Address formats can be a tricky thing. libkabc tries very hard to perfectly fit +the needs of ~95% of users and to be at least sufficient for the other 5%. + +The formatting of an address depends on the destination country as well as on +the origin country of a letter. Basically, the part indicating the destination +country follows the rules of the country of origin, all the rest follows the +rules of the destination country. So we need to store for every country a) the +country positioning and b) the address formatting. + +Address formats should usually be stored in a country's entry.desktop. There we +store the country position in field "AddressCountryPosition" and the address +format in a field "AddressFormat". Note that for most countries one field +"AddressFormat" is sufficient for personal as well as company addresses +(because personal addresses look just like business addresses without company); +however, in some countries (eg. Hungary) business addresses differ in their +structure. In this case you have the possibility of adding another field +"BusinessAddressFormat" which will be preferred for formatting of business +addresses; if libkabc can't find such a field, it will fall back to +"AddressFormat". (Please use BusinessAddressFormat ONLY if you really need to) + +The format consists mainly of tags that will be replaced by address fields. +The list of tags may grow in the future, the format *might* change in the near +future, but I hope not. + +Any comments very very welcome to kde-pim@kde.org or to jost@schenck.de. + +-Jost. + +Fields AddressFormat and BusinessAddressFormat +------------------------------------------------ +%n = real name +%N = REAL NAME +%cm = company +%CM = COMPANY +%s = street +%S = STREET +%z = zip code +%l = location +%L = LOCATION +%r = region +%R = REGION +%p = post office box +%, = conditional comma+whitespace, + will be left out if the value left or right of it is purged +%w = conditional whitespace, + will be left out if the value left or right of it is purged +%0(...) = the text inside the brackets will be completely purged if not + at least one tag inside it evaluates to something. Example: when the + address doesn't have a postbox, the string %0(PO Box %p) will not + evaluate to "PO Box " but to an empty string. +\n = newline + +Field AddressCountryPosition +------------------------------------------------ +below = country name below rest of address +BELOW = country name below in capital letters +above = country name above rest of address +ABOVE = country name above in capital letters + +Some Tips +------------------------------------------------ +- You sometimes have three fields in a line which can all be empty. If you eg. +separate them all with conditional whitespace (same goes for cond. comma) like +in "%z%w%r%w%l" and only the middle value (here: region) is empty, there will +be no whitespace at all between the outer values (here: zipcode and location). +To avoid this, combine two of these values with purge brackets: %0(%z%w%r)%w%l. diff --git a/tdeabc/TODO b/tdeabc/TODO new file mode 100644 index 000000000..13f75b6bb --- /dev/null +++ b/tdeabc/TODO @@ -0,0 +1 @@ +Factor out TDELockFile. diff --git a/tdeabc/address.cpp b/tdeabc/address.cpp new file mode 100644 index 000000000..112a70617 --- /dev/null +++ b/tdeabc/address.cpp @@ -0,0 +1,592 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "address.h" + +#include +#include +#include +#include +#include +#include + +#include + +using namespace KABC; + +TQMap *Address::mISOMap = 0; +static KStaticDeleter< TQMap > isoMapDeleter; + +Address::Address() : + mEmpty( true ), mType( 0 ) +{ + mId = TDEApplication::randomString( 10 ); +} + +Address::Address( int type ) : + mEmpty( true ), mType( type ) +{ + mId = TDEApplication::randomString( 10 ); +} + +bool Address::operator==( const Address &a ) const +{ + if ( mPostOfficeBox != a.mPostOfficeBox ) return false; + if ( mExtended != a.mExtended ) return false; + if ( mStreet != a.mStreet ) return false; + if ( mLocality != a.mLocality ) return false; + if ( mRegion != a.mRegion ) return false; + if ( mPostalCode != a.mPostalCode ) return false; + if ( mCountry != a.mCountry ) return false; + if ( mLabel != a.mLabel ) return false; + + return true; +} + +bool Address::operator!=( const Address &a ) const +{ + return !( a == *this ); +} + +bool Address::isEmpty() const +{ + if ( mPostOfficeBox.isEmpty() && + mExtended.isEmpty() && + mStreet.isEmpty() && + mLocality.isEmpty() && + mRegion.isEmpty() && + mPostalCode.isEmpty() && + mCountry.isEmpty() && + mLabel.isEmpty() ) { + return true; + } + return false; +} + +void Address::clear() +{ + *this = Address(); +} + +void Address::setId( const TQString &id ) +{ + mEmpty = false; + + mId = id; +} + +TQString Address::id() const +{ + return mId; +} + +void Address::setType( int type ) +{ + mEmpty = false; + + mType = type; +} + +int Address::type() const +{ + return mType; +} + +TQString Address::typeLabel() const +{ + TQString label; + bool first = true; + + const TypeList list = typeList(); + + TypeList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { + label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); + if ( first ) + first = false; + } + } + + return label; +} + +void Address::setPostOfficeBox( const TQString &s ) +{ + mEmpty = false; + + mPostOfficeBox = s; +} + +TQString Address::postOfficeBox() const +{ + return mPostOfficeBox; +} + +TQString Address::postOfficeBoxLabel() +{ + return i18n("Post Office Box"); +} + + +void Address::setExtended( const TQString &s ) +{ + mEmpty = false; + + mExtended = s; +} + +TQString Address::extended() const +{ + return mExtended; +} + +TQString Address::extendedLabel() +{ + return i18n("Extended Address Information"); +} + + +void Address::setStreet( const TQString &s ) +{ + mEmpty = false; + + mStreet = s; +} + +TQString Address::street() const +{ + return mStreet; +} + +TQString Address::streetLabel() +{ + return i18n("Street"); +} + + +void Address::setLocality( const TQString &s ) +{ + mEmpty = false; + + mLocality = s; +} + +TQString Address::locality() const +{ + return mLocality; +} + +TQString Address::localityLabel() +{ + return i18n("Locality"); +} + + +void Address::setRegion( const TQString &s ) +{ + mEmpty = false; + + mRegion = s; +} + +TQString Address::region() const +{ + return mRegion; +} + +TQString Address::regionLabel() +{ + return i18n("Region"); +} + + +void Address::setPostalCode( const TQString &s ) +{ + mEmpty = false; + + mPostalCode = s; +} + +TQString Address::postalCode() const +{ + return mPostalCode; +} + +TQString Address::postalCodeLabel() +{ + return i18n("Postal Code"); +} + + +void Address::setCountry( const TQString &s ) +{ + mEmpty = false; + + mCountry = s; +} + +TQString Address::country() const +{ + return mCountry; +} + +TQString Address::countryLabel() +{ + return i18n("Country"); +} + + +void Address::setLabel( const TQString &s ) +{ + mEmpty = false; + + mLabel = s; +} + +TQString Address::label() const +{ + return mLabel; +} + +TQString Address::labelLabel() +{ + return i18n("Delivery Label"); +} + +Address::TypeList Address::typeList() +{ + static TypeList list; + + if ( list.isEmpty() ) + list << Dom << Intl << Postal << Parcel << Home << Work << Pref; + + return list; +} + +TQString Address::typeLabel( int type ) +{ + if ( type & Pref ) + return i18n( "Preferred address", "Preferred" ); + + switch ( type ) { + case Dom: + return i18n("Domestic"); + break; + case Intl: + return i18n("International"); + break; + case Postal: + return i18n("Postal"); + break; + case Parcel: + return i18n("Parcel"); + break; + case Home: + return i18n("Home Address", "Home"); + break; + case Work: + return i18n("Work Address", "Work"); + break; + case Pref: + return i18n("Preferred Address"); + break; + default: + return i18n("Other"); + break; + } +} + +void Address::dump() const +{ + kdDebug(5700) << " Address {" << endl; + kdDebug(5700) << " Id: " << id() << endl; + kdDebug(5700) << " Extended: " << extended() << endl; + kdDebug(5700) << " Street: " << street() << endl; + kdDebug(5700) << " Postal Code: " << postalCode() << endl; + kdDebug(5700) << " Locality: " << locality() << endl; + kdDebug(5700) << " }" << endl; +} + + +TQString Address::formattedAddress( const TQString &realName, + const TQString &orgaName ) const +{ + TQString ciso; + TQString addrTemplate; + TQString ret; + + // FIXME: first check for iso-country-field and prefer that one + if ( !country().isEmpty() ) { + ciso = countryToISO( country() ); + } else { + // fall back to our own country + ciso = TDEGlobal::locale()->country(); + } + KSimpleConfig entry( locate( "locale", + TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) ); + entry.setGroup( "KCM Locale" ); + + // decide whether this needs special business address formatting + if ( orgaName.isEmpty() ) { + addrTemplate = entry.readEntry( "AddressFormat" ); + } else { + addrTemplate = entry.readEntry( "BusinessAddressFormat" ); + if ( addrTemplate.isEmpty() ) + addrTemplate = entry.readEntry( "AddressFormat" ); + } + + // in the case there's no format found at all, default to what we've always + // used: + if ( addrTemplate.isEmpty() ) { + kdWarning(5700) << "address format database incomplete " + << "(no format for locale " << ciso + << " found). Using default address formatting." << endl; + addrTemplate = "%0(%n\\n)%0(%cm\\n)%0(%s\\n)%0(PO BOX %p\\n)%0(%l%w%r)%,%z"; + } + + // scan + parseAddressTemplateSection( addrTemplate, ret, realName, orgaName ); + + // now add the country line if needed (formatting this time according to + // the rules of our own system country ) + if ( !country().isEmpty() ) { + KSimpleConfig entry( locate( "locale", TQString( "l10n/" ) + + TDEGlobal::locale()->country() + TQString( "/entry.desktop" ) ) ); + entry.setGroup( "KCM Locale" ); + TQString cpos = entry.readEntry( "AddressCountryPosition" ); + if ( "BELOW" == cpos || cpos.isEmpty() ) { + ret = ret + "\n\n" + country().upper(); + } else if ( "below" == cpos ) { + ret = ret + "\n\n" + country(); + } else if ( "ABOVE" == cpos ) { + ret = country().upper() + "\n\n" + ret; + } else if ( "above" == cpos ) { + ret = country() + "\n\n" + ret; + } + } + + return ret; +} + +bool Address::parseAddressTemplateSection( const TQString &tsection, + TQString &result, const TQString &realName, const TQString &orgaName ) const +{ + // This method first parses and substitutes any bracketed sections and + // after that replaces any tags with their values. If a bracketed section + // or a tag evaluate to zero, they are not just removed but replaced + // with a placeholder. This is because in the last step conditionals are + // resolved which depend on information about zero-evaluations. + result = tsection; + int stpos = 0; + bool ret = false; + + // first check for brackets that have to be evaluated first + int fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); + while ( -1 != fpos ) { + int bpos1 = fpos + KABC_FMTTAG_purgeempty.length(); + int bpos2; + // expect opening bracket and find next balanced closing bracket. If + // next char is no opening bracket, continue parsing (no valid tag) + if ( '(' == result[bpos1] ) { + bpos2 = findBalancedBracket( result, bpos1 ); + if ( -1 != bpos2 ) { + // we have balanced brackets, recursively parse: + TQString rplstr; + bool purge = !parseAddressTemplateSection( result.mid( bpos1+1, + bpos2-bpos1-1 ), rplstr, + realName, orgaName ); + if ( purge ) { + // purge -> remove all + // replace with !_P_!, so conditional tags work later + result.replace( fpos, bpos2 - fpos + 1, "!_P_!" ); + // leave stpos as it is + } else { + // no purge -> replace with recursively parsed string + result.replace( fpos, bpos2 - fpos + 1, rplstr ); + ret = true; + stpos = fpos + rplstr.length(); + } + } else { + // unbalanced brackets: keep on parsing (should not happen + // and will result in bad formatting) + stpos = bpos1; + } + } + fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); + } + + // after sorting out all purge tags, we just search'n'replace the rest, + // keeping track of whether at least one tag evaluates to something. + // The following macro needs TQString for R_FIELD + // It substitutes !_P_! for empty fields so conditional tags work later +#define REPLTAG(R_TAG,R_FIELD) \ + if ( result.find(R_TAG, false) != -1 ) { \ + TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \ + result.replace( R_TAG, rpl ); \ + if ( !R_FIELD.isEmpty() ) { \ + ret = true; \ + } \ + } + REPLTAG( KABC_FMTTAG_realname, realName ); + REPLTAG( KABC_FMTTAG_REALNAME, realName.upper() ); + REPLTAG( KABC_FMTTAG_company, orgaName ); + REPLTAG( KABC_FMTTAG_COMPANY, orgaName.upper() ); + REPLTAG( KABC_FMTTAG_pobox, postOfficeBox() ); + REPLTAG( KABC_FMTTAG_street, street() ); + REPLTAG( KABC_FMTTAG_STREET, street().upper() ); + REPLTAG( KABC_FMTTAG_zipcode, postalCode() ); + REPLTAG( KABC_FMTTAG_location, locality() ); + REPLTAG( KABC_FMTTAG_LOCATION, locality().upper() ); + REPLTAG( KABC_FMTTAG_region, region() ); + REPLTAG( KABC_FMTTAG_REGION, region().upper() ); + result.replace( KABC_FMTTAG_newline, "\n" ); +#undef REPLTAG + + // conditional comma + fpos = result.find( KABC_FMTTAG_condcomma, 0 ); + while ( -1 != fpos ) { + TQString str1 = result.mid( fpos - 5, 5 ); + TQString str2 = result.mid( fpos + 2, 5 ); + if ( str1 != "!_P_!" && str2 != "!_P_!" ) { + result.replace( fpos, 2, ", " ); + } else { + result.remove( fpos, 2 ); + } + fpos = result.find( KABC_FMTTAG_condcomma, fpos ); + } + // conditional whitespace + fpos = result.find( KABC_FMTTAG_condwhite, 0 ); + while ( -1 != fpos ) { + TQString str1 = result.mid( fpos - 5, 5 ); + TQString str2 = result.mid( fpos + 2, 5 ); + if ( str1 != "!_P_!" && str2 != "!_P_!" ) { + result.replace( fpos, 2, " " ); + } else { + result.remove( fpos, 2 ); + } + fpos = result.find( KABC_FMTTAG_condwhite, fpos ); + } + + // remove purged: + result.remove( "!_P_!" ); + + return ret; +} + +int Address::findBalancedBracket( const TQString &tsection, int pos ) const +{ + int balancecounter = 0; + for( unsigned int i = pos + 1; i < tsection.length(); i++ ) { + if ( ')' == tsection[i] && 0 == balancecounter ) { + // found end of brackets + return i; + } else + if ( '(' == tsection[i] ) { + // nested brackets + balancecounter++; + } + } + return -1; +} + +TQString Address::countryToISO( const TQString &cname ) +{ + // we search a map file for translations from country names to + // iso codes, storing caching things in a TQMap for faster future + // access. + if ( !mISOMap ) + isoMapDeleter.setObject( mISOMap, new TQMap() ); + + TQMap::ConstIterator it; + it = mISOMap->find( cname ); + if ( it != mISOMap->end() ) + return it.data(); + + TQString mapfile = TDEGlobal::dirs()->findResource( "data", + TQString::fromLatin1( "tdeabc/countrytransl.map" ) ); + + TQFile file( mapfile ); + if ( file.open( IO_ReadOnly ) ) { + TQTextStream s( &file ); + TQString strbuf = s.readLine(); + while( !strbuf.isEmpty() ) { + TQStringList countryInfo = TQStringList::split( '\t', strbuf, true ); + if ( countryInfo[ 0 ] == cname ) { + file.close(); + mISOMap->insert( cname, countryInfo[ 1 ] ); + return countryInfo[ 1 ]; + } + strbuf = s.readLine(); + } + file.close(); + } + + // fall back to system country + mISOMap->insert( cname, TDEGlobal::locale()->country() ); + return TDEGlobal::locale()->country(); +} + +TQString Address::ISOtoCountry( const TQString &ISOname ) +{ + // get country name from ISO country code (e.g. "no" -> i18n("Norway")) + if ( ISOname.simplifyWhiteSpace().isEmpty() ) + return TQString::null; + + TQString mapfile = TDEGlobal::dirs()->findResource( "data", + TQString::fromLatin1( "tdeabc/countrytransl.map" ) ); + + TQFile file( mapfile ); + if ( file.open( IO_ReadOnly ) ) { + TQTextStream s( &file ); + TQString searchStr = "\t" + ISOname.simplifyWhiteSpace().lower(); + TQString strbuf = s.readLine(); + int pos; + while ( !strbuf.isEmpty() ) { + if ( (pos = strbuf.find( searchStr )) != -1 ) { + file.close(); + return i18n( strbuf.left( pos ).utf8() ); + } + strbuf = s.readLine(); + } + file.close(); + } + + return ISOname; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Address &addr ) +{ + return s << addr.mId << addr.mType << addr.mPostOfficeBox << + addr.mExtended << addr.mStreet << addr.mLocality << + addr.mRegion << addr.mPostalCode << addr.mCountry << + addr.mLabel; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Address &addr ) +{ + s >> addr.mId >> addr.mType >> addr.mPostOfficeBox >> addr.mExtended >> + addr.mStreet >> addr.mLocality >> addr.mRegion >> + addr.mPostalCode >> addr.mCountry >> addr.mLabel; + + addr.mEmpty = false; + + return s; +} diff --git a/tdeabc/address.h b/tdeabc/address.h new file mode 100644 index 000000000..b4165a098 --- /dev/null +++ b/tdeabc/address.h @@ -0,0 +1,341 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESS_H +#define KABC_ADDRESS_H + +#include +#include +#include + +#include + +// template tags for address formatting localization +#define KABC_FMTTAG_realname TQString("%n") +#define KABC_FMTTAG_REALNAME TQString("%N") +#define KABC_FMTTAG_company TQString("%cm") +#define KABC_FMTTAG_COMPANY TQString("%CM") +#define KABC_FMTTAG_pobox TQString("%p") +#define KABC_FMTTAG_street TQString("%s") +#define KABC_FMTTAG_STREET TQString("%S") +#define KABC_FMTTAG_zipcode TQString("%z") +#define KABC_FMTTAG_location TQString("%l") +#define KABC_FMTTAG_LOCATION TQString("%L") +#define KABC_FMTTAG_region TQString("%r") +#define KABC_FMTTAG_REGION TQString("%R") +#define KABC_FMTTAG_newline TQString("\\n") +#define KABC_FMTTAG_condcomma TQString("%,") +#define KABC_FMTTAG_condwhite TQString("%w") +#define KABC_FMTTAG_purgeempty TQString("%0") + +namespace KABC { + +/** + @short Postal address information. + + This class represents information about a postal address. +*/ +class KABC_EXPORT Address +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); + + public: + /** + List of addresses. + */ + typedef TQValueList
    List; + typedef TQValueList TypeList; + + /** + Address types: + + @li @p Dom - domestic + @li @p Intl - international + @li @p Postal - postal + @li @p Parcel - parcel + @li @p Home - home address + @li @p Work - address at work + @li @p Pref - preferred address + */ + enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, + Pref = 64 }; + + /** + Constructor that creates an empty Address, which is initialized + with a unique id (see id()). + */ + Address(); + + /** + This is like Address() just above, with the difference + that you can specify the type. + */ + Address( int ); + + bool operator==( const Address & ) const; + bool operator!=( const Address & ) const; + + /** + Returns true, if the address is empty. + */ + bool isEmpty() const; + + /** + Clears all entries of the address. + */ + void clear(); + + /** + Sets the unique id. + */ + void setId( const TQString & ); + + /* + Returns the unique id. + */ + TQString id() const; + + /** + Sets the type of address. See enum for definiton of types. + + @param type type, can be a bitwise or of multiple types. + */ + void setType( int type ); + + /** + Returns the type of address. Can be a bitwise or of multiple types. + */ + int type() const; + + /** + Returns a translated string of all types the address has. + */ + TQString typeLabel() const; + + /** + Sets the post office box. + */ + void setPostOfficeBox( const TQString & ); + + /** + Returns the post office box. + */ + TQString postOfficeBox() const; + + /** + Returns the translated label for post office box field. + */ + static TQString postOfficeBoxLabel(); + + /** + Sets the extended address information. + */ + void setExtended( const TQString & ); + + /** + Returns the extended address information. + */ + TQString extended() const; + + /** + Returns the translated label for extended field. + */ + static TQString extendedLabel(); + + /** + Sets the street (including number). + */ + void setStreet( const TQString & ); + + /** + Returns the street. + */ + TQString street() const; + + /** + Returns the translated label for street field. + */ + static TQString streetLabel(); + + /** + Sets the locality, e.g. city. + */ + void setLocality( const TQString & ); + + /** + Returns the locality. + */ + TQString locality() const; + + /** + Returns the translated label for locality field. + */ + static TQString localityLabel(); + + /** + Sets the region, e.g. state. + */ + void setRegion( const TQString & ); + + /** + Returns the region. + */ + TQString region() const; + + /** + Returns the translated label for region field. + */ + static TQString regionLabel(); + + /** + Sets the postal code. + */ + void setPostalCode( const TQString & ); + + /** + Returns the postal code. + */ + TQString postalCode() const; + + /** + Returns the translated label for postal code field. + */ + static TQString postalCodeLabel(); + + /** + Sets the country. + */ + void setCountry( const TQString & ); + + /** + Returns the country. + */ + TQString country() const; + + /** + Returns the translated label for country field. + */ + static TQString countryLabel(); + + /** + Sets the delivery label. This is the literal text to be used as label. + */ + void setLabel( const TQString & ); + + /** + Returns the delivery label. + */ + TQString label() const; + + /** + Returns the translated label for delivery label field. + */ + static TQString labelLabel(); + + /** + Returns the list of available types. + */ + static TypeList typeList(); + + /** + Returns the translated label for a special type. + */ + static TQString typeLabel( int type ); + + /** + Used for debug output. + */ + void dump() const; + + /** + Returns this address formatted according to the country-specific + address formatting rules. The formatting rules applied depend on + either the addresses {@link #country country} field, or (if the + latter is empty) on the system country setting. If companyName is + provided, an available business address format will be preferred. + + @param realName the formatted name of the contact + @param orgaName the name of the organization or company + @return the formatted address (containing newline characters) + */ + TQString formattedAddress( const TQString &realName=TQString::null + , const TQString &orgaName=TQString::null ) const; + + /** + Returns ISO code for a localized country name. Only localized country + names will be understood. This might be replaced by a TDELocale method in + the future. + @param cname name of the country + @return two digit ISO code + */ + static TQString countryToISO( const TQString &cname ); + + /** + Returns a localized country name for a ISO code. + This might be replaced by a TDELocale method in the future. + @param ISOname two digit ISO code + @return localized name of the country + @since 3.2 + */ + static TQString ISOtoCountry( const TQString &ISOname ); + + private: + /** + Parses a snippet of an address template + @param tsection the template string to be parsed + @param result TQString reference in which the result will be stored + @return true if at least one tag evaluated positively, else false + */ + bool parseAddressTemplateSection( const TQString &tsection + , TQString &result + , const TQString &realName + , const TQString &orgaName ) const; + + /** + Finds the balanced closing bracket starting from the opening bracket at + pos in tsection. + @return position of closing bracket, -1 for unbalanced brackets + */ + int findBalancedBracket( const TQString &tsection, int pos ) const; + + bool mEmpty; + + TQString mId; + int mType; + + TQString mPostOfficeBox; + TQString mExtended; + TQString mStreet; + TQString mLocality; + TQString mRegion; + TQString mPostalCode; + TQString mCountry; + TQString mLabel; + + static TQMap *mISOMap; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & ); + +} + +#endif diff --git a/tdeabc/addressbook.cpp b/tdeabc/addressbook.cpp new file mode 100644 index 000000000..50cd9c8a6 --- /dev/null +++ b/tdeabc/addressbook.cpp @@ -0,0 +1,842 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "errorhandler.h" +#include "resource.h" + +#include "addressbook.h" +#include "addressbook.moc" + +using namespace KABC; + +struct AddressBook::AddressBookData +{ + Field::List mAllFields; + ErrorHandler *mErrorHandler; + TDEConfig *mConfig; + KRES::Manager *mManager; + TQPtrList mPendingLoadResources; + TQPtrList mPendingSaveResources; + Iterator end; +}; + +struct AddressBook::Iterator::IteratorData +{ + Resource::Iterator mIt; + TQValueList mResources; + int mCurrRes; +}; + +struct AddressBook::ConstIterator::ConstIteratorData +{ + Resource::ConstIterator mIt; + TQValueList mResources; + int mCurrRes; +}; + +AddressBook::Iterator::Iterator() + : d( new IteratorData ) +{ +} + +AddressBook::Iterator::Iterator( const AddressBook::Iterator &i ) + : d( new IteratorData ) +{ + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; +} + +AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iterator &i ) +{ + if ( this == &i ) + return *this; // guard against self assignment + + delete d; // delete the old data the Iterator was completely constructed before + d = new IteratorData; + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; + + return *this; +} + +AddressBook::Iterator::~Iterator() +{ + delete d; + d = 0; +} + +const Addressee &AddressBook::Iterator::operator*() const +{ + return *(d->mIt); +} + +Addressee &AddressBook::Iterator::operator*() +{ + return *(d->mIt); +} + +Addressee *AddressBook::Iterator::operator->() +{ + return &(*(d->mIt)); +} + +AddressBook::Iterator &AddressBook::Iterator::operator++() +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::Iterator &AddressBook::Iterator::operator++( int ) +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::Iterator &AddressBook::Iterator::operator--() +{ + (d->mIt)--; + + return *this; +} + +AddressBook::Iterator &AddressBook::Iterator::operator--( int ) +{ + (d->mIt)--; + + return *this; +} + +bool AddressBook::Iterator::operator==( const Iterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool AddressBook::Iterator::operator!=( const Iterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + + +AddressBook::ConstIterator::ConstIterator() + : d( new ConstIteratorData ) +{ +} + +AddressBook::ConstIterator::ConstIterator( const AddressBook::ConstIterator &i ) + : d( new ConstIteratorData ) +{ + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; +} + +AddressBook::ConstIterator::ConstIterator( const AddressBook::Iterator &i ) +{ + d = new ConstIteratorData; + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator=( const AddressBook::ConstIterator &i ) +{ + if ( this == &i ) + return *this; // guard for self assignment + + delete d; // delete the old data because the Iterator was really constructed before + d = new ConstIteratorData; + d->mIt = i.d->mIt; + d->mResources = i.d->mResources; + d->mCurrRes = i.d->mCurrRes; + + return *this; +} + +AddressBook::ConstIterator::~ConstIterator() +{ + delete d; + d = 0; +} + +const Addressee &AddressBook::ConstIterator::operator*() const +{ + return *(d->mIt); +} + +const Addressee* AddressBook::ConstIterator::operator->() const +{ + return &(*(d->mIt)); +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator++() +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator++(int) +{ + do { + bool jumped = false; + while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ) { // at end of addressee list of resource + if ( (uint)d->mCurrRes == d->mResources.count() - 1 ) { + return *this; + } + + d->mCurrRes++; // jump to next resource + + jumped = true; + d->mIt = (d->mResources[ d->mCurrRes ])->begin(); + } + + if ( !jumped ) + (d->mIt)++; + + } while ( d->mIt == (d->mResources[ d->mCurrRes ])->end() ); + + return *this; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator--() +{ + (d->mIt)--; + return *this; +} + +AddressBook::ConstIterator &AddressBook::ConstIterator::operator--(int) +{ + (d->mIt)--; + return *this; +} + +bool AddressBook::ConstIterator::operator==( const ConstIterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool AddressBook::ConstIterator::operator!=( const ConstIterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + + +AddressBook::AddressBook() + : d( new AddressBookData ) +{ + d->mErrorHandler = 0; + d->mConfig = 0; + d->mManager = new KRES::Manager( "contact" ); + d->end.d->mResources = TQValueList(); + d->end.d->mCurrRes = -1; +} + +AddressBook::AddressBook( const TQString &config ) + : d( new AddressBookData ) +{ + d->mErrorHandler = 0; + if ( config.isEmpty() ) + d->mConfig = 0; + else + d->mConfig = new TDEConfig( config ); + d->mManager = new KRES::Manager( "contact" ); + d->mManager->readConfig( d->mConfig ); + d->end.d->mResources = TQValueList(); + d->end.d->mCurrRes = -1; +} + +AddressBook::~AddressBook() +{ + delete d->mManager; d->mManager = 0; + delete d->mConfig; d->mConfig = 0; + delete d->mErrorHandler; d->mErrorHandler = 0; + delete d; d = 0; +} + +bool AddressBook::load() +{ + kdDebug(5700) << "AddressBook::load()" << endl; + + clear(); + + KRES::Manager::ActiveIterator it; + bool ok = true; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( !(*it)->load() ) { + error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); + ok = false; + } + } + + return ok; +} + +bool AddressBook::asyncLoad() +{ + kdDebug(5700) << "AddressBook::asyncLoad()" << endl; + + clear(); + + KRES::Manager::ActiveIterator it; + bool ok = true; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + d->mPendingLoadResources.append( *it ); + if ( !(*it)->asyncLoad() ) { + error( i18n("Unable to load resource '%1'").arg( (*it)->resourceName() ) ); + ok = false; + } + } + + return ok; +} + +bool AddressBook::save( Ticket *ticket ) +{ + kdDebug(5700) << "AddressBook::save()"<< endl; + + if ( ticket->resource() ) { + deleteRemovedAddressees(); + bool ok = ticket->resource()->save( ticket ); + if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); + return ok; + } + + return false; +} + +bool AddressBook::asyncSave( Ticket *ticket ) +{ + kdDebug(5700) << "AddressBook::asyncSave()"<< endl; + + if ( ticket->resource() ) { + d->mPendingSaveResources.append( ticket->resource() ); + bool ok = ticket->resource()->asyncSave( ticket ); + if ( ok ) ticket->resource()->releaseSaveTicket( ticket ); + return ok; + } + + return false; +} + +AddressBook::Iterator AddressBook::begin() +{ + TQValueList list; + KRES::Manager::ActiveIterator resIt; + for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) + list.append( *resIt ); + + if ( list.count() == 0 ) + return end(); + + Iterator it = Iterator(); + it.d->mResources = list; + it.d->mCurrRes = 0; + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + + while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { + if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) + return end(); + + it.d->mCurrRes++; + + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + } + + return it; +} + +AddressBook::ConstIterator AddressBook::begin() const +{ + TQValueList list; + KRES::Manager::ActiveIterator resIt; + for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt ) + list.append( *resIt ); + + if ( list.count() == 0 ) + return end(); + + Iterator it = Iterator(); + it.d->mResources = list; + it.d->mCurrRes = 0; + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + + while ( it.d->mIt == (it.d->mResources[ it.d->mCurrRes ])->end() ) { + if ( (uint)it.d->mCurrRes == it.d->mResources.count() - 1 ) + return end(); + + it.d->mCurrRes++; + + it.d->mIt = (it.d->mResources[ it.d->mCurrRes ])->begin(); + } + + return it; +} + +AddressBook::Iterator AddressBook::end() +{ + KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); + + if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available + d->end.d->mIt = Resource::Iterator(); + } else { + d->end.d->mIt = (*resIt)->end(); + } + + return d->end; +} + +AddressBook::ConstIterator AddressBook::end() const +{ + KRES::Manager::ActiveIterator resIt = d->mManager->activeEnd(); + + if ( resIt == d->mManager->activeBegin() || ! *(--resIt) ) { // no resource available + d->end.d->mIt = Resource::Iterator(); + } else { + d->end.d->mIt = (*resIt)->end(); + } + + return d->end; +} + +void AddressBook::clear() +{ + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + (*it)->clear(); +} + +Ticket *AddressBook::requestSaveTicket( Resource *resource ) +{ + kdDebug(5700) << "AddressBook::requestSaveTicket()" << endl; + + if ( !resource ) + resource = standardResource(); + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( (*it) == resource ) { + if ( (*it)->readOnly() || !(*it)->isOpen() ) + return 0; + else + return (*it)->requestSaveTicket(); + } + } + + return 0; +} + +void AddressBook::releaseSaveTicket( Ticket *ticket ) +{ + if ( !ticket ) + return; + + if ( ticket->resource() ) { + ticket->resource()->releaseSaveTicket( ticket ); + } +} + +void AddressBook::insertAddressee( const Addressee &a ) +{ + Resource *resource = a.resource(); + if ( resource == 0 ) + resource = standardResource(); + + Resource::Iterator it; + Addressee fAddr = resource->findByUid( a.uid() ); + + Addressee addr( a ); + if ( !fAddr.isEmpty() ) { + if ( fAddr != a ) + addr.setRevision( TQDateTime::currentDateTime() ); + else { + if ( fAddr.resource() == 0 ) { + fAddr.setResource( resource ); + //NOTE: Should we have setChanged( true ) here? + resource->insertAddressee( fAddr ); + } + return; + } + } + + addr.setResource( resource ); + addr.setChanged( true ); + resource->insertAddressee( addr ); +} + +void AddressBook::removeAddressee( const Addressee &a ) +{ + if ( a.resource() ) + a.resource()->removeAddressee( a ); +} + +void AddressBook::removeAddressee( const Iterator &it ) +{ + if ( (*it).resource() ) + (*it).resource()->removeAddressee( *it ); +} + +AddressBook::Iterator AddressBook::find( const Addressee &a ) +{ + Iterator it; + for ( it = begin(); it != end(); ++it ) { + if ( a.uid() == (*it).uid() ) + return it; + } + + return end(); +} + +Addressee AddressBook::findByUid( const TQString &uid ) +{ + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + Addressee addr = (*it)->findByUid( uid ); + if ( !addr.isEmpty() ) + return addr; + } + + return Addressee(); +} + +Addressee::List AddressBook::allAddressees() +{ + Addressee::List list; + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) + list.append( *it ); + + return list; +} + +Addressee::List AddressBook::findByName( const TQString &name ) +{ + Addressee::List results; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + results += (*it)->findByName( name ); + + return results; +} + +Addressee::List AddressBook::findByEmail( const TQString &email ) +{ + Addressee::List results; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + results += (*it)->findByEmail( email ); + + return results; +} + +Addressee::List AddressBook::findByCategory( const TQString &category ) +{ + Addressee::List results; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) + results += (*it)->findByCategory( category ); + + return results; +} + +void AddressBook::dump() const +{ + kdDebug(5700) << "AddressBook::dump() --- begin ---" << endl; + + ConstIterator it; + for( it = begin(); it != end(); ++it ) { + (*it).dump(); + } + + kdDebug(5700) << "AddressBook::dump() --- end ---" << endl; +} + +TQString AddressBook::identifier() +{ + TQStringList identifier; + + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( !(*it)->identifier().isEmpty() ) + identifier.append( (*it)->identifier() ); + } + + return identifier.join( ":" ); +} + +Field::List AddressBook::fields( int category ) +{ + if ( d->mAllFields.isEmpty() ) { + d->mAllFields = Field::allFields(); + } + + if ( category == Field::All ) return d->mAllFields; + + Field::List result; + Field::List::ConstIterator it; + for ( it = d->mAllFields.constBegin(); it != d->mAllFields.constEnd(); ++it ) { + if ( (*it)->category() & category ) + result.append( *it ); + } + + return result; +} + +bool AddressBook::addCustomField( const TQString &label, int category, + const TQString &key, const TQString &app ) +{ + if ( d->mAllFields.isEmpty() ) { + d->mAllFields = Field::allFields(); + } + + TQString a = app.isNull() ? TDEGlobal::instance()->instanceName() : app; + TQString k = key.isNull() ? label : key; + + Field *field = Field::createCustomField( label, category, k, a ); + + if ( !field ) return false; + + d->mAllFields.append( field ); + + return true; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const AddressBook &ab ) +{ + if (!ab.d) return s; + + return s;// << ab.d->mAddressees; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, AddressBook &ab ) +{ + if (!ab.d) return s; + +// s >> ab.d->mAddressees; + + return s; +} + +bool AddressBook::addResource( Resource *resource ) +{ + if ( !resource->open() ) { + kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl; + return false; + } + + d->mManager->add( resource ); + resource->setAddressBook( this ); + + connect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), + this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); + connect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), + this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); + + connect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + connect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); + + return true; +} + +bool AddressBook::removeResource( Resource *resource ) +{ + resource->close(); + + if ( resource == standardResource() ) + d->mManager->setStandardResource( 0 ); + + resource->setAddressBook( 0 ); + + disconnect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ), + this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); + disconnect( resource, TQT_SIGNAL( savingFinished( Resource* ) ), + this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); + + disconnect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + disconnect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + + d->mManager->remove( resource ); + + return true; +} + +TQPtrList AddressBook::resources() +{ + TQPtrList list; + + KRES::Manager::ActiveIterator it; + for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { + if ( d->mManager->standardResource() == (*it) ) + list.prepend( *it ); + else + list.append( *it ); + } + + return list; +} + +void AddressBook::setErrorHandler( ErrorHandler *handler ) +{ + delete d->mErrorHandler; + d->mErrorHandler = handler; +} + +void AddressBook::error( const TQString& msg ) +{ + if ( !d->mErrorHandler ) // create default error handler + d->mErrorHandler = new ConsoleErrorHandler; + + if ( d->mErrorHandler ) + d->mErrorHandler->error( msg ); + else + kdError(5700) << "no error handler defined" << endl; +} + +void AddressBook::deleteRemovedAddressees() +{ + // no any longer needed +} + +void AddressBook::setStandardResource( Resource *resource ) +{ + d->mManager->setStandardResource( resource ); +} + +Resource *AddressBook::standardResource() +{ + return d->mManager->standardResource(); +} + +KRES::Manager *AddressBook::resourceManager() +{ + return d->mManager; +} + +void AddressBook::cleanUp() +{ +} + +bool AddressBook::loadingHasFinished() const +{ + return d->mPendingLoadResources.isEmpty(); +} + +void AddressBook::resourceLoadingFinished( Resource *res ) +{ + d->mPendingLoadResources.remove( res ); + emit loadingFinished( res ); + + if ( d->mPendingLoadResources.count() == 0 ) + emit addressBookChanged( this ); +} + +void AddressBook::resourceSavingFinished( Resource *res ) +{ + d->mPendingSaveResources.remove( res ); + + emit savingFinished( res ); +} + +void AddressBook::resourceLoadingError( Resource *res, const TQString &errMsg ) +{ + error( errMsg ); + + d->mPendingLoadResources.remove( res ); + if ( d->mPendingLoadResources.count() == 0 ) + emit addressBookChanged( this ); +} + +void AddressBook::resourceSavingError( Resource *res, const TQString &errMsg ) +{ + error( errMsg ); + + d->mPendingSaveResources.remove( res ); +} diff --git a/tdeabc/addressbook.h b/tdeabc/addressbook.h new file mode 100644 index 000000000..8b87b6898 --- /dev/null +++ b/tdeabc/addressbook.h @@ -0,0 +1,431 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSBOOK_H +#define KABC_ADDRESSBOOK_H + +#include +#include + +#include + +#include "addressee.h" +#include "field.h" + +namespace KABC { + +class ErrorHandler; +class Resource; +class Ticket; + +/** + @short Address Book + + This class provides access to a collection of address book entries. + */ +class KABC_EXPORT AddressBook : public TQObject +{ + Q_OBJECT + + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); + friend class StdAddressBook; + + public: + /** + @short Address Book Iterator + + This class provides an iterator for address book entries. + */ + class KABC_EXPORT Iterator + { + public: + Iterator(); + Iterator( const Iterator & ); + ~Iterator(); + + Iterator &operator=( const Iterator & ); + const Addressee &operator*() const; + Addressee &operator*(); + Addressee* operator->(); + Iterator &operator++(); + Iterator &operator++(int); + Iterator &operator--(); + Iterator &operator--(int); + bool operator==( const Iterator &it ); + bool operator!=( const Iterator &it ); + + struct IteratorData; + IteratorData *d; + }; + + /** + @short Address Book Const Iterator + + This class provides a const iterator for address book entries. + */ + class KABC_EXPORT ConstIterator + { + public: + ConstIterator(); + ConstIterator( const ConstIterator & ); + ConstIterator( const Iterator & ); + ~ConstIterator(); + + ConstIterator &operator=( const ConstIterator & ); + const Addressee &operator*() const; + const Addressee* operator->() const; + ConstIterator &operator++(); + ConstIterator &operator++(int); + ConstIterator &operator--(); + ConstIterator &operator--(int); + bool operator==( const ConstIterator &it ); + bool operator!=( const ConstIterator &it ); + + struct ConstIteratorData; + ConstIteratorData *d; + }; + + /** + Constructs an address book object. + You have to add the resources manually before calling load(). + */ + AddressBook(); + + /** + Constructs an address book object. + The resources are loaded automatically. + + @param config The config file which contains the resource settings. + */ + AddressBook( const TQString &config ); + + /** + Destructor. + */ + virtual ~AddressBook(); + + /** + Requests a ticket for saving the addressbook. Calling this function locks + the addressbook for all other processes. You need the returned ticket + object for calling the save() function. + + @param resource A pointer to the resource which shall be locked. If 0, + the default resource is locked. + @return 0 if the resource is already locked or a valid save ticket + otherwise. + @see save() + */ + Ticket *requestSaveTicket( Resource *resource = 0 ); + + /** + Releases the ticket requested previously with requestSaveTicket(). + Call this function, if you want to release a ticket without saving. + */ + void releaseSaveTicket( Ticket *ticket ); + + /** + Loads all addressees synchronously. + + @return Whether the loading was successfully. + */ + bool load(); + + /** + Loads all addressees asynchronously. This function returns immediately + and emits the addressBookChanged() signal as soon as the loading has + finished. + + @return Whether the synchronous part of loading was successfully. + */ + bool asyncLoad(); + + /** + Saves all addressees of one resource synchronously. If the save is + successfull the ticket is deleted. + + @param ticket The ticket returned by requestSaveTicket(). + @return Whether the saving was successfully. + */ + bool save( Ticket *ticket ); + + /** + Saves all addressees of one resource asynchronously. If the save is + successfull the ticket is deleted. + + @param ticket The ticket returned by requestSaveTicket(). + @return Whether the synchronous part of saving was successfully. + */ + bool asyncSave( Ticket *ticket ); + + /** + Returns an iterator pointing to the first addressee of address book. + This iterator equals end() if the address book is empty. + */ + ConstIterator begin() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + Iterator begin(); + + /** + Returns an iterator pointing to the last addressee of address book. + This iterator equals begin() if the address book is empty. + */ + ConstIterator end() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + Iterator end(); + + + /** + Removes all addressees from the address book. + */ + void clear(); + + /** + Insert an addressee into the address book. If an addressee with the same + unique id already exists, it is replaced by the new one, otherwise it is + appended. + + @param addr The addressee which shall be insert. + */ + void insertAddressee( const Addressee &addr ); + + /** + Removes an addressee from the address book. + + @param addr The addressee which shall be removed. + */ + void removeAddressee( const Addressee &addr ); + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + + @param it An iterator pointing to the addressee which shall be removed. + */ + void removeAddressee( const Iterator &it ); + + /** + Returns an iterator pointing to the specified addressee. It will return + end() if no addressee matched. + + @param addr The addresee you are looking for. + */ + Iterator find( const Addressee &addr ); // KDE4: const + + /** + Searches an addressee with the specified unique identifier. + + @param uid The unique identifier you are looking for. + @return The addressee with the specified unique identifier or an + empty addressee. + */ + Addressee findByUid( const TQString &uid ); // KDE4: const + + /** + Returns a list of all addressees in the address book. + */ + Addressee::List allAddressees(); // KDE4: const + + /** + Searches all addressees which match the specified name. + + @param name The name you are looking for. + @return A list of all matching addressees. + */ + Addressee::List findByName( const TQString &name ); // KDE4: const + + /** + Searches all addressees which match the specified email address. + + @param email The email address you are looking for. + @return A list of all matching addressees. + */ + Addressee::List findByEmail( const TQString &email ); // KDE4: const + + /** + Searches all addressees which belongs to the specified category. + + @param category The category you are looking for. + @return A list of all matching addressees. + */ + Addressee::List findByCategory( const TQString &category ); // KDE4: const + + /** + Returns a string identifying this addressbook. The identifier is + created by concatenation of the resource identifiers. + */ + virtual TQString identifier(); // KDE4: const + + /** + Returns a list of all Fields known to the address book which are associated + with the given field category. + */ + Field::List fields( int category = Field::All ); // KDE4: const + + /** + Add custom field to address book. + + @param label User visible label of the field. + @param category Ored list of field categories. + @param key Identifier used as key for reading and writing the field. + @param app String used as application key for reading and writing + the field. + */ + bool addCustomField( const TQString &label, int category = Field::All, + const TQString &key = TQString::null, + const TQString &app = TQString::null ); + + /** + Adds a resource to the address book. + + @param resource The resource you want to add. + @return Whether opening the resource was successfully. + */ + bool addResource( Resource *resource ); + + /** + Removes a resource from the address book. + + @param resource The resource you want to remove. + @return Whether closing the resource was successfully. + */ + bool removeResource( Resource *resource ); + + /** + Returns a list of all resources. + */ + TQPtrList resources(); // KDE4: const + + /** + Sets the @p ErrorHandler, that is used by error() to + provide GUI independent error messages. + + @param errorHandler The error handler you want to use. + */ + void setErrorHandler( ErrorHandler *errorHandler ); + + /** + Shows GUI independent error messages. + + @param msg The error message that shall be displayed. + */ + void error( const TQString &msg ); + + /** + @deprecated There is no need to call this function anymore. + */ + void cleanUp() KDE_DEPRECATED; + + /** + Used for debug output. This function prints out the list + of all addressees to kdDebug(5700). + */ + void dump() const; + + /** + */ + void emitAddressBookLocked() { emit addressBookLocked( this ); } + void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } + void emitAddressBookChanged() { emit addressBookChanged( this ); } + + /** + Returns true when the loading of the addressbook has finished, + otherwise false. + + @since 3.5 + */ + bool loadingHasFinished() const; + + signals: + /** + Emitted when one of the resources discovered a change in its backend + or the asynchronous loading of all resources has finished. + You should connect to this signal to update the presentation of + the contact data in your application. + + @param addressBook The address book which emitted this signal. + */ + void addressBookChanged( AddressBook *addressBook ); + + /** + Emitted when one of the resources has been locked for writing. + + @param addressBook The address book which emitted this signal. + */ + void addressBookLocked( AddressBook *addressBook ); + + /** + Emitted when one of the resources has been unlocked. + You should connect to this signal if you want to save your changes + to a resource which is currently locked, and want to get notified when + saving is possible again. + + @param addressBook The address book which emitted this signal. + */ + void addressBookUnlocked( AddressBook *addressBook ); + + /** + Emitted when the asynchronous loading of one resource has finished + after calling asyncLoad(). + + @param resource The resource which emitted this signal. + */ + void loadingFinished( Resource *resource ); + + /** + Emitted when the asynchronous saving of one resource has finished + after calling asyncSave(). + + @param resource The resource which emitted this signal. + */ + void savingFinished( Resource *resource ); + + protected slots: + void resourceLoadingFinished( Resource* ); + void resourceSavingFinished( Resource* ); + void resourceLoadingError( Resource*, const TQString& ); + void resourceSavingError( Resource*, const TQString& ); + + protected: + void deleteRemovedAddressees(); + void setStandardResource( Resource* ); + Resource *standardResource(); + KRES::Manager *resourceManager(); + + private: + TQPtrList mDummy; // Remove in KDE 4 + struct AddressBookData; + AddressBookData *d; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & ); + +} + +#endif diff --git a/tdeabc/addresseedialog.cpp b/tdeabc/addresseedialog.cpp new file mode 100644 index 000000000..2b8bc91e6 --- /dev/null +++ b/tdeabc/addresseedialog.cpp @@ -0,0 +1,259 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include + +#include "stdaddressbook.h" + +#include "addresseedialog.h" +#include "addresseedialog.moc" + +using namespace KABC; + +AddresseeItem::AddresseeItem( TQListView *parent, const Addressee &addressee ) : + TQListViewItem( parent ), + mAddressee( addressee ) +{ + setText( Name, addressee.realName() ); + setText( Email, addressee.preferredEmail() ); +} + +TQString AddresseeItem::key( int column, bool ) const +{ + if (column == Email) { + TQString value = text(Email); + TQRegExp emailRe("<\\S*>"); + int match = emailRe.search(value); + if (match > -1) + value = value.mid(match + 1, emailRe.matchedLength() - 2); + + return value.lower(); + } + + return text(column).lower(); +} + +AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : + KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), + Ok|Cancel, Ok, parent ), mMultiple( multiple ) +{ + TQWidget *topWidget = plainPage(); + + TQBoxLayout *topLayout = new TQHBoxLayout( topWidget ); + TQBoxLayout *listLayout = new TQVBoxLayout; + topLayout->addLayout( listLayout ); + + mAddresseeList = new TDEListView( topWidget ); + mAddresseeList->addColumn( i18n("Name") ); + mAddresseeList->addColumn( i18n("Email") ); + mAddresseeList->setAllColumnsShowFocus( true ); + mAddresseeList->setFullWidth( true ); + listLayout->addWidget( mAddresseeList ); + connect( mAddresseeList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( slotOk() ) ); + connect( mAddresseeList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SLOT( updateEdit( TQListViewItem * ) ) ); + + mAddresseeEdit = new KLineEdit( topWidget ); + mAddresseeEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto ); + connect( mAddresseeEdit->completionObject(), TQT_SIGNAL( match( const TQString & ) ), + TQT_SLOT( selectItem( const TQString & ) ) ); + mAddresseeEdit->setFocus(); + mAddresseeEdit->completionObject()->setIgnoreCase( true ); + listLayout->addWidget( mAddresseeEdit ); + + setInitialSize( TQSize( 450, 300 ) ); + + if ( mMultiple ) { + TQBoxLayout *selectedLayout = new TQVBoxLayout; + topLayout->addLayout( selectedLayout ); + topLayout->setSpacing( spacingHint() ); + + TQGroupBox *selectedGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("Selected"), + topWidget ); + selectedLayout->addWidget( selectedGroup ); + + mSelectedList = new TDEListView( selectedGroup ); + mSelectedList->addColumn( i18n("Name") ); + mSelectedList->addColumn( i18n("Email") ); + mSelectedList->setAllColumnsShowFocus( true ); + mSelectedList->setFullWidth( true ); + connect( mSelectedList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( removeSelected() ) ); + + TQPushButton *unselectButton = new TQPushButton( i18n("Unselect"), selectedGroup ); + connect ( unselectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelected() ) ); + + connect( mAddresseeList, TQT_SIGNAL( clicked( TQListViewItem * ) ), + TQT_SLOT( addSelected( TQListViewItem * ) ) ); + + setInitialSize( TQSize( 650, 350 ) ); + } + + mAddressBook = StdAddressBook::self( true ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + TQT_SLOT( addressBookChanged() ) ); + connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ), + TQT_SLOT( addressBookChanged() ) ); + + loadAddressBook(); +} + +AddresseeDialog::~AddresseeDialog() +{ +} + +void AddresseeDialog::loadAddressBook() +{ + mAddresseeList->clear(); + mItemDict.clear(); + mAddresseeEdit->completionObject()->clear(); + + AddressBook::Iterator it; + for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); + addCompletionItem( (*it).realName(), item ); + addCompletionItem( (*it).preferredEmail(), item ); + } +} + +void AddresseeDialog::addCompletionItem( const TQString &str, TQListViewItem *item ) +{ + if ( str.isEmpty() ) return; + + mItemDict.insert( str, item ); + mAddresseeEdit->completionObject()->addItem( str ); +} + +void AddresseeDialog::selectItem( const TQString &str ) +{ + if ( str.isEmpty() ) return; + + TQListViewItem *item = mItemDict.find( str ); + if ( item ) { + mAddresseeList->blockSignals( true ); + mAddresseeList->setSelected( item, true ); + mAddresseeList->ensureItemVisible( item ); + mAddresseeList->blockSignals( false ); + } +} + +void AddresseeDialog::updateEdit( TQListViewItem *item ) +{ + mAddresseeEdit->setText( item->text( 0 ) ); + mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); +} + +void AddresseeDialog::addSelected( TQListViewItem *item ) +{ + AddresseeItem *addrItem = dynamic_cast( item ); + if ( !addrItem ) return; + + Addressee a = addrItem->addressee(); + + TQListViewItem *selectedItem = mSelectedDict.find( a.uid() ); + if ( !selectedItem ) { + selectedItem = new AddresseeItem( mSelectedList, a ); + mSelectedDict.insert( a.uid(), selectedItem ); + } +} + +void AddresseeDialog::removeSelected() +{ + TQListViewItem *item = mSelectedList->selectedItem(); + AddresseeItem *addrItem = dynamic_cast( item ); + if ( !addrItem ) return; + + mSelectedDict.remove( addrItem->addressee().uid() ); + delete addrItem; +} + +Addressee AddresseeDialog::addressee() +{ + AddresseeItem *aItem = 0; + + if ( mMultiple ) + aItem = dynamic_cast( mSelectedList->firstChild() ); + else + aItem = dynamic_cast( mAddresseeList->selectedItem() ); + + if (aItem) return aItem->addressee(); + return Addressee(); +} + +Addressee::List AddresseeDialog::addressees() +{ + Addressee::List al; + AddresseeItem *aItem = 0; + + if ( mMultiple ) { + TQListViewItem *item = mSelectedList->firstChild(); + while( item ) { + aItem = dynamic_cast( item ); + if ( aItem ) al.append( aItem->addressee() ); + item = item->nextSibling(); + } + } + else + { + aItem = dynamic_cast( mAddresseeList->selectedItem() ); + if (aItem) al.append( aItem->addressee() ); + } + + return al; +} + +Addressee AddresseeDialog::getAddressee( TQWidget *parent ) +{ + AddresseeDialog *dlg = new AddresseeDialog( parent ); + Addressee addressee; + int result = dlg->exec(); + + if ( result == TQDialog::Accepted ) { + addressee = dlg->addressee(); + } + + delete dlg; + return addressee; +} + +Addressee::List AddresseeDialog::getAddressees( TQWidget *parent ) +{ + AddresseeDialog *dlg = new AddresseeDialog( parent, true ); + Addressee::List addressees; + int result = dlg->exec(); + if ( result == TQDialog::Accepted ) { + addressees = dlg->addressees(); + } + + delete dlg; + return addressees; +} + +void AddresseeDialog::addressBookChanged() +{ + loadAddressBook(); +} diff --git a/tdeabc/addresseedialog.h b/tdeabc/addresseedialog.h new file mode 100644 index 000000000..74470d1b4 --- /dev/null +++ b/tdeabc/addresseedialog.h @@ -0,0 +1,161 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEEDIALOG_H +#define KABC_ADDRESSEEDIALOG_H + +#include + +#include +#include +#include + +#include "addressbook.h" + +namespace KABC { + +/** + @short Special ListViewItem, that is used by the AddresseeDialog. +*/ +class KABC_EXPORT AddresseeItem : public TQListViewItem +{ + public: + + /** + Type of column + @li @p Name - Name in Addressee + @li @p Email - Email in Addressee + */ + enum columns { Name = 0, Email = 1 }; + + /** + Constructor. + + @param parent The parent listview. + @param addressee The associated addressee. + */ + AddresseeItem( TQListView *parent, const Addressee &addressee ); + + /** + Returns the addressee. + */ + Addressee addressee() const { return mAddressee; } + + /** + Method used by TQListView to sort the items. + */ + virtual TQString key( int column, bool ascending ) const; + + private: + Addressee mAddressee; +}; + +/** + @short Dialog for selecting address book entries. + + This class provides a dialog for selecting entries from the standard KDE + address book. Use the getAddressee() function to open a modal dialog, + returning an address book entry. + + In the dialog you can select an entry from the list with the mouse or type in + the first letters of the name or email address you are searching for. The + entry matching best is automatically selected. Use double click, pressing + return or pressing the ok button to return the selected addressee to the + application. +*/ +class KABC_EXPORT AddresseeDialog : public KDialogBase +{ + Q_OBJECT + + public: + /** + Construct addressbook entry select dialog. + + @param parent parent widget + @param multiple if true, indicates a multiple selection. + */ + AddresseeDialog( TQWidget *parent=0, bool multiple=false ); + + /** + Destructor. + */ + virtual ~AddresseeDialog(); + + /** + Return the address chosen. + + If it is a multiple select, this will return only the first address chosen + */ + Addressee addressee(); + + /** + Return the list of addresses chosen + */ + Addressee::List addressees(); + + /** + Select a single address book entry. + + Open addressee select dialog and return the entry selected by the user. + If the user doesn't select an entry or presses cancel, the returned + addressee is empty. + */ + static Addressee getAddressee( TQWidget *parent ); + + /** + Select multiple address book entries. + + Open addressee select dialog and return the entries selected by the user. + If the user doesn't select an entry or presses cancel, the returned + addressee list is empty. + */ + static Addressee::List getAddressees( TQWidget *parent ); + + private slots: + void selectItem( const TQString & ); + void updateEdit( TQListViewItem *item ); + void addSelected( TQListViewItem *item ); + void removeSelected(); + + protected slots: + void addressBookChanged(); + + private: + void loadAddressBook(); + void addCompletionItem( const TQString &str, TQListViewItem *item ); + + bool mMultiple; + + TDEListView *mAddresseeList; + KLineEdit *mAddresseeEdit; + + TDEListView *mSelectedList; + + AddressBook *mAddressBook; + + TQDict mItemDict; + TQDict mSelectedDict; + + class AddresseeDialogPrivate; + AddresseeDialogPrivate *d; +}; + +} +#endif diff --git a/tdeabc/addresseehelper.cpp b/tdeabc/addresseehelper.cpp new file mode 100644 index 000000000..e8faeb897 --- /dev/null +++ b/tdeabc/addresseehelper.cpp @@ -0,0 +1,111 @@ +/* + This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include + +#include "addresseehelper.h" + +using namespace KABC; + +AddresseeHelper * AddresseeHelper::s_self; + +// static +AddresseeHelper *AddresseeHelper::self() +{ + if ( !s_self ) + s_self = new AddresseeHelper(); + + return s_self; +} + +AddresseeHelper::AddresseeHelper() + : TQObject( tqApp ), + DCOPObject( "KABC::AddresseeHelper" ) +{ + initSettings(); + + connectDCOPSignal( "kaddressbook", "KABC::AddressBookConfig", + "changed()", "initSettings()", false ); +} + +// static +void AddresseeHelper::addToSet( const TQStringList& list, + std::set& container ) +{ + TQStringList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( !(*it).isEmpty() ) + container.insert( *it ); + } +} + +void AddresseeHelper::initSettings() +{ + mTitles.clear(); + mSuffixes.clear(); + mPrefixes.clear(); + + mTitles.insert( i18n( "Dr." ) ); + mTitles.insert( i18n( "Miss" ) ); + mTitles.insert( i18n( "Mr." ) ); + mTitles.insert( i18n( "Mrs." ) ); + mTitles.insert( i18n( "Ms." ) ); + mTitles.insert( i18n( "Prof." ) ); + + mSuffixes.insert( i18n( "I" ) ); + mSuffixes.insert( i18n( "II" ) ); + mSuffixes.insert( i18n( "III" ) ); + mSuffixes.insert( i18n( "Jr." ) ); + mSuffixes.insert( i18n( "Sr." ) ); + + mPrefixes.insert( "van" ); + mPrefixes.insert( "von" ); + mPrefixes.insert( "de" ); + + TDEConfig config( "kabcrc", true, false ); // readonly, no kdeglobals + config.setGroup( "General" ); + + addToSet( config.readListEntry( "Prefixes" ), mTitles ); + addToSet( config.readListEntry( "Inclusions" ), mPrefixes ); + addToSet( config.readListEntry( "Suffixes" ), mSuffixes ); + mTradeAsFamilyName = config.readBoolEntry( "TradeAsFamilyName", true ); +} + +bool AddresseeHelper::containsTitle( const TQString& title ) const +{ + return mTitles.find( title ) != mTitles.end(); +} + +bool AddresseeHelper::containsPrefix( const TQString& prefix ) const +{ + return mPrefixes.find( prefix ) != mPrefixes.end(); +} + +bool AddresseeHelper::containsSuffix( const TQString& suffix ) const +{ + return mSuffixes.find( suffix ) != mSuffixes.end(); +} + +bool AddresseeHelper::tradeAsFamilyName() const +{ + return mTradeAsFamilyName; +} diff --git a/tdeabc/addresseehelper.h b/tdeabc/addresseehelper.h new file mode 100644 index 000000000..5280e6b2d --- /dev/null +++ b/tdeabc/addresseehelper.h @@ -0,0 +1,66 @@ +/* + This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEEHELPER_H +#define KABC_ADDRESSEEHELPER_H + +#include +#include + +#include + +#include + +/** + static data, shared by ALL addressee objects +*/ + +namespace KABC { + +class KABC_EXPORT AddresseeHelper : public TQObject, public DCOPObject +{ + K_DCOP + + public: + static AddresseeHelper *self(); + + bool containsTitle( const TQString& title ) const; + bool containsPrefix( const TQString& prefix ) const; + bool containsSuffix( const TQString& suffix ) const; + bool tradeAsFamilyName() const; + + k_dcop: + ASYNC initSettings(); + + private: + AddresseeHelper(); + + static void addToSet( const TQStringList& list, + std::set& container ); + std::set mTitles; + std::set mPrefixes; + std::set mSuffixes; + bool mTradeAsFamilyName; + + static AddresseeHelper *s_self; +}; + +} + +#endif diff --git a/tdeabc/addresseelist.cpp b/tdeabc/addresseelist.cpp new file mode 100644 index 000000000..47324001c --- /dev/null +++ b/tdeabc/addresseelist.cpp @@ -0,0 +1,256 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Jost Schenck + 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "addresseelist.h" + +#include "field.h" +#include "sortmode.h" + +using namespace KABC; + +// +// +// Traits +// +// + +bool SortingTraits::Uid::eq( const Addressee &a1, const Addressee &a2 ) +{ + // locale awareness doesn't make sense sorting ids + return ( TQString::compare( a1.uid(), a2.uid() ) == 0 ); +} + +bool SortingTraits::Uid::lt( const Addressee &a1, const Addressee &a2 ) +{ + // locale awareness doesn't make sense sorting ids + return ( TQString::compare( a1.uid(), a2.uid() ) < 0 ); +} + +bool SortingTraits::Name::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.name(), a2.name() ) == 0 ); +} + +bool SortingTraits::Name::lt( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.name(), a2.name() ) < 0 ); +} + +bool SortingTraits::FormattedName::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) == 0 ); +} + +bool SortingTraits::FormattedName::lt( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) < 0 ); +} + +bool SortingTraits::FamilyName::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 + && TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 ); +} + +bool SortingTraits::FamilyName::lt( const Addressee &a1, const Addressee &a2 ) +{ + int family = TQString::localeAwareCompare( a1.familyName(), a2.familyName() ); + if ( 0 == family ) { + return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) < 0 ); + } else { + return family < 0; + } +} + +bool SortingTraits::GivenName::eq( const Addressee &a1, const Addressee &a2 ) +{ + return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 + && TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 ); +} + +bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 ) +{ + int given = TQString::localeAwareCompare( a1.givenName(), a2.givenName() ); + if ( 0 == given ) { + return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) < 0 ); + } else { + return given < 0; + } +} + +// +// +// AddresseeList +// +// + +static Field *sActiveField=0; + +AddresseeList::AddresseeList() + : TQValueList() +{ + mReverseSorting = false; + mActiveSortingCriterion = FormattedName; +} + +AddresseeList::~AddresseeList() +{ +} + +AddresseeList::AddresseeList( const AddresseeList &l ) + : TQValueList( l ) +{ + mReverseSorting = l.reverseSorting(); + mActiveSortingCriterion = l.sortingCriterion(); +} + +AddresseeList::AddresseeList( const TQValueList &l ) + : TQValueList( l ) +{ + mReverseSorting = false; +} + +void AddresseeList::dump() const +{ + kdDebug(5700) << "AddresseeList {" << endl; + kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl; + + TQString crit; + if ( Uid == mActiveSortingCriterion ) { + crit = "Uid"; + } else if ( Name == mActiveSortingCriterion ) { + crit = "Name"; + } else if ( FormattedName == mActiveSortingCriterion ) { + crit = "FormattedName"; + } else if ( FamilyName == mActiveSortingCriterion ) { + crit = "FamilyName"; + } else if ( GivenName == mActiveSortingCriterion ) { + crit = "GivenName"; + } else { + crit = "unknown -- update dump method"; + } + + kdDebug(5700) << "sorting criterion: " << crit << endl; + + for ( const_iterator it = begin(); it != end(); ++it ) { + (*it).dump(); + } + + kdDebug(5700) << "}" << endl; +} + +void AddresseeList::sortBy( SortingCriterion c ) +{ + mActiveSortingCriterion = c; + if ( Uid == c ) { + sortByTrait(); + } else if ( Name == c ) { + sortByTrait(); + } else if ( FormattedName == c ) { + sortByTrait(); + } else if ( FamilyName == c ) { + sortByTrait(); + } else if ( GivenName==c ) { + sortByTrait(); + } else { + kdError(5700) << "AddresseeList sorting criterion passed for which a trait is not known. No sorting done." << endl; + } +} + +void AddresseeList::sort() +{ + sortBy( mActiveSortingCriterion ); +} + +template +void AddresseeList::sortByTrait() +{ + // FIXME: better sorting algorithm, bubblesort is not acceptable for larger lists. + // + // for i := 1 to n - 1 + // do for j := 1 to n - i + // do if A[j] > A[j+1] + // then temp := A[j] + // A[j] := A[j + 1] + // A[j + 1 ] := temp + + iterator i1 = begin(); + iterator endIt = end(); + --endIt; + if ( i1 == endIt ) // don't need sorting + return; + + iterator i2 = endIt; + while( i1 != endIt ) { + iterator j1 = begin(); + iterator j2 = j1; + ++j2; + while( j1 != i2 ) { + if ( !mReverseSorting && Trait::lt( *j2, *j1 ) + || mReverseSorting && Trait::lt( *j1, *j2 ) ) { + tqSwap( *j1, *j2 ); + } + ++j1; + ++j2; + } + ++i1; + --i2; + } +} + +void AddresseeList::sortByField( Field *field ) +{ + if ( !field ) { + kdWarning(5700) << "sortByField called with no active sort field" << endl; + return; + } + + sActiveField = field; + + if ( count() == 0 ) + return; + + KABC::FieldSortMode *mode = new KABC::FieldSortMode( sActiveField, !mReverseSorting ); + + KABC::Addressee::setSortMode( mode ); + qHeapSort( *this ); + KABC::Addressee::setSortMode( 0 ); + + delete mode; +} + +void AddresseeList::sortByMode( SortMode *mode ) +{ + if ( count() == 0 ) + return; + + KABC::Addressee::setSortMode( mode ); + qHeapSort( *this ); + KABC::Addressee::setSortMode( 0 ); +} + +Field* +AddresseeList::sortingField() const +{ + return sActiveField; +} diff --git a/tdeabc/addresseelist.h b/tdeabc/addresseelist.h new file mode 100644 index 000000000..7c9df0275 --- /dev/null +++ b/tdeabc/addresseelist.h @@ -0,0 +1,221 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Jost Schenck + 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEELIST_H +#define KABC_ADDRESSEELIST_H + +#include + +#include "addressee.h" + +namespace KABC { + +class Field; +class SortField; +class SortMode; + +/** + * Each trait must implement one static function for equality, one for "less + * than". Class name should be the field name. A trait does not necessarily + * have to stick to just one field: a trait sorting by family name can e.g. + * sort addressees with equal family name by given name. + * + * If you want to implement reverse sorting, you do not have to write another + * trait, as AddresseeList takes care of that. + */ +namespace SortingTraits +{ + +class KABC_EXPORT Uid +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT Name +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT FormattedName +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT FamilyName // fallback to given name +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +class KABC_EXPORT GivenName // fallback to family name +{ + public: + static bool eq( const Addressee &, const Addressee & ); + static bool lt( const Addressee &, const Addressee & ); +}; + +} + +/** + * Addressee attribute used for sorting. + */ +typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterion; + +/** + * @short a TQValueList of Addressee, with sorting functionality + * + * This class extends the functionality of TQValueList with + * sorting methods specific to the Addressee class. It can be used + * just like any other TQValueList but is no template class. + * + * An AddresseeList does not automatically keep sorted when addressees + * are added or removed or the sorting order is changed, as this would + * slow down larger operations by sorting after every step. So after + * such operations you have to call {@link #sort} or {@link #sortBy} to + * create a defined order again. + * + * Iterator usage is inherited by TQValueList and extensively documented + * there. Please remember that the state of an iterator is undefined + * after any sorting operation. + * + * For the enumeration Type SortingCriterion, which specifies the + * field by the collection will be sorted, the following values exist: + * Uid, Name, FormattedName, FamilyName, GivenName. + * + * @author Jost Schenck jost@schenck.de + */ +class KABC_EXPORT AddresseeList : public TQValueList +{ + public: + AddresseeList(); + ~AddresseeList(); + AddresseeList( const AddresseeList & ); + AddresseeList( const TQValueList & ); + + /** + * Debug output. + */ + void dump() const; + + /** + * Determines the direction of sorting. On change, the list + * will not automatically be resorted. + * @param r true if sorting should be done reverse, false otherwise + */ + void setReverseSorting( bool r = true ) { mReverseSorting = r; } + + /** + * Returns the direction of sorting. + * @return true if sorting is done reverse, false otherwise + */ + bool reverseSorting() const { return mReverseSorting; } + + /** + * Sorts this list by a specific criterion. + * @param c the criterion by which should be sorted + */ + void sortBy( SortingCriterion c ); + + /** + * Sorts this list by a specific field. If no parameter is given, the + * last used Field object will be used. + * @param field pointer to the Field object to be sorted by + */ + void sortByField( Field *field = 0 ); + + /** + * Sorts this list by a specific sorting mode. + * @param mode pointer to the sorting mode object to be sorted by + * @since 3.4 + */ + void sortByMode( SortMode *mode = 0 ); + + /** + * Sorts this list by its active sorting criterion. This normally is the + * criterion of the last sortBy operation or FormattedName if up + * to now there has been no sortBy operation. + * + * Please note that the sorting trait of the last {@link #sortByTrait} + * method call is not remembered and thus the action can not be repeated + * by this method. + */ + void sort(); + + /** + * Templated sort function. You normally will not want to use this but + * {@link #sortBy} and {@link #sort} instead as the existing sorting + * criteria completely suffice for most cases. + * + * However, if you do want to use some special sorting criterion, you can + * write a trait class that will be provided to this templated method. + * This trait class has to have a class declaration like the following: + * \code + * class MySortingTrait { + * public: + * // eq returns true if a1 and a2 are equal + * static bool eq(KABC::Addressee a1, KABC::Addressee a2); + * // lt returns true is a1 is "less than" a2 + * static bool lt(KABC::Addressee a1, KABC::Addressee a2); + * }; + * \endcode + * You can then pass this class to the sortByTrait method like this: + * \code + * myAddresseelist.sortByTrait<MySortingTrait>(); + * \endcode + * Please note that the {@link #sort} method can not be used to repeat the + * sorting of the last sortByTrait action. + * + * Right now this method uses the bubble sort algorithm. This should be + * replaced for a better one when I have time. + */ + template void sortByTrait(); + + /** + * Returns the active sorting criterion, ie the sorting criterion that + * will be used by a {@link #sort} call. + */ + SortingCriterion sortingCriterion() const { return mActiveSortingCriterion; } + + /** + * Returns the active sorting field, ie a pointer to the Field object + * which was used for the last {@link #sortByField} operation. + * This function returns the last GLOBAL sorting field, not + * the class specific one. + * You're a lot better off by keeping track of this locally. + */ + Field* sortingField() const; + + private: + bool mReverseSorting; + SortingCriterion mActiveSortingCriterion; + //KDE 4.0 - add a d-pointer here! +}; + +} + +#endif diff --git a/tdeabc/addresslineedit.cpp b/tdeabc/addresslineedit.cpp new file mode 100644 index 000000000..dc7a889a1 --- /dev/null +++ b/tdeabc/addresslineedit.cpp @@ -0,0 +1,610 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Helge Deller + 2002 Lubos Lunak + 2001,2003 Carsten Pfeiffer + 2001 Waldo Bastian + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +// $Id$ + +#include "addresslineedit.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "ldapclient.h" + +#include + +//============================================================================= +// +// Class AddressLineEdit +// +//============================================================================= + + +using namespace KABC; + +TDECompletion * AddressLineEdit::s_completion = 0L; +bool AddressLineEdit::s_addressesDirty = false; +TQTimer* AddressLineEdit::s_LDAPTimer = 0L; +LdapSearch* AddressLineEdit::s_LDAPSearch = 0L; +TQString* AddressLineEdit::s_LDAPText = 0L; +AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L; +TDEConfig *AddressLineEdit::s_config = 0L; + +static KStaticDeleter completionDeleter; +static KStaticDeleter ldapTimerDeleter; +static KStaticDeleter ldapSearchDeleter; +static KStaticDeleter ldapTextDeleter; +static KStaticDeleter configDeleter; + +AddressLineEdit::AddressLineEdit(TQWidget* parent, + bool useCompletion, + const char *name) + : KLineEdit(parent,name) +{ + m_useCompletion = useCompletion; + m_completionInitialized = false; + m_smartPaste = false; + + init(); + + // Whenever a new AddressLineEdit is created (== a new composer is created), + // we set a dirty flag to reload the addresses upon the first completion. + // The address completions are shared between all AddressLineEdits. + // Is there a signal that tells us about addressbook updates? + if (m_useCompletion) + s_addressesDirty = true; +} + + +//----------------------------------------------------------------------------- +void AddressLineEdit::init() +{ + if ( !s_completion ) { + completionDeleter.setObject( s_completion, new TDECompletion() ); + s_completion->setOrder( TDECompletion::Sorted ); + s_completion->setIgnoreCase( true ); + } + + if( m_useCompletion ) { + if( !s_LDAPTimer ) { + ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer ); + ldapSearchDeleter.setObject( s_LDAPSearch, new LdapSearch ); + ldapTextDeleter.setObject( s_LDAPText, new TQString ); + } + connect( s_LDAPTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotStartLDAPLookup())); + connect( s_LDAPSearch, TQT_SIGNAL( searchData( const TQStringList& )), + TQT_SLOT( slotLDAPSearchData( const TQStringList& ))); + } + + if ( m_useCompletion && !m_completionInitialized ) + { + setCompletionObject( s_completion, false ); // we handle it ourself + connect( this, TQT_SIGNAL( completion(const TQString&)), + this, TQT_SLOT(slotCompletion() )); + + TDECompletionBox *box = completionBox(); + connect( box, TQT_SIGNAL( highlighted( const TQString& )), + this, TQT_SLOT( slotPopupCompletion( const TQString& ) )); + connect( box, TQT_SIGNAL( userCancelled( const TQString& )), + TQT_SLOT( userCancelled( const TQString& ))); + + m_completionInitialized = true; // don't connect muliple times. That's + // ugly, tho, better have completionBox() + // virtual in KDE 4 + // Why? This is only called once. Why should this be called more + // than once? And why was this protected? + } +} + +//----------------------------------------------------------------------------- +AddressLineEdit::~AddressLineEdit() +{ +} + +//----------------------------------------------------------------------------- + +TDEConfig* AddressLineEdit::config() +{ + if ( !s_config ) + configDeleter.setObject( s_config, new TDEConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals + + return s_config; +} + +void AddressLineEdit::setFont( const TQFont& font ) +{ + KLineEdit::setFont( font ); + if ( m_useCompletion ) + completionBox()->setFont( font ); +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::keyPressEvent(TQKeyEvent *e) +{ + bool accept = false; + + if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e))) + { + doCompletion(true); + accept = true; + } + else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e))) + { + int len = text().length(); + + if (len == cursorPosition()) // at End? + { + doCompletion(true); + accept = true; + } + } + + if( !accept ) + KLineEdit::keyPressEvent( e ); + + if( e->isAccepted()) + { + if( m_useCompletion && s_LDAPTimer != NULL ) + { + if( *s_LDAPText != text()) + stopLDAPLookup(); + *s_LDAPText = text(); + s_LDAPLineEdit = this; + s_LDAPTimer->start( 500, true ); + } + } +} + +void AddressLineEdit::mouseReleaseEvent( TQMouseEvent * e ) +{ + if (m_useCompletion && (e->button() == Qt::MidButton)) + { + m_smartPaste = true; + KLineEdit::mouseReleaseEvent(e); + m_smartPaste = false; + return; + } + KLineEdit::mouseReleaseEvent(e); +} + +void AddressLineEdit::insert(const TQString &t) +{ + if (!m_smartPaste) + { + KLineEdit::insert(t); + return; + } + TQString newText = t.stripWhiteSpace(); + if (newText.isEmpty()) + return; + + // remove newlines in the to-be-pasted string as well as an eventual + // mailto: protocol + newText.replace( TQRegExp("\r?\n"), ", " ); + if ( newText.startsWith( "mailto:" ) ) + { + KURL u(newText); + newText = u.path(); + } + else if (newText.find(" at ") != -1) + { + // Anti-spam stuff + newText.replace( " at ", "@" ); + newText.replace( " dot ", "." ); + } + else if (newText.find("(at)") != -1) + { + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + } + + TQString contents = text(); + int start_sel = 0; + int end_sel = 0; + int pos = cursorPosition(); + if (getSelection(&start_sel, &end_sel)) + { + // Cut away the selection. + if (pos > end_sel) + pos -= (end_sel - start_sel); + else if (pos > start_sel) + pos = start_sel; + contents = contents.left(start_sel) + contents.right(end_sel+1); + } + + int eot = contents.length(); + while ((eot > 0) && contents[eot-1].isSpace()) eot--; + if (eot == 0) + { + contents = TQString::null; + } + else if (pos >= eot) + { + if (contents[eot-1] == ',') + eot--; + contents.truncate(eot); + contents += ", "; + pos = eot+2; + } + + contents = contents.left(pos)+newText+contents.mid(pos); + setText(contents); + setCursorPosition(pos+newText.length()); +} + +void AddressLineEdit::paste() +{ + if (m_useCompletion) + m_smartPaste = true; + KLineEdit::paste(); + m_smartPaste = false; +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::cursorAtEnd() +{ + setCursorPosition( text().length() ); +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::enableCompletion(bool enable) +{ + m_useCompletion = enable; +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::doCompletion(bool ctrlT) +{ + if ( !m_useCompletion ) + return; + + TQString prevAddr; + + TQString s(text()); + int n = s.findRev(','); + + if (n >= 0) + { + n++; // Go past the "," + + int len = s.length(); + + // Increment past any whitespace... + while( n < len && s[n].isSpace() ) + n++; + + prevAddr = s.left(n); + s = s.mid(n,255).stripWhiteSpace(); + } + + if ( s_addressesDirty ) + loadAddresses(); + + if ( ctrlT ) + { + TQStringList completions = s_completion->substringCompletion( s ); + if (completions.count() > 1) { + m_previousAddresses = prevAddr; + setCompletedItems( completions ); + } + else if (completions.count() == 1) + setText(prevAddr + completions.first()); + + cursorAtEnd(); + return; + } + + TDEGlobalSettings::Completion mode = completionMode(); + + switch ( mode ) + { + case TDEGlobalSettings::CompletionPopupAuto: + { + if (s.isEmpty()) + break; + } + case TDEGlobalSettings::CompletionPopup: + { + m_previousAddresses = prevAddr; + TQStringList items = s_completion->allMatches( s ); + items += s_completion->allMatches( "\"" + s ); + items += s_completion->substringCompletion( '<' + s ); + uint beforeDollarCompletionCount = items.count(); + + if( s.find( ' ' ) == -1 ) // one word, possibly given name + items += s_completion->allMatches( "$$" + s ); + + if ( !items.isEmpty() ) + { + if ( items.count() > beforeDollarCompletionCount ) + { + // remove the '$$whatever$' part + for( TQStringList::Iterator it = items.begin(); + it != items.end(); + ++it ) + { + int pos = (*it).find( '$', 2 ); + if( pos < 0 ) // ??? + continue; + (*it)=(*it).mid( pos + 1 ); + } + } + + items = removeMailDupes( items ); + + // We do not want KLineEdit::setCompletedItems to perform text + // completion (suggestion) since it does not know how to deal + // with providing proper completions for different items on the + // same line, e.g. comma-separated list of email addresses. + bool autoSuggest = (mode != TDEGlobalSettings::CompletionPopupAuto); + setCompletedItems( items, autoSuggest ); + + if (!autoSuggest) + { + int index = items.first().find( s ); + TQString newText = prevAddr + items.first().mid( index ); + //kdDebug() << "OLD TEXT: " << text() << endl; + //kdDebug() << "NEW TEXT: " << newText << endl; + setUserSelection(false); + setCompletedText(newText,true); + } + } + + break; + } + + case TDEGlobalSettings::CompletionShell: + { + TQString match = s_completion->makeCompletion( s ); + if ( !match.isNull() && match != s ) + { + setText( prevAddr + match ); + cursorAtEnd(); + } + break; + } + + case TDEGlobalSettings::CompletionMan: // Short-Auto in fact + case TDEGlobalSettings::CompletionAuto: + { + if (!s.isEmpty()) + { + TQString match = s_completion->makeCompletion( s ); + if ( !match.isNull() && match != s ) + { + TQString adds = prevAddr + match; + setCompletedText( adds ); + } + break; + } + } + case TDEGlobalSettings::CompletionNone: + default: // fall through + break; + } +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::slotPopupCompletion( const TQString& completion ) +{ + setText( m_previousAddresses + completion ); + cursorAtEnd(); +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::loadAddresses() +{ + s_completion->clear(); + s_addressesDirty = false; + + TQStringList adrs = addresses(); + for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it) + addAddress( *it ); +} + +void AddressLineEdit::addAddress( const TQString& adr ) +{ + s_completion->addItem( adr ); + int pos = adr.find( '<' ); + if( pos >= 0 ) + { + ++pos; + int pos2 = adr.find( pos, '>' ); + if( pos2 >= 0 ) + s_completion->addItem( adr.mid( pos, pos2 - pos )); + } +} + +void AddressLineEdit::slotStartLDAPLookup() +{ + if( !s_LDAPSearch->isAvailable() || s_LDAPLineEdit != this ) + return; + startLoadingLDAPEntries(); +} + +void AddressLineEdit::stopLDAPLookup() +{ + s_LDAPSearch->cancelSearch(); + s_LDAPLineEdit = NULL; +} + +void AddressLineEdit::startLoadingLDAPEntries() +{ + TQString s( *s_LDAPText ); + // TODO cache last? + TQString prevAddr; + int n = s.findRev(','); + if (n>= 0) + { + prevAddr = s.left(n+1) + ' '; + s = s.mid(n+1,255).stripWhiteSpace(); + } + if( s.length() == 0 ) + return; + + loadAddresses(); // TODO reuse these? + s_LDAPSearch->startSearch( s ); +} + +void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs ) +{ + if( s_LDAPLineEdit != this ) + return; + for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) { + TQString name(*it); + int pos = name.find( " <" ); + int pos_comma = name.find( ',' ); + // put name in quotes, if we have a comma in the name + if (pos>0 && pos_comma>0 && pos_commahasFocus()) + { + if( completionMode() != TDEGlobalSettings::CompletionNone ) + { + doCompletion( false ); + } + } +} + +TQStringList AddressLineEdit::removeMailDupes( const TQStringList& adrs ) +{ + TQStringList src = adrs; + qHeapSort( src ); + TQString last; + for( TQStringList::Iterator it = src.begin(); it != src.end(); ) { + if( *it == last ) + { + it = src.remove( it ); + continue; // dupe + } + last = *it; + ++it; + } + return src; +} + +//----------------------------------------------------------------------------- +void AddressLineEdit::dropEvent(TQDropEvent *e) +{ + KURL::List uriList; + if(KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList )) + { + TQString ct = text(); + KURL::List::Iterator it = uriList.begin(); + for (; it != uriList.end(); ++it) + { + if (!ct.isEmpty()) ct.append(", "); + KURL u(*it); + if ((*it).protocol() == "mailto") + ct.append( (*it).path() ); + else + ct.append( (*it).url() ); + } + setText(ct); + setEdited( true ); + } + else { + if (m_useCompletion) + m_smartPaste = true; + TQLineEdit::dropEvent(e); + m_smartPaste = false; + } +} + + +TQStringList AddressLineEdit::addresses() +{ + TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while + + TQStringList result; + TQString space(" "); + TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]"); + TQString endQuote("\" "); + TQString addr, email; + + KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); + KABC::AddressBook::Iterator it; + for( it = addressBook->begin(); it != addressBook->end(); ++it ) { + TQStringList emails = (*it).emails(); + + TQString n = (*it).prefix() + space + + (*it).givenName() + space + + (*it).additionalName() + space + + (*it).familyName() + space + + (*it).suffix(); + + n = n.simplifyWhiteSpace(); + + TQStringList::ConstIterator mit; + + for ( mit = emails.begin(); mit != emails.end(); ++mit ) { + email = *mit; + if (!email.isEmpty()) { + if (n.isEmpty() || (email.find( '<' ) != -1)) + addr = TQString::null; + else { /* do we really need quotes around this name ? */ + if (n.find(needQuotes) != -1) + addr = '"' + n + endQuote; + else + addr = n + space; + } + + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) + addr += '<' + email + '>'; + else + addr += email; + addr = addr.stripWhiteSpace(); + result.append( addr ); + } + } + } + + KABC::DistributionListManager manager( addressBook ); + manager.load(); + result += manager.listNames(); + + TQApplication::restoreOverrideCursor(); + + return result; +} + +#include "addresslineedit.moc" diff --git a/tdeabc/addresslineedit.h b/tdeabc/addresslineedit.h new file mode 100644 index 000000000..f81ffbfe4 --- /dev/null +++ b/tdeabc/addresslineedit.h @@ -0,0 +1,123 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Helge Deller + 2002 Lubos Lunak + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSLINEEDIT_H +#define KABC_ADDRESSLINEEDIT_H +// $Id$ + +#include +#include +#include + +#include "klineedit.h" +#include "kcompletion.h" + +class TDEConfig; + +namespace KABC { + +class LdapSearch; + +/** + * A lineedit with LDAP and kabc completion + * + * This lineedit is supposed to be used wherever the user types email addresses + * and might want a completion. You can simply use it as a replacement for + * KLineEdit or TQLineEdit. + * + * You can enable or disable the lineedit at any time. + * + * @see AddressLineEdit::enableCompletion() + */ +class KABC_EXPORT AddressLineEdit : public KLineEdit +{ + Q_OBJECT +public: + AddressLineEdit(TQWidget* parent, bool useCompletion = true, + const char *name = 0L); + virtual ~AddressLineEdit(); + + /** + * Reimplented for internal reasons. + * @ see KLineEdit::setFont() + */ + virtual void setFont( const TQFont& ); + + static TDEConfig *config(); + +public slots: + /** + * Set cursor to end of line. + */ + void cursorAtEnd(); + /** + * Toggle completion. + */ + void enableCompletion( bool enable ); + +protected: + /** + * Always call AddressLineEdit::loadAddresses() as the first thing. + * Use addAddress() to add addresses. + */ + virtual void loadAddresses(); + void addAddress( const TQString& ); + virtual void keyPressEvent(TQKeyEvent*); + virtual void dropEvent(TQDropEvent *e); + virtual void paste(); + virtual void insert(const TQString &t); + virtual void mouseReleaseEvent( TQMouseEvent * e ); + void doCompletion(bool ctrlT); + +private slots: + void slotCompletion() { doCompletion(false); } + void slotPopupCompletion( const TQString& ); + void slotStartLDAPLookup(); + void slotLDAPSearchData( const TQStringList& ); + +private: + void init(); + void startLoadingLDAPEntries(); + void stopLDAPLookup(); + TQStringList addresses(); + TQStringList removeMailDupes( const TQStringList& adrs ); + + TQString m_previousAddresses; + bool m_useCompletion; + bool m_completionInitialized; + bool m_smartPaste; + TQString m_typedText; // unused + + static bool s_addressesDirty; + static TDECompletion *s_completion; + static TQTimer *s_LDAPTimer; + static LdapSearch *s_LDAPSearch; + static TQString *s_LDAPText; + static AddressLineEdit *s_LDAPLineEdit; + static TDEConfig *s_config; + +private: + class AddressLineEditPrivate* d; +}; + +} + +#endif /* KABC_ADDRESSLINEEDIT_H */ diff --git a/tdeabc/agent.cpp b/tdeabc/agent.cpp new file mode 100644 index 000000000..571b7803e --- /dev/null +++ b/tdeabc/agent.cpp @@ -0,0 +1,148 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "addressee.h" + +#include "agent.h" + +using namespace KABC; + +Agent::Agent() + : mAddressee( 0 ), mIntern( false ) +{ +} + +Agent::Agent( const TQString &url ) + : mAddressee( 0 ),mUrl( url ), mIntern( false ) +{ +} + +Agent::Agent( Addressee *addressee ) + : mAddressee( addressee ), mIntern( true ) +{ +} + +Agent::~Agent() +{ + delete mAddressee; + mAddressee = 0; +} + +bool Agent::operator==( const Agent &a ) const +{ + if ( mIntern != a.mIntern ) + return false; + + if ( !mIntern ) { + if ( mUrl != a.mUrl ) + return false; + } else { + if ( mAddressee && !a.mAddressee ) return false; + if ( !mAddressee && a.mAddressee ) return false; + if ( !mAddressee && !a.mAddressee ) return false; + if ( (*mAddressee) != (*a.mAddressee) ) return false; + } + + return true; +} + +bool Agent::operator!=( const Agent &a ) const +{ + return !( a == *this ); +} + +Agent &Agent::operator=( const Agent &addr ) +{ + if ( this == &addr ) + return *this; + + if ( addr.mIntern && addr.mAddressee ) { + if ( mAddressee ) + delete mAddressee; + + mAddressee = new Addressee; + *mAddressee = *(addr.mAddressee); + } + + mUrl = addr.mUrl; + mIntern = addr.mIntern; + + return *this; +} + +void Agent::setUrl( const TQString &url ) +{ + mUrl = url; + mIntern = false; +} + +void Agent::setAddressee( Addressee *addressee ) +{ + mAddressee = addressee; + mIntern = true; +} + +bool Agent::isIntern() const +{ + return mIntern; +} + +TQString Agent::url() const +{ + return mUrl; +} + +Addressee *Agent::addressee() const +{ + return mAddressee; +} + +TQString Agent::asString() const +{ + if ( mIntern ) + return "intern agent"; + else + return mUrl; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent ) +{ + TQ_UINT32 hasAddressee = ( agent.mAddressee != 0 ); + + s << agent.mIntern << agent.mUrl << hasAddressee; + if ( hasAddressee ) + s << (*agent.mAddressee); + + return s; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Agent &agent ) +{ + TQ_UINT32 hasAddressee; + + s >> agent.mIntern >> agent.mUrl >> hasAddressee; + + if ( hasAddressee ) { + agent.mAddressee = new Addressee; + s >> (*agent.mAddressee); + } + + return s; +} diff --git a/tdeabc/agent.h b/tdeabc/agent.h new file mode 100644 index 000000000..dbe048f08 --- /dev/null +++ b/tdeabc/agent.h @@ -0,0 +1,128 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_AGENT_H +#define KABC_AGENT_H + +class TQDataStream; + +#include + +#include + +namespace KABC { + +class Addressee; + +/** + * Important!!! + * + * At the moment the vcard format does not support saving and loading + * this entity. + */ +class KABC_EXPORT Agent +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); + +public: + + /** + * Consturctor. Creates an empty object. + */ + Agent(); + + /** + * Consturctor. + * + * @param url A URL that describes the position of the agent file. + */ + Agent( const TQString &url ); + + /** + * Consturctor. + * + * @param addressee The addressee object of the agent. + */ + Agent( Addressee *addressee ); + + /** + * Destructor. + */ + ~Agent(); + + + bool operator==( const Agent & ) const; + bool operator!=( const Agent & ) const; + Agent &operator=( const Agent & ); + + /** + * Sets a URL for the location of the agent file. When using this + * function, isIntern() will return 'false' until you use + * setAddressee(). + * + * @param url The location URL of the agent file. + */ + void setUrl( const TQString &url ); + + /** + * Sets the addressee of the agent. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param addressee The addressee object of the agent. + */ + void setAddressee( Addressee *addressee ); + + /** + * Returns whether the agent is described by a URL (extern) or + * by a addressee (intern). + * When this method returns 'true' you can use addressee() to + * get a Addressee object. Otherwise you can request the URL + * of this agent by url() and load the data from that location. + */ + bool isIntern() const; + + /** + * Returns the location URL of this agent. + */ + TQString url() const; + + /** + * Returns the addressee object of this agent. + */ + Addressee* addressee() const; + + /** + * Returns string representation of the agent. + */ + TQString asString() const; + +private: + Addressee *mAddressee; + TQString mUrl; + + int mIntern; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & ); + +} +#endif diff --git a/tdeabc/countrytransl.map b/tdeabc/countrytransl.map new file mode 100644 index 000000000..1459f0942 --- /dev/null +++ b/tdeabc/countrytransl.map @@ -0,0 +1,12381 @@ +Andorra ad +Andorra ad +أندورا ad +Ðндора ad +Ðндора ad +অà§à¦¯à¦¾à¦¨à¦¡à§‹à¦°à¦¾ ad +Andora ad +Andora ad +ΑνδόÏα ad +Andoro ad +آندورا ad +Andorre ad +Andóra ad +×נדורה ad +अंडोरा ad +アンドラ ad +អង់ដូរ៉ា ad +안ë„ë¼ ad +ອີນເດີຠad +Andora ad +Ðндора ad +Ðндорра ad +à¨à¨‚ਡੋਰਾ ad +Andora ad +Ðндорра ad +Andora ad +Ðндора ad +Andora ad +அனà¯à®Ÿà¯‹à®°à®¾ ad +Ðндора ad +à¹à¸­à¸™à¹‚ดรา ad +Ðндорра ad +Ðндорра ad +Andore ad +安é“å°” ad +安é“爾 ad +United Arab Emirates ae +Vereenigde Arabiese Emirate ae +الإمارات العربية المتحدة ae +Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ ÐрабÑÐºÑ–Ñ Ð­Ð¼Ñ–Ñ€Ð°Ñ‚Ñ‹ ae +ОÐЕ ae +সংযà§à¦•à§à¦¤ আরব আমিরশাহি ae +Stadoù-Unanet Arabeg ae +Ujedinjeni arapski emirati ae +Emirats Àrabs Units ae +Spojené arabské emiráty ae +Emiraethau Arabaidd Unedig ae +Forenende Arabiske Emirater ae +Vereinigte Arabische Emirate ae +Ενωμένα ΑÏαβικά ΕμιÏάτα ae +UniÄintaj Arabaj Emirlandoj ae +Emiratos árabes unidos ae +Araabia Ühendemiraadid ae +Arabiar Emirato Batuak ae +امارات متحده عربی ae +Yhdistyneet Arabiemiraatit ae +Émirats Arabes Unis ae +Ferienigde Arabyske Emiraten ae +Aontas na nÉimíríochtaí Arabacha ae +Emiratos Ãrabes Unidos ae +×יחוד ×”×מירויות הערביות ae +संयà¥à¤•à¥à¤¤ अरब अमीरात ae +Ujedinjeni arapski emirati ae +Egyesült Arab Emirátusok ae +Sameinuðu arabísku furstadæmin ae +Emirati Arabi Uniti ae +アラブ首長国連邦 ae +អារ៉ាប់​រួម ae +ì•„ëž ì—미레ì´íЏ ì—°í•© ae +ສະຫະລັດ ae +Jungtiniai Arabų Emiratai ae +Apvienotie ArÄbu EmerÄti ae +Обединети ÐрапÑки Емирати ae +ÐÑгдÑÑн арабын имрат ae +Emirati Għarab Magħquda ae +De forente arabiske emirater ae +Vereenigte Araabsche Emiraten ae +Verenigde Arabische Emiraten ae +Dei sameinte arabiske emirata ae +Di-Emirate tseo di Kopanego tsa Arab ae +ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ ae +Zjednoczone Emiraty Arabskie ae +Emiratos Ãrabes Unidos ae +Emirados Ãrabes Unidos ae +Emiratele Arabe Unite ae +Объединенные ÐрабÑкие Эмираты ae +Leta Zunze Ubumwe z'Abarabu ae +Ovttastuvvon arábalaÅ¡ emiráhtat ae +Spojené arabské emiráty ae +Združeni arabski Emirati ae +Уједињени арапÑки емирати ae +Ujedinjeni arapski emirati ae +Förenade arabemiraten ae +யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ அரபி எமிரேடà¯à®¸à¯ ae +Ðморати муттаҳидаи Ðраб ae +สหรัà¸à¸­à¸²à¸«à¸£à¸±à¸šà¸­à¸µà¸¡à¸´à¹€à¸£à¸•ส์ ae +BirleÅŸik Arap Emirlikleri ae +Berläşkän Ğäräp Ämirlekläre ae +Об'єднані ÐрабÑькі Емірати ae +Бирлашган Ðраб Ðмирликлари ae +Mashango o tangananaho a Emirates ae +Emirat Arabes Unis ae +阿è”é…‹ ae +阿拉伯è¯åˆå¤§å…¬åœ‹ ae +Izindawo zezinduna zase-United Arab ae +Afghanistan af +Ø£ÙØºØ§Ù†Ø³ØªØ§Ù† af +ÐфганіÑтан af +ÐфганиÑтан af +আফগানিসà§à¦¤à¦¾à¦¨ af +Afganistan af +Afganistan af +Afganistan af +Afghanistán af +Affganistan af +Αφγανιστάν af +Afganio af +Afghanistán af +Afganistan af +Ø§ÙØºØ§Ù†Ø³ØªØ§Ù† af +Afganistan af +An Afganastáin af +Afganistan af +×פגניסטן af +अफगानिसà¥à¤¤à¤¾à¤¨ af +Afganistan af +Afganisztán af +Afganistan af +Afganistan af +アフガニスタン af +អាហ្វកានីស្ážáž¶áž“ af +아프가니스탄 af +ລີທົ່ວເນີຠaf +AfganistÄna af +ÐвганиÑтан af +ÐфганÑтан af +Afganistan af +ਅਫਗਾਨਿਸਤਾਨ af +Afganistan af +Afeganistão af +Afeganistão af +Afganistan af +ÐфганиÑтан af +Afuganisitani af +Afganistan af +Afganistan af +ÐвганиÑтан af +Avganistan af +Afganistan af +ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯ af +ÐфғониÑтон af +อาฟà¸à¸²à¸™à¸´à¸ªà¸–าน af +Afganistan af +Äfğänstan af +ÐфганіÑтан af +ÐфғониÑтон af +Afganistan af +阿富汗 af +阿富汗 af +Antigua and Barbuda ag +Antigue en Barbuda ag +أنتيغوا Ùˆ باربودا ag +Antigua vÉ™ Barbuda ag +Ðнтыгуа Ñ– Барбуда ag +Ðнтигуа и Барбуда ag +অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦—à§à§Ÿà¦¾ à¦à¦¬à¦‚ বারà§à¦¬à§à¦¡à¦¾ ag +Antigua ha Barbuda ag +Antigua i Barbuda ag +Antigua i Barbuda ag +Antigua a Barbuda ag +Antigwa a Barbwda ag +Antigua og Barbuda ag +Antigua und Barbuda ag +Αντίγκουα και ΜπαÏμποÏντα ag +Antigvo-Barbudo ag +Antigua y Barbuda ag +Antigua ja Barbuda ag +Antigua eta Barbuda ag +آنتیگوا Ùˆ باربودا ag +Antigua ja Barbados ag +Antigua og Barbuda ag +Antigua et Barbuda ag +Antigua en Barbuda ag +Antigua agus Barbúda ag +Antiga e Barbuda ag +×נטיגו××” ובריבודה ag +à¤à¤¨à¥à¤Ÿà¤¿à¤—à¥à¤† और बारबूडा ag +Antigua i Barbuda ag +Antigua és Barbuda ag +Antigua dan Barbuda ag +Antígva og Barbúda ag +Antigua e Barbuda ag +アンティグアãƒãƒ¼ãƒ–ーダ ag +Antigua និង Barbuda ag +앤티가 바부다 ag +Antikva ir Barbuda ag +Antigva un Barbuda ag +Ðнтигва и Барбуда ag +Ðнтигуа ба Барбуда ag +Antigwa u Barbuda ag +Antigua og Barbuda ag +Antigua un Barbuda ag +Antigua en Barbuda ag +Antigua og Barbuda ag +Antigua le Barbuda ag +Antigua e Barbuda ag +à¨à¨‚ਟੀਗà©à¨† ਤੇ ਬਾਰਬà©à¨¡à¨¾ ag +Antigua i Barbuda ag +Antígua e Barbuda ag +Antigua e Barbuda ag +Antigua ÅŸi Barbuda ag +Ðнтигуа и Барбуда ag +Antigwa na Barubida ag +Antigua ja Barbuda ag +Antigua a Barbuda ag +Antigva in Barbuda ag +Ðнтигва и Барбуда ag +Antigva i Barbuda ag +I-Antigua kanye ne Barbuda ag +Antigua och Barbuda ag +ஆனà¯à®Ÿà®¿à®•ா மறà¯à®±à¯à®®à¯ பெரà¯à®®à¯à®Ÿà®¾ ag +Ðнтигуо ва Барбудо ag +อันทิà¸à¸±à¸§ à¹à¸¥à¸° บาร์บูดา ag +Antigua ve Barbuda ag +Antigua wä Barbuda ag +Трінідад Ñ– Тобаго ag +Ðнтигуа ва Барбуда ag +Antigua và Barbuda ag +Antigua eyet Barbuda ag +Antigua ne Barbuda ag +安æç“œå’Œå·´å¸ƒè¾¾ ag +安地瓜島和巴布é”å³¶ ag +Antigua kanye ne-Barbuda ag +Anguilla ai +أنغويلا ai +ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai +Ðнгила ai +অà§à¦¯à¦¾à¦™à§à¦—à§à¦‡à¦²à¦¾ ai +Angilla ai +Angwila ai +Ανγκουίλα ai +Angvilo ai +آنگوییلا ai +×נגווילה ai +à¤à¤‚गà¥à¤à¤²à¤¾ ai +Angvilla ai +イギリス属領アンギラ ai +អង់ហ្ស៊ីឡា ai +ì•™ê¸¸ë¼ ai +à»àºžàº™àº§àº´àº™ ai +Ðнгилја ai +Ðнгуаилла ai +Angwilla ai +à¨à¨‚ਨਗà©à¨ˆà¨²à¨¾ ai +Anghila ai +Ðнгилла ai +Angwiya ai +Angvila ai +Ðнгвила ai +Angvila ai +ஆனà¯à®•ிலà¯à®²à®¾ ai +Ðнгуилло ai +à¹à¸­à¸‡à¸à¸µà¸¥à¸² ai +ÐÐ½Ð³Ñ–Ð»ÑŒÑ ai +Ðнгвилла ai +Anguila ai +安圭拉 ai +阿爾åŠåˆ©äºž ai +Albania al +Albanië al +ألبانيا al +ÐÐ»ÑŒÐ±Ð°Ð½Ñ–Ñ al +ÐÐ»Ð±Ð°Ð½Ð¸Ñ al +অলবেনিয়া al +Albani al +Albanija al +Albània al +Albánie al +Albanien al +Albanien al +Αλβανία al +Albanio al +Albaania al +آلبانی al +Albanie al +Albanië al +An Albáin al +Albánia al +×לבניה al +अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾ al +Albánia al +Albanía al +アルãƒãƒ‹ã‚¢ al +អាល់បានី al +알바니아 al +à»àº­àº”à»àº¥àº™àº•ິຠal +Albanija al +AlbÄnija al +Ðлбанија al +Ðлбани al +Albanija al +Albanien al +Albanië al +ਅਲਬਾਨੀਆ al +Albânia al +Albânia al +ÐÐ»Ð±Ð°Ð½Ð¸Ñ al +Alubaniya al +Albánia al +Albánsko al +Albanija al +Ðлбанија al +Albanija al +Albanien al +ஆலà¯à®ªà®©à®¿à®¯à®¾ al +Олбанӣ al +อัลเบเนีย al +Arnavutluk al +ÐÐ»Ð±Ð°Ð½Ñ–Ñ al +ÐÐ»Ð±Ð°Ð½Ð¸Ñ al +Albaneye al +阿尔巴尼亚 al +阿亞巴尼亞 al +Armenia am +Armenië am +أرمينيا am +ÐрмÑÐ½Ñ–Ñ am +ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am +আরà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ am +Armeni am +Armenija am +Armènia am +Arménie am +Armenien am +Armenien am +ΑÏμενία am +Armenio am +Armeenia am +ارمنستان am +Arménie am +Armenië am +An Airméin am +Arménia am +×רמניה am +आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾ am +Örményország am +Armenía am +アルメニア am +អារមáŸáž“ី am +아르메니아 am +ອາເຈນຕິນາ am +ArmÄ—nija am +ArmÄ“nija am +Ерменија am +Ðрмен am +Armenien am +Armenië am +ਅਰਮੀਨੀਆ am +Arménia am +Armênia am +ÐÑ€Ð¼ÐµÐ½Ð¸Ñ am +Arumeniya am +Arménsko am +Armenija am +Јерменија am +Jermenija am +Armenien am +ஆரà¯à®®à¯‡à®©à®¿à®¯à®¾ am +ÐрманиÑтон am +อาร์เมเนีย am +Ermenistan am +Ärmänstan am +Ð’Ñ–Ñ€Ð¼ÐµÐ½Ñ–Ñ am +ÐрманиÑтон am +Ã…rmeneye am +亚美尼亚 am +亞美尼亞 am +Netherlands Antilles an +Nederlandse Antilles an +أنتيل هولندا an +ÐідÑрлÑндÑÐºÑ–Ñ Ðнтылы an +ХоландÑки Ðнтили an +নেদারলà§à¦¯à¦¾à¦£à§à¦¡à¦¸ অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦²à§‡à¦¸ an +Antilh an Izelvroioù an +Nizozemski Antili an +Antilles del Països Baixos an +Nizozemské Antily an +Ynysoedd Iseldiraidd Y Carib? an +Nederlandske antiller an +Niederländische Antillen an +Ολλανδικές Αντίλλες an +Nederlandaj Antiloj an +Antillas holandesas an +Hollandi Antillid an +Antilla Holandarrak an +آنتیلس هلند an +Alankomaiden Antillit an +Antilles néerlandaises an +Nederlânske Antillen an +Aintillí na hÃsiltíre an +Antillas Holandesas an +नीदरलैंड à¤à¤¨à¥à¤Ÿà¥€à¤²à¥€à¤¸ an +Nizozemski Antili an +Holland-Antillák an +Hollensku Antillur an +Antille Olandesi an +オランダ領アンãƒãƒ« an +អង់ទីយáŸâ€‹áž áž¼áž›áŸ’លង់ an +네ëœëž€ë“œë ¹ 안틸레스 an +ເນເທີà»àº¥àº™ an +Nyderlandų Antilai an +NÄ«derlandes Antiļas an +ХоландÑки Ðнтили an +Ðедерландын ÐнтиллÑÑ an +De nederlandske Antillene an +Nedderlandsche Antillen an +Nederlandse Antillen an +Dei nederlandske Antillane an +ਨੀਂਦਰਲੈਂਡ à¨à¨‚ਟੀਲੀਸ an +Antyle Holenderskie an +Antilhas Holandês an +Antilhas Holandesas an +Antilele Olandeze an +ÐидерландÑкие ÐнтильÑкие оÑтрова an +Antiye z'Ubuholande an +HollándalaÅ¡ Antillat an +Holandské Antily an +Nizozemski Antili an +ХоландÑки антили an +Holandski antili an +Nederländska Antillerna an +நெதரà¯à®²à®¾à®¨à¯à®¤à¯ அனà¯à®Ÿà®¿à®²à¯à®¸à¯ an +ÐнтилиÑи Ҳолланд an +เนเธอร์à¹à¸¥à¸™à¸”์ à¹à¸­à¸™à¸—ิลีส an +Hollanda Antilleri an +Niderland Antilläre an +ÐнтільÑькі оÑтрови (Ðідерланди) an +Ðидерландлар Ðнтил Ороллари an +Hà Lan Antilles an +Antiyes Neyerlandesses an +è·å±žå®‰çš„列斯群岛 an +è·å±¬å®‰åœ°åˆ—斯群島 an +Angola ao +أنغولا ao +Ðнгола ao +Ðнгола ao +অà§à¦¯à¦¾à¦™à§à¦—োলা ao +Ανγκόλα ao +Angolo ao +آنگولا ao +Angóla ao +×נגולה ao +अंगोला ao +Angóla ao +アンゴラ ao +អង់ហ្គោឡា ao +ì•™ê³¨ë¼ ao +ບັນà»àºà»€àº¥àºµàº ao +Ðнгола ao +Ðнгол ao +ਅੰਗੋਲਾ ao +Ðнгола ao +Ðнгола ao +ஆஙà¯à®•ோலா ao +Ðнгуло ao +à¹à¸­à¸‡à¹‚à¸à¸¥à¸² ao +Ðнгола ao +Ðнгола ao +安哥拉 ao +安哥拉 ao +Argentina ar +Argentinië ar +الأرجنتين ar +Ðргентына ar +Ðржентина ar +আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ ar +Arc'hantina ar +Ariannin ar +Argentinien ar +ΑÏγεντινή ar +Argentino ar +آرژانتین ar +Agentiina ar +Argentine ar +Argentinië ar +An Airgintín ar +Arxentina ar +×רגנטינה ar +अरà¥à¤œà¥‡à¤‚टीना ar +Argentína ar +Argentína ar +アルゼンãƒãƒ³ ar +អាហ្សង់ទីន ar +아르헨티나 ar +ອາເຈນຕິນາ ar +ArgentÄ«na ar +Ðргентина ar +Ðргентин ar +ArÄ¡entina ar +Argentinien ar +Argentinië ar +ਅਰਜ਼ਨਟੀਨਾ ar +Argentyna ar +Ðргентина ar +Arijantina ar +Argentína ar +Ðргентина ar +I-Argentina ar +ஆரà¯à®šà¯†à®©à¯à®Ÿà®¿à®©à®¾ ar +Оржонтина ar +อาร์เจนตินา ar +Arjantin ar +Ðргентина ar +Ðргентина ar +Agenthina ar +Ã…rdjintene ar +阿根廷 ar +阿根廷 ar +American Samoa as +Amerikanse Samoa as +ساموا الأمريكية as +ÐмÑрыканÑкае Самоа as +ÐмериканÑки Самоа as +মারà§à¦•িন সামোয়া as +Samoa amerikanek as +AmeriÄka Samoa as +Samoa Americana as +Americká Samoa as +Samoa Americanaidd as +Samoa (USA) as +Amerikanisches Samoa as +ΑμεÏικανική Σαμόα as +Amerika Samoo as +Samoa americana as +Ameerika Samoa as +Amerikar Samoa as +ساموای آمریکا as +Amerikan Samoa as +Samoa américaines as +Amerikaansk Samoa as +Samó Meiriceánach as +Samoa Americana as +סמו××” ×”×מריקנית as +अमेरिकी सामोआ as +AmeriÄka Samoa as +Amerikai Szamoa as +Bandaríska Samóa as +Samoa Americane as +アメリカンサモア as +សាមូអា អាមáŸážšáž·áž€ as +미국령 사모아 as +ອາເມລິàºàº²à»€àº«àº™àº·àº­ as +Amerikos Samoa as +Amerikas Samoa as +ÐмериканÑка Самоа as +Ðмерик, Самоа as +Samoa Amerikana as +Amerikansk Samoa as +Amerikaansch Samoa as +Amerikaans Samoa as +Amerikansk Samoa as +ਅਮਰੀਕੀ ਸਾਮੋਆ as +Samoa AmerykaÅ„skie as +Samoa Americana as +Samoa Americana as +Samoa americană as +ÐмериканÑкое Самоа as +Samowa Nyamerika as +AmerihkálaÅ¡ Samoa as +Americká Samoa as +AmeriÅ¡ka Samoa as +Ðмеричка Самоа as +AmeriÄka Samoa as +Amerikanska Samoa as +அமெரிகà¯à®•ா சமோயா as +Самоаи Ðмрикоӣ as +อเมริà¸à¸±à¸™ ซามัว as +Amerika Samoası as +Amerikalı Samoa as +ÐмериканÑьке Самоа as +Ðмерика СамоаÑи as +Samowa Amerikinne as +ç¾Žå±žè¨æ‘©äºš as +美屬薩摩亞 as +Austria at +Oostenryk at +النمسا at +Avstriya at +ÐÑžÑÑ‚Ñ€Ñ‹Ñ at +ÐвÑÑ‚Ñ€Ð¸Ñ at +অসà§à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ at +Aostria at +Austrija at +Àustria at +Rakousko at +Awstria at +Østrig at +Österreich at +ΑυστÏία at +AÅ­strio at +اتریش at +Itävalta at +Eysturríki at +Autriche at +Eastenryk at +An Ostair at +×וסטריה at +आसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾ at +Austrija at +Ausztria at +Austurríki at +オーストリア at +អូទ្រីស at +오스트리아 at +ອອດສະເຕເລີຠat +Austrija at +Austrija at +ÐвÑтрија at +ÐвÑтри at +Awtrija at +Østerrike at +Österriek at +Oostenrijk at +Austerrike at +ਆਸਟਰੀਆ at +Ãustria at +Ãustria at +ÐвÑÑ‚Ñ€Ð¸Ñ at +Ositiriya at +Nuortariika at +Rakúsko at +Avstrija at +ÐуÑтрија at +Austrija at +I-Austria at +Österrike at +ஆஸà¯à®¤à¯à®¤à®¿à®°à®¿à®¯à®¾ at +ÐвÑÑ‚Ñ€Ð¸Ñ at +ออสเตรีย at +Avusturya at +ÐвÑÑ‚Ñ€Ñ–Ñ at +ÐвÑÑ‚Ñ€Ð¸Ñ at +Ositiria at +Ão at +Otriche at +奥地利 at +奧地利 at +Australia au +Australië au +أستراليا au +Avustralya au +ÐÑžÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au +ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au +অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à§Ÿà¦¾ au +Aostralia au +Australija au +Austràlia au +Austrálie au +Awstralia au +Australien au +Australien au +ΑυστÏαλία au +AÅ­stralio au +Austraalia au +استرالیا au +Australie au +Australië au +An Astráil au +Austrália au +×וסטרליה au +आसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾ au +Australija au +Ausztrália au +Ãstralía au +オーストラリア au +អូស្ážáŸ’រាលី au +오스트레ì¼ë¦¬ì•„ au +ອອດສະເຕເລີຠau +Australija au +AustrÄlija au +ÐвÑтралија au +ÐвÑтрали au +Awstralja au +Australien au +Australië au +ਅਸਟਰੇਲੀਆ au +Austrália au +Austrália au +ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au +Ositaraliya au +Austrália au +Austrália au +Avstralija au +ÐуÑтралија au +Australija au +I-Australia au +Australien au +ஆஸà¯à®¤à¯à®¤à®¿à®°à¯‡à®²à®¿à®¯à®¾ au +ОÑтролиё au +ออสเตรเลีย au +Avusturalya au +ÐвÑÑ‚Ñ€Ð°Ð»Ñ–Ñ au +ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ au +Ositiralia au +Úc au +Ostraleye au +澳大利亚 au +澳大利亞 au +Aruba aw +أروبا aw +Ðруба aw +আরà§à¦¬à¦¾ aw +Arwba aw +ΑÏοÏμπα aw +Arubo aw +آروبا aw +×רובה aw +अरूबा aw +Arúba aw +オランダ自治領アルムaw +អារូបា aw +아루바 aw +ເàºàº¡à»„ັພ່ aw +Ðруба aw +Ðрува aw +ਅਰੂਬੀ aw +Ðруба aw +Ãruba aw +Ðруба aw +à®…à®°à¯à®ªà®¾ aw +Ðрубо aw +อรูบา aw +Ðруба aw +Ðруба aw +Arouba aw +阿é²å·´ aw +阿魯巴 aw +Ã…land Islands ax +Ã…land Eilande ax +ОÑтрови Ðланд ax +Illes Ã…land ax +Ã…landské ostrovy ax +Ã…land-øerne ax +Aland ax +Îησιά Ã…land ax +Islas Aland ax +Ahvenamaa ax +Ã…land irlak ax +Ahvenanmaan saaret ax +ÃŽles Ã…land ax +Ã…land-eilannen ax +Na hOileáin Ã…land ax +Illas Ã…land ax +Ã…land-szigetek ax +Ãlandseyjar ax +Isole Ã…land ax +オーランド諸島 ax +កោះ Ã…land ax +Ã…land salos ax +ОÑтрови Оланд ax +Ã…land-øyene ax +Ã…land-Inseln ax +Ã…land-eilanden ax +Ã…land-øyane ax +ਅਮਾਨ ਟਾਪੂ ax +Wyspy Ã…land ax +Ilhas Ã…land ax +Ilhas Ã…land ax +ÐландÑкие оÑтрова ax +Ibirwa by'Ã…land ax +Ã…land sullot ax +Ã…landski otoki ax +ÐландÑка оÑтрва ax +Alandska ostrva ax +Ã…land ax +หมู่เà¸à¸²à¸°à¸­à¸²à¸¥à¸±à¸™à¸”์ ax +Cayman Adaları ax +Aland Utrawları ax +ÐландÑькі оÑтрови ax +Ðланд Ороллари ax +阿兰群岛 ax +奧蘭群島 ax +Azerbaijan az +أذربيجان az +AzÉ™rbaycan az +ÐзÑрбайджан az +Ðзербайджан az +আজেরবাইজান az +Azerbeidjan az +Azerbejdžan az +Azerbaitjan az +Ãzerbajdžánský az +Aserbaijan az +Azerbajdjan az +Aserbaidschan az +ΑζεÏμπαϊτζάν az +AzerbajÄano az +Azerbaiján az +Aserbaidžaan az +آذربایجان az +Azerbaidäani az +Aserbadsjan az +Azerbeidjan az +An Asarbaiseáin az +×זרביג'ן az +अजरबैजान az +Azerbejdžan az +Azerbajdzsán az +Aserbaídsjan az +Azerbaigian az +アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³ az +អាហ្ស៊ែរបែហ្សង់ az +아제르바ì´ìž” az +ອາເຊີໄບຈັນ az +Azerbaidžanas az +AzerbaidžÄna az +Ðзербејџан az +Ðзарбайжан az +AżerbajÄ¡an az +Aserbajdsjan az +Aserbaidschan az +Azerbeidjan az +Aserbajdsjan az +ਅਜ਼ਰਬਾਈਜਾਨ az +Azerbejdżan az +Azerbaijão az +Azerbaijão az +Ðзербайджан az +Azeribayijani az +Aserbaižan az +Ãzerbajdžánsky az +Azerbajdžan az +Ðзербејџан az +Azerbejdžan az +I-Azerbaijan az +அசரà¯à®ªà¯ˆà®šà®¾à®©à¯ az +Озарбойҷон az +อาร์เซอร์ไบจัน az +Azerice az +Äzärbaycan az +Ðзербайджан az +Озарбайжон az +Azerbaydjan az +阿塞拜疆 az +亞塞拜然 az +Bosnia and Herzegovina ba +Bosnië en Herzegovina ba +البوسنا Ùˆ الهرسك ba +БоÑÑŒÐ½Ñ–Ñ Ñ– Герцагавіна ba +БоÑна и Херцеговина ba +বসনিয়া à¦à¦¬à¦‚ হারজিগোভিনা ba +Bosni hag Herzigovi ba +Bosna i Hercegovina ba +Bòsnia i Hercegovina ba +Bosna a Herzegovina ba +Bosnia a Hertsegofina ba +Bosnien-Herzegovina ba +Bosnien und Herzegowina ba +Βοσνία και ΕÏζεγοβίνη ba +Bosnio kaj Hercegovino ba +Bosnia y Herzegovina ba +Bosnia ja Hertsegovina ba +Bosnia eta Herzegovina ba +بوسنی Ùˆ هرزگوین ba +Bosnia ja Herzegovina ba +Bosnia-Herzegovina ba +Bosnie herzégovine ba +Bosnië en Herzegovina ba +An Bhoisnia agus Heirseagóivéin ba +Bosnia e Herzegovina ba +בוסניה הרצגובינה ba +बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¥‡à¤—ोविना ba +Bosna i Hercegovina ba +Bosznia-Hercegovina ba +Bosnía og Hersegóvína ba +Bosnia e Erzegovina ba +ボスニアヘルツェゴビナ ba +បូស្ន៊ី និង​ហឺហ្ស៊áŸáž áŸ’គោវីណា ba +보스니아어와 헤르체고비나 ba +ບອສເນີຠà»àº¥àº° ເຫີເຊີໂàºàº§àº´àº™àº² ba +Bosnija ir Hercegovina ba +Bosnija un Hercogovina ba +БоÑна и Херцеговина ba +БоÑни ба Херцеговина ba +Bożnia u Ħerżegovina ba +Bosnia-Hercegovina ba +Bosnien-Herzegowina ba +Bosnië en Herzegovina ba +Bosnia-Hercegovina ba +Bosnia le Herzegovina ba +ਬੋਸਨੀਆ ਤੇ ਹਰਜ਼ੀਗੋਵਿਨਾ ba +BoÅ›nia i Hercegowina ba +Bósnia e Herzegovina ba +Bósnia Herzegovina ba +Bosnia ÅŸi HerÅ£egovina ba +БоÑÐ½Ð¸Ñ Ð¸ Герцеговина ba +Bosiniya na Herizegovina ba +Bosnia ja Hercegovina ba +Bosna a Hercegovina ba +Bosna in Hercegovina ba +БоÑна и Херцеговина ba +Bosna i Hercegovina ba +I-Bosnia kanye ne Herzegovina ba +Bosnien och Herzegovina ba +பொசà¯à®©à®¿à®¯à®¾ மறà¯à®±à¯à®®à¯ ஹரà¯à®œà®¿à®•ோவினா ba +БоÑÐ½Ð¸Ñ Ð²Ð° ГерÑогавина ba +บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸´à¸™à¸² ba +Bosna Hersek ba +Bosnia wä Herzegovina ba +БоÑÐ½Ñ–Ñ Ñ– Герцеговина ba +БоÑÐ½Ð¸Ñ Ð²Ð° Герцоговина ba +Mubosinia na Muhezegovina ba +Bosnia và Herzegovina ba +Bosneye ba +Bosnia ne Herzegovina ba +波斯尼亚和黑塞哥维那 ba +æ³¢å£«å°¼äºžèˆ‡èµ«å¡žå“¥ç¶­ç´ ba +Bosnia kanye ne-Herzegovina ba +Barbados bb +بربادوس bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Ð‘Ð°Ñ€Ð±ÐµÐ¹Ð´Ð¾Ñ bb +বারবাডোস bb +ΜπαÏμπάντος bb +Barbado bb +باربادوس bb +Barbade bb +Barbadós bb +ברבדוס bb +बारबाडोस bb +ãƒãƒ«ãƒãƒ‰ã‚¹ bb +បារបាដូស bb +바르바ë„스 bb +ບາລບາດອດສ bb +Barbadosas bb +Barbadosa bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Ð‘Ð°Ñ€Ð±Ð¾Ð´Ð°Ñ bb +ਬਾਰਬਾਡੋਸ bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Barubadosi bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +I-Barbados bb +பாரà¯à®ªà¯‡à®Ÿà®¾à®šà¯ bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +บาร์บาดอส bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ bb +BÃ¥rbades bb +巴巴多斯 bb +å·´è²å¤š bb +Bangladesh bd +بنغلاديش bd +BanqladeÅŸ bd +БанглÑдÑш bd +Бангладеш bd +বাংলাদেশ bd +Bangladaech bd +BangladeÅ¡ bd +Bangladéš bd +Bangladesch bd +Μπαγκλαντές bd +BangladeÅo bd +بنگلادش bd +An Bhanglaidéis bd +בנגלדש bd +बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶ bd +BangladeÅ¡ bd +Banglades bd +Bangladess bd +ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥ bd +បង់ក្លាដáŸážŸáŸ’áž  bd +방글ë¼ë°ì‹œ bd +ບັງຄະລາເທດ bd +BangladeÅ¡as bd +BangladeÅ¡a bd +Бангладеш bd +Бангладеш bd +Bangladexx bd +Bangladesch bd +ਬੰਗਲਾਦੇਸ਼ bd +Bangladesz bd +BangladeÅŸ bd +Бангладеш bd +Bangaladeshi bd +Bangladéš bd +BangladeÅ¡ bd +Бангладеш bd +BangladeÅ¡ bd +I-Bangladesh bd +பஙà¯à®•ளாதேச௠bd +Банглодеш bd +บังคลาเทศ bd +BangladeÅŸ bd +BangladeÅŸ bd +Бангладеш bd +Бангладеш bd +孟加拉国 bd +孟加拉 bd +Belgium be +België be +بلجيكا be +Belçika be +БÑÐ»ÑŒÐ³Ñ–Ñ be +Ð‘ÐµÐ»Ð³Ð¸Ñ be +বেলজিয়াম be +Belgia be +Belgija be +Bèlgica be +Belgie be +Gwlad Belg be +Belgien be +Belgien be +Βέλγιο be +Belgio be +Bélgica be +Belgia be +Belgika be +بلژیک be +Belgia be +Belgia be +Belgique be +België be +An Bheilg be +Bélxica be +בלגיה be +बेलà¥à¤œà¤¿à¤¯à¤® be +Belgija be +Belgia be +Belgía be +Belgio be +ベルギー be +បែលហ្ស៊ិក be +ë²¨ê¸°ì— be +ເບລຢ່ງມ be +Belgija be +Beļģija be +Белгија be +Белги be +BelÄ¡ju be +Belgia be +Belgien be +België be +Belgia be +Bèlgica be +ਬੈਲਜੀਅਮ be +Belgia be +Bélgica be +Bélgica be +Belgia be +Ð‘ÐµÐ»ÑŒÐ³Ð¸Ñ be +Ububiligi be +Belgia be +Belgicko be +Belgija be +Белгија be +Belgija be +I-Belgium be +Belgien be +பெலà¯à®šà®¿à®¯à®®à¯ be +Ð‘ÐµÐ»Ð³Ð¸Ñ be +เบลเยียม be +Belçika be +Belgia be +Ð‘ÐµÐ»ÑŒÐ³Ñ–Ñ be +Ð‘ÐµÐ»Ð³Ð¸Ñ be +Bỉ be +Beldjike be +比利时 be +比利時 be +Burkina Faso bf +بوركينا ÙØ§Ø³Ùˆ bf +Буркіна ФаÑо bf +Буркина ФаÑо bf +বারকিনা ফাসো bf +Bwrcina Ffaso bf +ΜπουÏκίνα Φάσο bf +Burkino bf +Ø¨ÙˆØ±Ú©ÛŒÙ†Ø§ÙØ§Ø³Ùˆ bf +Buircíne Fasó bf +בורניקה פ×סו bf +बà¥à¤°à¥à¤•िना फासो bf +Burkina faso bf +Búrkína Fasó bf +ブルキナファソ bf +ប៊ូរគីណាហ្វាសូ bf +부르키나 파소 bf +ຕຸລະàºàºµ bf +Буркина ФаÑо bf +Буркина ФаÑо bf +ਬà©à¨°à¨•ਿਨਾ ਫਾਸੋ bf +Буркина-ФаÑо bf +Burukina Faso bf +Буркина ФаÑо bf +பரà¯à®•ினா ஃபசோ bf +Буркина ФаÑу bf +เบอร์à¸à¸´à¸™à¸²à¸Ÿà¸²à¹‚ซ bf +Буркіна-ФаÑо bf +Буркина-ФаÑÑо bf +Bourkina Fasso bf +布基纳法索 bf +布å‰ç´æ³•ç´¢ bf +Bulgaria bg +Bulgarye bg +بلغاريا bg +Bolgarıstan bg +Ð‘Ð°ÑžÐ³Ð°Ñ€Ñ‹Ñ bg +Ð‘ÑŠÐ»Ð³Ð°Ñ€Ð¸Ñ bg +বà§à¦²à¦—েরিয়া bg +Bulgari bg +Bugarska bg +Bulgària bg +Bulharsko bg +Bwlgaria bg +Bulgarien bg +Bulgarien bg +ΒουλγαÏία bg +Bulgario bg +Bulgaaria bg +بلغارستان bg +Bulgarie bg +Bulgarije bg +An Bhulgáir bg +Bulgária bg +בולגריה bg +बà¥à¤²à¥à¤—ारिया bg +Bugarska bg +Bulgária bg +Búlgaría bg +ブルガリア bg +ប៊ុលហ្ការី bg +불가리아 bg +ບັນà»àºà»€àº¥àºµàº bg +Bulgarija bg +BulgÄrija bg +Бугарија bg +Болгари bg +Bulgarija bg +Bulgarien bg +Bulgarije bg +ਬà©à¨²à¨—ਾਰੀਆ bg +BuÅ‚garia bg +Bulgária bg +Bulgária bg +Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg +Buligariya bg +Bulgária bg +Bulharsko bg +Bolgarija bg +БугарÑка bg +Bugarska bg +I-Bulgaria bg +Bulgarien bg +பலà¯à®•ேரியா bg +БулғориÑтон bg +บัลà¹à¸à¹€à¸£à¸µà¸¢ bg +Bulgaristan bg +Ð‘Ð¾Ð»Ð³Ð°Ñ€Ñ–Ñ bg +Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ bg +Baligaria bg +BulgÃ¥reye bg +ä¿åŠ åˆ©äºš bg +ä¿åŠ åˆ©äºž bg +Bahrain bh +البحرين bh +БахрÑйн bh +Бахрейн bh +বাহরেন bh +Barein bh +Bahrein bh +Bahrajn bh +ΜπαχÏέιν bh +Barejno bh +Bahrein bh +Bahrein bh +بحرین bh +Baghrein bh +Bairéin bh +Barein bh +בחריין bh +बहारीन bh +Barein bh +ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³ bh +បារ៉ែន bh +ë°”ë ˆì¸ bh +ຖັàºàºà»ˆàº‡àº§ bh +Bahreinas bh +Bahreina bh +Бахреин bh +Бахрайн bh +Baħrain bh +Baghrein bh +ਬਹਿਰੀਨ bh +Bahrajn bh +Bahrein bh +Бахрейн bh +Bahirayini bh +Bahrajn bh +Bahrajn bh +Бахреин bh +Bahrein bh +I-Bahrain bh +Bahrein bh +பஹà¯à®°à¯ˆà®©à¯ bh +Баҳрайн bh +บาห์เรียน bh +Bahreyn bh +Bahreyn bh +Бахрейн bh +Баҳрайн bh +Bareyn bh +å·´æž— bh +å·´æž— bh +Burundi bi +بوروندي bi +Бурундзі bi +Бурунди bi +বà§à¦°à§à¦¨à§à¦¡à¦¿ bi +Bwrwndi bi +ΜπουÏουντί bi +Burundo bi +بروندی bi +An Bhurúin bi +בורונדי bi +बà¥à¤°à¥‚ंडी bi +Búrúndí bi +ブルンジ bi +ប៊ូរុនឌី bi +부룬디 bi +ເຄອຣດ bi +Burundija bi +Бурунди bi +Бурунди bi +ਬà©à¨°à©à¨¨à¨¡à©€ bi +Бурунди bi +Бурунди bi +பà¯à®°à¯à®©à¯à®Ÿà®¿ bi +Бурундӣ bi +บูรันดิ bi +Бурунді bi +Бурунди bi +Bouroundi bi +布隆迪 bi +浦隆地 bi +Benin bj +Denin bj +بينين bj +БÑнін bj +Бенин bj +বেনিন bj +Μπενίν bj +Benino bj +بنین bj +Bénin bj +Beinin bj +בנין bj +बेनिन bj +Benín bj +ベナン bj +áž”áŸážŽáž¶áŸ†áž„ bj +베냉 bj +ບອສເນີຠbj +Benina bj +Бенин bj +Бенин bj +ਬੀਨਿਨ bj +Benim bj +Бенин bj +Bene bj +Бенин bj +பெனின௠bj +Бенини bj +เบนิน bj +Бенін bj +Бенин bj +è´å® bj +è²å— bj +Bermuda bm +برمودا bm +БÑрмуды bm +Бермуда bm +বারà§à¦®à§à¦¡à¦¾ bm +Bermud bm +Bermudy bm +Bermwda bm +Bermudas bm +ΒεÏμοÏδες bm +Bermudoj bm +برمودا bm +Bermudes bm +Beirmiúda bm +ברמודה bm +बरमूडा bm +Bermúdaeyjar bm +英領ãƒãƒ¼ãƒŸãƒ¥ãƒ¼ãƒ€ bm +ប៊áŸážšáž˜áž¼ážŠáž¶ bm +버뮤다 bm +ເàºàº¥àº¥àº°àº¡àº±àº™ bm +Bermudų bm +Bermudas bm +Бермуди bm +Бермуда bm +ਬੀਰਮà©à¨¡à¨¾ bm +Bermudy bm +Bermude bm +БермудÑкие ОÑтрова bm +Berimuda bm +Bermudy bm +Bermudi bm +Бермуда bm +பெரà¯à®®à¯à®Ÿà®¾ bm +Бермудо bm +เบอร์มิวดา bm +Бермуди bm +Бермуда Ороллари bm +Bermudes bm +百慕大 bm +ç™¾æ…•é” bm +Brunei Darussalam bn +بروناي دار السلام bn +БрунÑй bn +Бруней bn +বà§à¦°à§à¦¨à§‡à¦‡ দারà¦à¦¸à¦¸à¦²à¦¾à¦® bn +Darussalam Brunei bn +Brunej bn +Brwnei Darwsalam bn +Brunei bn +ΜπÏουνέι ÎταÏουσαλάμ bn +Brunejo bn +Brunei bn +برونویی بیت‌المقدس bn +Brunei bn +Brúiné bn +בורניי ×“×¨×•×¡×œ× bn +बà¥à¤°à¥‚नेई दारेसà¥à¤¸à¤²à¤¾à¤® bn +Brunei Szultánság bn +Brúnei Darussalam bn +Brunei bn +ブルãƒã‚¤ bn +ប្រ៊ុយណ០bn +ë¸Œë£¨ë‚˜ì´ bn +ເບລາລັສເຊີຠbn +Bruneja Darusalama bn +Брунеи Дар ÐµÑ Ð¡Ð°Ð»Ð°Ð¼ bn +Бруней ДаруÑÑалам bn +Brunei bn +Brunei bn +Brunei bn +ਬਰੂਨੀ ਡਾਰੂਸਲਾਮ bn +Brunei Dar-es-Salam bn +Brunei bn +Бруней bn +Buruneyi Darusalamu bn +Brunei bn +Brunei Darusalam bn +Брунеј ДаруÑалам bn +Brunej Darusalam bn +பà¯à®°à¯‚னை டரà¯à®šà®²à®¾à®®à¯ bn +Брунеи Ð‘Ð°Ð¹Ñ‚ÑƒÐ»Ð¼ÑƒÒ›Ð°Ð´Ð´Ð°Ñ bn +บรูไนดูรัสซาลาม bn +Brunei bn +Бруней ДаруÑÑалам bn +Бруней ДоруÑÑалом bn +Bruney Darussalam bn +文莱达é²è¨å…° bn +æ–‡èŠé”魯薩蘭 bn +Bolivia bo +Bolivië bo +بوليÙيا bo +Boliviya bo +Ð‘Ð°Ð»Ñ–Ð²Ñ–Ñ bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +বলিভিয়া bo +Bolivija bo +Bolívia bo +Bolívie bo +Bolifia bo +Bolivien bo +Βολιβία bo +Bolivio bo +Boliivia bo +بولیوی bo +Bolivie bo +An Bholaiv bo +Bolívia bo +בוליביה bo +बोलिविया bo +Bolivija bo +Bolívia bo +Bólivía bo +ボリビア bo +បូលីវី bo +볼리비아 bo +ໂບລີເວີຠbo +Bolivija bo +BolÄ«vija bo +Боливија bo +Боливи bo +Bolivja bo +Bolivien bo +ਬੋਲਵੀਆ bo +Boliwia bo +Bolívia bo +Bolívia bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +Boliviya bo +Bolívia bo +Bolivija bo +Боливија bo +Bolivija bo +I-Bolivia bo +பொலிவியா bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +โบลิเวีย bo +Bolivya bo +Ð‘Ð¾Ð»Ñ–Ð²Ñ–Ñ bo +Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ bo +Boliveye bo +玻利维亚 bo +玻利維亞 bo +Brazil br +Brazilië br +البرازيل br +Braziliya br +Ð‘Ñ€Ð°Ð·Ñ‹Ð»Ñ–Ñ br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br +বà§à¦°à¦¾à¦œà¦¿à¦² br +Brasil br +Brazílie br +Brasil br +Brasilien br +Brasilien br +Î’Ïαζιλία br +Brazilo br +Brasil br +Brasiilia br +Brasil br +برزیل br +Brasilia br +Brésil br +Brazilië br +An Bhrasaíl br +Brasil br +ברזיל br +बà¥à¤°à¤¾à¤œà¥€à¤² br +Brazília br +Brasilía br +Brasile br +ブラジル br +ប្រáŸáž áŸ’ស៊ីល br +브ë¼ì§ˆ br +ບາຊີລ br +Brazilija br +BrazÄ«lija br +Бразил br +Бразил br +Brażil br +Brasil br +Brasilien br +Brazilië br +Brasil br +Brasil br +ਬਰਾਜ਼ੀਲ br +Brazylia br +Brasil br +Brasil br +Brazilia br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br +Burezile br +Brasil br +Brazília br +Brazilija br +Бразил br +I-Brazil br +Brasilien br +பிரேசில௠br +Бразил br +บราซิล br +Brezilya br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ñ–Ñ br +Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ br +Burazili br +Braezi br +巴西 br +巴西 br +Bahamas bs +جزر الباهاما bs +Багамы bs +БахамÑки оÑтрови bs +বাহামাস bs +Bahami bs +Bahames bs +Bahamy bs +Ynysoedd Bahama bs +Μπαχάμες bs +Bahamoj bs +Bahama bs +باهاماس bs +Bahaman saaret bs +Na Bahámaí bs +Baamas bs +בהמס bs +बहामा bs +Bahamák bs +Bahamaeyjar bs +ãƒãƒãƒž bs +បាហាម៉ា bs +바하마 bs +ປານາມາ bs +Bahamų bs +Бахами bs +Ð‘Ð°Ñ…Ð°Ð¼Ð°Ñ bs +Baħamas bs +ਬਾਹਾਮਾਸ bs +Bahamy bs +БагамÑкие оÑтрова bs +Bahamasi bs +Bahamy bs +Bahami bs +Бахами bs +Bahami bs +பனாமா bs +Ð‘Ð¾Ò³Ð¾Ð¼Ð¾Ñ bs +บาฮามา bs +Bahamalar bs +Багами bs +Багама Ороллари bs +巴哈马 bs +巴拿馬 bs +Bhutan bt +بوتان bt +Бутан bt +Бутан bt +ভূটান bt +Butañ bt +Butan bt +Bhútán bt +Bhwtan bt +Μπουτάν bt +Butano bt +Bhután bt +بوتان bt +Bhoutan bt +An Bhútáin bt +Bután bt +בהוטן bt +भूटान bt +Bhután bt +Bútan bt +ブータン bt +ប៊ូážáž¶áž“ bt +부탄 bt +ຖັàºàºà»ˆàº‡àº§ bt +Bhutano bt +ButÄna bt +Бутан bt +Бутан bt +Butan bt +ਭà©à¨Ÿà¨¾à¨¨ bt +Butão bt +Butão bt +Butan bt +Бутан bt +Butani bt +Butan bt +Бутан bt +Butan bt +பூடான௠bt +Бутон bt +ภูà¸à¸²à¸™ bt +Butan bt +Бутан bt +Бутан bt +Boutan bt +ä¸ä¸¹ bt +ä¸ä¸¹ bt +Botswana bw +بوتسوانا bw +БатÑвана bw +БотÑуана bw +বটসওয়ানা bw +Bocvana bw +Μποτσουάνα bw +Bocvano bw +بوتسووانا bw +An Bhotsuáin bw +Botsuana bw +בוצ×ונה bw +बोतà¥à¤¸à¤µà¤¾à¤¨à¤¾ bw +Botsvana bw +Botsvana bw +ボツワナ bw +បុážážŸáŸ’វាណា bw +보츠와나 bw +ບອດສເນີຠbw +Botsvanos bw +BotsvÄna bw +Боцвана bw +БотÑвана bw +ਬੋਟਸਵਾਨਾ bw +Botsuana bw +БотÑвана bw +Botsvana bw +Боцвана bw +Bocvana bw +பாடà¯à®¸à¯à®µà®©à®¾ bw +БотÑвана bw +บอทสวานา bw +Botsvana bw +БотÑвана bw +Боцвана bw +Boswana bw +åšèŒ¨ç“¦çº³ bw +波札那 bw +Belarus by +روسيا البيضاء by +БеларуÑÑŒ by +Ð‘ÐµÐ»Ð°Ñ€ÑƒÑ by +বেলারà§à¦¸ by +Belarusi by +Bjelorusija by +Bielorússia by +BÄ›lorusko by +Belarws by +Hviderusland by +Weißrussland by +ΛευκοÏωσία by +Belorusio by +Valgevene by +بلاروس by +Valkovenäjä by +Hvítarusland by +Bélarus by +Wyt-Rusland by +An Bhealarúis by +Bielorúsia by +בלרוס by +बेलारूस by +Bjelorusija by +Fehéroroszország by +Hvíta-Rússland by +Bielorussia by +ベラルーシ by +áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស by +벨ë¼ë£¨ìФ by +ເບລາລັສ by +Baltarusija by +Baltkrievija by +БелоруÑија by +Цагаан Ð¾Ñ€Ð¾Ñ by +Hviterussland by +Wittrussland by +Wit-Rusland by +Kviterussland by +ਬੇਲਾਰੂਸ by +BiaÅ‚oruÅ› by +Bielorrússia by +БеларуÑÑŒ by +Belarusi by +Vilges-Ruošša by +Bielorusko by +Belorusija by +БелоруÑија by +Belorusija by +I-Belarus by +Vitryssland by +பெலாரூச௠by +БелоруÑиё by +เบลารุส by +БілоруÑÑ–Ñ by +Ð‘ÐµÐ»Ð¾Ñ€ÑƒÑ by +Belaruss by +白俄罗斯 by +白俄羅斯 by +Belize bz +بيليز bz +БÑлізе bz +Белийз bz +বেলিজ bz +Beliz bz +Bel?s bz +Μπελίζε bz +Belizo bz +بلیز bz +An Bheilís bz +בליז bz +बेलिज bz +Belís bz +ベリーズ bz +áž”áŸáž›áž¸áž áŸ’ស bz +벨리즈 bz +ເບລàºà»ˆàº‡àº¡ bz +Belizo bz +Beliza bz +Белизе bz +Ð‘ÐµÐ»Ð¸Ð·Ñ bz +Beliż bz +ਬੀਲੀਜ਼ਿ bz +Белиз bz +Белиз bz +Beliz bz +பெலà¯à®šà®¿à®¯à®®à¯ bz +Белиз bz +เบลไลซ์ bz +Beliz bz +Беліз bz +Белиз bz +伯利兹 bz +比利時 bz +Default C +Standaard C +Ø§ÙØªØ±Ø§Ø¶ÙŠ C +Ön QurÄŸulu C +Па ўмаўчаньні C +По подразбиране C +ডিফলà§à¦Ÿ C +Dre ziouer C +Omissió C +Výchozí C +Rhagosodedig C +Standard C +Standard C +ΠÏοκαθοÏισμένο C +Apriora C +Predeterminado C +Vaikimisi C +Lehenetsia C +Ù¾ÛŒØ´â€ŒÙØ±Ø¶ C +Oletus C +Forsettur C +Par défaut C +Standert C +Réamhshocrú C +Por Omisión C +ברירת מחדל C +डिफ़ॉलà¥à¤Ÿ C +UobiÄajeno C +Standard C +Alapértelmezett C +Standar C +Sjálfgefið C +Predefinito C +標準 C +លំនាំដើម C +기본 C +ຄ່າປະລິàºàº²àº C +Numatyta C +NoklusÄ“tais C +Почетно C +Стандарт C +Normali C +Standard C +Standard C +Standaard C +Standard C +Thuso ya Tshoganetso C +Omission C +ਮੂਲ C +DomyÅ›lnie C +Por Omissão C +Padrão C +Implicit C +По умолчанию C +Mburabuzi C +Standárda C +Å tandardný C +Privzeto C +Подразумевано C +Podrazumevano C +Förval C +à®®à¯à®©à¯à®©à®¿à®°à¯à®ªà¯à®ªà¯ C +Пешфарзӣ C +ค่าปริยาย C +Öntanımlı C +Ğädäti C +Типовий C +Ðндоза C +Mặc định C +Prémetou C +Okwendalo C +默认 C +é è¨­ C +Okwendalo C +Canada ca +Kanada ca +كندا ca +Kanada ca +Канада ca +Канада ca +কানাডা ca +Kanada ca +Kanada ca +Canadà ca +Kanada ca +Kanada ca +Καναδάς ca +Kanado ca +Canadá ca +Kanada ca +Kanada ca +کانادا ca +Kanada ca +Kanada ca +Kanada ca +Ceanada ca +Canadá ca +קנדה ca +कनाडा ca +Kanada ca +Kanada ca +Kanada ca +Kanada ca +カナダ ca +កាណាដា ca +ìºë‚˜ë‹¤ ca +à»àº„ນາດາ ca +Kanada ca +KanÄda ca +Канада ca +Канад ca +Kanada ca +Kanada ca +ਕੈਨੇਡਾ ca +Kanada ca +Canadá ca +Canadá ca +Канада ca +Kanada ca +Kanada ca +Kanada ca +Канада ca +Kanada ca +I-Canada ca +Kanada ca +கனடா ca +Канада ca +à¹à¸„นาดา ca +Kanada ca +Kanada ca +Канада ca +Канада ca +加拿大 ca +加拿大 ca +Cocos (Keeling) Islands cc +Kokos Eilande cc +جزر كوكوس (كيلينغ) cc +КокоÑови оÑтрови cc +কোকোস (কীলিং) দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ cc +Inizi Koko (Keeling) cc +Kokosovo (Keeling) ostrvo cc +Illes Cocos (Keeling) cc +Kokosové ostrovy (Keeling) cc +Ynysoedd y Cocos (Keeling) cc +Cocos/Keeling-Inseln cc +Îήσοι Κόκος (Κήλινγκ) cc +Kokosinsuloj cc +Islas Cocos (Keeling) cc +Kookossaared cc +Cocos Irlak cc +جزایر کوکوس کیلینگ cc +Cookinsaaret cc +ÃŽles Cocos cc +Oileán na gCócónna (Keeling) cc +Illas Cocos (Keeling) cc +××™×™ קוקוס cc +कोकोस (कीलिंग) आइलैंडà¥à¤¸ cc +Cocos (Keeling) Otoci cc +Kókusz-szigetek (Keeling) cc +Kókoseyjar cc +Isole Cocos (Keeling) cc +オーストラリア領ココス島 cc +កោះ Cocos (Keeling) cc +코코스 ì œë„ cc +Kokosu salas cc +ОÑтрови ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc +Cocos (Keeling) арлууд cc +Gżejjer Cocos (Keeling) cc +Kokosøyene cc +Cocos- (Keeling-) Inseln cc +Kokosøyane cc +ਕੋਕੋਸ(ਕਿਨਿੰਗ) ਟਾਪੂ cc +Wyspy Kokosowe (Keelinga) cc +Ilhas Cocos (Keeling) cc +Ilhas Cocos cc +Insulele Cocos (Keeling) cc +КокоÑовые (Килинг) оÑтрова cc +Ibirwa Kokosi cc +Kokosullut cc +Kokosove Ostrovy cc +Kokosovi (Keelingovi) otoki cc +КокоÑова (Килингова) оÑтрва cc +Kokosova (Kilingova) ostrva cc +Kokosöarna cc +கோகோஸ௠(கீலிஙà¯) தீவà¯à®•ள௠cc +Ҷазираи ÐšÐ¾ÐºÐ¾Ñ (Килинг) cc +หมู่เà¸à¸²à¸°à¹‚คคอส (Keeling) cc +Keeling Adaları cc +Kokos (Keeling) Utrawları cc +КокоÑові оÑтрови cc +ÐšÐ¾ÐºÐ¾Ñ (Килинг) Ороллари cc +Iyes Cocos cc +科科斯群岛 cc +å¯å¯æ–¯ç¾¤å³¶ cc +Congo, The Democratic Republic of the cd +Kongo, Demokratiese republiek van die cd +ДÑÐ¼Ð°ÐºÑ€Ð°Ñ‚Ñ‹Ñ‡Ð½Ð°Ñ Ð ÑÑпубліка Конга cd +ДР Конго cd +কঙà§à¦—োর গণতানà§à¦¤à§à¦°à¦¿à¦• পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦° cd +Kongo, Demokratska republika cd +Congo, República Democràtica del cd +Kongo cd +Congo, Gweriniaeth Democrataidd y cd +Congo, den demokratiske republik cd +Kongo, Republik cd +Κονγκό, ΔημοκÏατία του cd +Kongo, la Demokratia Respubliko de la cd +Congo, República democrática del cd +Kongo (DV) cd +Kongoko Errepublika Demokratikoa cd +Kongon demokraattinen tasavalta cd +République Démocratique du Congo cd +Kongo, de democratische republyk van de cd +Poblacht Dhaonlathach an Chongó cd +Congo, República Democrática do cd +קונגו, הרפובליקה הדמוקרטית של cd +डेमोकà¥à¤°à¥‡à¤Ÿà¤¿à¤• रिपबà¥à¤²à¤¿à¤• ऑफ कॉगो cd +Kongói Demokratikus Köztársaság cd +Kongó, Austur cd +Congo, Repubblica Democratica del cd +コンゴ,民主共和国 cd +សាធារណរដ្ឋ​ប្រជាធិបážáŸáž™áŸ’យ​កុងហ្គោ cd +Kongo demokratinÄ— respublika cd +Kongo demokrÄtiskÄ republika cd +Конго, ДемократÑка Република на cd +Kongo (RD) cd +Kongo cd +Kongo (De demokraatsche Republiek) cd +Congo, Democratische republiek cd +Kongo cd +ਕਾਂਗੋ, ਲੋਕਤੰਤਰੀ ਗਣਰਾਜ cd +Republika Demokratyczna Kongo cd +Congo, República Democrática do cd +República Democrática do Congo cd +Congo, Republica Democrată cd +ДемократичеÑÐºÐ°Ñ Ð ÐµÑпублика Конго cd +Kongo, Repubulika Iharanira Demokarasi ya cd +Kongo cd +Demokratická Republika Kongo cd +Kongo, demokratiÄna republika cd +Конго, ДемократÑка Република cd +Kongo, Demokratska Republika cd +Demokratiska republiken Kongo cd +கானà¯à®•ோ, கà¯à®Ÿà®¿à®¯à®°à®šà¯ cd +Ҷумҳурии демократии Ҳонконг cd +สาธารณรัà¸à¸›à¸£à¸°à¸Šà¸²à¸˜à¸´à¸›à¹„ตยคองโภcd +Demokratik Kongo Cumhuriyeti cd +Kongo, Demokrat Cömhüriäte cd +Конго, демократична реÑпубліка cd +Конго Демократик РеÑпубликаÑи cd +Congo, republike democratike cd +刚果民主共和国 cd +剛果民主共和國 cd +Central African Republic cf +Sentrale Afrika Republiek cf +جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى cf +ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка cf +ЦÐР cf +মধà§à¦¯ আফà§à¦°à¦¿à¦•ান রিপাবলিক cf +Republik centrafricaine cf +CentralnoafriÄka Republika cf +República Centro Africana cf +StÅ™edoafrická republika cf +Gweriniaeth Canolig Affrica cf +Central-afrikanske Republik cf +Zentralafrikanische Republik cf +ΔημοκÏατία ΚεντÏικής ΑφÏικής cf +Mezafrika Respubliko cf +República Centroafricana cf +Kesk-Aafrika Vabariik cf +Afrika Erdiko Errepublika cf +جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی cf +Keski-Afrikan tasavalta cf +République centrafricaine cf +Sintraal Afrikaanse Republyk cf +Poblacht na hAfraice Láir cf +República Centro Africana cf +הרפובליקה ×”×פריקנית התיכונה cf +सेंटà¥à¤°à¤² अफà¥à¤°à¥€à¤•न रिपबà¥à¤²à¤¿à¤• cf +Centralna AfriÄka Republika cf +Közép-Afrikai Köztársaság cf +Mið-Afríkulýðveldið cf +Repubblica Centrafricana cf +中央アフリカ共和国 cf +សាធារណរដ្ឋ​អាហ្វ្រិក​កណ្ដាល cf +중앙 아프리카 공화국 cf +ໂດມິນິàºàº±àº™ cf +CentrinÄ—s Afrikos Respublika cf +CentrÄlÄfrikas republika cf +ЦентралноафриканÑка Република cf +Төв африкын ард ÑƒÐ»Ñ cf +Repubblika ÄŠentrali Afrikana cf +Den sentralafrikanske republikk cf +Zentraalafrikaansche Republiek cf +Centraal Afrikaanse Republiek cf +Den sentralafrikanske republikken cf +ਕੇਂਦਰੀ ਅਫਰੀਕੀ ਗਣਰਾਜ cf +Republika Åšrodkowej Afryki cf +República Central Africana cf +República da Ãfrica Central cf +Republica Centrafricană cf +Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика cf +Repubulika ya Santara Afurika cf +GuovddášafrihkálaÅ¡ republihkka cf +Stredoafrická Republika cf +CentralnoafriÅ¡ka republika cf +Централноафричка Република cf +CentralnoafriÄka Republika cf +Centralafrikanska Republiken cf +மைய ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®• கà¯à®Ÿà®¿à®¯à®°à®šà¯ cf +Ҷумҳурии Ðфриқои Марказӣ cf +สาธารณรัà¸à¸­à¸±à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡ cf +Orta Afrika Cumhuriyeti cf +Üzäk Afrika Cömhüriäte cf +Центральна африканÑька реÑпубліка cf +Марказий Ðфрика РеÑпубликаÑи cf +Cá»™ng hoà Trung Phi cf +Cintrafrike cf +中éžå…±å’Œå›½ cf +多明尼加共和國 cf +Congo cg +Konsole cg +الكونغو cg +Конга cg +Конго cg +কঙà§à¦—à§‹ cg +Kongo cg +Kongo cg +Kongo cg +Kongo cg +Κονγκό cg +Kongo (Brazavila) cg +Kongo cg +Kongo cg +Ú©Ù†Ú¯Ùˆ cg +Kongo cg +Kongo cg +Congó cg +קונגו cg +कोंगो cg +Kongo cg +Kongó cg +Kongó, Vestur cg +コンゴ cg +កុងហ្គោ cg +콩고 cg +ຄອນໂà»àºŠàº¥ cg +Kongo cg +Kongo cg +Конго cg +Конго cg +Kongo cg +Kongo-Brazaville cg +Kongo cg +Kongo-Brazaville cg +ਕਾਂਗੋ cg +Kongo cg +Конго cg +Kongo cg +Kongo cg +Kongo cg +Kongo cg +Конго cg +Kongo cg +Kongo cg +கானà¯à®•ோ cg +Конго cg +คองโภcg +Kongo cg +Kongo cg +Конго cg +Конго cg +刚果 cg +剛果 cg +Switzerland ch +Switserland ch +سويسرا ch +İsveçrÉ™ ch +ШвÑÐ¹Ñ†Ð°Ñ€Ñ‹Ñ ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch +সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦£à§à¦¡ ch +Suis ch +Å vicarska ch +Suïssa ch +Å výcarsko ch +Y Swistir ch +Schweiz ch +Schweiz ch +Ελβετία ch +Svislando ch +Suiza ch +Å veits ch +Suitza ch +سوییس ch +Sveitsi ch +Suisse ch +Switserlân ch +An Eilvéis ch +Suíza ch +שוייץ ch +सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤°à¤²à¥ˆà¤‚ड ch +Å vicarska ch +Svájc ch +Swiss ch +Sviss ch +Svizzera ch +スイス ch +ស្វ៊ីស ch +스위스 ch +ສະວິສເຊີà»àº¥àº™ ch +Å veicarija ch +Å veice ch +Швајцарија ch +Швецарь ch +Svizzera ch +Sveits ch +Swiez ch +Zwitserland ch +Sveits ch +Suissa ch +ਸਵਿਟਜ਼ਰਲੈਂਡ ch +Szwajcaria ch +Suíça ch +Suíça ch +ElveÅ£ia ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch +Swazilande ch +Å veica ch +Å vajÄiarsko ch +Å vica ch +ШвајцарÑка ch +Å vajcarska ch +I-Switzerland ch +Schweiz ch +சà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯ ch +Свитзерланд ch +สวิสเซอร์à¹à¸¥à¸™à¸”์ ch +İsviçre ch +İswiçrä ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ñ–Ñ ch +Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ ch +Thuỵ SÄ© ch +Swisse ch +瑞士 ch +瑞士 ch +Cote d'ivoire ci +ساحل العاج ci +Бераг Слановай КоÑьці ci +Кот Дивоар ci +Aod an Olifant ci +Obala SlonovaÄe ci +Costa d'ivori ci +PobÅ™eží slonoviny ci +Y Traeth Ifori ci +Elfenbenskysten ci +Ακτή Î•Î»ÎµÏ†Î±Î½Ï„Î¿ÏƒÏ„Î¿Ï ci +Eburio ci +Costa de Marfil ci +Cote d'Ivoire ci +Boli kosta ci +Ú©ÙØªÙ دیوÙیر ci +Côte d'Ivoire ci +Ivoorkust ci +An Cósta Eabhair ci +कोट डि'वॉरे ci +Baci kocke ci +Elefántcsontpart ci +Fílabeinsströndin ci +Costa d'Avorio ci +コートジボアール ci +កូដឌីវáŸážš ci +코트디부아르 ci +ປ່ອàºàº«àº¡àº²àºàºàº°àº¥àº­àº ci +KotdivuÄra ci +Брегот на Слоновата КоÑка ci +Kosta tal-Avorju ci +Elfenbenskysten ci +Elfenbeenküst ci +Ivoorkust ci +Elfenbeinskysten ci +ਕਾਂਟੋ ਡੀਵੋਇਰੀ ci +Wybrzeże KoÅ›ci SÅ‚oniowej ci +Costa do Marfim ci +Coasta de Azur ci +Кот Д'Ивуар ci +Kote divuware ci +ElfenÄalánriddu ci +SlonokoÅ¡Äena obala ci +Обала Ñлоноваче ci +Obala slonovaÄe ci +Elfenbenskusten ci +Соҳили Оҷ ci +อ่าวไอวอรี ci +Кот Д'Івуар ci +Кот д'Ивуар ci +Bá» biển ngà ci +Coisse d' Ivwere ci +科特迪瓦 ci +象牙海岸 ci +Cook islands ck +Cook Eilande ck +جزر كوك ck +ÐÑтравы Кука ck +ОÑтрови Кук ck +কà§à¦• দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ck +Inizi Kook ck +Kukova ostrva ck +Illes Cook ck +Cookovy ostrovy ck +Ynysoedd Cook ck +Cook-øerne ck +Cook-Inseln ck +Îησιά Κουκ ck +Kukinsuloj ck +Islas Cook ck +Cooki saared ck +Cook Irlak ck +جزایر Ú©ÙˆÚ© ck +Cooksaaret ck +ÃŽles Cook ck +Oileáin Chook ck +Illas Cook ck +××™×™ קוק ck +कà¥à¤• आइलैंड ck +Cook otoci ck +Cook-szigetek ck +Cooks-eyjar ck +Isole Cook ck +ニュージーランド自治領クック諸島 ck +កោះ Cook ck +ì¿¡ ì œë„ ck +ຄຸàºàºàºµà»‰ ck +Kuko salų ck +Kuka salas ck +Кукови оÑтрови ck +Cook арлууд ck +Gżejjer Cook ck +Cookøyene ck +Cookinseln ck +Cook Eilanden ck +Cookøyane ck +ਕà©à©±à¨• ਟਾਪੂ ck +Wyspy Cooka ck +Ilhas Cook ck +Ilhas Cook ck +Insulele Cook ck +ОÑтрова Кука ck +Ibirwa bya Kuke ck +Cooksullut ck +Cookove ostrovy ck +Cookovi otoki ck +Кукова оÑтрва ck +Kukova ostrva ck +Cooköarna ck +கà¯à®•௠தீவ௠ck +Ҷазираи Кук ck +หมู่เà¸à¸²à¸°à¸„ุภck +Cook Adaları ck +Kok Utrawları ck +ОÑтрови Кука ck +Кук Ороллари ck +Iyes Cook ck +库克群岛 ck +庫克群島 ck +Chile cl +Chilië cl +تشيلي cl +Åžili cl +Чылі cl +Чили cl +চিলি cl +ÄŒile cl +Xile cl +Tsile cl +Χιλή cl +Ĉilio cl +TÅ¡iili cl +Txile cl +شیلی cl +Chili cl +Chili cl +An tSile cl +צ'ילה cl +चिली cl +ÄŒile cl +Chili cl +Cile cl +ãƒãƒª cl +ឈីលី cl +ì¹ ë ˆ cl +ຊີລີ cl +ÄŒilÄ— cl +Čīle cl +Чиле cl +Чили cl +ÄŠile cl +Chili cl +ਚਿੱਲੀ cl +Cile cl +Чили cl +Shili cl +ÄŒile cl +ÄŒile cl +Чиле cl +ÄŒile cl +I-Chile cl +சிலி cl +Чилли cl +ชิลี cl +Åžili cl +Çili cl +Чилі cl +Чили cl +Chi lê cl +Tchili cl +智利 cl +智利 cl +Cameroon cm +Kameroon cm +الكاميرون cm +КамÑрун cm +Камерун cm +কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨ cm +Kameroun cm +Kamerun cm +Camerun cm +Kamerun cm +Y Camer?n cm +Cameroun cm +Kamerun cm +ΚαμεÏοÏν cm +Kameruno cm +Camerún cm +Kamerun cm +Kamerun cm +کامرون cm +Kamerun cm +Cameroun cm +Kameroen cm +Camarún cm +Camerún cm +קמרון cm +कैमरून cm +Kamerun cm +Kamerun cm +Kamerún cm +Camerun cm +カメルーン cm +កាមáŸážšáž¼áž“ cm +카메룬 cm +ຕາລາງງານ - K cm +KamerÅ«no cm +KamerÅ«na cm +Камерун cm +Камерун cm +Kamerun cm +Kamerun cm +Kamerun cm +Cameroen cm +Kamerun cm +ਕੈਮਰੂਨ cm +Kamerun cm +Camarões cm +Camarões cm +Camerun cm +Камерун cm +Kameruni cm +Kamerun cm +Komerun cm +Kamerun cm +Камерун cm +Kamerun cm +Kamerun cm +கமீரூன௠cm +Камерун cm +คาเมรูน cm +Kamerun cm +Kameroon cm +Камерун cm +Камерун cm +Camrone cm +喀麦隆 cm +喀麥隆 cm +China cn +الصين cn +Çin cn +Кітай cn +Китай cn +চীন cn +Sina cn +Kina cn +Xina cn +Čína cn +Tseina cn +Kina cn +Κίνα cn +Ĉinujo cn +Hiina cn +Txina cn +چین cn +Kiina cn +Kina cn +Chine cn +An tSín cn +סין cn +चीन cn +Kina cn +Kína cn +Cina cn +Kína cn +Cina cn +中国 cn +áž…áž·áž“ cn +중국 cn +ຈີນ cn +Kinija cn +Ķīna cn +Кина cn +Ð¥Ñтад cn +ÄŠina cn +Kina cn +Kina cn +Xina cn +ਚੀਨ cn +Chiny cn +Китай cn +Ubushinwa cn +Kiinná cn +Čína cn +Kitajska cn +Кина cn +Kina cn +I-China cn +Kina cn +சீனா cn +Хитой cn +จีน cn +Çin cn +Çin cn +Китай cn +Хитой cn +Trung Quốc cn +Chine cn +中国 cn +中國 cn +Colombia co +Colombië co +كولمبيا co +ÐšÐ°Ð»ÑŽÐ¼Ð±Ñ–Ñ co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +কলোমà§à¦¬à¦¿à§Ÿà¦¾ co +Kolumbi co +Kolumbija co +Colòmbia co +Kolumbie co +Kolumbien co +Κολομβία co +Kolumbio co +Kolumbia co +Kolonbia co +کلمبیا co +Kolumbia co +Colombie co +Columbia co +An Cholóim co +Colómbia co +קולומביה co +कोलमà¥à¤¬à¤¿à¤¯à¤¾ co +Kolumbija co +Kolumbia co +Kólumbía co +コロンビア co +កូឡុំប៊ី co +콜롬비아 co +ໂຄລຳເບີຠco +Kolumbija co +Kolumbija co +Колумбија co +Колумб co +Kolumbja co +Kolumbien co +Columbia co +ਕੋਲੰਬੀਆ co +Kolumbia co +Colômbia co +Colômbia co +Columbia co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +Kolombiya co +Kolombia co +Kolumbia co +Kolumbija co +Колумбија co +Kolumbija co +I-Colombia co +கொலமà¯à®ªà®¿à®¯à®¾ co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +โคลัมเบีย co +Kolombiya co +Kolombia co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ñ–Ñ co +ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ co +Colombeye co +Columbia co +哥伦比亚 co +哥倫比亞 co +Costa Rica cr +كوستاريكا cr +КоÑта Рыка cr +КоÑта Рика cr +কোসà§à¦Ÿà¦¾ রিকা cr +Kosta Rika cr +Kostarika cr +Kostarika cr +Κόστα Ρίκα cr +Kostariko cr +کاستاریکا cr +Kosta Rika cr +Cósta Ríce cr +קוסטה ריקה cr +कोसà¥à¤Ÿà¤¾ रिका cr +Kosta rika cr +Kostaríka cr +コスタリカ cr +កូស្ážáž¶ážšáž¸áž€áž¶ cr +코스타 리카 cr +ໂຄເອເທີຠcr +Kosta Rika cr +Kostarika cr +КоÑта Рика cr +КоÑта Рика cr +ਕੋਸਟਾ ਰੀਕਾ cr +Kostaryka cr +КоÑта-Рика cr +Kosita Rika cr +Kostarika cr +Kostarika cr +КоÑтарика cr +Kostarika cr +I-Costa Rica cr +கோஸà¯à®Ÿà®¾ ரிகா cr +КоÑта Рика cr +คอสตาริà¸à¸² cr +Kosta Rika cr +Kosta Rika cr +КоÑта-Ріка cr +КоÑта Рика cr +哥斯达黎加 cr +哥斯大黎加 cr +Cuba cu +Kuba cu +كوبا cu +Куба cu +Куба cu +কিউবা cu +Kuba cu +Kuba cu +Kuba cu +Ciwba cu +Kuba cu +ΚοÏβα cu +Kubo cu +Kuuba cu +Kuba cu +کوبا cu +Kuuba cu +Kuba cu +Cúba cu +קובה cu +कà¥à¤¯à¥‚बा cu +Kuba cu +Kuba cu +Kúba cu +キュームcu +គុយបា cu +ì¿ ë°” cu +ເàºàº¡à»„ພ່ cu +Kuba cu +Kuba cu +Куба cu +Куба cu +Kuba cu +Kuba cu +ਕਿਊਬਾ cu +Kuba cu +Куба cu +Kuba cu +Kuba cu +Kuba cu +Куба cu +Kuba cu +I-Cuba cu +Kuba cu +கியà¯à®ªà®¾ cu +Куба cu +คิวบา cu +Küba cu +Kuba cu +Куба cu +Куба cu +å¤å·´ cu +å¤å·´ cu +Cape Verde cv +Kaap Verde cv +كاب Ùيردي cv +Кабо Верде cv +কেপ ভারডি cv +Penn Verde cv +Zelenortska ostrva cv +Cap Verd cv +Kapverdy cv +Cape Ferde cv +Kapverdiske øer cv +Cap Verdische Inseln cv +ΠÏάσινο ΑκÏωτήÏιο cv +Kapo-Verdo cv +Cabo Verde cv +Roheneeme saared cv +Cabo Verde cv +کیپ‌ورده cv +Kap Verde cv +Cap vert cv +Kaap Verdië cv +Rinn Verde cv +Cabo Verde cv +×›×£ וורדה cv +कैप वरà¥à¤¡à¥‡ cv +Zöldfoki-szigetek cv +Grænhöfðaeyjar cv +Capo Verde cv +カーãƒãƒ™ãƒ«ãƒ‡ cv +កាបវែរ cv +ì¹´ë³´ë² ë¥´ë° cv +ເàºàº¡à»„ພ່ cv +Kabaverde cv +Кејп Верде cv +Капе Ð’ÑÑ€Ð´Ñ cv +Kapp Verde cv +Kap Verde cv +Kaap Verdië cv +Kapp Verde cv +ਕੇਪ ਵੀਰਡੀ cv +Cabo Verde cv +Cabo Verde cv +Capul Verde cv +Кабо-Верде cv +Kapu Veri cv +Кејп Верд cv +Kejp Verd cv +Kap Verde cv +கேப௠வெரà¯à®Ÿà¯ cv +Димоғи Верде cv +à¹à¸«à¸¥à¸¡à¹€à¸§à¸­à¸£à¹Œà¸”ี cv +Kape Verde cv +Кабо-Верде cv +Кейп Верде cv +Cap Vert cv +佛得角 cv +ç¶­å¾·è§’ cv +Christmas Island cx +Kersfees Eiland cx +جزر الكريسماس cx +ОÑтров РождеÑтво cx +কà§à¦°à¦¿à¦¸à§à¦Ÿà¦®à¦¾à¦¸ দà§à¦¬à§€à¦ª cx +Inizi Nedeleg cx +BožiÄno ostrvo cx +Illa de Pascua cx +VánoÄní ostrovy cx +Ynys y Nadolig cx +Juleøen cx +Weihnachtsinsel cx +Îήσος των ΧÏιστουγέννων cx +Kristnaskinsulo cx +Islas Christmas cx +Jõulusaar cx +Eguberri Irla cx +جزایر کریسمس cx +Joulusaari cx +ÃŽle de Noël cx +Christmas Eilân cx +Oileán na Nollag cx +Illas Christmas cx +××™×™ כריסטמס cx +कà¥à¤°à¤¿à¤¸à¤®à¤¸ आइलैंड cx +UskrÅ¡nji otoci cx +Karácsony-szigetek cx +Jólaey cx +Isola Christmas cx +クリスマス諸島 cx +កោះ Christmas cx +í¬ë¦¬ìŠ¤ë§ˆìŠ¤ 섬 cx +ຄິດສະຕອລ cx +KalÄ—dų salos cx +ZiemassvÄ“tku salas cx +ВелигденÑки ОÑтрови cx +КриÑÑ‚Ð¼Ð°Ñ Ð°Ñ€Ð»ÑƒÑƒÐ´ cx +Christmasøya cx +Wiehnachtsinsel cx +Christmasøya cx +ਕà©à¨°à¨¿à¨¸à¨®à¨¿à¨¸ ਟਾਪੂ cx +Wyspy Bożego Narodzenia cx +Ilhas Natal cx +Ilhas do Natal cx +Insulele Christmas cx +ОÑтров РождеÑтва cx +Ikirwa cya Noheli cx +Christmassuollu cx +VianoÄné Ostrovy cx +BožiÄni otok cx +Божићно оÑтрво cx +Božićno ostrvo cx +Julön cx +கிரà¯à®¸à¯à®¤à¯à®®à®¸à¯ தீவ௠cx +Ҷазираи КриÑÑ‚Ð¼Ð°Ñ cx +เà¸à¸²à¸°à¸„ริสต์มาส cx +Yılbaşı Adaları cx +Christmas Utrawları cx +ОÑтрів Різдва cx +КриÑÐ¼Ð°Ñ ÐžÑ€Ð¾Ð»Ð¸ cx +Äảo giáng sinh cx +圣诞岛 cx +è–誕島 cx +Cyprus cy +Siprus cy +قبرص cy +Кіпр cy +Кипър cy +সাইপà§à¦°à¦¾à¦¸ cy +Chipr cy +Kipar cy +Xipre cy +Kypr cy +Cypern cy +Zypern cy +ΚÏÏ€Ïος cy +Cipro cy +Chipre cy +Küpros cy +Txipre cy +قبرس cy +Kypros cy +Chypre cy +An Chipir cy +Chipre cy +קפריסין cy +साइपà¥à¤°à¤¸ cy +Cipar cy +Ciprus cy +Kýpur cy +Cipro cy +キプロス cy +ស៊ីពរ០cy +키프로스 cy +ບີບອັດ cy +Kipro cy +Kipra cy +Кипар cy +Ð¡Ð¸Ð¿Ñ€ÑƒÑ cy +ÄŠipru cy +Kypros cy +Zypern cy +Kypros cy +ਕਿਉਪਰਸ cy +Cypr cy +Chipre cy +Chipre cy +Cipru cy +Кипр cy +Shipure cy +Kypros cy +Ciper cy +Кипар cy +Kipar cy +Cypern cy +சிபà¯à®°à®¸à¯ cy +Кипр cy +ไซปรัส cy +Kıbrıs cy +Kiper cy +Кіпр cy +Кипр cy +Síp cy +Chîpe cy +塞浦路斯 cy +賽普勒斯 cy +Czechia cz +Czechië cz +التشيك cz +Çex Respublikası cz +ЧÑÑ…Ñ–Ñ cz +Чешка република cz +চেকিয়া cz +Tchekia cz +ÄŒeÅ¡ka cz +Txèquia cz +ÄŒesko cz +Y Weriniaeth Siec cz +Tjekkiet cz +Tschechien cz +Τσεχία cz +ĈeÄ¥io cz +República Checa cz +TÅ¡ehhi cz +Txekia cz +Ú†Ú© cz +Tsekki cz +République tchèque cz +Tsjechië cz +Poblacht na Seice cz +Chéquia cz +צ'×›×™×” cz +चेक cz +ÄŒeÅ¡ka cz +Csehország cz +Tékkland cz +Repubblica Ceca cz +ãƒã‚§ã‚³ cz +ឆáŸáž€ cz +ì²´ì½” cz +ÄŒekija cz +ÄŒehija cz +Чешка cz +Чехиа cz +Cżekia cz +Tsjekkia cz +Tschechien cz +Tsjechië cz +Tsjekkia cz +Chèquia cz +ਚੈੱਚੀਆ cz +Czechy cz +República Checa cz +República Tcheca cz +Cehia cz +Ð§ÐµÑ…Ð¸Ñ cz +Ceke cz +ÄŒeahkka cz +ÄŒesko cz +ÄŒeÅ¡ka cz +Чешка cz +ÄŒeÅ¡ka cz +I-Czechia cz +Tjeckien cz +செகà¯à®¯à®¾ cz +Ð§ÐµÑ…Ð¸Ñ cz +เชค cz +Çek Cumhuriyeti cz +Çexiä cz +Ð§ÐµÑ…Ñ–Ñ cz +Ð§ÐµÑ…Ð¸Ñ cz +Séc cz +Tchekeye cz +æ·å…‹ cz +æ·å…‹ cz +Germany de +Duitsland de +ألمانيا de +Almaniya de +ÐÑмеччына de +Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de +জারà§à¦®à¦¾à¦¨à¦¿ de +Alamagn de +NjemaÄka de +Alemanya de +NÄ›mecko de +Yr Almaen de +Tyskland de +Deutschland de +ΓεÏμανία de +Germanio de +Alemania de +Saksamaa de +Alemania de +آلمان de +Saksa de +Týskland de +Allemagne de +Dûtslân de +An Ghearmáin de +Alemaña de +גרמניה de +जरà¥à¤®à¤¨à¥€ de +NjemaÄka de +Németország de +Jerman de +Þýskaland de +Germania de +ドイツ de +អាល្លឺម៉ង់ de +ë…ì¼ de +ເàºàº¥àº¥àº°àº¡àº±àº™àº™àºµ de +Vokietija de +VÄcija de +Германија de +Герман de +Jerman de +Ä ermanja de +Tyskland de +Düütschland de +Duitsland de +Tyskland de +Alemanya de +ਜਰਮਨੀ de +Niemcy de +Alemanha de +Alemanha de +Germania de +Ð“ÐµÑ€Ð¼Ð°Ð½Ð¸Ñ de +Ubudage de +Duiska de +Nemecko de +NemÄija de +Ðемачка de +NemaÄka de +I-Germany de +Tyskland de +ஜெரà¯à®®à®©à®¿ de +Олмон de +เยอรมันนี de +Almanya de +Almania de +Ðімеччина de +ÐžÐ»Ð¼Ð¾Ð½Ð¸Ñ de +Äức de +Almagne de +德国 de +德國 de +IJalimani de +Djibouti dj +جيبوتي dj +Джыбуці dj +Джибути dj +জিবৌতি dj +Äibuti dj +Džibuti dj +Jib?ti dj +Dschibuti dj +Τζιμπουτί dj +Äœibutio dj +جیبوتی dj +Xibuti dj +×’'יבוטי dj +डिबौती dj +Džibuti dj +Dzsibuti dj +Djíbútí dj +Gibuti dj +ジブムdj +ហ្ស៊ីបូទី dj +지부티 dj +ພັດພາ dj +Džibutis dj +Džibutija dj +Ðибути dj +Жибут dj +DÄ¡ibuti dj +Dschibouti dj +ਡਜੀਬà©à¨‰à¨Ÿà©€ dj +Dżibuti dj +Djibuti dj +Djibuti dj +Джибути dj +Jibuti dj +Djibuhti dj +Džibuty dj +Džibuti dj +Ðибути dj +Džibuti dj +I-Djibouti dj +டிஜிபொடி dj +Ҷибойти dj +จิบูติ dj +Cibuti dj +Djibuti dj +Джібуті dj +Жибути dj +å‰å¸ƒæ dj +å‰å¸ƒåœ° dj +Denmark dk +Denemarke dk +الدنمارك dk +Danimarka dk +Ð”Ð°Ð½Ñ–Ñ dk +Ð”Ð°Ð½Ð¸Ñ dk +ডেনমারà§à¦• dk +Danmark dk +Danska dk +Dinamarca dk +Dánsko dk +Denmarc dk +Danmark dk +Dänemark dk +Δανία dk +Danlando dk +Dinamarca dk +Taani dk +Danimarka dk +دانمارک dk +Tanska dk +Danmark dk +Danemark dk +Denemarken dk +An Danmhairg dk +Dinamarca dk +דנמרק dk +डेनमारà¥à¤• dk +Danska dk +Dánia dk +Danmörk dk +Danimarca dk +デンマーク dk +ដាណឺម៉ាក dk +ë´ë§ˆí¬ dk +ເດນມາຠdk +Danija dk +DÄnija dk +ДанÑка dk +Дани dk +Danimarka dk +Danmark dk +Dänmark dk +Denemarken dk +Danmark dk +Dinamarca dk +ਡੈੱਨਮਾਰਕ dk +Dania dk +Dinamarca dk +Dinamarca dk +Danemarca dk +Ð”Ð°Ð½Ð¸Ñ dk +Danimarike dk +Dánmárku dk +Dánsko dk +Danska dk +ДанÑка dk +Danska dk +I-Denmark dk +Danmark dk +டெனà¯à®®à®¾à®°à¯à®•௠dk +Денмарк dk +เดนมาร์ภdk +Danimarka dk +Dania dk +Ð”Ð°Ð½Ñ–Ñ dk +Ð”Ð°Ð½Ð¸Ñ dk +Äan Mạch dk +DaenmÃ¥tche dk +丹麦 dk +丹麥 dk +Dominica dm +Dominisië dm +دومينيكا dm +Дамініка dm +Доминика dm +ডমিনিকা dm +Dominik dm +Dominika dm +Dominika dm +Dominikanische Republik dm +Îτομίνικα dm +Dominiko dm +دومینیکا dm +Dominique dm +Doiminice dm +דומינקה dm +डोमिनिका dm +Dominika dm +Dóminíka dm +ドミニカ dm +ដូមីនីកា dm +ë„미니카 dm +ໂລມາເນີຠdm +Dominika dm +Dominika dm +Доминика dm +Доминика dm +Dominika dm +ਡੋਮਾਨੀਕਾ dm +Dominika dm +Dominicana dm +Доминика dm +Dominikani dm +Dominikánsko dm +Dominikanska republika dm +Доминика dm +Dominika dm +டொமினிகா dm +Доминика dm +โดมินาà¸à¸±à¸™ dm +Dominik dm +Dominika dm +Домініка dm +Доминика dm +Dominike dm +多米尼加 dm +多明尼加 dm +Dominican Republic do +Dominikaanse Republiek do +جمهورية الدومينيكان do +Dominik Respublikası do +ДамініканÑÐºÐ°Ñ Ð ÑÑпубліка do +ДоминиканÑка република do +ডমিনিকান রিপাবলিক do +Republik Dominikan do +Dominikanska Republika do +República Dominicana do +Dominikánská republika do +Gweriniaeth Dominica do +Dominikanske Republik do +Dominikanische Republik do +Δομινικανή ΔημοκÏατία do +Dominika Respubliko do +República Dominicana do +Dominikaani Vabariik do +Dominikar Errepublika do +جمهوری دامینیکن do +Dominikaaninen tasavalta do +République dominicaine do +Dominicaanse Republyk do +An Phoblacht Dhoiminiceach do +República Dominicana do +הרפובליקה הדומיניקנית do +डोमिनिकन रिपबà¥à¤²à¤¿à¤• do +Dominikanska Republika do +Dominikai Köztársaság do +Republik Dominika do +Dóminíska lýðveldið do +Repubblica Dominicana do +ドミニカ共和国 do +សាធារណរដ្ឋ​ដូមីនីកែន do +ë„미니카 공화국 do +ໂດມິນີàºàº±àº™ do +Dominikos Respublika do +Dominikas Republika do +ДоминиканÑка Република do +Домникан ард ÑƒÐ»Ñ do +Repubblika Dominikana do +Den dominikanske republikk do +Dominikaansche Republiek do +Dominicaanse Republiek do +Den dominikanske republikken do +Republica Dominicana do +ਡੋਮਾਨੀਕਾ ਗਣਰਾਜ do +Dominikana do +República Dominicana do +República Dominicana do +Republica Dominicană do +ДоминиканÑÐºÐ°Ñ Ñ€ÐµÑпублика do +Repubulika Dominikani do +DominihkalaÅ¡ republihkka do +Dominikánska republika do +Dominikanska republika do +ДоминиканÑка Република do +Dominikanska Republika do +I-Dominican Republic do +Dominikanska republiken do +டொமினிகà¯à®•ன௠கà¯à®Ÿà®¿à®¯à®°à®šà¯ do +Ҷумҳурии Доминика do +สาธารณรัà¸à¹‚ดมินิà¸à¸±à¸™ do +Dominik Cumhuriyeti do +Dominika Cömhüriäte do +ДомініканÑька реÑпубліка do +Доминикана РеÑпубликаÑи do +Muvhuso wa Dominican do +Cá»™ng hoà Dominican do +Republike Dominikinne do +IRepublic yeDominican do +多米尼加共和国 do +多明尼加共和國 do +Algeria dz +Algerië dz +الجزائر dz +Ðльжыр dz +Ðлжир dz +অà§à¦¯à¦¾à¦²à¦œà§‡à¦°à¦¿à§Ÿà¦¾ dz +Aljeri dz +Alžir dz +Algèria dz +Alžírsko dz +Algeriet dz +Algerien dz +ΑλγεÏία dz +Algerio dz +Argelia dz +Alžeeria dz +الجزیره dz +Algérie dz +Algerije dz +An Ailgéir dz +Alxéria dz +×לג'יריה dz +अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾ dz +Alžir dz +Algéria dz +Alsír dz +アルジェリア dz +អាល់ហ្សáŸážšáž¸ dz +알제리 dz +ບັນàºàº²à»€àº¥àºµàº dz +Alžyras dz +Alžīrija dz +Ðлжир dz +Ðлжер dz +AlÄ¡erija dz +Algerie dz +Algerien dz +Algerije dz +Algerie dz +ਅਲਜੀਰੀਆ dz +Algieria dz +Argélia dz +Argélia dz +Ðлжир dz +Aligeriya dz +Alžírsko dz +Alžirija dz +Ðлжир dz +Alžir dz +I-Algeria dz +Algeriet dz +அலà¯à®œà®¿à®°à®¿à®¯à®¾ dz +Ðлҷазоир dz +อัลจีเรีย dz +Aljır dz +Ðлжир dz +Жазоир dz +Aldjereye dz +阿尔åŠåˆ©äºš dz +阿爾åŠåˆ©äºž dz +Equador ec +Ewenaar ec +الإكوادور ec +Ekvator ec +Эквадор ec +Еквадор ec +ইকà§à§Ÿà§‡à¦¡à¦° ec +Ecuador ec +Ekvador ec +Ekvádor ec +Ecwador ec +Ecuador ec +ΙσημεÏινός ec +Ekvadoro ec +Ecuador ec +Ekuador ec +اکوادور ec +Équateur ec +Eacuadór ec +Ecuador ec +×קוודור ec +इकà¥à¤µà¥‡à¤¡à¥‰à¤° ec +Ekvador ec +Ecuador ec +Ekvador ec +Ecuador ec +エクアドル ec +អáŸáž€áŸ’វាឌáŸážš ec +ì—ì½°ë„르 ec +ເອàºà»àº”à» ec +Ekvadoras ec +Ekvadora ec +Еквадор ec +Эквадор ec +Ekwador ec +Ecuador ec +Ecuador ec +Ecuador ec +à¨à¨•ਾਵੇਡਰ ec +Ekwador ec +Ecuador ec +Эквадор ec +Ekwateri ec +Ekvador ec +Ekvádor ec +Ekvador ec +Еквадор ec +Ekvador ec +I-Equador ec +ஈகà¯à®µà¯†à®Ÿà®¾à®°à¯ ec +Эквадор ec +เอà¸à¸§à¸²à¸”อร์ ec +Ekvator ec +Еквадор ec +Эквадор ec +EcwÃ¥teur ec +厄瓜多尔 ec +厄瓜多 ec +Estonia ee +Estlandies ee +استونيا ee +Estoniya ee +ЭÑÑ‚Ð¾Ð½Ñ–Ñ ee +ЕÑÑ‚Ð¾Ð½Ð¸Ñ ee +à¦à¦¸à§à¦Ÿà§‹à¦¨à¦¿à§Ÿà¦¾ ee +Estonija ee +Estònia ee +Estonsko ee +Estland ee +Estland ee +Εσθονία ee +Estlando ee +Eesti ee +استونی ee +Eesti ee +Estonie ee +Estland ee +An Eastóin ee +×סטוניה ee +à¤à¤¸à¥à¤¤à¥‹à¤¨à¤¿à¤¯à¤¾ ee +Estonija ee +Észtország ee +Eistland ee +エストニア ee +អáŸážŸáŸ’ážáž¼áž“ី ee +ì—스토니아 ee +ເອໂທເນີຠee +Estija ee +Igaunija ee +ЕÑтонија ee +ЭÑтони ee +Estonja ee +Estland ee +Estland ee +Estland ee +Estland ee +Estònia ee +ਈਸਟੋਨੀਆ ee +Estónia ee +Estônia ee +ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee +Esitoniya ee +Estteeana ee +Estónsko ee +Estonija ee +ЕÑтонија ee +Estonija ee +I-Estonia ee +Estland ee +எசà¯à®Ÿà¯‹à®©à®¿à®¯à®¾ ee +ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee +เอสโทเนีย ee +Estonya ee +ЕÑÑ‚Ð¾Ð½Ñ–Ñ ee +ЭÑÑ‚Ð¾Ð½Ð¸Ñ ee +Estoneye ee +爱沙尼亚 ee +愛沙尼亞 ee +Egypt eg +Egipte eg +مصر eg +Misir eg +ЭгіпÑÑ‚ eg +Египет eg +মিশর eg +Ejipt eg +Egipat eg +Egipte eg +Yr Aifft eg +Egypten eg +Ägypten eg +Αίγυπτος eg +Egiptujo eg +Egipto eg +Egiptus eg +Egipto eg +مصر eg +Egypti eg +Egyptaland eg +Égypte eg +Egypte eg +An Éigipt eg +Exipto eg +×ž×¦×¨×™× eg +इजिपà¥à¤¤ eg +Egipat eg +Egyiptom eg +Egyptaland eg +Egitto eg +エジプト eg +អáŸáž áŸ’ស៊ីប eg +ì´ì§‘트 eg +ອີຢີບ eg +Egiptas eg +Ä’Ä£ipte eg +Египет eg +Египт eg +Mesir eg +EÄ¡ittu eg +Ägypten eg +Egypte eg +Egepeta eg +ਮਿਸਰ eg +Egipt eg +Egipto eg +Egito eg +Egipt eg +Египет eg +Misiri eg +Egypta eg +Egipt eg +Египат eg +Egipat eg +I-Egypt eg +Egypten eg +எகிபà¯à®¤à¯ eg +МиÑÑ€ eg +อียิปต์ eg +Mısır eg +Mısır eg +Єгипет eg +МиÑÑ€ eg +Ai Cập eg +Edjipe eg +åŸƒåŠ eg +åŸƒåŠ eg +Igibhithe eg +Western Sahara eh +Westelike Sahara eh +الصحراء الغربية eh +ЗаходнÑÑ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh +Западна Сахара eh +পশà§à¦šà¦¿à¦® সাহারা eh +Sahara occidental eh +Zapadna Sahara eh +Sàhara Occidental eh +Západní Sahara eh +Gorllewin Sahara eh +Vestsahara eh +Westsahara eh +Δυτική ΣαχάÏα eh +Okcidenta Saharo eh +Sahara occidental eh +Lääne-Sahara eh +Mendebaldeko Sahara eh +صحرای غربی eh +Länsi-Sahara eh +Sahara occidental eh +West Sahara eh +An Sahára Thiar eh +Saara Ocidental eh +מערב סהרה eh +पशà¥à¤šà¤¿à¤®à¥€ सहारा eh +Westerm Sahara eh +Nyugat-Szahara eh +Vestur-Sahara eh +Sahara Occidentale eh +西サãƒãƒ© eh +សាហារ៉ា​ážáž¶áž„​លិច eh +ì„œì‚¬í•˜ë¼ eh +ພື້ນທີ່ທຳງານ eh +Vakarų Sahara eh +RietumsahÄra eh +Западна Сахара eh +Барууг Ñахар eh +Saħara tal-Punent eh +Vest-Sahara eh +Westsahara eh +West Sahara eh +Vest-Sahara eh +ਦੱਖਣੀ ਸਹਾਰਾ eh +Zachodnia Sahara eh +Sara Ocidental eh +Sahara Ocidental eh +Sahara de Vest eh +Ð—Ð°Ð¿Ð°Ð´Ð½Ð°Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð° eh +Sahara y'Iburengerazuba eh +Oarje-Sahara eh +Západna Sahara eh +Zahodna Sahara eh +Западна Сахара eh +Zapadna Sahara eh +Västsahara eh +மேறà¯à®•தà¯à®¤à®¿à®¯ சஹாரா eh +Саҳрои Ғарбӣ eh +ซาฮาร่าตะวันตภeh +Batı Sahara eh +Batış Sahara eh +Західна Сахара eh +Ғарбий Сахара eh +Tây Sahara eh +Sara Coûtchantrece eh +西撒哈拉 eh +西盛哈拉 eh +Eritrea er +اريتريا er +ЭрытрÑÑ er +Ð•Ñ€Ð¸Ñ‚Ñ€ÐµÑ er +à¦à¦°à¦¿à¦Ÿà§à¦°à¦¿à§Ÿà¦¾ er +Eritre er +Eritreja er +ΕÏυθÏαία er +Eritreo er +اریتره er +Érythrée er +Eiritré er +×ריתרי××” er +à¤à¤°à¤¿à¤Ÿà¥à¤°à¥€à¤¯à¤¾ er +Eritreja er +Erítrea er +エリトリア er +អáŸážšáž¸áž‘្រា er +ì—리트레아 er +à»àºà»‰à»„ຂà»àºŸà»‰àº¡àº—ຳງານ er +EritrÄ—ja er +Eritreja er +Еритреја er +Эритреа er +ਈਰੀਟਰੀਆ er +Erytrea er +Eritreia er +Eritréia er +Ð­Ñ€Ð¸Ñ‚Ñ€ÐµÑ er +Eritereya er +Eritreja er +Еритреја er +Eritreja er +ரிடà¯à®°à®¿à®¯à®¾ er +Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er +เอริเทรีย er +Eritre er +Ð•Ñ€Ñ–Ñ‚Ñ€ÐµÑ er +Ð­Ñ€Ð¸Ñ‚Ñ€Ð¸Ñ er +Eritrêye er +厄立特里亚 er +厄利垂亞 er +Spain es +Spanje es +أسبانيا es +İspaniya es +Ð“Ñ–ÑˆÐ¿Ð°Ð½Ñ–Ñ es +ИÑÐ¿Ð°Ð½Ð¸Ñ es +সà§à¦ªà§‡à¦¨ es +Spagn es +Å panija es +Espanya es +Å panÄ›lsko es +Sbaen es +Spanien es +Spanien es +Ισπανία es +Hispanio es +España es +Hispaania es +Espainia es +اسپانیا es +Espanja es +Spania es +Espagne es +Spanje es +An Spáinn es +España es +ספרד es +सà¥à¤ªà¥‡à¤¨ es +Å panjolska es +Spanyolország es +Spanyol es +Spánn es +Spagna es +スペイン es +អáŸážŸáŸ’ប៉ាញ es +ìŠ¤íŽ˜ì¸ es +ສະເປັນ es +Ispanija es +SpÄnija es +Шпанија es +ИÑпани es +Sepanyol es +Spanja es +Spania es +Spanien es +Spanje es +Spania es +Espanha es +ਸਪੇਨ es +Hiszpania es +Espanha es +Espanha es +Spania es +ИÑÐ¿Ð°Ð½Ð¸Ñ es +Esipanye es +Spánia es +Å panielsko es +Å panija es +Шпанија es +Å panija es +I-Spain es +Spanien es +சà¯à®ªà¯†à®¯à®¿à®©à¯ es +ИÑпаниё es +สเปน es +İspanya es +İspania es +ІÑÐ¿Ð°Ð½Ñ–Ñ es +ИÑÐ¿Ð°Ð½Ð¸Ñ es +Tây Ban Nha es +Sipagne es +西ç­ç‰™ es +西ç­ç‰™ es +Ethiopia et +Ethiopië et +اثيوبيا et +Ð­Ñ‚Ñ‹Ñ‘Ð¿Ñ–Ñ et +Ð•Ñ‚Ð¸Ð¾Ð¿Ð¸Ñ et +ইথিওপিয়া et +Etiopi et +Etiopija et +Etiòpia et +Etiopie et +Ethiopien et +Äthiopien et +Αιθιοπία et +Etiopio et +Etiopía et +Etioopia et +Etiopia et +اتیوپی et +Etiopia et +Éthiopie et +Ethiopië et +An Aetóip et +Etiopia et +×תיופיה et +इथियोपिया et +Etiopija et +Etiópia et +Eþíópía et +Etiopia et +エãƒã‚ªãƒ”ã‚¢ et +អáŸážáŸ’យូពី et +ì—티오피아 et +ເອໂທເນີຠet +Etiopija et +Etiopija et +Етиопија et +Этопи et +Etjopia et +Etiopia et +Äthiopien et +Ethiopië et +Etiopia et +ਈਥੋਪੀਆ et +Etiopia et +Etiópia et +Etiópia et +Etiopia et +Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et +Etiyopiya et +Etiopia et +Etiópia et +Etiopija et +Етиопија et +Etiopija et +Etiopien et +எதியோபியா et +ҲабашиÑтон et +เอธิโอเปีย et +Etiyopya et +Efiopia et +Ð•Ñ„Ñ–Ð¾Ð¿Ñ–Ñ et +Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ et +Etiopeye et +埃塞俄比亚 et +衣索比亞 et +Finland fi +Ùنلندا fi +Finlandiya fi +ФінлÑÐ½Ð´Ñ‹Ñ fi +Ð¤Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ fi +ফিনলà§à¦¯à¦¾à¦£à§à¦¡ fi +Finska fi +Finlàndia fi +Finsko fi +Y Ffindir fi +Finnland fi +Φινλανδία fi +Finnlando fi +Finlandia fi +Soome fi +Finlandia fi +Ùنلاند fi +Suomi fi +Finnland fi +Finlande fi +Finlân fi +An Fhionlainn fi +Finlándia fi +פינלנד fi +फिनलैंड fi +Finska fi +Finnország fi +Finlandia fi +Finnland fi +Finlandia fi +フィンランド fi +ហ្វាំងឡង់ fi +핀란드 fi +ຟີນà»àº¥àº™ fi +Suomija fi +Somija fi +ФинÑка fi +Финнланд fi +Finlandja fi +Finnland fi +Finlandia fi +ਫਿਨਲੈਂਡ fi +Finlandia fi +Finlândia fi +Finlândia fi +Finlanda fi +ФинлÑÐ½Ð´Ð¸Ñ fi +Finilande fi +Suopma fi +Fínsko fi +Finska fi +ФинÑка fi +Finska fi +I-Finland fi +பினà¯à®²à®¾à®¨à¯à®¤à¯ fi +Финлонд fi +ฟินà¹à¸¥à¸™à¸”์ fi +Finlandiya fi +Finland (Suomi) fi +ФінлÑÐ½Ð´Ñ–Ñ fi +ФинлÑÐ½Ð´Ð¸Ñ fi +Phần Lan fi +Finlande fi +芬兰 fi +芬蘭 fi +Fiji fj +Ùيجي fj +Фіджы fj +ОÑтрови Фиджи fj +ফিজি fj +Fidji fj +Fidži fj +Fidži fj +Ffiji fj +Fidschi fj +Φίτζι fj +FiÄioj fj +Fidži fj +Ùیجی fj +Fidji fj +Fidsí fj +פיג'×™ fj +फिजी fj +Fidzsi fj +Fídjieyjar fj +Figi fj +フィジー fj +ហ្វ៊ីហ្ស៊ី fj +피지 fj +ມີດີ fj +Fidži fj +Фиџи fj +Фижи fj +FiÄ¡i fj +Fidschi fj +ਫਿੱਜੀ fj +Fidżi fj +Ilhas Fiji fj +Фиджи fj +Fidži fj +Fidži fj +Фиџи fj +Fidži fj +பிஜி fj +Фиҷи fj +ฟิจิ fj +Фіджі fj +Фижи fj +Fidji fj +æ–æµŽ fj +è²æ¿Ÿ fj +Falkland Islands (Malvinas) fk +Falkland Eilande (Malvinas) fk +جزر الÙوكلاند (المالÙيناس) fk +ФалклендÑÐºÑ–Ñ Ð°Ñтравы (Мальвіны) fk +ФолклендÑки оÑтрови fk +ফকলà§à¦¯à¦¾à¦£à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ (মলভিনাস) fk +Inizi Falklandi (Malvinas) fk +Foklandska ostrva (Malvini) fk +Illes Falkland (Malvines) fk +Falklandy (Malvíny) fk +Ynysoedd Y Ffalcland (Malfinas) fk +Falkland-øerne fk +Falkland-Inseln (Malvinen) fk +Îησιά Φώκλαντ (Malvinas) fk +Falklandoj fk +Islas Falkland (Malvinas) fk +Falklandi saared (Malviinid) fk +Falkland Irlak (Malvinak) fk +جزایر ÙØ§Ù„کلند مالویناس fk +Falklandin saaret (Malvinassaaret) fk +ÃŽles Falkland (Malvinas) fk +Falkland Eilannen (Malvinas) fk +Na hOileáin Fháclainne (Malvinas) fk +Illas Falkland (Malvinas) fk +××™×™ פולקלנד fk +फाकलैंड आइलैंड (मालविनास) fk +Folklandska otoÄja (Malvini) fk +Falkland-szigetek fk +Falklandseyjar fk +Isole Falkland (Malvine) fk +フォークランド諸島 fk +កោះ Falkland (Malvinas) fk +í¬í´ëžœë“œ êµ°ë„ (ë§ë¹„나스) fk +Folklendu salas fk +ФокландÑки ОÑтрови (Малвини) fk +Фалкланд арлууд (МалвинаÑ) fk +Gżejjer Falkland (Malvinas) fk +Falklandsøyene fk +Falklandinseln (Malvinas) fk +Falkland Eilanden (Malvinas) fk +Falklandsøyane fk +ਫਾਕਲੈਂਡ ਟਾਪੂ fk +Wyspy Falklandzkie (Malwiny) fk +Ilhas Falkland (Malvinas) fk +Ilhas Malvinas fk +Insulele Falkland (Malvine) fk +ФолклендÑкие (МальвинÑкие) оÑтрова fk +Ibirwa bya Falikilande (Maluvinasi) fk +Falklánddasullot fk +Falklandské Ostrovy (Malviny) fk +Falklandski otoki (Malvini) fk +ФолкландÑка оÑтрва (Малвини) fk +Folklandska ostrva (Malvini) fk +Falklandsöarna fk +ஃபாலà¯à®•௠தீவà¯(மாலà¯à®µà®¿à®©à®¾à®¸à¯) fk +Ҷазираи фолкланд (Малвина) fk +หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸„à¹à¸¥à¸™à¸”์ (Malvinas) fk +Falkland Adaları fk +Falkland Utrawları (Malvinnar) fk +ФолклендÑькі оÑтрови (БританіÑ) fk +Фолкленд (Малвин) Ороллари fk +Iyes Malouwines fk +ç¦å…‹å…°ç¾¤å²›(马尔维纳斯) fk +ç¦å…‹è˜­ç¾¤å³¶ (é¦¬çˆ¾ç¶­ç´æ–¯) fk +Micronesia, Federated States of fm +Micronesië, Vereenigde State van fm +ФедÑÑ€Ð°Ñ†Ñ‹Ñ ÐœiкранÑзіі fm +ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm +মাইকà§à¦°à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾, ফেডারেটেড সà§à¦Ÿà§‡à¦Ÿà¦¸ অব fm +Mikronezija, Federalne države fm +Micronesia, Estats Federats de fm +Mikronésie fm +Micronesia, Taleithau Cyfunol fm +Mikronesien, de forenede stater af fm +Mikronesien, Föderation von fm +ΜικÏονησίας, Ομόσπονδες πολιτείες της fm +Mikronezio, Respubliko de fm +Micronesia, Estados federados de fm +Mikroneesia fm +Mikronesiako Estatu Federatuak fm +Mikronesian liittovaltio fm +Etats Fédérés de Micronésie fm +Micronesië, Federale staten Fan fm +Stáit Cónascacha na Micrinéise fm +Micronésia, Estados Federados de fm +מיקרונזיה, מדינות הפדרציה של fm +फेडरेटेड सà¥à¤Ÿà¥‡à¤Ÿ ऑफ माइकà¥à¤°à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾ fm +Mikronézia fm +Míkrónesía, Sambandsríki fm +Micronesia, stati federati di fm +ミクロãƒã‚·ã‚¢,米自由連邦 fm +រដ្ឋ​សហពáŸáž“្ធ​មិក្រូនáŸážŸáŸŠáž¸ fm +Mikronezija fm +MikronÄ“zija fm +Микронезија, Федеративни Држави на fm +Mikronesja (Stati Federati ta') fm +Mikronesiaføderasjonen fm +Mikronesien, Vereenigte Staten vun fm +Micronesië, Federale staten van fm +Mikronesiaføderasjonen fm +ਮਾਇਕਰੋਨੀਸੀਆ, ਸੰਘੀ ਪà©à¨°à¨¾à¨‚ਤ fm +Federacja Stanów Mikronezji fm +Micronésia, Estados Federados da fm +Estados Federados da Micronésia fm +Micronezia, Statele Federative fm +ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm +Mikoronesiya, Leta Zishyizwehamwe fm +MikronesiafederaÅ¡uvdna fm +Spojené Å¡táty Mikronézie fm +Mikronezija, Združene države fm +Микронезија, Федерација држава fm +Mikronezija, Federacija država fm +Mikronesiska federationen fm +மைகà¯à®°à¯‹à®©à®¿à®šà®¾, à®’à®°à¯à®™à¯à®•ிணைநà¯à®¤ மாநிலம௠fm +สหพันธรัà¸à¸¡à¸´à¹‚ครนีเซีย fm +Mikronezya Federasyonu fm +Mikronesia, Berläşkän İlläre fm +МікронезіÑ, федеративні штати fm +ÐœÐ¸ÐºÑ€Ð¾Ð½ÐµÐ·Ð¸Ñ fm +Micronezeye fm +密克罗尼西亚è”邦 fm +密克羅尼西亞è¯é‚¦ fm +Faroe Islands fo +Faroe Eilande fo +جزر الÙيرو fo +ОÑтрови Фаро fo +ফারো দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ fo +Enez Faroe fo +Farska ostrva fo +Illes Faroe fo +Faerské ostrovy fo +Ynysoedd Ffar?e fo +Færøerne fo +Färöer-Inseln fo +Îήσοι ΦεÏόε fo +Ferooj fo +islas Faroe fo +Fääri saared fo +Faroe Irlak fo +جزایر ÙØ§Ø±Ùˆ fo +Färsaaret fo +ÃŽles Féroé fo +Faroe Eilannen fo +Na Scigirí (Oileáin Fharó) fo +Illas Feroe fo +××™×™ פ×רו fo +फारोठआइलैंड fo +Faroe Otoci fo +Faroe-szigetek fo +Færeyjar fo +Isole Fær Øer fo +フェロー諸島 fo +កោះ​ហ្វ៉ារ៉ូ fo +페로 ì œë„ fo +ໄອà»àº¥àº™ fo +Faroe salos fo +FÄ“ru salas fo +ФарÑки ОÑтрови fo +Фарое арлууд fo +Gżejjer Faroe fo +Færøyene fo +Färöerinseln fo +Faroe Eilanden fo +Færøyane fo +ਫਾਰੋਈ ਟਾਪੂ fo +Wyspy Faroe fo +Ilhas Faroe fo +Ilhas Faroe fo +Insulele Feroe fo +ФарерÑкие оÑтрова fo +Ibirwa bya Farowe fo +Fearsuolu fo +Ostrovy Faroe fo +Otoki Faroe fo +ФарÑка оÑтрва fo +Farska ostrva fo +Färöarna fo +ஃபரோ தீவà¯à®•ள௠fo +Ҷазираи Фару fo +หมู่เà¸à¸²à¸°à¸Ÿà¸²à¹‚ร fo +Faroe Adaları fo +Faroe Utrawları fo +ФарерÑькі оÑтрови fo +Фарер Ороллари fo +Äảo Faroe fo +Iye Faeroyé fo +法罗群岛 fo +法羅群島 fo +France fr +Frankryk fr +ÙØ±Ù†Ø³Ø§ fr +Fransa fr +Ð¤Ñ€Ð°Ð½Ñ†Ñ‹Ñ fr +Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr +ফà§à¦°à¦¾à¦¨à§à¦¸ fr +Frañs fr +Francuska fr +França fr +Francie fr +Ffrainc fr +Frankrig fr +Frankreich fr +Γαλλία fr +Francio fr +Francia fr +Prantsusmaa fr +Frantzia fr +ÙØ±Ø§Ù†Ø³Ù‡ fr +Ranska fr +Frakland fr +Frankryk fr +An Fhrainc fr +Franza fr +צרפת fr +फà¥à¤°à¤¾à¤‚स fr +Francuska fr +Franciaország fr +Prancis fr +Frakkland fr +Francia fr +フランス fr +បារាំង fr +프랑스 fr +àºàº£àº±à»ˆàº‡ fr +PrancÅ«zija fr +Francija fr +Франција fr +Франц fr +Perancis fr +Franza fr +Frankrike fr +Frankriek fr +Frankrijk fr +Frankrike fr +Fora fr +França fr +ਫਰਾਂਸ fr +Francja fr +França fr +França fr +FranÅ£a fr +Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr +Ubufaransa fr +Fránkriika fr +Francúzsko fr +Francija fr +ФранцуÑка fr +Francuska fr +I-France fr +Frankrike fr +பிரானà¯à®šà¯ fr +ФаронÑа fr +à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª fr +Fransa fr +Fransia fr +Ð¤Ñ€Ð°Ð½Ñ†Ñ–Ñ fr +Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ fr +Fura fr +Pháp fr +Fransi fr +法国 fr +法國 fr +Gabon ga +الغابون ga +Габон ga +Габон ga +গà§à¦¯à¦¾à¦¬à¦¨ ga +Gabun ga +Γκαμπόν ga +Gabono ga +Gabón ga +گابون ga +An Ghabúin ga +Gabón ga +גבון ga +गेबॉन ga +ガボン ga +ហ្គាបុង ga +가봉 ga +à»àºàº¥à»ˆàº‡àº™ ga +Gabonas ga +Gabona ga +Габон ga +Габон ga +Gabun ga +ਗਾਬੋਨ ga +Gabão ga +Gabão ga +Габон ga +Gabo ga +Габон ga +காபான௠ga +Габон ga +à¸à¸²à¸šà¸­à¸™ ga +Габон ga +Габон ga +加蓬 ga +加彭 ga +United Kingdom gb +Vereenigde Koninkryk gb +المملكة المتحدة gb +BirləşmiÅŸ Krallıq gb +Злучанае КаралеўÑтва gb +Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb +ইউনাইটেড কিংডম gb +Rouantelezh Unanet gb +Velika Britanija gb +Regne Unit gb +Spojené království gb +Y Deyrnas Unedig gb +Storbritannien gb +Großbritannien gb +Ηνωμένο Βασίλειο gb +Britio gb +Reino Unido gb +Suurbritannia gb +Erresuma Batua gb +بریتانیا gb +Iso-Britannia gb +Stórabretland gb +Royaume Uni gb +Ferienigd Keninkryk gb +An Ríocht Aontaithe gb +Reino Unido gb +בריטניה gb +यूनाइटेड किंगडम gb +Ujedinjeno Kraljevstvo gb +Egyesült Királyság gb +Inggris gb +Bretland gb +Regno Unito gb +イギリス gb +ចក្រភព​អង់គ្លáŸážŸ gb +ì˜êµ­ gb +ສະຫະລາດສະອານາຈັຠgb +JungtinÄ— KaralystÄ— gb +ApvienotÄ Karaliste gb +Обединето КралÑтво gb +Их британ gb +Renju Unit gb +Storbritannia gb +Grootbritannien gb +Verenigd Koninkrijk gb +Storbritannia gb +Regne Unit gb +ਬਰਤਾਨੀਆ gb +Wielka Brytania gb +Reino Unido gb +Reino Unido gb +Anglia gb +Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb +Ubwongereza gb +Stuorrabrittania gb +Anglicko gb +Združeno kraljestvo gb +Уједињено КраљевÑтво gb +Ujedinjeno Kraljevstvo gb +I-United Kingdom gb +Storbritannien gb +à®à®•à¯à®•ிய ராஜà¯à®œà®¿à®¯à®®à¯ gb +Подшоҳии Муттаҳида gb +สหราชอาณาจัà¸à¸£ gb +BirleÅŸik Krallık gb +Berläşkän PadÅŸahlıq gb +Ð’ÐµÐ»Ð¸ÐºÐ¾Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ gb +Буюк Ð‘Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ gb +Anh gb +RweyÃ¥me Uni gb +United Kingdom gb +英国 gb +è¯åˆçŽ‹åœ‹ gb +United Kingdom gb +Grenada gd +غرينادا gd +Qrenada gd +ГрÑнада gd +Гренада gd +গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¾ gd +Granada gd +ΓÏενάδα gd +Grenado gd +Granada gd +گرانادا gd +Grenade gd +Granada gd +גרנדה gd +गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾ gd +Granada gd +グレナダ gd +ហ្គ្រីណាដា gd +그러네ì´ë‹¤ gd +ເàºàº™àº²àº”າ gd +GrenÄda gd +Гренада gd +Гренада gd +Granada gd +ਗਰੀਨਾਡਾ gd +Granada gd +Granada gd +Гренада gd +Gerenada gd +I-Grenada gd +கிரெனடா gd +Гронодо gd +เà¸à¸£à¸™à¸²à¸”า gd +Гренада gd +Гренада gd +GrenÃ¥de gd +格林纳达 gd +æ ¼ç‘žé‚£é” gd +Georgia ge +Georgië ge +جورجيا ge +Ð“Ñ€ÑƒÐ·Ñ–Ñ ge +Ð“Ñ€ÑƒÐ·Ð¸Ñ ge +জরà§à¦œà¦¿à§Ÿà¦¾ ge +Jeorji ge +Gruzija ge +Geòrgia ge +Gruzie ge +Georgien ge +Georgien ge +ΓεωÏγία ge +Georgino ge +Gruusia ge +گرجستان ge +Géorgie ge +Georgië ge +An tSeoirsia ge +Xeórxia ge +×’'ורג'×™×” ge +जà¥à¤¯à¤¾à¤°à¥à¤œà¤¿à¤¯à¤¾ ge +Grúzia ge +Georgía ge +ジョージア島 ge +ហ្សកហ្ស៊ី ge +그루지아 ge +ເຊີເບີຠge +Gruzija ge +Gruzija ge +Грузија ge +Георги ge +Ä orÄ¡ia ge +Georgien ge +Georgië ge +ਜਾਰਜੀਆ ge +Gruzja ge +Geórgia ge +Geórgia ge +Ð“Ñ€ÑƒÐ·Ð¸Ñ ge +Jeworugiya ge +Gruzija ge +Грузија ge +Gruzija ge +Georgien ge +ஜியோரà¯à®œà®¿à®¯à®¾ ge +ГурҷиÑтон ge +จอร์เจีย ge +Gürcistan ge +Görcestan ge +Ð“Ñ€ÑƒÐ·Ñ–Ñ ge +ГуржиÑтон ge +Djeyordjeye ge +æ ¼é²å‰äºš ge +喬治亞 ge +Ghana gh +غانا gh +Гана gh +Гана gh +ঘানা gh +Gwana gh +Gana gh +Γκάνα gh +Ganao gh +غنا gh +Gána gh +Gana gh +×’×× ×” gh +घाना gh +Gana gh +ガーナ gh +ហ្កាណា gh +가나 gh +ຈີນ gh +Gana gh +Gana gh +Гана gh +Гана gh +Gana gh +ਘਾਨਾ gh +Gana gh +Gana gh +Gana gh +Гана gh +Gana gh +Gana gh +Гана gh +Gana gh +I-Ghana gh +கானா gh +Ғано gh +à¸à¸²à¸™à¸² gh +Гана gh +Гана gh +Gana gh +加纳 gh +è¿¦ç´ gh +Gibraltar gi +جبل طارق gi +Гібралтар gi +Гибралтар gi +জিবà§à¦°à¦²à§à¦Ÿà¦¾à¦° gi +Jibraltar gi +ΓιβÏÎ±Î»Ï„Î¬Ï gi +Gibraltaro gi +گیبرالتار gi +Giobráltar gi +Xibraltar gi +גיברלטר gi +जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° gi +Gibraltár gi +Gíbraltar gi +Gibilterra gi +ジブラルタル gi +지브롤터 gi +ມອລຕາ gi +Gibraltaras gi +GibraltÄrs gi +Гибралтар gi +Гибралтар gi +Ä ibiltar gi +ਗੀਬਰਾਲਟਾਰ gi +Гибралтар gi +Jiburalitari gi +Гибралтар gi +ஜிபà¯à®°à®²à¯à®Ÿà®¾à®°à¯ gi +Ҷабалуттариқ gi +ยิบรอลตา gi +Cebelitarık gi +Гібралтар gi +Гибралтар gi +Djibraltar gi +直布罗陀 gi +直布羅陀 gi +Greenland gl +Groenland gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl +গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦£à§à¦¡ gl +Griñland gl +Groenlàndia gl +Grónsko gl +Y Lasynys gl +Grønland gl +Grönland gl +Ισλανδία gl +Groenlandia gl +Gröönimaa gl +Gröönlanti gl +Groenland gl +Grienlân gl +An Ghraonlainn gl +Groenlándia gl +Grönland gl +Grænland gl +Groenlandia gl +グリーンランド gl +Grenlandija gl +Гренланд gl +Grønland gl +Gröönland gl +Groenland gl +Grønland gl +ਗਰੀਨਲੈਂਡ gl +Grenlandia gl +Gronelândia gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl +Goronilande gl +Ruonáeatnan gl +Grenlandija gl +Гренланд gl +Grenland gl +Grönland gl +Ð“Ñ€Ð¸Ð½Ð»Ð°Ð½Ð´Ð¸Ñ gl +à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์ gl +Grönland gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ñ–Ñ gl +Ð“Ñ€ÐµÐ½Ð»Ð°Ð½Ð´Ð¸Ñ gl +格陵兰 gl +格陵蘭 gl +Gambia gm +Gambië gm +غامبيا gm +Ð“Ð°Ð¼Ð±Ñ–Ñ gm +Ð“Ð°Ð¼Ð±Ð¸Ñ gm +গামবিয়া gm +Gambi gm +Gambija gm +Gàmbia gm +Gambie gm +Γκάμπια gm +Gambio gm +گامبیا gm +Gambie gm +An Ghaimbia gm +Gámbia gm +גמביה gm +जामà¥à¤¬à¤¿à¤¯à¤¾ gm +Gambija gm +Gambía gm +ガンビア gm +ហ្កាំប៊ី gm +ê°ë¹„ì•„ gm +à»àºàº¡àº¡àº² gm +Gambija gm +Gambija gm +Гамбија gm +Гамби gm +Gambja gm +ਗੈਂਬੀਆ gm +Gâmbia gm +Gâmbia gm +Ð“Ð°Ð¼Ð±Ð¸Ñ gm +Gambiya gm +Gambija gm +Гамбија gm +Gambija gm +காமà¯à®ªà®¿à®¯à®¾ gm +Гомбиё gm +à¹à¸à¸¡à¹€à¸šà¸µà¸¢ gm +Ð“Ð°Ð¼Ð±Ñ–Ñ gm +Ð“Ð°Ð¼Ð±Ð¸Ñ gm +Gambeye gm +冈比亚 gm +甘比亞 gm +Guinea gn +غينيا gn +ГвінÑÑ gn +Ð“Ð²Ð¸Ð½ÐµÑ gn +গিনি gn +Gine gn +Gvineja gn +Gini gn +Γουινέα gn +Gvineo gn +Ginea gn +گینه gn +Guinée gn +An Ghuine gn +Guiné gn +×’×™× ××” gn +गà¥à¤ˆà¤¨à¤¾ gn +Gvineja gn +Gínea gn +ギニア gn +ហ្គីណ០gn +기니 gn +ເຖາວັນ gn +GvinÄ—ja gn +Gvineja gn +Гвинеја gn +Гуйнеа gn +Ginea gn +ਗà©à¨‡à¨¨à©€à¨† gn +Gwinea gn +Guiné gn +Guiné gn +Ð“Ð²Ð¸Ð½ÐµÑ gn +Gineya gn +Gvineja gn +Гвинеја gn +Gvineja gn +கà¯à®¯à¯à®©à®¿à®¯à®¾ gn +Гине gn +à¸à¸´à¸™à¸µ gn +Gine gn +Ð“Ð²Ñ–Ð½ÐµÑ gn +Ð“Ð²Ð¸Ð½ÐµÑ gn +Guinêye gn +几内亚 gn +幾內亞 gn +Guadeloupe gp +غواديلوب gp +ГвадÑлупа gp +Гваделупа gp +গাডেলà§à¦ª gp +Gwadeloup gp +Gvadalupe gp +Guadalupe gp +Gwadel?p gp +ΓουαδελοÏπη gp +Gvadelupo gp +Guadalupe gp +Guadalupe gp +گوادلوپ gp +Guadalúip gp +Guadalupe gp +×’×ודלופה gp +गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‹à¤ª gp +Gvadelúpeyjar gp +Guadalupa gp +ä»é ˜ã‚°ã‚¢ãƒ‰ãƒ«ãƒ¼ãƒ— gp +ហ្គាដឺលុប gp +과들루프 gp +ເດີລຸຠgp +Gvandelupa gp +Гваделупе gp +Gwadelup gp +ਗà©à¨†à¨¡à©€à¨“ਪੀ gp +Gwadelupa gp +Guadalupe gp +Guadalupe gp +Guadelupa gp +Гваделупа gp +Gwaderupe gp +Гвадалупе gp +Gvadalupe gp +கà¯à®µà®¾à®Ÿà¯†à®²à¯à®ªà¯‹à®ªà¯ gp +Гвадалуппо gp +เà¸à¸²à¸°à¸à¸±à¸§à¹€à¸”อลูป gp +Guadelupa gp +Гваделупа gp +Гваделупа gp +瓜德罗普 gp +瓜德魯普 gp +Equatorial Guinea gq +Ekwatoriaal Guinea gq +غينيا الاستوائية gq +ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ gq +Екваториална Ð“Ð²Ð¸Ð½ÐµÑ gq +ইকà§à§Ÿà§‡à¦Ÿà§‹à¦°à¦¿à§Ÿà¦¾à¦² গিনি gq +Guine équatoriale gq +Ekvatorijalna Gvineja gq +Guinea Equatorial gq +Rovníková Guinea gq +Gini Gyhydeddol gq +Ækvatorial Guinea gq +Äquatorial-Guinea gq +ΙσημεÏινή Γουινέα gq +Ekvatora Gvineo gq +Guinea equatorial gq +Ekvatoriaal-Guinea gq +Ginea Ekuatoriala gq +گینه اکوادور gq +Päiväntasaajan Guinea gq +Guinée équatoriale gq +Guine Mheánchiorclach gq +Guinea Ecuatorial gq +×’×™× ××” המשוונית gq +इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गà¥à¤à¤¨à¤¾ gq +Ekvatorijalna Gvineja gq +EgyenlítÅ‘i Guinea gq +Miðbaugs-Gínea gq +Guinea Equatoriale gq +赤é“ギニア gq +ហ្គីណáŸâ€‹áž¢áŸáž€áŸ’វាទáŸážš gq +ì ë„ 기니 gq +àºàº²àº™àºªàº­àº™ gq +Ekvatoriaus GvinÄ—ja gq +EkvatoriÄlÄ Gvineja gq +Екваторијална Гвинеја gq +Equatorial Гуйнеа gq +Ginea Ekwatorjali gq +Ekvatorial-Guinea gq +Äquatoriaal-Guinea gq +Equatoriaal Guinea gq +Ekvatorial-Guinea gq +à¨à¨•ੂਲੇਟਰਲ ਗà©à¨ˆà¨¨à¨¿à¨† gq +Gwinea Równikowa gq +Guiné Equatorial gq +Guiné Equatorial gq +Guinea Ecuatorială gq +Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ gq +Gineya Ekwatoriyale gq +EkvatorialalaÅ¡-Guinea gq +Rovníkova Guinea gq +Ekvatorialna Gvineja gq +Екваторијална Гвинеја gq +Ekvatorijalna Gvineja gq +Ekvatorialguinea gq +ஈகோடோரியல௠கà¯à®¯à¯à®©à®¿à®¯à®¾ gq +Гинеи Экваторӣ gq +à¸à¸´à¸™à¸µ ตรงเส้นศูนย์สูตร gq +Ekvatoral Gine gq +Equatorlı Guinea gq +Екваторіальна Ð“Ð²Ñ–Ð½ÐµÑ gq +Экваториал Ð“Ð²Ð¸Ð½ÐµÑ gq +Guinêye EcwÃ¥toriÃ¥le gq +赤é“几内亚 gq +赤é“幾內亞 gq +Greece gr +Griekeland gr +اليونان gr +Yunanıstan gr +ГрÑÑ†Ñ‹Ñ gr +Ð“ÑŠÑ€Ñ†Ð¸Ñ gr +গà§à¦°à§€à¦¸ gr +Gres gr +GrÄka gr +Grècia gr +Řecko gr +Gwlad Groeg gr +Grækenland gr +Griechenland gr +Ελλάδα gr +Grekujo gr +Grecia gr +Kreeka gr +Grezia gr +یونان gr +Kreikka gr +Grikkaland gr +Grèce gr +Grikelân gr +An Ghréig gr +Grécia gr +יוון gr +गà¥à¤°à¥€à¤¸ gr +GrÄka gr +Görögország gr +Grikkland gr +Grecia gr +ギリシャ gr +ក្រិក gr +그리스 gr +àºàºµàºŠ gr +Graikija gr +GrieÄ·ija gr +Грција gr +Грек gr +GreÄ‹ja gr +Hellas gr +Grekenland gr +Griekenland gr +Hellas gr +Grèça gr +ਗਰੀਸ gr +Grecja gr +Grécia gr +Grécia gr +Grecia gr +Ð“Ñ€ÐµÑ†Ð¸Ñ gr +Ubugereki gr +Greika gr +Grécko gr +GrÄija gr +Грчка gr +GrÄka gr +I-Greece gr +Grekland gr +கிரீச௠gr +Юнон gr +à¸à¸£à¸µà¸‹ gr +Yunanistan gr +Yunanstan gr +Ð“Ñ€ÐµÑ†Ñ–Ñ gr +ЮнониÑтон gr +Hy Lạp gr +Grece gr +希腊 gr +希臘 gr +Guatemala gt +Gautemala gt +غواتيمالا gt +Quatemala gt +ГватÑмала gt +Гватемала gt +গà§à§Ÿà¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾ gt +Gvatemala gt +Gwatemala gt +Γουατεμάλα gt +Gvatemalo gt +گواتمالا gt +Guatamala gt +גו×טמלה gt +गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾ gt +Gvatemala gt +Gvatemala gt +グァテマラ gt +ហ្គាážáŸáž˜áŸ‰áž¶áž¡áž¶ gt +과테ë§ë¼ gt +àºàº±àº§à»€àº•ມາລາ gt +Gvatemala gt +Gvatemala gt +Гватемала gt +ГуÑтемала gt +Gwatemala gt +ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾ gt +Gwatemala gt +Гватемала gt +Gwatemala gt +Gvatemala gt +Гватемала gt +Gvatemala gt +I-Guatemala gt +கà¯à®µà®¾à®¤à¯à®¤à®®à®¾à®²à®¾ gt +Гватемоло gt +à¸à¸±à¸§à¹€à¸•มาลา gt +Гватемала gt +Гватемала gt +Gwatemala gt +å±åœ°é©¬æ‹‰ gt +瓜地馬拉 gt +Guam gu +غوام gu +Гуам gu +Гуам gu +গà§à§Ÿà¦¾à¦® gu +Gwam gu +Gw?m gu +Γκουάμ gu +Gvamo gu +گوام gu +גו×× gu +गà¥à¤µà¤¾à¤® gu +Gvam gu +グァム gu +ហ្គាំម gu +ê´Œ gu +à»àºàº¡àº¡àº² gu +Guama gu +Гвам gu +Гуам gu +Gwam gu +ਗà©à¨†à¨® gu +Гуам gu +Gwamu gu +Гуам gu +காம௠gu +Гуамма gu +à¸à¸§à¸¡ gu +Гуам gu +Гуам gu +Gwam gu +关岛 gu +關島 gu +Guinea-Bissau gw +غينيا-بيساو gw +ГвінÑÑ-БіÑаў gw +Ð“Ð²Ð¸Ð½ÐµÑ Ð‘Ð¸Ñау gw +গিনি-বিসো gw +Gine-Biso gw +Gvineja-Bisau gw +Gini-Bisaw gw +Γουινέα-Μπισσάου gw +Gvineo BisaÅ­a gw +Ginea-Bissau gw +گینه بیسائو gw +Guinée-Bissau gw +Guine-Bhissau gw +×’×™× ××” ביס×ו gw +गà¥à¤à¤¨à¤¾-बिसाऊ gw +Bissau-Guinea gw +Gínea-Bissá gw +ギニアビサオ gw +ហ្គីណáŸáž”៊ីសៅ gw +기니비사 gw +ລັດເຊີຠgw +Gvineja-Bisava gw +Гвинеја БиÑао gw +Гуйнеа-БиÑÑау gw +Ginea-Bissaw gw +ਗà©à¨‡à¨¨à¨¿à¨†-ਬਿਸ਼ਾਉ gw +Gwinea-Bissau gw +Guiné Bissau gw +Guiné-Bissau gw +ГвинеÑ-БиÑау gw +Gineya-Bisawu gw +Гвинеја БиÑао gw +Gvineja Bisao gw +கà¯à®¯à¯à®©à®¿à®¯à®¾-பிஸà¯à®¸à®¾ gw +Гвинеи БиÑÑои gw +à¸à¸´à¸™à¸µ - บิสซอ gw +Gine-Bissau gw +ГвінеÑ-БіÑау gw +ГвинеÑ-БиÑÑау gw +Guinêye-Bissaw gw +å‡ å†…äºšæ¯”ç» gw +幾內亞比紹 gw +Guyana gy +غيانا gy +ГвіÑна gy +Гуайана gy +গায়ানা gy +Gwiana gy +Gvajana gy +Giana gy +Γουιάνα gy +Gujano gy +گویان gy +Guyane gy +An Ghuáin gy +Guiana gy +גוי×× ×” gy +गà¥à¤¯à¤¾à¤¨à¤¾ gy +Gvæjana gy +ガイアナ gy +ហ្គីយ៉ាណា gy +ê°€ì´ì•„나 gy +ຈີນ gy +Gviana gy +Gajana gy +Гвајана gy +ГуÑна gy +Gujana gy +ਗà©à¨†à¨¨à¨¾ gy +Gujana gy +Guiana gy +Guiana gy +Guiana gy +Гайана gy +Giyana gy +Gvajana gy +Гвајана gy +Gvajana gy +கானா gy +Гуана gy +à¸à¸¹à¸¢à¸²à¸™à¹ˆà¸² gy +Guana gy +ГайÑна gy +Гвиана gy +圭亚那 gy +è“‹äºžç´ gy +Hong Kong SAR(China) hk +Hong Kong SAR (China) hk +Хонг Конг (Китай) hk +হং কং SAR(চীন) hk +Hong Kong SAR(Sina) hk +Hong Kong SAR(Xina) hk +Hong Kong SAR (Čína) hk +Hongkong SAR(Kina) hk +Χονγκ Κονγκ SAR (Κίνα) hk +Hongkong hk +Hong Kong SAR(Txina) hk +Hong Kong SAR (Kiina) hk +Hong Kong SAR (Chine) hk +Hong Cong SAR(An tSín) hk +Hong Kong hk +הונג קונג SAR (סין) hk +Hongkong (Kína) hk +Hong Kong (sjálfstjórnarhérað í Kína) hk +Hong Kong SAR(Cina) hk +香港(中国) hk +ហុងចិន (áž…áž·áž“) hk +Hong Kongas SAR(Kinija) hk +Хонг Конг СÐР(Кина) hk +Hongkong SAR(Kina) hk +Hong Kong hk +Hongkong SAR(Kina) hk +ਹਾਂਗ-ਕਾਂਗ SAR(ਚੀਨ) hk +Hong Kong SAR (Chiny) hk +Hong Kong SAR (China) hk +Гонконг hk +Hong Kong SAR (Ubushinwa) hk +Hongkong SAR(Kiinná) hk +Hong Kong SAR (Kitajska) hk +SAR Hong Kong (Кина) hk +SAR Hong Kong (Kina) hk +Hong Kong (Kina) hk +ஹாஙà¯à®•ாங௠SAR(சீனா) hk +ฮ่องà¸à¸‡ hk +Hong Kong (Çin) hk +Гонконг SAR (Китай) hk +Гонконг (Хитой) hk +中国香港特别行政区 hk +香港 SAR(中國) hk +Honduras hn +هندوراس hn +Ð“Ð°Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +হণà§à¦¡à§à¦°à¦¾à¦¸ hn +Hondures hn +Hondwras hn +ΟνδοÏÏα hn +Honduro hn +هندوراس hn +Hondúras hn +הונדורס hn +होंडà¥à¤°à¤¾à¤¸ hn +Hondúras hn +ホンジュラス hn +ហុងឌូរ៉ាស់ hn +온ë‘ë¼ìФ hn +ຫອນດູລັດ hn +HondÅ«ras hn +Hondurasa hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ħonduras hn +Hondures hn +ਹੰਨਡੂਰਸ hn +Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Hondirasi hn +Ð¥Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +I-Honduras hn +ஆணà¯à®Ÿà¯à®°à®¾à®¸à¯ hn +Ò²Ð¸Ð½Ð´ÑƒÑ€Ð¾Ñ hn +ฮอนดูรัส hn +Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ hn +洪都拉斯 hn +å®éƒ½æ‹‰æ–¯ hn +Croatia hr +Kroasië hr +كرواتيا hr +Xırvatıstan hr +Ð¥Ð°Ñ€Ð²Ð°Ñ‚Ñ‹Ñ hr +ХърватÑка hr +কà§à¦°à§‹à§Ÿà¦¾à¦¶à¦¿à§Ÿà¦¾ hr +Kroatia hr +Hrvatska hr +Croàcia hr +Chorvatsko hr +Kroatien hr +Kroatien hr +ΚÏοατία hr +Kroatio hr +Croacia hr +Horvaatia hr +Kroazia hr +کرواسی hr +Kroatia hr +Kroatia hr +Croatie hr +Kroatië hr +An Chróit hr +Croácia hr +קרו×טיה hr +कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾ hr +Hrvatska hr +Horvátország hr +Kroasia hr +Króatía hr +Croazia hr +クロアãƒã‚¢ hr +ក្រូអាហhr +í¬ë¡œì•„í‹°ì•„ hr +ໂຄເອເທີຠhr +Kroatija hr +HorvÄtija hr +ХрватÑка hr +Кроати hr +Kroazja hr +Kroatia hr +Kroatien hr +Kroatië hr +Kroatia hr +Croacia hr +ਕਰੋਆਟਿਆ hr +Chorwacja hr +Croácia hr +Croácia hr +CroaÅ£ia hr +Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr +Korowasiya hr +Kroátia hr +Chorvátsko hr +HrvaÅ¡ka hr +ХрватÑка hr +Hrvatska hr +I-Croatia hr +Kroatien hr +கà¯à®°à¯‹à®Ÿà®¿à®¯à®¾ hr +Хорватӣ hr +โครเอเธีย hr +Hırvatistan hr +Kroatia hr +Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ñ–Ñ hr +Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ hr +CrowÃ¥ceye hr +克罗地亚 hr +克羅埃西亞 hr +Haiti ht +Haïti ht +هايتي ht +Гаіці ht +Хаити ht +হাইতি ht +Haití ht +Αϊτή ht +Haitio ht +Haití ht +هاییتی ht +Haïti ht +Háítí ht +×”×יטי ht +हैती ht +Haítí ht +ãƒã‚¤ãƒ ht +ហែទី ht +ì•„ì´í‹° ht +ວາດຮູບ - K ht +Haitis ht +Хаити ht +Хайти ht +Ħaiti ht +ਹਾਇਟੀ ht +Гаити ht +Hayiti ht +Хаити ht +ஹைதி ht +Ҳаити ht +ไฮติ ht +Гаїті ht +Гаити ht +Hayiti ht +海地 ht +海地 ht +Hungary hu +Hongarye hu +هنغاريا hu +Macarıstan hu +Вугоршчына hu +Ð£Ð½Ð³Ð°Ñ€Ð¸Ñ hu +হাঙà§à¦—েরী hu +Hungaria hu +MaÄ‘arska hu +Hongria hu +MaÄarsko hu +Hwngari hu +Ungarn hu +Ungarn hu +ΟυγγαÏία hu +Hungario hu +Hungría hu +Ungari hu +Hungaria hu +مجارستان hu +Unkari hu +Ungarn hu +Hongrie hu +Hongarije hu +An Ungáir hu +Hungria hu +הונגריה hu +हंगरी hu +MaÄ‘jarska hu +Magyarország hu +Hungaria hu +Ungverjaland hu +Ungheria hu +ãƒãƒ³ã‚¬ãƒªãƒ¼ hu +ហុងគ្រី hu +í—가리 hu +ຫັງàºàº²àº¥àºµ hu +Vengrija hu +UngÄrija hu +Унгарија hu +Унгар hu +Ungerija hu +Ungarn hu +Ungarn hu +Hongarije hu +Ungarn hu +Hongria hu +ਹੰਗਰੀ hu +WÄ™gry hu +Hungria hu +Hungria hu +Ungaria hu +Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu +Hongiriya hu +Ungár hu +MaÄarsko hu +Madžarska hu +МађарÑка hu +MaÄ‘arska hu +I-Hungary hu +Ungern hu +ஹஙà¯à®•ேரி hu +МаҷориÑтон hu +ฮังà¸à¸²à¸£à¸µ hu +Macaristan hu +Macarstan hu +Угорщина hu +Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ hu +Hongreye hu +匈牙利 hu +匈牙利 hu +Indonesia id +Indonesië id +إندونيسيا id +İndoneziya id +ІнданÑÐ·Ñ–Ñ id +Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id +ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à§Ÿà¦¾ id +Indonezi id +Indonezija id +Indonèsia id +Indonésie id +Indonesien id +Indonesien id +Ινδονησία id +Indonezio id +Indoneesia id +اندونزی id +Indonésie id +Indonesië id +An Indinéis id +Indonésia id +×ינדונזיה id +इंडोनेशिया id +Indonezija id +Indonézia id +Indónesía id +インドãƒã‚·ã‚¢ id +ឥណ្ឌូនáŸážŸáŸŠáž¸ id +ì¸ë„네시아 id +ອີàºà»‚ດນີເຊີຠid +Indonezija id +IndonÄ“zija id +Индонезија id +Индонез id +Indoneżja id +Indonesien id +Indonesië id +ਇੰਡੋਨੇਸ਼ੀਆ id +Indonezja id +Indonésia id +Indonésia id +Indonezia id +Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id +Indonesiya id +Indonézia id +Indonezija id +Индонезија id +Indonezija id +I-Indonesia id +Indonesien id +இநà¯à®¤à¯‹à®©à¯€à®šà®¿à®¯à®¾ id +Индонезӣ id +อินโดนีเซีย id +İndonezya id +İndonesia id +Ð†Ð½Ð´Ð¾Ð½ÐµÐ·Ñ–Ñ id +Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ id +Indonezeye id +å°åº¦å°¼è¥¿äºš id +å°å°¼ id +Ireland ie +Ierland ie +أيرلندا ie +İrlandiya ie +ІрлÑÐ½Ð´Ñ‹Ñ ie +Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie +আয়ারলà§à¦¯à¦¾à¦£à§à¦¡ ie +Iwerzhon ie +Irska ie +Irlanda ie +Irsko ie +Iwerddon ie +Irland ie +Irland ie +ΙÏλανδία ie +Islando ie +Irlanda ie +Iirimaa ie +Irlanda ie +ایرلند ie +Irlanti ie +Ãrland ie +Irlande ie +Ierlân ie +Éire ie +Irlanda ie +×ירלנד ie +आयरलैंड ie +Irska ie +Ãrország ie +Irlandia ie +Ãrland ie +Irlanda ie +アイルランド ie +អៀរឡង់ ie +ì•„ì¼ëžœë“œ ie +ໄອà»àº¥àº™ ie +Airija ie +Īrija ie +ИрÑка ie +Ирланд ie +Irlanda ie +Irland ie +Irland ie +Ierland ie +Irland ie +Irlanda ie +ਆਇਰਲੈਂਡ ie +Irlandia ie +Irlanda ie +Irlanda ie +Irlanda ie +Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie +Irilande ie +Irlánda ie +Ãrsko ie +Irska ie +ИрÑка ie +Irska ie +I-Ireland ie +Irland ie +அயரà¯à®²à®¾à®¨à¯à®¤à¯ ie +Ирлонд ie +ไอร์à¹à¸¥à¸™à¸”์ ie +İrlanda ie +İreland, İrlandia ie +Ð†Ñ€Ð»Ð°Ð½Ð´Ñ–Ñ ie +Ð˜Ñ€Ð»Ð°Ð½Ð´Ð¸Ñ ie +Irlande ie +伊朗 ie +愛爾蘭 ie +Israel il +اسرائيل il +İzrail il +Ізраіль il +Израел il +ইসরাইল il +Izrael il +Izrael il +ΙσÏαήλ il +Israelo il +Iisrael il +اسراییل il +Ãsrael il +Israël il +Iosrael il +ישר×ל il +इज़राइल il +Izrael il +Izrael il +Ãsrael il +Israele il +イスラエル il +អ៊ីស្រាអែល il +ì´ìФë¼ì—˜ il +ອິດສະລະເອລ il +Izraelis il +IzraÄ“la il +Израел il +Изриал il +Iżrael il +ਇਜ਼ਰਾਈਲ il +Izrael il +Израиль il +Isirayeli il +Izrael il +Izrael il +Израел il +Izrael il +I-Israel il +இசà¯à®°à¯‡à®²à¯ il +ИÑроил il +อิสราเอล il +İsrail il +İsrael il +Ізраїль il +ИÑроил il +Israyel il +USirayeli il +以色列 il +以色列 il +India in +Indië in +الهند in +Hindistan in +Ð†Ð½Ð´Ñ‹Ñ in +Ð˜Ð½Ð´Ð¸Ñ in +ভারত in +Indez in +Indija in +Ãndia in +Indie in +Indien in +Indien in +Ινδία in +Hindujo in +هندوستان in +Intia in +Inde in +An India in +Ãndia in +הודו in +भारत in +Indija in +Indland in +インド in +ឥណ្ឌា in +ì¸ë„ in +ອິນເດີຠin +Indija in +Indija in +Индија in +ЭнÑтхÑг in +Indja in +Indien in +ਭਾਰਤ in +Indie in +Ãndia in +Ãndia in +Ð˜Ð½Ð´Ð¸Ñ in +Ubuhinde in +Indija in +Индија in +Indija in +I-India in +Indien in +இநà¯à®¤à®¿à®¯à®¾ in +ҲиндуÑтон in +อินเดีย in +Hindistan in +Hindstan in +Ð†Ð½Ð´Ñ–Ñ in +ҲиндиÑтон in +Ấn Äá»™ in +Inde in +å°åº¦ in +å°åº¦ in +Endiya in +Iraq iq +Irak iq +العراق iq +İraq iq +Ірак iq +Ирак iq +ইরাক iq +Irak iq +Irak iq +Irák iq +Irac iq +Irak iq +Irak iq +ΙÏάκ iq +Irako iq +Irak iq +Iraak iq +Irak iq +عراق iq +Irak iq +Irak iq +Irak iq +Irak iq +An Iaráic iq +עיר××§ iq +इराक iq +Irak iq +Irak iq +Ãrak iq +イラク iq +អ៊ីរ៉ាក់ iq +ì´ë¼í¬ iq +ອີລັຠiq +Irakas iq +IrÄka iq +Ирак iq +Ирак iq +Irak iq +Irak iq +Irak iq +Irak iq +ਇਰਾਕ iq +Irak iq +Iraque iq +Iraque iq +Irak iq +Ирак iq +Iraki iq +Iráka iq +Irák iq +Irak iq +Ирак iq +Irak iq +I-Iraq iq +Irak iq +ஈராக௠iq +Ироқ iq +อิรัภiq +Irak iq +Ğíraq iq +Ірак iq +Ироқ iq +Irak iq +伊拉克 iq +伊拉克 iq +Iran ir +أيران ir +Іран ir +Иран ir +ইরান ir +Ãrán ir +ΙÏάν ir +Irano ir +Iraan ir +ایران ir +An Iaráin ir +Irán ir +×יר×ן ir +इरान ir +Irán ir +Ãran ir +イラン ir +អ៊ីរ៉ង់ ir +ì´ëž€ ir +ອີລັຠir +Iranas ir +IrÄna ir +Иран ir +Иран ir +ਈਰਾਨ ir +Irão ir +Irã ir +Иран ir +Irani ir +Irána ir +Irán ir +Иран ir +I-Iran ir +ஈரான௠ir +Эрон ir +อิหร่าน ir +İran ir +İran ir +Іран ir +Эрон ir +伊朗 ir +伊朗 ir +Iceland is +Ysland is +أيسلندا is +İslandiya is +ІÑьлÑÐ½Ð´Ñ‹Ñ is +ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is +আইসলà§à¦¯à¦¾à¦£à§à¦¡ is +Island is +Island is +Islàndia is +Island is +Ynys yr I? is +Island is +Island is +Ισλανδία is +Islando is +Islandia is +Island is +Islandia is +ایسلند is +Islanti is +Ãsland is +Islande is +Yslân is +An Ãoslainn is +Islándia is +×יסלנד is +आयरलैंड is +Island is +Izland is +Islandia is +Ãsland is +Islanda is +アイスランド is +អ៊ីស្លង់ is +ì•„ì´ìŠ¬ëž€ë“œ is +ໄອຊà»àº¥àº™ is +Islandija is +Islande is +ИÑланд is +ИÑланд is +Islandja is +Island is +Island is +IJsland is +Island is +Islandia is +ਆਈਸਲੈਂਡ is +Islandia is +Islândia is +Islândia is +Islanda is +ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is +Isilande is +Islánda is +Island is +Islandija is +ИÑланд is +Island is +I-Iceland is +Island is +தீவ௠is +ИÑлонд is +ไอซ์à¹à¸¥à¸™à¸”์ is +İzlanda is +İsland is +ІÑÐ»Ð°Ð½Ð´Ñ–Ñ is +ИÑÐ»Ð°Ð½Ð´Ð¸Ñ is +Izlande is +冰岛 is +冰島 is +Icelandi is +Italy it +Italië it +ايطاليا it +İtalyia it +Ð†Ñ‚Ð°Ð»Ñ–Ñ it +Ð˜Ñ‚Ð°Ð»Ð¸Ñ it +ইতালী it +Italia it +Italija it +Itàlia it +Itálie it +Yr Eidal it +Italien it +Italien it +Ιταλία it +Italio it +Italia it +Itaalia it +Italia it +ایتالیا it +Italia it +Italia it +Italie it +Italië it +An Iodáil it +Itália it +×יטליה it +इटली it +Italija it +Olaszország it +Italia it +Ãtalía it +Italia it +イタリア it +អ៊ីážáž¶áž›áž¸ it +ì´íƒˆë¦¬ì•„ it +ອີຕາລີ it +Italija it +ItÄlija it +Италија it +Итали it +Itali it +Italja it +Italia it +Italien it +Italië it +Italia it +Italia it +ਇਟਲੀ it +WÅ‚ochy it +Itália it +Itália it +Italia it +Ð˜Ñ‚Ð°Ð»Ð¸Ñ it +Ubutaliyani it +Itália it +Taliansko it +Italija it +Италија it +Italija it +I-Italy it +Italien it +இதà¯à®¤à®¾à®²à®¿ it +Итолиё it +อิตาลี it +İtalya it +İtalia it +Ð†Ñ‚Ð°Ð»Ñ–Ñ it +Ð˜Ñ‚Ð°Ð»Ð¸Ñ it +à it +ItÃ¥leye it +Ithali it +æ„大利 it +義大利 it +Jamaica jm +Jamaika jm +جامايكا jm +Yamayka jm +Ямайка jm +Ямайка jm +জামাইকা jm +Jamaika jm +Jamajka jm +Jamajka jm +Jamaika jm +Τζαμάικα jm +Jamajko jm +Jamaika jm +جاماییکا jm +Jamaika jm +Jamaïque jm +An Iamáice jm +Xamaica jm +×’'מייקה jm +जमैका jm +Jamajka jm +Jamaika jm +Jamaika jm +Jamaíka jm +Giamaica jm +ジャマイカ jm +ហ្សាម៉ាអ៊ិគ jm +ìžë©”ì´ì¹´ jm +ຈາໄມàºàº² jm +Jamaika jm +Jamaika jm +Јамајка jm +Ямайк jm +Ä amajka jm +Jamaika jm +ਜੈਮੇਕਾ jm +Jamajka jm +Ямайка jm +Jamayika jm +Jamajka jm +Jamajka jm +Јамајка jm +Jamajka jm +I-Jamaica jm +சமெயà¯à®•à¯à®•ா jm +Ҷомойко jm +จาไมà¸à¹‰à¸² jm +Jamaika jm +Jamayka jm +Ямайка jm +Ямайка jm +Djamayike jm +牙买加 jm +牙買加 jm +Jordan jo +Jordaan jo +الأردن jo +İordaniya jo +Ð¯Ñ€Ð´Ð°Ð½Ñ–Ñ jo +Ð™Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo +জরà§à¦¡à¦¾à¦¨ jo +Jordani jo +Jordània jo +Jordán jo +Gwlad Iorddonen jo +Jordanien jo +ΙοÏδανία jo +Jordanio jo +Jordania jo +Jordaania jo +Jordania jo +اردن jo +Jordania jo +Jordanie jo +Jordanië jo +An Iordáin jo +Xordánia jo +ירדן jo +जॉरà¥à¤¡à¤¨ jo +Jordánia jo +Jórdanía jo +Giordania jo +ヨルダン jo +ហ្ស៊កដានី jo +요르단 jo +ຈà»à»àº”ນ jo +Jordanija jo +JordÄnija jo +Јордан jo +Ðрдан jo +Ä ordan jo +Jordanien jo +Jordanië jo +ਜਾਰਡਨ jo +Jordania jo +Jordânia jo +Jordânia jo +Iordania jo +Ð˜Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ jo +Yorudani jo +Jordánia jo +Jordánsko jo +Jordanija jo +Јордан jo +I-Jordan jo +Jordanien jo +ஜோரà¯à®Ÿà®¾à®©à¯ jo +Урдон jo +จอร์à¹à¸”น jo +Ürdün jo +Ð™Ð¾Ñ€Ð´Ð°Ð½Ñ–Ñ jo +Иордан jo +Djordaneye jo +约旦 jo +ç´„æ—¦ jo +Ijolidani jo +Japan jp +اليابان jp +Yaponiya jp +Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp +Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp +জাপান jp +Japon jp +Japó jp +Japonsko jp +Siapan jp +Ιαπωνία jp +Japanio jp +Japón jp +Jaapan jp +Japonia jp +ژاپن jp +Japani jp +Japon jp +An tSeapáin jp +Xapón jp +יפן jp +जापान jp +Japán jp +Jepang jp +Giappone jp +日本 jp +ជប៉ុន jp +ì¼ë³¸ jp +àºàºµà»ˆàº›àº¸à»ˆàº™ jp +Japonija jp +JapÄna jp +Јапонија jp +Япон jp +Jepun jp +Ä appun jp +Japon jp +ਜਾਪਾਨ jp +Japonia jp +Japão jp +Japão jp +Japonia jp +Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp +Ubuyapani jp +Japána jp +Japonsko jp +Japonska jp +Јапан jp +I-Japan jp +சபà¯à®ªà®¾à®©à¯ jp +Ҷопон jp +à¸à¸µà¹ˆà¸›à¹ˆà¸¸à¸™ jp +Japonya jp +Japan, Yaponia jp +Ð¯Ð¿Ð¾Ð½Ñ–Ñ jp +Ð¯Ð¿Ð¾Ð½Ð¸Ñ jp +Nhật bản jp +Djapon jp +日本 jp +日本 jp +Kenya ke +Kenië ke +كينيا ke +ÐšÐµÐ½Ñ–Ñ ke +ÐšÐµÐ½Ð¸Ñ ke +কেনিয়া ke +Kenija ke +Keňa ke +Cenia ke +Kenia ke +Κένυα ke +Kenjo ke +Kenia ke +کنیا ke +Kenia ke +An Chéinia ke +Kenia ke +×§× ×™×” ke +केनà¥à¤¯à¤¾ ke +Kenija ke +Kenía ke +ケニア ke +កáŸáž“យ៉ា ke +ì¼€ëƒ ke +ເວນດາ ke +Kenija ke +Kenija ke +Кенија ke +ÐšÐµÐ½Ð¸Ñ ke +Kenja ke +Kenia ke +ਕੀਨੀਆ ke +Kenia ke +Quénia ke +Quênia ke +Kenia ke +ÐšÐµÐ½Ð¸Ñ ke +Keňa ke +Kenija ke +Кенија ke +Kenija ke +கெனà¯à®¯à®¾ ke +Куниё ke +เคนยา ke +Kenia ke +ÐšÐµÐ½Ñ–Ñ ke +ÐšÐµÐ½Ð¸Ñ ke +Kenia ke +肯尼亚 ke +肯亞 ke +Kyrgyzstan kg +قيرغيزستان kg +КыргызÑтан kg +КиргизÑтан kg +কিরà§à¦—িজসà§à¦¤à¦¾à¦¨ kg +Kirgistan kg +Kirgistan kg +Kyrgigstan kg +Kyrgyzstán kg +Cyrgystan kg +Kirgizistan kg +Kirgisien kg +ΚιÏγιζιστάν kg +Kirgizujo kg +Kyrgyzstán kg +Kõrgõzstan kg +قرقیزستان kg +Kirghizstan kg +An Chirgeastáin kg +Kirguizistán kg +קירגיסטן kg +किरà¥à¤—िजिसà¥à¤¤à¤¾à¤¨ kg +Kirgizisztán kg +Kirgisistan kg +Kirghizistan kg +キルギスタン kg +គៀរហ្គីស្ážáž„់ kg +키르기스스탄 kg +ຄສິຕັລ kg +Kirgistanas kg +KirgizstÄna kg +КиргиÑтан kg +КиргизÑтан kg +Kirgiżstan kg +Kirgisistan kg +Kirgisien kg +Kirgizië kg +Kirgisistan kg +ਕਿਰਗਸਤਾਨ kg +Kigistan kg +Quirguistão kg +Quirguistão kg +Kirgiztan kg +КиргизÑтан kg +Kirigizisitani kg +Kirgisistan kg +Kirgizstan kg +КиргиÑтан kg +Kirgistan kg +Kirgizistan kg +கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯ kg +ҚирғизиÑтон kg +คีจิสถาน kg +Kırgızistan kg +Qırğızstan kg +КиргизÑтан kg +ҚирғизиÑтон kg +Kirguiztan kg +å‰å°”剿–¯æ–¯å¦ kg +å‰çˆ¾å‰æ–¯ kg +Cambodia kh +Kambodië kh +كمبوديا kh +Камбоджа kh +Камбоджа kh +কামবোডিয়া kh +Kambodj kh +KamboÄ‘a kh +Cambodja kh +Kambodža kh +Kambodscha kh +Καμπότζη kh +KamboÄo kh +Kambodža kh +Canbodia kh +کامبوج kh +Kambodza kh +Cambodge kh +Cambodja kh +An Chambóid kh +Camboia kh +קמבודיה kh +कमà¥à¤¬à¥‹à¤¡à¤¿à¤¯à¤¾ kh +KamboÄ‘a kh +Kambodzsa kh +Kambódía kh +Cambogia kh +カンボジア kh +កម្ពុជា kh +캄보디아 kh +ໂຄລຳເບີຠkh +Kambodža kh +Kambodža kh +Камбоџа kh +Камбодиа kh +Kemboja kh +Kambodja kh +Kambodsja kh +Kambodscha kh +Cambodja kh +Kambodsja kh +ਕੰਬੋਡੀਆ kh +Kambodża kh +Cambodja kh +Cambodja kh +Cambogia kh +Камбоджа kh +Kamboji kh +Kamboža kh +Kambodža kh +Kambodža kh +Камбоџа kh +Kambodža kh +Kambodja kh +கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®¾ kh +Камбуҷа kh +à¸à¸±à¸¡à¸žà¸¹à¸Šà¸² kh +Kamboçya kh +Kambodia kh +Камбоджа kh +Камбоджа kh +Cam pu chia kh +Cambodje kh +柬埔寨 kh +柬埔寨 kh +Kiribati ki +كيريباتي ki +Кiрыбацi ki +Кирибати ki +কিরিবাটি ki +Ciribati ki +ΚιÏιμπάτι ki +Kiribato ki +کیریباتی ki +Ciribeas ki +קיריב×טי ki +किरीबाती ki +Kíribatí ki +キリãƒã‚¹ ki +គិរិបាទី ki +키리바시 ki +à»àºŸàº„ທັລ - K ki +Кирибати ki +Крибати ki +ਕਿਰਿਬਟੀ ki +Кирибати ki +Кирибати ki +கிரிபடி ki +Карибот ki +คิริบาติ ki +Кірібаті ki +Кирибати ki +基里巴斯 ki +å‰é‡Œå·´æ–¯ ki +Comoros km +جزر القمر km +Каморы km +КоморÑки оÑтрови km +কমোরস km +Komoros km +Komori km +Komory km +Ynysoedd Y Comoros km +Comorerne km +Komoren km +ΚομόÏες km +Komoroj km +Komoorid km +کوموروس km +Komorit km +Comores km +Na Comóir km +קומורוס km +कोमोरो km +Kómoreyjar km +Comore km +コモロ km +កុំម៉ូរ៉ូស km +코모로 km +ສີ km +Komoru salas km +КоморÑки оÑтрови km +Ð¡Ð¾Ð¼Ð¾Ñ€Ð¾Ñ km +Komoros km +Komorene km +Komoren km +Komorane km +ਕੋਮੋਰੋਸ km +Komory km +КоморÑкие оÑтрова km +Komore km +Komorot km +Komori km +Комора km +Komora km +Komorerna km +காமாரோஸ௠km +ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km +โคโมรอส km +Komoros km +Komorlar km +КоморÑькі оÑтрови km +ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ km +Comores km +ç§‘æ‘©ç½— km +葛摩 km +St. Kitts and Nevis kn +St. Kitts en Nevis kn +سانت كيتس Ùˆ نيÙيس kn +St. Kitts vÉ™ Nevis kn +СÑнт-КрыÑтофер Ñ– ÐÑÐ²Ñ–Ñ kn +Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +সেনà§à¦Ÿ কিটস à¦à¦¬à¦‚ নেভিস kn +S. Kitts ha Nevis kn +St. Kitts i Nevis kn +Sv. Kitts a Nevis kn +Ynysoedd St. Kitts a Nevis kn +St. Kitts-Nevis kn +St. Kitts und Nevis kn +Άγιος ΧÏιστόφοÏος (Σαιντ Κιτς) και Îέβις kn +Sent-Kristofo kaj Neviso kn +St. Kitts y Nevis kn +St. Kitts ja Nevis kn +St. Kitts eta Nevis kn +سن کیتس Ùˆ نویس kn +St. Kitts ja Nevis kn +St Kitts et Nevis kn +St. Kitts en Nevis kn +San Críostóir Nimheas kn +Saint Kitts e Nevis kn +סנט קיטס ונביס kn +सेंट किटà¥à¤¸ तथा नेविस kn +St. Kitts és Nevis kn +St. Kitts dan Nevis kn +Sankti Kristófer og Nevis kn +Saint Kitts e Nevis kn +セントクリストファーãƒã‚¤ãƒ“ス kn +សង់ឃីហនិង áž“áŸážœáž¸ážŸ kn +세ì¸íЏ 키츠 네비스 kn +Å v. Kitts ir Nevis kn +Senkitsa un Nevisa kn +Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +St. ÐšÐ¸Ñ‚Ñ‚Ñ Ð±Ð° ÐÐµÐ²Ð¸Ñ kn +St. Kitts u Nevis kn +St. Kitts og Nevis kn +St. Kitts un Nevis kn +St. Kitts en Nevis kn +St. Kitts og Nevis kn +St. Kitts le Nevis kn +St. Kitts e Nevis kn +ਸੇਂਟ ਕਿਟਸ ਤੇ ਨਿਵੀਸ kn +St. Kitts e Nevis kn +St Kitts e Nevis kn +Sf. Kitts ÅŸi Nevis kn +Сент-ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +Mutagatifu Kitsi na Nevisi kn +St. Kitts ja Nevis kn +St. Kitts a Nevis kn +St. Kitts in Nevis kn +Св. ÐšÐ¸Ñ‚Ñ Ð¸ ÐÐµÐ²Ð¸Ñ kn +Sv. Kits i Nevis kn +I-St. Kitts and Nevis kn +St. Kitts och Nevis kn +செயினà¯à®Ÿà¯ கிடà¯à®šà¯ & நெவிச௠kn +Синт ÐšÐ¸Ñ‚Ñ‚Ñ Ð²Ð° ÐÐµÐ²Ð¸Ñ kn +เซนต์à¸à¸´à¸•ส์à¹à¸¥à¸°à¹€à¸™à¸§à¸´à¸ª kn +St. Kitts ve Nevis kn +Santa Kitts wä Nevis kn +Ð¤ÐµÐ´ÐµÑ€Ð°Ñ†Ñ–Ñ Ð¡ÐµÐ½Ñ‚-ÐšÑ–Ñ‚Ñ Ñ– ÐÐµÐ²Ñ–Ñ kn +Сент-КриÑтофер ва ÐÐµÐ²Ð¸Ñ kn +St. Kitts na Nevis kn +St. Kitts và Nevis kn +St. Kitts neNevis kn +圣基茨和尼维斯 kn +è–å…‹ç†æ–¯å¤šç¦åŠå°¼ç¶­æ–¯ kn +St. Kitts kanye no-Nevis kn +North Korea kp +Noord Korea kp +كوريا الشمالية kp +Åžimali Koreya kp +ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ ÐšÐ°Ñ€ÑÑ kp +Северна ÐšÐ¾Ñ€ÐµÑ kp +উতà§à¦¤à¦° কোরিয়া kp +Norzh-Korea kp +Sjeverna Koreja kp +Corea del Nord kp +Severní Korea kp +Gogledd Corea kp +Nordkorea kp +Nord-Korea kp +Î’ÏŒÏεια ΚοÏέα kp +Nordkoreo kp +Corea del Norte kp +Põhja-Korea kp +Ipar Korea kp +کره شمالی kp +Pohjois-Korea kp +Norðurkorea kp +Corée du nord kp +Noard-Korea kp +An Chóiré Thuaidh kp +Corea do Norte kp +צפון קורי××” kp +उतà¥à¤¤à¤°à¥€ कोरिया kp +Sjeverna Koreja kp +Észak-Korea kp +Korea Utara kp +Norður-Kórea kp +Corea del Nord kp +æœé®®æ°‘主主義人民共和国 kp +កូរ៉áŸâ€‹ážáž¶áž„​ជើង kp +ì¡°ì„ ë¯¼ì£¼ì£¼ì˜ ì¸ë¯¼ê³µí™”êµ­ kp +ເàºàº»àº²àº¥àºµà»€àº«àº™àº·àº­ kp +Å iaurÄ—s KorÄ—ja kp +ZiemeļKoreja kp +Северна Кореја kp +Хойд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kp +Korea ta' Fuq kp +Nord-Korea kp +Noordkorea kp +Noord-Korea kp +Nord-Korea kp +Lebowa la Korea kp +Corea dèu Nord kp +ਉੱਤਰੀ ਕੋਰੀਆ kp +Korea Północna kp +Coreia do Norte kp +Coréia do Norte kp +Coreea de Nord kp +Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kp +Koreya y'Amajyaruguru kp +Davvi-Korea kp +severná Kórea kp +Severna Koreja kp +Северна Кореја kp +Severna Koreja kp +I-North Korea kp +Nordkorea kp +வட கொரியா kp +КореÑи Шимолӣ kp +เà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­ kp +Kuzey Kore kp +Tönyaq Korea kp +Північна ÐšÐ¾Ñ€ÐµÑ kp +Шимолий ÐšÐ¾Ñ€ÐµÑ kp +Devhula ha Korea kp +Bắc Triá»u Tiên kp +Bijhe Corêye kp +Umntla Korea kp +æœé²œ kp +北韓 kp +Enyakatho ne-Korea kp +South Korea kr +Suid Korea kr +كوريا الجنوبية kr +CÉ™nubi Koreya kr +ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ ÐšÐ°Ñ€ÑÑ kr +Южна ÐšÐ¾Ñ€ÐµÑ kr +দকà§à¦·à¦¿à¦£ কোরিয়া kr +Su-Korea kr +Južna Koreja kr +Corea del Sud kr +Jižní Korea kr +De Corea kr +Sydkorea kr +Süd-Korea kr +Îότια ΚοÏέα kr +Sudkoreo kr +Corea del Sur kr +Lõuna-Korea kr +Hego Korea kr +کره جنوبی kr +Etelä-Korea kr +Suðurkorea kr +Corée du sud kr +Sûd-Korea kr +An Chóiré Theas kr +Corea do Sur kr +×“×¨×•× ×§×•×¨×™××” kr +दकà¥à¤·à¤¿à¤£à¥€ कोरिया kr +Južna Koreja kr +Dél-Korea kr +Korea Selatan kr +Suður-Kórea kr +Corea del Sud kr +大韓民国 kr +កូរ៉áŸâ€‹ážáž¶áž„​ážáŸ’បូង kr +대한민국 kr +ເàºàº»àº²àº¥àºµà»ƒàº•້ kr +Pietų KorÄ—ja kr +DievidKoreja kr +Јужна Кореја kr +Өмнөд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ kr +Korea t'Isfel kr +Sør-Korea kr +Söödkorea kr +Zuid-Korea kr +Sør-Korea kr +Borwa bja Korea kr +Corea dèu Sud kr +ਦੱਖਣੀ ਕੋਰੀਆ kr +Korea PoÅ‚udniowa kr +Coreia do Sul kr +Coréia do Sul kr +Coreea de Sud kr +Ð®Ð¶Ð½Ð°Ñ ÐšÐ¾Ñ€ÐµÑ kr +Koreya y'Amajyepfo kr +Lulli-Korea kr +Južná Kórea kr +Južna Koreja kr +Јужна Кореја kr +Južna Koreja kr +I-South Korea kr +Sydkorea kr +தென௠கொரியா kr +КореÑи Ҷанубӣ kr +เà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้ kr +Güney Kore kr +Könyaq Korea kr +Південна ÐšÐ¾Ñ€ÐµÑ kr +Жанубий ÐšÐ¾Ñ€ÐµÑ kr +Korea tshipembe kr +Hàn Quốc kr +Nonne Corêye kr +Umzantsi Korea kr +韩国 kr +å—韓 kr +Emzansi Korea kr +Kuwait kw +Kuwaït kw +الكويت kw +КувÑйт kw +Кувейт kw +কà§à§Ÿà§‡à¦¤ kw +Kowaet kw +Kuvajt kw +Kuvajt kw +Coweit kw +Κουβέιτ kw +Kuvajto kw +Kuveit kw +کویت kw +Kuvait kw +Kowait kw +Koeweit kw +Cuáit kw +כווית kw +कà¥à¤µà¥ˆà¤¤ kw +Kuvajt kw +Kuvait kw +Kúveit kw +クェート kw +គុយវ៉ែហkw +쿠웨ì´íЏ kw +à»àº•້ມຮູບ- K kw +Kuveitas kw +Kuveita kw +Кувајт kw +Кувейт kw +Koeweit kw +ਕà©à¨µà©ˆà¨¤ kw +Koweit kw +Kuveit kw +Кувейт kw +Koweti kw +Kuvajt kw +Kuvajt kw +Кувајт kw +Kuvajt kw +I-Kuwait kw +கà¯à®µà¯ˆà®¤à¯ kw +Қувейт kw +คูเวต kw +Küwäyt kw +KКувейт kw +Кувайт kw +Kuweyt kw +ç§‘å¨ç‰¹ kw +ç§‘å¨ç‰¹ kw +Cayman Islands ky +Cayman Eilande ky +جزر الكايمان ky +Кайманови оÑтрови ky +কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ky +Inizi Kaeman ky +Kajmanska ostrva ky +Illes Caimà ky +Kajmanské ostrovy ky +Ynysoedd Caiman ky +Cayman-øerne ky +Kaiman-Inseln ky +Îησιά Κάυμαν ky +Kejmanoj ky +Islas Caimán ky +Kaimanisaared ky +Kaiman Irlak ky +جزایر Ú©Ùیمن ky +Cayman-saaret ky +ÃŽles Caïman ky +Kaaiman Eilannen ky +Oileáin na gCadhman ky +Illas Caimán ky +××™×™ קיימן ky +केमन आइलैंड ky +Kajmanski Otoci ky +Kajmán-szigetek ky +Cayman-eyjar ky +Isole Cayman ky +英領ケイマン諸島 ky +កោះ​កៃម៉ាន ky +ì¼€ì´ë§¨ ì œë„ ky +ຄາຕາລັນ ky +Kaimanų salos ky +Kaimanu salas ky +КајманÑки ОÑтрови ky +Cayman арлууд ky +Gżejjer Cayman ky +Caymanøyene ky +Kayman-Inseln ky +Kaaiman Eilanden ky +Caymanøyane ky +ਕਾਅਮਾਨ ਟਾਪੂ ky +Kajmany ky +Ilhas Caimão ky +Ilhas Cayman ky +Insulele Cayman ky +Каймановы оÑтрова ky +Ibirwa bya Kayimani ky +Caymansullot ky +Kajmanske Ostrovy ky +Kajmanski otoki ky +КајманÑка оÑтрва ky +Kajmanska ostrva ky +Caymanöarna ky +கேமான௠தீவà¯à®•ள௠ky +Ҷазираи Кайман ky +หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™ ky +Cayman Adaları ky +Kayman Utrawları ky +Кайман оÑтрів ky +Кайман Ороллари ky +Iyes Cayman ky +开曼群岛 ky +開曼群島 ky +Kazakhstan kz +كازاخستان kz +КазахÑтан kz +КазахÑтан kz +কাজাকসà§à¦¤à¦¾à¦¨ kz +Kazakstan kz +Kazahstan kz +Kazachstán kz +Casacstan kz +Kasachstan kz +Καζακστάν kz +KazaÄ¥ujo kz +Kazakhstán kz +Kasahstan kz +قزاقستان kz +Kazakstan kz +Kazachstan kz +An Chasacstáin kz +Kazaxistán kz +קזחסט×ן kz +कज़ाखिसà¥à¤¤à¤¾à¤¨ kz +Kazahstan kz +Kazahsztán kz +Kasakstan kz +Kazakistan kz +カザフスタン kz +កាហ្សាក់ស្ážáž„់ kz +ì¹´ìží스탄 kz +à»àºà»àº¥àºàº•ິຠ- K kz +Kazachstanas kz +KazahstÄna kz +КазакÑтан kz +Казак kz +Każakstan kz +Kasakhstan kz +Kasachstan kz +Kazachstan kz +Kasakhstan kz +ਕਾਜ਼ਾਕਸਤਾਨ kz +Kazachstan kz +Cazaquistão kz +Cazaquistão kz +Cazahstan kz +КазахÑтан kz +Kazakisitani kz +Kasakhstan kz +Kazachstan kz +Kazahstan kz +КазахÑтан kz +Kazahstan kz +Kazakstan kz +கஜஸà¯à®¤à®¾à®©à¯` kz +ҚазоқиÑтон kz +คาซัคสถาน kz +Kazakistan kz +Qazaqstan kz +КазахÑтан kz +ҚозоғиÑтон kz +Kazaxhtan kz +哈è¨å…‹æ–¯å¦ kz +哈薩克 kz +Laos la +لاوس la +Ð›Ð°Ð¾Ñ la +Ð›Ð°Ð¾Ñ la +লাওস la +Λάος la +Laoso la +لائوس la +Láós la +ל×וס la +लाओस la +Laosz la +ラオス la +ឡាវ la +ë¼ì˜¤ìФ la +ລາວ la +Laosas la +Laosa la +Ð›Ð°Ð¾Ñ la +Ð›Ð°Ð¾Ñ la +ਲਿਉਸ la +Ð›Ð°Ð¾Ñ la +Lawosi la +Ð›Ð°Ð¾Ñ la +லாஸ௠la +Ð›Ð°Ð¾Ñ la +ลาว la +Ð›Ð°Ð¾Ñ la +Ð›Ð°Ð¾Ñ la +Lào la +Lawosse la +è€æŒ la +寮國 la +Lebanon lb +Libanon lb +لبنان lb +Ліван lb +Ливан lb +লেবানন lb +Liban lb +Liban lb +Líban lb +Libanon lb +Libanus lb +Libanon lb +Libanon lb +Λίβανος lb +Libano lb +Líbano lb +Liibanon lb +Libano lb +لبنان lb +Libanon lb +Libanon lb +Liban lb +Libanon lb +An Liobáin lb +Líbano lb +לבנון lb +लेबनान lb +Libanon lb +Libanon lb +Líbanon lb +Libano lb +レãƒãƒŽãƒ³ lb +លីបង់ lb +레바논 lb +ເດນ່ງນ lb +Libanas lb +LibÄna lb +Либан lb +Либанон lb +Lubnan lb +Libanu lb +Libanon lb +Libanon lb +Libanon lb +Libanon lb +ਲਿਬਨਾਨ lb +Liban lb +Líbano lb +Líbano lb +Liban lb +Ливан lb +Libani lb +Libanon lb +Libanon lb +Libanon lb +Либан lb +Liban lb +I-Lebanon lb +Libanon lb +லெபனான௠lb +Лубнон lb +เลบานอน lb +Ліван lb +Лебанон lb +Li Băng lb +Liban lb +黎巴嫩 lb +黎巴嫩 lb +St. Lucia lc +سانت لوسيا lc +СÑнт-ЛюÑÑ–Ñ lc +Св. Ð›ÑƒÑ‡Ð¸Ñ lc +সেনà§à¦Ÿ লà§à¦¸à¦¿à§Ÿà¦¾ lc +S. Lucia lc +Svatá Lucie lc +St. Lwsia lc +Σάντα Λουτσία lc +Sent-Lucio lc +Santa Lucía lc +سن لوسیا lc +Sankta Lusia lc +Sainte Lucie lc +San Lúisia lc +Santa Lucia lc +סנטה לוסיה lc +सेंट लूसिया lc +Sankti Lúsía lc +Santa Lucia lc +セントルシア lc +សង់លូស៊ីយ៉ា lc +세ì¸íЏ 루시아 lc +ເຊັນລູເຊີຠlc +Å v Liucija lc +Sv. LÅ«cija lc +Св. Луција lc +St. ЛуÑиа lc +St. LuÄ‹ija lc +ਸੇਂਟ ਲੂਉਸ lc +Santa Lúcia lc +Santa Lúcia lc +Sf. Lucia lc +Сент-ЛюÑÐ¸Ñ lc +Mutagatifu Lusiya lc +Sv. Júlia lc +Sv. Lucija lc +Св. Луција lc +Sv. Lucija lc +I-St. Lucia lc +செனà¯à®Ÿà¯ லூசியா lc +Синт ЛуÑиё lc +เซนต์ลูเซีย lc +Santa Lüçiä lc +Сент-ЛюÑÑ–Ñ lc +Сент-ЛюÑÐ¸Ñ lc +Ste Luceye lc +圣å¢è¥¿äºš lc +è–露西亞 lc +Liechtenstein li +ليشتنشتاين li +ЛіхтÑнштÑйн li +Лихтенщайн li +লিখটেনসà§à¦Ÿà¦¾à¦‡à¦¨ li +LihtenÅ¡tajn li +LichtenÅ¡tejnsko li +Λίχτενσταϊν li +LiÄ¥tenÅtejno li +Liechtestein li +لیختن اشتاین li +An Lichtinstéin li +ליכטנשטין li +लिचटेनसà¥à¤Ÿà¥€à¤¨ li +LihtenÅ¡tajn li +リヒテンシュタイン li +លិចទáŸáž“ស្ážáŸ‚áž“ li +리히í…ìŠˆíƒ€ì¸ li +ຟ້າà»àº¡àºš li +LichtenÅ¡teinas li +LihtenÅ¡teina li +Лихтенштајн li +ЛихтÑнштайн li +Liechtensteen li +ਲੀਚਟੀਨਸਟੀਨ li +Lichtensztajn li +Лихтенштейн li +Liyeshitensiteyini li +Лихтенштајн li +LihtenÅ¡tajn li +லசà¯à®šà¯†à®©à¯à®¸à¯à®Ÿà¯†à®©à¯ li +Лихтанштоин li +ลิชเทนสไตน์ li +LihtenÅŸtayn li +Lihtenstein li +Ліхтенштейн li +Лихтенштейн li +Lîchtensteyn li +列支敦士登 li +列支敦斯登 li +Sri Lanka lk +سريلانكا lk +Шры-Ланка lk +Шри Ланка lk +শà§à¦°à§€à¦²à¦™à§à¦•া lk +Å ri Lanka lk +Srí Lanka lk +Sri Lanca lk +ΣÏι Λάνκα lk +Sri-Lanko lk +سریلانکا lk +Srí Lanca lk +סרי לנקה lk +शà¥à¤°à¥€ लंका lk +Å ri Lanka lk +Srí Lanka lk +スリランカ lk +ស្រីលង្កា lk +스리랑카 lk +ເຊີເບີຠlk +Å ri Lanka lk +Å rilanka lk +Шри Ланка lk +Шириланк lk +ਸà©à¨°à©€à¨²à©°à¨•ਾ lk +Шри-Ланка lk +Siri Lanka lk +Å ri Lanka lk +Шри Ланка lk +Å ri Lanka lk +இலஙà¯à®•ை lk +Сри Лонко lk +ศรีลังà¸à¸² lk +Åžri Lanka lk +Шрі-Ланка lk +Шри Ланка lk +æ–¯é‡Œå…°å¡ lk +æ–¯é‡Œè˜­å¡ lk +Liberia lr +Liberië lr +ليبيريا lr +ЛібÑÑ€Ñ‹Ñ lr +Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr +লাইবেরিয়া lr +Liberija lr +Libèria lr +Libérie lr +ΛιβεÏία lr +Liberio lr +Libeeria lr +لیبریا lr +Libéria lr +An Libéir lr +Libéria lr +לוב lr +लाइबेरिया lr +Liberija lr +Libéria lr +Líbería lr +リベリア lr +លីបáŸážšáž¸áž™áŸ‰áž¶ lr +ë¼ì´ë² ë¦¬ì•„ lr +ລິຊາ lr +LibÄ“rija lr +Либерија lr +Либери lr +Liberja lr +ਲੀਬਿਰੀਆ lr +Libéria lr +Libéria lr +Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr +Liberiya lr +Lýbia lr +Liberija lr +Либерија lr +Liberija lr +லிபிரியா lr +Либериё lr +ไลบีเรีย lr +Liberya lr +Ð›Ñ–Ð±ÐµÑ€Ñ–Ñ lr +Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ lr +利比里亚 lr +賴比瑞亞 lr +Lesotho ls +ليسوتو ls +ЛеÑота ls +ЛеÑото ls +লেসোথো ls +Lesoto ls +Lesoto ls +Λεσόθο ls +Lesoto ls +Lesoto ls +لسوتو ls +Leosóta ls +Lesoto ls +לסוטו ls +लेसोथो ls +Lesótó ls +レソト ls +áž¡áŸážŸáž¼ážáž¼ ls +레소토 ls +ທົດສອບ ls +Lesoto ls +ЛеÑото ls +ЛиÑото ls +Leżoto ls +ਲਿਉਥੂ ls +Lesoto ls +Lesoto ls +Lesoto ls +ЛеÑото ls +Lesoto ls +Lesoto ls +ЛеÑото ls +Lesoto ls +லஸொதோ ls +ЛиÑуту ls +เลโซโต ls +Lesoto ls +Lesoto ls +ЛеÑото ls +ЛеÑото ls +Lessoto ls +莱索托 ls +賴索扥 ls +Lithuania lt +Lithuanië lt +ليتوانيا lt +Litvaniya lt +Літва lt +Литва lt +লিথà§à§Ÿà§‡à¦¨à¦¿à§Ÿà¦¾ lt +Lituani lt +Litvanija lt +Lituània lt +Litva lt +Lithwania lt +Litauen lt +Litauen lt +Λιθουανία lt +Litovio lt +Lituania lt +Leedu lt +Lituania lt +لیتوانی lt +Liettua lt +Lituanie lt +Litouwen lt +An Liotuáin lt +Lituánia lt +×œ×™×˜× lt +लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾ lt +Litva lt +Litvánia lt +Litháen lt +Lituania lt +リトアニア lt +លីទុយអានី lt +리투아니아 lt +ລິທົ່ວເນີຠlt +Lietuva lt +Lietuva lt +Литванија lt +Литва lt +Litwanja lt +Litauen lt +Litauen lt +Litouwen lt +Litauen lt +ਲੀਥੂਨੀਆ lt +Litwa lt +Lituânia lt +Lituânia lt +Lituania lt +Литва lt +Litwaniya lt +Lietuva lt +Litva lt +Litva lt +Литванија lt +Litvanija lt +I-Lithuania lt +Litauen lt +லிதà¯à®¤à¯à®µà¯‡à®©à®¿à®¯à®¾ lt +Литвониё lt +ลิธัวเนีย lt +Litvanya lt +Lituania lt +Литва lt +Литва lt +Litwaneye lt +ç«‹é™¶å®› lt +ç«‹é™¶å®› lt +Luxembourg lu +Luxenburg lu +لوكسمبورغ lu +Lüksemburq lu +ЛюкÑÑмбург lu +ЛюкÑембург lu +লাকà§à¦¸à§‡à¦®à¦¬à§à¦°à§à¦— lu +Luksembourg lu +Luksemburg lu +Luxemburg lu +Lucembursko lu +Lwcsembwrg lu +Luxemburg lu +ΛουξεμβοÏÏγο lu +Luksemburgo lu +Luxemburgo lu +Luksemburg lu +Luxenburgo lu +لوگزامبورگ lu +Luxemburg lu +Luksemborg lu +Luxemburg lu +Lucsamburg lu +Luxemburgo lu +לוקסמבורג lu +लकà¥à¤¸à¤®à¤¬à¤°à¥à¤— lu +Luksemburg lu +Luxemburg lu +Lúxemborg lu +Lussemburgo lu +ルクセンブルグ lu +លុចហ្សំបួរ lu +ë£©ì…ˆë¶€ë¥´í¬ lu +ລັàºà»àºŠàº¡à»€àºšàºµàº lu +Liuksemburgas lu +Luksemburga lu +ЛукÑембург lu +ЛюкÑембүрг lu +Lussemburgu lu +Luxemborg lu +Luxemburg lu +ਲਕਸ਼ਮਬਰਗ lu +Luksemburg lu +Luxemburgo lu +Luxemburgo lu +Luxemburg lu +ЛюкÑембург lu +Lugizamburu lu +Luxemburg lu +Luxemburg lu +Luksemburg lu +ЛукÑембург lu +Luksemburg lu +I-Luxembourg lu +Luxemburg lu +லகà¯à®šà®®à¯à®ªà¯‹à®°à¯à®•௠lu +Лукзамбург lu +ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸­à¸£à¹Œà¸ lu +Lüksemburg lu +Lüksemburg lu +ЛюкÑембург lu +ЛюкÑембург lu +Lussimbork lu +墿£®å ¡ lu +盧森堡 lu +Latvia lv +لاتÙيا lv +Latviya lv +Ð›Ð°Ñ‚Ð²Ñ–Ñ lv +Ð›Ð°Ñ‚Ð²Ð¸Ñ lv +লাতভিয়া lv +Latvija lv +Letònia lv +LotyÅ¡sko lv +Latfia lv +Letland lv +Lettland lv +Λεττονία lv +Latvio lv +Letonia lv +Läti lv +لاتویا lv +Lettonie lv +Letland lv +An Laitvia lv +Letónia lv +לטביה lv +लाटविया lv +Latvija lv +Lettország lv +Lettland lv +Lettonia lv +ラトビア lv +ឡាážážœáž¸áž™áŸ‰áž¶ lv +ë¼íŠ¸ë¹„ì•„ lv +ລັດເວີຠlv +Latvija lv +Latvija lv +Латвија lv +Латви lv +Latvja lv +Lettland lv +Letland lv +ਲਾਟਵੀਆ lv +Åotwa lv +Letónia lv +Ð›Ð°Ñ‚Ð²Ð¸Ñ lv +Lativiya lv +Látvia lv +LotyÅ¡sko lv +Latvija lv +Латвија lv +Latvija lv +I-Latvia lv +Lettland lv +லடà¯à®µà®¿à®¯à®¾ lv +Латвонӣ lv +ลัธเวีย lv +Litvanya lv +Ð›Ð°Ñ‚Ð²Ñ–Ñ lv +Ð›Ð°Ñ‚Ð²Ð¸Ñ lv +Lativia lv +Letoneye lv +拉脱维亚 lv +拉脫維亞 lv +Libya ly +Libië ly +ليبيا ly +Ð›Ñ–Ð²Ñ–Ñ ly +Ð›Ð¸Ð±Ð¸Ñ ly +লিবিয়া ly +Julia ly +Libija ly +Líbia ly +Lýbie ly +Libia ly +Libyen ly +Libyen ly +ΛιβÏη ly +Libio ly +Libia ly +Liibüa ly +Libia ly +لیبی ly +Lybie ly +Libië ly +An Libia ly +Líbia ly +לוב ly +लीबिया ly +Libija ly +Líbia ly +Líbía ly +Libia ly +リビア ly +លីប៊ី ly +리비아 ly +ລິຊາ ly +Libija ly +LÄ«bija ly +Либија ly +Ð›Ð¸Ð±Ñ ly +Libja ly +Libyen ly +Libië ly +ਲੀਬੀਆ ly +Libia ly +Líbia ly +Líbia ly +Libia ly +Ð›Ð¸Ð²Ð¸Ñ ly +Libiya ly +Lýbia ly +Libija ly +Либија ly +Libija ly +I-Libya ly +Libyen ly +லிபியா ly +Ð›Ð¸Ð±Ð¸Ñ ly +ลิเบีย ly +Libia ly +Ð›Ñ–Ð²Ñ–Ñ ly +Ð›Ð¸Ð±Ð¸Ñ ly +Libeye ly +利比亚 ly +利比亞 ly +Morocco ma +Morokko ma +المغرب ma +Марока ma +Мароко ma +মরকà§à¦•à§‹ ma +Marok ma +Maroko ma +Marroc ma +Maroko ma +Moroco ma +Marokko ma +Marokko ma +ΜαÏόκο ma +Maroko ma +Marruecos ma +Maroko ma +Maroko ma +مراکش ma +Marokko ma +Marokko ma +Maroc ma +Marokko ma +Maracó ma +Marrocos ma +מרוקו ma +मोरकà¥à¤•ो ma +Maroko ma +Marokkó ma +Marokkó ma +Marocco ma +モロッコ ma +ម៉ារ៉ុក ma +모로코 ma +ເມົາລິ ma +Marokas ma +Maroka ma +Мароко ma +Морокко ma +Marokk ma +Marokko ma +Marokko ma +Marokko ma +Marokko ma +ਮੋਰਕੋ ma +Maroko ma +Marrocos ma +Marrocos ma +Maroc ma +Марокко ma +Maroke ma +Marokko ma +Maroko ma +Maroko ma +Мароко ma +Maroko ma +I-Morocco ma +Marocko ma +மோராகோ ma +Марокко ma +โมร็อคโค ma +Morokko ma +Марокко ma +Марокаш ma +Ma rốc ma +Marok ma +摩洛哥 ma +摩洛哥 ma +Monaco mc +Monako mc +موناكو mc +Манака mc +Монако mc +মোনাকো mc +Monako mc +Monako mc +Mònaco mc +Monako mc +Μονακό mc +Monako mc +Mónaco mc +موناکو mc +Monacó mc +Mónaco mc +מונקו mc +मोनेको mc +Monako mc +Mónakó mc +モナコ mc +ម៉ូណាកូ mc +모나코 mc +ເມົາລິ mc +Monakas mc +Monako mc +Монако mc +Монако mc +Monako mc +ਮੋਨਕੋ mc +Monako mc +Mónaco mc +Mônaco mc +Монако mc +Monako mc +Monako mc +Monako mc +Монако mc +Monako mc +மனாகோ mc +Монако mc +โมนาโค mc +Monako mc +Manako mc +Монако mc +Монако mc +摩纳哥 mc +æ‘©ç´å“¥ mc +Moldova md +Ù…ÙˆÙ„Ø¯ÙˆÙØ§ md +Малдова md +ÐœÐ¾Ð»Ð´Ð°Ð²Ð¸Ñ md +মলডোভা md +Moldavi md +Moldàvia md +Moldávie md +Moldofa md +Moldawien md +Μολδαβία md +Moldavujo md +Moldavia md +Moldavia md +مولداوی md +Moldavie md +An Mholdóiv md +Moldávia md +מולדובה md +मॉलà¥à¤¦à¥‹à¤µà¤¾ md +Moldóva md +Moldavia md +モルドムmd +ម៉ុលដូវ៉ា md +몰ë„ë°” md +ສະໂລວັຠmd +MoldÄvija md +Молдавија md +Молдав md +Moldavja md +Moldawien md +Moldavië md +ਮੋਡੋਵਾ md +MoÅ‚dawia md +Moldávia md +Молдова md +Molidova md +Moldávsko md +Молдавија md +Moldavija md +Moldavien md +மாலà¯à®Ÿà¯‹à®µà®¾ md +Молдавӣ md +มอลโดวา md +Молдова md +Молдова md +摩尔多瓦 md +摩爾多瓦 md +Madagascar mg +Madagaskar mg +مدغشقر mg +МадагаÑкар mg +МадагаÑкар mg +মাদাগাসà§à¦•ার mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +ΜαδαγασκάÏη mg +Madagaskaro mg +Madagaskar mg +ماداگاسکار mg +Madagaskar mg +מדגסקר mg +मेडागासà¥à¤•र mg +Madagaskar mg +Madagaszkár mg +Madagaskar mg +マダガスカル mg +ម៉ាដាហ្កាស្ការ mg +마다카스카르 mg +ຄາສະບາລ - K mg +Madagaskaras mg +Madagaskara mg +МадаÑкар mg +МадагаÑкар mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +ਮੈਡਾਗਾਸਕਰ mg +Madagaskar mg +Madagáscar mg +МадагаÑкар mg +Madagasikari mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +МадагаÑкар mg +Madagaskar mg +Madagaskar mg +மடகஸà¯à®•ார௠mg +МадогоÑкор mg +มาดาà¸à¸±à¸ªà¸à¸² mg +Madagaskar mg +Madagaskar mg +МадагаÑкар mg +МадагаÑкар mg +马达加斯加 mg +馬é”加斯加 mg +Marshall Islands mh +Marshall EIlande mh +جزر مارشال mh +Маршалавы аÑтравы mh +МаршалÑки оÑтрови mh +মারশাল দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ mh +Inizi Marshall mh +MarÅ¡alova ostrva mh +Illes Marshall mh +Marshallovy ostrovy mh +Ynysoedd Marshall mh +Marshall-øerne mh +Marshall-Inseln mh +Îησιά ΜάÏσαλ mh +MarÅaloj mh +Islas Marshall mh +Marshalli saared mh +Marshall Irlak mh +جزایر مارشال mh +Marshallinsaaret mh +ÃŽles Marshall mh +Marshall Eilânen mh +Oileáin Mharshall mh +Illas Marshall mh +××™×™ מרשל mh +मारà¥à¤¶à¤² आइलैंड mh +Marshall Otoci mh +Marshall-szigetek mh +Marshall-eyjar mh +Isole Marshall mh +米自由連åˆãƒžãƒ¼ã‚·ãƒ£ãƒ«è«¸å³¶ mh +កោះ Marshall mh +마샬 ì œë„ mh +ລາດສະອານາຈັàºà»„ທຠmh +Marshalo salos mh +MÄrÅ¡alu salas mh +Маршалови ОÑтрови mh +Маршаллын арлууд mh +Gżejjer Marshall mh +Marshalløyene mh +Marshallinseln mh +Marshall Eilanden mh +Marshalløyane mh +ਮਾਰਸ਼ਲ ਟਾਪੂ mh +Wyspy Marshalla mh +Ilhas Marshall mh +Ilhas Marshall mh +Insulele Marshall mh +Маршалловы оÑтрова mh +Ibirwa bya Marishali mh +Marshallsullot mh +Maršálove ostrovy mh +Marshallovi otoki mh +Маршалова оÑтрва mh +MarÅ¡alova ostrva mh +Marshallöarna mh +மாரà¯à®·à®²à¯ தீவà¯à®•ள௠mh +Ҷазираи Маршал mh +หมู่เà¸à¸²à¸°à¸¡à¸²à¹à¸Šà¸¥ mh +MarÅŸal Adaları mh +MarÅŸal Utrawları mh +МаршальÑькі оÑтрови mh +Маршалл Ороллари mh +Iyes Marshall mh +马ç»ç¾¤å²› mh +馬紹爾群島 mh +Macedonia mk +Makedoniese mk +مقدونيا mk +Makedonya mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk +মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ mk +Makedonia mk +Makedonija mk +Macedònia mk +Makedonie mk +Makedonien mk +Makedonien mk +Σλαβομακεδονία mk +Makedonujo mk +Makedoonia mk +Mazedonia mk +مقدونیه mk +Makedonia mk +Macédoine mk +Macedonië mk +An Mhacadóin (IPIM) mk +Macedónia mk +מקדוניה mk +मकदूनिया mk +Makedonija mk +Macedónia mk +Masedonia mk +Makedónía mk +マケドニア mk +ម៉ាសáŸážŠáž“ mk +마케ë„니아 mk +ມາເຊໂດເນີຠmk +Makedonija mk +MaÄ·edonija mk +Македонија mk +Макидон mk +MaÄ‹edonja mk +Makedonia mk +Makedonien mk +Macedonië mk +Makedonia mk +Macedònian mk +ਮੈਕਡੋਨੀਆ mk +Macedónia mk +Macedônia mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk +Masedoniya mk +Makedonia mk +Macedónsky mk +Makedonija mk +Македонија mk +Makedonija mk +I-Macedonia mk +Makedonien mk +மாசிடோ னியா mk +Мақдуниё mk +มาเซโดเนีย mk +Makedonya mk +Makedonia mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ñ–Ñ mk +ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ mk +Masedonia mk +Macedoneye mk +马其顿 mk +馬其頓 mk +Mali ml +مالي ml +Малі ml +Мали ml +মালি ml +Μαλί ml +Malio ml +مالی ml +Mailí ml +מ×לי ml +माली ml +Malí ml +マリ ml +ម៉ាលី ml +ë§ë¦¬ ml +ຈົດຫມາຠml +Мали ml +Мали ml +ਮਾਲੀ ml +Мали ml +Мали ml +மாலி ml +Молӣ ml +มาลี ml +Малі ml +Мали ml +马里 ml +馬利 ml +Myanmar mm +ميانمار mm +М'Ñнма mm +Мианмар mm +মিয়ানমার mm +Mjanmar mm +Mianmar mm +Burma mm +Burma (Myanmar) mm +ÎœÎ¹Î±Î½Î¼Î¬Ï mm +Mjanmao mm +Birmania mm +میانمار mm +Maenmar mm +מינמר mm +मà¥à¤¯à¤¨à¤®à¤¾à¤° mm +Mianmar mm +Mjanmar mm +ミャンマー mm +មីយ៉ាន់ម៉ា mm +미얀마 mm +ຕົວຮງàºàºžàºµàº·à»‰àº™àº—ີ່ທຳງານ - K mm +Mjanma mm +Мијанмар mm +МÑнмар mm +Mjanmar mm +Myanmar (Birma) mm +ਮਿਆਂਮਾਰ mm +Mianmar mm +МьÑнма (Бирма) mm +Mjanmar mm +Мијанмар mm +Mijanmar mm +மயனà¯à®®à®¾à®°à¯ mm +Миёнмор mm +เมียนมาร์ mm +Mianmar mm +М'Ñнма mm +МÑнмар mm +Miến Äiện mm +Birmaneye mm +缅甸 mm +緬甸 mm +Mongolia mn +Mongolië mn +منغوليا mn +ÐœÐ°Ð½Ð³Ð¾Ð»Ñ–Ñ mn +ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn +মোঙà§à¦—োলিয়া mn +Mongoli mn +Mongolija mn +Mongòlia mn +Mongolsko mn +Mongoliet mn +Mongolei mn +Μογγολία mn +Mongolio mn +Mongoolia mn +مغولستان mn +Mongolie mn +Mongolië mn +An Mhongóil mn +Mongólia mn +מונגוליה mn +मंगोलिया mn +Mongolija mn +Mongólia mn +Mongólía mn +モンゴル mn +ម៉ុងហ្គោលី mn +몽골 mn +ລອàºàº­àº´àº™ mn +Mongolija mn +Mongolija mn +Монголија mn +МОÐГОЛ mn +Mongolja mn +Mongolei mn +Mongolië mn +ਮੰਗੋਲੀਆ mn +Mongólia mn +Mongólia mn +ÐœÐ¾Ð½Ð³Ð¾Ð»Ð¸Ñ mn +Mongoliya mn +Mongolsko mn +Mongolija mn +Монголија mn +Mongolija mn +Mongoliet mn +மாஙà¯à®•ோலியா mn +МуғулиÑтон mn +มองโà¸à¹€à¸¥à¸µà¸¢ mn +MoÄŸolistan mn +MoÄŸolstan mn +ÐœÐ¾Ð½Ð³Ð¾Ð»Ñ–Ñ mn +МуғилиÑтон mn +Mông cổ mn +Mongoleye mn +è’™å¤ mn +è’™å¤ mn +Macau SAR(China) mo +Macau SAR (China) mo +Макао (Китай) mo +মাকাউ SAR(চীন) mo +Makav SAR(Sina) mo +Macau SAR(Xina) mo +Macau SAR (Čína) mo +Macau SAR(Kina) mo +Macao SAR (China) mo +Μακάο SAR (Κίνα) mo +Macau mo +Macau SAR(Txina) mo +Makao SAR(Kiina) mo +Macao SAR (Chine) mo +Macao SAR(An tSín) mo +מק×ו SAR (סין) mo +Makaó (Kína) mo +Makaó (sjálfstjórnarhérað í Kína) mo +Macau SAR(Cina) mo +マカオ(中国) mo +ម៉ាកាវ (áž…áž·áž“) mo +Macau SAR(Kinija) mo +Макао СÐР(Кина) mo +Macao SAR (Kina) mo +Macao mo +Macao SAR (Kina) mo +ਮੈਕਿਉ SAR(ਚੀਨ) mo +Makao SAR (Chiny) mo +Macau (China) mo +Macao SAR(China) mo +Макао mo +Makawu SAR (Ubushinwa) mo +Macau SAR (Kiinná) mo +Macau SAR (Kitajska) mo +SAR Macau (Кина) mo +SAR Macau (Kina) mo +Macao (Kina) mo +Macau SAR(சீனா) mo +มาเà¸à¹Šà¸² mo +Makau (Çin) mo +Macau SAR(Китай) mo +Макау (Хитой) mo +中国澳门特别行政区 mo +澳門 SAR(中國) mo +Martinique mq +مارتينيك mq +Мартыніка mq +Мартиника mq +মারà§à¦Ÿà¦¿à¦¨à¦¿à¦•à§ mq +Martinik mq +Martinik mq +Martinica mq +Martinik mq +Martin?c mq +ΜαÏτινίκα mq +Martiniko mq +Martinica mq +Martinika mq +مارتینیک mq +Martainíc mq +Martinica mq +מרטיניק mq +मारà¥à¤Ÿà¥€à¤¨à¥€à¤• mq +Martiník mq +Martinica mq +フランス海外県マルãƒãƒ‹ãƒ¼ã‚¯ mq +ម៉ារទីនីគ mq +ë§ˆë¥´í‹°ë‹ˆí¬ mq +ເມົາລິ mq +Martinika mq +Martinika mq +Мартиник mq +Мартиники mq +Martinik mq +ਮਾਰਟੀਨਿਕਿਉ mq +Martynika mq +Martinica mq +Martinica mq +Martinica mq +Мартиника mq +Maritinike mq +Martinik mq +Мартиник mq +Martinik mq +மாரà¯à®¤à®¿à®©à®¿à®•à¯à®¯à¯ mq +Мартиник mq +มาทินิค mq +Martinik mq +Martinik mq +Мартініка mq +Мартиника mq +Martinike mq +马æå°¼å…‹ mq +馬æå°¼å…‹ mq +Mauritania mr +Mauritanië mr +موريتانيا mr +ÐœÐ°ÑžÑ€Ñ‹Ñ‚Ð°Ð½Ñ–Ñ mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr +মরিটানিয়া mr +Maouritani mr +Mauritanija mr +Mauritània mr +Mauretánie mr +Mawritania mr +Mauretanien mr +Mauretanien mr +ΜαυÏιτανία mr +MaÅ­ritanujo mr +Mauritaania mr +موراتانی mr +Mauritanie mr +Mauritanië mr +An Mháratáin mr +Mauritánia mr +מ×וריטניה mr +मारीतानिया mr +Mauritanija mr +Mauritánia mr +Máritanía mr +モーリタニア mr +ម៉ូរីážáž¶áž“ី mr +모리타니 mr +ລິທົວເນີຠmr +Mauritanija mr +MauritÄnija mr +Мавританија mr +Мауритани mr +Mawritanja mr +Mauretanien mr +Mauritanië mr +ਮਾਉਰੀਟਨਿਆ mr +Mauretania mr +Mauritânia mr +Mauritânia mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr +Moritaniya mr +Mavretanija mr +Мауританија mr +Mauritanija mr +Mauretanien mr +மௌரிடானியா mr +Мавритонӣ mr +มอริทาเนีย mr +Mauritanya mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ñ–Ñ mr +ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ mr +Moritanreye mr +毛里塔尼亚 mr +茅利塔尼亞 mr +Montserrat ms +مونتسيرات ms +МонÑерат ms +মনà§à¦Ÿà¦¸à§‡à¦°à¦¾à¦Ÿ ms +Monsera ms +ΜοντσεÏάτ ms +Moncerato ms +مون‌سرات ms +Montsarat ms +מונטסרט ms +मॉटसेरट ms +Monserrat ms +英領モントセラト ms +ម៉ុងសáŸážšáŸ‰áž¶ ms +몬트세ë¼íЏ ms +ຈà»àºžàº²àºš ms +Monserata ms +МонÑерат ms +МонтÑеррат ms +ਮੋਨਟਸੀਰਾਟ ms +МонтÑеррат ms +Monserati ms +МонÑерат ms +Monserat ms +மானà¯à®Ÿà¯à®šà¯†à®°à¯à®°à®Ÿà¯ ms +МунтеÑирот ms +มอนต์เซอร์รัท ms +МонтÑеррат ms +Монцеррат ms +蒙特塞拉特 ms +蒙的塞拉特 ms +Malta mt +مالطة mt +Мальта mt +Малта mt +মলটা mt +Malt mt +Μάλτα mt +Malto mt +مالت mt +Malte mt +Málta mt +מלטה mt +मालà¥à¤Ÿà¤¾ mt +Málta mt +マルタ mt +ម៉ាល់ážáž¶ mt +몰타 mt +ມອລຕາ mt +Малта mt +Малта mt +ਮਾਲਟਾ mt +Мальта mt +Malita mt +Малта mt +I-Malta mt +மாலà¯à®Ÿà®¾ mt +Молет mt +มอลตา mt +Мальта mt +Малта mt +Male mt +马耳他 mt +馬爾他 mt +Mauritius mu +موريشيوس mu +Маўрыцы mu +ОÑтров Мавриций mu +মরিশাস mu +Mauris mu +Mauricijus mu +Maurici mu +Mauricius mu +Mawrisiws mu +ΜαυÏίκιος mu +MaÅ­ricio mu +Mauricio mu +Maurizio mu +موریتیس mu +ÃŽle Maurice mu +Oileán Mhuirís mu +Maurício mu +מ×וריציוס mu +मॉरीशस mu +Mauricijus mu +Máritíus mu +モーリシャス mu +ម៉ូរីទុស mu +모리셔스 mu +ພາທິຊັ້ນ mu +MaurÄ«cija mu +ÐœÐ°Ð²Ñ€Ð¸Ñ†Ð¸ÑƒÑ mu +ÐœÐ°Ð²Ñ€Ð¸Ñ‚ÑƒÑ mu +Mawriju mu +ਮਾਉਰੀਟਿਸ mu +Mauritânia mu +Ilhas Maurício mu +MauriÅ£ius mu +Маврикий mu +Ibirwa bya Morise mu +Maurícius mu +Mavricij mu +ÐœÐ°ÑƒÑ€Ð¸Ñ†Ð¸Ñ˜ÑƒÑ mu +Mauricijus mu +மௌரிடியஸ௠mu +Мавритӣ mu +มอริเชียส mu +Mauritus mu +Маврікій mu +Маврикий mu +Iye Môrice mu +毛里求斯 mu +毛里求斯 mu +Maldives mv +جزر المالدي٠mv +Мальдывы mv +МалдивÑки оÑтрови mv +মালদà§à¦¬à§€à¦ª mv +Inizi Maldiv mv +Maldivi mv +Maledivy mv +Ynysoedd y Mald?f mv +Maldiverne mv +Malediven mv +Μαλδίβες mv +Maldivoj mv +Maldivas mv +Maldiivid mv +Maldibak mv +مالدیو mv +Malediivit mv +Malediven mv +Na Maildiví mv +Maldivas mv +מולדבה mv +मालदीव mv +Maldivi mv +Maldív-szigetek mv +Maldíveyjar mv +Maldive mv +モルジブ mv +ម៉ាល់ឌីវ mv +몰디브 mv +ມັລດິສ mv +Maldyvai mv +Maldivu salas mv +Малдиви mv +Малдив mv +Maldivene mv +Malediven mv +Malediven mv +Maldivane mv +ਮਾਲਦੀਵ mv +Malediwy mv +Maldivas mv +Maldivas mv +Maldive mv +МальдивÑкие оÑтрова mv +Malidive mv +Maldiivat mv +Maldiv mv +Малдиви mv +Maldivi mv +Maldiverna mv +மாலà¯à®¤à¯€à®µà¯à®•ள௠mv +Молдивӣ mv +มัลดิฟ mv +Maldivler mv +Maldivlar mv +Мальдіви mv +Малдив Ороллари mv +马尔代夫 mv +馬爾地夫 mv +Malawi mw +مالاوي mw +Малаві mw +Малави mw +মালাওয়ি mw +Malavi mw +Μαλάουι mw +Malavio mw +مالاوی mw +An Mhaláiv mw +Malavi mw +מל×ווי mw +मलावी mw +Malavi mw +Malaví mw +マラウイ mw +ម៉ាឡាវី mw +ë§ë¼ìœ„ mw +ມອລຕາ mw +Malavi mw +Малави mw +Малави mw +ਮਾਲਾਵੀ mw +Малави mw +Малави mw +Malavi mw +மலவி mw +Моловӣ mw +มาลาวี mw +Malavi mw +Малаві mw +Малави mw +马拉维 mw +é¦¬æ‹‰å¨ mw +Mexico mx +Meksiko mx +المكسيك mx +Meksika mx +МÑкÑыка mx +МекÑико mx +মেকà§à¦¸à¦¿à¦•à§‹ mx +Mec'hiko mx +Meksiko mx +Mèxic mx +Mexiko mx +Mecsico mx +Mexiko mx +Μεξικό mx +Meksiko mx +México mx +Mehhiko mx +Mexiko mx +مکزیک mx +Meksiko mx +Meksiko mx +Mexique mx +Meicsiceo mx +México mx +מקסיקו mx +मेकà¥à¤¸à¤¿à¤•ो mx +Meksiko mx +Mexikó mx +Meksiko mx +Mexíkó mx +Messico mx +メキシコ mx +ម៉ិចស៊ិក mx +멕시코 mx +ເມັàºàºŠàºµà»‚ຠmx +Meksika mx +Meksika mx +МекÑико mx +МекÑико mx +Messiku mx +Mexiko mx +Mèxic mx +ਮੈਕਸਿਕੋ mx +Meksyk mx +México mx +México mx +Mexic mx +МекÑика mx +Megizike mx +Mexiko mx +Mehika mx +МекÑико mx +Meksiko mx +I-Mexico mx +மெகà¯à®šà®¿à®•ோ mx +МекÑико mx +เม็à¸à¸‹à¸´à¹‚ภmx +Meksika mx +Meksiko mx +МекÑика mx +МекÑика mx +Mê hi cô mx +Mecsike mx +墨西哥 mx +墨西哥 mx +Malaysia my +Malysië my +ماليزيا my +ÐœÐ°Ð»Ð°Ð¹Ð·Ñ‹Ñ my +ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my +মালয়েশিয়া my +Malezia my +Malezija my +Malàsia my +Malajsie my +Maleisia my +Μαλαισία my +Malajzio my +Malasia my +Malaisia my +Malasia my +مالزی my +Malesia my +Malaisie my +Maleisië my +An Mhalaeisia my +Malásia my +מלזיה my +मलेशिया my +Malezija my +Malajzia my +Malasía my +マレーシア my +ម៉ាឡáŸážŸáŸŠáž¸ my +ë§ë ˆì´ì‹œì•„ my +ມອລຕາ my +Malaizija my +Malaizija my +Малезија my +Малайз my +Malażja my +Maleisië my +ਮਲੇਸ਼ੀਆ my +Malezja my +Malásia my +Malásia my +Malaezia my +ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my +Maleziya my +Malajzia my +Malezija my +Малезија my +Malezija my +மலேசியா my +Малайзӣ my +มาเลเซีย my +Malezya my +ÐœÐ°Ð»Ð°Ð¹Ð·Ñ–Ñ my +ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ my +Malaizeye my +马æ¥è¥¿äºš my +馬來西亞 my +Mozambique mz +Mosambiek mz +موزمبيق mz +Мазамбік mz +Мозамбик mz +মোজামবিক mz +Mozambik mz +Mozambik mz +Moçambic mz +Mozambik mz +Mosamb?c mz +Μοζαμβίκη mz +Mozambiko mz +Mosambiik mz +Mozanbike mz +موزامبیک mz +Mosambik mz +Mósaimbíc mz +מוזמביק mz +मोज़ामà¥à¤¬à¥€à¤• mz +Mozambik mz +Mozambik mz +Mósambík mz +Mozambico mz +モザンビーク mz +ម៉ូហ្សាំប៊ិក mz +ëª¨ìž ë¹„í¬ mz +ຫນ່ວàºàº„ວາມຈຳ mz +Mozambikas mz +Mozambika mz +Мозамбик mz +Мозамбайк mz +Możambik mz +Mosambik mz +Mosambik mz +Mosambik mz +ਮੋਜ਼ਾਨਬਿਕਿਉ mz +Mozambik mz +Moçambique mz +Moçambique mz +Mozambic mz +Мозамбик mz +Mosambik mz +Mozambik mz +Mozambik mz +Мозамбик mz +Mozambik mz +Moçambique mz +மோசாமà¯à®ªà®¿à®•௠mz +Мозамбик mz +โมà¹à¸‹à¸¡à¸šà¸´à¸ mz +Mozambik mz +Mozambik mz +Мозамбік mz +Мозамбик mz +Mozambike mz +莫桑比克 mz +莫三比克 mz +Namibia na +Namibië na +ناميبيا na +ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na +ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na +নামিবিয়া na +Namibi na +Namibija na +Namíbia na +Namíbie na +Îαμίμπια na +Namibio na +Namiibia na +نامیبیا na +Namibie na +Namibië na +An Namaib na +Namíbia na +נמיביה na +नामीबिया na +Namibija na +Namíbia na +Namibía na +ナミビア na +ណាមីប៊ី na +나미비아 na +ຈາໄມàºàº² na +Namibija na +NamÄ«bija na +Ðамибија na +Ðамиби na +Namibja na +Namibië na +ਨਾਮੀਬੀਆ na +Namíbia na +Namíbia na +ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na +Namibiya na +Namíbia na +Namibija na +Ðамибија na +Namibija na +நாமிபியா na +Ðамибиё na +นามิเบีย na +Namibya na +ÐÐ°Ð¼Ñ–Ð±Ñ–Ñ na +ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ na +Namibeye na +纳米比亚 na +那米比亞 na +New Caledonia nc +Nuwe Caledonië nc +كاليدونيا الجديدة nc +ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc +Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc +নিউ কà§à¦¯à¦¾à¦²à¦¿à¦¡à§‹à¦¨à¦¿à§Ÿà¦¾ nc +Kaledoni-nevez nc +Nova Kaledonija nc +Nova Caledònia nc +Nová Kaledonie nc +Caledonia Newydd nc +Ny Caledonien nc +Neukaledonien nc +Îέα Καληδονία nc +Nov-Kaledonio nc +Nueva Caledonia nc +Uus-Kaledoonia nc +Kaledonia Berria nc +کالدونیا نو nc +Uusi-Kaledonia nc +Nouvelle Calédonie nc +Nij Caledonië nc +An Nua-Chaladóin nc +Nova Caledónia nc +קלדוניה החדשה nc +नà¥à¤¯à¥‚ केलेदूनिया nc +Nova Kaledonija nc +Új-Kaledónia nc +Nýja-Kaledónía nc +Nuova Caledonia nc +ニューカレドニア nc +នូវែលកាលáŸážŠáž¼áž“ី nc +뉴 칼레ë„니아 nc +ມາເຊໂດເນີຠnc +Naujoji Kaledonija nc +Jaunkaledonija nc +Ðова Каледонија nc +Ð¨Ð¸Ð½Ñ ÐºÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸ nc +Kaledonja Ä dida nc +Ny-Caledonia nc +Nieg Kaledonien nc +Nieuw Caledonië nc +Ny-Caledonia nc +ਨਵਾਂ ਕਾਲੀਡੋਨਾ nc +Nowa Kaledonia nc +Nova Caledónia nc +Nova Caledônia nc +Noua Caledonie nc +ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc +Kaledoniya nc +Ođđa Kaledonia nc +Nová Kaledónia nc +Nova Kaledonija nc +Ðова Каледонија nc +Nova Kaledonija nc +Nya Caledonien nc +நியூ கலடோனியா nc +КаледониÑи Ðав nc +นิวคาเลโดเนีย nc +Yeni Kaledonya nc +Yaña Kaledonia nc +Ðова ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ nc +Янги ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ nc +Nouve Caledonreye nc +新喀里多尼亚 nc +新喀里多尼亞 nc +Niger ne +النيجر ne +Ðігер ne +Ðигер ne +নাইজের ne +Nijer ne +Níger ne +ÎίγηÏας ne +NiÄero ne +نیجر ne +Nigeria ne +An Nígir ne +Níxer ne +× ×™×’'ר ne +निगर ne +Níger ne +ニジェール ne +នីហ្សáŸážš ne +니제르 ne +ຕົວຮງàºàºžàº·à»‰àº™àº—ີ່ທຳງານ ne +NigÄ“ra ne +Ðигер ne +Ðигер ne +NiÄ¡er ne +ਨਿਜੀਰ ne +Nigéria ne +Nigéria ne +Ðигер ne +Nijeri ne +Nigéria ne +Ðигер ne +நிஜர௠ne +Ðигерӣ ne +ไนเจอร์ ne +Nijerya ne +Ðігер ne +Ðигер ne +Nidjer ne +尼日尔 ne +尼日 ne +Norfolk Island nf +Norfolk Eiland nf +جزيرة نورÙولك nf +Ðорфалк nf +ОÑтров Ðорфолк nf +নরফোক দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ nf +Enez Norfolk nf +Norfolk ostrvo nf +Illa Norfolk nf +Ynys Norffolc nf +Norfolk-øerne (Australien) nf +Norfolk-Insel nf +Îήσος ÎÏŒÏφοκ nf +Norfolkinsulo nf +Isla Norfolk nf +Norfolki saar nf +Norfok Irla nf +جزایر نورÙولک nf +Norfolkinsaari nf +ÃŽle Norfolk nf +Norfolk Eilân nf +Oileán Norfolc nf +Illa Norfolk nf +××™×™ נורפולק nf +नॉरफाक आइलैंड nf +Otok Norfolk nf +Norfolk-szigetek nf +Norfolkeyja nf +Isola Norfolk nf +オーストラリア領ノーフォーク諸島 nf +កោះ Norfolk nf +ë…¸í¬í¬ ì œë„ nf +ໂປà»àº¥àº™ nf +Norfolko sala nf +Norfolka nf +Ðорфолшки ОÑтров nf +Norfolk арлууд nf +Gżira ta' Norfolk nf +Norfolkøya nf +Norfolkinsel nf +Norfolk Eiland nf +Norfolkøya nf +ਨੋਰਫੋਲਕ ਟਾਪੂ nf +Wyspy Norfolk nf +Ilha Norfolk nf +Ilhas Norfolk nf +Insulele Norfolk nf +ОÑтров Ðорфолк nf +Ikirwa cya Norufolika nf +Norfolksuolu nf +Ostrov Norfolk nf +Otok Norfolk nf +Ðорфолкшко оÑтрво nf +NorfolkÅ¡ko ostrvo nf +Norfolkön nf +நாரà¯à®ªà¯‹à®•௠தீவ௠nf +Ҷазираи Ðурфолк nf +เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¸Ÿà¸­à¸¥à¹Œà¸„ nf +Norfolk Adaları nf +Norfolk Utrawları nf +ОÑтрів Ðорфолк nf +Ðорфолк Ороли nf +Iye di Norfolk nf +诺ç¦å…‹å²› nf +諾ç¦å…‹å³¶ nf +Nigeria ng +Nigerië ng +نيجيريا ng +ÐÑ–Ð³ÐµÑ€Ñ‹Ñ ng +ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng +নাইজেরিয়া ng +Nijeria ng +Nigerija ng +Nigèria ng +Nigérie ng +ÎιγηÏία ng +NiÄerio ng +Nigeeria ng +نیجریه ng +Nigéria ng +An Nigéir ng +Nixéria ng +ניגריה ng +नाइजीरिया ng +Nigerija ng +Nigéria ng +Nígería ng +ナイジェリア ng +នីហ្សáŸážšáž¸áž™áŸ‰áž¶ ng +나ì´ì§€ë¦¬ì•„ ng +ບັນà»àºà»€àº¥àºµàº ng +Nigerija ng +NigÄ“rija ng +Ðигерија ng +Ðигери ng +NiÄ¡erja ng +ਨੀਜੀਰਿਆ ng +Nigéria ng +Nigéria ng +ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng +Nigeriya ng +Nigéria ng +Nigerija ng +Ðигерија ng +Nigerija ng +நிஜேரியா ng +Ðигерӣ ng +ไนจีเรีย ng +Nijerya ng +ÐÑ–Ð³ÐµÑ€Ñ–Ñ ng +ÐÐ¸Ð³ÐµÑ€Ð¸Ñ ng +Nidjeria ng +尼日利亚 ng +奈åŠåˆ©äºž ng +Nicaragua ni +Nikaragua ni +نيكاراغوا ni +Ðікарагуа ni +Ðикарагуа ni +নিকারাগà§à§Ÿà¦¾ ni +Nikwaraga ni +Nikaragva ni +Nikaragua ni +Nicaragwa ni +ÎικαÏάγουα ni +Nikaragvo ni +Nikaraagua ni +Nikaragua ni +نیکاراگویه ni +Nikaragua ni +Nikaragua ni +Nicearagua ni +ניקרגווה ni +निकारागà¥à¤† ni +Nikaragva ni +Níkaragva ni +ニカラグア ni +នីការ៉ាហ្គáŸážš ni +니카ë¼ê³¼ ni +ປາລາàºàºàº§àº ni +Nikaragva ni +Nikaragva ni +Ðикарагва ni +Ðикрагуа ni +Nikaragwa ni +ਨਿਕਾਰਗà©à¨† ni +Nikaragua ni +Nicarágua ni +Nicarágua ni +Ðикарагуа ni +Nikaragwa ni +Nikaragua ni +Nikaragva ni +Ðикарагва ni +Nikaragva ni +I-Nicaragua ni +நிகராகà¯à®µà¯‡ ni +Ðикарагуа ni +นิคาราà¸à¸±à¸§ ni +Nikaragua ni +Nikaragua ni +Ðікарагуа ni +Ðикарагуа ni +Nicaragwa ni +尼加拉瓜 ni +尼加拉瓜 ni +Netherlands nl +Nederland nl +هولندا nl +Hollandiya nl +ГалÑÐ½Ð´Ñ‹Ñ nl +Ð¥Ð¾Ð»Ð°Ð½Ð´Ð¸Ñ nl +হলà§à¦¯à¦¾à¦£à§à¦¡ nl +Izelvroioù nl +Nizozemska nl +Holanda nl +Nizozemí nl +Yr Iseldiroedd nl +Holland nl +Niederlande nl +Κάτω ΧώÏες nl +Nederlando nl +Países Bajos nl +Holland nl +Holanda nl +هلند nl +Alankomaat nl +Háland nl +Pays bas nl +Nederlân nl +An Ãsiltír nl +Países Baixos nl +הולנד nl +नीदरलैंडà¥à¤¸ nl +Nizozemska nl +Hollandia nl +Belanda nl +Holland nl +Paesi Bassi nl +オランダ nl +ហុល្លង់ nl +네ëœëž€ë“œ nl +ເນເທີà»àº¥àº™à¹Œ nl +Olandija nl +NÄ«derlande nl +Холандија nl +Ðедерланд nl +Nederland nl +Nedderlanne nl +Nederland nl +Nederland nl +Holanda nl +ਨੀਂਦਰਲੈਂਡ nl +Holandia nl +Holanda nl +Holanda nl +Olanda nl +Ðидерланды nl +Ubuholandi nl +Hollánda nl +Holandsko nl +Nizozemska nl +Холандија nl +Holandija nl +I-Netherlands nl +Nederländerna nl +நெதரà¯à®²à®¾à®¨à¯à®¤à¯ nl +Ҳуланд nl +เนเธอร์à¹à¸¥à¸™à¸”์ nl +Hollanda nl +Niderlandlar nl +Ð“Ð¾Ð»Ð»Ð°Ð½Ð´Ñ–Ñ nl +Ðидерландлар nl +Hà Lan nl +Bas Payis nl +è·å…° nl +è·è˜­ nl +Norway no +Noorweë no +النرويج no +Norveç no +ÐарвÑÐ³Ñ–Ñ no +ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no +নরওয়ে no +Norvegia no +NorveÅ¡ka no +Noruega no +Norsko no +Norwy no +Norge no +Norwegen no +ÎοÏβηγία no +Norvegio no +Noruega no +Norra no +Norvegia no +نروژ no +Norja no +Norra no +Norvège no +Noorwegen no +An Iorua no +Noruega no +נורבגיה no +नारà¥à¤µà¥‡ no +NorveÅ¡ka no +Norvégia no +Norwegia no +Noregur no +Norvegia no +ノルウェー no +áž“áŸážšážœáŸ‚ស no +ë…¸ë¥´ì›¨ì´ no +ນà»à»€àº§ no +Norvegija no +Norvēģija no +Ðорвешка no +Ðорвеги no +NorveÄ¡ja no +Norge no +Norwegen no +Noorwegen no +Noreg no +Noruega no +ਨਾਰਵੇ no +Norwegia no +Noruega no +Noruega no +Norvegia no +ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no +Noruveje no +Norga no +Nórsko no +NorveÅ¡ka no +Ðорвешка no +NorveÅ¡ka no +I-Norway no +Norge no +நாரà¯à®µà¯‡ no +Ðорвегӣ no +นอร์เวย์ no +Norveç no +ÐÐ¾Ñ€Ð²ÐµÐ³Ñ–Ñ no +ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ no +Na uy no +Norvedje no +æŒªå¨ no +æŒªå¨ no +Nepal np +نيبال np +ÐÑпал np +Ðепал np +নেপাল np +Nepál np +Îεπάλ np +Nepalo np +نپال np +Népal np +Neipeal np +נפ×ל np +नेपाल np +Nepál np +ãƒãƒ‘ール np +áž“áŸáž”៉ាល់ np +네팔 np +ເວນດາ np +Nepalas np +NepÄla np +Ðепал np +Ðепал np +ਨੇਪਾਲ np +Ðепал np +Nepali np +Ðепал np +நேபாளம௠np +Ðипол np +เนปาล np +Ðепал np +Ðепал np +尼泊尔 np +尼泊爾 np +Nauru nr +ناورو nr +Ðауру nr +Ðауру nr +নাউরৠnr +Naurueg nr +Nawrw nr +ÎαουÏÎ¿Ï nr +NaÅ­ro nr +Naurú nr +نائورو nr +Naurusaaret nr +Nárúis nr +× ×ורו nr +नौरू nr +Naurski nr +Nárú nr +ナウル nr +ណូរូ nr +나우루 nr +ປາລາàºàºàº§àº nr +Ðауру nr +Ðауру nr +Nawru nr +ਨਾਉਰੂ nr +Ðауру nr +Ikinawuru nr +Ðауру nr +நௌர௠nr +Ðауру nr +นาวรู nr +Ðауру nr +Ðауру nr +Nawouro nr +ç‘™é² nr +諾魯 nr +Niue nu +Nieu nu +نيوي nu +ÐÑ–ÑžÑ nu +Ðиуе nu +নিউই nu +Niwe nu +ÎιοÏε nu +Niuo nu +نیئو nu +ניווה nu +नियू nu +ニュージーランド自治領ニウエ nu +នីវ nu +ë‹ˆìš°ì— nu +ເນ໊ຕ nu +Ðије nu +Ðиуе nu +Niwe nu +ਨੀਉਈ nu +Ðиуе nu +Ðиуе nu +நீய௠nu +Ðиу nu +นิอุเอ nu +Nive nu +Niu nu +Ðіуе nu +Ðиуе nu +Niuwé nu +纽埃 nu +ç´é„‚å³¶ nu +New Zealand nz +Nuwe Seeland nz +نيوزيلاندا nz +Yeni Zellandiya nz +ÐÐ¾Ð²Ð°Ñ Ð—ÑлÑÐ½Ð´Ñ‹Ñ nz +Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz +নিউজিলà§à¦¯à¦¾à¦£à§à¦¡ nz +Zeland nevez nz +Novi Zeland nz +Nova Zelanda nz +Nový Zéland nz +Seland Newydd nz +Neuseeland nz +Îέα Ζηλανδία nz +Nov-Zelando nz +Nueva Zelanda nz +Uus-Meremaa nz +Zelanda Berria nz +زلاندنو nz +Uusi-Seelanti nz +Nýsæland nz +Nouvelle Zélande nz +Nij Seelân nz +An Nua-Shéalainn nz +Nova Celándia nz +ניו זילנד nz +नà¥à¤¯à¥‚जीलैंड nz +Novi Zeland nz +Új-Zéland nz +Selandia Baru nz +Nýja-Sjáland nz +Nuova Zelanda nz +ニュージーランド nz +នូវែលហ្សáŸáž¡áž„់ nz +뉴질랜드 nz +ນີວຊີà»àº¥àº™ nz +Naujoji Zelandija nz +JaunZÄ“lande nz +Ðов Зеланд nz +Ð¨Ð¸Ð½Ñ Ð·ÐµÐ°Ð»Ð°Ð½Ð´ nz +Nieg Seeland nz +Nieuw Zeeland nz +Navera Zelanda nz +ਨਿਊਜ਼ੀਲੈਂਡ nz +Nowa Zelandia nz +Nova Zelândia nz +Nova Zelândia nz +Noua Zeelandă nz +ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz +Nuveli Zelande nz +Ođđa Zealánda nz +Nový Zéland nz +Nova Zelandija nz +Ðови Зеланд nz +Novi Zeland nz +I-New Zealand nz +Nya Zeeland nz +நியூசிலாநà¯à®¤à¯ nz +Зилонди Ðав nz +นิวซีà¹à¸¥à¸™à¸”์ nz +Yeni Zelanda nz +Yaña Zealand nz +Ðова Ð—ÐµÐ»Ð°Ð½Ð´Ñ–Ñ nz +Янги Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ nz +Nouve Zelande nz +新西兰 nz +ç´è¥¿è˜­ nz +Oman om +عÙمان om +Ðман om +Оман om +ওমান om +Omán om +Ομάν om +Omano om +Omán om +Omaan om +عمان om +Omán om +עומן om +ओमन om +Omán om +Óman om +オマーン om +អូម៉ង់ om +오만 om +ເàºàºµàºàº¥àº°àº¡àº±àº™ om +Omanas om +OmÄna om +Оман om +Оман om +ਓਮਾਨ om +Omã om +Omã om +Оман om +Omani om +Omán om +Оман om +I-Oman om +ஓமன௠om +Оман om +โอมาน om +Umman om +Оман om +Уммон om + Oman om +阿曼 om +阿曼 om +Panama pa +بنما pa +Панама pa +Панама pa +পানামা pa +Panamà pa +Παναμάς pa +Panamo pa +Panamá pa +پاناما pa +Panamá pa +פנמה pa +पनामा pa +パナマ pa +ប៉ាណាម៉ា pa +파나마 pa +ປານາມາ pa +Панама pa +Панама pa +ਪੈਨਾਮਾ pa +Panamá pa +Panamá pa +Панама pa +Панама pa +I-Panama pa +பனாமா pa +Панама pa +ปานามา pa +Панама pa +Панама pa +巴拿马 pa +巴拿馬 pa +Peru pe +البيرو pe +ПÑру pe +Перу pe +পেরৠpe +Perou pe +Perú pe +Periw pe +ΠεÏÎ¿Ï pe +Peruo pe +Perú pe +Peruu pe +پرو pe +Pérou pe +Peiriú pe +Perú pe +פרו pe +पेरू pe +Perú pe +Perù pe +ペルー pe +ប៉áŸážšáž¼ pe +페루 pe +ເປລູ pe +Перу pe +Перу pe +Pero pe +ਪੇਰੂ pe +Перу pe +Перу pe +I-Peru pe +பெர௠pe +Перу pe +เปรู pe +Перу pe +Перу pe +Perou pe +ç§˜é² pe +秘魯 pe +French Polynesia pf +Fraans Polynesië pf +بولينيزيا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© pf +ФранцуÑÐºÐ°Ñ ÐŸÐ°Ð»Ñ–Ð½ÑÐ·Ñ–Ñ pf +ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf +ফরাসী পলিনেশিয়া pf +Polinezi galleg pf +Francuska Polinezija pf +Polinèsia francessa pf +Francouzská Polynésie pf +Polynesia Ffrengig pf +Fransk Polynesien pf +Französisch Polynesien pf +Γαλλική Πολυνησία pf +Franca Polinezio pf +Polinesia francesa pf +Prantsuse Polüneesia pf +Polinesia Frantziarra pf +پولونزی ÙØ±Ø§Ù†Ø³Ù‡ pf +Ranskan Polynesia pf +Polynésie française pf +Frânsk Polinesië pf +Polainéis na Fraince pf +Polinésia Francesa pf +פולינזיה הצרפתית pf +फà¥à¤°à¥‡à¤‚च पॉलीनेसिया pf +Francuska Polinezija pf +Francia-Polinézia pf +Franska Pólýnesía pf +Polinesia Francese pf +フランス領ãƒãƒªãƒã‚·ã‚¢ pf +ប៉ូលីនáŸážŸáŸŠáž¸â€‹áž”ារាំង pf +프랑스령 í´ë¦¬ë„¤ì‹œì•„ pf +àºàº£àº±à»ˆàº‡à»€àºªàº” pf +PrancÅ«zų Polinezija pf +FranÄu PolinÄ“zija pf +ФранцуÑка Полинезија pf +Франц полинеÑи pf +Polineżja FranÄ‹iża pf +Fransk Polynesia pf +Franzöösch Polynesien pf +Frans Polinesië pf +Fransk Polynesia pf +ਫਰੈਂਚ ਪੋਲੀਂਸੀਆ pf +Polinezja Francuska pf +Polinésia Francesa pf +Polinésia Francesa pf +Polinezia Franceză pf +ФранцузÑÐºÐ°Ñ ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf +Polinesiya Mfaransa pf +FránskkalaÅ¡ Polynesia pf +Francúzska Polynézia pf +Francoska Polinezija pf +ФранцуÑка Полинезија pf +Francuska Polinezija pf +Franska Polynesien pf +பிரனà¯à®šà¯ போலினேசியா pf +ПулинезиÑи ФаронÑа pf +à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¹‚พลีนีเซีย pf +Fransız Polinezyası pf +Frans Polinesia pf +Французька ÐŸÐ¾Ð»Ñ–Ð½ÐµÐ·Ñ–Ñ pf +Француз ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ pf +Polynesia thuá»™c Pháp pf +Polinezeye francesse pf +法属波利尼西亚 pf +法屬波利尼西亞 pf +Papua New Guinea pg +بابوا غينيا الجديدة pg +Papua Yeni Gvineya pg +Папуа–ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ñ–Ð½ÑÑ pg +Папуа Ðова Ð“Ð²Ð¸Ð½ÐµÑ pg +পাপà§à§Ÿà¦¾ নিউ গিনি pg +Papouazi Gine Nevez pg +Papua Nova Gvineja pg +Papua Nova Guinea pg +Papua - Nová Guinea pg +Papwa Gini Newydd pg +Papua Neu-Guinea pg +ΠαποÏα Îέα Γουινέα pg +Papuo-Nov-Gvineo pg +Papua Nueva Guinea pg +Paapua Uus-Guinea pg +Papua Ginea Berria pg +پاپوا گینه نو pg +Papua-Uusi-Guinea pg +Papouasie-Nouvelle-Guinée pg +Papua Nij Guinea pg +Nua-Ghuine Phapua pg +Papúa Nova Guiné pg +פפו××” ניו ×’×™× ×™ pg +पापà¥à¤† नà¥à¤¯à¥‚ गियाना pg +Papua Nova Gvineja pg +Pápua Új-Guinea pg +Papúa Nýja-Gínea pg +Papua Nuova Guinea pg +パプアニューギニア pg +ប៉ាពូញូវហ្គីណ០pg +파푸아뉴기니 pg +ເທົາອ່ອນ pg +Papua Naujoji GvinÄ—ja pg +Papua Jaungvineja pg +Папуа Ðова Гвинеја pg +Папуа ÑˆÐ¸Ð½Ñ Ð“ÑƒÐ¹Ð½ÐµÐ° pg +Papwa Ginea pg +Papua Ny-Guinea pg +Papua-Niegguinea pg +Papua Ny-Guinea pg +ਪਾਪੂਆ ਨਵਾਂ ਗੂਈਆ pg +Papua Nowa Gwinea pg +Papua Nova Guiné pg +Papua Nova Guiné pg +Papua Noua Guinee pg +Папуа-ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ pg +Papuwa Gineya Nshya pg +Papua Ođđa-Guinea pg +Papua Nová Guinea pg +Papua Nova Gvineja pg +Папуа Ðова Гвинеја pg +Papua Nova Gvineja pg +Papua Nya Guinea pg +பாபà¯à®ªà®¾ நியூ ஜினியா pg +Папуа ГвинеиÑи Ðав pg +ปาปัวนิวà¸à¸´à¸™à¸µ pg +Papua Yeni Gine pg +Papua Yaña Guinea pg +Папуа Ðова Ð“Ð²Ñ–Ð½ÐµÑ pg +Папуа Янги Ð“Ð²Ð¸Ð½ÐµÑ pg +Papouwazeye Nouve Guinêye pg +巴布亚新几内亚 pg +巴布ç´å¹¾å…§äºž pg +Philippines ph +Fillipyne ph +الÙلبين ph +FillipinlÉ™r ph +Філіпіны ph +Филипини ph +ফিলিপিনস ph +Filipin ph +Filipini ph +Filipines ph +Filipíny ph +Ynysoedd Y Philipinau ph +Filippinerne ph +Philippinen ph +Φιλιππίνες ph +Filipinoj ph +Filipinas ph +Filipiinid ph +Filipinak ph +Ùیلیپین ph +Filippiinit ph +Filippijnen ph +Na hOileáin Fhilipíneacha ph +Filipinas ph +×¤×™×œ×™×¤×™× ×™× ph +फिलिपà¥à¤ªà¥€à¤¨à¥à¤¸ ph +Filipini ph +Fülöp-szigetek ph +Filippseyjar ph +Filippine ph +フィリピン ph +ហ្វ៊ីលីពីន ph +필리핀 ph +ອາລະປະໂຫàºàº” ph +Filipinai ph +FilipÄ«nas ph +Филипини ph +Плиппин ph +Filippini ph +Filippinene ph +Philippinen ph +Filippijnen ph +Filippinane ph +ਫਿਲੀਪੀਨਜ਼ ph +Filipiny ph +Filipinas ph +Filipinas ph +Filipine ph +Филиппины ph +Filipine ph +Filippiinat ph +Filipíny ph +Filipini ph +Филипини ph +Filipini ph +Filippinerna ph +பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯ ph +Филипин ph +ฟิลิปปินส์ ph +Filipinler ph +Filippinnär ph +Філіппіни ph +Филиппин ph +Filipenes ph +è²å¾‹å®¾ ph +è²å¾‹è³“ ph +Pakistan pk +باكستان pk +ПакіÑтан pk +ПакиÑтан pk +পাকিসà§à¦¤à¦¾à¦¨ pk +Paquistà pk +Pákistán pk +Pacistan pk +Πακιστάν pk +Pakistano pk +پاکستان pk +An Phacastáin pk +Paquistán pk +פ×קיסטן pk +पाकिसà¥à¤¤à¤¾à¤¨ pk +Pakisztán pk +パキスタン pk +ប៉ាគីស្ážáž¶áž“ pk +파키스탄 pk +ລງບ pk +Pakistanas pk +PakistÄna pk +ПакиÑтан pk +ПакиÑтан pk +ਪਾਕਿਸਤਾਨ pk +Paquistão pk +Paquistão pk +ПакиÑтан pk +Pakisitani pk +ПакиÑтан pk +பாகிஸà¯à®¤à®¾à®©à¯ pk +ПокиÑтон pk +ปาà¸à¸µà¸ªà¸–าน pk +Päqstan pk +ПакиÑтан pk +ПокиÑтон pk +å·´åŸºæ–¯å¦ pk +å·´åŸºæ–¯å¦ pk +Poland pl +بولندا pl +PolÅŸa pl +Польшча pl +Полша pl +পোলà§à¦¯à¦¾à¦£à§à¦¡ pl +Polonia pl +Poljska pl +Polònia pl +Polsko pl +Gwlad Pwyl pl +Polen pl +Polen pl +Πολωνία pl +Pollando pl +Polonia pl +Poola pl +Polonia pl +لهستان pl +Puola pl +Pólland pl +Pologne pl +Polen pl +An Pholainn pl +Polónia pl +פולין pl +पोलैंड pl +Poljska pl +Lengyelország pl +Polandia pl +Pólland pl +Polonia pl +ãƒãƒ¼ãƒ©ãƒ³ãƒ‰ pl +ប៉ូឡូញ pl +í´ëž€ë“œ pl +ໂປà»àº¥àº™ pl +Lenkija pl +Polija pl +ПолÑка pl +Польш pl +Polonja pl +Polen pl +Polen pl +Polen pl +Polen pl +Polònia pl +ਪੋਲੈਂਡ pl +Polska pl +Polónia pl +Polônia pl +Polonia pl +Польша pl +Polonye pl +Polska pl +Poľsko pl +Poljska pl +ПољÑка pl +Poljska pl +I-Poland pl +Polen pl +போலாநà¯à®¤à¯ pl +ÐŸÐ¾Ð»Ð°Ð½Ð´Ð¸Ñ pl +โปà¹à¸¥à¸™à¸”์ pl +Polonya pl +Polonia, PolÅŸa pl +Польща pl +Полша pl +Pholandi pl +Ba Lan pl +Pologne pl +波兰 pl +波蘭 pl +Saint Pierre and Miquelon pm +St Pierre en Miquelon pm +سانت بيير Ùˆ ميكيلون pm +Saint Pierre vÉ™ Miquelon pm +СÑн-П'ер Ñ– Мікелон pm +Св. Пиер и Магелан pm +সেনà§à¦Ÿ পিয়ের à¦à¦¬à¦‚ মিকেলন pm +Sant Per ha Mikelon pm +Sveti Pjer i Migelon pm +Saint Pierre i Miquelon pm +Saint Pierre a Miquelon pm +Ynysoedd Sant Pierre a Micwelon pm +Saint Pierre og Miquelon pm +Saint Pierre und Miquelon pm +Σαιν Î Î¹Î­Ï (Άγιος ΠέτÏος) και Μικελόν pm +Sent-Piero kaj Mikelono pm +Saint Pierre y Miquelon pm +Saint Pierre ja Miquelon pm +Saint Pierre eta Miquelon pm +سنت Ù¾ÛŒÙØ± Ùˆ میکولئون pm +Saint-Pierre ja Miquelon pm +Saint-Pierre-et-Miquelon pm +Saint Pierre en Miquelon pm +Peadar Naofa agus Micilín pm +Saint Pierre e Miquelon pm +ס×ן פייר ומיקלון pm +सेंट पियरे तथा मिकà¥à¤µà¥‡à¤²à¤¨ pm +Saint Pierre i Miquelon pm +Saint Pierre és Miquelon pm +Sankti Pierre og Miquelon pm +Saint Pierre e Miquelon pm +フランス海外領土サンピエールミクロン諸島 pm +세ì¸íЏ 피ì—르 미쿠엘론 pm +SenpjÄ“ra un Mikelona pm +Свети Пјер и Микелон pm +Сайнт пиерре ба микуелон pm +Saint Pierre u Miquelon pm +Saint-Pierre-et-Miquelon pm +Sankt Pierre un Miquelon pm +Saint Pierre en Miquelon pm +Saint-Pierre-et-Miquelon pm +ਸੇਂਟ ਪੀਈਰੀ ਤੇ ਮਾਕਿਉਲੋਨ pm +Saint Pierre i Miquelon pm +S. Pedro e Miquelão pm +Saint Pierre e Miquelon pm +Saint Pierre ÅŸi Miquelon pm +Сен-Пьер и Микелон pm +Mutagatifu Petero na Mikelo pm +Saint-Pierre-et-Miquelon pm +Saint Pierre a Miquelon pm +Sveti Pierre in Miquelon pm +Св. Пјер и Микелон pm +Sv. Pjer i Mikelon pm +Saint Pierre och Miquelon pm +செயினà¯à®Ÿà¯ பியரி மறà¯à®±à¯à®®à¯ மிகà¯à®¯à¯à®²à®©à¯ pm +Синт Пир Миколеюн pm +เซนต์ปิà¹à¸­à¸£à¹Œ à¹à¸¥à¸°à¸¡à¸´à¹€à¸„อลอน pm +Saint Pierre ve Miquelon pm +Saint Pierre wä Miquelon pm +Сент-П'єр Ñ– Мікелон pm +Сент-Пер ва Микелон pm +Sint Pire et Miquelon pm +圣皮埃尔和密克隆 pm +è–皮埃爾島åŠå¯†å…‹éš†å³¶ pm +Pitcairn pn +بيتكايرن pn +ПіткÑрн pn +ОÑтрови Питкерн pn +পিটকেম pn +Pitkern pn +Ynys Pitcairn pn +ΠίτκαιÏν pn +Pitkarna Insulo pn +پیت Ú©ÙØ±Ù† pn +פיטקרן pn +पिटकैरà¥à¤¨ pn +英領ピトケアン諸島 pn +í•케언 pn +ລງບ pn +PitkÄ“rna pn +Питкерн pn +Питкайрн pn +ਪੀਟਕਾਰਨ pn +Питкаирн pn +பிடà¯à®•ாயà¯à®©à¯ pn +Питкорин pn +เà¸à¸²à¸°à¸žà¸´à¸•à¹à¸„ร์น pn +Pitkairn pn +Питкерн pn +çš®ç‰¹å¼€æ© pn +匹特開æ©å³¶ pn +Puerto Rico pr +بورتوريكو pr +Puerto Riko pr +ПуÑрта Рыка pr +Порто Рико pr +পà§à§Ÿà§‡à¦°à§à¦¤à§‹ রিকো pr +Porto Rico pr +Portoriko pr +Portoriko pr +Pwerto Rico pr +ΠουέÏτο Ρίκο pr +Puerto-Riko pr +پورتوریکو pr +Porto Rico pr +Portó Ríce pr +Porto Rico pr +פורטו ריקו pr +पà¥à¤¯à¥‚रà¥à¤Ÿà¥‹ रिको pr +Portoriko pr +Púertó Ríkó pr +Portorico pr +プエルトリコ pr +áž–áŸážšážáž¼ážšáž¸áž€áž¼ pr +푸ì—르토리코 pr +ໂປຣໂຕຄອນ pr +Puerto Rikas pr +Puertoriko pr +Порто Рико pr +Пуерто Рико pr +ਰੂਇਰਟੂ ਰੀਕੋ pr +Porto Rico pr +Porto Rico pr +ПуÑрто-Рико pr +Porito Riko pr +Portoriko pr +Порторико pr +Portoriko pr +பà¯à®¯à¯à®°à¯à®Ÿà¯‹ ரிகோ pr +Пурто Рико pr +เปอร์โตริโภpr +Porta Riko pr +Puerto Riko pr +Пуерто-Ріко pr +ПуÑрто-Рико pr +Porto Rico pr +æ³¢å¤šé»Žå„ pr +æ³¢å¤šé»Žå„ pr +Palestinian Territory ps +Palesteinse Gebied ps +السلطة الÙلسطينية ps +FÉ™lÉ™stin SahÉ™si ps +ПалеÑтынÑÐºÐ°Ñ Ñ‚ÑÑ€Ñ‹Ñ‚Ð¾Ñ€Ñ‹Ñ ps +ПалеÑтина ps +পà§à¦¯à¦¾à¦²à§‡à¦¸à§à¦Ÿà¦¿à¦¨à¦¿à§Ÿà¦¾à¦¨ টেরিটরি ps +Palestinska teritorija ps +Territori Palestí ps +Palestinské území ps +Tiriogaeth Palesteina ps +Palæstinensiske selvstyreomrÃ¥der ps +Palästinensisches Gebiet ps +Παλαιστίνη ps +Palestina Teritorio ps +Territorio palestino ps +Palestiina ps +Palestina ps +Ùلسطین ps +Palestiinalaisalue ps +Palestinensiska økið ps +Territoire palestinien ps +Palestijnsk territorium ps +Críoch na bPalaistíneach ps +Território Palestino ps +×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™× ps +फिलीसà¥à¤¤à¥€à¤¨à¥€ टेरिटरी ps +Palestinski teritorij ps +Palesztin területek ps +Palestína ps +Palestina ps +パレスãƒãƒŠè‡ªæ²»åŒº ps +ប៉ាលáŸážŸáŸ’ទីន ps +íŒ”ë ˆìŠ¤íƒ€ì¸ ìžì¹˜êµ¬ ps +àºàº²àº™àºžàº´àº¡àºœàº´àº”ພາດ ps +Palestinos teritorija ps +PalestÄ«nieÅ¡u treitorija ps +ПалеÑтинÑки територии ps +ПалеÑтины газар нутаг ps +Palestina ps +Palestinske territorier ps +De palästinensche sülvenregeerte Regioon ps +Palestijns territorium ps +Palestinske territorium ps +Bohwa bja Palestina ps +ਫਲਾਸਤੀਨ ਖੇਤਰ ps +Palestyna ps +Território Palestiniano ps +Território Palestino ps +Teritoriul Palestinian ps +ПалеÑтинÑкие территории ps +Igihugu cya Palesitina ps +PalestiinnalaÅ¡ territoria ps +Palestínske územia ps +Palestinski teritorij ps +ПалеÑтина ps +Palestina ps +I-Palestinian Territory ps +Palestina ps +பாலஸà¯à®¤à¯€à®© ஆணையம௠ps +ФалаÑтин ps +เขตปà¸à¸„รองปาเลสไตน์ ps +Filistin Bölgesi ps +Fälestin ps +ПалеÑтинÑька Ñ‚ÐµÑ€Ð¸Ñ‚Ð¾Ñ€Ñ–Ñ ps +ФалаÑтин Ерлари ps +Mukano wa maphalesitina ps +Lãnh thổ cá»§a Palestine ps +Palestene ps +Umhlaba wePalestina ps +å·´å‹’æ–¯å¦åœ°åŒº ps +å·´å‹’æ–¯å¦é ˜åœ° ps +Indawo yama-Phalesitina ps +Portugal pt +البرتغال pt +Portuqaliya pt +ÐŸÐ°Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt +পোরà§à¦¤à§à¦—াল pt +Portugalsko pt +Portiwgal pt +ΠοÏτογαλία pt +Portugalo pt +پرتغال pt +Portugali pt +An Phortaingéil pt +פורטוגל pt +पà¥à¤°à¥à¤¤à¤—ाल pt +Portugália pt +Portúgal pt +Portogallo pt +ãƒãƒ«ãƒˆã‚¬ãƒ« pt +áž–áŸážšáž‘ុយហ្គាល់ pt +í¬ë¥´íˆ¬ê°ˆ pt +ໂປຣຕຸເàºàºª pt +Portugalija pt +PortugÄle pt +Португалија pt +Португал pt +Portugall pt +ਪà©à¨°à¨¤à¨—ਾਲ pt +Portugalia pt +Portugalia pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt +Poritigali pt +Portugalsko pt +Portugalska pt +Португал pt +I-Portugal pt +போரà¯à®¤à¯à®¤à¯à®•ல௠pt +Пуртуқол pt +โปรตุเà¸à¸ª pt +Portekiz pt +Portugalia pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ñ–Ñ pt +ÐŸÐ¾Ñ€Ñ‚ÑƒÐ³Ð°Ð»Ð¸Ñ pt +Bồ Äào Nha pt +è‘¡è„牙 pt +è‘¡è„牙 pt +Palau pw +بالاو pw +Палау pw +Палау pw +পালাউ pw +Palaw pw +Παλάου pw +Palao pw +پالائو pw +פל×ו pw +पलाऊ pw +Palá pw +パラオ pw +ប៉ាឡូ pw +팔ë¼ìš° pw +ມອລຕາ pw +Палау pw +Палау pw +ਪਾਲਾਉ pw +Палау pw +Palawu pw +Палау pw +பலாவ௠pw +Палау pw +เà¸à¸²à¸°à¸žà¸²à¹€à¸¥à¸² pw +Палау pw +Палау pw +Palawou pw +帕劳 pw +å¸›ç‰ pw +Paraguay py +Paraguaai py +باراغواي py +Paraqvay py +Парагвай py +Парагвай py +পà§à¦¯à¦¾à¦°à¦¾à¦—à§à§Ÿà§‡ py +Paragwae py +Paragvaj py +Paraguai py +Paragw?i py +ΠαÏαγουάη py +Paragvajo py +Paraguai py +پاراگویه py +Paragua py +Paraguai py +פרגו××™ py +पैरागà¥à¤ py +Paragvaj py +Paragvæ py +パラグアイ py +ប៉ារ៉ាហ្គាយ py +파ë¼ê³¼ì´ py +ປາລາàºàºàº§àº py +Paragvajus py +Paragvaja py +Парагвај py +Парагвай py +Paragwaj py +Paraguai py +ਪਾਰਾਗà©à¨† py +Paragwaj py +Paraguai py +Paraguai py +Paraguai py +Парагвай py +Paragwe py +Portugalsko py +Paragvaj py +Парагвај py +Paragvaj py +I-Paraguay py +பராகà¯à®µà¯‡ py +Порогвие py +ปาราà¸à¸§à¸±à¸¢ py +Парагвай py +Парагвай py +Paragway py +巴拉圭 py +巴拉圭 py +Qatar qa +قطر qa +Катар qa +Катар qa +কাতার qa +Kwatar qa +Katar qa +Katar qa +Catar qa +Katar qa +ÎšÎ±Ï„Î¬Ï qa +Kataro qa +Katar qa +قطر qa +Katar qa +Catar qa +קטר qa +क़तर qa +Katar qa +Katar qa +Katar qa +カタール qa +កាážáž¶ážš qa +카타르 qa +ມອລຕາ qa +Kataras qa +Katara qa +Катар qa +Катар qa +Katar qa +ਕਤਰ qa +Katar qa +Катар qa +Katari qa +Katar qa +Katar qa +Катар qa +Katar qa +I-Qatar qa +கதார௠qa +Қатар qa +ควาตาร์ qa +Katar qa +Катар qa +Қатар qa +Katar qa +å¡å¡”å°” qa +å¡é” qa +Romania ro +Romenië ro +رومانيا ro +Rumıniya ro +Ð ÑƒÐ¼Ñ‹Ð½Ñ–Ñ ro +Ð ÑƒÐ¼ÑŠÐ½Ð¸Ñ ro +রà§à¦®à§‡à¦¨à¦¿à§Ÿà¦¾ ro +Roumani ro +Rumunija ro +Rumunsko ro +Rumænien ro +Rumänien ro +Ρουμανία ro +Rumanio ro +Rumanía ro +Rumeenia ro +Errumania ro +رومانی ro +Rumenia ro +Roumanie ro +Roemenië ro +An Rómáin ro +Románia ro +רומניה ro +रोमानिया ro +Rumunjska ro +Románia ro +Rumania ro +Rúmenía ro +ルーマニア ro +រូម៉ានី ro +루마니아 ro +ໂລມາເນີຠro +Rumunija ro +RumÄnija ro +Романија ro +Румын ro +Rumanija ro +Rumänien ro +Roemenië ro +ਰੋਮਾਨੀਆ ro +Rumunia ro +Roménia ro +Romênia ro +România ro +Ð ÑƒÐ¼Ñ‹Ð½Ð¸Ñ ro +Romaniya ro +Románia ro +Rumunsko ro +Romunija ro +Румунија ro +Rumunija ro +I-Romania ro +Rumänien ro +à®°à¯à®®à¯‡à®©à®¿à®¯à®¾ ro +Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro +โรมาเนีย ro +Romanya ro +Ð ÑƒÐ¼ÑƒÐ½Ñ–Ñ ro +Ð ÑƒÐ¼Ð¸Ð½Ð¸Ñ ro +Roumaneye ro +罗马尼亚 ro +羅馬尼亞 ro +Russia ru +Rusland ru +روسيا ru +Rusiya ru +РаÑÐµÑ ru +РуÑÐ¸Ñ ru +রাশিয়া ru +Rusia ru +Rusija ru +Rússia ru +Rusko ru +Rwsia ru +Rusland ru +Russland ru +Ρωσία ru +Ruslando ru +Rusia ru +Venemaa ru +Errusia ru +روسیه ru +Venäjä ru +Russland ru +Russie ru +Rusland ru +An Rúis ru +Rúsia ru +רוסיה ru +रà¥à¤¸ ru +Rusija ru +Oroszország ru +Rusia ru +Rússland ru +ロシア ru +រូស្ស៊ី ru +러시아 ru +ລັດເຊີຠru +Rusija ru +Krievija ru +РуÑија ru +ÐžÑ€Ð¾Ñ ru +Russja ru +Russland ru +Russland ru +Rusland ru +Russland ru +ਰੂਸ ru +Rosja ru +Rússia ru +Rússia ru +Rusia ru +РоÑÑÐ¸Ñ ru +Uburusiya ru +Ruošša ru +Rusko ru +Rusija ru +РуÑија ru +Rusija ru +I-Russia ru +Ryssland ru +ரசியா ru +РуÑÑÐ¸Ñ ru +รัสเซีย ru +Rusya ru +Urısia, Räsäy ru +РоÑÑ–Ñ ru +РоÑÑÐ¸Ñ ru +Rashia ru +Nga ru +Rûsseye ru +Rashiya ru +ä¿„ç½—æ–¯ ru +ä¿„ç¾…æ–¯ ru +Rwanda rw +رواندا rw +Ruanda rw +Руанда rw +Руанда rw +রোয়ানà§à¦¡à¦¾ rw +Ruanda rw +Ruanda rw +Ruanda rw +Ρουάντα rw +Ruando rw +Ruanda rw +رواندا rw +Ruanda rw +Ruanda rw +Ruanda rw +רו×נדה rw +रवांडा rw +Ruanda rw +Ruanda rw +Rúanda rw +Ruanda rw +ルワンダ rw +រវ៉ាន់ដា rw +르완다 rw +à»àºžàº™àº”້າ rw +Ruanda rw +Ruanda rw +Руанда rw +Рванда rw +Ruanda rw +ਰਵਾਂਡਾ rw +Ruanda rw +Ruanda rw +Ruanda rw +Ruanda rw +Руанда rw +Ruanda rw +Руанда rw +Ruanda rw +வானà¯à®Ÿà®¾ rw +Руондо rw +รวันด้า rw +Ruanda rw +Руанда rw +Рванда rw +墿—ºè¾¾ rw +ç›§å®‰é” rw +Saudi Arabia sa +Saudi Arabië sa +السعودية sa +SÉ™udi ÆrÉ™bistan sa +СаудаўÑÐºÐ°Ñ ÐÑ€Ð°Ð±Ñ–Ñ sa +СаудитÑка ÐÑ€Ð°Ð±Ð¸Ñ sa +সৌদি আরব sa +Arabi Saudiet sa +Saudijska Arabija sa +Aràbia Saurí sa +Saúdská Arábie sa +Sawdi Arabia sa +Saudi Arabien sa +Saudi-Arabien sa +Σαουδική ΑÏαβία sa +SaÅ­da Arabio sa +Arabia Saudí sa +Saudi Araabia sa +عربستان سعودی sa +Saudi-Arabia sa +Arabie Saoudite sa +Saudi-Arabië sa +An Araib Shádach sa +Arabia Saudita sa +ערב הסעודית sa +सऊदी अरब sa +Saudijska Arabija sa +Szaúd-Arábia sa +Sádi-Arabía sa +Arabia Saudita sa +サウジアラビア sa +អារ៉ាប៊ីសាអ៊ូឌីហsa +사우디 ì•„ë¼ë¹„ì•„ sa +ອາລະບິຠsa +Saudo Arabija sa +SaÅ«da ArÄbija sa +СаудиÑка Ðрабија sa +Саудын араб sa +Għarabja Sawdita sa +Saudi-Arabia sa +Saudi Arabien sa +Saudi-Arabië sa +Saudi-Arabia sa +ਸਾਊਦੀ ਅਰਬ sa +Arabia Saudyjska sa +Arábia Saudita sa +Arábia Saudita sa +Arabia Saudită sa +СаудовÑÐºÐ°Ñ ÐÑ€Ð°Ð²Ð¸Ñ sa +Arabiya Sawudite sa +Saudi Arábia sa +Saudská arábia sa +Saudova Arabija sa +СаудијÑка Ðрабија sa +Saudijska Arabija sa +I-Saudi Arabia sa +Saudiarabien sa +சவà¯à®¤à®¿ அரேபியா sa +ÐрабиÑтони Саудӣ sa +ซาอุดิอาระเบีย sa +Suudi Arabistan sa +Söğüd Ğäräbstan sa +СаудівÑька ÐÑ€Ð°Ð²Ñ–Ñ sa +Ð¡Ð°ÑƒÐ´Ð¸Ñ ÐрабиÑтони sa +Ẩrập Saudi sa +Arabeye Sawoudite sa +沙特阿拉伯 sa +æ²™çƒåœ°é˜¿æ‹‰ä¼¯ sa +Solomon Islands sb +Solomon Eilande sb +جزر سليمان sb +Solomon Adaları sb +Саламонавы аÑтравы sb +Соломонови оÑтрови sb +সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ sb +Inizi Salaun sb +Solomonska ostrva sb +Illes Solomon sb +Å alamounovy ostrovy sb +Ynysoedd Solomon sb +Salomon-øerne sb +Salomon-Inseln sb +Îήσοι Σολομώντος sb +Salomonoj sb +Islas Salomón sb +Saalomoni saared sb +Solomon Irlak sb +جزایر سلیمان sb +Solomon-saaret sb +ÃŽles Salomon sb +Solomon Eilannen sb +Oileáin Sholamón sb +Illas Salomón sb +××™×™ שלמה sb +सोलोमन आइलैंड sb +Solomonova otoÄja sb +Salamon-szigetek sb +Salómonseyjar sb +Isole Salomone sb +ソロモン諸島 sb +កោះ​សូឡូម៉ូន sb +솔로몬 ì œë„ sb +ສະໂລວະເນີຠsb +Saliamono salos sb +Solomonu salas sb +СоломонÑки ОÑтрови sb +Соломоны арлууд sb +Gżejjer Solomon sb +Salomonøyene sb +Salomonen sb +Solomon Eilanden sb +Salomonøyane sb +ਸੋਲੋਮੋਨ ਆਈਸਲੈਂਡ sb +Wyspy Salomona sb +Ilhas Salomão sb +Ilhas Salomão sb +Insulele Solomon sb +Соломоновы оÑтрова sb +Ibirwa bya Salomo sb +Salomonsullot sb +Å alamúnove ostrovy sb +Solomonovi otoki sb +Соломонова оÑтрва sb +Solomonova ostrva sb +Salomonöarna sb +சாலமன௠தீவà¯à®•ள௠sb +Ҷазираи Сулаймон sb +หมู่เà¸à¸²à¸°à¹‚ซโลมอน sb +Solomon Adaları sb +Solomon Utrawları sb +Соломонові оÑтрови sb +Соломон Ороллари sb +Quần đảo Solomon sb +Iyes Salomon sb +所罗门群岛 sb +索羅門群島 sb +Seychelles sc +سيشل sc +СÑйшÑлы sc +СейшелÑки оÑтрови sc +সীচিলিস sc +Sechell sc +SejÅ¡eli sc +Ynysoedd y Seisi?l sc +Seychellerne sc +Seychellen sc +Σεϋχέλλες sc +SejÅeloj sc +SeiÅ¡ellid sc +سیشل sc +Seychellit sc +Seychellen sc +Na Séiséil sc +Seicheles sc +××™×™ סיישל sc +शेसेलà¥à¤¸ sc +SejÅ¡eli sc +Seychelles-eyjar sc +セイシェル sc +សីស្ហែល sc +세ì´ì…¸ sc +ເຊລ sc +SeiÅ¡eļu salas sc +Сејшели sc +Ð¡ÐµÐ¹Ñ‡ÐµÐ»Ð»Ð¸Ñ sc +Seychellene sc +Seychellen sc +Seychellen sc +Seychellane sc +ਸੀਲਚੀਲੀਸ sc +Seszele sc +Ilhas Seychelles sc +СейшельÑкие оÑтрова sc +Seyishele sc +SeyÅ¡ellat sc +SejÅ¡eli sc +Сејшели sc +SejÅ¡eli sc +Seychellerna sc +சேசெலà¯à®²à®¸à¯ sc +Сейшелӣ sc +ซีเชลล์ sc +SeyÅŸeller sc +SeyÅŸellär sc +СейшельÑькі оÑтрови sc +Сейшел Ороллари sc +Seycheles sc +塞舌尔 sc +塞席爾 sc +Sudan sd +السودان sd +Судан sd +Судан sd +সà§à¦¦à¦¾à¦¨ sd +Sondan sd +Sudán sd +Swdan sd +Σουδάν sd +Sudano sd +Sudán sd +Sudaan sd +سودان sd +Sudania sd +Soudan sd +An tSúdáin sd +Sudán sd +סודן sd +सूडान sd +Szudán sd +Súdan sd +スーダン sd +ស៊ូដង់ sd +수단 sd +ຊູດານ sd +Sudanas sd +SudÄna sd +Судан sd +Судан sd +ਸੂਡਾਨ sd +Sudão sd +Sudão sd +Судан sd +Sudani sd +Sudán sd +Судан sd +I-Sudan sd +சூடான௠sd +Судон sd +ซูดาน sd +Судан sd +Судан sd +Sudani sd +Soudan sd +è‹ä¸¹ sd +蘇丹 sd +Sweden se +Swede se +السويد se +İsveç se +ШвÑÑ†Ñ‹Ñ se +Ð¨Ð²ÐµÑ†Ð¸Ñ se +সà§à¦‡à¦¡à§‡à¦¨ se +Å vedska se +Suècia se +Å védsko se +Sverige se +Schweden se +Σουηδία se +Svedio se +Suecia se +Rootsi se +Suedia se +سوئد se +Ruotsi se +Svøriki se +Suède se +Zweden se +An tSualainn se +Suécia se +שבדיה se +सà¥à¤µà¥€à¤¡à¤¨ se +Å vedska se +Svédország se +Swedia se +Svíþjóð se +Svezia se +スウェーデン se +ស៊ុយអែដ se +ìŠ¤ì›¨ë´ se +ສະວີເດນ se +Å vedija se +Zviedrija se +ШведÑка se +Швед se +Svezja se +Sverige se +Zweden se +Sverige se +Suècia se +ਸਵੀਡਨ se +Szwecja se +Suécia se +Suécia se +Suedia se +Ð¨Ð²ÐµÑ†Ð¸Ñ se +Suwede se +Ruoŧŧa se +Å védsko se +Å vedska se +ШведÑка se +Å vedska se +I-Sweden se +Sverige se +சà¯à®µà¯€à®Ÿà®©à¯ se +Шведӣ se +สวีเดน se +İsveç se +İswäc, Åžwedsia se +Ð¨Ð²ÐµÑ†Ñ–Ñ se +Ð¨Ð²ÐµÑ†Ð¸Ñ se +Swidene se +Thuỵ Äiển se +Suwede se +瑞典 se +瑞典 se +Singapore sg +سنغاÙورة sg +Sinqapur sg +Сынгапур sg +Сингапур sg +সিঙà§à¦—াপà§à¦° sg +Singapour sg +Singapur sg +Singapur sg +Singapur sg +Singap?r sg +Singapur sg +ΣινγκαποÏÏη sg +Singapuro sg +Singapur sg +Singapur sg +سنگاپور sg +Singapour sg +Singeapór sg +Singapur sg +סינגפור sg +सिंगापोर sg +Singapur sg +Szingapúr sg +Singapúr sg +シンガãƒãƒ¼ãƒ« sg +សិង្ហបុរី sg +싱가í¬ë¥´ sg +ໂຊນາ sg +SingapÅ«ras sg +SingapÅ«ra sg +Сингапур sg +Сингафур sg +Singapura sg +Singapor sg +Singapur sg +ਸਿੰਘਾਪà©à¨° sg +Singapur sg +Singapura sg +Singapura sg +Сингапур sg +Singapur sg +Singapur sg +Сингапур sg +Singapur sg +சிஙà¯à®•பà¯à®ªà¯‚ர௠sg +Сингопур sg +สิงคโปร์ sg +Singapur sg +Singapur sg +Сінгапур sg +Сингапур sg +Singapour sg +æ–°åŠ å¡ sg +æ–°åŠ å¡ sg +Saint Helena sh +St Helena sh +سانت هيلانة sh +ВоÑтраў СьвÑтой Ðлены sh +Св. Елена sh +সেনà§à¦Ÿ হেলেনা sh +Sant Lena sh +Sveta Helena sh +Santa Helena sh +Svatá Helena sh +Ynys Santes Helena sh +St. Helena sh +St. Helena sh +Αγία Ελένη sh +Sent-Heleno sh +Santa Helena sh +سنت هلن sh +Sainte-Hélène sh +Sint Helena sh +San Héilin sh +Santa Helena sh +סט. הלנה sh +सेंट हेलेना sh +Sveta Helena sh +Szent Heléna sh +Sankti Helena sh +Sant'Elena sh +英領セントヘレナ島 sh +សង់ហáŸáž¡áŸážŽáž¶ sh +세ì¸íŠ¸í—¬ë ˆë‚˜ sh +ຫົວເລື່ອງ sh +Å v. Elenos sala sh +Sv. HelÄ“nas sala sh +Света Елена sh +Сайнт Хелена sh +St. Helena sh +Sankt Helena sh +St. Helena sh +ਸੇਂਟ ਹੀਲੀਨਆ sh +ÅšwiÄ™ta Helena sh +Santa Helena sh +Santa Helena sh +Sfînta Elena sh +оÑтров СвÑтой Елены sh +Mutagatifu Helena sh +St. Helena sh +Svätá Helena sh +Sveta Helena sh +Света Јелена sh +Sveta Jelena sh +செயினà¯à®Ÿà¯ ஹேலேனா sh +Синт Ҳилин sh +เซนต์เฮเลน่า sh +ОÑтрів СвÑтої Єлени sh +Ðвлиё Елена Ороли sh +Sint Elene sh +圣赫勒拿 sh +è–赫勒拿島 sh +Slovenia si +Slovenië si +سلوÙينيا si +Sloveniya si +Ð¡Ð»Ð°Ð²ÐµÐ½Ñ–Ñ si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si +সà§à¦²à§‹à¦­à§‡à¦¨à¦¿à§Ÿà¦¾ si +Sloveni si +Slovenija si +Eslovènia si +Slovinsko si +Slofenia si +Slovenien si +Slowenien si +Σλοβενία si +Slovenio si +Eslovenia si +Sloveenia si +Eslovenia si +اسلوانی si +Slovénie si +Slowenië si +An tSlóivéin si +Eslovénia si +סלובניה si +सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾ si +Slovenija si +Szlovénia si +Slóvenía si +スロベニア si +ស្លូវ៉ានី si +슬로베니아 si +ສະໂລວະເນີຠsi +SlovÄ—nija si +SlovÄ“nija si +Словенија si +Слован si +Slovenja si +Slowenien si +Slowenië si +Eslovenia si +ਸਲੋਵੀਨੀਆ si +SÅ‚owenia si +Eslovénia si +Eslovênia si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si +Siloveniya si +Slovinsko si +Slovenija si +Словенија si +Slovenija si +I-Slovenia si +Slovenien si +சà¯à®²à¯‹à®µà®¿à®©à®¿à®¯à®¾ si +УÑлувонӣ si +สโลเวเนีย si +Slovenya si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ñ–Ñ si +Ð¡Ð»Ð¾Ð²ÐµÐ½Ð¸Ñ si +Esloveneye si +斯洛文尼亚 si +斯洛維尼亞 si +Slovakia sk +Slovakië sk +Ø³Ù„ÙˆÙØ§ÙƒÙŠØ§ sk +Slovakiya sk +Ð¡Ð»Ð°Ð²Ð°ÐºÑ–Ñ sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk +সà§à¦²à§‹à¦­à¦¾à¦•িয়া sk +Slovaki sk +SlovaÄka sk +Eslovàquia sk +Slovensko sk +Slofacia sk +Slovakiet sk +Slowakien sk +Σλοβακία sk +Slovakujo sk +Eslovaquia sk +Slovakkia sk +Eslovakia sk +اسلواکی sk +Slovaquie sk +Slowakije sk +An tSlóvaic sk +Eslováquia sk +סלובקיה sk +सà¥à¤²à¥‹à¤µà¤¾à¤•िया sk +SlovaÄka sk +Szlovákia sk +Slóvakía sk +Slovacchia sk +スロãƒã‚­ã‚¢ sk +ស្លូវ៉ាគី sk +슬로바키아 sk +ສະໂລວັຠsk +Slovakija sk +SlovÄkija sk +Словачка sk +Словак sk +Slovakja sk +Slowakei sk +Slowakije sk +ਸਲੋਵਾਕਿਆ sk +SÅ‚owacja sk +Eslováquia sk +Eslováquia sk +Slovacia sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk +Silovakiya sk +Slovákia sk +Slovensko sk +SlovaÅ¡ka sk +Словачка sk +SlovaÄka sk +I-Slovakia sk +Slovakien sk +சà¯à®²à¯‹à®µà®¾à®•à¯à®•ிய sk +УÑлувок sk +สโลวาเà¸à¸µà¸¢ sk +Slovakya sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÑ–Ñ sk +Ð¡Ð»Ð¾Ð²Ð°ÐºÐ¸Ñ sk +Eslovakeye sk +斯洛ä¼å…‹ sk +斯洛ä¼å…‹ sk +San Marino sm +سان مارينو sm +Сан-Марына sm +Сан Марино sm +সান মারিনো sm +Σαν ΜαÏίνο sm +San-Marino sm +سن‌مارینو sm +Saint-Marin sm +San Mairíne sm +סן מרינו sm +सेन मेरिनो sm +San Marínó sm +サンマリノ sm +សាន់ម៉ារីណូ sm +산마리노 sm +ໂຊນາ sm +San Marinas sm +SanmarÄ«no sm +Сан Марино sm +Сан Марино sm +ਸਨ ਮਰੀਨੋ sm +São Marino sm +Сан-Марино sm +Mutagatifu Marini sm +Сан Марино sm +சான௠மரினோ sm +Сан Морину sm +ซานมาริโน sm +Сан-Маріно sm +Сан-Марино sm +Sint Marin sm +圣马力诺 sm +è–馬力諾 sm +Senegal sn +السنغال sn +Seneqal sn +СÑнÑгал sn +Сенегал sn +সেনেগল sn +Σενεγάλη sn +Senegalo sn +سنگال sn +Senegali sn +Sénégal sn +An tSeineagáil sn +סנגל sn +सेनेगल sn +Szenegál sn +ã‚»ãƒã‚¬ãƒ« sn +សáŸáž“áŸáž áŸ’គាល់ sn +세네갈 sn +ທົ່ວໄປ sn +Senegalas sn +SenegÄla sn +Сенегал sn +Сенегал sn +Senegall sn +ਸੈਨੇਗਾਲ sn +Сенегал sn +Senegali sn +Сенегал sn +சீனேகல௠sn +Синегол sn +เซนีà¸à¸±à¸¥ sn +Сенегал sn +Сенегал sn +SenegÃ¥l sn +塞内加尔 sn +塞內加爾 sn +Somalia so +Somalië so +صومال so +Somali so +Самалі so +Ð¡Ð¾Ð¼Ð°Ð»Ð¸Ñ so +সোমালিয়া so +Somali so +Somalija so +Somàlia so +Somálsko so +Σομαλία so +Somalio so +Somaalia so +سومالی so +Somalie so +Somalie so +An tSomáil so +Somália so +סומליה so +सोमालिया so +Somalija so +Szomália so +Sómalía so +ソマリア so +សូម៉ាលី so +소ë§ë¦¬ì•„ so +ໂລມາເນີຠso +Somalis so +SomÄlija so +Сомалија so +Сомали so +Somalija so +Somalien so +Somalie so +ਸੋਮਾਲੀਆ so +Somália so +Somália so +Сомали so +Somaliya so +Somália so +Somálsko so +Somalija so +Сомалија so +Somalija so +I-Somalia so +சோமாலியா so +Сумалӣ so +โซมาเลีย so +Somali so +Сомалі so +Сомали so +Somaleye so +索马里 so +索馬利亞 so +Suriname sr +سورينام sr +Surinam sr +Сурынам sr +Суринам sr +সà§à¦°à¦¿à¦¨à¦¾à¦® sr +Surinam sr +Surinam sr +Surinam sr +Swrinam sr +Surinam sr +ΣουÏινάμ sr +Surinamo sr +Surinam sr +Surinam sr +سورینام sr +Surinam sr +Suranam sr +סורינ×× sr +सूरीनाम sr +Surinam sr +Súrínam sr +スリナム sr +ស៊ូរីណាមី sr +수리남 sr +ເຊີເບີຠsr +Surinamas sr +Surinama sr +Суринам sr +Суринам sr +Surinam sr +Surinam sr +Surinam sr +Surinam sr +ਸੂਰੀਨਾਮੀ sr +Surinam sr +Surinam sr +Суринам sr +Surinamu sr +Surinam sr +Surinam sr +Surinam sr +Суринам sr +Surinam sr +Surinam sr +சà¯à®°à®¿à®¨à¯‡à®®à¯ sr +Суринам sr +ซูรีนามิ sr +Surinam sr +Surinam sr +Сурінам sr +Суринам sr +è‹é‡Œå— sr +è˜‡åˆ©å— sr +Sao Tome and Principe st +Sao Tome en Principe st +ساو تومي Ùˆ البرنسيب st +Sao Tome vÉ™ Principe st +Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі st +Сао Томе и ПринÑипи st +সাও টোম à¦à¦¬à¦‚ পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ª st +Sao Tome ha Principe st +Sao Tome i Principe st +Sao Tome i Principe st +Sao Tome a Principe st +Ynysoedd Sao Tome a Principe st +Sao Tomé og Principe st +Sao Tome und Principe st +Σάο Τομέ και ΠÏίνσιπε st +Sao-Tomeo kaj Principeo st +Sao Tome y Príncipe st +Sao Tome ja Principe st +Sao Tome eta Principe st +سائوتومه Ùˆ پرینسیپه st +São Tomé ja Príncipe st +Sao Tomé et Principe st +Sao Tome en Principe st +São Tomé agus Príncipe st +Santo Tomé e Príncipe st +साओ टोम तथा पà¥à¤°à¤¿à¤‚सिपी st +Sv. Toma i Princip st +Sao Tome és Principe st +Saó Tóme og Prinsípe st +São Tomé e Príncipe st +サントメプリンシペ st +ìƒíˆ¬ë©” 프린시페 st +ບà»àº¥àº´àºàº²àº™ st +Santome un Prinsipi st +Сао Томе и ПринÑипе st +Сао Ð¢Ð¾Ð¼Ñ Ð±Ð° Принцип st +Sao Tome u Principe st +São Tomé og Príncipe st +São Tomé un Príncipe st +Sao Tome en Principe st +São Tomé og Príncipe st +ਸਾਓ ਟੋਮੀ ਤੇ ਪਰੀਸਿਪੀ st +Sao Tome i Principe st +São Tomé and Príncipe st +São Tome e Príncipe st +Sao Tome ÅŸi Principe st +Сан-Томе и ПринÑипи st +Sawo Tome na Purencipe st +São Tomé ja Príncipe st +Sao Tome a Principe st +Sao Tome in Principe st +Св. Тома и Принцип st +Sv. Toma i Princip st +São Tomé och Príncipe st +சயோ டோம௠மறà¯à®±à¯à®®à¯ பிரினà¯à®¸à®¿à®ªà®¿ st +Синт Том ва ПринÑип st +ซาวโทม à¹à¸¥à¸° พรินซิป st +Sao Tome ve Principe st +Sao Tome wä Principe st +Сан-Томе Ñ– ПрінÑіпі st +Сан-Томе ва ПринÑипи st +São Tomé et Prince st +圣多美和普林西比 st +è–å¤šç¾ŽåŠæ™®æž—西比 st +El Salvador sv +Ø§Ù„Ø³Ù„ÙØ§Ø¯ÙˆØ± sv +Сальвадор sv +Салвадор sv +à¦à¦² সালভাডোর sv +Ar Salvador sv +Salvador sv +El Salfador sv +Ελ Î£Î±Î»Î²Î±Î½Ï„ÏŒÏ sv +Salvadoro sv +Salvador sv +السالوادور sv +Salvador sv +An tSalvadóir sv +O Salvador sv +×ל סלבדור sv +अल सलà¥à¤µà¤¾à¤¡à¥‹à¤° sv +Salvador sv +エルサルãƒãƒ‰ãƒ« sv +អែលសាល់វ៉ាឌáŸážš sv +엘살바ë„르 sv +ເອລຊັນວາດດ໠sv +Salvadoras sv +Salvadora sv +Ел Салвадор sv +Эл Салвадор sv +ਈਲ ਸਾਲਵੇਡੋਰ sv +Salwador sv +Salvador sv +Сальвадор sv +Eli Salivadoro sv +Salvádor sv +Salvador sv +Ел Салвадор sv +I-El Salvador sv +எல௠சாலà¯à®µà®Ÿà¯‹ ர௠sv +Ðл Салвадур sv +เอลซัลวาดอร์ sv +Ель-Сальвадор sv +Салвадор sv +è¨å°”瓦多 sv +薩爾瓦多 sv +Syria sy +Sirië sy +سوريا sy +SuriyÉ™ sy +Ð¡Ñ‹Ñ€Ñ‹Ñ sy +Ð¡Ð¸Ñ€Ð¸Ñ sy +সিরিয়া sy +Siri sy +Sirija sy +Síria sy +Sýrie sy +Syrien sy +Syrien sy +ΣυÏία sy +Sirio sy +Siria sy +Süüria sy +Siria sy +سوریه sy +Syyria sy +Syrie sy +Syrië sy +An tSiria sy +Síria sy +סוריה sy +सीरिया sy +Sirija sy +Szíria sy +Sýrland sy +Siria sy +シリア sy +ស៊ីរី sy +시리아 sy +ເຊີເບີຠsy +Sirija sy +SÄ«rija sy +Сирија sy +Сири sy +Siria sy +Syrien sy +Syrië sy +ਸੀਰੀਆ sy +Síria sy +Síria sy +Siria sy +Ð¡Ð¸Ñ€Ð¸Ñ sy +Siriya sy +Sýria sy +Sirija sy +Сирија sy +Sirija sy +I-Syria sy +Syrien sy +சிரியா sy +Ð¡ÑƒÑ€Ð¸Ñ sy +ซีเรีย sy +Suriye sy +Süriä sy +Ð¡Ð¸Ñ€Ñ–Ñ sy +Ð¡ÑƒÑ€Ð¸Ñ sy +Sireye sy +å™åˆ©äºš sy +敘利亞 sy +Swaziland sz +Swasiland sz +سوازيلاند sz +Svaziland sz +СвазылÑнд sz +Свазиленд sz +সোয়াজিলà§à¦¯à¦¾à¦£à§à¦¡ sz +Svazilend sz +Neozelàndia sz +Gwlad y Swasi sz +Swasiland sz +Σουαζιλάνδη sz +Svazilando sz +Swazilandia sz +Svaasimaa sz +Swazilandia sz +سووازیلند sz +Swazimaa sz +An tSuasalainn sz +Suacilándia sz +סוו×זילנד sz +सà¥à¤µà¤¾à¤œà¥€à¤²à¥ˆà¤‚ड sz +Svazilend sz +Szváziföld sz +Svasíland sz +スワジランド sz +ស្វាហ្ស៊ីឡង់ sz +스와질란드 sz +ລາດສະນາຈັàºà»„ທຠsz +Svazilenda sz +Свазиленд sz +Свациланд sz +Sważilandja sz +Swasiland sz +ਸਵਾਜ਼ੀਲੈਂਡ sz +Suazi sz +Suazilândia sz +Suazilândia sz +Suaziland sz +Свазиленд sz +Swazilande sz +Swazijsko sz +Svazi sz +Свазиленд sz +Svazilend sz +ஸà¯à®µà®¾à®šà®¿à®²à®¾à®©à¯à®Ÿà¯ sz +Свозиланд sz +สวาซิà¹à¸¥à¸™à¸”์ sz +Свазіленд sz +Свазиленд sz +Suwazilande sz +æ–¯å¨å£«å…° sz +å²ç“¦æ¿Ÿè˜­ sz +Turks and Caicos Islands tc +Turks en Caicos Eilande tc +جزر الترك Ùˆ الكايكوس tc +Türk vÉ™ Caicos Adaları tc +ÐÑтравы ТÑÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ°Ñ tc +ОÑтрови Ð¢ÑŠÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc +টারà§à¦•স à¦à¦¬à¦‚ কাইকোস দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ tc +Inizi Turks ha Kaikos tc +Turks i Kaikos ostrva tc +Illes Turks i Caicos tc +Turks a Caicos ostrovy tc +Ynysoedd Twrc a Chaicos tc +Turks- og Caicosøerne tc +Turks- und Caicos-Inseln tc +Îήσοι ΤεÏκς και Κάικος tc +Turkoj kaj Kajkoj tc +Islas Turcos y Caicos tc +Turks ja Caicos tc +Turks eta Caicos Irlak tc +جزایر تورکس Ùˆ کایکوس tc +Turks- ja Caicos-saaret tc +ÃŽles Turks et Caicos tc +Turks en Caicos Eilânen tc +Na hOileáin Turks agus Caicos tc +Illas Caicos e Turks tc +××™×™ ×§×יקוס וטורקס tc +तà¥à¤°à¥à¤• तथा कैकोस आइलैंड tc +Turks i Caicos otoÄje tc +Turks- és Caicos-szigetek tc +Turks- og Caicos-eyjar tc +Isole Turks e Caicos tc +英領タークス諸島 カイコス諸島 tc +កោះ​ទួក និង​ កៃកូស tc +í„°í¬ìФ ì¼€ì´ì»¤ìФ ì œë„ tc +TÄ“rksa un Kaikosa tc +ОÑтрови Турк и ÐšÐ°Ð¸ÐºÐ¾Ñ tc +Турк ба Кайкогийн арлууд tc +Gżejjer Turks u Caicos tc +Turks- og Caicosøyene tc +Turks- un Caicosinseln tc +Turks en Caicos Eilanden tc +Turks- og Caicosøyane tc +ਤà©à¨°à¨•ਸ ਤੇ ਕਾਇਕੋਸ ਟਾਪੂ tc +Wyspy Turks i Caicos tc +Ilhas Turks e Caicos tc +Ilhas Caicos e Turca tc +Insulele Turks ÅŸi Caicos tc +ОÑтрова Ð¢ÐµÑ€ÐºÑ Ð¸ ÐšÐ°Ð¹ÐºÐ¾Ñ tc +Ibirwa bya Turike na Kayikosi tc +Turks- ja Kaikossullot tc +Turks a Caicos ostrovy tc +Otoka Turks in Caicos tc +Турка и Кајкошка оÑтрва tc +Turka i KajkoÅ¡ka ostrva tc +Turks- och Caicosöarna tc +தà¯à®°à¯à®•à¯à®•ிகள௠மறà¯à®±à¯à®®à¯ காயà¯à®•ோஸ௠தீவà¯à®•ள௠tc +Ҷазираи Турк ва ÐšÐ¾Ð¹ÐºÑƒÑ tc +เà¸à¸²à¸°à¸”ติร์à¸à¹à¸¥à¸°à¹€à¸„คอส tc +Turks ve Caicos Adaları tc +Türks wä Caicos Utrawları tc +ОÑтрови Ð¢ÐµÑ€ÐºÑ Ñ– ÐšÐ°Ð¹ÐºÐ¾Ñ tc +Ð¢ÑƒÑ€ÐºÑ Ð²Ð° ÐšÐ°Ð¸ÐºÐ¾Ñ ÐžÑ€Ð¾Ð»Ð»Ð°Ñ€Ð¸ tc +Quần đảo Turks và Caicos tc +Iyes Turks et Caicos tc +特克斯和凯科斯群岛 tc +åœŸå…‹æ–¯å’Œé–‹å¡æ–¯ç¾¤å³¶ tc +Chad td +تشاد td +Çad td +Чад td +Чад td +চà§à¦¯à¦¾à¦¡ td +Tchad td +ÄŒad td +Txad td +ÄŒad td +Tsiad td +Tchad td +Tschad td +Τσαντ td +Ĉado td +TÅ¡aad td +Txad td +چاد td +Tchad td +Tsjaad td +Sead td +Chade td +צ'×ד td +चाड td +Äad td +Csád td +Tsjad td +Ciad td +ãƒãƒ£ãƒ‰ td +ឆាដ td +차드 td +ເàºàº¡à»„ພ່ td +ÄŒada td +Чад td +Чад td +ÄŠad td +Tsjad td +Tschad td +Tsjaad td +Tsjad td +ਚਾਂਦ td +Czad td +Chade td +Chade td +Ciad td +Чад td +Cade td +ÄŒad td +ÄŒad td +ÄŒad td +Чад td +ÄŒad td +Tchad td +சாட௠td +Чод td +ชาด td +Çad td +Çad td +Чад td +Чад td +Tchad td +ä¹å¾— td +查德 td +Togo tg +توغو tg +Тога tg +Того tg +টোগো tg +Τόγκο tg +توگو tg +Tógó tg +טוגו tg +टोगो tg +Tógó tg +トーゴ tg +ážáž¼áž áŸ’គោ tg +토고 tg +ຂອງເລ່ນສະນຸຠtg +Того tg +Того tg +ਤੋਗੋ tg +Того tg +Того tg +டோகோ tg +Того tg +โตโภtg +Того tg +Того tg +多哥 tg +多哥 tg +Thailand th +تايلاند th +Tayland th +ТайлÑнд th +Тайланд th +থাইলà§à¦¯à¦¾à¦£à§à¦¡ th +Tajland th +Tailàndia th +Thajsko th +Gwlad y Tai th +Ταϊλάνδη th +Tajlando th +Tailandia th +Tai th +Thailandia th +تایلند th +Thaimaa th +Tailand th +Thaïlande th +Thailân th +An Téalainn th +Tailándia th +ת×ילנד th +थाइलैंड th +Tajland th +Thaiföld th +Taíland th +Tailandia th +タイ th +ážáŸƒ th +태국 th +ລາດສະນາຈັàºà»„ທຠth +Tailandas th +Taizeme th +Тајланд th +Тайланд th +Tajlandja th +Tailandia th +ਥਾਈਲੈਂਡ th +Tajlandia th +Tailândia th +Tailândia th +Tailanda th +Таиланд th +Tayilande th +Thajsko th +Tajska th +Тајланд th +Tajland th +I-Thailand th +தாயà¯à®²à®¾à®¨à¯à®¤à¯ th +Тойлонд th +ราชอาณาจัà¸à¸£à¹„ทย th +Tayland th +Tayland th +Таїланд th +Таиланд th +Thái Lan th +Taylande th +泰国 th +泰國 th +Tajikistan tj +طاجيكستان tj +Tacikistan tj +ТаджыкіÑтан tj +ТаджикиÑтан tj +তাজিকিসà§à¦¤à¦¾à¦¨ tj +Tadjikistan tj +Tadžikistan tj +Tadjikistan tj +Tádžikistán tj +Tajicistan tj +Tadschikistan tj +Τατζικιστάν tj +TaÄikujo tj +Tajikistán tj +Tadžikistan tj +تاجیکستان tj +Tadjikistan tj +An Táidsíceastáin tj +Taxiquistán tj +טג'קיסטן tj +ताजिकिसà¥à¤¤à¤¾à¤¨ tj +Tadžikistan tj +Tadzsikisztán tj +Tadsjikistan tj +Tagikistan tj +タジキスタン tj +ážáž¶áž áŸ’ស៊ីគីស្ážáž„់ tj +타지키스탄 tj +ໃຕ້ຫວັນ tj +Tadžikistanas tj +TadžikistÄna tj +ТаџикиÑтан tj +ТажикÑтан tj +TaÄ¡ikistan tj +Tadsjikistan tj +Tadschikistan tj +Tadjikistan tj +Tadsjikistan tj +ਤਜ਼ਾਕਸਤਾਨ tj +Tadżykistan tj +Tajiquistão tj +Tajiquistão tj +ТаджикиÑтан tj +Tajikisitani tj +Tažikistan tj +Tadžikistan tj +Tadžikistan tj +ТаџикиÑтан tj +Tadžikistan tj +Tadzjikistan tj +தஜிகிஸà¯à®¤à®¾à®©à¯ tj +ТоҷикиÑтон tj +ธาจีà¸à¸´à¸ªà¸–าน tj +Tacikistan tj +Tajıqstan tj +ТаджикиÑтан tj +ТожикиÑтон tj +Tadjikistan tj +å¡”å‰å…‹æ–¯å¦ tj +å¡”å‰å…‹ tj +Tokelau tk +توكيلاو tk +Такелау tk +Токело tk +টোকেলো tk +Tokelo tk +Tocelaw tk +Τοκελάου tk +Tokelao tk +توکلائو tk +Na hOileáin Tócala tk +טוקל×ו tk +तोकेलाऊ tk +Tókelá tk +ニュージーランド自治領トケラウ tk +ážáž¼áž€áŸáž¡áž¼ tk +토켈로 tk +ເບລາລັສ tk +Токелау tk +Токелау tk +Tokelaw tk +ਤੋਕੀਲਾਉ tk +Токелау tk +Tokelawu tk +Токелау tk +டோகேலா tk +Токилау tk +โทเคเลา tk +Tokelauça tk +Токелау tk +Токелау tk +托克劳 tk +托克勞 tk +Turkmenistan tm +تركمانستان tm +TürkmÉ™nistan tm +ТуркмÑніÑтан tm +ТуркмениÑтан tm +তà§à¦°à§à¦•মেনিসà§à¦¤à¦¾à¦¨ tm +Turcmenistan tm +Turkmenistán tm +Twrcmenistan tm +ΤουÏκμενιστάν tm +Turkmenujo tm +Turkmenistán tm +Türkmenistan tm +ترکمنستان tm +Turkménistan tm +An Tuircméanastáin tm +Turkmenistán tm +טורקמניסטן tm +तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨ tm +Türkmenisztán tm +Túrkmenistan tm +トルクメニスタン tm +ទួគមáŸáž“ីស្ážáž„់ tm +투르í¬ë©”니스탄 tm +ຕຸລະàºàºµ tm +TurkmenistÄna tm +ТуркмениÑтан tm +ТуркменÑтан tm +ਤà©à¨°à¨•ੇਮਸਤਾਨ tm +Turquemenistão tm +Turcomenistão tm +Turcmenistan tm +ТуркмениÑтан tm +Turikimenisitani tm +ТуркмениÑтан tm +தà¯à®°à¯à®•à¯à®®à¯†à®©à®¿à®¸à¯à®¤à®¾à®©à¯ tm +ТуркманиÑтон tm +เตอร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน tm +Türkmenistan tm +ТуркменіÑтан tm +ТуркманиÑтон tm +Turcmenistan tm +åœŸåº“æ›¼æ–¯å¦ tm +土庫曼 tm +Tunisia tn +Tunisië tn +تونس tn +Tunis tn +Ð¢ÑƒÐ½Ñ–Ñ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +টিউনিসিয়া tn +Tunizi tn +Tunis tn +Tunísia tn +Tunisko tn +Tiwnisia tn +Tunesien tn +Tunesien tn +Τυνησία tn +Tunizio tn +Túnez tn +Tuneesia tn +تونس tn +Tunesia tn +Tunisie tn +Tunisie tn +An Túinéis tn +Túnez tn +תוניסיה tn +टà¥à¤¯à¥‚नीशिया tn +Tunis tn +Tunézia tn +Túnis tn +ãƒãƒ¥ãƒ‹ã‚¸ã‚¢ tn +ទុយនáŸážŸáŸŠáž¸ tn +튀니지 tn +ລັດເຊີຠtn +Tunisas tn +Tunisija tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tuneżija tn +Tunesien tn +Tunisie tn +ਟà©à¨¨à©€à¨¶à©€à¨† tn +Tunezja tn +Tunísia tn +Tunísia tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tuniziya tn +Tunisko tn +Tunizija tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tunis tn +I-Tunisia tn +Tunisien tn +தà¯à®©à®¿à®šà®¿à®¯à®¾ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +ตูนีเซีย tn +Tunus tn +Ð¢ÑƒÐ½Ñ–Ñ tn +Ð¢ÑƒÐ½Ð¸Ñ tn +Tunizeye tn +çªå°¼æ–¯ tn +çªå°¼è¥¿äºž tn +Tonga to +تونغا to +Tonqa to +Тонга to +Тонга to +টোংগা to +Inizi Tonga to +Τόνγκα to +Tongo to +تونگو to +טונגה to +टोंगा to +トンガ to +ážáž»áž„ហ្គោ to +통가 to +ໂຊນາ to +Тонга to +Тонга to +ਟਾਂਗਾ to +Тонга to +Тонга to +டோஙà¯à®•ா to +Тонго to +ตองà¸à¹‰à¸² to +Тонга to +Тонга to +汤加 to +æ±åŠ  to +East Timor tp +Oos Timor tp +تيمور الشرقية tp +Şərqi Timor tp +УÑходні Тымор tp +Източен Тимор tp +পূরà§à¦¬ টিমর tp +Timor reter tp +IstoÄni Timor tp +Timor Est tp +Východní Timor tp +Dwyrain Timor tp +Østtimor tp +Ost-Timor tp +Ανατολικό Î¤Î¹Î¼ÏŒÏ tp +Orienta Timoro tp +Timor oriental tp +Ida-Timor tp +Ekialdeko Timor tp +تیمور شرقی tp +Itä-Timor tp +Timor oriental tp +Oost Timor tp +Tíomór Thoir tp +Timor do Leste tp +מזרח טימור tp +पूरà¥à¤µà¥€ तिमोर tp +IstoÄni Timor tp +Kelet-Timor tp +Austur-Tímor tp +Timor Est tp +æ±ãƒ†ã‚£ãƒ¢ãƒ¼ãƒ« tp +ទីមáŸážšâ€‹ážáž¶áž„​កើហtp +ë™í‹°ëª¨ë¥´ tp +ວັນà»àº¥àº°à»€àº§àº¥àº² tp +Rytų Timoras tp +Austrumtimora tp +ИÑточен Тимор tp +Зүүн тимор tp +Timor Timur tp +Timor tal-Lvant tp +Øst-Timor tp +Oosttimor tp +Oost Timor tp +Aust-Timor tp +ਪੂਰਬੀ ਤਾਮੋਰ tp +Timor Wschodni tp +Timor Leste tp +Timor Leste tp +Timorul de Est tp +ВоÑточный Тимор tp +Timoro y'Uburasirazuba tp +Nuorta-Timor tp +Východný Timor tp +Vzhodni Timor tp +ИÑточни Тимор tp +IstoÄni Timor tp +Östtimor tp +கிழகà¯à®•௠திமார௠tp +Тимури Шарқ tp +ติมอร์ตะวันออภtp +DoÄŸu Timur tp +Çığış Timor tp +Східний Тімор tp +Шарқий Тимур tp +Äông Timo tp +Timor Ess tp +ä¸œå¸æ±¶ tp +æ±å¸æ±¶ tp +Turkey tr +Turkeye tr +تركيا tr +TürkiyÉ™ tr +Ð¢ÑƒÑ€Ñ†Ñ‹Ñ tr +Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr +তà§à¦°à§à¦•à§€ tr +Turkia tr +Turska tr +Turquia tr +Turecko tr +Twrci tr +Tyrkiet tr +Türkei tr +ΤουÏκία tr +Turkujo tr +Turquía tr +Türgi tr +Turkia tr +ترکیه tr +Turkki tr +Turkaland tr +Turquie tr +Turkije tr +An Tuirc tr +Turquia tr +טורקיה tr +तà¥à¤°à¥à¤•ी tr +Turska tr +Törökország tr +Turki tr +Tyrkland tr +Turchia tr +トルコ tr +ទួរគី tr +터키 tr +ຕຸລະàºàºµ tr +Turkija tr +Turcija tr +Турција tr +Турк tr +Turki tr +Turkija tr +Tyrkia tr +Törkei tr +Turkije tr +Tyrkia tr +Turquia tr +ਤà©à¨°à¨•à©€ tr +Turcja tr +Turquia tr +Turquia tr +Turcia tr +Ð¢ÑƒÑ€Ñ†Ð¸Ñ tr +Turukiya tr +Durka tr +Turecko tr +TurÄija tr +ТурÑка tr +Turska tr +I-Turkey tr +Turkiet tr +தà¯à®°à¯à®•à¯à®•ி tr +Туркиё tr +ตุรà¸à¸µ tr +Türkiye tr +Törkiä tr +Туреччина tr +Ð¢ÑƒÑ€ÐºÐ¸Ñ tr +Thổ NhÄ© Kì tr +Turkeye tr +土耳其 tr +土耳其 tr +Trinidad and Tobago tt +Trinidad en Tobago tt +ترينيداد Ùˆ توباغو tt +Trinidad vÉ™ Tabaqo tt +Трынідад Ñ– Табага tt +Тринидад и Тобаго tt +তà§à¦°à¦¿à¦¨à¦¿à¦¦à¦¾à¦¦ à¦à¦¬à¦‚ টোবাগো tt +Trinidad ha Tobago tt +Trinidad i Tobago tt +Trinidad i Tobago tt +Trinidad a Tobago tt +Ynysoedd Trinidad a Thobago tt +Trinidad og Tobago tt +Trinidad und Tobago tt +ΤÏίνινταντ και Τομπάγκο tt +Trinidado kaj Tobago tt +Trinidad y Tobago tt +Trinidad ja Tobago tt +Trinidad eta Tobago tt +ترینیداد Ùˆ ØªÙØ¨Ø§Ú¯Ùˆ tt +Trinidad ja Tobago tt +Trinidad og Tobago tt +Trinidad et Tobago tt +Trinidad en Tobago tt +Oileán na Tríonóide agus Tobága tt +Trinidade e Tobago tt +טרינידד וטובגו tt +टà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ और टोबैगो tt +Trinidad i Tobago tt +Trinidad és Tobago tt +Trinidad dan Tobago tt +Trínidad og Tóbagó tt +Trinidad e Tobago tt +トリニダードトãƒã‚³ tt +ទ្រីនីដាដ និង​​ ážáž¼áž”ាហ្គោ tt +트리니다드 토바고 tt +ຕີນິà»àº”ດà»àº¥àº°à»‚ທບາໂຠtt +Trinidadas ir Tobagas tt +Trinidada un Tobago tt +Тринидад и Тобаго tt +Тринида ба Тобаго tt +Trinidad dan Tobago tt +Trinidad u Tobago tt +Trinidad og Tobago tt +Trinidad un Tobago tt +Trinidad en Tobago tt +Trinidad og Tobago tt +Trinidad le Tobago tt +Trinidad e Tobago tt +ਤਰੀਨੀਡਾਡ ਤੇ ਤੋਬਾਗੋ tt +Trinidad i Tobago tt +Trindade e Tobago tt +Trinidad e Tobago tt +Trinidad ÅŸi Tobago tt +Тринидад и Тобаго tt +Tirinida na Tobago tt +Trinidad ja Tobago tt +Trinidad a Tobago tt +Trinidad in Tabago tt +Тринидад и Тобаго tt +Trinidad i Tobago tt +I-Trinidad kanye neTobago tt +Trinidad och Tobago tt +டà¯à®°à®¿à®©à®¿à®Ÿà®¾à®Ÿà¯ & டொபாகோ tt +Туриндод ва Тубогу tt +ตรีนิà¹à¸”ดà¹à¸¥à¸°à¹‚ทบาโภtt +Trinidad veTabago tt +Trinidad wä Tobago tt +РеÑпубліка Трінідад та Тобаго tt +Тринидад ва Тобаго tt +Trinidad na Tobago tt +Trinidad và Tobago tt +Trinité et Tobago tt +Trinidad ne Tobago tt +特立尼达和多巴哥 tt +åƒé‡Œé”åŠæ‰˜è²å“¥ tt +Trinidad knaye ne-Tobago tt +Tuvalu tv +ØªÙˆÙØ§Ù„Ùˆ tv +Тувалу tv +Тувалу tv +টà§à¦­à¦¾à¦²à§ tv +Twfalw tv +Î¤Î¿Ï…Î²Î±Î»Î¿Ï tv +Tuvalo tv +توالو tv +טוב×לו tv +तà¥à¤µà¤¾à¤²à¥‚ tv +Túvalú tv +ツãƒãƒ« tv +ទុយវ៉ាលុយ tv +투발루 tv +ຊູລູ tv +Тувалу tv +Тувалу tv +ਤà©à¨µà¨¾à¨²à©‚ tv +Тувалу tv +Тувалу tv +தà¯à®µà®²à¯ tv +Тувалу tv +ตูวาลู tv +Tuvaluça tv +Тувалу tv +Тувалу tv +Touvalou tv +å›¾ç“¦å¢ tv +å瓦魯 tv +Taiwan tw +تايوان tw +Tayvan tw +Тайвань tw +Тайван tw +তাইওয়ান tw +Tajvan tw +Ταϊβάν tw +Tajvano tw +Taiwán tw +تایوان tw +Taivan tw +Taïwan tw +An Téaváin tw +Taiwán tw +טיוו×ן tw +ताईवान tw +Tajvan tw +Tajvan tw +Taívan tw +å°æ¹¾ tw +ážáŸƒážœáŸ‰áž¶áž“់ tw +대만 tw +ໃຕ້ຫວັນ tw +Taivanis tw +TaivÄna tw +Тајван tw +Тайван tw +Tajwan tw +ਤਾਈਵਾਨ tw +Tajwan tw +Formosa tw +Taivan tw +Тайвань tw +Tayiwani tw +Tajvan tw +Тајван tw +Tajvan tw +I-Taiwan tw +தாயà¯à®µà®¾à®©à¯ tw +Тойвон tw +ไต้หวัน tw +Tayvan tw +Taywan tw +Тайвань tw +Тайван tw +Äài Loan tw +䏭国尿¹¾ tw +å°ç£ tw +Tanzania, United Republic of tz +Tanzanië, Vereenigde Republiek van tz +جمهورية تنزانيا المتحدة tz +Tanzaniya tz +Ð—Ð»ÑƒÑ‡Ð°Ð½Ð°Ñ Ð ÑÑпубліка Ð¢Ð°Ð½Ð·Ð°Ð½Ñ–Ñ tz +Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz +তানজানিয়া tz +Tanzanija, Ujedinjena Republika tz +Tanzània, República Unida de tz +Tanzánie tz +Tansania, Gweriniaeth Unedig tz +Tanzania tz +Tansania, vereinigte Republik tz +Τανζανία, Ενωμένη δημοκÏατία της tz +Tanzanio, UnuiÄinta Respubliko de tz +Tanzania, Republica de tz +Tansaania tz +Tanaziar Errepublika Batua tz +جمهوری متحده تانزانیا tz +Tansanian yhdistäytynyt tasavalta tz +Tanzanie, République unie de tz +Tanzanië, Ferienigd republyk fan tz +An Tansáin tz +República Unida de Tanzánia tz +טנזניה, הרפובליקה המ×וחדת של tz +तंजानिया यूनाइटेड रिपबà¥à¤²à¤¿à¤• tz +Ujedinjena Republika Tanzanija tz +Tanzánia tz +Tansanía tz +Tanzania tz +タンザニア,共和国連邦 tz +ážáž„់ហ្សានី tz +탄ìžë‹ˆì•„ 합중국 tz +ໂດມິນິàºàº±àº™ tz +Tanzanijos Respublika tz +TanzÄnija tz +Танзанија, Обединета Република tz +Танканы нÑгдÑÑн ÑƒÐ»Ñ tz +Republik Bersatu Tanzania tz +Tanżania tz +Tanzania tz +Tansania tz +Tanzania, Verenigde republiek van tz +Tanzania tz +ਤਾਨਜ਼ੂਈਆ, ਸੰਯà©à¨•ਤ ਗਣਰਾਜ tz +Zjednoczna Republika Tanzanii tz +República da União da Tanzânia tz +República da Tanzânia tz +Tanzania, Republica Unită tz +Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ tz +Tanzaniya, Repubulika Yunze Ubumwe ya tz +Tanzania tz +Tanzánia, Spojená republika tz +Tanzanija, Združena republika tz +Танзанија, Уједињена Република tz +Tanzanija, Ujedinjena Republika tz +Förenade republiken Tanzania tz +டானà¯à®œà®¾à®¨à®¿à®¯à®¾, à®à®•à¯à®•ிய கà¯à®Ÿà®¿à®¯à®°à®šà¯ tz +Ҷумҳурии Муттаҳидаи Тонзониё tz +สาธารณรัà¸à¹à¸—นซาเนีย tz +Tanzanya tz +Tanzania, Berläşkän Cömhüriätläre tz +ТанзаніÑ, об'єднана реÑпубліка tz +Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ Ð‘Ð¸Ñ€Ð»Ð°ÑˆÐ³Ð°Ð½ РеÑпубликаÑи tz +Tanzania, Cá»™ng hoà thống nhât tz +Tanzaneye tz +妿¡‘尼亚è”åˆå…±å’Œå›½ tz +å¦å°šå°¼äºž tz +Ukraine ua +Ukraïne ua +أوكرانيا ua +Ukrayna ua +Украіна ua +Украйна ua +ইউকà§à¦°à§‡à¦¨ ua +Ukraina ua +Ukrajina ua +Ucraïna ua +Ukrajina ua +Wcr?in ua +ΟυκÏανία ua +Ukrainio ua +Ucrania ua +Ukraina ua +Ukrania ua +اکراین ua +Ukraina ua +Ukraina ua +Oekraïne ua +An Úcráin ua +Ucrania ua +×וקר××™× ×” ua +उकà¥à¤°à¥‡à¤¨ ua +Ukrajina ua +Ukrajna ua +Ukraina ua +Úkraína ua +Ucraina ua +ウクライナ ua +អ៊ុយក្រែន ua +ìš°í¬ë¼ì´ë‚˜ ua +àºàº¹à»€àº„ຣນ ua +Ukraina ua +Ukraina ua +Украина ua +Украйн ua +Ukranja ua +Ukraina ua +Oekraïne ua +Ukraina ua +Ucraina ua +ਯੂਕਰੇਨ ua +Ukraina ua +Ucrânia ua +Ucrânia ua +Ucraina ua +Украина ua +Ukerene ua +Ukraina ua +Ukrajina ua +Ukrajina ua +Украјина ua +Ukrajina ua +I-Ukraine ua +Ukraina ua +உகà¯à®°à¯†à®¯à¯à®©à¯ ua +Украина ua +ยูเครน ua +Ukrayna ua +Ukrain ua +Україна ua +Украина ua +Ukraina ua +Oucrinne ua +乌克兰 ua +çƒå…‹è˜­ ua +Uganda ug +أوغندا ug +Uqanda ug +Уганда ug +Уганда ug +ইউগাণà§à¦¡à¦¾ ug +Ouganda ug +Wganda ug +Ουγκάντα ug +Ugando ug +اوگاندا ug +Ouganda ug +×וגנדה ug +उगांडा ug +Úganda ug +ウガンダ ug +អ៊ូហ្គង់ដា ug +우간다 ug +à»àºžàº™àº”້າ ug +Уганда ug +Уганда ug +ਯੂਗਾਂਡਾ ug +Уганда ug +Уганда ug +உகானà¯à®Ÿà®¾ ug +Угондо ug +ยูà¸à¸±à¸™à¸”า ug +Уганда ug +Уганда ug +Ouganda ug +乌干达 ug +çƒå¹²é” ug +United States of America us +Vereenigde State van Amerika us +الولايات المتحدة الأمريكية us +Amerika BirləşmiÅŸ Åžtatları us +Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ ÐмÑрыкі us +СÐЩ us +মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° us +Stadoù-Unanet Amerika us +Sjedinjene AmeriÄke Države us +Estats Units d'Amèrica us +Spojené státy americké us +Unol Daleithau America us +USA us +USA us +Ηνωμένες Πολιτείες της ΑμεÏικής us +Usono us +Estados Unidos de América us +Ameerika Ühendriigid us +Ameriketako Estatu Batuak us +ایالات متحده‌ی آمریکا us +Yhdysvallat us +Sambandsríki Amerika (USA) us +États Unis d'Amérique us +Ferienigde Staten fan Amerika us +Stáit Aontaithe Mheiriceá us +Estados Unidos de América us +×רצות הברית us +संयà¥à¤•à¥à¤¤ राजà¥à¤¯ अमेरिका us +Sjedinjene AmeriÄke Države us +Amerikai Egyesült Ãllamok us +Amerika Serikat us +Bandaríkin us +Stati Uniti d'America us +アメリカåˆè¡†å›½ us +សហរដ្ឋអាមáŸážšáž·áž€ us +미 합중국 us +ສະຫະລັດອາເມລິàºàº² us +JungtinÄ—s Amerikos Valstijos us +Amerikas SavienotÄs Valstis us +Соединети ÐмериканÑки Држави us +ÐÐУ us +Amerika Syarikat us +Stati Uniti us +USA us +Vereenigte Staten vun Amerika us +Verenigde Staten van Amerika us +USA us +Estats Units d'Amèrica us +ਸੰਯà©à¨•ਤ ਰਾਜ ਅਮਰੀਕਾ us +Stany Zjednoczone Ameryki us +Estados Unidos da América us +Estados Unidos da América us +Statele Unite ale Americii us +Соединённые Штаты Ðмерики us +Leta Zunze Ubumwe z'Amerika us +Amerihká ovttastuvvan stáhtat us +USA us +Združene države Amerike us +Сједињене америчке државе us +Sjedinjene ameriÄke države us +I-United States of America us +Amerikas förenta stater us +à®à®•à¯à®•ிய அமெரிகà¯à®•ா us +Иёлоти Муттаҳидаи Ðмрико us +สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² us +Amerika BirleÅŸik Devletleri us +Amerika QuÅŸma Åžtatları us +СШРus +Ðмерика Қўшма Штатлари us +mashango o tangananaho a America us +Hợp chá»§ng quốc Hoa Kỳ us +Estats Unis us +United States ye Melika us +美国 us +美利堅åˆçœ¾åœ‹ us +Uruguay uy +الأوروغواي uy +Uruqvay uy +Уругвай uy +Уругвай uy +উরà§à¦—à§à§Ÿà§‡ uy +Urugvaj uy +Uruguai uy +Wrwgw?i uy +ΟυÏουγουάη uy +Urugvajo uy +Uruguai uy +اروگویه uy +Uragua uy +Uruguai uy +×ורוגו××™ uy +उरूगà¥à¤µà¥‡ uy +Urugvaj uy +Úrúgvæ uy +ウルグアイ uy +អ៊ុយរុយហ្គាយ uy +ìš°ë£¨ê³¼ì´ uy +ອຸລຸàºàºàº§àº uy +Urugvajus uy +Urugvaja uy +Уругвај uy +Уругвай uy +Urugwaj uy +Uruguai uy +ਉਰੂਗਵੇ uy +Urugwaj uy +Uruguai uy +Uruguai uy +Uruguai uy +Уругвай uy +Irigwe uy +Uruguaj uy +Urugvaj uy +Уругвај uy +Urugvaj uy +I-Uruguay uy +உரà¯à®•à¯à®µà¯‡ uy +Уругвай uy +อุรุà¸à¸§à¸±à¸¢ uy +Уругвай uy +Уругвай uy +Ourougway uy +乌拉圭 uy +çƒæ‹‰åœ­ uy +Uzbekistan uz +أوزبكستان uz +ÖzbÉ™kistan uz +УзбÑкіÑтан uz +УзбекиÑтан uz +উজবেকিসà§à¦¤à¦¾à¦¨ uz +Ouzbekistan uz +Uzbekistán uz +Wsbecist?n uz +Usbekistan uz +Ουζμπεκιστάν uz +Uzbekujo uz +Uzbekistán uz +Usbekistan uz +ازبکستان uz +Ouzbékistan uz +Úisbéiceastáin uz +Uzbekistán uz +×וזבקיסטן uz +उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨ uz +Üzbegisztán uz +Úsbekistan uz +ウズベキスタン uz +អ៊ូហ្សបáŸáž‚ីស្ážáž„់ uz +우즈베키스탄 uz +ເດນ່ງນ uz +UzbekistÄna uz +УзбекиÑтан uz +УзбекÑтан uz +Użbekistan uz +Usbekistan uz +Usbekistan uz +Usbekistan uz +ਉਜ਼ੇਬਕਸਤਾਨ uz +Uzbequistão uz +Uzbequistão uz +УзбекиÑтан uz +Uzibekisitani uz +Usbekistan uz +УзбекиÑтан uz +உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯ uz +ӮзбекиÑтон uz +อุซเบà¸à¸´à¸ªà¸–าน uz +Özbekistan uz +Özbäkstan uz +УзбекиÑтан uz +ЎзбекиÑтон uz +Ouzbekistan uz +ä¹Œå…¹åˆ«å…‹æ–¯å¦ uz +çƒèŒ²åˆ¥å…‹ uz +Vatican City va +Vatikaan Stad va +مدينة Ø§Ù„ÙØ§ØªÙŠÙƒØ§Ù† va +Vatican ŞəhÉ™ri va +Ватыкан va +Ватикана va +ভà§à¦¯à¦¾à¦Ÿà¦¿à¦•ান সিটি va +Ker Vatikan va +Vatikan va +Ciutat del Vaticà va +Vatikán va +Dinas y Fatican va +Vatikanstaten va +Vatikanstadt va +Βατικανό va +Vatikano va +Vaticano va +Vatikan va +Batikano Hiria va +شهر واتیکان va +Vatikaani va +Vatican va +Vaticaanstad va +An Chathaoir Naofa va +Cidade do Vaticano va +הוותיקן va +वेटिकन सिटी va +Vatikan va +Vatikán va +Vatíkanið va +Città del Vaticano va +ãƒãƒã‚«ãƒ³å¸‚国 va +ក្រុង​វ៉ាទីកង់ va +바티칸 시티 va +ລັດເວີຠva +VatikÄns va +Ватикан va +Ватикан Ñити va +Vatikan va +Vatikanstaten va +Vatikaan va +Vaticaanstad va +Vatikanstaten va +ਵਾਟੀਕੇਨ ਸਿਟੀ va +Watykan va +Cidade do Vaticano va +Cidade do Vaticano va +Vatican, OraÅŸul va +Ватикан va +Umujyi wa Vatikani va +Vatikanstáhta va +Vatikán va +Vatikan va +Ватикан va +Vatikan va +Vatikanstaten va +வாடிகன௠நகரம௠va +Шаҳри Ватикан va +นครรัà¸à¸§à¸²à¸•ิà¸à¸±à¸™ va +Vatikan va +Vatikan va +Ватікан va +Ватикан Шаҳри va +Thành phố Vatican va +Vatican va +梵蒂冈 va +梵諦岡城 va +St. Vincent and the Grenadines vc +St. Vincent en die Grenadene vc +سانت Ùينسنت Ùˆ الغرينادين vc +St. Vincent vÉ™ Grenadines vc +СÑнт-ВінÑÑнт Ñ– ГрÑнадыны vc +Св. ВинÑет и Гренадините vc +সেনà§à¦Ÿ ভিনসেনà§à¦Ÿ ও গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¿à¦¨ vc +S. Visant hag ar Grenadinez vc +Sveti Vincent i Grenadini vc +St. Vincent i les Granadines vc +St. Vincent a Grenadiny vc +Ynysoedd St. Finsent a'r Grenadinau vc +St. Vincent og Grenadinerne vc +St. Vincent und Grenadinen vc +Άγιος Βικέντιος και ΓÏεναδίνες vc +Sent-Vincento kaj la Grenadinoj vc +San Vicente y las Granadinas vc +St. Vincent ja Grenadiinid vc +St. Vincent eta Grenadines vc +سن وینسن Ùˆ گرادینس vc +St. Vincent ja Grenadiinit vc +Sankta Vinsent og Grenadinoyggjar vc +St Vincent et les Grenadines vc +St. Vincent en de Grenadines vc +St. Vincent agus Grenadines vc +Santo Vicente e as Granadinas vc +סנט וינסנט ×•×”×’×¨× ×“×™× ×™× vc +सेंट विंसेंट तथा गà¥à¤°à¥‡à¤¨à¥‡à¤¡à¤¾à¤‡à¤¨à¥à¤¸ vc +St. Vincent és Grenadines vc +St. Vincent dan the Grenadines vc +Sankti Vinsent og Grenadíneyjar vc +Saint Vincent e Grenadines vc +セントヴィンセントグレナディン vc +សង់វាំងសង់ និង ​ហ្គ្រីណាឌីន vc +세ì¸íЏ 빈센트 그레나딘 vc +ເຊີນວິນà»àºŠàº™ à»àº¥àº°à»€àºàº™àº²àº”ີນ vc +Å v. Vincentas ir Grenadinai vc +Sentvinsenta un GrenadÄ«nes vc +Св. ВинÑент и Гренадите vc +St. ВинÑент ба Гренадин vc +St. Vincent dan Grenadines vc +St. VinÄ‹enz u l-Grenadini vc +St. Vincent og Grenadinene vc +St. Vincent un de Grenadinen vc +St. Vincent en de Grenadines vc +St. Vincent og Grenadinane vc +St. Vincent le Grenadines vc +St. Vincent e les Granadines vc +ਸੇਂਟ ਵੀਨਸੈਂਟ ਤੇ ਗਰੀਨਾਜੀਨਸ vc +St. Vincent i Grenadyny vc +São Vicente e Granadinas vc +São Vicente e Grenadines vc +Sf. Vincent ÅŸi Grenadines vc +Сент-ВинÑент и Гренадины vc +Mutagatifu Visenti na Gerenadine vc +St. Vincent ja the Grenadiinnat vc +St. Vincent a Grenadines vc +Sv. Vincent in Grenadini vc +Св. ВинÑент и Гренадини vc +Sv. Vinsent i Grenadini vc +I-St. Vincent and the Grenadines vc +St. Vincent och Grenadinerna vc +செயினà¯à®Ÿà¯ வினà¯à®šà¯†à®©à¯à®Ÿà¯ மறà¯à®±à¯à®®à¯ கà¯à®°à¯€à®©à®¾à®Ÿà¯ˆà®©à¯à®¸à¯ vc +Синт ВинÑент ва Гренадина vc +เà¸à¸²à¸°à¹€à¸‹à¸™à¸•์วินเซนต์ vc +St. Vincent ve Grenadines vc +Sain Vinsent wä Grenadinnär vc +Сент-ВінÑент Ñ– Гренадіни vc +Сент-ВинÑент ва Гренадина vc +St. Vincent na Grenadines vc +St. Vincent và Grenadines vc +St. Vincint et les Grenadines vc +St. Vincent ne Grenadines vc +åœ£æ–‡æ£®ç‰¹å’Œæ ¼æž—çº³ä¸æ–¯ vc +è–æ–‡æ£®åŠæ ¼ç´é‚£ä¸ vc +I-St. Vincent kanye ne-Grenadines vc +Venezuela ve +Ùنزويلا ve +Venesuella ve +Ð’ÑнÑÑуÑла ve +ВенеÑуела ve +ভেনেজà§à§Ÿà§‡à¦²à¦¾ ve +Venecuela ve +Veneçuela ve +Feneswela ve +Βενεζουέλα ve +Venezuelo ve +Venetsueela ve +ونزویلا ve +Venesuela ve +Vénézuela ve +Veiniséala ve +ונצו×לה ve +वेनेजà¥à¤à¤²à¤¾ ve +Venecuela ve +Venesúela ve +ベãƒã‚ºã‚§ãƒ© ve +ážœáŸážŽáŸáž áŸ’សុ៊យអáŸáž¡áž¶ ve +ë² ë„¤ìˆ˜ì—˜ë¼ ve +ເວເນຊຸເອລາ ve +Venesuela ve +VenecuÄ“la ve +Венецуела ve +ВинеÑÑуел ve +Veneżwela ve +ਵੈਂਨਜ਼ੂà¨à¨²à¨¾ ve +Wenezuela ve +ВенеÑуÑла ve +Venezuwela ve +Венецуела ve +Venecuela ve +I-Venezuela ve +வெனிசà¯à®²à®¾ ve +ВинизуÑлло ve +เวเนซุเอลา ve +ВенеÑуела ve +ВенеÑуÑла ve +Venezwela ve +委内瑞拉 ve +委內瑞拉 ve +Virgin Islands, British vg +Virgin Eilande, Brits vg +الجزر العذراء, بريطانيا vg +Virgin Adaları, Britanya vg +БрытанÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vg +БританÑки ВирджинÑки оÑтрови vg +ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ vg +DjeviÄanska ostrva, Britanska vg +Illes Verges, Angleses vg +Ynysoedd yr Wyryf, Prydeinig vg +Britiske jomfruøer vg +Virgin-Inseln, britisch vg +ΠαÏθένοι Îήσοι, Î’Ïετανικές vg +Virgininsuloj, Britaj vg +Islas Vírgenes Británicas vg +Briti Neitsisaared vg +Britaniar Irla Birjinak vg +جزایر ویرجین انگلیسی vg +Brittien Neitsytsaaret vg +ÃŽles Vierges britanniques vg +Virgin Eilannen, Britse vg +Oileáin Bhriotanacha na Maighdean vg +Illas Virxes, Británicas vg +××™×™ הבתולה, בריטי vg +वरà¥à¤œà¤¿à¤¨ आइलैंड, बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ vg +DjeviÄansko otoÄje, Britanski vg +Virgin-szigetek (brit) vg +Bresku Jómfrúareyjar vg +Isole Vergini Britanniche vg +英領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vg +កោះ​ស្មោង អង់គ្លáŸážŸ vg +ì˜êµ­ë ¹ 버진 ì œë„ vg +Britu Virdžinu salas vg +ДевÑтвени ОÑтрови, БританÑки vg +Виржин арлууд, британи vg +Kepulauan Virgin, British vg +Jomfruøyene (Storbritannia) vg +Britsche Jumferninseln vg +Virgin Eilanden, Britse vg +Jomfruøyane (Storbritannia) vg +ਵੀਰਗੀਨ ਟਾਪੂ, ਬਰਤਾਨੀਆ vg +Wyspy Dziewicze (Brytyjskie) vg +Ilhas Virgens, Inglaterra vg +Ilhas Virgens, Inglaterra vg +Insulele Virgine, Anglia vg +ВиргинÑкие БританÑкие оÑтрова vg +Ibirwa by'Isugi, Nyongereza vg +Panenské Ostrovy, Britské vg +DeviÅ¡ki otoki, Britanski vg +ДевичанÑка оÑтрва, БританÑка vg +DeviÄanska ostrva, Britanska vg +Brittiska Jungfruöarna vg +விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, பிரிடà¯à®Ÿà®¿à®·à¯ vg +Ҷазираи ВирҷиниÑ, Бритониё vg +หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, อังà¸à¸¤à¸© vg +Virgin Adaları (İngiltere) vg +Virgin Utrawları, Britan vg +ВіргінÑькі оÑтрови (БританіÑ) vg +ÐÐ½Ð³Ð»Ð¸Ñ Ð’Ð¸Ñ€Ð¶Ð¸Ð½ Ороллари vg +Quần đảo Trinh nữ, Vưong quốc Anh vg +Iyes Viedjes, britanikes vg +英属维京群岛 vg +英屬維爾京群島 vg +Virgin Islands, U.S. vi +Virgin Eilande, VSA vi +الجزر العذراء, الولايات المتحدة vi +Virgin Adaları, ABÅž vi +ÐмÑрыканÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы vi +ÐмериканÑки ВирджинÑки оÑтрови vi +ভারà§à¦œà¦¿à¦¨ আইলà§à¦¯à¦¾à¦£à§à¦¡à¦¸, মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦° vi +DjeviÄanska ostrva, AmeriÄka vi +Illes Verges, Americanes vi +Panenské ostrovy, U.S. vi +Ynysoedd yr Wyryf, Americanaidd vi +Jomfruøerne vi +Virgin-Inseln, amerikanisch vi +ΠαÏθένοι Îήσοι, Η.Π.A. vi +Virgininsuloj, Usonaj vi +Islas Vírgenes Americanas vi +USA Neitsisaared vi +Estatu Batuar Irla Birjinak vi +جزایر ویرجین امریکا. vi +USA:n Neitsytsaaret vi +ÃŽles Vierges américaines vi +Virgin Eilannen, U.S. vi +Oileáin na Maighdean S.A.M. vi +Illas Virxes, U.S. vi +××™×™ הבתולה, ×רצות־הברית vi +वरà¥à¤œà¤¿à¤¨ आइलैंड, यू.à¤à¤¸. vi +DjeviÄansko otoÄje, SAD vi +Virgin-szigetek (USA) vi +Bandarísku Jómfrúareyjar vi +Isole Vergini Americane vi +米領ãƒãƒ¼ã‚¸ãƒ³è«¸å³¶ vi +កោះ​ស្មោង អាមáŸážšáž·áž€ vi +미국령 버진 ì œë„ vi +Virdžinu salas, ASV. vi +ДевÑтвени ОÑтрови, СÐД vi +Виржин арлууд, ÐÐУ vi +Kepulauan Virgin, U.S. vi +Jomfruøyene (USA) vi +Jumferninseln, U.S. vi +Virgin Eilanden, U.S. vi +Jomfruøyane (USA) vi +ਵੀਰਗੀਨ ਟਾਪੂ, ਅਮਰੀਕਾ vi +Wyspy Dziewicze (USA) vi +Ilhas Virgens, E.U.A. vi +Ilhas Virgens, EUA vi +Insulele Virgine, S.U.A. vi +ВиргинÑкие оÑтрова (СШÐ) vi +Ibirwa by'Isugi, U.S. vi +Panenské Ostrovy, Americké vi +DeviÅ¡ki otoki, ZDA vi +ДевичанÑка оÑтрва, СÐД vi +DeviÄanska ostrva, SAD vi +Amerikanska Jungfruöarna vi +விரà¯à®œà®¿à®©à¯ தீவà¯à®•ளà¯, U.S. vi +Ҷазираи ВирҷиниÑ, Ш.М.Ð vi +หมู่เà¸à¸²à¸°à¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™, สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸² vi +Virgin Adaları (ABD) vi +Virgin Utrawları, AQÅž vi +ВіргінÑькі оÑтрови (СШÐ) vi +ÐҚШ Виржин Ороллари vi +Quần đảo Trinh nữ, Hoa Kỳ vi +Iyes Viedjes, etazunyinnes vi +美属维京群岛 vi +美屬維爾京群島 vi +Vietnam vn +Viëtnam vn +Ùييتنام vn +Vyetnam vn +Віетнам vn +Виетнам vn +ভিয়েতনাম vn +Vijetnam vn +Panenské ostrovy, U.K. vn +Fiet-nam vn +Βιετνάμ vn +Vjetnamio vn +ویتنام vn +Viëtnam vn +Vítneam vn +וייטנ×× vn +विà¤à¤¤à¤¨à¤¾à¤® vn +Vijetnam vn +Víetnam vn +ベトナム vn +វៀážážŽáž¶áž˜ vn +베트남 vn +ຫວງດນາມ vn +Vietnamas vn +Vjetnama vn +Виетнам vn +Витнам vn +Vjetnam vn +Viëtnam vn +ਵੀਅਤਨਾਮ vn +Wietnam vn +Vietname vn +Vietnã vn +Вьетнам vn +Viyetinamu vn +Вијетнам vn +Vijetnam vn +I-Vietnam vn +வியடà¯à®¨à®¾à®®à¯ vn +Ветнам vn +เวียตนาม vn +Ð’'єтнам vn +Ветнам vn +Việt Nam vn +è¶Šå— vn +è¶Šå— vn +Vanuatu vu +ÙØ§Ù†ÙˆØ§ØªÙˆ vu +Вануату vu +Вануату vu +ভানà§à§Ÿà¦¾à¦Ÿà§ vu +Fanwatw vu +Βανουάτου vu +Vanuatuo vu +وانواتو vu +Vanuatú vu +ונו×טו vu +वनौतू vu +Vanúatú vu +ãƒãƒŒã‚¢ãƒ„ vu +វ៉ានុយអាទុយ vu +바누아투 vu +ຈີນ vu +Вануату vu +Вануату vu +ਵਾਨà©à¨†à¨Ÿà©‚ vu +Vanatu vu +Вануату vu +Vanuwatu vu +Вануату vu +வனட௠vu +Вануату vu +à¹à¸§à¸™à¸±à¸§à¸•ู vu +Вануату vu +Вануату vu +瓦努阿图 vu +è¬é‚£æœ vu +Wallis and Futuna wf +Wallis en Futuna wf +واليس Ùˆ Ùوتونا wf +Vallis vÉ™ Futuna wf +ÐŽÐ¾Ð»Ñ–Ñ Ñ– Футуна wf +ОÑтрови Ð£Ð¾Ð»Ð¸Ñ Ð¸ Футина wf +ওয়ালিস à¦à¦¬à¦‚ ফà§à¦Ÿà§à¦¨à¦¾ wf +Wallis ha Futuna wf +Valis i Futuna wf +Wallis i Futuna wf +Wallis a Futuna wf +Ynysoedd Walis a Ffwtwna wf +Wallis- og Futuna-øerne wf +Wallis und Futuna wf +Βαλίς και ΦουτοÏνα wf +Valiso kaj Futuno wf +Wallis y Futuna wf +Wallis ja Futuna wf +Wallis eta Futuna wf +والیس Ùˆ Ùوتونا wf +Wallis ja Futuna wf +Wallis et Futuna wf +Wallis en Futuna wf +Bhailís agus Futúna wf +Wallis e Futuna wf +ו×ליס ופוטונה wf +वालिस तथा फà¥à¤¤à¥à¤¨à¤¾ wf +Wallis i Futuna wf +Wallis és Futuna wf +Wallis- og Fútúnaeyjar wf +Wallis e Futuna wf +ä»é ˜ãƒ¯ãƒªã‚¹ãƒ•ツナ諸島 wf +월리스 후투나 ì œë„ wf +ປັàºàº­àº´àº™àºžàº²àºš wf +Volisa salas un Futuna wf +Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf +ВилÑÐ¼Ñ Ð±Ð° футуна wf +Wallis dan Futuna wf +Wallis u Futuna wf +Wallis og Futuna wf +Wallis un Futuna wf +Wallis en Futuna wf +Wallis og Futuna wf +ਵਾਲਿਸ਼ ਤੇ ਫੂਟੂਨਾ wf +Wallis i Futuna wf +Wallis e Futuna wf +Wallis e Futuna wf +Wallis ÅŸi Futuna wf +ОÑтрова Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¸ Футуна wf +Walisi na Futuna wf +Wallis ja Futuna wf +Wallis a Futuna wf +Wallis in Futuna wf +Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна wf +Valis i Futuna wf +Wallis och Futuna wf +வாலிஸ௠மறà¯à®±à¯à®®à¯ பà¯à®¯à¯à®Ÿà®©à®¾ wf +УÑÐ»Ñ Ð²Ð° Футуна wf +วอลลิสà¹à¸¥à¸°à¸Ÿà¸¹à¸—ูนา wf +Wallis ve Futuna wf +Wallis wä Futuna wf +Ð£Ð¾Ð»Ð»Ð¸Ñ Ñ– Футуна wf +Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ð° Футуна Ороллари wf +Wallis và Futuna wf +Wallis et Futuna wf +瓦利斯和富图纳群岛 wf +瓦利斯群島和富圖ç´ç¾¤å³¶ wf +Samoa ws +ساموا ws +Самоа ws +Самоа ws +সামোয়া ws +Inizi Samoe ws +Σαμόα ws +Samoo ws +ساموآ ws +Samó ws +סמו××” ws +सामोआ ws +Szamoa ws +Samóa ws +サモア ws +សាមូអា ws +사모아 ì œë„ ws +ໂຊນາ ws +Самоа ws +Самолоа ws +ਸਾਮੋਆ ws +Самоа ws +Samowa ws +Самоа ws +சாமோயா ws +Самоа ws +ซามัว ws +Самоа ws +Самоа ws +Samowa ws +è¨æ‘©äºšç¾¤å²› ws +薩摩亞 ws +Yemen ye +اليمن ye +YÉ™mÉ™n ye +Емен ye +Йемен ye +ইয়েমেন ye +Ihlemeñ ye +Jemen ye +Iemen ye +Jemen ye +Yr Iemen ye +Jemen ye +Υεμένη ye +Jemeno ye +Jeemen ye +یمن ye +Jemen ye +Jemen ye +Jemen ye +Éimin ye +Iemen ye +תימן ye +यमन ye +Jemen ye +Jemen ye +Jemen ye +イエメン ye +áž™áŸáž˜áŸ‚áž“ ye +예멘 ye +ເດມອນ ye +Jemenas ye +Jemena ye +Јемен ye +Емен ye +Yaman ye +Jemen ye +Jemen ye +Jemen ye +Jemen ye +Jemen ye +ਯਮਨ ye +Jemen ye +Iémen ye +Йемен ye +Yemeni ye +Jemen ye +Jemen ye +Jemen ye +Јемен ye +Jemen ye +I-Yemen ye +Jemen ye +யேமன௠ye +Яман ye +เยเมน ye +Ємен ye +Яман ye +也门 ye +葉門 ye +Serbia and Montenegro yu +Serbië en Montenegro yu +Ð¡ÑŠÑ€Ð±Ð¸Ñ Ð¸ Черна гора yu +সারà§à¦¬à¦¿à§Ÿà¦¾ à¦à¦¬à¦‚ মনà§à¦Ÿà§‡à¦¨à¦¿à¦—à§à¦°à§‹ yu +Serbi ha Montenegro yu +Sèrbia i Montenegro yu +Srbsko a ÄŒerná hora yu +Serbien og Montenegro yu +Serbien und Montenegro yu +ΣεÏβία - ΜαυÏοβοÏνιο yu +Serbia y Montenegro yu +Serbia ja TÅ¡ernogooria yu +Serbia eta Montenegro yu +Serbia ja Montenegro yu +Serbie and Monténégro yu +Servië en Montenegro yu +Sérbia e Montenegro yu +Szerbia és Montenegró yu +Serbía og Svartfjallaland yu +Serbia e Montenegro yu +セルビアモンテãƒã‚°ãƒ­ yu +សែប៊ី និង ម៉ុងážáŸážŽáŸáž áŸ’ក្រូ yu +Serbija ir Juodkalnija yu +Србија и Црна Гора yu +Serbia og Montenegro yu +Serbien un Montenegro yu +Servië en Montenegro yu +Serbia og Montenegro yu +ਸਰਬੀਆ ਅਤੇ ਮਾਂਤਾਂਗਰੋ yu +Serbia i Czarnogóra yu +Sérvia e Montenegro yu +Sérvia e Montenegro yu +Ð¡ÐµÑ€Ð±Ð¸Ñ Ð¸ Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾Ñ€Ð¸Ñ yu +Seribiya na Montenegoro yu +Serbia ja Montenegro yu +Srbija in ÄŒrna gora yu +Србија и Црна Гора yu +Srbija i Crna Gora yu +Serbien och Montenegro yu +เซอร์เบีย à¹à¸¥à¸°à¸¡à¸­à¸™à¸•ิเนโà¸à¸£ yu +Sırbistan KaradaÄŸ yu +Serbia wä Montenegro yu +Ð¡ÐµÑ€Ð±Ñ–Ñ Ñ– Ð§Ð¾Ñ€Ð½Ð¾Ð³Ð¾Ñ€Ñ–Ñ yu +Ð¡ÐµÑ€Ð±Ð¸Ñ Ð²Ð° Монтенегро yu +塞尔维亚和黑山 yu +塞爾維亞和黑山 yu +South Africa za +Suid-Afrika za +جنوب Ø£ÙØ±ÙŠÙ‚يا za +CÉ™nubi Afrika za +ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ðфрыка za +Южна Ðфрика za +দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া za +Suafrika za +Južna Afrika za +Sudàfrica za +Jižní Afrika za +De Affrica za +Sydafrikanske republik za +Südafrika za +Îότια ΑφÏική za +Sudafriko za +Sudáfrica za +Lõuna-Aafrika za +Hego Afrika za +Ø¢ÙØ±ÛŒÙ‚ای جنوبی za +Etelä-Afrikka za +Suðurafrika za +Afrique du sud za +Sûd-Afrika za +An Afraic Theas za +Ãfrica do Sur za +×“×¨×•× ×פריקה za +दकà¥à¤·à¤¿à¤£à¥€ अफà¥à¤°à¥€à¤•ा za +Južna Afrika za +Dél-Afrika za +Afrika Selatan za +Suður-Afríka za +Sud Africa za +å—アフリカ za +អាហ្វ្រិក​ážáž¶áž„​ážáŸ’បូង za +남 아프리카 공화국 za +à»àº­àºšàºžàº´àºàº²à»ƒàº•້ za +Afrika, Pietų za +DienvidÄfrika za +Јужна Ðфрика za +Өмнөд африк za +Afrika Selatan za +Afrika t'Isfel za +Sør-Afrika za +Söödafrika za +Zuid-Afrika za +Sør-Afrika za +Afrika Borwa za +Sudafrica za +ਦੱਖਣੀ ਅਫਰੀਕਾ za +Afryka PoÅ‚udniowa za +Ãfrica do Sul za +Ãfrica do Sul za +Africa de Sud za +Ð®Ð¶Ð½Ð°Ñ Ðфрика za +Afurika Yepfo za +Lulli-Afrihká za +Južná Afrika za +Južna Afrika za +Јужна Ðфрика za +Južna Afrika za +I-South Africa za +Sydafrika za +தென௠ஆபà¯à®°à®¿à®•à¯à®•ா za +Ðфриқои Ҷанубӣ za +à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้ za +Güney Afrika za +Könyaq Afrika za +Південна Ðфрика za +Жанубий Ðфрика za +Afurika tshipembe za +Nam Phi za +Nonne Afrike za +Mzantsi Afrika za +å—éž za +å—éž za +Emzantsi Afrika za +Zambia zm +Zambië zm +زامبيا zm +Zambiya zm +Ð—Ð°Ð¼Ð±Ñ–Ñ zm +Ð—Ð°Ð¼Ð±Ð¸Ñ zm +জামবিয়া zm +Zambi zm +Zàmbia zm +Zambie zm +Sambia zm +Sambia zm +Ζάμπια zm +Zambio zm +Sambia zm +زامبیا zm +Sambia zm +Zambie zm +An tSaimbia zm +Zámbia zm +זמביה zm +ज़ामà¥à¤¬à¤¿à¤¯à¤¾ zm +Zambija zm +Sambía zm +ザンビア zm +ហ្សាំប៊ី zm +잠비아 zm +ຈາໄມàºàº²à»‰ zm +Zambija zm +Замбија zm +Замби zm +Å»ambia zm +Sambia zm +ਜੈਂਬੀਆ zm +Zâmbia zm +Zâmbia zm +Ð—Ð°Ð¼Ð±Ð¸Ñ zm +Zambiya zm +Zambija zm +Замбија zm +Zambija zm +ஜாமà¯à®ªà®¿à®¯à®¾ zm +Зомбиё zm +à¹à¸‹à¸¡à¹€à¸šà¸µà¸¢ zm +Ð—Ð°Ð¼Ð±Ñ–Ñ zm +Ð—Ð°Ð¼Ð±Ð¸Ñ zm +Zambeye zm +赞比亚 zm +尚比亞 zm +Zimbabwe zw +زيمبابوي zw +Zimbabve zw +Ð—Ñ‹Ð¼Ð±Ð°Ð±Ð²Ñ zw +Зимбабве zw +জিমà§à¦¬à¦¾à¦¬à§‹à§Ÿà§‡ zw +Zimbabve zw +Simbabwe zw +Simbabwe zw +Ζιμπάμπουε zw +Zimbabvo zw +زیمبابوه zw +An tSiombáib zw +Zimbabué zw +זימבבווה zw +जिमà¥à¤¬à¤¾à¤¬à¤µà¥‡ zw +Zimbabve zw +Simbabve zw +ジンãƒãƒ–エ zw +ហ្ស៊ីមបាបវ៉០zw +ì§ë°”브웨 zw +ລິຊາ zw +Zimbabve zw +Зимбабве zw +Замбабив zw +Å»imbabwe zw +Simbabwe zw +ਜਿੰਬਾਬਵੇਂ zw +Zimbabue zw +Зимбабве zw +Zimbabve zw +Зимбабве zw +Zimbabve zw +ஜிமà¯à®ªà®¾à®ªà¯‡ zw +Зимбобве zw +ซิมบับเว zw +Зімбабве zw +Зимбабве zw +Zimbabwè zw +津巴布韦 zw +è¾›å·´å¨ zw +Czech Republic cz diff --git a/tdeabc/distributionlist.cpp b/tdeabc/distributionlist.cpp new file mode 100644 index 000000000..ee058ecdf --- /dev/null +++ b/tdeabc/distributionlist.cpp @@ -0,0 +1,298 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include +#include +#include + +#include "distributionlist.h" + +using namespace KABC; + +DistributionList::DistributionList( DistributionListManager *manager, + const TQString &name ) : + mManager( manager ), mName( name ) +{ + mManager->insert( this ); +} + +DistributionList::~DistributionList() +{ + mManager->remove( this ); +} + +void DistributionList::setName( const TQString &name ) +{ + mName = name; +} + +TQString DistributionList::name() const +{ + return mName; +} + +void DistributionList::insertEntry( const Addressee &a, const TQString &email ) +{ + Entry e( a, email ); + + TQValueList::Iterator it; + for( it = mEntries.begin(); it != mEntries.end(); ++it ) { + if ( (*it).addressee.uid() == a.uid() ) { + /** + We have to check if both email addresses contains no data, + a simple 'email1 == email2' wont work here + */ + if ( ( (*it).email.isNull() && email.isEmpty() ) || + ( (*it).email.isEmpty() && email.isNull() ) || + ( (*it).email == email ) ) { + *it = e; + return; + } + } + } + mEntries.append( e ); +} + +void DistributionList::removeEntry( const Addressee &a, const TQString &email ) +{ + TQValueList::Iterator it; + for( it = mEntries.begin(); it != mEntries.end(); ++it ) { + if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { + mEntries.remove( it ); + return; + } + } +} + +TQStringList DistributionList::emails() const +{ + TQStringList emails; + + Entry::List::ConstIterator it; + for( it = mEntries.begin(); it != mEntries.end(); ++it ) { + Addressee a = (*it).addressee; + TQString email = (*it).email.isEmpty() ? a.fullEmail() : + a.fullEmail( (*it).email ); + + if ( !email.isEmpty() ) { + emails.append( email ); + } + } + + return emails; +} + +DistributionList::Entry::List DistributionList::entries() const +{ + return mEntries; +} + +typedef TQValueList< QPair > MissingEntryList; + +class DistributionListManager::DistributionListManagerPrivate +{ + public: + AddressBook *mAddressBook; + TQMap< TQString, MissingEntryList > mMissingEntries; +}; + +DistributionListManager::DistributionListManager( AddressBook *ab ) + : d( new DistributionListManagerPrivate ) +{ + d->mAddressBook = ab; + mLists.setAutoDelete( true ); +} + +DistributionListManager::~DistributionListManager() +{ + mLists.clear(); + + delete d; + d = 0; +} + +DistributionList *DistributionListManager::list( const TQString &name ) +{ + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + if ( list->name() == name ) return list; + } + + return 0; +} + +void DistributionListManager::insert( DistributionList *l ) +{ + if ( !l ) + return; + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + if ( list->name() == l->name() ) { + mLists.remove( list ); + break; + } + } + mLists.append( l ); +} + +void DistributionListManager::remove( DistributionList *l ) +{ + if ( !l ) + return; + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + if ( list->name() == l->name() ) { + mLists.remove( list ); + return; + } + } +} + +TQStringList DistributionListManager::listNames() +{ + TQStringList names; + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + names.append( list->name() ); + } + + return names; +} + +bool DistributionListManager::load() +{ + KSimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) ); + + TQMap entryMap = cfg.entryMap( "DistributionLists" ); + cfg.setGroup( "DistributionLists" ); + + // clear old lists + mLists.clear(); + d->mMissingEntries.clear(); + + TQMap::ConstIterator it; + for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it ) { + TQString name = it.key(); + TQStringList value = cfg.readListEntry( name ); + + kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; + + DistributionList *list = new DistributionList( this, name ); + + MissingEntryList missingEntries; + TQStringList::ConstIterator entryIt = value.constBegin(); + while( entryIt != value.constEnd() ) { + TQString id = *entryIt++; + TQString email = *entryIt; + + kdDebug(5700) << "----- Entry " << id << endl; + + Addressee a = d->mAddressBook->findByUid( id ); + if ( !a.isEmpty() ) { + list->insertEntry( a, email ); + } else { + missingEntries.append( qMakePair( id, email ) ); + } + + if ( entryIt == value.end() ) + break; + ++entryIt; + } + + d->mMissingEntries.insert( name, missingEntries ); + } + + return true; +} + +bool DistributionListManager::save() +{ + kdDebug(5700) << "DistListManager::save()" << endl; + + KSimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) ); + + cfg.deleteGroup( "DistributionLists" ); + cfg.setGroup( "DistributionLists" ); + + DistributionList *list; + for( list = mLists.first(); list; list = mLists.next() ) { + kdDebug(5700) << " Saving '" << list->name() << "'" << endl; + + TQStringList value; + const DistributionList::Entry::List entries = list->entries(); + DistributionList::Entry::List::ConstIterator it; + for( it = entries.begin(); it != entries.end(); ++it ) { + value.append( (*it).addressee.uid() ); + value.append( (*it).email ); + } + + if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) { + const MissingEntryList missList = d->mMissingEntries[ list->name() ]; + MissingEntryList::ConstIterator missIt; + for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) { + value.append( (*missIt).first ); + value.append( (*missIt).second ); + } + } + + cfg.writeEntry( list->name(), value ); + } + + cfg.sync(); + + return true; +} + +DistributionListWatcher* DistributionListWatcher::mSelf = 0; + +DistributionListWatcher::DistributionListWatcher() + : TQObject( tqApp, "DistributionListWatcher" ) +{ + mDirWatch = new KDirWatch; + mDirWatch->addFile( locateLocal( "data", "tdeabc/distlists" ) ); + + connect( mDirWatch, TQT_SIGNAL( dirty( const TQString& ) ), TQT_SIGNAL( changed() ) ); + mDirWatch->startScan(); +} + +DistributionListWatcher::~DistributionListWatcher() +{ + delete mDirWatch; + mDirWatch = 0; +} + +DistributionListWatcher *DistributionListWatcher::self() +{ + kdWarning( !tqApp ) << "No TQApplication object available, you'll get a memleak!" << endl; + + if ( !mSelf ) + mSelf = new DistributionListWatcher(); + + return mSelf; +} + +#include "distributionlist.moc" diff --git a/tdeabc/distributionlist.h b/tdeabc/distributionlist.h new file mode 100644 index 000000000..78d182467 --- /dev/null +++ b/tdeabc/distributionlist.h @@ -0,0 +1,217 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_DISTRIBUTIONLIST_H +#define KABC_DISTRIBUTIONLIST_H + +#include + +#include "addressbook.h" + +namespace KABC { + +class DistributionListManager; + +/** + @short Distribution list of email addresses + + This class represents a list of email addresses. Each email address is + associated with an address book entry. If the address book entry changes, the + entry in the distribution list is automatically updated. +*/ +class KABC_EXPORT DistributionList +{ + public: + /** + @short Distribution List Entry + + This class represents an entry of a distribution list. It consists of an + addressee and an email address. If the email address is null, the + preferred email address of the addressee is used. + */ + struct Entry + { + typedef TQValueList List; + + Entry() {} + Entry( const Addressee &_addressee, const TQString &_email ) : + addressee( _addressee ), email( _email ) {} + + Addressee addressee; + TQString email; + }; + + /** + Create distribution list object. + + @param manager Managing object of this list. + @param name Name of this list. + */ + DistributionList( DistributionListManager *manager, const TQString &name ); + + /** + Destructor. + */ + ~DistributionList(); + + /** + Set name of this list. The name is used as key by the + DistributinListManager. + */ + void setName( const TQString & ); + + /** + Get name of this list. + */ + TQString name() const; + + /** + Insert an entry into this distribution list. If the entry already exists + nothing happens. + */ + void insertEntry( const Addressee &, const TQString &email=TQString::null ); + + /** + Remove an entry from this distribution list. If the entry doesn't exist + nothing happens. + */ + void removeEntry( const Addressee &, const TQString &email=TQString::null ); + + /** + Return list of email addresses, which belong to this distributon list. + These addresses can be directly used by e.g. a mail client. + */ + TQStringList emails() const; + + /** + Return list of entries belonging to this distribution list. This function + is mainly useful for a distribution list editor. + */ + Entry::List entries() const; + + private: + DistributionListManager *mManager; + TQString mName; + + Entry::List mEntries; +}; + +/** + @short Manager of distribution lists + + This class represents a collection of distribution lists, which are associated + with a given address book. +*/ +class KABC_EXPORT DistributionListManager +{ + public: + /** + Create manager for given address book. + */ + DistributionListManager( AddressBook * ); + + /** + Destructor. + */ + ~DistributionListManager(); + + /** + Return distribution list with given name. + */ + DistributionList *list( const TQString &name ); // KDE4: add bool caseSensitive = true + + /** + Insert distribution list. If a list with this name already exists, nothing + happens. The passed object is deleted by the manager. + */ + void insert( DistributionList * ); + + /** + Remove distribution list. If a list with this name doesn't exist, nothing + happens. + */ + void remove( DistributionList * ); + + /** + Return names of all distribution lists managed by this manager. + */ + TQStringList listNames(); + + /** + Load distribution lists form disk. + */ + bool load(); + + /** + Save distribution lists to disk. + */ + bool save(); + + private: + class DistributionListManagerPrivate; + DistributionListManagerPrivate *d; + + TQPtrList mLists; +}; + +/** + @short Watchdog for distribution lists + + This class provides a changed() signal that i emitted when the + distribution lists has changed in some way. + + Exapmle: + + \code + KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() + + connect( watchdog, TQT_SIGNAL( changed() ), TQT_SLOT( doSomething() ) ); + \endcode +*/ + +class KABC_EXPORT DistributionListWatcher : public TQObject +{ + Q_OBJECT + + public: + /** + * Returns the watcher object. + */ + static DistributionListWatcher *self(); + + signals: + /** + * This signal is emmitted whenever the distribution lists has + * changed (if a list was added or removed, when a list was + * renamed or the entries of the list changed). + */ + void changed(); + + protected: + DistributionListWatcher(); + ~DistributionListWatcher(); + + private: + static DistributionListWatcher* mSelf; + KDirWatch *mDirWatch; +}; + +} +#endif diff --git a/tdeabc/distributionlistdialog.cpp b/tdeabc/distributionlistdialog.cpp new file mode 100644 index 000000000..8cd22e8fd --- /dev/null +++ b/tdeabc/distributionlistdialog.cpp @@ -0,0 +1,399 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "addressbook.h" +#include "addresseedialog.h" +#include "distributionlist.h" + +#include "distributionlistdialog.h" +#include "distributionlistdialog.moc" + +using namespace KABC; + +DistributionListDialog::DistributionListDialog( AddressBook *addressBook, TQWidget *parent) + : KDialogBase( parent, "", true, i18n("Configure Distribution Lists"), Ok, Ok, true) +{ + mEditor = new DistributionListEditorWidget( addressBook, this ); + setMainWidget( mEditor ); + + connect( this, TQT_SIGNAL( okClicked() ), mEditor, TQT_SLOT( save() ) ); +} + +DistributionListDialog::~DistributionListDialog() +{ +} + +// TODO KDE4: Add d-pointer to EmailSelector, make sEmailMap a member variable +static TQMap *sEmailMap = 0; + +EmailSelector::EmailSelector( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) : + KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, + parent ) +{ + if (!sEmailMap) + sEmailMap = new TQMap(); + TQFrame *topFrame = plainPage(); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); + + mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), + topFrame ); + topLayout->addWidget( mButtonGroup ); + + TQStringList::ConstIterator it; + for( it = emails.begin(); it != emails.end(); ++it ) { + TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); + sEmailMap->insert( button, *it ); + if ( (*it) == current ) { + mButtonGroup->setButton(mButtonGroup->id(button)); + } + } +} + +TQString EmailSelector::selected() +{ + TQButton *button = mButtonGroup->selected(); + if ( button ) return (*sEmailMap)[button]; + return TQString::null; +} + +TQString EmailSelector::getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) +{ + EmailSelector *dlg = new EmailSelector( emails, current, parent ); + dlg->exec(); + + TQString result = dlg->selected(); + + delete dlg; + + return result; +} + +class EntryItem : public TQListViewItem +{ + public: + EntryItem( TQListView *parent, const Addressee &addressee, + const TQString &email=TQString::null ) : + TQListViewItem( parent ), + mAddressee( addressee ), + mEmail( email ) + { + setText( 0, addressee.realName() ); + if( email.isEmpty() ) { + setText( 1, addressee.preferredEmail() ); + setText( 2, i18n("Yes") ); + } else { + setText( 1, email ); + setText( 2, i18n("No") ); + } + } + + Addressee addressee() const + { + return mAddressee; + } + + TQString email() const + { + return mEmail; + } + + private: + Addressee mAddressee; + TQString mEmail; +}; + +DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, TQWidget *parent) : + TQWidget( parent ), + mAddressBook( addressBook ) +{ + kdDebug(5700) << "DistributionListEditor()" << endl; + + TQBoxLayout *topLayout = new TQVBoxLayout( this ); + topLayout->setSpacing( KDialog::spacingHint() ); + + TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; + + mNameCombo = new TQComboBox( this ); + nameLayout->addWidget( mNameCombo ); + connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); + + mNewButton = new TQPushButton( i18n("New List..."), this ); + nameLayout->addWidget( mNewButton ); + connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); + + mEditButton = new TQPushButton( i18n("Rename List..."), this ); + nameLayout->addWidget( mEditButton ); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) ); + + mRemoveButton = new TQPushButton( i18n("Remove List"), this ); + nameLayout->addWidget( mRemoveButton ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); + + TQGridLayout *gridLayout = new TQGridLayout( topLayout, 3, 3 ); + gridLayout->setColStretch(1, 1); + + TQLabel *listLabel = new TQLabel( i18n("Available addresses:"), this ); + gridLayout->addWidget( listLabel, 0, 0 ); + + mListLabel = new TQLabel( this ); + gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); + + mAddresseeView = new TQListView( this ); + mAddresseeView->addColumn( i18n("Name") ); + mAddresseeView->addColumn( i18n("Preferred Email") ); + mAddresseeView->setAllColumnsShowFocus( true ); + gridLayout->addWidget( mAddresseeView, 1, 0 ); + connect( mAddresseeView, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotSelectionAddresseeViewChanged() ) ); + connect( mAddresseeView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( addEntry() ) ); + + mAddEntryButton = new TQPushButton( i18n("Add Entry"), this ); + mAddEntryButton->setEnabled(false); + gridLayout->addWidget( mAddEntryButton, 2, 0 ); + connect( mAddEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); + + mEntryView = new TQListView( this ); + mEntryView->addColumn( i18n("Name") ); + mEntryView->addColumn( i18n("Email") ); + mEntryView->addColumn( i18n("Use Preferred") ); + mEntryView->setEnabled(false); + mEntryView->setAllColumnsShowFocus( true ); + gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 ); + connect( mEntryView, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotSelectionEntryViewChanged() ) ); + + mChangeEmailButton = new TQPushButton( i18n("Change Email..."), this ); + gridLayout->addWidget( mChangeEmailButton, 2, 1 ); + connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); + + mRemoveEntryButton = new TQPushButton( i18n("Remove Entry"), this ); + gridLayout->addWidget( mRemoveEntryButton, 2, 2 ); + connect( mRemoveEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); + + mManager = new DistributionListManager( mAddressBook ); + mManager->load(); + + updateAddresseeView(); + updateNameCombo(); +} + +DistributionListEditorWidget::~DistributionListEditorWidget() +{ + kdDebug(5700) << "~DistributionListEditor()" << endl; + + delete mManager; +} + +void DistributionListEditorWidget::save() +{ + mManager->save(); +} + +void DistributionListEditorWidget::slotSelectionEntryViewChanged() +{ + EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); + bool state=entryItem; + + mChangeEmailButton->setEnabled(state); + mRemoveEntryButton->setEnabled(state); +} + +void DistributionListEditorWidget::newList() +{ + bool ok; + TQString name = KInputDialog::getText( i18n( "New Distribution List" ), + i18n( "Please enter &name:" ), TQString::null, &ok ); + if (!ok) return; + + new DistributionList( mManager, name ); + + mNameCombo->clear(); + mNameCombo->insertStringList( mManager->listNames() ); + mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); + + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::editList() +{ + TQString oldName = mNameCombo->currentText(); + bool ok; + TQString name = KInputDialog::getText( i18n( "Distribution List" ), + i18n( "Please change &name:" ), oldName, &ok ); + if (!ok) return; + + DistributionList *list = mManager->list( oldName ); + list->setName( name ); + + mNameCombo->clear(); + mNameCombo->insertStringList( mManager->listNames() ); + mNameCombo->setCurrentItem( mNameCombo->count() - 1 ); + + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::removeList() +{ + int result = KMessageBox::warningContinueCancel( this, + i18n("Delete distribution list '%1'?") .arg( mNameCombo->currentText() ), + TQString::null, KStdGuiItem::del() ); + + if ( result != KMessageBox::Continue ) return; + + mManager->remove( mManager->list( mNameCombo->currentText() ) ); + mNameCombo->removeItem( mNameCombo->currentItem() ); + + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::addEntry() +{ + AddresseeItem *addresseeItem = + static_cast( mAddresseeView->selectedItem() ); + + if( !addresseeItem ) { + kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; + return; + } + + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) { + kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; + return; + } + + list->insertEntry( addresseeItem->addressee() ); + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditorWidget::removeEntry() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EntryItem *entryItem = + static_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + list->removeEntry( entryItem->addressee(), entryItem->email() ); + delete entryItem; +} + +void DistributionListEditorWidget::changeEmail() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EntryItem *entryItem = + static_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + TQString email = EmailSelector::getEmail( entryItem->addressee().emails(), + entryItem->email(), this ); + list->removeEntry( entryItem->addressee(), entryItem->email() ); + list->insertEntry( entryItem->addressee(), email ); + + updateEntryView(); +} + +void DistributionListEditorWidget::updateEntryView() +{ + if ( mNameCombo->currentText().isEmpty() ) { + mListLabel->setText( i18n("Selected addressees:") ); + } else { + mListLabel->setText( i18n("Selected addresses in '%1':") + .arg( mNameCombo->currentText() ) ); + } + + mEntryView->clear(); + + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) { + mEditButton->setEnabled(false); + mRemoveButton->setEnabled(false); + mChangeEmailButton->setEnabled(false); + mRemoveEntryButton->setEnabled(false); + mAddresseeView->setEnabled(false); + mEntryView->setEnabled(false); + return; + } else { + mEditButton->setEnabled(true); + mRemoveButton->setEnabled(true); + mAddresseeView->setEnabled(true); + mEntryView->setEnabled(true); + } + + DistributionList::Entry::List entries = list->entries(); + DistributionList::Entry::List::ConstIterator it; + for( it = entries.begin(); it != entries.end(); ++it ) { + new EntryItem( mEntryView, (*it).addressee, (*it).email ); + } + + EntryItem *entryItem = static_cast( mEntryView->selectedItem() ); + bool state=entryItem; + + mChangeEmailButton->setEnabled(state); + mRemoveEntryButton->setEnabled(state); +} + +void DistributionListEditorWidget::updateAddresseeView() +{ + mAddresseeView->clear(); + + AddressBook::Iterator it; + for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + new AddresseeItem( mAddresseeView, *it ); + } +} + +void DistributionListEditorWidget::updateNameCombo() +{ + mNameCombo->insertStringList( mManager->listNames() ); + + updateEntryView(); +} + +void DistributionListEditorWidget::slotSelectionAddresseeViewChanged() +{ + AddresseeItem *addresseeItem = + static_cast( mAddresseeView->selectedItem() ); + bool state=addresseeItem; + mAddEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); +} diff --git a/tdeabc/distributionlistdialog.h b/tdeabc/distributionlistdialog.h new file mode 100644 index 000000000..1bd6fc788 --- /dev/null +++ b/tdeabc/distributionlistdialog.h @@ -0,0 +1,139 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_DISTRIBUTIONLISTDIALOG_H +#define KABC_DISTRIBUTIONLISTDIALOG_H + +#include + +#include + +class TQListView; +class TQComboBox; +class TQButtonGroup; + +namespace KABC { + +class AddressBook; +class DistributionListEditorWidget; +class DistributionListManager; + +/** + @short Frontend to create distribution lists + + Creating a new DistributionListDialog does automatically + load all addressees and distribution lists from the config + files. The changes will be saved when clicking the 'OK' + button. + + Example: + + \code + KABC::DistributionListDialog *dlg = new + KABC::DistributionListDialog( KABC::StdAddressBook::self(), this ); + + dlg->exec(); + \endcode +*/ +class KABC_EXPORT DistributionListDialog : public KDialogBase +{ + Q_OBJECT + + public: + /** + Constructor. + + @param ab The addressbook, the addressees should be used from + @param parent The parent widget + */ + DistributionListDialog( AddressBook *ab, TQWidget *parent ); + + /** + Destructor. + */ + virtual ~DistributionListDialog(); + + private: + DistributionListEditorWidget *mEditor; + + struct Data; + Data *d; +}; + +/** + @short Helper class +*/ +class KABC_EXPORT EmailSelector : public KDialogBase +{ + public: + EmailSelector( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + TQString selected(); + + static TQString getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + private: + TQButtonGroup *mButtonGroup; +}; + +/** + @short Helper class +*/ +class KABC_EXPORT DistributionListEditorWidget : public TQWidget +{ + Q_OBJECT + + public: + DistributionListEditorWidget( AddressBook *, TQWidget *parent ); + virtual ~DistributionListEditorWidget(); + + private slots: + void newList(); + void editList(); + void removeList(); + void addEntry(); + void removeEntry(); + void changeEmail(); + void updateEntryView(); + void updateAddresseeView(); + void updateNameCombo(); + void slotSelectionEntryViewChanged(); + void slotSelectionAddresseeViewChanged(); + void save(); + + private: + TQComboBox *mNameCombo; + TQLabel *mListLabel; + TQListView *mEntryView; + TQListView *mAddresseeView; + + AddressBook *mAddressBook; + DistributionListManager *mManager; + TQPushButton *mNewButton, *mEditButton, *mRemoveButton; + TQPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; + + struct Data; + Data *d; +}; + +} +#endif diff --git a/tdeabc/distributionlisteditor.cpp b/tdeabc/distributionlisteditor.cpp new file mode 100644 index 000000000..5c26c8121 --- /dev/null +++ b/tdeabc/distributionlisteditor.cpp @@ -0,0 +1,310 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "addressbook.h" +#include "addresseedialog.h" +#include "distributionlist.h" + +#include "distributionlisteditor.h" +#include "distributionlisteditor.moc" + +using namespace KABC; + +EmailSelectDialog::EmailSelectDialog( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) : + KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, + parent ) +{ + TQFrame *topFrame = plainPage(); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); + + mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), + topFrame ); + mButtonGroup->setRadioButtonExclusive( true ); + topLayout->addWidget( mButtonGroup ); + + TQStringList::ConstIterator it; + for( it = emails.begin(); it != emails.end(); ++it ) { + TQRadioButton *button = new TQRadioButton( *it, mButtonGroup ); + if ( (*it) == current ) { + button->setDown( true ); + } + } +} + +TQString EmailSelectDialog::selected() +{ + TQButton *button = mButtonGroup->selected(); + if ( button ) return button->text(); + return TQString::null; +} + +TQString EmailSelectDialog::getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ) +{ + EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); + dlg->exec(); + + TQString result = dlg->selected(); + + delete dlg; + + return result; +} + +class EditEntryItem : public TQListViewItem +{ + public: + EditEntryItem( TQListView *parent, const Addressee &addressee, + const TQString &email=TQString::null ) : + TQListViewItem( parent ), + mAddressee( addressee ), + mEmail( email ) + { + setText( 0, addressee.realName() ); + if( email.isEmpty() ) { + setText( 1, addressee.preferredEmail() ); + setText( 2, i18n("Yes") ); + } else { + setText( 1, email ); + setText( 2, i18n("No") ); + } + } + + Addressee addressee() const + { + return mAddressee; + } + + TQString email() const + { + return mEmail; + } + + private: + Addressee mAddressee; + TQString mEmail; +}; + +DistributionListEditor::DistributionListEditor( AddressBook *addressBook, TQWidget *parent) : + TQWidget( parent ), + mAddressBook( addressBook ) +{ + kdDebug(5700) << "DistributionListEditor()" << endl; + + TQBoxLayout *topLayout = new TQVBoxLayout( this ); + topLayout->setMargin( KDialog::marginHint() ); + topLayout->setSpacing( KDialog::spacingHint() ); + + TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ; + + mNameCombo = new TQComboBox( this ); + nameLayout->addWidget( mNameCombo ); + connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) ); + + newButton = new TQPushButton( i18n("New List"), this ); + nameLayout->addWidget( newButton ); + connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) ); + + removeButton = new TQPushButton( i18n("Remove List"), this ); + nameLayout->addWidget( removeButton ); + connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); + + mEntryView = new TQListView( this ); + mEntryView->addColumn( i18n("Name") ); + mEntryView->addColumn( i18n("Email") ); + mEntryView->addColumn( i18n("Use Preferred") ); + topLayout->addWidget( mEntryView ); + connect(mEntryView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionEntryViewChanged())); + + changeEmailButton = new TQPushButton( i18n("Change Email"), this ); + topLayout->addWidget( changeEmailButton ); + connect( changeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); + + removeEntryButton = new TQPushButton( i18n("Remove Entry"), this ); + topLayout->addWidget( removeEntryButton ); + connect( removeEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) ); + + addEntryButton = new TQPushButton( i18n("Add Entry"), this ); + topLayout->addWidget( addEntryButton ); + connect( addEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) ); + + mAddresseeView = new TQListView( this ); + mAddresseeView->addColumn( i18n("Name") ); + mAddresseeView->addColumn( i18n("Preferred Email") ); + topLayout->addWidget( mAddresseeView ); + + + connect(mAddresseeView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionAddresseeViewChanged())); + + mManager = new DistributionListManager( mAddressBook ); + mManager->load(); + + updateAddresseeView(); + updateNameCombo(); + removeButton->setEnabled(!mManager->listNames().isEmpty()); +} + +DistributionListEditor::~DistributionListEditor() +{ + kdDebug(5700) << "~DistributionListEditor()" << endl; + + mManager->save(); + delete mManager; +} + +void DistributionListEditor::slotSelectionEntryViewChanged() +{ + EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); + bool state = (entryItem != 0L); + + changeEmailButton->setEnabled(state); + removeEntryButton->setEnabled(state); +} + +void DistributionListEditor::newList() +{ + bool ok = false; + TQString name = KInputDialog::getText( i18n("New Distribution List"), + i18n("Please enter name:"), + TQString::null, &ok, this ); + if ( !ok ) + return; + + new DistributionList( mManager, name ); + + mNameCombo->insertItem( name ); + removeButton->setEnabled(true); + updateEntryView(); +} + +void DistributionListEditor::removeList() +{ + mManager->remove( mManager->list( mNameCombo->currentText() ) ); + mNameCombo->removeItem( mNameCombo->currentItem() ); + removeButton->setEnabled(!mManager->listNames().isEmpty()); + addEntryButton->setEnabled( !mNameCombo->currentText().isEmpty()); + updateEntryView(); +} + +void DistributionListEditor::addEntry() +{ + AddresseeItem *addresseeItem = + dynamic_cast( mAddresseeView->selectedItem() ); + + if( !addresseeItem ) { + kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl; + return; + } + + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) { + kdDebug(5700) << "DLE::addEntry(): No dist list '" << mNameCombo->currentText() << "'" << endl; + return; + } + + list->insertEntry( addresseeItem->addressee() ); + updateEntryView(); + slotSelectionAddresseeViewChanged(); +} + +void DistributionListEditor::removeEntry() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EditEntryItem *entryItem = + dynamic_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + list->removeEntry( entryItem->addressee(), entryItem->email() ); + delete entryItem; +} + +void DistributionListEditor::changeEmail() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + EditEntryItem *entryItem = + dynamic_cast( mEntryView->selectedItem() ); + if ( !entryItem ) return; + + TQString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(), + entryItem->email(), this ); + list->removeEntry( entryItem->addressee(), entryItem->email() ); + list->insertEntry( entryItem->addressee(), email ); + + updateEntryView(); +} + +void DistributionListEditor::updateEntryView() +{ + DistributionList *list = mManager->list( mNameCombo->currentText() ); + if ( !list ) return; + + mEntryView->clear(); + DistributionList::Entry::List entries = list->entries(); + DistributionList::Entry::List::ConstIterator it; + for( it = entries.begin(); it != entries.end(); ++it ) { + new EditEntryItem( mEntryView, (*it).addressee, (*it).email ); + } + EditEntryItem *entryItem = dynamic_cast( mEntryView->selectedItem() ); + bool state = (entryItem != 0L); + + changeEmailButton->setEnabled(state); + removeEntryButton->setEnabled(state); +} + +void DistributionListEditor::updateAddresseeView() +{ + mAddresseeView->clear(); + + AddressBook::Iterator it; + for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { + new AddresseeItem( mAddresseeView, *it ); + } +} + +void DistributionListEditor::updateNameCombo() +{ + mNameCombo->insertStringList( mManager->listNames() ); + + updateEntryView(); +} + +void DistributionListEditor::slotSelectionAddresseeViewChanged() +{ + AddresseeItem *addresseeItem = + dynamic_cast( mAddresseeView->selectedItem() ); + bool state = (addresseeItem != 0L); + addEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty()); +} diff --git a/tdeabc/distributionlisteditor.h b/tdeabc/distributionlisteditor.h new file mode 100644 index 000000000..faec280e6 --- /dev/null +++ b/tdeabc/distributionlisteditor.h @@ -0,0 +1,86 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_DISTRIBUTIONLISTEDITOR_H +#define KABC_DISTRIBUTIONLISTEDITOR_H + +#include + +#include + +class TQListView; +class TQComboBox; +class TQButtonGroup; + +namespace KABC { + +class AddressBook; +class DistributionListManager; + +class KABC_EXPORT EmailSelectDialog : public KDialogBase +{ + public: + EmailSelectDialog( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + TQString selected(); + + static TQString getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); + + private: + TQButtonGroup *mButtonGroup; +}; + +/** + @obsolete +*/ +class DistributionListEditor : public TQWidget +{ + Q_OBJECT + public: + DistributionListEditor( AddressBook *, TQWidget *parent ); + virtual ~DistributionListEditor(); + + private slots: + void newList(); + void removeList(); + void addEntry(); + void removeEntry(); + void changeEmail(); + void updateEntryView(); + void updateAddresseeView(); + void updateNameCombo(); + void slotSelectionEntryViewChanged(); + void slotSelectionAddresseeViewChanged(); + + private: + TQComboBox *mNameCombo; + TQListView *mEntryView; + TQListView *mAddresseeView; + + AddressBook *mAddressBook; + DistributionListManager *mManager; + TQPushButton *newButton, *removeButton; + TQPushButton *changeEmailButton,*removeEntryButton,*addEntryButton; +}; + +} + +#endif diff --git a/tdeabc/errorhandler.cpp b/tdeabc/errorhandler.cpp new file mode 100644 index 000000000..d2245e44f --- /dev/null +++ b/tdeabc/errorhandler.cpp @@ -0,0 +1,55 @@ +/* + This file is part of libkabc. + + Copyright (c) 2002 Tobias Koenig + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include + +#include "errorhandler.h" + +using namespace KABC; + +void ConsoleErrorHandler::error( const TQString &msg ) +{ + // no debug area is ok here + kdError() << msg << endl; +} + + +void GUIErrorHandler::error( const TQString &msg ) +{ + KMessageBox::error( 0, msg, i18n( "Error in libkabc" ) ); +} + + +GuiErrorHandler::GuiErrorHandler( TQWidget *parent ) + : mParent( parent ) +{ +} + +void GuiErrorHandler::error( const TQString &msg ) +{ + if (tqApp) + KMessageBox::error( mParent, msg ); +} diff --git a/tdeabc/errorhandler.h b/tdeabc/errorhandler.h new file mode 100644 index 000000000..9a316541d --- /dev/null +++ b/tdeabc/errorhandler.h @@ -0,0 +1,95 @@ +/* + This file is part of libkabc. + + Copyright (c) 2002 Tobias Koenig + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_ERRORHANDLER_H +#define KABC_ERRORHANDLER_H + +#include + +#include + +class TQWidget; + +namespace KABC { + +/** + Abstract class that provides displaying of error messages. + We need this to make libkabc gui independent on the one side + and provide user friendly error messages on the other side. + Use @p ConsoleErrorHandler or @p GuiErrorHandler in your + application or provide your own ErrorHandler. +*/ +class KABC_EXPORT ErrorHandler +{ + public: + /** + Show error message. + */ + virtual void error( const TQString &msg ) = 0; +}; + +/** + This class prints the error messages to stderr via kdError(). +*/ +class KABC_EXPORT ConsoleErrorHandler : public ErrorHandler +{ + public: + virtual void error( const TQString &msg ); +}; + +/** + This class shows messages boxes for every + error message. + + \deprecated Use GuiErrorHandler instead. +*/ +class KABC_EXPORT GUIErrorHandler : public ErrorHandler +{ + public: + virtual void error( const TQString &msg ); +}; + +/** + This class shows messages boxes for every + error message. +*/ +class KABC_EXPORT GuiErrorHandler : public ErrorHandler +{ + public: + /** + Create error handler. + + \param parent Widget which is used as parent for the error dialogs. + */ + GuiErrorHandler( TQWidget *parent ); + + virtual void error( const TQString &msg ); + + private: + TQWidget *mParent; + + class Private; + Private *d; +}; + +} + +#endif diff --git a/tdeabc/field.h b/tdeabc/field.h new file mode 100644 index 000000000..118ce2d51 --- /dev/null +++ b/tdeabc/field.h @@ -0,0 +1,176 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_FIELD_H +#define KABC_FIELD_H + +#include +#include + +#include "addressee.h" + +class TDEConfig; + +namespace KABC { + +class KABC_EXPORT Field +{ + class FieldImpl; + friend class FieldImpl; + +public: + typedef TQValueList List; + + /** + * @li @p All - + * @li @p Frequent - + * @li @p Address - + * @li @p Email - + * @li @p Personal - + * @li @p Organization - + * @li @p CustomCategory - + */ + enum FieldCategory + { + All = 0x0, + Frequent = 0x01, + Address = 0x02, + Email = 0x04, + Personal = 0x08, + Organization = 0x10, + CustomCategory = 0x20 + }; + + /** + * Returns the translated label for this field. + */ + virtual TQString label(); + + /** + * Returns the ored categories the field belongs to. + */ + virtual int category(); + + /** + * Returns the translated label for field category. + */ + static TQString categoryLabel( int category ); + + /** + * Returns a string representation of the value the field has in the given + * Addressee. Returns TQString::null, if it is not possible to convert the + * value to a string. + */ + virtual TQString value( const KABC::Addressee & ); + + /** + * Sets the value of the field in the given Addressee. Returns true on success + * or false, if the given string couldn't be converted to a valid value. + */ + virtual bool setValue( KABC::Addressee &, const TQString & ); + + /** + * Returns a string, that can be used for sorting. + */ + TQString sortKey( const KABC::Addressee & ); + + /** + * Returns, if the field is a user-defined field. + */ + virtual bool isCustom(); + + /** + * Returns, if the field is equal with @a field. + */ + virtual bool equals( Field *field ); + + /** + * Returns a list of all fields. + */ + static Field::List allFields(); + + /** + * Returns a list of the default fields. + */ + static Field::List defaultFields(); + + /** + * Creates a custom field. + * + * @param label The label for this field + * @param category The category of this field + * @param key Unique key for this field + * @param app Unique app name for this field + */ + static Field *createCustomField( const TQString &label, int category, + const TQString &key, const TQString &app ); + + /** + * Delete all fields from list. + */ + static void deleteFields(); + + /** + * Save the field settings to a config file. + * + * @param cfg The config file object + * @param identifier The unique identifier + * @param fields The list of the fields + */ + static void saveFields( TDEConfig *cfg, const TQString &identifier, + const Field::List &fields ); + /** + * This is the same as above, with the difference, that + * the list is stored in TDEGlobal::config() in group "KABCFields". + */ + static void saveFields( const TQString &identifier, + const Field::List &fields ); + + /** + * Load the field settings from a config file. + * + * @param cfg The config file object + * @param identifier The unique identifier + */ + static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier ); + + /** + * This is the same as above, with the difference, that + * the list is loaded from TDEGlobal::config() from group "KABCFields". + */ + static Field::List restoreFields( const TQString &identifier ); + +protected: + static void createField( int id, int category = 0 ); + static void createDefaultField( int id, int category = 0 ); + +private: + Field( FieldImpl * ); + virtual ~Field(); + + FieldImpl *mImpl; + + static Field::List mAllFields; + static Field::List mDefaultFields; + static Field::List mCustomFields; +}; + +} +#endif diff --git a/tdeabc/format.h b/tdeabc/format.h new file mode 100644 index 000000000..ed036673c --- /dev/null +++ b/tdeabc/format.h @@ -0,0 +1,49 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_FORMAT_H +#define KABC_FORMAT_H + +#include + +#include + +namespace KABC { + +class AddressBook; + +/** + @deprecated use FormatPlugin instead +*/ +class KABC_EXPORT_DEPRECATED Format +{ + public: + /** + Load addressbook from file. + */ + virtual bool load( AddressBook *, const TQString &fileName ) = 0; + /** + Save addressbook to file. + */ + virtual bool save( AddressBook *, const TQString &fileName ) = 0; +}; + +} + +#endif diff --git a/tdeabc/formatfactory.cpp b/tdeabc/formatfactory.cpp new file mode 100644 index 000000000..0795957a2 --- /dev/null +++ b/tdeabc/formatfactory.cpp @@ -0,0 +1,168 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include + +#include + +#include "vcardformatplugin.h" + +#include "formatfactory.h" + +using namespace KABC; + +FormatFactory *FormatFactory::mSelf = 0; +static KStaticDeleter factoryDeleter; + +FormatFactory *FormatFactory::self() +{ + kdDebug(5700) << "FormatFactory::self()" << endl; + + if ( !mSelf ) + factoryDeleter.setObject( mSelf, new FormatFactory ); + + return mSelf; +} + +FormatFactory::FormatFactory() +{ + mFormatList.setAutoDelete( true ); + + // dummy entry for default format + FormatInfo *info = new FormatInfo; + info->library = ""; + info->nameLabel = i18n( "vCard" ); + info->descriptionLabel = i18n( "vCard Format" ); + mFormatList.insert( "vcard", info ); + + const TQStringList list = TDEGlobal::dirs()->findAllResources( "data" ,"tdeabc/formats/*.desktop", true, true ); + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + { + KSimpleConfig config( *it, true ); + + if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) + continue; + + info = new FormatInfo; + + config.setGroup( "Plugin" ); + TQString type = config.readEntry( "Type" ); + info->library = config.readEntry( "X-TDE-Library" ); + + config.setGroup( "Misc" ); + info->nameLabel = config.readEntry( "Name" ); + info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) ); + + mFormatList.insert( type, info ); + } +} + +FormatFactory::~FormatFactory() +{ + mFormatList.clear(); +} + +TQStringList FormatFactory::formats() +{ + TQStringList retval; + + // make sure 'vcard' is the first entry + retval << "vcard"; + + TQDictIterator it( mFormatList ); + for ( ; it.current(); ++it ) + if ( it.currentKey() != "vcard" ) + retval << it.currentKey(); + + return retval; +} + +FormatInfo *FormatFactory::info( const TQString &type ) +{ + if ( type.isEmpty() ) + return 0; + else + return mFormatList[ type ]; +} + +FormatPlugin *FormatFactory::format( const TQString& type ) +{ + FormatPlugin *format = 0; + + if ( type.isEmpty() ) + return 0; + + if ( type == "vcard" ) { + format = new VCardFormatPlugin; + format->setType( type ); + format->setNameLabel( i18n( "vCard" ) ); + format->setDescriptionLabel( i18n( "vCard Format" ) ); + return format; + } + + FormatInfo *fi = mFormatList[ type ]; + if (!fi) + return 0; + TQString libName = fi->library; + + KLibrary *library = openLibrary( libName ); + if ( !library ) + return 0; + + void *format_func = library->symbol( "format" ); + + if ( format_func ) { + format = ((FormatPlugin* (*)())format_func)(); + format->setType( type ); + format->setNameLabel( fi->nameLabel ); + format->setDescriptionLabel( fi->descriptionLabel ); + } else { + kdDebug( 5700 ) << "'" << libName << "' is not a format plugin." << endl; + return 0; + } + + return format; +} + + +KLibrary *FormatFactory::openLibrary( const TQString& libName ) +{ + KLibrary *library = 0; + + TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) ); + + if ( path.isEmpty() ) { + kdDebug( 5700 ) << "No format plugin library was found!" << endl; + return 0; + } + + library = KLibLoader::self()->library( TQFile::encodeName( path ) ); + + if ( !library ) { + kdDebug( 5700 ) << "Could not load library '" << libName << "'" << endl; + return 0; + } + + return library; +} diff --git a/tdeabc/formatfactory.h b/tdeabc/formatfactory.h new file mode 100644 index 000000000..ff9da5504 --- /dev/null +++ b/tdeabc/formatfactory.h @@ -0,0 +1,101 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_FORMATFACTORY_H +#define KABC_FORMATFACTORY_H + +#include +#include + +#include +#include + +#include "formatplugin.h" + +namespace KABC { + +struct FormatInfo +{ + TQString library; + TQString nameLabel; + TQString descriptionLabel; +}; + +/** + * Class for loading format plugins. + * + * Example: + * + * \code + * KABC::FormatFactory *factory = KABC::FormatFactory::self(); + * + * TQStringList list = factory->formats(); + * TQStringList::Iterator it; + * for ( it = list.begin(); it != list.end(); ++it ) { + * KABC::FormatPlugin *format = factory->format( (*it) ); + * // do something with format + * } + * \endcode + */ +class KABC_EXPORT FormatFactory +{ + public: + + /** + Destructor. + */ + ~FormatFactory(); + + /** + * Returns the global format factory. + */ + static FormatFactory *self(); + + /** + * Returns a pointer to a format object or a null pointer + * if format type doesn't exist. + * + * @param type The type of the format, returned by formats() + */ + FormatPlugin *format( const TQString &type ); + + /** + * Returns a list of all available format types. + */ + TQStringList formats(); + + /** + * Returns the info structure for a special type. + */ + FormatInfo *info( const TQString &type ); + + protected: + FormatFactory(); + + private: + KLibrary *openLibrary( const TQString& libName ); + + static FormatFactory *mSelf; + + TQDict mFormatList; +}; + +} +#endif diff --git a/tdeabc/formatplugin.h b/tdeabc/formatplugin.h new file mode 100644 index 000000000..33f4beea0 --- /dev/null +++ b/tdeabc/formatplugin.h @@ -0,0 +1,73 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_FORMATPLUGIN_H +#define KABC_FORMATPLUGIN_H + +#include + +#include "plugin.h" +#include "resource.h" + +namespace KABC { + +class AddressBook; +class Addressee; + +/** + * @short Base class for address book formats. + * + * This class provides an abstract interface for ResourceFile and + * ResourceDir formats. + * + * @internal + */ +class KABC_EXPORT FormatPlugin : public Plugin +{ +public: + + /** + * Load single addressee from file. + */ + virtual bool load( Addressee &, TQFile *file ) = 0; + + /** + * Load whole addressbook from file. + */ + virtual bool loadAll( AddressBook *, Resource *, TQFile *file ) = 0; + + /** + * Save a single Addressee to file. + */ + virtual void save( const Addressee &, TQFile *file ) = 0; + + /** + * Save whole addressbook to file. + */ + virtual void saveAll( AddressBook *, Resource *, TQFile *file ) = 0; + + /** + * Checks if given file contains the right format + */ + virtual bool checkFormat( TQFile *file ) const = 0; +}; + +} +#endif diff --git a/tdeabc/formats/CMakeLists.txt b/tdeabc/formats/CMakeLists.txt new file mode 100644 index 000000000..d7a9e0fc9 --- /dev/null +++ b/tdeabc/formats/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES binary.desktop DESTINATION ${DATA_INSTALL_DIR}/tdeabc/formats ) + + +##### kabcformat_binary ######################### + +set( target kabcformat_binary ) + +set( ${target}_SRCS + binaryformat.cpp +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK tdeabc-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/formats/Makefile.am b/tdeabc/formats/Makefile.am new file mode 100644 index 000000000..d769d88d7 --- /dev/null +++ b/tdeabc/formats/Makefile.am @@ -0,0 +1,22 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +kde_module_LTLIBRARIES = kabcformat_binary.la + +kabcformat_binary_la_SOURCES = binaryformat.cpp +kabcformat_binary_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) \ + -no-undefined +kabcformat_binary_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(LIB_TDECORE) +kabcformat_binary_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +# these are the headers for your project +noinst_HEADERS = binaryformat.h + +# let automoc handle all of the meta source files (moc) +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabcformat_binary.pot + +linkdir = $(kde_datadir)/tdeabc/formats +link_DATA = binary.desktop +EXTRA_DIST = $(link_DATA) diff --git a/tdeabc/formats/binary.desktop b/tdeabc/formats/binary.desktop new file mode 100644 index 000000000..993286ad5 --- /dev/null +++ b/tdeabc/formats/binary.desktop @@ -0,0 +1,89 @@ +[Misc] +Name=Binary +Name[af]=Binêre +Name[ar]=ثنائي +Name[az]=İcraçı +Name[be]=Двайковы +Name[bg]=Двоичен +Name[bn]=বাইনারি +Name[br]=Binarel +Name[bs]=Binarno +Name[ca]=Binari +Name[cs]=Binární +Name[csb]=Binarny +Name[cy]=Deuaidd +Name[da]=Binær +Name[de]=Binär +Name[el]=Δυαδικό +Name[eo]=Duuma +Name[es]=Binario +Name[et]=Binaar +Name[eu]=Bitarra +Name[fa]=دوگانی +Name[fi]=Binääri +Name[fr]=Binaire +Name[fy]=Binêr +Name[ga]=Dénártha +Name[gl]=Binário +Name[he]=בינרית +Name[hi]=दà¥à¤µà¤¿à¤šà¤° +Name[hr]=Binarno +Name[hsb]=Binarny +Name[hu]=Bináris +Name[id]=Biner +Name[is]=Tvíunda +Name[it]=Binario +Name[ja]=ãƒã‚¤ãƒŠãƒª +Name[ka]=áƒáƒ áƒáƒ‘ითი +Name[kk]=Бинарлық +Name[km]=គោលពីរ +Name[ko]=ë°”ì´ë„ˆë¦¬ +Name[lb]=Binär +Name[lt]=Dvejetainis +Name[lv]=BinÄrs +Name[mk]=Бинарен +Name[mn]=Бинар +Name[ms]=Binari +Name[mt]=Binarju +Name[nb]=Binær +Name[nds]=Bineer +Name[ne]=बाइनरी +Name[nl]=Binair +Name[nn]=Binær +Name[nso]=Tselapedi +Name[pa]=ਬਾਈਨਰੀ +Name[pl]=Binarny +Name[pt]=Binário +Name[pt_BR]=Binário +Name[ro]=Binar +Name[ru]=Двоичный +Name[rw]=Nyabibiri +Name[se]=Binára +Name[sk]=Binárny +Name[sl]=DvojiÅ¡ko +Name[sq]=Binarë +Name[sr]=Бинарни +Name[sr@Latn]=Binarni +Name[ss]=Lokuhamab ngakubili +Name[sv]=Binär +Name[ta]=இரà¯à®®à®®à¯ +Name[te]=à°¦à±à°µà°¿à°¯à°¾à°¶à°‚ +Name[tg]=Дутартиба +Name[th]=ไบนารี +Name[tr]=İkili +Name[tt]=Binar +Name[uk]=Двійковий +Name[uz]=Binar +Name[uz@cyrillic]=Бинар +Name[ven]=Zwivhili +Name[vi]=Nhị phân +Name[wa]=Binaire +Name[xh]=Ephindwe kabini +Name[zh_CN]=二进制 +Name[zh_HK]=äºŒé€²ä½ +Name[zh_TW]=äºŒé€²ä½ +Name[zu]=Okuhambisana ngambili + +[Plugin] +Type=binary +X-TDE-Library=kabcformat_binary diff --git a/tdeabc/formats/binaryformat.cpp b/tdeabc/formats/binaryformat.cpp new file mode 100644 index 000000000..f37146e57 --- /dev/null +++ b/tdeabc/formats/binaryformat.cpp @@ -0,0 +1,221 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include + +#include "addressbook.h" +#include "addressee.h" +#include "picture.h" +#include "sound.h" + +#include "binaryformat.h" + +#define BINARY_FORMAT_VERSION 1 + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT FormatPlugin *format() + { + return new BinaryFormat; + } +} + +bool BinaryFormat::load( Addressee &addressee, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::load()" << endl; + TQDataStream stream( file ); + + if ( !checkHeader( stream ) ) + return false; + + loadAddressee( addressee, stream ); + + return true; +} + +bool BinaryFormat::loadAll( AddressBook*, Resource *resource, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::loadAll()" << endl; + + TQDataStream stream( file ); + + if ( !checkHeader( stream ) ) + return false; + + TQ_UINT32 entries; + + stream >> entries; + + for ( uint i = 0; i < entries; ++i ) { + Addressee addressee; + loadAddressee( addressee, stream ); + addressee.setResource( resource ); + addressee.setChanged( false ); + resource->insertAddressee( addressee ); + } + + return true; +} + +void BinaryFormat::save( const Addressee &addressee, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::save()" << endl; + + TQDataStream stream( file ); + + writeHeader( stream ); + + TQ_UINT32 entries = 1; + stream << entries; + saveAddressee( addressee, stream ); +} + +void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) +{ + kdDebug(5700) << "BinaryFormat::saveAll()" << endl; + + TQ_UINT32 counter = 0; + TQDataStream stream( file ); + + writeHeader( stream ); + // set dummy number of entries + stream << counter; + + Resource::Iterator it; + for ( it = resource->begin(); it != resource->end(); ++it ) { + saveAddressee( (*it), stream ); + counter++; + (*it).setChanged( false ); + } + + // set real number of entries + stream.device()->at( 2 * sizeof( TQ_UINT32 ) ); + stream << counter; +} + +bool BinaryFormat::checkFormat( TQFile *file ) const +{ + kdDebug(5700) << "BinaryFormat::checkFormat()" << endl; + + TQDataStream stream( file ); + + return checkHeader( stream ); +} + +bool BinaryFormat::checkHeader( TQDataStream &stream ) const +{ + TQ_UINT32 magic, version; + + stream >> magic >> version; + + TQFile *file = dynamic_cast( stream.device() ); + + if ( !file ) { + kdError() << i18n("Not a file?") << endl; + return false; + } + + if ( magic != 0x2e93e ) { + kdError() << TQString(i18n("File '%1' is not binary format.").arg( file->name() )) << endl; + return false; + } + + if ( version != BINARY_FORMAT_VERSION ) { + kdError() << TQString(i18n("File '%1' is the wrong version.").arg( file->name() )) << endl; + return false; + } + + return true; +} + +void BinaryFormat::writeHeader( TQDataStream &stream ) +{ + TQ_UINT32 magic, version; + + magic = 0x2e93e; + version = BINARY_FORMAT_VERSION; + + stream << magic << version; +} + +void BinaryFormat::loadAddressee( Addressee &addressee, TQDataStream &stream ) +{ + stream >> addressee; +/* + // load pictures + Picture photo = addressee.photo(); + Picture logo = addressee.logo(); + + if ( photo.isIntern() ) { + TQImage img; + if ( !img.load( locateLocal( "data", "tdeabc/photos/" ) + addressee.uid() ) ) + kdDebug(5700) << "No photo available for '" << addressee.uid() << "'." << endl; + + addressee.setPhoto( img ); + } + + if ( logo.isIntern() ) { + TQImage img; + if ( !img.load( locateLocal( "data", "tdeabc/logos/" ) + addressee.uid() ) ) + kdDebug(5700) << "No logo available for '" << addressee.uid() << "'." << endl; + + addressee.setLogo( img ); + } + + // load sound + // TODO: load sound data from file +*/ +} + +void BinaryFormat::saveAddressee( const Addressee &addressee, TQDataStream &stream ) +{ + stream << addressee; +/* + // load pictures + Picture photo = addressee.photo(); + Picture logo = addressee.logo(); + + if ( photo.isIntern() ) { + TQImage img = photo.data(); + TQString fileName = locateLocal( "data", "tdeabc/photos/" ) + addressee.uid(); + + if ( !img.save( fileName, "PNG" ) ) + kdDebug(5700) << "Unable to save photo for '" << addressee.uid() << "'." << endl; + } + + if ( logo.isIntern() ) { + TQImage img = logo.data(); + TQString fileName = locateLocal( "data", "tdeabc/logos/" ) + addressee.uid(); + + if ( !img.save( fileName, "PNG" ) ) + kdDebug(5700) << "Unable to save logo for '" << addressee.uid() << "'." << endl; + } + + // save sound + // TODO: save the sound data to file +*/ +} diff --git a/tdeabc/formats/binaryformat.h b/tdeabc/formats/binaryformat.h new file mode 100644 index 000000000..09efde41a --- /dev/null +++ b/tdeabc/formats/binaryformat.h @@ -0,0 +1,69 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_BINARYFORMAT_H +#define KABC_BINARYFORMAT_H + +#include "formatplugin.h" + +namespace KABC { + +class AddressBook; +class Addressee; + +/** + @short binary file format for addressbook entries. +*/ +class BinaryFormat : public FormatPlugin +{ +public: + /** + * Load single addressee from file. + */ + bool load( Addressee &, TQFile *file ); + + /** + * Load whole addressee from file. + */ + bool loadAll( AddressBook *, Resource *, TQFile *file ); + + /** + * Save single addressee to file. + */ + void save( const Addressee &, TQFile *file ); + + /** + * Save all addressees to file. + */ + void saveAll( AddressBook *, Resource *, TQFile *file ); + + /** + * Check for valid format of a file. + */ + bool checkFormat( TQFile *file ) const; + +private: + void loadAddressee( Addressee &, TQDataStream & ); + void saveAddressee( const Addressee &, TQDataStream & ); + bool checkHeader( TQDataStream & ) const; + void writeHeader( TQDataStream & ); +}; + +} +#endif diff --git a/tdeabc/geo.cpp b/tdeabc/geo.cpp new file mode 100644 index 000000000..44f9851e4 --- /dev/null +++ b/tdeabc/geo.cpp @@ -0,0 +1,109 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "geo.h" + +using namespace KABC; + +Geo::Geo() + : mLatitude( 91 ), mLongitude( 181 ), mValidLat( false ), mValidLong( false ) +{ +} + +Geo::Geo( float latitude, float longitude ) +{ + setLatitude( latitude ); + setLongitude( longitude ); +} + +void Geo::setLatitude( float latitude ) +{ + if ( latitude >= -90 && latitude <= 90 ) { + mLatitude = latitude; + mValidLat = true; + } else { + mLatitude = 91; + mValidLat = false; + } +} + +float Geo::latitude() const +{ + return mLatitude; +} + +void Geo::setLongitude( float longitude) +{ + if ( longitude >= -180 && longitude <= 180 ) { + mLongitude = longitude; + mValidLong = true; + } else { + mLongitude = 181; + mValidLong = false; + } +} + +float Geo::longitude() const +{ + return mLongitude; +} + +bool Geo::isValid() const +{ + return mValidLat && mValidLong; +} + +bool Geo::operator==( const Geo &g ) const +{ + if ( !g.isValid() && !isValid() ) return true; + if ( !g.isValid() || !isValid() ) return false; + if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return true; + return false; +} + +bool Geo::operator!=( const Geo &g ) const +{ + if ( !g.isValid() && !isValid() ) return false; + if ( !g.isValid() || !isValid() ) return true; + if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude ) return false; + return true; +} + +TQString Geo::asString() const +{ + return "(" + TQString::number(mLatitude) + "," + TQString::number(mLongitude) + ")"; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Geo &geo ) +{ + return s << (float)geo.mLatitude << (float)geo.mLongitude; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Geo &geo ) +{ + s >> geo.mLatitude >> geo.mLongitude; + + geo.mValidLat = true; + geo.mValidLong = true; + + return s; +} diff --git a/tdeabc/geo.h b/tdeabc/geo.h new file mode 100644 index 000000000..cac6abaff --- /dev/null +++ b/tdeabc/geo.h @@ -0,0 +1,101 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_GEO_H +#define KABC_GEO_H + +#include + +#include + +namespace KABC { + +/** + @short Geographic position + + This class represents a geographic position. +*/ +class KABC_EXPORT Geo +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); + + public: + /** + Construct invalid geographics position object. + */ + Geo(); + + /** + Construct geographics position object. + + @param latitude Geographical latitude + @param longitude Geographical longitude + */ + Geo( float latitude, float longitude ); + + /** + Sets the latitude. + */ + void setLatitude( float ); + + /** + Returns the latitude. + */ + float latitude() const; + + /** + Sets the longitude. + */ + void setLongitude( float ); + + /** + Returns the longitude. + */ + float longitude() const; + + /** + Returns, if this object contains a valid geographical position. + */ + bool isValid() const; + + bool operator==( const Geo & ) const; + bool operator!=( const Geo & ) const; + + /** + Returns string representation of geographical position. + */ + TQString asString() const; + + private: + float mLatitude; + float mLongitude; + + bool mValid; + bool mValidLat; + bool mValidLong; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & ); + +} + +#endif diff --git a/tdeabc/kabc_manager.desktop b/tdeabc/kabc_manager.desktop new file mode 100644 index 000000000..0af910f52 --- /dev/null +++ b/tdeabc/kabc_manager.desktop @@ -0,0 +1,76 @@ +[Desktop Entry] +Name=Contacts +Name[af]=Kontakte +Name[ar]=المراسلين +Name[be]=Кантакты +Name[br]=Darempredoù +Name[bs]=Kontakti +Name[ca]=Contactes +Name[cs]=Kontakty +Name[csb]=ÅÄ…czbë +Name[cy]=Cysylltau +Name[da]=Kontakter +Name[de]=Kontakte +Name[el]=Επαφές +Name[eo]=Kontaktoj +Name[es]=Contactos +Name[et]=Kontaktid +Name[eu]=Kontaktuak +Name[fa]=تماسها +Name[fi]=Yhteystiedot +Name[fy]=Kontakten +Name[ga]=Teagmhálacha +Name[gl]=Contactos +Name[he]=×נשי קשר +Name[hi]=समà¥à¤ªà¤°à¥à¤• +Name[hr]=Kontakti +Name[hsb]=Adresy +Name[hu]=Névjegyek +Name[id]=Kontak +Name[is]=Tengiliðir +Name[it]=Contatti +Name[ja]=コンタクト +Name[ka]=კáƒáƒœáƒ¢áƒáƒ¥áƒ¢áƒ”ბი +Name[kk]=Контакттар +Name[km]=ទំនាក់ទំនង +Name[ku]=Tekilî +Name[lb]=Kontakter +Name[lt]=Kontaktai +Name[lv]=Kontakti +Name[mk]=Контакти +Name[ms]=Hubungan +Name[nb]=Kontakter +Name[nds]=Kontakten +Name[ne]=समà¥à¤ªà¤°à¥à¤• +Name[nl]=Contactpersonen +Name[nn]=Kontaktar +Name[pa]=ਸੰਪਰਕ +Name[pl]=Kontakty +Name[pt]=Contactos +Name[pt_BR]=Contatos +Name[ro]=Contacte +Name[ru]=Контакты +Name[rw]=Amaderesi +Name[se]=OktavuoÄ‘at +Name[sk]=Kontakty +Name[sl]=Stiki +Name[sr]=Контакти +Name[sr@Latn]=Kontakti +Name[sv]=Kontakter +Name[ta]=தொடரà¯à®ªà¯à®•ள௠+Name[te]=సంపà±à°°à°¦à°¿à°‚à°ªà±à°²à± +Name[tg]=Ðлоқаҳо +Name[th]=รายชื่อติดต่อ +Name[tr]=BaÄŸlantılar +Name[tt]=Elemtälär +Name[uk]=Контакти +Name[uz]=Aloqalar +Name[uz@cyrillic]=Ðлоқалар +Name[vi]=Liên lạc +Name[zh_CN]=è”系人 +Name[zh_HK]=è¯çµ¡äºº +Name[zh_TW]=è¯çµ¡äºº +Type=Service +ServiceTypes=KResources/Manager + +X-TDE-ResourceFamily=contact diff --git a/tdeabc/key.cpp b/tdeabc/key.cpp new file mode 100644 index 000000000..08d9c6872 --- /dev/null +++ b/tdeabc/key.cpp @@ -0,0 +1,153 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "key.h" + +using namespace KABC; + +Key::Key( const TQString &text, int type ) + : mTextData( text ), mIsBinary( false ), mType( type ) +{ + mId = TDEApplication::randomString(8); +} + +Key::~Key() +{ +} + +bool Key::operator==( const Key &k ) const +{ + if ( mIsBinary != k.mIsBinary ) return false; + if ( mIsBinary ) + if ( mBinaryData != k.mBinaryData ) return false; + else + if ( mTextData != k.mTextData ) return false; + if ( mType != k.mType ) return false; + if ( mCustomTypeString != k.mCustomTypeString ) return false; + + return true; +} + +bool Key::operator!=( const Key &k ) const +{ + return !( k == *this ); +} + +void Key::setId( const TQString &id ) +{ + mId = id; +} + +TQString Key::id() const +{ + return mId; +} + +void Key::setBinaryData( const TQByteArray &binary ) +{ + mBinaryData = binary; + mIsBinary = true; +} + +TQByteArray Key::binaryData() const +{ + return mBinaryData; +} + +void Key::setTextData( const TQString &text ) +{ + mTextData = text; + mIsBinary = false; +} + +TQString Key::textData() const +{ + return mTextData; +} + +bool Key::isBinary() const +{ + return mIsBinary; +} + +void Key::setType( int type ) +{ + mType = type; +} + +void Key::setCustomTypeString( const TQString &custom ) +{ + mCustomTypeString = custom; +} + +int Key::type() const +{ + return mType; +} + +TQString Key::customTypeString() const +{ + return mCustomTypeString; +} + +Key::TypeList Key::typeList() +{ + TypeList list; + list << X509; + list << PGP; + list << Custom; + + return list; +} + +TQString Key::typeLabel( int type ) +{ + switch ( type ) { + case X509: + return i18n( "X509" ); + break; + case PGP: + return i18n( "PGP" ); + break; + case Custom: + return i18n( "Custom" ); + break; + default: + return i18n( "Unknown type" ); + break; + } +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Key &key ) +{ + return s << key.mId << key.mIsBinary << key.mTextData << key.mBinaryData << + key.mCustomTypeString << key.mType; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Key &key ) +{ + s >> key.mId >> key.mIsBinary >> key.mTextData >> key.mBinaryData >> + key.mCustomTypeString >> key.mType; + + return s; +} diff --git a/tdeabc/key.h b/tdeabc/key.h new file mode 100644 index 000000000..08df0264d --- /dev/null +++ b/tdeabc/key.h @@ -0,0 +1,150 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_KEY_H +#define KABC_KEY_H + +#include + +#include + +namespace KABC { + +/** + * @short A class to store an encryption key. + */ +class KABC_EXPORT Key +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); + +public: + typedef TQValueList List; + typedef TQValueList TypeList; + + /** + * Key types + * + * @li X509 - X509 key + * @li PGP - Pretty Good Privacy key + * @li Custom - Custom or IANA conform key + */ + enum Types { + X509, + PGP, + Custom + }; + + /** + * Constructor. + * + * @param text The text data. + * @param type The key type, see Types. + */ + Key( const TQString &text = TQString::null, int type = PGP ); + + /** + * Destructor. + */ + ~Key(); + + bool operator==( const Key & ) const; + bool operator!=( const Key & ) const; + + /** + * Sets the unique identifier. + */ + void setId( const TQString &id ); + + /** + * Returns the unique identifier. + */ + TQString id() const; + + /** + * Sets binary data. + */ + void setBinaryData( const TQByteArray &binary ); + + /** + * Returns the binary data. + */ + TQByteArray binaryData() const; + + /** + * Sets text data. + */ + void setTextData( const TQString &text ); + + /** + * Returns the text data. + */ + TQString textData() const; + + /** + * Returns whether the key contains binary or text data. + */ + bool isBinary() const; + + /** + * Sets the type, see Type. + */ + void setType( int type ); + + /** + * Sets custom type string. + */ + void setCustomTypeString( const TQString &custom ); + + /** + * Returns the type, see Type. + */ + int type() const; + + /** + * Returns the custom type string. + */ + TQString customTypeString() const; + + /** + * Returns a list of all available key types. + */ + static TypeList typeList(); + + /** + * Returns a translated label for a given key type. + */ + static TQString typeLabel( int type ); + +private: + TQByteArray mBinaryData; + TQString mId; + TQString mTextData; + TQString mCustomTypeString; + + int mIsBinary; + int mType; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & ); + +} +#endif diff --git a/tdeabc/ldapclient.cpp b/tdeabc/ldapclient.cpp new file mode 100644 index 000000000..1c2b2d833 --- /dev/null +++ b/tdeabc/ldapclient.cpp @@ -0,0 +1,427 @@ +/* kldapclient.cpp - LDAP access + * Copyright (C) 2002 Klarälvdalens Datakonsult AB + * + * Author: Steffen Hansen + * + * Ported to KABC by Daniel Molkentin + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ldapclient.h" +#include "ldif.h" +#include "ldapurl.h" + +using namespace KABC; + +class LdapClient::LdapClientPrivate{ +public: + TQString bindDN; + TQString pwdBindDN; + LDIF ldif; +}; + +TQString LdapObject::toString() const +{ + TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); + for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { + TQString attr = it.key(); + for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { + result += TQString::fromUtf8( LDIF::assembleLine( attr, *it2, 76 ) ) + "\n"; + } + } + + return result; +} + +void LdapObject::clear() +{ + dn = TQString::null; + attrs.clear(); +} + +void LdapObject::assign( const LdapObject& that ) +{ + if ( &that != this ) { + dn = that.dn; + attrs = that.attrs; + client = that.client; + } +} + +LdapClient::LdapClient( TQObject* parent, const char* name ) + : TQObject( parent, name ), mJob( 0 ), mActive( false ) +{ + d = new LdapClientPrivate; +} + +LdapClient::~LdapClient() +{ + cancelQuery(); + delete d; d = 0; +} + +void LdapClient::setHost( const TQString& host ) +{ + mHost = host; +} + +void LdapClient::setPort( const TQString& port ) +{ + mPort = port; +} + +void LdapClient::setBase( const TQString& base ) +{ + mBase = base; +} + +void LdapClient::setBindDN( const TQString& bindDN ) +{ + d->bindDN = bindDN; +} + +void LdapClient::setPwdBindDN( const TQString& pwdBindDN ) +{ + d->pwdBindDN = pwdBindDN; +} + +void LdapClient::setAttrs( const TQStringList& attrs ) +{ + mAttrs = attrs; +} + +void LdapClient::startQuery( const TQString& filter ) +{ + cancelQuery(); + LDAPUrl url; + + url.setProtocol( "ldap" ); + url.setUser( d->bindDN ); + url.setPass( d->pwdBindDN ); + url.setHost( mHost ); + url.setPort( mPort.toUInt() ); + url.setDn( mBase ); + url.setAttributes( mAttrs ); + url.setScope( mScope == "one" ? LDAPUrl::One : LDAPUrl::Sub ); + url.setFilter( "("+filter+")" ); + + kdDebug(5700) << "Doing query: " << url.prettyURL() << endl; + + startParseLDIF(); + mActive = true; + mJob = TDEIO::get( url, false, false ); + connect( mJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( mJob, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), + this, TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString& ) ) ); + connect( mJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( slotDone() ) ); +} + +void LdapClient::cancelQuery() +{ + if ( mJob ) { + mJob->kill(); + mJob = 0; + } + + mActive = false; +} + +void LdapClient::slotData( TDEIO::Job*, const TQByteArray& data ) +{ +#ifndef NDEBUG // don't create the QString +// TQString str( data ); +// kdDebug(5700) << "LdapClient: Got \"" << str << "\"\n"; +#endif + parseLDIF( data ); +} + +void LdapClient::slotInfoMessage( TDEIO::Job*, const TQString & ) +{ + //tqDebug("Job said \"%s\"", info.latin1()); +} + +void LdapClient::slotDone() +{ + endParseLDIF(); + mActive = false; +#if 0 + for ( TQValueList::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) { + tqDebug( (*it).toString().latin1() ); + } +#endif + int err = mJob->error(); + if ( err && err != TDEIO::ERR_USER_CANCELED ) { + emit error( TDEIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); + } + emit done(); +} + +void LdapClient::startParseLDIF() +{ + mCurrentObject.clear(); + mLastAttrName = 0; + mLastAttrValue = 0; + mIsBase64 = false; + d->ldif.startParsing(); +} + +void LdapClient::endParseLDIF() +{ +} + +void LdapClient::parseLDIF( const TQByteArray& data ) +{ + if ( data.size() ) { + d->ldif.setLDIF( data ); + } else { + d->ldif.endLDIF(); + } + + LDIF::ParseVal ret; + TQString name; + do { + ret = d->ldif.nextItem(); + switch ( ret ) { + case LDIF::Item: + { + name = d->ldif.attr(); + // Must make a copy! TQByteArray is explicitely shared + TQByteArray value = d->ldif.val().copy(); + mCurrentObject.attrs[ name ].append( value ); + break; + } + case LDIF::EndEntry: + mCurrentObject.dn = d->ldif.dn(); + mCurrentObject.client = this; + emit result( mCurrentObject ); + mCurrentObject.clear(); + break; + default: + break; + } + } while ( ret != LDIF::MoreData ); +} + +TQString LdapClient::bindDN() const +{ + return d->bindDN; +} + +TQString LdapClient::pwdBindDN() const +{ + return d->pwdBindDN; +} + +LdapSearch::LdapSearch() + : mActiveClients( 0 ), mNoLDAPLookup( false ) +{ + if ( !KProtocolInfo::isKnownProtocol( KURL("ldap://localhost") ) ) { + mNoLDAPLookup = true; + return; + } + + // stolen from KAddressBook + TDEConfig config( "kabldaprc", true ); + config.setGroup( "LDAP" ); + int numHosts = config.readUnsignedNumEntry( "NumSelectedHosts"); + if ( !numHosts ) { + mNoLDAPLookup = true; + return; + } else { + for ( int j = 0; j < numHosts; j++ ) { + LdapClient* ldapClient = new LdapClient( this ); + + TQString host = config.readEntry( TQString( "SelectedHost%1" ).arg( j ), "" ).stripWhiteSpace(); + if ( !host.isEmpty() ) + ldapClient->setHost( host ); + + TQString port = TQString::number( config.readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) ) ); + if ( !port.isEmpty() ) + ldapClient->setPort( port ); + + TQString base = config.readEntry( TQString( "SelectedBase%1" ).arg( j ), "" ).stripWhiteSpace(); + if ( !base.isEmpty() ) + ldapClient->setBase( base ); + + TQString bindDN = config.readEntry( TQString( "SelectedBind%1" ).arg( j ) ).stripWhiteSpace(); + if ( !bindDN.isEmpty() ) + ldapClient->setBindDN( bindDN ); + + TQString pwdBindDN = config.readEntry( TQString( "SelectedPwdBind%1" ).arg( j ) ); + if ( !pwdBindDN.isEmpty() ) + ldapClient->setPwdBindDN( pwdBindDN ); + + TQStringList attrs; + attrs << "cn" << "mail" << "givenname" << "sn"; + ldapClient->setAttrs( attrs ); + + connect( ldapClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), + this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); + connect( ldapClient, TQT_SIGNAL( done() ), + this, TQT_SLOT( slotLDAPDone() ) ); + connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ), + this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); + + mClients.append( ldapClient ); + } + } + + connect( &mDataTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDataTimer() ) ); +} + +void LdapSearch::startSearch( const TQString& txt ) +{ + if ( mNoLDAPLookup ) + return; + + cancelSearch(); + + int pos = txt.find( '\"' ); + if( pos >= 0 ) + { + ++pos; + int pos2 = txt.find( '\"', pos ); + if( pos2 >= 0 ) + mSearchText = txt.mid( pos , pos2 - pos ); + else + mSearchText = txt.mid( pos ); + } else + mSearchText = txt; + + TQString filter = TQString( "|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*)" ) + .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); + + TQValueList< LdapClient* >::Iterator it; + for ( it = mClients.begin(); it != mClients.end(); ++it ) { + (*it)->startQuery( filter ); + ++mActiveClients; + } +} + +void LdapSearch::cancelSearch() +{ + TQValueList< LdapClient* >::Iterator it; + for ( it = mClients.begin(); it != mClients.end(); ++it ) + (*it)->cancelQuery(); + + mActiveClients = 0; + mResults.clear(); +} + +void LdapSearch::slotLDAPResult( const KABC::LdapObject& obj ) +{ + mResults.append( obj ); + if ( !mDataTimer.isActive() ) + mDataTimer.start( 500, true ); +} + +void LdapSearch::slotLDAPError( const TQString& ) +{ + slotLDAPDone(); +} + +void LdapSearch::slotLDAPDone() +{ + if ( --mActiveClients > 0 ) + return; + + finish(); +} + +void LdapSearch::slotDataTimer() +{ + TQStringList lst; + LdapResultList reslist; + makeSearchData( lst, reslist ); + if ( !lst.isEmpty() ) + emit searchData( lst ); + if ( !reslist.isEmpty() ) + emit searchData( reslist ); +} + +void LdapSearch::finish() +{ + mDataTimer.stop(); + + slotDataTimer(); // emit final bunch of data + emit searchDone(); +} + +void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) +{ + TQString search_text_upper = mSearchText.upper(); + + TQValueList< KABC::LdapObject >::ConstIterator it1; + for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) { + TQString name, mail, givenname, sn; + + LdapAttrMap::ConstIterator it2; + for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) { + TQString tmp = TQString::fromUtf8( (*it2).first(), (*it2).first().size() ); + if ( it2.key() == "cn" ) + name = tmp; // TODO loop? + else if( it2.key() == "mail" ) + mail = tmp; + else if( it2.key() == "givenName" ) + givenname = tmp; + else if( it2.key() == "sn" ) + sn = tmp; + } + + if( mail.isEmpty()) + continue; // nothing, bad entry + else if ( name.isEmpty() ) + ret.append( mail ); + else { + kdDebug(5700) << "<" << name << "><" << mail << ">" << endl; + ret.append( TQString( "%1 <%2>" ).arg( name ).arg( mail ) ); + } + + LdapResult sr; + sr.clientNumber = mClients.findIndex( (*it1).client ); + sr.name = name; + sr.email = mail; + resList.append( sr ); + } + + mResults.clear(); +} + +bool LdapSearch::isAvailable() const +{ + return !mNoLDAPLookup; +} + + + +#include "ldapclient.moc" diff --git a/tdeabc/ldapclient.h b/tdeabc/ldapclient.h new file mode 100644 index 000000000..f43a644ce --- /dev/null +++ b/tdeabc/ldapclient.h @@ -0,0 +1,248 @@ +/* kldapclient.h - LDAP access + * Copyright (C) 2002 Klarälvdalens Datakonsult AB + * + * Author: Steffen Hansen + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#ifndef KABC_LDAPCLIENT_H +#define KABC_LDAPCLIENT_H + + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace KABC { + +class LdapClient; +typedef TQValueList LdapAttrValue; +typedef TQMap LdapAttrMap; + +/** + * This class is internal. Binary compatibiliy might be broken any time + * without notification. Do not use it. + * + * We mean it! + * + */ +class KABC_EXPORT LdapObject +{ + public: + LdapObject() + : dn( TQString::null ), client( 0 ) {} + explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {} + LdapObject( const LdapObject& that ) { assign( that ); } + + LdapObject& operator=( const LdapObject& that ) + { + assign( that ); + return *this; + } + + TQString toString() const; + + void clear(); + + TQString dn; + LdapAttrMap attrs; + LdapClient* client; + + protected: + void assign( const LdapObject& that ); + + private: + //class LdapObjectPrivate* d; +}; + +/** + * This class is internal. Binary compatibiliy might be broken any time + * without notification. Do not use it. + * + * We mean it! + * + */ +class KABC_EXPORT LdapClient : public TQObject +{ + Q_OBJECT + + public: + LdapClient( TQObject* parent = 0, const char* name = 0 ); + virtual ~LdapClient(); + + /*! returns true if there is a query running */ + bool isActive() const { return mActive; } + + signals: + /*! Emitted when the query is done */ + void done(); + + /*! Emitted in case of error */ + void error( const TQString& ); + + /*! Emitted once for each object returned + * from the query + */ + void result( const KABC::LdapObject& ); + + public slots: + /*! + * Set the name or IP of the LDAP server + */ + void setHost( const TQString& host ); + TQString host() const { return mHost; } + + /*! + * Set the port of the LDAP server + * if using a nonstandard port + */ + void setPort( const TQString& port ); + TQString port() const { return mPort; } + + /*! + * Set the base DN + */ + void setBase( const TQString& base ); + TQString base() const { return mBase; } + + /*! + * Set the bind DN + */ + void setBindDN( const TQString& bindDN ); + TQString bindDN() const; + + /*! + * Set the bind password DN + */ + void setPwdBindDN( const TQString& pwdBindDN ); + TQString pwdBindDN() const; + + /*! Set the attributes that should be + * returned, or an empty list if + * all attributes are wanted + */ + void setAttrs( const TQStringList& attrs ); + TQStringList attrs() const { return mAttrs; } + + void setScope( const TQString scope ) { mScope = scope; } + + /*! + * Start the query with filter filter + */ + void startQuery( const TQString& filter ); + + /*! + * Abort a running query + */ + void cancelQuery(); + + protected slots: + void slotData( TDEIO::Job*, const TQByteArray &data ); + void slotInfoMessage( TDEIO::Job*, const TQString &info ); + void slotDone(); + + protected: + void startParseLDIF(); + void parseLDIF( const TQByteArray& data ); + void endParseLDIF(); + + TQString mHost; + TQString mPort; + TQString mBase; + TQString mScope; + TQStringList mAttrs; + + TQGuardedPtr mJob; + bool mActive; + + LdapObject mCurrentObject; + TQCString mBuf; + TQCString mLastAttrName; + TQCString mLastAttrValue; + bool mIsBase64; + + private: + class LdapClientPrivate; + LdapClientPrivate* d; +}; + +/** + * Structure describing one result returned by a LDAP query + */ +struct LdapResult { + TQString name; ///< full name + TQString email; ///< email + int clientNumber; ///< for sorting +}; +typedef TQValueList LdapResultList; + + +/** + * This class is internal. Binary compatibiliy might be broken any time + * without notification. Do not use it. + * + * We mean it! + * + */ +class KABC_EXPORT LdapSearch : public TQObject +{ + Q_OBJECT + + public: + LdapSearch(); + + void startSearch( const TQString& txt ); + void cancelSearch(); + bool isAvailable() const; + + signals: + /// Results, assembled as "Full Name " + /// (This signal can be emitted many times) + void searchData( const TQStringList& ); + /// Another form for the results, with separate fields + /// (This signal can be emitted many times) + void searchData( const KABC::LdapResultList& ); + void searchDone(); + + private slots: + void slotLDAPResult( const KABC::LdapObject& ); + void slotLDAPError( const TQString& ); + void slotLDAPDone(); + void slotDataTimer(); + + private: + void finish(); + void makeSearchData( TQStringList& ret, LdapResultList& resList ); + TQValueList< LdapClient* > mClients; + TQString mSearchText; + TQTimer mDataTimer; + int mActiveClients; + bool mNoLDAPLookup; + TQValueList< LdapObject > mResults; + + private: + class LdapSearchPrivate* d; +}; + +} +#endif // KABC_LDAPCLIENT_H diff --git a/tdeabc/ldapconfigwidget.cpp b/tdeabc/ldapconfigwidget.cpp new file mode 100644 index 000000000..fa092754e --- /dev/null +++ b/tdeabc/ldapconfigwidget.cpp @@ -0,0 +1,626 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "ldapconfigwidget.h" +#include "ldapconfigwidget.moc" + +using namespace KABC; + +LdapConfigWidget::LdapConfigWidget( TQWidget* parent, + const char* name, WFlags fl ) : TQWidget( parent, name, fl ) +{ + mProg = 0; + mFlags = 0; + mainLayout = new TQGridLayout( this, 12, 4, 0, + KDialog::spacingHint() ); +} + +LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent, + const char* name, WFlags fl ) : TQWidget( parent, name, fl ) +{ + mFlags = flags; + mProg = 0; + mainLayout = new TQGridLayout( this, 12, 4, 0, + KDialog::spacingHint() ); + initWidget(); +} + +LdapConfigWidget::~LdapConfigWidget() +{ +} + +void LdapConfigWidget::initWidget() +{ + TQLabel *label; + + mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0; + mPort = mVer = mTimeLimit = mSizeLimit = 0; + mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = 0; + mEditButton = mQueryMech = 0; + mMech = 0; + int row = 0; + int col; + + if ( mFlags & W_USER ) { + label = new TQLabel( i18n( "User:" ), this ); + mUser = new KLineEdit( this, "kcfg_ldapuser" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mUser, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_BINDDN ) { + label = new TQLabel( i18n( "Bind DN:" ), this ); + mBindDN = new KLineEdit( this, "kcfg_ldapbinddn" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mBindDN, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_REALM ) { + label = new TQLabel( i18n( "Realm:" ), this ); + mRealm = new KLineEdit( this, "kcfg_ldaprealm" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mRealm, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_PASS ) { + label = new TQLabel( i18n( "Password:" ), this ); + mPassword = new KLineEdit( this, "kcfg_ldappassword" ); + mPassword->setEchoMode( KLineEdit::Password ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mPassword, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_HOST ) { + label = new TQLabel( i18n( "Host:" ), this ); + mHost = new KLineEdit( this, "kcfg_ldaphost" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mHost, row, row, 1, 3 ); + row++; + } + + col = 0; + if ( mFlags & W_PORT ) { + label = new TQLabel( i18n( "Port:" ), this ); + mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" ); + mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mPort->setValue( 389 ); + + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mPort, row, col+1 ); + col += 2; + } + + if ( mFlags & W_VER ) { + label = new TQLabel( i18n( "LDAP version:" ), this ); + mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" ); + mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mVer->setValue( 3 ); + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mVer, row, col+1 ); + } + if ( mFlags & ( W_PORT | W_VER ) ) row++; + + col = 0; + if ( mFlags & W_SIZELIMIT ) { + label = new TQLabel( i18n( "Size limit:" ), this ); + mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" ); + mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mSizeLimit->setValue( 0 ); + mSizeLimit->setSpecialValueText( i18n("Default") ); + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mSizeLimit, row, col+1 ); + col += 2; + } + + if ( mFlags & W_TIMELIMIT ) { + label = new TQLabel( i18n( "Time limit:" ), this ); + mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" ); + mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mTimeLimit->setValue( 0 ); + mTimeLimit->setSuffix( i18n(" sec") ); + mTimeLimit->setSpecialValueText( i18n("Default") ); + mainLayout->addWidget( label, row, col ); + mainLayout->addWidget( mTimeLimit, row, col+1 ); + } + if ( mFlags & ( W_SIZELIMIT | W_TIMELIMIT ) ) row++; + + if ( mFlags & W_DN ) { + label = new TQLabel( i18n( "Distinguished Name", "DN:" ), this ); + mDn = new KLineEdit( this, "kcfg_ldapdn" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mDn, row, row, 1, 1 ); + //without host query doesn't make sense + if ( mHost ) { + TQPushButton *dnquery = new TQPushButton( i18n( "Query Server" ), this ); + connect( dnquery, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryDNClicked() ) ); + mainLayout->addMultiCellWidget( dnquery, row, row, 2, 3 ); + } + row++; + } + + if ( mFlags & W_FILTER ) { + label = new TQLabel( i18n( "Filter:" ), this ); + mFilter = new KLineEdit( this, "kcfg_ldapfilter" ); + + mainLayout->addWidget( label, row, 0 ); + mainLayout->addMultiCellWidget( mFilter, row, row, 1, 3 ); + row++; + } + + if ( mFlags & W_SECBOX ) { + TQHButtonGroup *btgroup = new TQHButtonGroup( i18n( "Security" ), this ); + mSecNO = new TQRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" ); + mSecTLS = new TQRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" ); + mSecSSL = new TQRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" ); + mainLayout->addMultiCellWidget( btgroup, row, row, 0, 3 ); + + connect( mSecNO, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); + connect( mSecTLS, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) ); + connect( mSecSSL, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPSPort( ) ) ); + + mSecNO->setChecked( true ); + row++; + } + + if ( mFlags & W_AUTHBOX ) { + + TQButtonGroup *authbox = + new TQButtonGroup( 3, Qt::Horizontal, i18n( "Authentication" ), this ); + + mAnonymous = new TQRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" ); + mSimple = new TQRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" ); + mSASL = new TQRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" ); + + label = new TQLabel( i18n( "SASL mechanism:" ), authbox ); + mMech = new KComboBox( false, authbox, "kcfg_ldapsaslmech" ); + mMech->setEditable( true ); + mMech->insertItem( "DIGEST-MD5" ); + mMech->insertItem( "GSSAPI" ); + mMech->insertItem( "PLAIN" ); + + //without host query doesn't make sense + if ( mHost ) { + mQueryMech = new TQPushButton( i18n( "Query Server" ), authbox ); + connect( mQueryMech, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryMechClicked() ) ); + } + + mainLayout->addMultiCellWidget( authbox, row, row+1, 0, 3 ); + + connect( mAnonymous, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setAnonymous(int) ) ); + connect( mSimple, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSimple(int) ) ); + connect( mSASL, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSASL(int) ) ); + + mAnonymous->setChecked( true ); + } + +} + +void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d ) +{ + LDIF::ParseVal ret; + + if ( d.size() ) { + mLdif.setLDIF( d ); + } else { + mLdif.endLDIF(); + } + do { + ret = mLdif.nextItem(); + if ( ret == LDIF::Item && mLdif.attr().lower() == mAttr ) { + mProg->progressBar()->advance( 1 ); + mQResult.push_back( TQString::fromUtf8( mLdif.val(), mLdif.val().size() ) ); + } + } while ( ret != LDIF::MoreData ); +} + +void LdapConfigWidget::loadResult( TDEIO::Job* job) +{ + int error = job->error(); + if ( error && error != TDEIO::ERR_USER_CANCELED ) + mErrorMsg = job->errorString(); + else + mErrorMsg = ""; + + mCancelled = false; + mProg->close(); +} + +void LdapConfigWidget::sendQuery() +{ + LDAPUrl _url; + + mQResult.clear(); + mCancelled = true; + + _url.setProtocol( ( mSecSSL && mSecSSL->isChecked() ) ? "ldaps" : "ldap" ); + if ( mHost ) _url.setHost( mHost->text() ); + if ( mPort ) _url.setPort( mPort->value() ); + _url.setDn( "" ); + _url.setAttributes( mAttr ); + _url.setScope( LDAPUrl::Base ); + if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); + if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls", "" ); + + kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl; + mLdif.startParsing(); + TDEIO::Job *job = TDEIO::get( _url, true, false ); + job->addMetaData("no-auth-prompt","true"); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadResult( TDEIO::Job* ) ) ); + + if ( mProg == NULL ) + mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); + else + mProg->setLabel( _url.prettyURL() ); + mProg->progressBar()->setValue( 0 ); + mProg->progressBar()->setTotalSteps( 1 ); + mProg->exec(); + if ( mCancelled ) { + kdDebug(5700) << "query cancelled!" << endl; + job->kill( true ); + } else { + if ( !mErrorMsg.isEmpty() ) KMessageBox::error( this, mErrorMsg ); + } +} + +void LdapConfigWidget::mQueryMechClicked() +{ + mAttr = "supportedsaslmechanisms"; + sendQuery(); + if ( !mQResult.isEmpty() ) { + mQResult.sort(); + mMech->clear(); + mMech->insertStringList( mQResult ); + } +} + +void LdapConfigWidget::mQueryDNClicked() +{ + mAttr = "namingcontexts"; + sendQuery(); + if ( !mQResult.isEmpty() ) mDn->setText( mQResult.first() ); +} + +void LdapConfigWidget::setAnonymous( int state ) +{ + if ( state == TQButton::Off ) return; + if ( mUser ) mUser->setEnabled(false); + if ( mPassword ) mPassword->setEnabled(false); + if ( mBindDN ) mBindDN->setEnabled(false); + if ( mRealm ) mRealm->setEnabled(false); + if ( mMech ) mMech->setEnabled(false); + if ( mQueryMech ) mQueryMech->setEnabled(false); +} + +void LdapConfigWidget::setSimple( int state ) +{ + if ( state == TQButton::Off ) return; + if ( mUser ) mUser->setEnabled(true); + if ( mPassword ) mPassword->setEnabled(true); + if ( mBindDN ) mBindDN->setEnabled(false); + if ( mRealm ) mRealm->setEnabled(false); + if ( mMech ) mMech->setEnabled(false); + if ( mQueryMech ) mQueryMech->setEnabled(false); +} + +void LdapConfigWidget::setSASL( int state ) +{ + if ( state == TQButton::Off ) return; + if ( mUser ) mUser->setEnabled(true); + if ( mPassword ) mPassword->setEnabled(true); + if ( mBindDN ) mBindDN->setEnabled(true); + if ( mRealm ) mRealm->setEnabled(true); + if ( mMech ) mMech->setEnabled(true); + if ( mQueryMech ) mQueryMech->setEnabled(true); +} + +void LdapConfigWidget::setLDAPPort() +{ + mPort->setValue( 389 ); +} + +void LdapConfigWidget::setLDAPSPort() +{ + mPort->setValue( 636 ); +} + + +LDAPUrl LdapConfigWidget::url() const +{ + LDAPUrl _url; + if ( mSecSSL && mSecSSL->isChecked() ) + _url.setProtocol( "ldaps" ); + else + _url.setProtocol( "ldap" ); + + if ( mUser ) _url.setUser( mUser->text() ); + if ( mPassword ) _url.setPass( mPassword->text() ); + if ( mHost ) _url.setHost( mHost->text() ); + if ( mPort ) _url.setPort( mPort->value() ); + if ( mDn ) _url.setDn( mDn->text() ); + if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) ); + if ( mSizeLimit && mSizeLimit->value() != 0 ) + _url.setExtension( "x-sizelimit", TQString::number( mSizeLimit->value() ) ); + if ( mTimeLimit && mTimeLimit->value() != 0 ) + _url.setExtension( "x-timelimit", TQString::number( mTimeLimit->value() ) ); + if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls","" ); + if ( mFilter && !mFilter->text().isEmpty() ) + _url.setFilter( mFilter->text() ); + if ( mSASL && mSASL->isChecked() ) { + _url.setExtension( "x-sasl", "" ); + _url.setExtension( "x-mech", mMech->currentText() ); + if ( mBindDN && !mBindDN->text().isEmpty() ) + _url.setExtension( "bindname", mBindDN->text() ); + if ( mRealm && !mRealm->text().isEmpty() ) + _url.setExtension( "x-realm", mRealm->text() ); + } + return ( _url ); +} + +void LdapConfigWidget::setUser( const TQString &user ) +{ + if ( mUser ) mUser->setText( user ); +} + +TQString LdapConfigWidget::user() const +{ + return ( mUser ? mUser->text() : TQString::null ); +} + +void LdapConfigWidget::setPassword( const TQString &password ) +{ + if ( mPassword ) mPassword->setText( password ); +} + +TQString LdapConfigWidget::password() const +{ + return ( mPassword ? mPassword->text() : TQString::null ); +} + +void LdapConfigWidget::setBindDN( const TQString &binddn ) +{ + if ( mBindDN ) mBindDN->setText( binddn ); +} + +TQString LdapConfigWidget::bindDN() const +{ + return ( mBindDN ? mBindDN->text() : TQString::null ); +} + +void LdapConfigWidget::setRealm( const TQString &realm ) +{ + if ( mRealm ) mRealm->setText( realm ); +} + +TQString LdapConfigWidget::realm() const +{ + return ( mRealm ? mRealm->text() : TQString::null ); +} + +void LdapConfigWidget::setHost( const TQString &host ) +{ + if ( mHost ) mHost->setText( host ); +} + +TQString LdapConfigWidget::host() const +{ + return ( mHost ? mHost->text() : TQString::null ); +} + +void LdapConfigWidget::setPort( int port ) +{ + if ( mPort ) mPort->setValue( port ); +} + +int LdapConfigWidget::port() const +{ + return ( mPort ? mPort->value() : 389 ); +} + +void LdapConfigWidget::setVer( int ver ) +{ + if ( mVer ) mVer->setValue( ver ); +} + +int LdapConfigWidget::ver() const +{ + return ( mVer ? mVer->value() : 3 ); +} + +void LdapConfigWidget::setDn( const TQString &dn ) +{ + if ( mDn ) mDn->setText( dn ); +} + +TQString LdapConfigWidget::dn() const +{ + return ( mDn ? mDn->text() : TQString::null ); +} + +void LdapConfigWidget::setFilter( const TQString &filter ) +{ + if ( mFilter ) mFilter->setText( filter ); +} + +TQString LdapConfigWidget::filter() const +{ + return ( mFilter ? mFilter->text() : TQString::null ); +} + +void LdapConfigWidget::setMech( const TQString &mech ) +{ + if ( mMech == 0 ) return; + if ( !mech.isEmpty() ) { + int i = 0; + while ( i < mMech->count() ) { + if ( mMech->text( i ) == mech ) break; + i++; + } + if ( i == mMech->count() ) mMech->insertItem( mech ); + mMech->setCurrentItem( i ); + } +} + +TQString LdapConfigWidget::mech() const +{ + return ( mMech ? mMech->currentText() : TQString::null ); +} + +void LdapConfigWidget::setSecNO( bool b ) +{ + if ( mSecNO ) mSecNO->setChecked( b ); +} + +bool LdapConfigWidget::isSecNO() const +{ + return ( mSecNO ? mSecNO->isChecked() : true ); +} + +void LdapConfigWidget::setSecTLS( bool b ) +{ + if ( mSecTLS ) mSecTLS->setChecked( b ); +} + +bool LdapConfigWidget::isSecTLS() const +{ + return ( mSecTLS ? mSecTLS->isChecked() : false ); +} + +void LdapConfigWidget::setSecSSL( bool b ) +{ + if ( mSecSSL ) mSecSSL->setChecked( b ); +} + +bool LdapConfigWidget::isSecSSL() const +{ + return ( mSecSSL ? mSecSSL->isChecked() : false ); +} + +void LdapConfigWidget::setAuthAnon( bool b ) +{ + if ( mAnonymous ) mAnonymous->setChecked( b ); +} + +bool LdapConfigWidget::isAuthAnon() const +{ + return ( mAnonymous ? mAnonymous->isChecked() : true ); +} + +void LdapConfigWidget::setAuthSimple( bool b ) +{ + if ( mSimple ) mSimple->setChecked( b ); +} + +bool LdapConfigWidget::isAuthSimple() const +{ + return ( mSimple ? mSimple->isChecked() : false ); +} + +void LdapConfigWidget::setAuthSASL( bool b ) +{ + if ( mSASL ) mSASL->setChecked( b ); +} + +bool LdapConfigWidget::isAuthSASL() const +{ + return ( mSASL ? mSASL->isChecked() : false ); +} + +void LdapConfigWidget::setSizeLimit( int sizelimit ) +{ + if ( mSizeLimit ) mSizeLimit->setValue( sizelimit ); +} + +int LdapConfigWidget::sizeLimit() const +{ + return ( mSizeLimit ? mSizeLimit->value() : 0 ); +} + +void LdapConfigWidget::setTimeLimit( int timelimit ) +{ + if ( mTimeLimit ) mTimeLimit->setValue( timelimit ); +} + +int LdapConfigWidget::timeLimit() const +{ + return ( mTimeLimit ? mTimeLimit->value() : 0 ); +} + +int LdapConfigWidget::flags() const +{ + return mFlags; +} + +void LdapConfigWidget::setFlags( int flags ) +{ + mFlags = flags; + + // First delete all the child widgets. + // FIXME: I hope it's correct + const TQObjectList ch = childrenListObject(); + TQObjectList ch2 = ch; + TQObject *obj; + TQWidget *widget; + + obj = ch2.first(); + while ( obj != 0 ) { + widget = dynamic_cast (obj); + if ( widget && TQT_BASE_OBJECT(widget->parent()) == TQT_BASE_OBJECT(this) ) { + mainLayout->remove( widget ); + delete ( widget ); + } + obj = ch2.next(); + } + // Re-create child widgets according to the new flags + initWidget(); +} diff --git a/tdeabc/ldapconfigwidget.h b/tdeabc/ldapconfigwidget.h new file mode 100644 index 000000000..7071bce10 --- /dev/null +++ b/tdeabc/ldapconfigwidget.h @@ -0,0 +1,300 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LDAPCONFIGWIDGET_H +#define LDAPCONFIGWIDGET_H + +#include +#include +#include + +#include +#include +#include + +class TQGridLayout; +class TQSpinBox; +class TQPushButton; +class TQCheckBox; +class TQRadioButton; +class KComboBox; +class KLineEdit; +class KProgressDialog; + +namespace KABC { + + /** + @short LDAP Configuration widget + + This class can be used to query the user for LDAP connection parameters. + It's TDEConfigXT compatible, using widget names starting with kcfg_ + */ + + class KABC_EXPORT LdapConfigWidget : public TQWidget + { + Q_OBJECT + + TQ_PROPERTY( LCW_Flags flags READ flagsProp WRITE setFlagsProp ) + TQ_PROPERTY( TQString user READ user WRITE setUser ) + TQ_PROPERTY( TQString password READ password WRITE setPassword ) + TQ_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN ) + TQ_PROPERTY( TQString realm READ realm WRITE setRealm ) + TQ_PROPERTY( TQString host READ host WRITE setHost ) + TQ_PROPERTY( int port READ port WRITE setPort ) + TQ_PROPERTY( int ver READ ver WRITE setVer ) + TQ_PROPERTY( TQString dn READ dn WRITE setDn ) + TQ_PROPERTY( TQString filter READ filter WRITE setFilter ) + TQ_PROPERTY( TQString mech READ mech WRITE setMech ) + TQ_PROPERTY( bool secNO READ isSecNO WRITE setSecNO ) + TQ_PROPERTY( bool secSSL READ isSecSSL WRITE setSecSSL ) + TQ_PROPERTY( bool secTLS READ isSecSSL WRITE setSecTLS ) + TQ_PROPERTY( bool authAnon READ isAuthAnon WRITE setAuthAnon ) + TQ_PROPERTY( bool authSimple READ isAuthSimple WRITE setAuthSimple ) + TQ_PROPERTY( bool authSASL READ isAuthSASL WRITE setAuthSASL ) + TQ_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit ) + TQ_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit ) + TQ_SETS ( LCW_Flags ) + + public: + + enum LCW_Flags { + W_USER = 0x1, + W_PASS = 0x2, + W_BINDDN = 0x4, + W_REALM = 0x8, + W_HOST = 0x10, + W_PORT = 0x20, + W_VER = 0x40, + W_DN = 0x80, + W_FILTER = 0x100, + W_SECBOX = 0x400, + W_AUTHBOX = 0x800, + W_TIMELIMIT = 0x1000, + W_SIZELIMIT = 0x2000, + W_ALL = 0xFFFFFFF + }; + + /** Constructs an empty configuration widget. + * You need to call setFlags() after this. + */ + LdapConfigWidget( TQWidget* parent = 0, + const char* name = 0, WFlags fl = 0 ); + /** Constructs a configuration widget */ + LdapConfigWidget( int flags, TQWidget* parent = 0, + const char* name = 0, WFlags fl = 0 ); + /** Destructs a configuration widget */ + virtual ~LdapConfigWidget(); + + /** Sets the user name. Kconfig widget name: kcfg_ldapuser */ + void setUser( const TQString &user ); + /** Gets the user name. Kconfig widget name: kcfg_ldapuser */ + TQString user() const; + + /** Sets the password. Kconfig widget name: kcfg_ldappassword */ + void setPassword( const TQString &password ); + /** Gets the password. Kconfig widget name: kcfg_ldappassword */ + TQString password() const; + + /** + * Sets the bind dn. Useful for SASL proxy auth. + * Kconfig widget name: kcfg_ldapbinddn + */ + void setBindDN( const TQString &binddn ); + /** Gets the bind dn. Kconfig widget name: kcfg_ldapbinddn*/ + TQString bindDN() const; + + /** Sets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ + void setRealm( const TQString &realm ); + /** Gets the SASL realm. Kconfig widget name: kcfg_ldaprealm */ + TQString realm() const; + + /** Sets the host name. Kconfig widget name: kcfg_ldaphost */ + void setHost( const TQString &host ); + /** Gets the host name. Kconfig widget name: kcfg_ldaphost */ + TQString host() const; + + /** Sets the LDAP port. Kconfig widget name: kcfg_ldapport */ + void setPort( int port ); + /** Gets the LDAP port. Kconfig widget name: kcfg_ldapport */ + int port() const; + + /** Sets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ + void setVer( int ver ); + /** Gets the LDAP protocol version. Kconfig widget name: kcfg_ldapver */ + int ver() const; + + /** Sets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ + void setDn( const TQString &dn ); + /** Gets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */ + TQString dn() const; + + /** Sets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ + void setFilter( const TQString &filter ); + /** Gets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */ + TQString filter() const; + + /** Sets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ + void setMech( const TQString &mech ); + /** Gets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */ + TQString mech() const; + + /** + * Sets the configuration to no transport security. + * Kconfig widget name: kcfg_ldapnosec + */ + void setSecNO( bool b = true ); + /** + * Returns true if no transport security selected. + * Kconfig widget name: kcfg_ldapnosec + */ + bool isSecNO() const; + + /** + * Sets the configuration to TLS. + * Kconfig widget name: kcfg_ldaptls + */ + void setSecTLS( bool b = true ); + /** + * Returns true if TLS selected. + * Kconfig widget name: kcfg_ldaptls + */ + bool isSecTLS() const; + + /** + * Sets the configuration to SSL. + * Kconfig widget name: kcfg_ldapssl + */ + void setSecSSL( bool b = true ); + /** + * Returns true if SSL selected. + * Kconfig widget name: kcfg_ldapssl + */ + bool isSecSSL() const; + + /** + * Sets the authentication to anonymous. + * Kconfig widget name: kcfg_ldapanon + */ + void setAuthAnon( bool b = true ); + /** + * Returns true if Anonymous authentication selected. + * Kconfig widget name: kcfg_ldapanon + */ + bool isAuthAnon() const; + + /** + * Sets the authentication to simple. + * Kconfig widget name: kcfg_ldapsimple + */ + void setAuthSimple( bool b = true ); + /** + * Returns true if Simple authentication selected. + * Kconfig widget name: kcfg_ldapsimple + */ + bool isAuthSimple() const; + + /** + * Sets the authentication to SASL. + * Kconfig widget name: kcfg_ldapsasl + */ + void setAuthSASL( bool b = true ); + /** + * Returns true if SASL authentication selected. + * Kconfig widget name: kcfg_ldapsasl + */ + bool isAuthSASL() const; + + /** + * Sets the size limit. + * TDEConfig widget name: kcfg_ldapsizelimit + */ + void setSizeLimit( int sizelimit ); + /** + * Returns the size limit. + * TDEConfig widget name: kcfg_ldapsizelimit + */ + int sizeLimit() const; + + /** + * Sets the time limit. + * TDEConfig widget name: kcfg_ldaptimelimit + */ + void setTimeLimit( int timelimit ); + /** + * Returns the time limit. + * TDEConfig widget name: kcfg_ldaptimelimit + */ + int timeLimit() const; + + int flags() const; + void setFlags( int flags ); + inline LCW_Flags flagsProp() const { return (LCW_Flags)flags(); } + inline void setFlagsProp( LCW_Flags flags ) { setFlags((int)flags); } + + /** + * Returns a LDAP Url constructed from the settings given. + * Extensions are filled for use in the LDAP ioslave + */ + KABC::LDAPUrl url() const; + + private slots: + void setLDAPPort(); + void setLDAPSPort(); + void setAnonymous( int state ); + void setSimple( int state ); + void setSASL( int state ); + void mQueryDNClicked(); + void mQueryMechClicked(); + void loadData( TDEIO::Job*, const TQByteArray& ); + void loadResult( TDEIO::Job* ); + private: + + int mFlags; + LDIF mLdif; + TQStringList mQResult; + TQString mAttr; + + KLineEdit *mUser; + KLineEdit *mPassword; + KLineEdit *mHost; + TQSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit; + KLineEdit *mDn, *mBindDN, *mRealm; + KLineEdit *mFilter; + TQRadioButton *mAnonymous,*mSimple,*mSASL; + TQCheckBox *mSubTree; + TQPushButton *mEditButton; + TQPushButton *mQueryMech; + TQRadioButton *mSecNO,*mSecTLS,*mSecSSL; + KComboBox *mMech; + + TQString mErrorMsg; + bool mCancelled; + KProgressDialog *mProg; + + TQGridLayout *mainLayout; + class LDAPConfigWidgetPrivate; + LDAPConfigWidgetPrivate *d; + + void sendQuery(); + void initWidget(); + }; +} + +#endif diff --git a/tdeabc/ldapurl.cpp b/tdeabc/ldapurl.cpp new file mode 100644 index 000000000..9032c16d3 --- /dev/null +++ b/tdeabc/ldapurl.cpp @@ -0,0 +1,201 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "ldapurl.h" + +using namespace KABC; + +LDAPUrl::LDAPUrl() +{ + m_scope = Base; +} + +LDAPUrl::LDAPUrl(const KURL &_url) + : KURL(_url), m_extensions() +{ + m_dn = path(); + if ( !TQDir::isRelativePath(m_dn) ) +#ifdef Q_WS_WIN + m_dn.remove(0,3); // e.g. "c:/" +#else + m_dn.remove(0,1); +#endif + parseQuery(); +} + +void LDAPUrl::setDn( const TQString &dn) +{ + m_dn = dn; + if ( !TQDir::isRelativePath(m_dn) ) +#ifdef Q_WS_WIN + m_dn.remove(0,3); // e.g. "c:/" +#else + m_dn.remove(0,1); +#endif + setPath(m_dn); +} + +bool LDAPUrl::hasExtension( const TQString &key ) const +{ + return m_extensions.contains( key ); +} + +LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const +{ + TQMap::const_iterator it; + + it = m_extensions.find( key ); + if ( it != m_extensions.constEnd() ) + return (*it); + else { + Extension ext; + ext.value = ""; + ext.critical = false; + return ext; + } +} + +TQString LDAPUrl::extension( const TQString &key, bool &critical ) const +{ + Extension ext; + + ext = extension( key ); + critical = ext.critical; + return ext.value; +} + +void LDAPUrl::setExtension( const TQString &key, const LDAPUrl::Extension &ext ) +{ + m_extensions[ key ] = ext; + updateQuery(); +} + +void LDAPUrl::setExtension( const TQString &key, const TQString &value, bool critical ) +{ + Extension ext; + ext.value = value; + ext.critical = critical; + setExtension( key, ext ); +} + +void LDAPUrl::removeExtension( const TQString &key ) +{ + m_extensions.remove( key ); + updateQuery(); +} + +void LDAPUrl::updateQuery() +{ + Extension ext; + TQMap::iterator it; + TQString q = "?"; + + // set the attributes to query + if ( m_attributes.count() > 0 ) q += m_attributes.join(","); + + // set the scope + q += "?"; + switch( m_scope ) { + case Sub: + q += "sub"; + break; + case One: + q += "one"; + break; + case Base: + q += "base"; + break; + } + + // set the filter + q += "?"; + if ( m_filter != "(objectClass=*)" && !m_filter.isEmpty() ) + q += m_filter; + + // set the extensions + q += "?"; + for ( it = m_extensions.begin(); it != m_extensions.end(); ++it ) { + if ( it.data().critical ) q += "!"; + q += it.key(); + if ( !it.data().value.isEmpty() ) + q += "=" + it.data().value; + q += ","; + } + while ( q.endsWith("?") || q.endsWith(",") ) + q.remove( q.length() - 1, 1 ); + + setQuery(q); + kdDebug(5700) << "LDAP URL updateQuery(): " << prettyURL() << endl; +} + +void LDAPUrl::parseQuery() +{ + Extension ext; + TQStringList extensions; + TQString q = query(); + // remove first ? + if (q.startsWith("?")) + q.remove(0,1); + + // split into a list + TQStringList url_items = TQStringList::split("?", q, true); + + m_attributes.clear(); + m_scope = Base; + m_filter = "(objectClass=*)"; + m_extensions.clear(); + + int i = 0; + for ( TQStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) { + switch (i) { + case 0: + m_attributes = TQStringList::split(",", (*it), false); + break; + case 1: + if ( (*it) == "sub" ) m_scope = Sub; else + if ( (*it) == "one") m_scope = One; + break; + case 2: + m_filter = decode_string( *it ); + break; + case 3: + extensions = TQStringList::split(",", (*it), false); + break; + } + } + + TQString name,value; + for ( TQStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) { + ext.critical = false; + name = decode_string( (*it).section('=',0,0) ).lower(); + value = decode_string( (*it).section('=',1) ); + if ( name.startsWith("!") ) { + ext.critical = true; + name.remove(0, 1); + } + kdDebug(5700) << "LDAPUrl extensions name= " << name << " value: " << value << endl; + ext.value = value.replace( "%2", "," ); + setExtension( name, ext ); + } +} diff --git a/tdeabc/ldapurl.h b/tdeabc/ldapurl.h new file mode 100644 index 000000000..0c2693758 --- /dev/null +++ b/tdeabc/ldapurl.h @@ -0,0 +1,110 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _K_LDAPURL_H_ +#define _K_LDAPURL_H_ + +#include +#include +#include + +#include + +namespace KABC { + +/** + * LDAPUrl + + * LDAPUrl implements an RFC 2255 compliant LDAP Url parser, with minimal + * differences. LDAP Urls implemented by this class has the following format: + * ldap[s]://[user[:password]@]hostname[:port]["/" [dn ["?" [attributes] + * ["?" [scope] ["?" [filter] ["?" extensions]]]]]] + */ + + + class KABC_EXPORT LDAPUrl : public KURL + { + public: + + struct Extension { + TQString value; + bool critical; + }; + + typedef enum Scope { Base, One, Sub }; + + /** Constructs an empty KLDAPUrl. */ + LDAPUrl(); + /** Constructs a KLDAPUrl from a KURL. */ + LDAPUrl( const KURL &url ); + + /** + * Returns the dn part of the LDAP Url (same as path(), but slash removed + * from the beginning). + */ + const TQString& dn() const { return m_dn; } + /** Sets the the dn part of the LDAP Url. */ + void setDn( const TQString &dn ); + + /** Returns the attributes part of the LDAP Url */ + const TQStringList &attributes() { return m_attributes; } + /** Sets the attributes part of the LDAP Url */ + void setAttributes( const TQStringList &attributes ) + { m_attributes=attributes; updateQuery(); } + + /** Returns the scope part of the LDAP Url */ + Scope scope() const { return m_scope; } + /** Sets the scope part of the LDAP Url */ + void setScope(Scope scope) { m_scope = scope; updateQuery(); } + + /** Returns the filter part of the LDAP Url */ + const TQString &filter() const { return m_filter; } + /** Sets the filter part of the LDAP Url */ + void setFilter( TQString filter ) { m_filter = filter; updateQuery(); } + + /** Returns if the specified extension exists in the LDAP Url */ + bool hasExtension( const TQString &key ) const; + /** Returns the specified extension */ + Extension extension( const TQString &key ) const; + /** Returns the specified extension */ + TQString extension( const TQString &key, bool &critical ) const; + /** Sets the specified extension key with the value and criticality in ext */ + void setExtension( const TQString &key, const Extension &ext ); + /** Sets the specified extension key with the value and criticality specified */ + void setExtension( const TQString &key, const TQString &value, bool critical = false ); + /** Removes the specified extension */ + void removeExtension( const TQString &key ); + /** Updates the query component from the attributes, scope, filter and extensions */ + void updateQuery(); + + protected: + void parseQuery(); + + private: + + TQMap m_extensions; + TQString m_dn; + TQStringList m_attributes; + Scope m_scope; + TQString m_filter; + }; +} + +#endif diff --git a/tdeabc/ldif.cpp b/tdeabc/ldif.cpp new file mode 100644 index 000000000..408f5223f --- /dev/null +++ b/tdeabc/ldif.cpp @@ -0,0 +1,365 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "ldif.h" + +using namespace KABC; + +LDIF::LDIF() +{ + startParsing(); +} + +LDIF::~LDIF() +{ +} + +TQCString LDIF::assembleLine( const TQString &fieldname, const TQByteArray &value, + uint linelen, bool url ) +{ + bool safe = false; + bool isDn; + TQCString result; + uint i; + + if ( url ) { + result = fieldname.utf8() + ":< " + TQCString( value.data(), value.size()+1 ); + } else { + isDn = fieldname.lower() == "dn"; + //SAFE-INIT-CHAR + if ( value.size() > 0 && value[0] > 0 && value[0] != '\n' && + value[0] != '\r' && value[0] != ':' && value[0] != '<' ) safe = true; + + //SAFE-CHAR + if ( safe ) { + for ( i=1; i < value.size(); i++ ) { + //allow utf-8 in Distinguished Names + if ( ( isDn && value[i] == 0 ) || + ( !isDn && value[i] <= 0 ) || + value[i] == '\r' || value[i] == '\n' ) { + safe = false; + break; + } + } + } + + if ( value.size() == 0 ) safe = true; + + if( safe ) { + result = fieldname.utf8() + ": " + TQCString( value.data(), value.size()+1 ); + } else { + result = fieldname.utf8() + ":: " + KCodecs::base64Encode( value, false ); + } + + if ( linelen > 0 ) { + i = (fieldname.length()+2) > linelen ? fieldname.length()+2 : linelen; + while ( i < result.length() ) { + result.insert( i, "\n " ); + i += linelen+2; + } + } + } + return result; +} + +TQCString LDIF::assembleLine( const TQString &fieldname, const TQCString &value, + uint linelen, bool url ) +{ + TQCString ret; + TQByteArray tmp; + uint valuelen = value.length(); + const char *data = value.data(); + + tmp.setRawData( data, valuelen ); + ret = assembleLine( fieldname, tmp, linelen, url ); + tmp.resetRawData( data, valuelen ); + return ret; + +} + +TQCString LDIF::assembleLine( const TQString &fieldname, const TQString &value, + uint linelen, bool url ) +{ + return assembleLine( fieldname, value.utf8(), linelen, url ); +} + +bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ) +{ + int position; + TQByteArray tmp; + int linelen; + const char *data; + +// kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl; + + position = line.find( ":" ); + if ( position == -1 ) { + // strange: we did not find a fieldname + fieldname = ""; + TQCString str; + str = line.stripWhiteSpace(); + linelen = str.length(); + data = str.data(); + tmp.setRawData( data, linelen ); + value = tmp.copy(); + tmp.resetRawData( data, linelen ); +// kdDebug(5700) << "value : " << value[0] << endl; + return false; + } + + linelen = line.length(); + + if ( linelen > ( position + 1 ) && line[ position + 1 ] == ':' ) { + // String is BASE64 encoded -> decode it now. + fieldname = TQString::fromUtf8( + line.left( position ).stripWhiteSpace() ); + if ( linelen <= ( position + 3 ) ) { + value.resize( 0 ); + return false; + } + data = &line.data()[ position + 3 ]; + tmp.setRawData( data, linelen - position - 3 ); + KCodecs::base64Decode( tmp, value ); + tmp.resetRawData( data, linelen - position - 3 ); + return false; + } + + if ( linelen > ( position + 1 ) && line[ position + 1 ] == '<' ) { + // String is an URL. + fieldname = TQString::fromUtf8( + line.left( position ).stripWhiteSpace() ); + if ( linelen <= ( position + 3 ) ) { + value.resize( 0 ); + return false; + } + data = &line.data()[ position + 3]; + tmp.setRawData( data, linelen - position - 3 ); + value = tmp.copy(); + tmp.resetRawData( data, linelen - position - 3 ); + return true; + } + + fieldname = TQString::fromUtf8(line.left( position ).stripWhiteSpace()); + if ( linelen <= ( position + 2 ) ) { + value.resize( 0 ); + return false; + } + data = &line.data()[ position + 2 ]; + tmp.setRawData( data, linelen - position - 2 ); + value = tmp.copy(); + tmp.resetRawData( data, linelen - position - 2 ); + return false; +} + +bool LDIF::splitControl( const TQCString &line, TQString &oid, bool &critical, + TQByteArray &value ) +{ + TQString tmp; + critical = false; + bool url = splitLine( line, tmp, value ); + + kdDebug(5700) << "splitControl: value: " << TQString(TQString::fromUtf8(value, value.size())) << endl; + if ( tmp.isEmpty() ) { + tmp = TQString::fromUtf8( value, value.size() ); + value.resize( 0 ); + } + if ( tmp.right( 4 ) == "true" ) { + critical = true; + tmp.truncate( tmp.length() - 5 ); + } else if ( tmp.right( 5 ) == "false" ) { + critical = false; + tmp.truncate( tmp.length() - 6 ); + } + oid = tmp; + return url; +} + +LDIF::ParseVal LDIF::processLine() +{ + + if ( mIsComment ) return None; + + ParseVal retval = None; + if ( mLastParseVal == EndEntry ) mEntryType = Entry_None; + + mUrl = splitLine( line, mAttr, mVal ); + + TQString attrLower = mAttr.lower(); + + switch ( mEntryType ) { + case Entry_None: + if ( attrLower == "version" ) { + if ( !mDn.isEmpty() ) retval = Err; + } else if ( attrLower == "dn" ) { + kdDebug(5700) << "ldapentry dn: " << TQString(TQString::fromUtf8( mVal, mVal.size() )) << endl; + mDn = TQString::fromUtf8( mVal, mVal.size() ); + mModType = Mod_None; + retval = NewEntry; + } else if ( attrLower == "changetype" ) { + if ( mDn.isEmpty() ) + retval = Err; + else { + TQString tmpval = TQString::fromUtf8( mVal, mVal.size() ); + kdDebug(5700) << "changetype: " << tmpval << endl; + if ( tmpval == "add" ) mEntryType = Entry_Add; + else if ( tmpval == "delete" ) mEntryType = Entry_Del; + else if ( tmpval == "modrdn" || tmpval == "moddn" ) { + mNewRdn = ""; + mNewSuperior = ""; + mDelOldRdn = true; + mEntryType = Entry_Modrdn; + } + else if ( tmpval == "modify" ) mEntryType = Entry_Mod; + else retval = Err; + } + } else if ( attrLower == "control" ) { + mUrl = splitControl( TQCString( mVal, mVal.size() + 1 ), mOid, mCritical, mVal ); + retval = Control; + } else if ( !mAttr.isEmpty() && mVal.size() > 0 ) { + mEntryType = Entry_Add; + retval = Item; + } + break; + case Entry_Add: + if ( mAttr.isEmpty() && mVal.size() == 0 ) + retval = EndEntry; + else + retval = Item; + break; + case Entry_Del: + if ( mAttr.isEmpty() && mVal.size() == 0 ) + retval = EndEntry; + else + retval = Err; + break; + case Entry_Mod: + if ( mModType == Mod_None ) { + kdDebug(5700) << "tdeio_ldap: new modtype " << mAttr << endl; + if ( mAttr.isEmpty() && mVal.size() == 0 ) { + retval = EndEntry; + } else if ( attrLower == "add" ) { + mModType = Mod_Add; + } else if ( attrLower == "replace" ) { + mModType = Mod_Replace; + mAttr = TQString::fromUtf8( mVal, mVal.size() ); + mVal.resize( 0 ); + retval = Item; + } else if ( attrLower == "delete" ) { + mModType = Mod_Del; + mAttr = TQString::fromUtf8( mVal, mVal.size() ); + mVal.resize( 0 ); + retval = Item; + } else { + retval = Err; + } + } else { + if ( mAttr.isEmpty() ) { + if ( TQString::fromUtf8( mVal, mVal.size() ) == "-" ) { + mModType = Mod_None; + } else if ( mVal.size() == 0 ) { + retval = EndEntry; + } else + retval = Err; + } else + retval = Item; + } + break; + case Entry_Modrdn: + if ( mAttr.isEmpty() && mVal.size() == 0 ) + retval = EndEntry; + else if ( attrLower == "newrdn" ) + mNewRdn = TQString::fromUtf8( mVal, mVal.size() ); + else if ( attrLower == "newsuperior" ) + mNewSuperior = TQString::fromUtf8( mVal, mVal.size() ); + else if ( attrLower == "deleteoldrdn" ) { + if ( mVal.size() > 0 && mVal[0] == '0' ) + mDelOldRdn = false; + else if ( mVal.size() > 0 && mVal[0] == '1' ) + mDelOldRdn = true; + else + retval = Err; + } else + retval = Err; + break; + } + return retval; +} + +LDIF::ParseVal LDIF::nextItem() +{ + ParseVal retval = None; + char c=0; + + while( retval == None ) { + if ( mPos < mLdif.size() ) { + c = mLdif[mPos]; + mPos++; + if ( mIsNewLine && c == '\r' ) continue; //handle \n\r line end + if ( mIsNewLine && ( c == ' ' || c == '\t' ) ) { //line folding + mIsNewLine = false; + continue; + } + if ( mIsNewLine ) { + mIsNewLine = false; + retval = processLine(); + mLastParseVal = retval; + line.resize( 0 ); + mIsComment = ( c == '#' ); + } + if ( c == '\n' || c == '\r' ) { + mLineNo++; + mIsNewLine = true; + continue; + } + } else { + retval = MoreData; + break; + } + + if ( !mIsComment ) line += c; + } + return retval; +} + +void LDIF::endLDIF() +{ + TQByteArray tmp( 3 ); + tmp[ 0 ] = '\n'; + tmp[ 1 ] = '\n'; + tmp[ 2 ] = '\n'; + mLdif = tmp; + mPos = 0; +} + +void LDIF::startParsing() +{ + mPos = mLineNo = 0; + mDelOldRdn = false; + mEntryType = Entry_None; + mModType = Mod_None; + mDn = mNewRdn = mNewSuperior = ""; + line = ""; + mIsNewLine = false; + mIsComment = false; + mLastParseVal = None; +} diff --git a/tdeabc/ldif.h b/tdeabc/ldif.h new file mode 100644 index 000000000..f4da5f4f3 --- /dev/null +++ b/tdeabc/ldif.h @@ -0,0 +1,182 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Szombathelyi Gyorgy + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _K_LDIF_H_ +#define _K_LDIF_H_ + +#include +#include +#include + +#include + +namespace KABC { + + /** + * LDIF + + * LDIF implements an RFC 2849 compliant LDIF parser. LDIF files are used to + * represent directory information on LDAP-based servers, or to describe a set + * of changes which are to be applied to a directory. + */ + + class KABC_EXPORT LDIF + { + public: + + enum ParseVal{ None, NewEntry, EndEntry, Item, Control, Err, MoreData }; + enum EntryType{ Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn }; + enum ModType{ Mod_None, Mod_Add, Mod_Replace, Mod_Del }; + LDIF(); + virtual ~LDIF(); + + /** + * Assembles fieldname and value into a valid LDIF line, BASE64 encodes the + * value if neccessary and optionally splits into more lines. + * @param fieldname The name of the entry. + * @param value The value of the entry. + * @param linelen Maximum length of the lines in the result. + * @param url If true, encode value as url ( use :< ). + */ + static TQCString assembleLine( const TQString &fieldname, + const TQByteArray &value, uint linelen=0, bool url=false ); + /** + * This is the same as the above function, the only difference that + * this accepts TQCString as the value. + */ + static TQCString assembleLine( const TQString &fieldname, + const TQCString &value, uint linelen=0, bool url=false ); + /** + * This is the same as the above function, the only difference that + * this accepts TQString as the value. + */ + static TQCString assembleLine( const TQString &fieldname, + const TQString &value, uint linelen=0, bool url=false ); + + /** + * Splits one line from an LDIF file to attribute and value components. + * @returns true if value is an URL, false otherwise + */ + static bool splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value ); + /** + * Splits a control specification (without the "control:" directive) + * @param line is the control directive + * @param oid will contain the OID + * @param critical will contain the criticality of control + * @param value is the control value + */ + static bool splitControl( const TQCString &line, TQString &oid, bool &critical, + TQByteArray &value ); + /** + * Starts the parsing of a new LDIF + */ + void startParsing(); + /** + * Process one LDIF line + */ + ParseVal processLine(); + /** + * Process the LDIF until a complete item can be returned + * @returns NewEntry if a new DN encountered, + * Item if a new item returned, + * Err if the LDIF contains error, + * EndEntry if the parser reached the end of the current entry + * and MoreData if the parser encountered the end of the current chunk of + * the LDIF. If you want to finish the parsing after receiving + * MoreData, then call endLDIF(), so the parser can safely flush + * the current entry. + */ + ParseVal nextItem(); + /** + * Sets a chunk of LDIF. Call before startParsing(), or if nextItem() returned + * MoreData. + */ + void setLDIF( const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; } + /** + * Indicates the end of the LDIF file/stream. Call if nextItem() returned + * MoreData, but actually you don't have more data. + */ + void endLDIF(); + /** + * Returns the requested LDAP operation extracted from the current entry. + */ + EntryType entryType() const { return mEntryType; } + /** + * Returns the LDAP modify request type if entryType() returned Entry_Mod. + */ + int modType() const { return mModType; } + /** + * Returns the Distinguished Name of the current entry. + */ + const TQString& dn() const { return mDn; } + /** + * Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn. + */ + const TQString& newRdn() const { return mNewRdn; } + /** + * Returns the new parent of the entry if modType() returned Entry_Modrdn. + */ + const TQString& newSuperior() const { return mNewSuperior; } + /** + * Returns if the delete of the old RDN is required. + */ + bool delOldRdn() const { return mDelOldRdn; } + /** + * Returns the attribute name. + */ + const TQString& attr() const { return mAttr; } + /** + * Returns the attribute value. + */ + const TQByteArray& val() const { return mVal; } + /** + * Returns if val() is an url + */ + bool isUrl() const { return mUrl; } + /** + * Returns the criticality level when modType() returned Control. + */ + bool critical() const { return mCritical; } + /** + * Returns the OID when modType() returned Control. + */ + const TQString& oid() const { return mOid; } + /** + * Returns the line number which the parser processes. + */ + uint lineNo() const { return mLineNo; } + private: + int mModType; + bool mDelOldRdn, mUrl; + TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid; + TQByteArray mLdif, mVal; + EntryType mEntryType; + + bool mIsNewLine, mIsComment,mCritical; + ParseVal mLastParseVal; + uint mPos,mLineNo; + TQCString line; + + class LDIFPrivate; + LDIFPrivate *d; + }; +} + +#endif diff --git a/tdeabc/ldifconverter.cpp b/tdeabc/ldifconverter.cpp new file mode 100644 index 000000000..dcab83a40 --- /dev/null +++ b/tdeabc/ldifconverter.cpp @@ -0,0 +1,573 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Helge Deller + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +/* + Useful links: + - http://tldp.org/HOWTO/LDAP-Implementation-HOWTO/schemas.html + - http://www.faqs.org/rfcs/rfc2849.html + + Not yet handled items: + - objectclass microsoftaddressbook + - info, + - initials, + - otherfacsimiletelephonenumber, + - otherpager, + - physicaldeliveryofficename, +*/ + +#include +#include +#include +#include + +#include +#include +#include + +#include "addressee.h" +#include "address.h" + +#include "ldif.h" +#include "ldifconverter.h" +#include "vcardconverter.h" + +using namespace KABC; + +/* generate LDIF stream */ + +bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, TQString &str ) +{ + AddresseeList::ConstIterator it; + for ( it = addrList.begin(); it != addrList.end(); ++it ) { + addresseeToLDIF( *it, str ); + } + return true; +} + + + +static void ldif_out( TQTextStream &t, TQString formatStr, TQString value ) +{ + if ( value.isEmpty() ) + return; + + TQCString txt = LDIF::assembleLine( formatStr, value, 72 ); + + // write the string + t << TQString::fromUtf8(txt) << "\n"; +} + +bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str ) +{ + if ( addr.isEmpty() ) + return false; + + TQTextStream t( str, IO_WriteOnly|IO_Append ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + + const Address homeAddr = addr.address( Address::Home ); + const Address workAddr = addr.address( Address::Work ); + + ldif_out( t, "dn", TQString( "cn=%1,mail=%2" ) + .arg( TQString(addr.formattedName()).simplifyWhiteSpace() ) + .arg( addr.preferredEmail() ) ); + ldif_out( t, "givenname", addr.givenName() ); + ldif_out( t, "sn", addr.familyName() ); + ldif_out( t, "cn", TQString(addr.formattedName()).simplifyWhiteSpace() ); + ldif_out( t, "uid", addr.uid() ); + ldif_out( t, "nickname", addr.nickName() ); + ldif_out( t, "xmozillanickname", addr.nickName() ); + + ldif_out( t, "mail", addr.preferredEmail() ); + if ( addr.emails().count() > 1 ) + ldif_out( t, "mozillasecondemail", addr.emails()[ 1 ] ); +//ldif_out( t, "mozilla_AIMScreenName: %1\n", "screen_name" ); + + ldif_out( t, "telephonenumber", addr.phoneNumber( PhoneNumber::Work ).number() ); + ldif_out( t, "facsimiletelephonenumber", addr.phoneNumber( PhoneNumber::Fax ).number() ); + ldif_out( t, "homephone", addr.phoneNumber( PhoneNumber::Home ).number() ); + ldif_out( t, "mobile", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 7 + ldif_out( t, "cellphone", addr.phoneNumber( PhoneNumber::Cell ).number() ); // Netscape 4.x + ldif_out( t, "pager", addr.phoneNumber( PhoneNumber::Pager ).number() ); + ldif_out( t, "pagerphone", addr.phoneNumber( PhoneNumber::Pager ).number() ); + + ldif_out( t, "streethomeaddress", homeAddr.street() ); + ldif_out( t, "postalcode", workAddr.postalCode() ); + ldif_out( t, "postofficebox", workAddr.postOfficeBox() ); + + TQStringList streets = TQStringList::split( '\n', homeAddr.street() ); + if ( streets.count() > 0 ) + ldif_out( t, "homepostaladdress", streets[ 0 ] ); // Netscape 7 + if ( streets.count() > 1 ) + ldif_out( t, "mozillahomepostaladdress2", streets[ 1 ] ); // Netscape 7 + ldif_out( t, "mozillahomelocalityname", homeAddr.locality() ); // Netscape 7 + ldif_out( t, "mozillahomestate", homeAddr.region() ); + ldif_out( t, "mozillahomepostalcode", homeAddr.postalCode() ); + ldif_out( t, "mozillahomecountryname", Address::ISOtoCountry(homeAddr.country()) ); + ldif_out( t, "locality", workAddr.locality() ); + ldif_out( t, "streetaddress", workAddr.street() ); // Netscape 4.x + + streets = TQStringList::split( '\n', workAddr.street() ); + if ( streets.count() > 0 ) + ldif_out( t, "postaladdress", streets[ 0 ] ); + if ( streets.count() > 1 ) + ldif_out( t, "mozillapostaladdress2", streets[ 1 ] ); + ldif_out( t, "countryname", Address::ISOtoCountry(workAddr.country()) ); + ldif_out( t, "l", workAddr.locality() ); + ldif_out( t, "c", Address::ISOtoCountry(workAddr.country()) ); + ldif_out( t, "st", workAddr.region() ); + + ldif_out( t, "title", addr.title() ); + ldif_out( t, "vocation", addr.prefix() ); + ldif_out( t, "ou", addr.role() ); + ldif_out( t, "o", addr.organization() ); + ldif_out( t, "organization", addr.organization() ); + ldif_out( t, "organizationname", addr.organization() ); + + // Compatibility with older kabc versions. + if ( !addr.department().isEmpty() ) + ldif_out( t, "department", addr.department() ); + else + ldif_out( t, "department", addr.custom("KADDRESSBOOK", "X-Department") ); + + ldif_out( t, "workurl", addr.url().prettyURL() ); + ldif_out( t, "homeurl", addr.url().prettyURL() ); + ldif_out( t, "description", addr.note() ); + if (addr.revision().isValid()) + ldif_out(t, "modifytimestamp", dateToVCardString( TQT_TQDATETIME_OBJECT(addr.revision())) ); + + t << "objectclass: top\n"; + t << "objectclass: person\n"; + t << "objectclass: organizationalPerson\n"; + + t << "\n"; + + return true; +} + + +/* convert from LDIF stream */ + +bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt ) +{ + if (str.isEmpty()) + return true; + + bool endldif = false, end = false; + LDIF ldif; + LDIF::ParseVal ret; + const char *latinstr = str.latin1(); + int latinstrlen = tqstrlen( latinstr ); + TQByteArray data; + Addressee a; + Address homeAddr, workAddr; + + data.setRawData( latinstr, latinstrlen ); + ldif.setLDIF( data ); + if (!dt.isValid()) + dt = TQDateTime::currentDateTime(); + a.setRevision(dt); + homeAddr = Address( Address::Home ); + workAddr = Address( Address::Work ); + + do { + ret = ldif.nextItem(); + switch ( ret ) { + case LDIF::Item: { + TQString fieldname = ldif.attr().lower(); + TQString value = TQString::fromUtf8( ldif.val(), ldif.val().size() ); + evaluatePair( a, homeAddr, workAddr, fieldname, value ); + break; + } + case LDIF::EndEntry: + // if the new address is not empty, append it + if ( !a.formattedName().isEmpty() || !a.name().isEmpty() || + !a.familyName().isEmpty() ) { + if ( !homeAddr.isEmpty() ) + a.insertAddress( homeAddr ); + if ( !workAddr.isEmpty() ) + a.insertAddress( workAddr ); + addrList.append( a ); + } + a = Addressee(); + a.setRevision(dt); + homeAddr = Address( Address::Home ); + workAddr = Address( Address::Work ); + break; + case LDIF::MoreData: { + if ( endldif ) + end = true; + else { + ldif.endLDIF(); + endldif = true; + break; + } + } + default: + break; + } + } while ( !end ); + + data.resetRawData( latinstr, latinstrlen ); + + return true; +} + +bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, + Address &workAddr, + TQString &fieldname, TQString &value ) +{ + if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! + return false; + + if ( fieldname.startsWith("#") ) { + return true; + } + + if ( fieldname.isEmpty() && !a.note().isEmpty() ) { + // some LDIF export filters are borken and add additional + // comments on stand-alone lines. Just add them to the notes for now. + a.setNote( a.note() + "\n" + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "givenname" ) ) { + a.setGivenName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "xmozillanickname") || + fieldname == TQString::fromLatin1( "nickname") ) { + a.setNickName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "sn" ) ) { + a.setFamilyName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "uid" ) ) { + a.setUid( value ); + return true; + } + if ( fieldname == TQString::fromLatin1( "mail" ) || + fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla + if ( a.emails().findIndex( value ) == -1 ) + a.insertEmail( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "title" ) ) { + a.setTitle( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "vocation" ) ) { + a.setPrefix( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "cn" ) ) { + a.setFormattedName( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "o" ) || + fieldname == TQString::fromLatin1( "organization" ) || // Exchange + fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange + a.setOrganization( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "description" ) ) { +addComment: + if ( !a.note().isEmpty() ) + a.setNote( a.note() + "\n" ); + a.setNote( a.note() + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "custom1" ) || + fieldname == TQString::fromLatin1( "custom2" ) || + fieldname == TQString::fromLatin1( "custom3" ) || + fieldname == TQString::fromLatin1( "custom4" ) ) { + goto addComment; + } + + if ( fieldname == TQString::fromLatin1( "homeurl" ) || + fieldname == TQString::fromLatin1( "workurl" ) ) { + if (a.url().isEmpty()) { + a.setUrl( KURL( value ) ); + return true; + } + if ( a.url().prettyURL() == KURL(value).prettyURL() ) + return true; + // TODO: current version of kabc only supports one URL. + // TODO: change this with KDE 4 + } + + if ( fieldname == TQString::fromLatin1( "homephone" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla + fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla + a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "street" ) || + fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { + homeAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla + workAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla + workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { + workAddr.setPostalCode( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { + workAddr.setPostOfficeBox( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 + homeAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla + homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla + homeAddr.setLocality( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla + homeAddr.setRegion( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla + homeAddr.setPostalCode( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla + if ( value.length() <= 2 ) + value = Address::ISOtoCountry(value); + homeAddr.setCountry( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "locality" ) ) { + workAddr.setLocality( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x + workAddr.setStreet( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "countryname" ) || + fieldname == TQString::fromLatin1( "c" ) ) { // mozilla + if ( value.length() <= 2 ) + value = Address::ISOtoCountry(value); + workAddr.setCountry( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla + workAddr.setLocality( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "st" ) ) { + workAddr.setRegion( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "ou" ) ) { + a.setRole( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "department" ) ) { + a.setDepartment( value ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "member" ) ) { + // this is a mozilla list member (cn=xxx, mail=yyy) + TQStringList list( TQStringList::split( ',', value ) ); + TQString name, email; + + TQStringList::Iterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( (*it).startsWith( "cn=" ) ) + name = (*it).mid( 3 ).stripWhiteSpace(); + if ( (*it).startsWith( "mail=" ) ) + email = (*it).mid( 5 ).stripWhiteSpace(); + } + if ( !name.isEmpty() && !email.isEmpty() ) + email = " <" + email + ">"; + a.insertEmail( name + email ); + a.insertCategory( i18n( "List of Emails" ) ); + return true; + } + + if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { + if (value == TQString::fromLatin1("0Z")) // ignore + return true; + TQDateTime dt = VCardStringToDate( value ); + if ( dt.isValid() ) { + a.setRevision(dt); + return true; + } + } + + if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore + return true; + + kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") + .arg(a.formattedName()).arg(fieldname).arg(value)); + + return true; +} + +/* The following functions are obsoleted. Similar functionality can be found + * in the LDIF class */ + +bool LDIFConverter::parseSingleLine( Addressee &a, Address &homeAddr, + Address &workAddr, TQString &line ) +{ + if ( line.isEmpty() ) + return true; + + TQString fieldname, value; + TQByteArray val; + + LDIF::splitLine( line.latin1(), fieldname, val ); + value = TQString::fromUtf8( val.data(), val.size() ); + return evaluatePair( a, homeAddr, workAddr, fieldname, value); +} + + +bool LDIFConverter::splitLine( TQString &line, TQString &fieldname, TQString &value) +{ + TQByteArray val; + bool ret = LDIF::splitLine( line.latin1(), fieldname, val ); + value = TQString::fromUtf8( val.data(), val.size() ); + return ret; +} + + +TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, bool allowEncode ) +{ + if ( value.isEmpty() ) + return TQString(); + + // append format if not given + if (formatStr.find(':') == -1) + formatStr.append(": %1\n"); + + // check if base64-encoding is needed + bool printable = true; + unsigned int i, len; + len = value.length(); + for (i = 0; i=0) + formatStr.insert(p, ':'); + } + + // generate the new string and split it to 72 chars/line + TQCString txt = TQString(formatStr.arg(value)).utf8(); + + if (allowEncode) { + len = txt.length(); + if (len && txt[len-1] == '\n') + --len; + i = 72; + while (i < len) { + txt.insert(i, "\n "); + i += 72+1; + len += 2; + } + } + + return TQString::fromUtf8(txt); +} + diff --git a/tdeabc/ldifconverter.h b/tdeabc/ldifconverter.h new file mode 100644 index 000000000..a8052a65f --- /dev/null +++ b/tdeabc/ldifconverter.h @@ -0,0 +1,100 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Helge Deller + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 only as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_LDIFCONVERTER_H +#define KABC_LDIFCONVERTER_H + +#include +#include + +#include "addressee.h" +#include "addresseelist.h" + +namespace KABC { + + /** + * A set of functions to convert a string with LDIF information to addressees + * and vice versa. It is useful for addressbook import- and exportfilters + * and might be used to read and write Mozilla and Netscape addresssbooks. + */ + + namespace LDIFConverter { + + /** + * Converts a LDIF string to a list of addressees. + * + * @param str The vcard string. + * @param addrList The addresseelist. + * @param dt The date & time value of the last modification (e.g. file modification time). + * @since 3.2 + */ + KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); + + /** + * Converts a list of addressees to a LDIF string. + * + * @param addrList The addresseelist. + * @param str The LDIF string. + * @since 3.2 + */ + KABC_EXPORT bool addresseeToLDIF( const AddresseeList &addrList, TQString &str ); + + /** + * Converts an addressee to a LDIF string. + * + * @param addr The addressee. + * @param str The LDIF string. + * @since 3.2 + */ + KABC_EXPORT bool addresseeToLDIF( const Addressee &addr, TQString &str ); + + /** + * @deprecated + * Obsoleted - please use LDIF::assembleLine() + * Returns a LDIF compatible string representing a given field/value pair. + * If necessary, the value parameter will be base64encoded and split into multiple. + * This function will return an empty string if the given value is empty. + * + * @param field The LDAP field name or a complete LDIF field string (e.g. "cn" or "cn = %1\n"). + * @param value The value for this field. + * @param allowEncode Set to false if you wish no encoding of the value. + * @since 3.2 + */ + KABC_EXPORT TQString makeLDIFfieldString( TQString field, TQString value, bool allowEncode = true ) KDE_DEPRECATED; + + + + /* internal functions - do not use !! */ + + /** No need for this function anymore - use LDIF::splitLine() + evaluatePair() */ + KABC_EXPORT bool parseSingleLine( Addressee &a, + Address &homeAddr, Address &workAddr, TQString &line ); + + /** No need for this function anymore - use LDIF::splitLine() */ + KABC_EXPORT bool splitLine( TQString &line, TQString &fieldname, TQString &value); + + + KABC_EXPORT bool evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, + TQString &fieldname, TQString &value ); + + } + +} +#endif + diff --git a/tdeabc/lock.cpp b/tdeabc/lock.cpp new file mode 100644 index 000000000..a78cb4c5b --- /dev/null +++ b/tdeabc/lock.cpp @@ -0,0 +1,162 @@ +/* + This file is part of libkabc. + Copyright (c) 2001,2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "lock.h" + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +using namespace KABC; + +Lock::Lock( const TQString &identifier ) + : mIdentifier( identifier ) +{ + mIdentifier.replace( "/", "_" ); +} + +Lock::~Lock() +{ + unlock(); +} + +TQString Lock::locksDir() +{ + return locateLocal( "data", "tdeabc/lock/" ); +} + +bool Lock::readLockFile( const TQString &filename, int &pid, TQString &app ) +{ + TQFile file( filename ); + if ( !file.open( IO_ReadOnly ) ) return false; + + TQTextStream t( &file ); + pid = t.readLine().toInt(); + app = t.readLine(); + + return true; +} + +bool Lock::writeLockFile( const TQString &filename ) +{ + TQFile file( filename ); + if ( !file.open( IO_WriteOnly ) ) return false; + TQTextStream t( &file ); + t << ::getpid() << endl << TQString( TDEGlobal::instance()->instanceName() ); + + return true; +} + +TQString Lock::lockFileName() const +{ + return locksDir() + mIdentifier + ".lock"; +} + +bool Lock::lock() +{ + kdDebug(5700) << "Lock::lock()" << endl; + + TQString lockName = lockFileName(); + kdDebug(5700) << "-- lock name: " << lockName << endl; + + if ( TQFile::exists( lockName ) ) { // check if it is a stale lock file + int pid; + TQString app; + + if ( !readLockFile( lockFileName(), pid, app ) ) { + mError = i18n("Unable to open lock file."); + return false; + } + + int retval = ::kill( pid, 0 ); + if ( retval == -1 && errno == ESRCH ) { // process doesn't exists anymore + TQFile::remove( lockName ); + kdWarning(5700) << "Removed stale lock file from process '" << app << "'" + << endl; + } else { + TQString identifier( mIdentifier ); + identifier.replace( '_', '/' ); + + mError = i18n("The address book '%1' is locked by application '%2'.\nIf you believe this is incorrect, just remove the lock file from '%3'") + .arg( identifier ).arg( app ).arg( locateLocal( "data", "tdeabc/lock/*.lock" ) ); + return false; + } + } + + TQString lockUniqueName; + lockUniqueName = mIdentifier + kapp->randomString( 8 ); + mLockUniqueName = locateLocal( "data", "tdeabc/lock/" + lockUniqueName ); + kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; + + // Create unique file + writeLockFile( mLockUniqueName ); + + // Create lock file + int result = ::link( TQFile::encodeName( mLockUniqueName ), + TQFile::encodeName( lockName ) ); + + if ( result == 0 ) { + mError = ""; + emit locked(); + return true; + } + + // TODO: check stat + + mError = i18n("Error"); + return false; +} + +bool Lock::unlock() +{ + int pid; + TQString app; + if ( readLockFile( lockFileName(), pid, app ) ) { + if ( pid == getpid() ) { + TQFile::remove( lockFileName() ); + TQFile::remove( mLockUniqueName ); + emit unlocked(); + } else { + mError = i18n("Unlock failed. Lock file is owned by other process: %1 (%2)") + .arg( app ).arg( TQString::number( pid ) ); + kdDebug() << "Lock::unlock(): " << mError << endl; + return false; + } + } + + mError = ""; + return true; +} + +TQString Lock::error() const +{ + return mError; +} + +#include "lock.moc" diff --git a/tdeabc/lock.h b/tdeabc/lock.h new file mode 100644 index 000000000..addc2032f --- /dev/null +++ b/tdeabc/lock.h @@ -0,0 +1,88 @@ +/* + This file is part of libkabc. + + Copyright (c) 2001,2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_LOCK_H +#define KABC_LOCK_H + +#include +#include + +#include + +namespace KABC { + +/** + This class provides locking functionality for a file, directory or an + arbitrary string-represented resource. +*/ +class KABC_EXPORT Lock : public TQObject +{ + Q_OBJECT + public: + /** + Constructor. + + @param identifier An identifier for the resource to be locked, e.g. a file + name. + */ + Lock( const TQString &identifier ); + + /** + Destruct lock object. This also removes the lock on the resource. + */ + ~Lock(); + + /** + Lock resource. + */ + virtual bool lock(); + + /** + Unlock resource. + */ + virtual bool unlock(); + + virtual TQString error() const; + + TQString lockFileName() const; + + static bool readLockFile( const TQString &filename, int &pid, TQString &app ); + static bool writeLockFile( const TQString &filename ); + + static TQString locksDir(); + + signals: + void locked(); + void unlocked(); + + private: + TQString mIdentifier; + + TQString mLockUniqueName; + + TQString mError; + + class Private; + Private *d; +}; + +} + +#endif diff --git a/tdeabc/locknull.cpp b/tdeabc/locknull.cpp new file mode 100644 index 000000000..5f3ee06c7 --- /dev/null +++ b/tdeabc/locknull.cpp @@ -0,0 +1,63 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "locknull.h" + +#include +#include + +using namespace KABC; + +LockNull::LockNull( bool allowAccess ) + : Lock( TQString::null ), mAllowAccess( allowAccess ) +{ +} + +LockNull::~LockNull() +{ + unlock(); +} + +bool LockNull::lock() +{ + if ( !mAllowAccess ) return false; + + kdWarning() << "LockNull::lock() force success. Doesn't actually lock." + << endl; + + emit locked(); + + return true; +} + +bool LockNull::unlock() +{ + emit unlocked(); + return true; +} + +TQString LockNull::error() const +{ + if ( mAllowAccess ) + return i18n("LockNull: All locks succeed but no actual locking is done."); + else + return i18n("LockNull: All locks fail."); +} diff --git a/tdeabc/locknull.h b/tdeabc/locknull.h new file mode 100644 index 000000000..dfefe122a --- /dev/null +++ b/tdeabc/locknull.h @@ -0,0 +1,54 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_LOCKNULL_H +#define KABC_LOCKNULL_H + +#include + +#include "lock.h" + +namespace KABC { + +/** + This class provides a lock without actually locking. It can be constructed in + two ways: One that let all locks succeed and one that let all locks fail. +*/ +class KABC_EXPORT LockNull : public Lock +{ + public: + LockNull( bool allowAccess ); + ~LockNull(); + + bool lock(); + bool unlock(); + + TQString error() const; + + private: + bool mAllowAccess; + + class Private; + Private *d; +}; + +} + +#endif diff --git a/tdeabc/phonenumber.cpp b/tdeabc/phonenumber.cpp new file mode 100644 index 000000000..fd2468c73 --- /dev/null +++ b/tdeabc/phonenumber.cpp @@ -0,0 +1,213 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "phonenumber.h" + +using namespace KABC; + +PhoneNumber::PhoneNumber() : + mType( Home ) +{ + init(); +} + +PhoneNumber::PhoneNumber( const TQString &number, int type ) : + mType( type ) +{ + init(); + + validateNumber( number ); +} + +PhoneNumber::~PhoneNumber() +{ +} + +void PhoneNumber::init() +{ + mId = TDEApplication::randomString( 8 ); +} + +void PhoneNumber::validateNumber( const TQString &number ) +{ + mNumber = number; + + // remove line breaks + mNumber = mNumber.replace( '\n', "" ); + mNumber = mNumber.replace( '\r', "" ); +} + +bool PhoneNumber::operator==( const PhoneNumber &p ) const +{ + if ( mNumber != p.mNumber ) return false; + if ( mType != p.mType ) return false; + + return true; +} + +bool PhoneNumber::operator!=( const PhoneNumber &p ) const +{ + return !( p == *this ); +} + +void PhoneNumber::setId( const TQString &id ) +{ + mId = id; +} + +TQString PhoneNumber::id() const +{ + return mId; +} + +void PhoneNumber::setNumber( const TQString &number ) +{ + validateNumber( number ); +} + +TQString PhoneNumber::number() const +{ + return mNumber; +} + +void PhoneNumber::setType( int type ) +{ + mType = type; +} + +int PhoneNumber::type() const +{ + return mType; +} + +TQString PhoneNumber::typeLabel() const +{ + TQString label; + bool first = true; + + const TypeList list = typeList(); + + TypeList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) { + if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { + label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); + if ( first ) + first = false; + } + } + + return label; +} + +TQString PhoneNumber::label() const +{ + return typeLabel( type() ); +} + +PhoneNumber::TypeList PhoneNumber::typeList() +{ + static TypeList list; + + if ( list.isEmpty() ) { + list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video + << Bbs << Modem << Car << Isdn << Pcs << Pager; + } + + return list; +} + +TQString PhoneNumber::label( int type ) +{ + return typeLabel( type ); +} + +TQString PhoneNumber::typeLabel( int type ) +{ + if ( type & Pref ) + return i18n( "Preferred phone", "Preferred" ); + + switch ( type ) { + case Home: + return i18n("Home phone", "Home"); + break; + case Work: + return i18n("Work phone", "Work"); + break; + case Msg: + return i18n("Messenger"); + break; + case Pref: + return i18n("Preferred Number"); + break; + case Voice: + return i18n("Voice"); + break; + case Fax: + return i18n("Fax"); + break; + case Cell: + return i18n("Mobile Phone", "Mobile" ); + break; + case Video: + return i18n("Video"); + break; + case Bbs: + return i18n("Mailbox"); + break; + case Modem: + return i18n("Modem"); + break; + case Car: + return i18n("Car Phone", "Car" ); + break; + case Isdn: + return i18n("ISDN"); + break; + case Pcs: + return i18n("PCS"); + break; + case Pager: + return i18n("Pager"); + break; + case Home | Fax: + return i18n("Home Fax"); + break; + case Work | Fax: + return i18n("Work Fax"); + break; + default: + return i18n("Other"); + } +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const PhoneNumber &phone ) +{ + return s << phone.mId << phone.mType << phone.mNumber; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, PhoneNumber &phone ) +{ + s >> phone.mId >> phone.mType >> phone.mNumber; + + return s; +} diff --git a/tdeabc/phonenumber.h b/tdeabc/phonenumber.h new file mode 100644 index 000000000..3e6ae0941 --- /dev/null +++ b/tdeabc/phonenumber.h @@ -0,0 +1,161 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_PHONENUMBER_H +#define KABC_PHONENUMBER_H + +#include +#include + +#include + +namespace KABC { + +/** + @short Phonenumber information. + + This class provides phone number information. A phone number is classified by + a type. The following types are available, it's possible to use multiple types + Types for a number by combining them through a logical or. +*/ +class KABC_EXPORT PhoneNumber +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); + + public: + typedef TQValueList List; + typedef TQValueList TypeList; + + /** + @li @p Home - Home number + @li @p Work - Office number + @li @p Msg - Messaging + @li @p Pref - Preferred number + @li @p Voice - Voice + @li @p Fax - Fax machine + @li @p Cell - Cell phone + @li @p Video - Video phone + @li @p Bbs - Mailbox + @li @p Modem - Modem + @li @p Car - Car phone + @li @p Isdn - ISDN connection + @li @p Pcs - Personal Communication Service + @li @p Pager - Pager + */ + enum Types { Home = 1, Work = 2, Msg = 4, Pref = 8, Voice = 16, Fax = 32, + Cell = 64, Video = 128, Bbs = 256, Modem = 512, Car = 1024, + Isdn = 2048, Pcs = 4096, Pager = 8192 }; + + /** + Create an empty phone number object. + */ + PhoneNumber(); + + /** + Create a phonenumber object. + + @param number Number + @param type Type as defined in enum. Multiple types can be + specified by combining them by a logical or. + */ + PhoneNumber( const TQString &number, int type = Home ); + + /** + Destructor. + */ + ~PhoneNumber(); + + bool operator==( const PhoneNumber & ) const; + bool operator!=( const PhoneNumber & ) const; + + /** + Sets the unique identifier. + */ + void setId( const TQString &id ); + + /** + Returns the unique identifier. + */ + TQString id() const; + + /** + Sets the number. + */ + void setNumber( const TQString & ); + + /** + Returns the number. + */ + TQString number() const; + + /** + Sets the type. Multiple types can be specified by combining them by + a logical or. + */ + void setType( int ); + + /** + Returns the type. Can be a multiple types combined by a logical or. + */ + int type() const; + + /** + Returns a translated string of all types the address has. + */ + TQString typeLabel() const; + + /** + Returns the translated label for phone number depending on its type. + */ + TQString label() const; + + /** + Returns a list of all available types + */ + static TypeList typeList(); + + /** + Returns the translated label for phone number type. + */ + static TQString typeLabel( int type ); + + /** + Returns the translated label for phone number type. + @obsolete + */ + static TQString label( int type ); + + private: + void init(); + void validateNumber( const TQString& ); + + TQString mId; + + int mType; + TQString mNumber; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & ); + +} + +#endif diff --git a/tdeabc/picture.cpp b/tdeabc/picture.cpp new file mode 100644 index 000000000..4ddd3f537 --- /dev/null +++ b/tdeabc/picture.cpp @@ -0,0 +1,120 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "picture.h" + +using namespace KABC; + +Picture::Picture() + : mIntern( false ) +{ +} + +Picture::Picture( const TQString &url ) + : mUrl( url ), mIntern( false ) +{ +} + +Picture::Picture( const TQImage &data ) + : mData( data ), mIntern( true ) +{ +} + +Picture::~Picture() +{ +} + +bool Picture::operator==( const Picture &p ) const +{ + if ( mIntern != p.mIntern ) return false; + + if ( mIntern ) { + if ( mData != p.mData ) + return false; + } else { + if ( mUrl != p.mUrl ) + return false; + } + + return true; +} + +bool Picture::operator!=( const Picture &p ) const +{ + return !( p == *this ); +} + +void Picture::setUrl( const TQString &url ) +{ + mUrl = url; + mIntern = false; +} + +void Picture::setData( const TQImage &data ) +{ + mData = data; + mIntern = true; +} + +void Picture::setType( const TQString &type ) +{ + mType = type; +} + +bool Picture::isIntern() const +{ + return mIntern; +} + +TQString Picture::url() const +{ + return mUrl; +} + +TQImage Picture::data() const +{ + return mData; +} + +TQString Picture::type() const +{ + return mType; +} + +TQString Picture::asString() const +{ + if ( mIntern ) + return "intern picture"; + else + return mUrl; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Picture &picture ) +{ + return s << picture.mIntern << picture.mUrl << picture.mType; +// return s << picture.mIntern << picture.mUrl << picture.mType << picture.mData; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Picture &picture ) +{ + s >> picture.mIntern >> picture.mUrl >> picture.mType; +// s >> picture.mIntern >> picture.mUrl >> picture.mType >> picture.mData; + return s; +} diff --git a/tdeabc/picture.h b/tdeabc/picture.h new file mode 100644 index 000000000..e6ed690c2 --- /dev/null +++ b/tdeabc/picture.h @@ -0,0 +1,128 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_PICTURE_H +#define KABC_PICTURE_H + +#include + +#include + +namespace KABC { + +class KABC_EXPORT Picture +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); + +public: + + /** + * Consturctor. Creates an empty object. + */ + Picture(); + + /** + * Consturctor. + * + * @param url A URL that describes the position of the picture file. + */ + Picture( const TQString &url ); + + /** + * Consturctor. + * + * @param data The raw data of the picture. + */ + Picture( const TQImage &data ); + + /** + * Destructor. + */ + ~Picture(); + + + bool operator==( const Picture & ) const; + bool operator!=( const Picture & ) const; + + /** + * Sets a URL for the location of the picture file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * + * @param url The location URL of the picture file. + */ + void setUrl( const TQString &url ); + + /** + * Sets the raw data of the picture. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param data The raw data of the picture. + */ + void setData( const TQImage &data ); + + /** + * Sets the type of the picture. + */ + void setType( const TQString &type ); + + /** + * Returns whether the picture is described by a URL (extern) or + * by the raw data (intern). + * When this method returns 'true' you can use data() to + * get the raw data. Otherwise you can request the URL of this + * picture by url() and load the raw data from that location. + */ + bool isIntern() const; + + /** + * Returns the location URL of this picture. + */ + TQString url() const; + + /** + * Returns the raw data of this picture. + */ + TQImage data() const; + + /** + * Returns the type of this picture. + */ + TQString type() const; + + /** + * Returns string representation of the picture. + */ + TQString asString() const; + +private: + TQString mUrl; + TQString mType; + TQImage mData; + + int mIntern; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & ); + +} +#endif diff --git a/tdeabc/plugin.cpp b/tdeabc/plugin.cpp new file mode 100644 index 000000000..a53192559 --- /dev/null +++ b/tdeabc/plugin.cpp @@ -0,0 +1,61 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "plugin.h" + +using namespace KABC; + +Plugin::Plugin() +{ +} + +Plugin::~Plugin() +{ +} + +void Plugin::setType( const TQString& type ) +{ + mType = type; +} + +TQString Plugin::type() const +{ + return mType; +} + +void Plugin::setNameLabel( const TQString& label ) +{ + mNameLabel = label; +} + +TQString Plugin::nameLabel() const +{ + return mNameLabel; +} + +void Plugin::setDescriptionLabel( const TQString& label ) +{ + mDescriptionLabel = label; +} + +TQString Plugin::descriptionLabel() const +{ + return mDescriptionLabel; +} diff --git a/tdeabc/plugin.h b/tdeabc/plugin.h new file mode 100644 index 000000000..0c8e3b338 --- /dev/null +++ b/tdeabc/plugin.h @@ -0,0 +1,52 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_PLUGIN_H +#define KABC_PLUGIN_H + +#include + +#include + +namespace KABC { + +class KABC_EXPORT Plugin +{ +public: + Plugin(); + virtual ~Plugin(); + + virtual void setType( const TQString& type ); + virtual TQString type() const; + + virtual void setNameLabel( const TQString& label ); + virtual TQString nameLabel() const; + + virtual void setDescriptionLabel( const TQString& label ); + virtual TQString descriptionLabel() const; + +private: + TQString mType; + TQString mNameLabel; + TQString mDescriptionLabel; +}; + +} +#endif diff --git a/tdeabc/plugins/CMakeLists.txt b/tdeabc/plugins/CMakeLists.txt new file mode 100644 index 000000000..597486816 --- /dev/null +++ b/tdeabc/plugins/CMakeLists.txt @@ -0,0 +1,15 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( file ) +add_subdirectory( dir ) +add_subdirectory( net ) +add_subdirectory( ldaptdeio ) diff --git a/tdeabc/plugins/Makefile.am b/tdeabc/plugins/Makefile.am new file mode 100644 index 000000000..bdedbec0f --- /dev/null +++ b/tdeabc/plugins/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = file dir net ldaptdeio diff --git a/tdeabc/plugins/dir/CMakeLists.txt b/tdeabc/plugins/dir/CMakeLists.txt new file mode 100644 index 000000000..fd4161342 --- /dev/null +++ b/tdeabc/plugins/dir/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourcedir.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES dir.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_dir (library) ######################## + +set( target kabc_dir ) + +set( ${target}_SRCS + resourcedir.cpp resourcedirconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_dir (module) ######################### + +set( target kabc_dir ) + +set( ${target}_SRCS + resourcedirplugin.cpp +) + +tde_add_kpart( ${target} + SOURCES ${${target}_SRCS} + LINK kabc_dir-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/dir/Makefile.am b/tdeabc/plugins/dir/Makefile.am new file mode 100644 index 000000000..94ddad3cc --- /dev/null +++ b/tdeabc/plugins/dir/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_builddir) $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcedirconfig.h + +lib_LTLIBRARIES = libkabc_dir.la +libkabc_dir_la_SOURCES = resourcedir.cpp resourcedirconfig.cpp +libkabc_dir_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_dir_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDECORE) $(LIB_TDEFILE) $(LIB_TDEUI) +libkabc_dir_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +kde_module_LTLIBRARIES = kabc_dir.la +kabc_dir_la_SOURCES = resourcedirplugin.cpp +kabc_dir_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined +kabc_dir_la_LIBADD = libkabc_dir.la $(LIB_QT) $(LIB_TDECORE) + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_dir.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourcedir.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = dir.desktop + +resourcedirplugin.lo: ../../addressee.h diff --git a/tdeabc/plugins/dir/dir.desktop b/tdeabc/plugins/dir/dir.desktop new file mode 100644 index 000000000..a841040f9 --- /dev/null +++ b/tdeabc/plugins/dir/dir.desktop @@ -0,0 +1,92 @@ +[Desktop Entry] +Name=Directory +Name[af]=Gids +Name[ar]=دليل +Name[az]=CÉ™rgÉ™ +Name[be]=ТÑчка +Name[bn]=ডিরেকà§à¦Ÿà¦°à¦¿ +Name[br]=Renkell +Name[bs]=Direktorij +Name[ca]=Directori +Name[cs]=Adresář +Name[csb]=Katalog +Name[cy]=Cyfeiriadur +Name[da]=Mappe +Name[de]=Verzeichnis +Name[el]=Κατάλογος +Name[eo]=Dosierujo +Name[es]=Directorio +Name[et]=Kataloog +Name[eu]=Direktorioa +Name[fa]=Ùهرست راهنما +Name[fi]=Hakemisto +Name[fo]=Fíluskrá +Name[fr]=Dossier +Name[fy]=Map +Name[ga]=Comhadlann +Name[gl]=Directório +Name[he]=ספריה +Name[hi]=डिरेकà¥à¤Ÿà¥à¤°à¥€ +Name[hr]=Mapa +Name[hsb]=Zapisk +Name[hu]=Könyvtár +Name[id]=Direktori +Name[is]=Mappa +Name[it]=Cartella +Name[ja]=ディレクトリ +Name[ka]=დáƒáƒ¡áƒ¢áƒ +Name[kk]=Каталог +Name[km]=ážáž +Name[ko]=ìžë£Œë°© +Name[ku]=Peldank +Name[lb]=Verzeechnis +Name[lt]=Aplankas +Name[lv]=Direktorija +Name[mk]=Именик +Name[mn]=Лавлах +Name[ms]=Direktori +Name[mt]=Direttorju +Name[nb]=Katalog +Name[nds]=Orner +Name[ne]=डाइरेकà¥à¤Ÿà¤°à¥€ +Name[nl]=Map +Name[nn]=Katalog +Name[nso]=Tshupetso +Name[oc]=Directori +Name[pa]=ਡਾਇਰੈਕਟਰੀ +Name[pl]=Katalog +Name[pt]=Directoria +Name[pt_BR]=Diretório +Name[ro]=Director +Name[ru]=Каталог +Name[rw]=ububiko +Name[se]=Ohcu +Name[sk]=PrieÄinok +Name[sl]=Imenik +Name[sq]=Fioka +Name[sr]=ФаÑцикла +Name[sr@Latn]=Fascikla +Name[ss]=I-directory +Name[sv]=Katalog +Name[ta]=அடைவ௠+Name[te]=డైరకà±à°Ÿà°°à°¿ +Name[tg]=ФеҳраÑÑ‚ +Name[th]=ไดเรà¸à¸—อรี +Name[tr]=Dizin +Name[tt]=Törgäk +Name[uk]=Каталог +Name[uz]=Jild +Name[uz@cyrillic]=Жилд +Name[ven]=Tsumbavhulwo +Name[vi]=Thư mục +Name[wa]=Ridant +Name[xh]=Ulawulo +Name[zh_CN]=目录 +Name[zh_HK]=目錄 +Name[zh_TW]=目錄 +Name[zu]=Uhlu lwamafayela +X-TDE-Library=kabc_dir +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=dir diff --git a/tdeabc/plugins/dir/resourcedir.cpp b/tdeabc/plugins/dir/resourcedir.cpp new file mode 100644 index 000000000..53f178a6d --- /dev/null +++ b/tdeabc/plugins/dir/resourcedir.cpp @@ -0,0 +1,310 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "formatfactory.h" +#include "resourcedirconfig.h" +#include "stdaddressbook.h" +#include "lock.h" + +#include "resourcedir.h" + +using namespace KABC; + +extern "C" +{ + void *init_kabc_dir() + { + return new KRES::PluginFactory(); + } +} + + +ResourceDir::ResourceDir( const TDEConfig *config ) + : Resource( config ), mAsynchronous( false ) +{ + if ( config ) { + init( config->readPathEntry( "FilePath", StdAddressBook::directoryName() ), + config->readEntry( "FileFormat", "vcard" ) ); + } else { + init( StdAddressBook::directoryName(), "vcard" ); + } +} + +ResourceDir::ResourceDir( const TQString &path, const TQString &format ) + : Resource( 0 ), mAsynchronous( false ) +{ + init( path, format ); +} + +void ResourceDir::init( const TQString &path, const TQString &format ) +{ + mFormatName = format; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); + + if ( !mFormat ) { + mFormatName = "vcard"; + mFormat = factory->format( mFormatName ); + } + + mLock = 0; + + connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) ); + + setPath( path ); +} + +ResourceDir::~ResourceDir() +{ + delete mFormat; + mFormat = 0; +} + +void ResourceDir::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + if ( mPath == StdAddressBook::directoryName() ) + config->deleteEntry( "FilePath" ); + else + config->writePathEntry( "FilePath", mPath ); + + config->writeEntry( "FileFormat", mFormatName ); +} + +Ticket *ResourceDir::requestSaveTicket() +{ + kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl; + + if ( !addressBook() ) return 0; + + delete mLock; + mLock = new Lock( mPath ); + + if ( mLock->lock() ) { + addressBook()->emitAddressBookLocked(); + } else { + addressBook()->error( mLock->error() ); + kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock path '" + << mPath << "': " << mLock->error() << endl; + return 0; + } + + return createTicket( this ); +} + +void ResourceDir::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; + + delete mLock; + mLock = 0; +} + +bool ResourceDir::doOpen() +{ + TQDir dir( mPath ); + if ( !dir.exists() ) { // no directory available + return dir.mkdir( dir.path() ); + } else { + TQString testName = dir.entryList( TQDir::Files )[0]; + if ( testName.isNull() || testName.isEmpty() ) // no file in directory + return true; + + TQFile file( mPath + "/" + testName ); + if ( file.open( IO_ReadOnly ) ) + return true; + + if ( file.size() == 0 ) + return true; + + bool ok = mFormat->checkFormat( &file ); + file.close(); + return ok; + } +} + +void ResourceDir::doClose() +{ +} + +bool ResourceDir::load() +{ + kdDebug(5700) << "ResourceDir::load(): '" << mPath << "'" << endl; + + mAsynchronous = false; + + TQDir dir( mPath ); + TQStringList files = dir.entryList( TQDir::Files ); + + TQStringList::Iterator it; + bool ok = true; + for ( it = files.begin(); it != files.end(); ++it ) { + TQFile file( mPath + "/" + (*it) ); + + if ( !file.open( IO_ReadOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); + ok = false; + continue; + } + + if ( !mFormat->loadAll( addressBook(), this, &file ) ) + ok = false; + + file.close(); + } + + return ok; +} + +bool ResourceDir::asyncLoad() +{ + mAsynchronous = true; + + bool ok = load(); + if ( !ok ) + emit loadingError( this, i18n( "Loading resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit loadingFinished( this ); + + return ok; +} + +bool ResourceDir::save( Ticket * ) +{ + kdDebug(5700) << "ResourceDir::save(): '" << mPath << "'" << endl; + + Addressee::Map::Iterator it; + bool ok = true; + + mDirWatch.stopScan(); + + for ( it = mAddrMap.begin(); it != mAddrMap.end(); ++it ) { + if ( !it.data().changed() ) + continue; + + TQFile file( mPath + "/" + (*it).uid() ); + if ( !file.open( IO_WriteOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); + continue; + } + + mFormat->save( *it, &file ); + + // mark as unchanged + (*it).setChanged( false ); + + file.close(); + } + + mDirWatch.startScan(); + + return ok; +} + +bool ResourceDir::asyncSave( Ticket *ticket ) +{ + bool ok = save( ticket ); + if ( !ok ) + emit savingError( this, i18n( "Saving resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit savingFinished( this ); + + return ok; +} + +void ResourceDir::setPath( const TQString &path ) +{ + mDirWatch.stopScan(); + if ( mDirWatch.contains( mPath ) ) + mDirWatch.removeDir( mPath ); + + mPath = path; + mDirWatch.addDir( mPath, true ); + mDirWatch.startScan(); +} + +TQString ResourceDir::path() const +{ + return mPath; +} + +void ResourceDir::setFormat( const TQString &format ) +{ + mFormatName = format; + + if ( mFormat ) + delete mFormat; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +} + +TQString ResourceDir::format() const +{ + return mFormatName; +} + +void ResourceDir::pathChanged() +{ + if ( !addressBook() ) + return; + + clear(); + if ( mAsynchronous ) + asyncLoad(); + else { + load(); + addressBook()->emitAddressBookChanged(); + } +} + +void ResourceDir::removeAddressee( const Addressee& addr ) +{ + TQFile::remove( mPath + "/" + addr.uid() ); + mAddrMap.erase( addr.uid() ); +} + +#include "resourcedir.moc" diff --git a/tdeabc/plugins/dir/resourcedir.h b/tdeabc/plugins/dir/resourcedir.h new file mode 100644 index 000000000..dc3bdbd23 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedir.h @@ -0,0 +1,113 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCEDIR_H +#define KABC_RESOURCEDIR_H + +#include +#include + +#include + +#include + +class TQTimer; + +namespace KABC { + +class FormatPlugin; +class Lock; + +/** + @internal +*/ +class KABC_EXPORT ResourceDir : public Resource +{ + Q_OBJECT + + public: + ResourceDir( const TDEConfig* ); + ResourceDir( const TQString &path, const TQString &type = "vcard" ); + ~ResourceDir(); + + virtual void writeConfig( TDEConfig* ); + + virtual bool doOpen(); + virtual void doClose(); + + virtual Ticket *requestSaveTicket(); + virtual void releaseSaveTicket( Ticket* ); + + virtual bool load(); + virtual bool asyncLoad(); + virtual bool save( Ticket* ticket ); + virtual bool asyncSave( Ticket* ticket ); + + /** + Set path to be used for saving. + */ + void setPath( const TQString & ); + + /** + Return path used for loading and saving the address book. + */ + TQString path() const; + + /** + Set the format by name. + */ + void setFormat( const TQString &format ); + + /** + Returns the format name. + */ + TQString format() const; + + /** + Remove a addressee from its source. + This method is mainly called by KABC::AddressBook. + */ + virtual void removeAddressee( const Addressee& addr ); + + protected slots: + void pathChanged(); + + protected: + void init( const TQString &path, const TQString &format ); + + private: + FormatPlugin *mFormat; + + KDirWatch mDirWatch; + + TQString mPath; + TQString mFormatName; + + Lock *mLock; + + bool mAsynchronous; + + class ResourceDirPrivate; + ResourceDirPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/dir/resourcedirconfig.cpp b/tdeabc/plugins/dir/resourcedirconfig.cpp new file mode 100644 index 000000000..2807872f8 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedirconfig.cpp @@ -0,0 +1,107 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include + +#include "formatfactory.h" +#include "resourcedir.h" +#include "stdaddressbook.h" + +#include "resourcedirconfig.h" + +using namespace KABC; + +ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name ) + : KRES::ConfigWidget( parent, name ) +{ + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, + KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); + mFormatBox = new KComboBox( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mFormatBox, 0, 1 ); + + label = new TQLabel( i18n( "Location:" ), this ); + mFileNameEdit = new KURLRequester( this ); + mFileNameEdit->setMode( KFile::Directory ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mFileNameEdit, 1, 1 ); + + FormatFactory *factory = FormatFactory::self(); + TQStringList formats = factory->formats(); + TQStringList::Iterator it; + for ( it = formats.begin(); it != formats.end(); ++it ) { + FormatInfo *info = factory->info( *it ); + if ( info ) { + mFormatTypes << (*it); + mFormatBox->insertItem( info->nameLabel ); + } + } + + mInEditMode = false; +} + +void ResourceDirConfig::setEditMode( bool value ) +{ + mFormatBox->setEnabled( !value ); + mInEditMode = value; +} + +void ResourceDirConfig::loadSettings( KRES::Resource *res ) +{ + ResourceDir *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; + return; + } + + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + + mFileNameEdit->setURL( resource->path() ); + if ( mFileNameEdit->url().isEmpty() ) + mFileNameEdit->setURL( KABC::StdAddressBook::directoryName() ); +} + +void ResourceDirConfig::saveSettings( KRES::Resource *res ) +{ + ResourceDir *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceDirConfig::loadSettings(): cast failed" << endl; + return; + } + + if ( mInEditMode ) + resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); + + resource->setPath( mFileNameEdit->url() ); +} + +#include "resourcedirconfig.moc" diff --git a/tdeabc/plugins/dir/resourcedirconfig.h b/tdeabc/plugins/dir/resourcedirconfig.h new file mode 100644 index 000000000..9df1778d3 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedirconfig.h @@ -0,0 +1,54 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCEDIRCONFIG_H +#define RESOURCEDIRCONFIG_H + +#include +#include + +#include + +namespace KABC { + +class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget +{ + Q_OBJECT + +public: + ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 ); + + void setEditMode( bool value ); + +public slots: + void loadSettings( KRES::Resource* ); + void saveSettings( KRES::Resource* ); + +private: + KComboBox* mFormatBox; + KURLRequester* mFileNameEdit; + + TQStringList mFormatTypes; + + bool mInEditMode; +}; + +} +#endif diff --git a/tdeabc/plugins/dir/resourcedirplugin.cpp b/tdeabc/plugins/dir/resourcedirplugin.cpp new file mode 100644 index 000000000..a2bd6d138 --- /dev/null +++ b/tdeabc/plugins/dir/resourcedirplugin.cpp @@ -0,0 +1,32 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcedir.h" +#include "resourcedirconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_dir() + { + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/evolution/Makefile.am b/tdeabc/plugins/evolution/Makefile.am new file mode 100644 index 000000000..2c22cf376 --- /dev/null +++ b/tdeabc/plugins/evolution/Makefile.am @@ -0,0 +1,19 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourceevo.h dbwrapper.h + +kde_module_LTLIBRARIES = kabc_evo.la + +kabc_evo_la_SOURCES = dbwrapper.cpp resourceevo.cpp + +kabc_evo_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kabc_evo_la_LIBADD = ../../../tdeabc/libkabc.la ../../../tdeui/libtdeui.la -ldb ../../../tdeabc/vcardparser/libvcards.la + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_evolution.pot + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = evolution.desktop diff --git a/tdeabc/plugins/evolution/README b/tdeabc/plugins/evolution/README new file mode 100644 index 000000000..7dfefce00 --- /dev/null +++ b/tdeabc/plugins/evolution/README @@ -0,0 +1,15 @@ +A Resource using DB3 to access the evolution +addressbook make sure the wombat is not running +In future versions I may use bonobo to access it... + + +DESIGN: +The Format vs Resource idea is somehow not applyable to the +Evolution PAS + +Format would be vCard and Resource would be DB3.. +BUT +Format get's a QFile* pointer which is just not usable +with a DB3 +INSTEAD we will use the vCardImpl directly to convert +a string to Addressee \ No newline at end of file diff --git a/tdeabc/plugins/evolution/dbwrapper.cpp b/tdeabc/plugins/evolution/dbwrapper.cpp new file mode 100644 index 000000000..fbdff165a --- /dev/null +++ b/tdeabc/plugins/evolution/dbwrapper.cpp @@ -0,0 +1,187 @@ +#include + +#include + +#include "dbwrapper.h" + + +using namespace Evolution; + +struct DBIterator::Data { + DBWrapper *wrapper; + TQString key; + TQString data; + DBC* cursor; + bool atEnd; +}; + +DBIterator::DBIterator( DBWrapper* wra) { + data = new Data; + data->wrapper = wra; + data->atEnd = false; + data->cursor = 0l; +} +DBIterator::DBIterator( const DBIterator& copy ) { + data = new Data; + data->wrapper = copy.data->wrapper; + data->key = copy.data->key; + data->data = copy.data->data; + data->atEnd = copy.data->atEnd; + if (copy.data->cursor ) + copy.data->cursor->c_dup(copy.data->cursor, &data->cursor, 0 ); + else + data->cursor = 0l; +} +DBIterator::~DBIterator() { + if (data->cursor) + data->cursor->c_close(data->cursor); + delete data; +} +DBIterator& DBIterator::operator=( const DBIterator& rhs ) { + if ( *this == rhs ) + return *this; + if (data->cursor) + data->cursor->c_close(data->cursor); + delete data; + data = new Data; + data->wrapper = rhs.data->wrapper; + data->key = rhs.data->key; + data->data = rhs.data->data; + data->atEnd = rhs.data->atEnd; + if ( rhs.data->cursor ) + rhs.data->cursor->c_dup(rhs.data->cursor, &data->cursor, 0 ); + else + data->cursor = 0l; + + return *this; +} +TQString DBIterator::key()const{ + return data->key; +} +TQString DBIterator::value()const { + return data->data; +} +TQString DBIterator::operator*() { + return data->data; +} +DBIterator& DBIterator::operator++() { + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + if ( data->cursor ) + if ( data->cursor->c_get(data->cursor, &key, &val,DB_NEXT ) != 0 ) + data->atEnd = true; + data->key = TQString::fromUtf8( (char*)key.data, key.size ); + data->data = TQString::fromUtf8( (char*)val.data, val.size ); + return *this; +} +DBIterator& DBIterator::operator--() { + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + if ( data->cursor ) + if ( data->cursor->c_get(data->cursor, &key, &val,DB_PREV ) != 0 ) + data->atEnd = true; + data->key = TQString::fromUtf8( (char*)key.data, key.size ); + data->data = TQString::fromUtf8( (char*)val.data, val.size ); + return *this; +} +bool DBIterator::operator==( const DBIterator& rhs ) { + if ( data->atEnd && data->atEnd == rhs.data->atEnd ) return true; + + return false; +} +bool DBIterator::operator!=( const DBIterator& rhs ) { + return !this->operator==(rhs ); +} +struct DBWrapper::Data { + DB* db; + bool only; +}; +DBWrapper::DBWrapper() { + data = new Data; + (void)db_create(&data->db, NULL, 0 ); + data->only = false; +} +DBWrapper::~DBWrapper() { + data->db->close(data->db, 0 ); + delete data; +} +bool DBWrapper::open( const TQString& file, bool on) { + data->only = on; + return !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 ); +} +bool DBWrapper::save() { + return true; +} +DBIterator DBWrapper::begin() { + DBIterator it(this); + DBC* cursor; + DBT key, val; + int ret; + ret = data->db->cursor(data->db, NULL, &cursor, 0 ); + if (ret ) { + it.data->atEnd = true; + return it; + } + + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + ret = cursor->c_get(cursor, &key, &val, DB_FIRST ); + if (ret ) { + it.data->atEnd = true; + return it; + } + + it.data->cursor = cursor; + it.data->key = TQString::fromUtf8((char*)key.data, key.size ); + it.data->data = TQString::fromUtf8((char*)val.data, val.size ); + + return it; +} +DBIterator DBWrapper::end() { + DBIterator it(this); + it.data->atEnd = true; + + return it; +} +bool DBWrapper::find( const TQString& _key, TQString& _val ) { + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + + TQCString db_key = _key.local8Bit(); + key.data = db_key.data(); + key.size = db_key.size(); + + int ret = data->db->get(data->db, NULL, &key, &val, 0 ); + if (!ret) { + _val = TQString::fromUtf8( (char*)val.data, val.size ); + tqWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data ); + return true; + } + return false; +} +bool DBWrapper::add( const TQString& _key, const TQString& _val ) { + TQCString db_key = _key.local8Bit(); + TQCString db_val = _val.local8Bit(); + DBT key, val; + ::memset(&key, 0, sizeof(key) ); + ::memset(&val, 0, sizeof(val) ); + + key.data = db_key.data(); + key.size = db_key.size(); + val.data = db_val.data(); + val.size = db_val.size(); + + return !data->db->put(data->db, NULL, &key, &val, 0 ); +} +bool DBWrapper::remove( const TQString& _key ) { + TQCString db_key = _key.local8Bit(); + DBT key; + memset(&key, 0, sizeof(key) ); + key.data = db_key.data(); + key.size = db_key.size(); + + return !data->db->del(data->db, NULL, &key, 0 ); +} diff --git a/tdeabc/plugins/evolution/dbwrapper.h b/tdeabc/plugins/evolution/dbwrapper.h new file mode 100644 index 000000000..e5e0a2c33 --- /dev/null +++ b/tdeabc/plugins/evolution/dbwrapper.h @@ -0,0 +1,60 @@ +#ifndef KABC_EVOLUTION_DB_WRAPPER +#define KABC_EVOLUTION_DB_WRAPPER + +#include + +#include +#include + +namespace Evolution { + + class DBWrapper; + class DBIterator { + friend class DBWrapper; + public: + DBIterator( DBWrapper* = 0l ); + ~DBIterator(); + + DBIterator( const DBIterator& ); + DBIterator &operator=( const DBIterator& ); + + TQString key()const; + TQString value()const; + + TQString operator*(); + + DBIterator &operator++(); + DBIterator &operator--(); + + bool operator==( const DBIterator& ); + bool operator!=( const DBIterator& ); + private: + struct Data; + Data* data; + }; + class DBWrapper { + public: + DBWrapper(); + ~DBWrapper(); + + TQString lastError()const; + + bool open( const TQString& file, bool readOnly = false); + bool save(); + DBIterator begin(); + DBIterator end(); + + bool find( const TQString& key, TQString& value ); + bool add( const TQString& key, const TQString& val ); + bool remove( const TQString& key ); + private: + // DBT element( const TQString& ); + struct Data; + Data* data; + + }; + +} + + +#endif diff --git a/tdeabc/plugins/evolution/evolution.desktop b/tdeabc/plugins/evolution/evolution.desktop new file mode 100644 index 000000000..98030e906 --- /dev/null +++ b/tdeabc/plugins/evolution/evolution.desktop @@ -0,0 +1,26 @@ +[Desktop Entry] +Name=Evolution +Name[be]=Ð­Ð²Ð°Ð»ÑŽÑ†Ñ‹Ñ +Name[bn]=ইভোলিউশন +Name[eo]=Evoluo +Name[fa]=اوولوشن +Name[hi]=à¤à¤µà¥‰à¤²à¥à¤¯à¥‚शन +Name[ko]=ì—볼루션 +Name[mn]=Хөгжил +Name[ne]=इभोलà¥à¤¯à¥à¤¸à¤¨ +Name[pa]=à¨à¨µà©‚ਲੇਸ਼ਨ +Name[sr]=Еволуција +Name[sr@Latn]=Evolucija +Name[ta]=படிபà¯à®ªà®Ÿà®¿à®¯à®¾à®© வளரà¯à®šà¯à®šà®¿ +Name[te]=ఎవలà±à°¯à±à°·à°¨à± +Name[th]=เอฟโวลูชัน +Name[tt]=ÜseÅŸ +Name[ven]=Tsikoni +Name[wa]=Evolucion +Name[xh]=Utshintsho lwendawo ngokwenqanawa +Name[zu]=Evolushini +X-TDE-Library=kabc_evo +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=evolution diff --git a/tdeabc/plugins/evolution/resourceevo.cpp b/tdeabc/plugins/evolution/resourceevo.cpp new file mode 100644 index 000000000..e6545f738 --- /dev/null +++ b/tdeabc/plugins/evolution/resourceevo.cpp @@ -0,0 +1,132 @@ +#include + +#include +#include +#include + +#include + +#include + +#include "dbwrapper.h" +#include "resourceevo.h" + +using namespace Evolution; +using namespace KABC; + +class EvolutionFactory : public KRES::PluginFactoryBase +{ + public: + KRES::Resource *resource( const TDEConfig *config ) + { + return new ResourceEvolution( config ); + } + + KRES::ConfigWidget *configWidget( TQWidget * ) + { + return 0; + } +}; + +extern "C" +{ + KDE_EXPORT void *init_kabc_evo() + { + return ( new EvolutionFactory() ); + } +} + +ResourceEvolution::ResourceEvolution( const TDEConfig* conf ) + : Resource( conf ), mWrap(0l) +{ + m_isOpen = false; +} +ResourceEvolution::~ResourceEvolution() { + delete mWrap; +} +bool ResourceEvolution::doOpen() { + mWrap = new DBWrapper; + if (!mWrap->open( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) { + return false; + } + + TQString val; + if (!mWrap->find( "PAS-DB-VERSION", val ) ) + return false; + + if (!val.startsWith("0.2") ) + return false; + + m_isOpen = true; + + return true; +} +void ResourceEvolution::doClose() { + delete mWrap; + mWrap = 0l; + m_isOpen = false; +} +Ticket* ResourceEvolution::requestSaveTicket() { + if ( !addressBook() ) return 0; + return createTicket( this ); +} +/* + * skip the first key + */ + +bool ResourceEvolution::load() { + /* doOpen never get's called :( */ + if (!doOpen()) return false; + if (!mWrap ) return false; // open first! + + DBIterator it = mWrap->begin(); + // skip the "PAS-DB-VERSION" + + for ( ; it != mWrap->end(); ++it ) { + if ( it.key().startsWith("PAS-DB-VERSION") ) + continue; + + tqWarning( "val:%s", it.value().latin1() ); + VCardTool tool; + TQString str = it.value().stripWhiteSpace(); + Addressee::List list = tool.parseVCards( str ); + if (!list.first().isEmpty() ) { + Addressee adr = list.first(); + adr.setResource(this); + addressBook()->insertAddressee( adr ); + } + } + return true; +} +bool ResourceEvolution::save( Ticket* ticket ) { + delete ticket; + if (!m_isOpen ) return false; + + // just delete the summary so evolution will regenerate it + // on next start up + (void)TQFile::remove( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" ); + + + AddressBook::Iterator it; + Addressee::List list; + for ( it = addressBook()->begin(); it !=addressBook()->end(); ++it ) { + if ( (*it).resource() != this || !(*it).changed() ) + continue; + + // remove, convert add set unchanged false + list.clear(); + mWrap->remove( (*it).uid() ); + VCardTool tool; + list.append( (*it) ); + mWrap->add( (*it).uid(), tool.createVCards( list, VCard::v2_1) ); + + (*it).setChanged( false ); + } + + return true; +} +void ResourceEvolution::removeAddressee( const Addressee& rem) { + if (!m_isOpen) return; + + mWrap->remove( rem.uid() ); +} diff --git a/tdeabc/plugins/evolution/resourceevo.h b/tdeabc/plugins/evolution/resourceevo.h new file mode 100644 index 000000000..29e163e1c --- /dev/null +++ b/tdeabc/plugins/evolution/resourceevo.h @@ -0,0 +1,23 @@ +#include "resource.h" + +namespace Evolution { + class DBWrapper; +} + +namespace KABC { + class ResourceEvolution : public Resource { + public: + ResourceEvolution( const TDEConfig* config ); + ~ResourceEvolution(); + + bool doOpen(); + void doClose(); + Ticket* requestSaveTicket(); + bool load(); + bool save( Ticket* ticket ); + void removeAddressee( const Addressee& ); + private: + Evolution::DBWrapper *mWrap; + bool m_isOpen : 1; + }; +} diff --git a/tdeabc/plugins/file/CMakeLists.txt b/tdeabc/plugins/file/CMakeLists.txt new file mode 100644 index 000000000..6c17d2dc7 --- /dev/null +++ b/tdeabc/plugins/file/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourcefile.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES file.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_file (library) ####################### + +set( target kabc_file ) + +set( ${target}_SRCS + resourcefile.cpp resourcefileconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_file (module) ######################## + +set( target kabc_file ) + +set( ${target}_SRCS + resourcefileplugin.cpp +) + +tde_add_kpart( ${target} + SOURCES ${${target}_SRCS} + LINK kabc_file-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/file/Makefile.am b/tdeabc/plugins/file/Makefile.am new file mode 100644 index 000000000..d00ffea3f --- /dev/null +++ b/tdeabc/plugins/file/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcefileconfig.h + +lib_LTLIBRARIES = libkabc_file.la +libkabc_file_la_SOURCES = resourcefile.cpp resourcefileconfig.cpp +libkabc_file_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_file_la_LIBADD = $(LIB_KABC) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEFILE) $(LIB_TDECORE) $(LIB_TDEUI) +libkabc_file_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + + +kde_module_LTLIBRARIES = kabc_file.la +kabc_file_la_SOURCES = resourcefileplugin.cpp +kabc_file_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined +kabc_file_la_LIBADD = libkabc_file.la $(LIB_QT) $(LIB_TDECORE) +kabc_file_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_file.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourcefile.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = file.desktop diff --git a/tdeabc/plugins/file/file.desktop b/tdeabc/plugins/file/file.desktop new file mode 100644 index 000000000..1359dd1c6 --- /dev/null +++ b/tdeabc/plugins/file/file.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Name=File +Name[af]=Lêer +Name[ar]=ملÙÙ‘ +Name[az]=Fayl +Name[be]=Файл +Name[bn]=ফাইল +Name[br]=Restr +Name[bs]=Datoteka +Name[ca]=Fitxer +Name[cs]=Soubor +Name[csb]=Lopk +Name[cy]=Ffeil +Name[da]=Fil +Name[de]=Datei +Name[el]=ΑÏχείο +Name[eo]=Dosiero +Name[es]=Archivo +Name[et]=Fail +Name[eu]=Fitxategia +Name[fa]=پرونده +Name[fi]=Tiedosto +Name[fr]=Fichier +Name[fy]=Triem +Name[ga]=Comhad +Name[gl]=Ficheiro +Name[he]=קובץ +Name[hi]=फ़ाइल +Name[hr]=Datoteka +Name[hsb]=Dataja +Name[hu]=Fájl +Name[id]=Berkas +Name[is]=Skrá +Name[ja]=ファイル +Name[ka]=ფáƒáƒ˜áƒšáƒ˜ +Name[kk]=Файл +Name[km]=ឯកសារ +Name[ko]=íŒŒì¼ +Name[lb]=Datei +Name[lt]=Byla +Name[lv]=Fails +Name[mk]=Датотека +Name[mn]=Файл +Name[ms]=Fail +Name[nb]=Fil +Name[nds]=Datei +Name[ne]=फाइल +Name[nl]=Bestand +Name[nn]=Fil +Name[pa]=ਫਾਇਲ +Name[pl]=Plik +Name[pt]=Ficheiro +Name[pt_BR]=Arquivo +Name[ro]=FiÅŸier +Name[ru]=Файл +Name[rw]=Idosiye +Name[se]=Fiila +Name[sk]=Súbor +Name[sl]=Datoteka +Name[sq]=Skedë +Name[sr]=Фајл +Name[sr@Latn]=Fajl +Name[sv]=Fil +Name[ta]=கோபà¯à®ªà¯ +Name[te]=దసà±à°¤à±à°°à°‚ +Name[tg]=Файл +Name[th]=à¹à¸Ÿà¹‰à¸¡ +Name[tr]=Dosya +Name[tt]=Birem +Name[uk]=Файл +Name[uz]=Fayl +Name[uz@cyrillic]=Файл +Name[vi]=Tập tin +Name[wa]=Fitchî +Name[zh_CN]=文件 +Name[zh_HK]=檔案 +Name[zh_TW]=檔案 +X-TDE-Library=kabc_file +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=file diff --git a/tdeabc/plugins/file/resourcefile.cpp b/tdeabc/plugins/file/resourcefile.cpp new file mode 100644 index 000000000..b29cf33c3 --- /dev/null +++ b/tdeabc/plugins/file/resourcefile.cpp @@ -0,0 +1,395 @@ +/* + This file is part of libkabc. + + Copyright (c) 2001,2003 Cornelius Schumacher + Copyright (c) 2006 Tom Abers + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "formatfactory.h" +#include "resourcefileconfig.h" +#include "stdaddressbook.h" +#include "lock.h" + +#include "resourcefile.h" + +using namespace KABC; + +ResourceFile::ResourceFile( const TDEConfig *config ) + : Resource( config ), mFormat( 0 ), + mAsynchronous( false ) +{ + TQString fileName, formatName; + + if ( config ) { + fileName = config->readPathEntry( "FileName", StdAddressBook::fileName() ); + formatName = config->readEntry( "FileFormat", "vcard" ); + } else { + fileName = StdAddressBook::fileName(); + formatName = "vcard"; + } + + init( fileName, formatName ); +} + +ResourceFile::ResourceFile( const TQString &fileName, + const TQString &formatName ) + : Resource( 0 ), mFormat( 0 ), + mAsynchronous( false ) +{ + init( fileName, formatName ); +} + +void ResourceFile::init( const TQString &fileName, const TQString &formatName ) +{ + mFormatName = formatName; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); + + if ( !mFormat ) { + mFormatName = "vcard"; + mFormat = factory->format( mFormatName ); + } + + connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( fileChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( fileChanged() ) ); + connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( fileChanged() ) ); + + setFileName( fileName ); + + mLock = 0; +} + +ResourceFile::~ResourceFile() +{ + delete mFormat; + mFormat = 0; +} + +void ResourceFile::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + if ( mFileName == StdAddressBook::fileName() ) + config->deleteEntry( "FileName" ); + else + config->writePathEntry( "FileName", mFileName ); + + config->writeEntry( "FileFormat", mFormatName ); +} + +Ticket *ResourceFile::requestSaveTicket() +{ + kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; + + if ( !addressBook() ) return 0; + + delete mLock; + mLock = new Lock( mFileName ); + + if ( mLock->lock() ) { + addressBook()->emitAddressBookLocked(); + } else { + addressBook()->error( mLock->error() ); + kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock file '" + << mFileName << "': " << mLock->error() << endl; + return 0; + } + + return createTicket( this ); +} + +void ResourceFile::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; + + delete mLock; + mLock = 0; + + addressBook()->emitAddressBookUnlocked(); +} + +bool ResourceFile::doOpen() +{ + TQFile file( mFileName ); + + if ( !file.exists() ) { + // try to create the file + bool ok = file.open( IO_WriteOnly ); + if ( ok ) + file.close(); + + return ok; + } else { + TQFileInfo fileInfo( mFileName ); + if ( readOnly() || !fileInfo.isWritable() ) { + if ( !file.open( IO_ReadOnly ) ) + return false; + } else { + if ( !file.open( IO_ReadWrite ) ) + return false; + } + + if ( file.size() == 0 ) { + file.close(); + kdDebug() << "File size is zero. Evaluating backups" << endl; + for (int i=0; i!=20; i++) + { + TQFile backup( mFileName + "__" + TQString::number(i) ); + kdDebug() << "Evaluating" << backup.name() << " size: " << backup.size() << endl; + if ( backup.size() != 0 ) + { + kdDebug() << "Restoring backup " << i << endl; + const TQString src = mFileName + "__" + TQString::number(i); + const TQString dest = mFileName; + + // remove dest + TQFile::remove( dest ); + + // copy src to dest + if ( backup.open( IO_ReadOnly ) ) { + const TQByteArray data = backup.readAll(); + + TQFile out( dest ); + if ( out.open( IO_WriteOnly ) ) { + out.writeBlock( data ); + out.close(); + } + + backup.close(); + } + return true; + } + } + return true; + } + + bool ok = mFormat->checkFormat( &file ); + file.close(); + + return ok; + } +} + +void ResourceFile::doClose() +{ +} + +bool ResourceFile::load() +{ + kdDebug(5700) << "ResourceFile::load(): '" << mFileName << "'" << endl; + + mAsynchronous = false; + + TQFile file( mFileName ); + if ( !file.open( IO_ReadOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) ); + return false; + } + + clear(); + + return mFormat->loadAll( addressBook(), this, &file ); +} + +bool ResourceFile::asyncLoad() +{ + kdDebug(5700) << "ResourceFile::asyncLoad()" << endl; + + mAsynchronous = true; + + bool ok = load(); + + if ( !ok ) + emitLoadingError(); + else + emitLoadingFinished(); + + return true; +} + +bool ResourceFile::save( Ticket * ) +{ + kdDebug(5700) << "ResourceFile::save()" << endl; + + // Only do the logrotate dance when the __0 file is not 0 bytes. + TQFile file( mFileName + "__0" ); + if ( file.size() != 0 ) { + const TQString last = mFileName + "__20"; + kdDebug() << "deleting " << last << endl; + + TQFile::remove( last ); + + for (int i=19; i>=0; i--) + { + const TQString src = mFileName + "__" + TQString::number(i); + const TQString dest = mFileName + "__" + TQString::number(i+1); + kdDebug() << "moving " << src << " -> " << dest << endl; + + // copy src to dest + TQFile in( src ); + if ( in.open( IO_ReadOnly ) ) { + const TQByteArray data = in.readAll(); + + TQFile out( dest ); + if ( out.open( IO_WriteOnly ) ) { + out.writeBlock( data ); + out.close(); + } + + in.close(); + } + + // remove src + TQFile::remove( src ); + } + } else + kdDebug() << "Not starting logrotate __0 is 0 bytes." << endl; + + TQString extension = "__0"; + (void) KSaveFile::backupFile( mFileName, TQString::null /*directory*/, + extension ); + + mDirWatch.stopScan(); + + KSaveFile saveFile( mFileName ); + bool ok = false; + + if ( saveFile.status() == 0 && saveFile.file() ) { + mFormat->saveAll( addressBook(), this, saveFile.file() ); + ok = saveFile.close(); + } + + if ( !ok ) { + saveFile.abort(); + addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); + } + + mDirWatch.startScan(); + + return ok; +} + +bool ResourceFile::asyncSave( Ticket *ticket ) +{ + kdDebug(5700) << "ResourceFile::asyncSave()" << endl; + + bool ok = save( ticket ); + + if ( !ok ) + TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingError() ) ); + else + TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingFinished() ) ); + + return ok; +} + +void ResourceFile::setFileName( const TQString &fileName ) +{ + mDirWatch.stopScan(); + if ( mDirWatch.contains( mFileName ) ) + mDirWatch.removeFile( mFileName ); + + mFileName = fileName; + + mDirWatch.addFile( mFileName ); + mDirWatch.startScan(); +} + +TQString ResourceFile::fileName() const +{ + return mFileName; +} + +void ResourceFile::setFormat( const TQString &format ) +{ + mFormatName = format; + delete mFormat; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +} + +TQString ResourceFile::format() const +{ + return mFormatName; +} + +void ResourceFile::fileChanged() +{ + kdDebug(5700) << "ResourceFile::fileChanged(): " << mFileName << endl; + + if ( !addressBook() ) + return; + + if ( mAsynchronous ) + asyncLoad(); + else { + load(); + kdDebug() << "addressBookChanged() " << endl; + addressBook()->emitAddressBookChanged(); + } +} + +void ResourceFile::removeAddressee( const Addressee &addr ) +{ + TQFile::remove( TQFile::encodeName( locateLocal( "data", "tdeabc/photos/" ) + addr.uid() ) ); + TQFile::remove( TQFile::encodeName( locateLocal( "data", "tdeabc/logos/" ) + addr.uid() ) ); + TQFile::remove( TQFile::encodeName( locateLocal( "data", "tdeabc/sounds/" ) + addr.uid() ) ); + + mAddrMap.erase( addr.uid() ); +} + +void ResourceFile::emitSavingFinished() +{ + emit savingFinished( this ); +} + +void ResourceFile::emitSavingError() +{ + emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mFileName ) ); +} + +void ResourceFile::emitLoadingFinished() +{ + emit loadingFinished( this ); +} + +void ResourceFile::emitLoadingError() +{ + emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mFileName ) ); +} + +#include "resourcefile.moc" diff --git a/tdeabc/plugins/file/resourcefile.h b/tdeabc/plugins/file/resourcefile.h new file mode 100644 index 000000000..a77f55798 --- /dev/null +++ b/tdeabc/plugins/file/resourcefile.h @@ -0,0 +1,162 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCEFILE_H +#define KABC_RESOURCEFILE_H + +#include +#include + +#include + +#include + +namespace KABC { + +class FormatPlugin; +class ResourceConfigWidget; +class Lock; + +/** + This resource allows access to a local file. +*/ +class KABC_EXPORT ResourceFile : public Resource +{ + Q_OBJECT + + public: + /** + Constructor. + + @param cfg The config object where custom resource settings are stored. + */ + ResourceFile( const TDEConfig *cfg ); + + /** + Construct file resource on file @arg fileName using format @arg formatName. + */ + ResourceFile( const TQString &fileName, const TQString &formatName = "vcard" ); + + /** + Destructor. + */ + ~ResourceFile(); + + /** + Writes the config back. + */ + virtual void writeConfig( TDEConfig *cfg ); + + /** + Tries to open the file and checks for the proper format. + This method should be called before load(). + */ + virtual bool doOpen(); + + /** + Closes the file again. + */ + virtual void doClose(); + + /** + Requests a save ticket, that is used by save() + */ + virtual Ticket *requestSaveTicket(); + + virtual void releaseSaveTicket( Ticket* ); + + /** + Loads all addressees from file to the address book. + Returns true if all addressees could be loaded otherwise false. + */ + virtual bool load(); + + virtual bool asyncLoad(); + + /** + Saves all addresses from address book to file. + Returns true if all addressees could be saved otherwise false. + + @param ticket The ticket returned by requestSaveTicket() + */ + virtual bool save( Ticket *ticket ); + + virtual bool asyncSave( Ticket *ticket ); + + /** + Set name of file to be used for saving. + */ + void setFileName( const TQString & ); + + /** + Return name of file used for loading and saving the address book. + */ + TQString fileName() const; + + /** + Sets a new format by name. + */ + void setFormat( const TQString &name ); + + /** + Returns the format name. + */ + TQString format() const; + + /** + Remove a addressee from its source. + This method is mainly called by KABC::AddressBook. + */ + virtual void removeAddressee( const Addressee& addr ); + + private slots: + void emitLoadingFinished(); + void emitLoadingError(); + void emitSavingFinished(); + void emitSavingError(); + + protected slots: + void fileChanged(); + + protected: + void init( const TQString &fileName, const TQString &format ); + + bool lock( const TQString &fileName ); + void unlock( const TQString &fileName ); + + private: + TQString mFileName; + TQString mFormatName; + + FormatPlugin *mFormat; + + Lock *mLock; + + KDirWatch mDirWatch; + + bool mAsynchronous; + + class ResourceFilePrivate; + ResourceFilePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/file/resourcefileconfig.cpp b/tdeabc/plugins/file/resourcefileconfig.cpp new file mode 100644 index 000000000..7c3f4da15 --- /dev/null +++ b/tdeabc/plugins/file/resourcefileconfig.cpp @@ -0,0 +1,118 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include + +#include + +#include "formatfactory.h" +#include "resourcefile.h" +#include "stdaddressbook.h" + +#include "resourcefileconfig.h" + +using namespace KABC; + +ResourceFileConfig::ResourceFileConfig( TQWidget* parent, const char* name ) + : ConfigWidget( parent, name ) +{ + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, + KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); + mFormatBox = new KComboBox( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mFormatBox, 0, 1 ); + + label = new TQLabel( i18n( "Location:" ), this ); + mFileNameEdit = new KURLRequester( this ); + + connect( mFileNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( checkFilePermissions( const TQString & ) ) ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mFileNameEdit, 1, 1 ); + + FormatFactory *factory = FormatFactory::self(); + TQStringList formats = factory->formats(); + TQStringList::Iterator it; + for ( it = formats.begin(); it != formats.end(); ++it ) { + FormatInfo *info = factory->info( *it ); + if ( info ) { + mFormatTypes << (*it); + mFormatBox->insertItem( info->nameLabel ); + } + } + + mInEditMode = false; +} + +void ResourceFileConfig::setEditMode( bool value ) +{ + mFormatBox->setEnabled( !value ); + mInEditMode = value; +} + +void ResourceFileConfig::loadSettings( KRES::Resource *res ) +{ + ResourceFile *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceFileConfig::loadSettings(): cast failed" << endl; + return; + } + + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + + mFileNameEdit->setURL( resource->fileName() ); + if ( mFileNameEdit->url().isEmpty() ) + mFileNameEdit->setURL( KABC::StdAddressBook::fileName() ); +} + +void ResourceFileConfig::saveSettings( KRES::Resource *res ) +{ + ResourceFile *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceFileConfig::saveSettings(): cast failed" << endl; + return; + } + + if ( !mInEditMode ) + resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); + + resource->setFileName( mFileNameEdit->url() ); +} + +void ResourceFileConfig::checkFilePermissions( const TQString& fileName ) +{ + // If file exist but is not writeable... + if ( access( TQFile::encodeName( fileName ), F_OK ) == 0 ) + emit setReadOnly( access( TQFile::encodeName( fileName ), W_OK ) < 0 ); +} + +#include "resourcefileconfig.moc" diff --git a/tdeabc/plugins/file/resourcefileconfig.h b/tdeabc/plugins/file/resourcefileconfig.h new file mode 100644 index 000000000..18c217eda --- /dev/null +++ b/tdeabc/plugins/file/resourcefileconfig.h @@ -0,0 +1,57 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCEFILECONFIG_H +#define RESOURCEFILECONFIG_H + +#include +#include + +#include + +namespace KABC { + +class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget +{ + Q_OBJECT + +public: + ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 ); + + void setEditMode( bool value ); + +public slots: + void loadSettings( KRES::Resource *resource ); + void saveSettings( KRES::Resource *resource ); + +protected slots: + void checkFilePermissions( const TQString& fileName ); + +private: + KComboBox* mFormatBox; + KURLRequester* mFileNameEdit; + bool mInEditMode; + + TQStringList mFormatTypes; +}; + +} + +#endif diff --git a/tdeabc/plugins/file/resourcefileplugin.cpp b/tdeabc/plugins/file/resourcefileplugin.cpp new file mode 100644 index 000000000..4dce19bc0 --- /dev/null +++ b/tdeabc/plugins/file/resourcefileplugin.cpp @@ -0,0 +1,32 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcefile.h" +#include "resourcefileconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_file() + { + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/ldaptdeio/CMakeLists.txt b/tdeabc/plugins/ldaptdeio/CMakeLists.txt new file mode 100644 index 000000000..820f6e017 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefiles +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourceldaptdeio.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES ldaptdeio.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_ldaptdeio ############################## + +set( target kabc_ldaptdeio ) + +set( ${target}_SRCS + resourceldaptdeio.cpp resourceldaptdeioconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_ldaptdeio ############################## + +set( target kabc_ldaptdeio ) + +set( ${target}_SRCS + resourceldaptdeioplugin.cpp +) + +tde_add_kpart( ${target} + SOURCES ${${target}_SRCS} + LINK kabc_ldaptdeio-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/ldaptdeio/Makefile.am b/tdeabc/plugins/ldaptdeio/Makefile.am new file mode 100644 index 000000000..bc81d13d8 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourceldaptdeioconfig.h + +lib_LTLIBRARIES = libkabc_ldaptdeio.la +libkabc_ldaptdeio_la_SOURCES = resourceldaptdeio.cpp resourceldaptdeioconfig.cpp +libkabc_ldaptdeio_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_ldaptdeio_la_LIBADD = $(LIB_KABC) $(LIB_KIO) $(LIB_QT) $(top_builddir)/tderesources/libtderesources.la $(LIB_TDEUI) $(LIB_TDECORE) +libkabc_ldaptdeio_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +kde_module_LTLIBRARIES = kabc_ldaptdeio.la +kabc_ldaptdeio_la_SOURCES = resourceldaptdeioplugin.cpp +kabc_ldaptdeio_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kabc_ldaptdeio_la_LIBADD = libkabc_ldaptdeio.la $(LIB_QT) $(LIB_TDECORE) + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_ldaptdeio.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourceldaptdeio.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = ldaptdeio.desktop + +resourceldaptdeioplugin.lo: ../../addressee.h diff --git a/tdeabc/plugins/ldaptdeio/ldaptdeio.desktop b/tdeabc/plugins/ldaptdeio/ldaptdeio.desktop new file mode 100644 index 000000000..9bcd13337 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/ldaptdeio.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=LDAP +Name[bn]=à¦à¦²-ডি-à¦-পি (LDAP) +Name[hi]=à¤à¤²à¤¡à¥€à¤à¤ªà¥€ (LDAP) +Name[te]=à°Žà°²à±à°¡à°¿à°à°ªà°¿ +X-TDE-Library=kabc_ldaptdeio +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=ldaptdeio diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp new file mode 100644 index 000000000..ea1a4294c --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp @@ -0,0 +1,1041 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "resourceldaptdeio.h" +#include "resourceldaptdeioconfig.h" + +using namespace KABC; + +// Hack from Netaccess +void tqt_enter_modal( TQWidget *widget ); +void tqt_leave_modal( TQWidget *widget ); + +class ResourceLDAPTDEIO::ResourceLDAPTDEIOPrivate +{ + public: + LDIF mLdif; + bool mTLS,mSSL,mSubTree; + TQString mResultDn; + Addressee mAddr; + Address mAd; + Resource::Iterator mSaveIt; + bool mSASL; + TQString mMech; + TQString mRealm, mBindDN; + LDAPUrl mLDAPUrl; + int mVer, mSizeLimit, mTimeLimit, mRDNPrefix; + int mError; + int mCachePolicy; + bool mReadOnly; + bool mAutoCache; + TQString mCacheDst; + KTempFile *mTmp; +}; + +ResourceLDAPTDEIO::ResourceLDAPTDEIO( const TDEConfig *config ) + : Resource( config ) +{ + d = new ResourceLDAPTDEIOPrivate; + if ( config ) { + TQMap attrList; + TQStringList attributes = config->readListEntry( "LdapAttributes" ); + for ( uint pos = 0; pos < attributes.count(); pos += 2 ) + mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] ); + + mUser = config->readEntry( "LdapUser" ); + mPassword = KStringHandler::obscure( config->readEntry( "LdapPassword" ) ); + mDn = config->readEntry( "LdapDn" ); + mHost = config->readEntry( "LdapHost" ); + mPort = config->readNumEntry( "LdapPort", 389 ); + mFilter = config->readEntry( "LdapFilter" ); + mAnonymous = config->readBoolEntry( "LdapAnonymous" ); + d->mTLS = config->readBoolEntry( "LdapTLS" ); + d->mSSL = config->readBoolEntry( "LdapSSL" ); + d->mSubTree = config->readBoolEntry( "LdapSubTree" ); + d->mSASL = config->readBoolEntry( "LdapSASL" ); + d->mMech = config->readEntry( "LdapMech" ); + d->mRealm = config->readEntry( "LdapRealm" ); + d->mBindDN = config->readEntry( "LdapBindDN" ); + d->mVer = config->readNumEntry( "LdapVer", 3 ); + d->mTimeLimit = config->readNumEntry( "LdapTimeLimit", 0 ); + d->mSizeLimit = config->readNumEntry( "LdapSizeLimit", 0 ); + d->mRDNPrefix = config->readNumEntry( "LdapRDNPrefix", 0 ); + d->mCachePolicy = config->readNumEntry( "LdapCachePolicy", 0 ); + d->mAutoCache = config->readBoolEntry( "LdapAutoCache", true ); + } else { + mPort = 389; + mAnonymous = true; + mUser = mPassword = mHost = mFilter = mDn = ""; + d->mMech = d->mRealm = d->mBindDN = ""; + d->mTLS = d->mSSL = d->mSubTree = d->mSASL = false; + d->mVer = 3; d->mRDNPrefix = 0; + d->mTimeLimit = d->mSizeLimit = 0; + d->mCachePolicy = Cache_No; + d->mAutoCache = true; + } + d->mCacheDst = TDEGlobal::dirs()->saveLocation("cache", "ldaptdeio") + "/" + + type() + "_" + identifier(); + init(); +} + +ResourceLDAPTDEIO::~ResourceLDAPTDEIO() +{ + delete d; +} + +void ResourceLDAPTDEIO::enter_loop() +{ + TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); + dummy.setFocusPolicy( TQ_NoFocus ); + tqt_enter_modal(&dummy); + tqApp->enter_loop(); + tqt_leave_modal(&dummy); +} + +void ResourceLDAPTDEIO::entries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) +{ + TDEIO::UDSEntryListConstIterator it = list.begin(); + TDEIO::UDSEntryListConstIterator end = list.end(); + for (; it != end; ++it) { + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); + for( ; it2 != (*it).end(); it2++ ) { + if ( (*it2).m_uds == TDEIO::UDS_URL ) { + KURL tmpurl( (*it2).m_str ); + d->mResultDn = tmpurl.path(); + kdDebug(7125) << "findUid(): " << d->mResultDn << endl; + if ( d->mResultDn.startsWith("/") ) d->mResultDn.remove(0,1); + return; + } + } + } +} + +void ResourceLDAPTDEIO::listResult( TDEIO::Job *job) +{ + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) + mErrorMsg = job->errorString(); + else + mErrorMsg = ""; + tqApp->exit_loop(); +} + +TQString ResourceLDAPTDEIO::findUid( const TQString &uid ) +{ + LDAPUrl url( d->mLDAPUrl ); + TDEIO::UDSEntry entry; + + mErrorMsg = d->mResultDn = ""; + + url.setAttributes("dn"); + url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); + url.setExtension( "x-dir", "one" ); + + kdDebug(7125) << "ResourceLDAPTDEIO::findUid() uid: " << uid << " url " << + url.prettyURL() << endl; + + TDEIO::ListJob * listJob = TDEIO::listDir( url, false /* no GUI */ ); + connect( listJob, + TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList& ) ), + TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); + connect( listJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( listResult( TDEIO::Job* ) ) ); + + enter_loop(); + return d->mResultDn; +} + +TQCString ResourceLDAPTDEIO::addEntry( const TQString &attr, const TQString &value, bool mod ) +{ + TQCString tmp; + if ( !attr.isEmpty() ) { + if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n"; + tmp += LDIF::assembleLine( attr, value ) + "\n"; + if ( mod ) tmp += "-\n"; + } + return ( tmp ); +} + +bool ResourceLDAPTDEIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, + const TQString &olddn ) +{ + TQCString tmp; + TQString dn; + TQByteArray data; + bool mod = false; + + if ( olddn.isEmpty() ) { + //insert new entry + switch ( d->mRDNPrefix ) { + case 1: + dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," +mDn; + break; + case 0: + default: + dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," +mDn; + break; + } + } else { + //modify existing entry + mod = true; + if ( olddn.startsWith( mAttributes[ "uid" ] ) ) { + dn = mAttributes[ "uid" ] + "=" + addr.uid() + "," + olddn.section( ',', 1 ); + } else if ( olddn.startsWith( mAttributes[ "commonName" ] ) ) { + dn = mAttributes[ "commonName" ] + "=" + addr.assembledName() + "," + + olddn.section( ',', 1 ); + } else { + dn = olddn; + } + + if ( olddn.lower() != dn.lower() ) { + tmp = LDIF::assembleLine( "dn", olddn ) + "\n"; + tmp += "changetype: modrdn\n"; + tmp += LDIF::assembleLine( "newrdn", dn.section( ',', 0, 0 ) ) + "\n"; + tmp += "deleteoldrdn: 1\n\n"; + } + } + + + tmp += LDIF::assembleLine( "dn", dn ) + "\n"; + if ( mod ) tmp += "changetype: modify\n"; + if ( !mod ) { + tmp += "objectClass: top\n"; + TQStringList obclass = TQStringList::split( ',', mAttributes[ "objectClass" ] ); + for ( TQStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) { + tmp += LDIF::assembleLine( "objectClass", *it ) + "\n"; + } + } + + tmp += addEntry( mAttributes[ "commonName" ], addr.assembledName(), mod ); + tmp += addEntry( mAttributes[ "formattedName" ], addr.formattedName(), mod ); + tmp += addEntry( mAttributes[ "givenName" ], addr.givenName(), mod ); + tmp += addEntry( mAttributes[ "familyName" ], addr.familyName(), mod ); + tmp += addEntry( mAttributes[ "uid" ], addr.uid(), mod ); + + PhoneNumber number; + number = addr.phoneNumber( PhoneNumber::Home ); + tmp += addEntry( mAttributes[ "phoneNumber" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Work ); + tmp += addEntry( mAttributes[ "telephoneNumber" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Fax ); + tmp += addEntry( mAttributes[ "facsimileTelephoneNumber" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Cell ); + tmp += addEntry( mAttributes[ "mobile" ], number.number().utf8(), mod ); + number = addr.phoneNumber( PhoneNumber::Pager ); + tmp += addEntry( mAttributes[ "pager" ], number.number().utf8(), mod ); + + tmp += addEntry( mAttributes[ "description" ], addr.note(), mod ); + tmp += addEntry( mAttributes[ "title" ], addr.title(), mod ); + tmp += addEntry( mAttributes[ "organization" ], addr.organization(), mod ); + + Address ad = addr.address( Address::Home ); + if ( !ad.isEmpty() ) { + tmp += addEntry( mAttributes[ "street" ], ad.street(), mod ); + tmp += addEntry( mAttributes[ "state" ], ad.region(), mod ); + tmp += addEntry( mAttributes[ "city" ], ad.locality(), mod ); + tmp += addEntry( mAttributes[ "postalcode" ], ad.postalCode(), mod ); + } + + TQStringList emails = addr.emails(); + TQStringList::ConstIterator mailIt = emails.begin(); + + if ( !mAttributes[ "mail" ].isEmpty() ) { + if ( mod ) tmp += + LDIF::assembleLine( "replace", mAttributes[ "mail" ] ) + "\n"; + if ( mailIt != emails.end() ) { + tmp += LDIF::assembleLine( mAttributes[ "mail" ], *mailIt ) + "\n"; + mailIt ++; + } + if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += "-\n"; + } + + if ( !mAttributes[ "mailAlias" ].isEmpty() ) { + if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += + LDIF::assembleLine( "replace", mAttributes[ "mailAlias" ] ) + "\n"; + for ( ; mailIt != emails.end(); ++mailIt ) { + tmp += LDIF::assembleLine( mAttributes[ "mailAlias" ], *mailIt ) + "\n" ; + } + if ( mod ) tmp += "-\n"; + } + + if ( !mAttributes[ "jpegPhoto" ].isEmpty() ) { + TQByteArray pic; + TQBuffer buffer( pic ); + buffer.open( IO_WriteOnly ); + addr.photo().data().save( &buffer, "JPEG" ); + + if ( mod ) tmp += + LDIF::assembleLine( "replace", mAttributes[ "jpegPhoto" ] ) + "\n"; + tmp += LDIF::assembleLine( mAttributes[ "jpegPhoto" ], pic, 76 ) + "\n"; + if ( mod ) tmp += "-\n"; + } + + tmp += "\n"; + kdDebug(7125) << "ldif: " << TQString(TQString::fromUtf8(tmp)) << endl; + ldif = tmp; + return true; +} + +void ResourceLDAPTDEIO::setReadOnly( bool value ) +{ + //save the original readonly flag, because offline using disables writing + d->mReadOnly = true; + Resource::setReadOnly( value ); +} + +void ResourceLDAPTDEIO::init() +{ + if ( mPort == 0 ) mPort = 389; + + /** + If you want to add new attributes, append them here, add a + translation string in the ctor of AttributesDialog and + handle them in the load() method below. + These are the default values + */ + if ( !mAttributes.contains("objectClass") ) + mAttributes.insert( "objectClass", "inetOrgPerson" ); + if ( !mAttributes.contains("commonName") ) + mAttributes.insert( "commonName", "cn" ); + if ( !mAttributes.contains("formattedName") ) + mAttributes.insert( "formattedName", "displayName" ); + if ( !mAttributes.contains("familyName") ) + mAttributes.insert( "familyName", "sn" ); + if ( !mAttributes.contains("givenName") ) + mAttributes.insert( "givenName", "givenName" ); + if ( !mAttributes.contains("mail") ) + mAttributes.insert( "mail", "mail" ); + if ( !mAttributes.contains("mailAlias") ) + mAttributes.insert( "mailAlias", "" ); + if ( !mAttributes.contains("phoneNumber") ) + mAttributes.insert( "phoneNumber", "homePhone" ); + if ( !mAttributes.contains("telephoneNumber") ) + mAttributes.insert( "telephoneNumber", "telephoneNumber" ); + if ( !mAttributes.contains("facsimileTelephoneNumber") ) + mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); + if ( !mAttributes.contains("mobile") ) + mAttributes.insert( "mobile", "mobile" ); + if ( !mAttributes.contains("pager") ) + mAttributes.insert( "pager", "pager" ); + if ( !mAttributes.contains("description") ) + mAttributes.insert( "description", "description" ); + + if ( !mAttributes.contains("title") ) + mAttributes.insert( "title", "title" ); + if ( !mAttributes.contains("street") ) + mAttributes.insert( "street", "street" ); + if ( !mAttributes.contains("state") ) + mAttributes.insert( "state", "st" ); + if ( !mAttributes.contains("city") ) + mAttributes.insert( "city", "l" ); + if ( !mAttributes.contains("organization") ) + mAttributes.insert( "organization", "o" ); + if ( !mAttributes.contains("postalcode") ) + mAttributes.insert( "postalcode", "postalCode" ); + + if ( !mAttributes.contains("uid") ) + mAttributes.insert( "uid", "uid" ); + if ( !mAttributes.contains("jpegPhoto") ) + mAttributes.insert( "jpegPhoto", "jpegPhoto" ); + + d->mLDAPUrl = KURL(); + if ( !mAnonymous ) { + d->mLDAPUrl.setUser( mUser ); + d->mLDAPUrl.setPass( mPassword ); + } + d->mLDAPUrl.setProtocol( d->mSSL ? "ldaps" : "ldap"); + d->mLDAPUrl.setHost( mHost ); + d->mLDAPUrl.setPort( mPort ); + d->mLDAPUrl.setDn( mDn ); + + if (!mAttributes.empty()) { + TQMap::Iterator it; + TQStringList attr; + for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { + if ( !it.data().isEmpty() && it.key() != "objectClass" ) + attr.append( it.data() ); + } + d->mLDAPUrl.setAttributes( attr ); + } + + d->mLDAPUrl.setScope( d->mSubTree ? LDAPUrl::Sub : LDAPUrl::One ); + if ( !mFilter.isEmpty() && mFilter != "(objectClass=*)" ) + d->mLDAPUrl.setFilter( mFilter ); + d->mLDAPUrl.setExtension( "x-dir", "base" ); + if ( d->mTLS ) d->mLDAPUrl.setExtension( "x-tls", "" ); + d->mLDAPUrl.setExtension( "x-ver", TQString::number( d->mVer ) ); + if ( d->mSizeLimit ) + d->mLDAPUrl.setExtension( "x-sizelimit", TQString::number( d->mSizeLimit ) ); + if ( d->mTimeLimit ) + d->mLDAPUrl.setExtension( "x-timelimit", TQString::number( d->mTimeLimit ) ); + if ( d->mSASL ) { + d->mLDAPUrl.setExtension( "x-sasl", "" ); + if ( !d->mBindDN.isEmpty() ) d->mLDAPUrl.setExtension( "bindname", d->mBindDN ); + if ( !d->mMech.isEmpty() ) d->mLDAPUrl.setExtension( "x-mech", d->mMech ); + if ( !d->mRealm.isEmpty() ) d->mLDAPUrl.setExtension( "x-realm", d->mRealm ); + } + + d->mReadOnly = readOnly(); + + kdDebug(7125) << "resource_ldaptdeio url: " << d->mLDAPUrl.prettyURL() << endl; +} + +void ResourceLDAPTDEIO::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + config->writeEntry( "LdapUser", mUser ); + config->writeEntry( "LdapPassword", KStringHandler::obscure( mPassword ) ); + config->writeEntry( "LdapDn", mDn ); + config->writeEntry( "LdapHost", mHost ); + config->writeEntry( "LdapPort", mPort ); + config->writeEntry( "LdapFilter", mFilter ); + config->writeEntry( "LdapAnonymous", mAnonymous ); + config->writeEntry( "LdapTLS", d->mTLS ); + config->writeEntry( "LdapSSL", d->mSSL ); + config->writeEntry( "LdapSubTree", d->mSubTree ); + config->writeEntry( "LdapSASL", d->mSASL ); + config->writeEntry( "LdapMech", d->mMech ); + config->writeEntry( "LdapVer", d->mVer ); + config->writeEntry( "LdapTimeLimit", d->mTimeLimit ); + config->writeEntry( "LdapSizeLimit", d->mSizeLimit ); + config->writeEntry( "LdapRDNPrefix", d->mRDNPrefix ); + config->writeEntry( "LdapRealm", d->mRealm ); + config->writeEntry( "LdapBindDN", d->mBindDN ); + config->writeEntry( "LdapCachePolicy", d->mCachePolicy ); + config->writeEntry( "LdapAutoCache", d->mAutoCache ); + + TQStringList attributes; + TQMap::Iterator it; + for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) + attributes << it.key() << it.data(); + + config->writeEntry( "LdapAttributes", attributes ); +} + +Ticket *ResourceLDAPTDEIO::requestSaveTicket() +{ + if ( !addressBook() ) { + kdDebug(7125) << "no addressbook" << endl; + return 0; + } + + return createTicket( this ); +} + +void ResourceLDAPTDEIO::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; +} + +bool ResourceLDAPTDEIO::doOpen() +{ + return true; +} + +void ResourceLDAPTDEIO::doClose() +{ +} + +void ResourceLDAPTDEIO::createCache() +{ + d->mTmp = NULL; + if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) { + d->mTmp = new KTempFile( d->mCacheDst, "tmp" ); + d->mTmp->setAutoDelete( true ); + } +} + +void ResourceLDAPTDEIO::activateCache() +{ + if ( d->mTmp && d->mError == 0 ) { + d->mTmp->close(); + rename( TQFile::encodeName( d->mTmp->name() ), TQFile::encodeName( d->mCacheDst ) ); + } + if ( d->mTmp ) { + delete d->mTmp; + d->mTmp = 0; + } +} + +TDEIO::Job *ResourceLDAPTDEIO::loadFromCache() +{ + TDEIO::Job *job = NULL; + if ( d->mCachePolicy == Cache_Always || + ( d->mCachePolicy == Cache_NoConnection && + d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) { + + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + //initialize ldif parser + d->mLdif.startParsing(); + + Resource::setReadOnly( true ); + + KURL url( d->mCacheDst ); + job = TDEIO::get( url, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + } + return job; +} + +bool ResourceLDAPTDEIO::load() +{ + kdDebug(7125) << "ResourceLDAPTDEIO::load()" << endl; + TDEIO::Job *job; + + clear(); + //clear the addressee + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + //initialize ldif parser + d->mLdif.startParsing(); + + //set to original settings, offline use will disable writing + Resource::setReadOnly( d->mReadOnly ); + + createCache(); + if ( d->mCachePolicy != Cache_Always ) { + job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); + enter_loop(); + } + + job = loadFromCache(); + if ( job ) { + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); + enter_loop(); + } + if ( mErrorMsg.isEmpty() ) { + kdDebug(7125) << "ResourceLDAPTDEIO load ok!" << endl; + return true; + } else { + kdDebug(7125) << "ResourceLDAPTDEIO load finished with error: " << mErrorMsg << endl; + addressBook()->error( mErrorMsg ); + return false; + } +} + +bool ResourceLDAPTDEIO::asyncLoad() +{ + clear(); + //clear the addressee + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + //initialize ldif parser + d->mLdif.startParsing(); + + Resource::setReadOnly( d->mReadOnly ); + + createCache(); + if ( d->mCachePolicy != Cache_Always ) { + TDEIO::Job *job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( result( TDEIO::Job* ) ) ); + } else { + result( NULL ); + } + return true; +} + +void ResourceLDAPTDEIO::data( TDEIO::Job *, const TQByteArray &data ) +{ + if ( data.size() ) { + d->mLdif.setLDIF( data ); + if ( d->mTmp ) { + d->mTmp->file()->writeBlock( data ); + } + } else { + d->mLdif.endLDIF(); + } + + LDIF::ParseVal ret; + TQString name; + TQByteArray value; + do { + ret = d->mLdif.nextItem(); + switch ( ret ) { + case LDIF::NewEntry: + kdDebug(7125) << "new entry: " << d->mLdif.dn() << endl; + break; + case LDIF::Item: + name = d->mLdif.attr().lower(); + value = d->mLdif.val(); + if ( name == mAttributes[ "commonName" ].lower() ) { + if ( !d->mAddr.formattedName().isEmpty() ) { + TQString fn = d->mAddr.formattedName(); + d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); + d->mAddr.setFormattedName( fn ); + } else + d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "formattedName" ].lower() ) { + d->mAddr.setFormattedName( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "givenName" ].lower() ) { + d->mAddr.setGivenName( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "mail" ].lower() ) { + d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), true ); + } else if ( name == mAttributes[ "mailAlias" ].lower() ) { + d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), false ); + } else if ( name == mAttributes[ "phoneNumber" ].lower() ) { + PhoneNumber phone; + phone.setNumber( TQString::fromUtf8( value, value.size() ) ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "telephoneNumber" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Work ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "facsimileTelephoneNumber" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Fax ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "mobile" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Cell ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "pager" ].lower() ) { + PhoneNumber phone( TQString::fromUtf8( value, value.size() ), + PhoneNumber::Pager ); + d->mAddr.insertPhoneNumber( phone ); + } else if ( name == mAttributes[ "description" ].lower() ) { + d->mAddr.setNote( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "title" ].lower() ) { + d->mAddr.setTitle( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "street" ].lower() ) { + d->mAd.setStreet( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "state" ].lower() ) { + d->mAd.setRegion( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "city" ].lower() ) { + d->mAd.setLocality( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "postalcode" ].lower() ) { + d->mAd.setPostalCode( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "organization" ].lower() ) { + d->mAddr.setOrganization( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "familyName" ].lower() ) { + d->mAddr.setFamilyName( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "uid" ].lower() ) { + d->mAddr.setUid( TQString::fromUtf8( value, value.size() ) ); + } else if ( name == mAttributes[ "jpegPhoto" ].lower() ) { + KABC::Picture photo; + TQImage img( value ); + if ( !img.isNull() ) { + photo.setData( img ); + photo.setType( "image/jpeg" ); + d->mAddr.setPhoto( photo ); + } + } + + break; + case LDIF::EndEntry: { + d->mAddr.setResource( this ); + d->mAddr.insertAddress( d->mAd ); + d->mAddr.setChanged( false ); + insertAddressee( d->mAddr ); + //clear the addressee + d->mAddr = Addressee(); + d->mAd = Address( Address::Home ); + } + break; + default: + break; + } + } while ( ret != LDIF::MoreData ); +} + +void ResourceLDAPTDEIO::loadCacheResult( TDEIO::Job *job ) +{ + mErrorMsg = ""; + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { + mErrorMsg = job->errorString(); + } + if ( !mErrorMsg.isEmpty() ) + emit loadingError( this, mErrorMsg ); + else + emit loadingFinished( this ); +} + +void ResourceLDAPTDEIO::result( TDEIO::Job *job ) +{ + mErrorMsg = ""; + if ( job ) { + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { + mErrorMsg = job->errorString(); + } + } else { + d->mError = 0; + } + activateCache(); + + TDEIO::Job *cjob; + cjob = loadFromCache(); + if ( cjob ) { + connect( cjob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadCacheResult( TDEIO::Job* ) ) ); + } else { + if ( !mErrorMsg.isEmpty() ) + emit loadingError( this, mErrorMsg ); + else + emit loadingFinished( this ); + } +} + +bool ResourceLDAPTDEIO::save( Ticket* ) +{ + kdDebug(7125) << "ResourceLDAPTDEIO save" << endl; + + d->mSaveIt = begin(); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); + enter_loop(); + if ( mErrorMsg.isEmpty() ) { + kdDebug(7125) << "ResourceLDAPTDEIO save ok!" << endl; + return true; + } else { + kdDebug(7125) << "ResourceLDAPTDEIO finished with error: " << mErrorMsg << endl; + addressBook()->error( mErrorMsg ); + return false; + } +} + +bool ResourceLDAPTDEIO::asyncSave( Ticket* ) +{ + kdDebug(7125) << "ResourceLDAPTDEIO asyncSave" << endl; + d->mSaveIt = begin(); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( saveResult( TDEIO::Job* ) ) ); + return true; +} + +void ResourceLDAPTDEIO::syncLoadSaveResult( TDEIO::Job *job ) +{ + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) + mErrorMsg = job->errorString(); + else + mErrorMsg = ""; + activateCache(); + + tqApp->exit_loop(); +} + +void ResourceLDAPTDEIO::saveResult( TDEIO::Job *job ) +{ + d->mError = job->error(); + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) + emit savingError( this, job->errorString() ); + else + emit savingFinished( this ); +} + +void ResourceLDAPTDEIO::saveData( TDEIO::Job*, TQByteArray& data ) +{ + while ( d->mSaveIt != end() && + !(*d->mSaveIt).changed() ) d->mSaveIt++; + + if ( d->mSaveIt == end() ) { + kdDebug(7125) << "ResourceLDAPTDEIO endData" << endl; + data.resize(0); + return; + } + + kdDebug(7125) << "ResourceLDAPTDEIO saveData: " << (*d->mSaveIt).assembledName() << endl; + + AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) ); +// kdDebug(7125) << "ResourceLDAPTDEIO save LDIF: " << TQString::fromUtf8(data) << endl; + // mark as unchanged + (*d->mSaveIt).setChanged( false ); + + d->mSaveIt++; +} + +void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr ) +{ + TQString dn = findUid( addr.uid() ); + + kdDebug(7125) << "ResourceLDAPTDEIO: removeAddressee: " << dn << endl; + + if ( !mErrorMsg.isEmpty() ) { + addressBook()->error( mErrorMsg ); + return; + } + if ( !dn.isEmpty() ) { + kdDebug(7125) << "ResourceLDAPTDEIO: found uid: " << dn << endl; + LDAPUrl url( d->mLDAPUrl ); + url.setPath( "/" + dn ); + url.setExtension( "x-dir", "base" ); + url.setScope( LDAPUrl::Base ); + if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); + } else { + //maybe it's not saved yet + mAddrMap.erase( addr.uid() ); + } +} + + +void ResourceLDAPTDEIO::setUser( const TQString &user ) +{ + mUser = user; +} + +TQString ResourceLDAPTDEIO::user() const +{ + return mUser; +} + +void ResourceLDAPTDEIO::setPassword( const TQString &password ) +{ + mPassword = password; +} + +TQString ResourceLDAPTDEIO::password() const +{ + return mPassword; +} + +void ResourceLDAPTDEIO::setDn( const TQString &dn ) +{ + mDn = dn; +} + +TQString ResourceLDAPTDEIO::dn() const +{ + return mDn; +} + +void ResourceLDAPTDEIO::setHost( const TQString &host ) +{ + mHost = host; +} + +TQString ResourceLDAPTDEIO::host() const +{ + return mHost; +} + +void ResourceLDAPTDEIO::setPort( int port ) +{ + mPort = port; +} + +int ResourceLDAPTDEIO::port() const +{ + return mPort; +} + +void ResourceLDAPTDEIO::setVer( int ver ) +{ + d->mVer = ver; +} + +int ResourceLDAPTDEIO::ver() const +{ + return d->mVer; +} + +void ResourceLDAPTDEIO::setSizeLimit( int sizelimit ) +{ + d->mSizeLimit = sizelimit; +} + +int ResourceLDAPTDEIO::sizeLimit() +{ + return d->mSizeLimit; +} + +void ResourceLDAPTDEIO::setTimeLimit( int timelimit ) +{ + d->mTimeLimit = timelimit; +} + +int ResourceLDAPTDEIO::timeLimit() +{ + return d->mTimeLimit; +} + +void ResourceLDAPTDEIO::setFilter( const TQString &filter ) +{ + mFilter = filter; +} + +TQString ResourceLDAPTDEIO::filter() const +{ + return mFilter; +} + +void ResourceLDAPTDEIO::setIsAnonymous( bool value ) +{ + mAnonymous = value; +} + +bool ResourceLDAPTDEIO::isAnonymous() const +{ + return mAnonymous; +} + +void ResourceLDAPTDEIO::setIsTLS( bool value ) +{ + d->mTLS = value; +} + +bool ResourceLDAPTDEIO::isTLS() const +{ + return d->mTLS; +} +void ResourceLDAPTDEIO::setIsSSL( bool value ) +{ + d->mSSL = value; +} + +bool ResourceLDAPTDEIO::isSSL() const +{ + return d->mSSL; +} + +void ResourceLDAPTDEIO::setIsSubTree( bool value ) +{ + d->mSubTree = value; +} + +bool ResourceLDAPTDEIO::isSubTree() const +{ + return d->mSubTree; +} + +void ResourceLDAPTDEIO::setAttributes( const TQMap &attributes ) +{ + mAttributes = attributes; +} + +TQMap ResourceLDAPTDEIO::attributes() const +{ + return mAttributes; +} + +void ResourceLDAPTDEIO::setRDNPrefix( int value ) +{ + d->mRDNPrefix = value; +} + +int ResourceLDAPTDEIO::RDNPrefix() const +{ + return d->mRDNPrefix; +} + +void ResourceLDAPTDEIO::setIsSASL( bool value ) +{ + d->mSASL = value; +} + +bool ResourceLDAPTDEIO::isSASL() const +{ + return d->mSASL; +} + +void ResourceLDAPTDEIO::setMech( const TQString &mech ) +{ + d->mMech = mech; +} + +TQString ResourceLDAPTDEIO::mech() const +{ + return d->mMech; +} + +void ResourceLDAPTDEIO::setRealm( const TQString &realm ) +{ + d->mRealm = realm; +} + +TQString ResourceLDAPTDEIO::realm() const +{ + return d->mRealm; +} + +void ResourceLDAPTDEIO::setBindDN( const TQString &binddn ) +{ + d->mBindDN = binddn; +} + +TQString ResourceLDAPTDEIO::bindDN() const +{ + return d->mBindDN; +} + +void ResourceLDAPTDEIO::setCachePolicy( int pol ) +{ + d->mCachePolicy = pol; +} + +int ResourceLDAPTDEIO::cachePolicy() const +{ + return d->mCachePolicy; +} + +void ResourceLDAPTDEIO::setAutoCache( bool value ) +{ + d->mAutoCache = value; +} + +bool ResourceLDAPTDEIO::autoCache() +{ + return d->mAutoCache; +} + +TQString ResourceLDAPTDEIO::cacheDst() const +{ + return d->mCacheDst; +} + + +#include "resourceldaptdeio.moc" diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeio.h b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.h new file mode 100644 index 000000000..bf1b70ec0 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.h @@ -0,0 +1,171 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + Copyright (c) 2004 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCELDAP_H +#define KABC_RESOURCELDAP_H + +#include +#include +#include + +class TDEConfig; + +namespace KABC { + +class KABC_EXPORT ResourceLDAPTDEIO : public Resource +{ + Q_OBJECT + + public: + enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always }; + + ResourceLDAPTDEIO( const TDEConfig* ); + virtual ~ResourceLDAPTDEIO(); + /** + * Call this after you used one of the set... methods + */ + virtual void init(); + + virtual void writeConfig( TDEConfig* ); + + virtual bool doOpen(); + virtual void doClose(); + + virtual Ticket *requestSaveTicket(); + virtual void releaseSaveTicket( Ticket* ); + + virtual bool readOnly() const { return Resource::readOnly(); } + virtual void setReadOnly( bool value ); + + virtual bool load(); + virtual bool asyncLoad(); + virtual bool save( Ticket * ticket ); + virtual bool asyncSave( Ticket * ticket ); + + virtual void removeAddressee( const Addressee& addr ); + + void setUser( const TQString &user ); + TQString user() const; + + void setPassword( const TQString &password ); + TQString password() const; + + void setRealm( const TQString &realm ); + TQString realm() const; + + void setBindDN( const TQString &binddn ); + TQString bindDN() const; + + void setDn( const TQString &dn ); + TQString dn() const; + + void setHost( const TQString &host ); + TQString host() const; + + void setPort( int port ); + int port() const; + + void setVer( int ver ); + int ver() const; + + void setSizeLimit( int sizelimit ); + int sizeLimit(); + + void setTimeLimit( int timelimit ); + int timeLimit(); + + void setFilter( const TQString &filter ); + TQString filter() const; + + void setIsAnonymous( bool value ); + bool isAnonymous() const; + + void setAttributes( const TQMap &attributes ); + TQMap attributes() const; + + void setRDNPrefix( int value ); + int RDNPrefix() const; + + void setIsTLS( bool value ); + bool isTLS() const ; + + void setIsSSL( bool value ); + bool isSSL() const; + + void setIsSubTree( bool value ); + bool isSubTree() const ; + + void setIsSASL( bool value ); + bool isSASL() const ; + + void setMech( const TQString &mech ); + TQString mech() const; + + void setCachePolicy( int pol ); + int cachePolicy() const; + + void setAutoCache( bool value ); + bool autoCache(); + + TQString cacheDst() const; + +protected slots: + void entries( TDEIO::Job*, const TDEIO::UDSEntryList& ); + void data( TDEIO::Job*, const TQByteArray& ); + void result( TDEIO::Job* ); + void listResult( TDEIO::Job* ); + void syncLoadSaveResult( TDEIO::Job* ); + void saveResult( TDEIO::Job* ); + void saveData( TDEIO::Job*, TQByteArray& ); + void loadCacheResult( TDEIO::Job* ); + + private: + TQString mUser; + TQString mPassword; + TQString mDn; + TQString mHost; + TQString mFilter; + int mPort; + bool mAnonymous; + TQMap mAttributes; + + KURL mLDAPUrl; + int mGetCounter; //KDE 4: remove + bool mErrorOccured; //KDE 4: remove + TQString mErrorMsg; + TQMap mJobMap; //KDE 4: remove + + TDEIO::Job *loadFromCache(); + void createCache(); + void activateCache(); + void enter_loop(); + TQCString addEntry( const TQString &attr, const TQString &value, bool mod ); + TQString findUid( const TQString &uid ); + bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, + const TQString &olddn ); + + class ResourceLDAPTDEIOPrivate; + ResourceLDAPTDEIOPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp new file mode 100644 index 000000000..a6af7d065 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp @@ -0,0 +1,388 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "resourceldaptdeio.h" + +#include "resourceldaptdeioconfig.h" +#include "resourceldaptdeioconfig.moc" + +using namespace KABC; + +ResourceLDAPTDEIOConfig::ResourceLDAPTDEIOConfig( TQWidget* parent, const char* name ) + : KRES::ConfigWidget( parent, name ) +{ + TQBoxLayout *mainLayout = new TQVBoxLayout( this ); + mainLayout->setAutoAdd( true ); + cfg = new LdapConfigWidget( LdapConfigWidget::W_ALL, this ); + + mSubTree = new TQCheckBox( i18n( "Sub-tree query" ), this ); + TQHBox *box = new TQHBox( this ); + box->setSpacing( KDialog::spacingHint() ); + mEditButton = new TQPushButton( i18n( "Edit Attributes..." ), box ); + mCacheButton = new TQPushButton( i18n( "Offline Use..." ), box ); + + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editAttributes() ) ); + connect( mCacheButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCache() ) ); +} + +void ResourceLDAPTDEIOConfig::loadSettings( KRES::Resource *res ) +{ + ResourceLDAPTDEIO *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceLDAPTDEIOConfig::loadSettings(): cast failed" << endl; + return; + } + + cfg->setUser( resource->user() ); + cfg->setPassword( resource->password() ); + cfg->setRealm( resource->realm() ); + cfg->setBindDN( resource->bindDN() ); + cfg->setHost( resource->host() ); + cfg->setPort( resource->port() ); + cfg->setVer( resource->ver() ); + cfg->setTimeLimit( resource->timeLimit() ); + cfg->setSizeLimit( resource->sizeLimit() ); + cfg->setDn( resource->dn() ); + cfg->setFilter( resource->filter() ); + cfg->setMech( resource->mech() ); + if ( resource->isTLS() ) cfg->setSecTLS(); + else if ( resource->isSSL() ) cfg->setSecSSL(); + else cfg->setSecNO(); + if ( resource->isAnonymous() ) cfg->setAuthAnon(); + else if ( resource->isSASL() ) cfg->setAuthSASL(); + else cfg->setAuthSimple(); + + mSubTree->setChecked( resource->isSubTree() ); + mAttributes = resource->attributes(); + mRDNPrefix = resource->RDNPrefix(); + mCachePolicy = resource->cachePolicy(); + mCacheDst = resource->cacheDst(); + mAutoCache = resource->autoCache(); +} + +void ResourceLDAPTDEIOConfig::saveSettings( KRES::Resource *res ) +{ + ResourceLDAPTDEIO *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceLDAPTDEIOConfig::saveSettings(): cast failed" << endl; + return; + } + + resource->setUser( cfg->user() ); + resource->setPassword( cfg->password() ); + resource->setRealm( cfg->realm() ); + resource->setBindDN( cfg->bindDN() ); + resource->setHost( cfg->host() ); + resource->setPort( cfg->port() ); + resource->setVer( cfg->ver() ); + resource->setTimeLimit( cfg->timeLimit() ); + resource->setSizeLimit( cfg->sizeLimit() ); + resource->setDn( cfg->dn() ); + resource->setFilter( cfg->filter() ); + resource->setIsAnonymous( cfg->isAuthAnon() ); + resource->setIsSASL( cfg->isAuthSASL() ); + resource->setMech( cfg->mech() ); + resource->setIsTLS( cfg->isSecTLS() ); + resource->setIsSSL( cfg->isSecSSL() ); + resource->setIsSubTree( mSubTree->isChecked() ); + resource->setAttributes( mAttributes ); + resource->setRDNPrefix( mRDNPrefix ); + resource->setCachePolicy( mCachePolicy ); + resource->init(); + +} + +void ResourceLDAPTDEIOConfig::editAttributes() +{ + AttributesDialog dlg( mAttributes, mRDNPrefix, this ); + if ( dlg.exec() ) { + mAttributes = dlg.attributes(); + mRDNPrefix = dlg.rdnprefix(); + } +} + +void ResourceLDAPTDEIOConfig::editCache() +{ + LDAPUrl src; + TQStringList attr; + + src = cfg->url(); + src.setScope( mSubTree->isChecked() ? LDAPUrl::Sub : LDAPUrl::One ); + if (!mAttributes.empty()) { + TQMap::Iterator it; + TQStringList attr; + for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) { + if ( !it.data().isEmpty() && it.key() != "objectClass" ) + attr.append( it.data() ); + } + src.setAttributes( attr ); + } + src.setExtension( "x-dir", "base" ); + OfflineDialog dlg( mAutoCache, mCachePolicy, src, mCacheDst, this ); + if ( dlg.exec() ) { + mCachePolicy = dlg.cachePolicy(); + mAutoCache = dlg.autoCache(); + } + +} + +AttributesDialog::AttributesDialog( const TQMap &attributes, + int rdnprefix, + TQWidget *parent, const char *name ) + : KDialogBase( Plain, i18n( "Attributes Configuration" ), Ok | Cancel, + Ok, parent, name, true, true ) +{ + mNameDict.setAutoDelete( true ); + mNameDict.insert( "objectClass", new TQString( i18n( "Object classes" ) ) ); + mNameDict.insert( "commonName", new TQString( i18n( "Common name" ) ) ); + mNameDict.insert( "formattedName", new TQString( i18n( "Formatted name" ) ) ); + mNameDict.insert( "familyName", new TQString( i18n( "Family name" ) ) ); + mNameDict.insert( "givenName", new TQString( i18n( "Given name" ) ) ); + mNameDict.insert( "organization", new TQString( i18n( "Organization" ) ) ); + mNameDict.insert( "title", new TQString( i18n( "Title" ) ) ); + mNameDict.insert( "street", new TQString( i18n( "Street" ) ) ); + mNameDict.insert( "state", new TQString( i18n( "State" ) ) ); + mNameDict.insert( "city", new TQString( i18n( "City" ) ) ); + mNameDict.insert( "postalcode", new TQString( i18n( "Postal code" ) ) ); + mNameDict.insert( "mail", new TQString( i18n( "Email" ) ) ); + mNameDict.insert( "mailAlias", new TQString( i18n( "Email alias" ) ) ); + mNameDict.insert( "phoneNumber", new TQString( i18n( "Telephone number" ) ) ); + mNameDict.insert( "telephoneNumber", new TQString( i18n( "Work telephone number" ) ) ); + mNameDict.insert( "facsimileTelephoneNumber", new TQString( i18n( "Fax number" ) ) ); + mNameDict.insert( "mobile", new TQString( i18n( "Cell phone number" ) ) ); + mNameDict.insert( "pager", new TQString( i18n( "Pager" ) ) ); + mNameDict.insert( "description", new TQString( i18n( "Note" ) ) ); + mNameDict.insert( "uid", new TQString( i18n( "UID" ) ) ); + mNameDict.insert( "jpegPhoto", new TQString( i18n( "Photo" ) ) ); + + // default map + mDefaultMap.insert( "objectClass", "inetOrgPerson" ); + mDefaultMap.insert( "commonName", "cn" ); + mDefaultMap.insert( "formattedName", "displayName" ); + mDefaultMap.insert( "familyName", "sn" ); + mDefaultMap.insert( "givenName", "givenName" ); + mDefaultMap.insert( "title", "title" ); + mDefaultMap.insert( "street", "street" ); + mDefaultMap.insert( "state", "st" ); + mDefaultMap.insert( "city", "l" ); + mDefaultMap.insert( "organization", "o" ); + mDefaultMap.insert( "postalcode", "postalCode" ); + mDefaultMap.insert( "mail", "mail" ); + mDefaultMap.insert( "mailAlias", "" ); + mDefaultMap.insert( "phoneNumber", "homePhone" ); + mDefaultMap.insert( "telephoneNumber", "telephoneNumber" ); + mDefaultMap.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); + mDefaultMap.insert( "mobile", "mobile" ); + mDefaultMap.insert( "pager", "pager" ); + mDefaultMap.insert( "description", "description" ); + mDefaultMap.insert( "uid", "uid" ); + mDefaultMap.insert( "jpegPhoto", "jpegPhoto" ); + + // overwrite the default values here + TQMap kolabMap, netscapeMap, evolutionMap, outlookMap; + + // kolab + kolabMap.insert( "formattedName", "display-name" ); + kolabMap.insert( "mailAlias", "mailalias" ); + + // evolution + evolutionMap.insert( "formattedName", "fileAs" ); + + mMapList.append( attributes ); + mMapList.append( kolabMap ); + mMapList.append( netscapeMap ); + mMapList.append( evolutionMap ); + mMapList.append( outlookMap ); + + TQFrame *page = plainPage(); + TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1, + 0, spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Template:" ), page ); + layout->addWidget( label, 0, 0 ); + mMapCombo = new KComboBox( page ); + layout->addWidget( mMapCombo, 0, 1 ); + + mMapCombo->insertItem( i18n( "User Defined" ) ); + mMapCombo->insertItem( i18n( "Kolab" ) ); + mMapCombo->insertItem( i18n( "Netscape" ) ); + mMapCombo->insertItem( i18n( "Evolution" ) ); + mMapCombo->insertItem( i18n( "Outlook" ) ); + connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) ); + + label = new TQLabel( i18n( "RDN prefix attribute:" ), page ); + layout->addWidget( label, 1, 0 ); + mRDNCombo = new KComboBox( page ); + layout->addWidget( mRDNCombo, 1, 1 ); + mRDNCombo->insertItem( i18n( "commonName" ) ); + mRDNCombo->insertItem( i18n( "UID" ) ); + mRDNCombo->setCurrentItem( rdnprefix ); + + TQMap::ConstIterator it; + int i, j = 0; + for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) { + if ( mNameDict[ it.key() ] == 0 ) { + i--; + continue; + } + if ( (uint)(i - 2) == ( mNameDict.count() >> 1 ) ) { + i = 0; + j = 2; + } + kdDebug(7125) << "itkey: " << it.key() << " i: " << i << endl; + label = new TQLabel( *mNameDict[ it.key() ] + ":", page ); + KLineEdit *lineedit = new KLineEdit( page ); + mLineEditDict.insert( it.key(), lineedit ); + lineedit->setText( it.data() ); + label->setBuddy( lineedit ); + layout->addWidget( label, i, j ); + layout->addWidget( lineedit, i, j+1 ); + } + + for ( i = 1; i < mMapCombo->count(); i++ ) { + TQDictIterator it2( mLineEditDict ); + for ( ; it2.current(); ++it2 ) { + if ( mMapList[ i ].contains( it2.currentKey() ) ) { + if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break; + } else { + if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break; + } + } + if ( !it2.current() ) { + mMapCombo->setCurrentItem( i ); + break; + } + } + + TDEAcceleratorManager::manage( this ); +} + +AttributesDialog::~AttributesDialog() +{ +} + +TQMap AttributesDialog::attributes() const +{ + TQMap map; + + TQDictIterator it( mLineEditDict ); + for ( ; it.current(); ++it ) + map.insert( it.currentKey(), it.current()->text() ); + + return map; +} + +int AttributesDialog::rdnprefix() const +{ + return mRDNCombo->currentItem(); +} + +void AttributesDialog::mapChanged( int pos ) +{ + + // apply first the default and than the spezific changes + TQMap::Iterator it; + for ( it = mDefaultMap.begin(); it != mDefaultMap.end(); ++it ) + mLineEditDict[ it.key() ]->setText( it.data() ); + + for ( it = mMapList[ pos ].begin(); it != mMapList[ pos ].end(); ++it ) { + if ( !it.data().isEmpty() ) { + KLineEdit *le = mLineEditDict[ it.key() ]; + if ( le ) le->setText( it.data() ); + } + } +} + +OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, + const TQString &dst, TQWidget *parent, const char *name ) + : KDialogBase( Plain, i18n( "Offline Configuration" ), Ok | Cancel, + Ok, parent, name, true, true ) +{ + TQFrame *page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout( page ); + layout->setAutoAdd( true ); + + mSrc = src; mDst = dst; + mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal, + i18n("Offline Cache Policy"), page ); + + TQRadioButton *bt; + new TQRadioButton( i18n("Do not use offline cache"), mCacheGroup ); + bt = new TQRadioButton( i18n("Use local copy if no connection"), mCacheGroup ); + new TQRadioButton( i18n("Always use local copy"), mCacheGroup ); + mCacheGroup->setButton( cachePolicy ); + + mAutoCache = new TQCheckBox( i18n("Refresh offline cache automatically"), + page ); + mAutoCache->setChecked( autoCache ); + mAutoCache->setEnabled( bt->isChecked() ); + + connect( bt, TQT_SIGNAL(toggled(bool)), mAutoCache, TQT_SLOT(setEnabled(bool)) ); + + TQPushButton *lcache = new TQPushButton( i18n("Load into Cache"), page ); + connect( lcache, TQT_SIGNAL( clicked() ), TQT_SLOT( loadCache() ) ); +} + +OfflineDialog::~OfflineDialog() +{ +} + +bool OfflineDialog::autoCache() const +{ + return mAutoCache->isChecked(); +} + +int OfflineDialog::cachePolicy() const +{ + return mCacheGroup->selectedId(); +} + +void OfflineDialog::loadCache() +{ + if ( TDEIO::NetAccess::download( mSrc, mDst, this ) ) { + KMessageBox::information( this, + i18n("Successfully downloaded directory server contents!") ); + } else { + KMessageBox::error( this, + i18n("An error occurred downloading directory server contents into file %1.").arg(mDst) ); + } +} diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h new file mode 100644 index 000000000..121cf639e --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h @@ -0,0 +1,118 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 - 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCELDAPCONFIG_H +#define RESOURCELDAPCONFIG_H + +#include +#include +#include +#include + +#include +#include +#include +#include + + +class TQCheckBox; +class TQPushButton; +class TQSpinBox; +class TQString; + +class KComboBox; +class KLineEdit; + +namespace KABC { + +class KABC_EXPORT ResourceLDAPTDEIOConfig : public KRES::ConfigWidget +{ + Q_OBJECT + + public: + ResourceLDAPTDEIOConfig( TQWidget* parent = 0, const char* name = 0 ); + + public slots: + void loadSettings( KRES::Resource* ); + void saveSettings( KRES::Resource* ); + + private slots: + void editAttributes(); + void editCache(); + private: + TQPushButton *mEditButton, *mCacheButton; + LdapConfigWidget *cfg; + TQCheckBox *mSubTree; + TQMap mAttributes; + int mRDNPrefix, mCachePolicy; + bool mAutoCache; + TQString mCacheDst; +}; + +class AttributesDialog : public KDialogBase +{ + Q_OBJECT + + public: + AttributesDialog( const TQMap &attributes, int rdnprefix, + TQWidget *parent, const char *name = 0 ); + ~AttributesDialog(); + + TQMap attributes() const; + int rdnprefix() const; + + private slots: + void mapChanged( int pos ); + + private: + enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap }; + + KComboBox *mMapCombo, *mRDNCombo; + TQValueList< TQMap > mMapList; + TQMap mDefaultMap; + TQDict mLineEditDict; + TQDict mNameDict; +}; + +class OfflineDialog : public KDialogBase +{ + Q_OBJECT + + public: + OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, + const TQString &dst, TQWidget *parent, const char *name = 0 ); + ~OfflineDialog(); + + int cachePolicy() const; + bool autoCache() const; + + private slots: + void loadCache(); + + private: + KURL mSrc; + TQString mDst; + TQButtonGroup *mCacheGroup; + TQCheckBox *mAutoCache; +}; + +} + +#endif diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp new file mode 100644 index 000000000..6d173eb51 --- /dev/null +++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioplugin.cpp @@ -0,0 +1,36 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourceldaptdeio.h" +#include "resourceldaptdeioconfig.h" + +#include +#include + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_ldaptdeio() + { + TDEGlobal::locale()->insertCatalogue("kabc_ldaptdeio"); + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/net/CMakeLists.txt b/tdeabc/plugins/net/CMakeLists.txt new file mode 100644 index 000000000..cc9564995 --- /dev/null +++ b/tdeabc/plugins/net/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/kabc + ${CMAKE_SOURCE_DIR}/kabc + + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + resourcenet.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### other data ################################ + +install( FILES net.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kabc ) + + +##### kabc_net (library) ######################## + +set( target kabc_net ) + +set( ${target}_SRCS + resourcenet.cpp resourcenetconfig.cpp +) + +tde_add_library( ${target} SHARED AUTOMOC + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK tdeabc-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### kabc_net (module) ######################### + +set( target kabc_net ) + +set( ${target}_SRCS + resourcenetplugin.cpp +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK kabc_net-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeabc/plugins/net/Makefile.am b/tdeabc/plugins/net/Makefile.am new file mode 100644 index 000000000..c2ded1b44 --- /dev/null +++ b/tdeabc/plugins/net/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcenetconfig.h + +lib_LTLIBRARIES = libkabc_net.la +libkabc_net_la_SOURCES = resourcenet.cpp resourcenetconfig.cpp +libkabc_net_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -version-info 1:0:0 -no-undefined +libkabc_net_la_LIBADD = $(top_builddir)/tdeabc/libkabc.la $(LIB_KIO) +libkabc_net_la_COMPILE_FIRST = $(top_builddir)/tdeabc/addressee.h + +kde_module_LTLIBRARIES = kabc_net.la +kabc_net_la_SOURCES = resourcenetplugin.cpp +kabc_net_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -L../../../tdecore/.libs/ -ltdecore +kabc_net_la_LIBADD = libkabc_net.la + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_net.pot + +kabcincludedir = $(includedir)/kabc +kabcinclude_HEADERS = resourcenet.h + +servicedir = $(kde_servicesdir)/tderesources/kabc +service_DATA = net.desktop + +resourcenetplugin.lo: ../../addressee.h diff --git a/tdeabc/plugins/net/net.desktop b/tdeabc/plugins/net/net.desktop new file mode 100644 index 000000000..2c72c202d --- /dev/null +++ b/tdeabc/plugins/net/net.desktop @@ -0,0 +1,90 @@ +[Desktop Entry] +Name=Network +Name[af]=Netwerk +Name[ar]=الشبكة +Name[az]=ŞəbÉ™kÉ™ +Name[be]=Сетка +Name[bn]=নেটওয়ারà§à¦• +Name[br]=Rouedad +Name[bs]=Mreža +Name[ca]=Xarxa +Name[cs]=Síť +Name[csb]=Sec +Name[cy]=Rhydwaith +Name[da]=Netværk +Name[de]=Netzwerk +Name[el]=Δίκτυο +Name[eo]=Reto +Name[es]=Red +Name[et]=Võrk +Name[eu]=Sarea +Name[fa]=شبکه +Name[fi]=Verkko +Name[fr]=Réseau +Name[fy]=Netwurk +Name[ga]=Líonra +Name[gl]=Rede +Name[he]=רשת +Name[hi]=नेटवरà¥à¤• +Name[hr]=Mreža +Name[hsb]=Syć +Name[hu]=Hálózat +Name[id]=Jaringan +Name[is]=Net +Name[it]=Rete +Name[ja]=ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ +Name[ka]=ქსელი +Name[kk]=Желі +Name[km]=បណ្ážáž¶áž‰ +Name[ko]=ë„¤íŠ¸ì›Œí¬ +Name[ku]=Tor +Name[lb]=Netzwierk +Name[lt]=Tinklas +Name[lv]=TÄ«kls +Name[mi]=Hao +Name[mk]=Мрежа +Name[mn]=СүлжÑÑ +Name[ms]=Jaringan +Name[nds]=Nettwark +Name[ne]=सञà¥à¤œà¤¾à¤² +Name[nl]=Netwerk +Name[nn]=Nettverk +Name[nso]=Kgokagano +Name[oc]=Resèu +Name[pa]=ਨੈੱਟਵਰਕ +Name[pl]=Sieć +Name[pt]=Rede +Name[pt_BR]=Rede +Name[ro]=ReÅ£ea +Name[ru]=Сеть +Name[rw]=Urusobe +Name[se]=Fierbmi +Name[sk]=SieÅ¥ +Name[sl]=Omrežje +Name[sq]=Rrjeta +Name[sr]=Мрежа +Name[sr@Latn]=Mreža +Name[ss]=Luchungechunge +Name[sv]=Nätverk +Name[ta]=பிணையம௠+Name[te]=కలన జాలం +Name[tg]=Шабака +Name[th]=ระบบเครือข่าย +Name[tr]=AÄŸ +Name[tt]=Çeltär +Name[uk]=Мережа +Name[uz]=Tarmoq +Name[uz@cyrillic]=Tarмоқ +Name[ven]=Vhukwamani +Name[vi]=mạng +Name[wa]=Rantoele +Name[xh]=Umsebenzi womnatha +Name[zh_CN]=网络 +Name[zh_HK]=網絡 +Name[zh_TW]=網路 +Name[zu]=Umsebenzi wokuxhumana okusakazekile +X-TDE-Library=kabc_net +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=contact +X-TDE-ResourceType=net diff --git a/tdeabc/plugins/net/resourcenet.cpp b/tdeabc/plugins/net/resourcenet.cpp new file mode 100644 index 000000000..5a46890d8 --- /dev/null +++ b/tdeabc/plugins/net/resourcenet.cpp @@ -0,0 +1,393 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "formatfactory.h" +#include "resourcenetconfig.h" +#include "stdaddressbook.h" + +#include "resourcenet.h" + +using namespace KABC; + +class ResourceNet::ResourceNetPrivate +{ + public: + TDEIO::Job *mLoadJob; + bool mIsLoading; + + TDEIO::Job *mSaveJob; + bool mIsSaving; + + TQString mLastErrorString; +}; + +ResourceNet::ResourceNet( const TDEConfig *config ) + : Resource( config ), mFormat( 0 ), + mTempFile( 0 ), + d( new ResourceNetPrivate ) +{ + if ( config ) { + init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) ); + } else { + init( KURL(), TQString("vcard").latin1() ); + } +} + +ResourceNet::ResourceNet( const KURL &url, const TQString &format ) + : Resource( 0 ), mFormat( 0 ), + mTempFile( 0 ), + d( new ResourceNetPrivate ) +{ + init( url, format ); +} + +void ResourceNet::init( const KURL &url, const TQString &format ) +{ + d->mLoadJob = 0; + d->mIsLoading = false; + d->mSaveJob = 0; + d->mIsSaving = false; + + mFormatName = format; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); + if ( !mFormat ) { + mFormatName = TQString("vcard").latin1(); + mFormat = factory->format( mFormatName ); + } + + setUrl( url ); +} + +ResourceNet::~ResourceNet() +{ + if ( d->mIsLoading ) + d->mLoadJob->kill(); + if ( d->mIsSaving ) + d->mSaveJob->kill(); + + delete d; + d = 0; + + delete mFormat; + mFormat = 0; + + deleteLocalTempFile(); +} + +void ResourceNet::writeConfig( TDEConfig *config ) +{ + Resource::writeConfig( config ); + + config->writePathEntry( "NetUrl", mUrl.url() ); + config->writeEntry( "NetFormat", mFormatName ); +} + +Ticket *ResourceNet::requestSaveTicket() +{ + kdDebug(5700) << "ResourceNet::requestSaveTicket()" << endl; + + return createTicket( this ); +} + +void ResourceNet::releaseSaveTicket( Ticket *ticket ) +{ + delete ticket; +} + +bool ResourceNet::doOpen() +{ + return true; +} + +void ResourceNet::doClose() +{ +} + +bool ResourceNet::load() +{ + TQString tempFile; + + if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) { + addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); + return false; + } + + TQFile file( tempFile ); + if ( !file.open( IO_ReadOnly ) ) { + addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); + TDEIO::NetAccess::removeTempFile( tempFile ); + return false; + } + + bool result = clearAndLoad( &file ); + if ( !result ) + addressBook()->error( i18n( "Problems during parsing file '%1'." ).arg( tempFile ) ); + + TDEIO::NetAccess::removeTempFile( tempFile ); + + return result; +} + +bool ResourceNet::clearAndLoad( TQFile *file ) +{ + clear(); + return mFormat->loadAll( addressBook(), this, file ); +} + +bool ResourceNet::asyncLoad() +{ + if ( d->mIsLoading ) { + abortAsyncLoading(); + } + + if (d->mIsSaving) { + kdWarning(5700) << "Aborted asyncLoad() because we're still asyncSave()ing!" << endl; + return false; + } + + bool ok = createLocalTempFile(); + if ( ok ) + mTempFile->sync(); + ok = mTempFile->close(); + + if ( !ok ) { + emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); + deleteLocalTempFile(); + return false; + } + + KURL dest; + dest.setPath( mTempFile->name() ); + + TDEIO::Scheduler::checkSlaveOnHold( true ); + d->mLoadJob = TDEIO::file_copy( mUrl, dest, -1, true, false, false ); + d->mIsLoading = true; + connect( d->mLoadJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( downloadFinished( TDEIO::Job* ) ) ); + + return true; +} + +void ResourceNet::abortAsyncLoading() +{ + kdDebug(5700) << "ResourceNet::abortAsyncLoading()" << endl; + + if ( d->mLoadJob ) { + d->mLoadJob->kill(); // result not emitted + d->mLoadJob = 0; + } + + deleteLocalTempFile(); + d->mIsLoading = false; +} + +void ResourceNet::abortAsyncSaving() +{ + kdDebug(5700) << "ResourceNet::abortAsyncSaving()" << endl; + + if ( d->mSaveJob ) { + d->mSaveJob->kill(); // result not emitted + d->mSaveJob = 0; + } + + deleteLocalTempFile(); + d->mIsSaving = false; +} + +bool ResourceNet::save( Ticket* ) +{ + kdDebug(5700) << "ResourceNet::save()" << endl; + + if (d->mIsSaving) { + abortAsyncSaving(); + } + + KTempFile tempFile; + tempFile.setAutoDelete( true ); + bool ok = false; + + if ( tempFile.status() == 0 && tempFile.file() ) { + saveToFile( tempFile.file() ); + tempFile.sync(); + ok = tempFile.close(); + } + + if ( !ok ) { + addressBook()->error( i18n( "Unable to save file '%1'." ).arg( tempFile.name() ) ); + return false; + } + + ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); + if ( !ok ) + addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) ); + + return ok; +} + +bool ResourceNet::asyncSave( Ticket* ) +{ + kdDebug(5700) << "ResourceNet::asyncSave()" << endl; + + if (d->mIsSaving) { + abortAsyncSaving(); + } + + if (d->mIsLoading) { + kdWarning(5700) << "Aborted asyncSave() because we're still asyncLoad()ing!" << endl; + return false; + } + + bool ok = createLocalTempFile(); + if ( ok ) { + saveToFile( mTempFile->file() ); + mTempFile->sync(); + ok = mTempFile->close(); + } + + if ( !ok ) { + emit savingError( this, i18n( "Unable to save file '%1'." ).arg( mTempFile->name() ) ); + deleteLocalTempFile(); + return false; + } + + KURL src; + src.setPath( mTempFile->name() ); + + TDEIO::Scheduler::checkSlaveOnHold( true ); + d->mIsSaving = true; + d->mSaveJob = TDEIO::file_copy( src, mUrl, -1, true, false, false ); + connect( d->mSaveJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( uploadFinished( TDEIO::Job* ) ) ); + + return true; +} + +bool ResourceNet::createLocalTempFile() +{ + deleteStaleTempFile(); + mTempFile = new KTempFile(); + mTempFile->setAutoDelete( true ); + return mTempFile->status() == 0; +} + +void ResourceNet::deleteStaleTempFile() +{ + if ( hasTempFile() ) { + kdDebug(5700) << "stale temp file detected " << mTempFile->name() << endl; + deleteLocalTempFile(); + } +} + +void ResourceNet::deleteLocalTempFile() +{ + delete mTempFile; + mTempFile = 0; +} + +void ResourceNet::saveToFile( TQFile *file ) +{ + mFormat->saveAll( addressBook(), this, file ); +} + +void ResourceNet::setUrl( const KURL &url ) +{ + mUrl = url; +} + +KURL ResourceNet::url() const +{ + return mUrl; +} + +void ResourceNet::setFormat( const TQString &name ) +{ + mFormatName = name; + if ( mFormat ) + delete mFormat; + + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +} + +TQString ResourceNet::format() const +{ + return mFormatName; +} + +void ResourceNet::downloadFinished( TDEIO::Job* ) +{ + kdDebug(5700) << "ResourceNet::downloadFinished()" << endl; + + d->mIsLoading = false; + + if ( !hasTempFile() || mTempFile->status() != 0 ) { + d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" ); + TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) ); + return; + } + + TQFile file( mTempFile->name() ); + if ( file.open( IO_ReadOnly ) ) { + if ( clearAndLoad( &file ) ) + emit loadingFinished( this ); + else + emit loadingError( this, i18n( "Problems during parsing file '%1'." ).arg( mTempFile->name() ) ); + } + else { + emit loadingError( this, i18n( "Unable to open file '%1'." ).arg( mTempFile->name() ) ); + } + + deleteLocalTempFile(); +} + +void ResourceNet::uploadFinished( TDEIO::Job *job ) +{ + kdDebug(5700) << "ResourceFile::uploadFinished()" << endl; + + d->mIsSaving = false; + + if ( job->error() ) + emit savingError( this, job->errorString() ); + else + emit savingFinished( this ); + + deleteLocalTempFile(); +} + +void ResourceNet::signalError() +{ + emit loadingError( this, d->mLastErrorString ); + d->mLastErrorString.truncate( 0 ); +} + +#include "resourcenet.moc" diff --git a/tdeabc/plugins/net/resourcenet.h b/tdeabc/plugins/net/resourcenet.h new file mode 100644 index 000000000..49707081e --- /dev/null +++ b/tdeabc/plugins/net/resourcenet.h @@ -0,0 +1,117 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCENET_H +#define KABC_RESOURCENET_H + +#include + +#include + +#include + +class TQFile; +class TQTimer; +class KTempFile; + +namespace TDEIO { +class Job; +} + +namespace KABC { + +class FormatPlugin; + +/** + @internal +*/ +class KABC_EXPORT ResourceNet : public Resource +{ + Q_OBJECT + + public: + ResourceNet( const TDEConfig* ); + ResourceNet( const KURL &url, const TQString &format ); + ~ResourceNet(); + + virtual void writeConfig( TDEConfig* ); + + virtual bool doOpen(); + virtual void doClose(); + + virtual Ticket *requestSaveTicket(); + virtual void releaseSaveTicket( Ticket* ); + + virtual bool load(); + virtual bool asyncLoad(); + virtual bool save( Ticket* ticket ); + virtual bool asyncSave( Ticket* ticket ); + + /** + Set url of directory to be used for saving. + */ + void setUrl( const KURL & ); + + /** + Return url of directory used for loading and saving the address book. + */ + KURL url() const; + + /** + Sets a new format by name. + */ + void setFormat( const TQString &name ); + + /** + Returns the format name. + */ + TQString format() const; + + protected: + void init( const KURL &url, const TQString &format ); + + private slots: + void downloadFinished( TDEIO::Job* ); + void uploadFinished( TDEIO::Job* ); + void signalError(); + + private: + bool clearAndLoad( TQFile *file ); + void saveToFile( TQFile *file ); + bool hasTempFile() const { return mTempFile != 0; } + void abortAsyncLoading(); + void abortAsyncSaving(); + bool createLocalTempFile(); + void deleteLocalTempFile(); + void deleteStaleTempFile(); + + FormatPlugin *mFormat; + TQString mFormatName; + + KURL mUrl; + KTempFile *mTempFile; + + class ResourceNetPrivate; + ResourceNetPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/plugins/net/resourcenetconfig.cpp b/tdeabc/plugins/net/resourcenetconfig.cpp new file mode 100644 index 000000000..8d5903f8b --- /dev/null +++ b/tdeabc/plugins/net/resourcenetconfig.cpp @@ -0,0 +1,102 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include + +#include "formatfactory.h" +#include "resourcenet.h" +#include "stdaddressbook.h" + +#include "resourcenetconfig.h" + +using namespace KABC; + +ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name ) + : ConfigWidget( parent, name ), mInEditMode( false ) +{ + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0, + KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n( "Format:" ), this ); + mFormatBox = new KComboBox( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mFormatBox, 0, 1 ); + + label = new TQLabel( i18n( "Location:" ), this ); + mUrlEdit = new KURLRequester( this ); + mUrlEdit->setMode( KFile::File ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mUrlEdit, 1, 1 ); + + FormatFactory *factory = FormatFactory::self(); + TQStringList formats = factory->formats(); + TQStringList::Iterator it; + for ( it = formats.begin(); it != formats.end(); ++it ) { + FormatInfo *info = factory->info( *it ); + if ( info ) { + mFormatTypes << (*it); + mFormatBox->insertItem( info->nameLabel ); + } + } +} + +void ResourceNetConfig::setEditMode( bool value ) +{ + mFormatBox->setEnabled( !value ); + mInEditMode = value; +} + +void ResourceNetConfig::loadSettings( KRES::Resource *res ) +{ + ResourceNet *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceNetConfig::loadSettings(): cast failed" << endl; + return; + } + + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + + mUrlEdit->setURL( resource->url().url() ); +} + +void ResourceNetConfig::saveSettings( KRES::Resource *res ) +{ + ResourceNet *resource = dynamic_cast( res ); + + if ( !resource ) { + kdDebug(5700) << "ResourceNetConfig::saveSettings(): cast failed" << endl; + return; + } + + if ( !mInEditMode ) + resource->setFormat( mFormatTypes[ mFormatBox->currentItem() ] ); + + resource->setUrl( KURL( mUrlEdit->url() ) ); +} + +#include "resourcenetconfig.moc" diff --git a/tdeabc/plugins/net/resourcenetconfig.h b/tdeabc/plugins/net/resourcenetconfig.h new file mode 100644 index 000000000..3c8986122 --- /dev/null +++ b/tdeabc/plugins/net/resourcenetconfig.h @@ -0,0 +1,53 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCENETCONFIG_H +#define RESOURCENETCONFIG_H + +#include +#include + +#include + +namespace KABC { + +class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget +{ + Q_OBJECT + + public: + ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 ); + + void setEditMode( bool value ); + + public slots: + void loadSettings( KRES::Resource *resource ); + void saveSettings( KRES::Resource *resource ); + + private: + KComboBox* mFormatBox; + KURLRequester* mUrlEdit; + + TQStringList mFormatTypes; + bool mInEditMode; +}; + +} +#endif diff --git a/tdeabc/plugins/net/resourcenetplugin.cpp b/tdeabc/plugins/net/resourcenetplugin.cpp new file mode 100644 index 000000000..189bab051 --- /dev/null +++ b/tdeabc/plugins/net/resourcenetplugin.cpp @@ -0,0 +1,32 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcenet.h" +#include "resourcenetconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_net() + { + return new KRES::PluginFactory(); + } +} diff --git a/tdeabc/plugins/sql/Makefile.am b/tdeabc/plugins/sql/Makefile.am new file mode 100644 index 000000000..3fa3986ce --- /dev/null +++ b/tdeabc/plugins/sql/Makefile.am @@ -0,0 +1,20 @@ +INCLUDES = -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) + +# these are the headers for your project +noinst_HEADERS = resourcesql.h resourcesqlconfig.h + +kde_module_LTLIBRARIES = kabc_sql.la + +kabc_sql_la_SOURCES = resourcesql.cpp resourcesqlconfig.cpp + +kabc_sql_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kabc_sql_la_LIBADD = ../../libkabc.la ../../../tdeui/libtdeui.la + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kabc_sql.pot + +linkdir = $(kde_datadir)/tderesources/contact +link_DATA = sql.desktop +EXTRA_DIST = $(link_DATA) diff --git a/tdeabc/plugins/sql/resourcesql.cpp b/tdeabc/plugins/sql/resourcesql.cpp new file mode 100644 index 000000000..e3744eeec --- /dev/null +++ b/tdeabc/plugins/sql/resourcesql.cpp @@ -0,0 +1,338 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include + +#include "resourcesql.h" +#include "resourcesqlconfig.h" + +using namespace KABC; + +extern "C" +{ + KDE_EXPORT void *init_kabc_sql() + { + return new KRES::PluginFactory(); + } +} + +ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config ) + : Resource( ab ), mDb( 0 ) +{ + TQString user, password, db, host; + + user = config->readEntry( "SqlUser" ); + password = cryptStr( config->readEntry( "SqlPassword " ) ); + db = config->readEntry( "SqlName" ); + host = config->readEntry( "SqlHost" ); + + init( user, password, db, host ); +} + +ResourceSql::ResourceSql( AddressBook *ab, const TQString &user, + const TQString &password, const TQString &db, const TQString &host ) + : Resource( ab ), mDb( 0 ) +{ + init( user, password, db, host ); +} + +void ResourceSql::init( const TQString &user, const TQString &password, + const TQString &db, const TQString &host ) +{ + mUser = user; + mPassword = password; + mDbName = db; + mHost = host; +} + +Ticket *ResourceSql::requestSaveTicket() +{ + if ( !addressBook() ) { + kdDebug(5700) << "no addressbook" << endl; + return 0; + } + + return createTicket( this ); +} + +bool ResourceSql::open() +{ + TQStringList drivers = TQSqlDatabase::drivers(); + for ( TQStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) { + kdDebug(5700) << "Driver: " << (*it) << endl; + } + + mDb = TQSqlDatabase::addDatabase( "QMYSQL3" ); + + if ( !mDb ) { + kdDebug(5700) << "Error. Unable to connect to database." << endl; + return false; + } + + mDb->setDatabaseName( mDbName ); + mDb->setUserName( mUser ); + mDb->setPassword( mPassword ); + mDb->setHostName( mHost ); + + if ( !mDb->open() ) { + kdDebug(5700) << "Error. Unable to open database '" << mDbName << "'." << endl; + return false; + } + + return true; +} + +void ResourceSql::close() +{ + mDb->close(); +} + +bool ResourceSql::load() +{ + TQSqlQuery query( "select addressId, name, familyName, givenName, " + "additionalName, prefix, suffix, nickname, birthday, " + "mailer, timezone, geo_latitude, geo_longitude, title, " + "role, organization, note, productId, revision, " + "sortString, url from kaddressbook_main_" + mUser ); + + while ( query.next() ) { + TQString addrId = query.value(0).toString(); + + Addressee addr; + addr.setResource( this ); + addr.setUid( addrId ); + addr.setName( query.value(1).toString() ); + addr.setFamilyName( query.value(2).toString() ); + addr.setGivenName( query.value(3).toString() ); + addr.setAdditionalName( query.value(4).toString() ); + addr.setPrefix( query.value(5).toString() ); + addr.setSuffix( query.value(6).toString() ); + addr.setNickName( query.value(7).toString() ); + addr.setBirthday( query.value(8).toDateTime() ); + addr.setMailer( query.value(9).toString() ); + addr.setTimeZone( TimeZone( query.value(10).toInt() ) ); + addr.setGeo( Geo( query.value(11).toDouble(), query.value(12).toDouble() ) ); + addr.setTitle( query.value(13).toString() ); + addr.setRole( query.value(14).toString() ); + addr.setOrganization( query.value(15).toString() ); + addr.setNote( query.value(16).toString() ); + addr.setProductId( query.value(17).toString() ); + addr.setRevision( query.value(18).toDateTime() ); + addr.setSortString( query.value(19).toString() ); + addr.setUrl( query.value(20).toString() ); + + // emails + { + TQSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails " + "where addressId = '" + addrId + "'" ); + while ( emailsQuery.next() ) + addr.insertEmail( emailsQuery.value( 0 ).toString(), + emailsQuery.value( 1 ).toInt() ); + } + + // phones + { + TQSqlQuery phonesQuery( "select number, type from kaddressbook_phones " + "where addressId = '" + addrId + "'" ); + while ( phonesQuery.next() ) + addr.insertPhoneNumber( PhoneNumber( phonesQuery.value( 0 ).toString(), + phonesQuery.value( 1 ).toInt() ) ); + } + + // addresses + { + TQSqlQuery addressesQuery( "select postOfficeBox, extended, street, " + "locality, region, postalCode, country, label, type " + "from kaddressbook_addresses where addressId = '" + addrId + "'" ); + while ( addressesQuery.next() ) { + Address a; + a.setPostOfficeBox( addressesQuery.value(0).toString() ); + a.setExtended( addressesQuery.value(1).toString() ); + a.setStreet( addressesQuery.value(2).toString() ); + a.setLocality( addressesQuery.value(3).toString() ); + a.setRegion( addressesQuery.value(4).toString() ); + a.setPostalCode( addressesQuery.value(5).toString() ); + a.setCountry( addressesQuery.value(6).toString() ); + a.setLabel( addressesQuery.value(7).toString() ); + a.setType( addressesQuery.value(8).toInt() ); + + addr.insertAddress( a ); + } + } + + // categories + { + TQSqlQuery categoriesQuery( "select category from kaddressbook_categories " + "where addressId = '" + addrId + "'" ); + while ( categoriesQuery.next() ) + addr.insertCategory( categoriesQuery.value( 0 ).toString() ); + } + + // customs + { + TQSqlQuery customsQuery( "select app, name, value from kaddressbook_customs " + "where addressId = '" + addrId + "'" ); + while ( customsQuery.next() ) + addr.insertCustom( customsQuery.value( 0 ).toString(), + customsQuery.value( 1 ).toString(), + customsQuery.value( 2 ).toString()); + } + + addressBook()->insertAddressee( addr ); + } + + return true; +} + +bool ResourceSql::save( Ticket * ) +{ + // we have to delete all entries for this user and reinsert them + TQSqlQuery query( "select addressId from kaddressbook_main_" + mUser ); + + while ( query.next() ) { + TQString addrId = query.value( 0 ).toString(); + TQSqlQuery q; + + q.exec( "DELETE FROM kaddressbook_emails WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_phones WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_addresses WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_categories WHERE addressId = '" + addrId + "'" ); + q.exec( "DELETE FROM kaddressbook_customs WHERE addressId = '" + addrId + "'" ); + + q.exec( "DELETE FROM kaddressbook_main_" + mUser + " WHERE addressId = '" + addrId + "'" ); + } + + // let's start... + AddressBook::Iterator it; + for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { + if ( (*it).resource() != this && (*it).resource() != 0 ) // save only my and new entries + continue; + + TQString uid = (*it).uid(); + + query.exec( "INSERT INTO kaddressbook_main_" + mUser + " VALUES ('" + + (*it).uid() + "','" + + (*it).name() + "','" + + (*it).familyName() + "','" + + (*it).givenName() + "','" + + (*it).additionalName() + "','" + + (*it).prefix() + "','" + + (*it).suffix() + "','" + + (*it).nickName() + "','" + + (*it).birthday().toString( Qt::ISODate ) + "','" + + (*it).mailer() + "','" + + TQString::number( (*it).timeZone().offset() ) + "','" + + TQString::number( (*it).geo().latitude() ) + "','" + + TQString::number( (*it).geo().longitude() ) + "','" + + (*it).title() + "','" + + (*it).role() + "','" + + (*it).organization() + "','" + + (*it).note() + "','" + + (*it).productId() + "','" + + (*it).revision().toString( Qt::ISODate ) + "','" + + (*it).sortString() + "','" + + (*it).url().url() + "')" + ); + + // emails + { + TQStringList emails = (*it).emails(); + TQStringList::ConstIterator it; + bool preferred = true; + for( it = emails.begin(); it != emails.end(); ++it ) { + query.exec("INSERT INTO kaddressbook_emails VALUES ('" + + uid + "','" + + (*it) + "','" + + TQString::number(preferred) + "')"); + preferred = false; + } + } + + // phonenumbers + { + PhoneNumber::List phoneNumberList = (*it).phoneNumbers(); + PhoneNumber::List::ConstIterator it; + for( it = phoneNumberList.begin(); it != phoneNumberList.end(); ++it ) { + query.exec("INSERT INTO kaddressbook_phones VALUES ('" + + uid + "','" + + (*it).number() + "','" + + TQString::number( (*it).type() ) + "')"); + } + } + + // postal addresses + { + Address::List addressList = (*it).addresses(); + Address::List::ConstIterator it; + for( it = addressList.begin(); it != addressList.end(); ++it ) { + query.exec("INSERT INTO kaddressbook_addresses VALUES ('" + + uid + "','" + + (*it).postOfficeBox() + "','" + + (*it).extended() + "','" + + (*it).street() + "','" + + (*it).locality() + "','" + + (*it).region() + "','" + + (*it).postalCode() + "','" + + (*it).country() + "','" + + (*it).label() + "','" + + TQString::number( (*it).type() ) + "')"); + } + } + + // categories + { + TQStringList categories = (*it).categories(); + TQStringList::ConstIterator it; + for( it = categories.begin(); it != categories.end(); ++it ) + query.exec("INSERT INTO kaddressbook_categories VALUES ('" + + uid + "','" + + (*it) + "')"); + } + + // customs + { + TQStringList list = (*it).customs(); + TQStringList::ConstIterator it; + for( it = list.begin(); it != list.end(); ++it ) { + int dashPos = (*it).find( '-' ); + int colonPos = (*it).find( ':' ); + TQString app = (*it).left( dashPos ); + TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 ); + TQString value = (*it).right( (*it).length() - colonPos - 1 ); + + query.exec("INSERT INTO kaddressbook_categories VALUES ('" + + uid + "','" + app + "','" + name + "','" + value + "')"); + } + } + } + + return true; +} + +TQString ResourceSql::identifier() const +{ + return mHost + "_" + mDbName; +} diff --git a/tdeabc/plugins/sql/resourcesql.h b/tdeabc/plugins/sql/resourcesql.h new file mode 100644 index 000000000..770e5b73b --- /dev/null +++ b/tdeabc/plugins/sql/resourcesql.h @@ -0,0 +1,63 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCESQL_H +#define KABC_RESOURCESQL_H + +#include + +#include "addressbook.h" +#include "resource.h" + +class TQSqlDatabase; + +namespace KABC { + +class ResourceSql : public Resource +{ +public: + ResourceSql( AddressBook *ab, const TQString &user, const TQString &password, + const TQString &db, const TQString &host ); + ResourceSql( AddressBook *ab, const TDEConfig * ); + + bool open(); + void close(); + + Ticket *requestSaveTicket(); + + bool load(); + bool save( Ticket * ticket ); + + TQString identifier() const; + +private: + void init(const TQString &user, const TQString &password, + const TQString &db, const TQString &host ); + + TQString mUser; + TQString mPassword; + TQString mDbName; + TQString mHost; + + TQSqlDatabase *mDb; +}; + +} +#endif diff --git a/tdeabc/plugins/sql/resourcesqlconfig.cpp b/tdeabc/plugins/sql/resourcesqlconfig.cpp new file mode 100644 index 000000000..2f5b9d5b7 --- /dev/null +++ b/tdeabc/plugins/sql/resourcesqlconfig.cpp @@ -0,0 +1,95 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include + +#include "resource.h" +#include "resourcesqlconfig.h" + +using namespace KABC; + +ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) + : ResourceConfigWidget( parent, name ) +{ + resize( 290, 170 ); + + TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 ); + + TQLabel *label = new TQLabel( i18n( "Username:" ), this ); + mUser = new KLineEdit( this ); + + mainLayout->addWidget( label, 0, 0 ); + mainLayout->addWidget( mUser, 0, 1 ); + + label = new TQLabel( i18n( "Password:" ), this ); + mPassword = new KLineEdit( this ); + mPassword->setEchoMode( KLineEdit::Password ); + + mainLayout->addWidget( label, 1, 0 ); + mainLayout->addWidget( mPassword, 1, 1 ); + + label = new TQLabel( i18n( "Host:" ), this ); + mHost = new KLineEdit( this ); + + mainLayout->addWidget( label, 2, 0 ); + mainLayout->addWidget( mHost, 2, 1 ); + + label = new TQLabel( i18n( "Port:" ), this ); + TQVBox *box = new TQVBox(this); + mPort = new TQSpinBox(0, 65535, 1, box ); + mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); + mPort->setValue(389); + new TQWidget(box, "dummy"); + + mainLayout->addWidget( label, 3, 0 ); + mainLayout->addWidget( box, 3, 1 ); + + label = new TQLabel( i18n( "Database:" ), this ); + mDbName = new KLineEdit( this ); + + mainLayout->addWidget( label, 4, 0 ); + mainLayout->addWidget( mDbName, 4, 1 ); +} + +void ResourceSqlConfig::loadSettings( TDEConfig *config ) +{ + mUser->setText( config->readEntry( "SqlUser" ) ); + mPassword->setText( KABC::Resource::cryptStr( config->readEntry( "SqlPassword" ) ) ); + mDbName->setText( config->readEntry( "SqlName" ) ); + mHost->setText( config->readEntry( "SqlHost" ) ); + mPort->setValue( config->readNumEntry( "SqlPort" ) ); +} + +void ResourceSqlConfig::saveSettings( TDEConfig *config ) +{ + config->writeEntry( "SqlUser", mUser->text() ); + config->writeEntry( "SqlPassword", KABC::Resource::cryptStr( mPassword->text() ) ); + config->writeEntry( "SqlName", mDbName->text() ); + config->writeEntry( "SqlHost", mHost->text() ); + config->writeEntry( "SqlPort", mPort->value() ); +} + +#include "resourcesqlconfig.moc" diff --git a/tdeabc/plugins/sql/resourcesqlconfig.h b/tdeabc/plugins/sql/resourcesqlconfig.h new file mode 100644 index 000000000..ae2de7d6d --- /dev/null +++ b/tdeabc/plugins/sql/resourcesqlconfig.h @@ -0,0 +1,51 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCESQLCONFIG_H +#define RESOURCESQLCONFIG_H + +#include "resourceconfigwidget.h" + +class KLineEdit; +class TQSpinBox; + +namespace KABC { + +class ResourceSqlConfig : public ResourceConfigWidget +{ + Q_OBJECT + +public: + ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 ); + +public slots: + void loadSettings( TDEConfig *config ); + void saveSettings( TDEConfig *config ); + +private: + KLineEdit* mUser; + KLineEdit* mPassword; + KLineEdit* mDbName; + KLineEdit* mHost; + TQSpinBox* mPort; +}; + +} +#endif diff --git a/tdeabc/plugins/sql/sql.desktop b/tdeabc/plugins/sql/sql.desktop new file mode 100644 index 000000000..4ac553008 --- /dev/null +++ b/tdeabc/plugins/sql/sql.desktop @@ -0,0 +1,10 @@ +[Misc] +Name=SQL +Name[bn]=à¦à¦¸-কিউ-à¦à¦² (SQL) +Name[hi]=à¤à¤¸à¤•à¥à¤¯à¥‚à¤à¤² (SQL) +Name[ss]=I-SQL +Name[te]=à°à°¸à±à°•à±à°¯à±à°Žà°²à± + +[Plugin] +Type=sql +X-TDE-Library=kabc_sql diff --git a/tdeabc/resource.cpp b/tdeabc/resource.cpp new file mode 100644 index 000000000..9613d90b5 --- /dev/null +++ b/tdeabc/resource.cpp @@ -0,0 +1,351 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include "resource.h" + +using namespace KABC; + +Ticket::Ticket( Resource *resource ) + : mResource( resource ) +{ +} + +Ticket::~Ticket() +{ +/* FIXME: avoid cycle deletion + if ( mResource ) + mResource->releaseSaveTicket( this ); +*/ +} + +Resource *Ticket::resource() +{ + return mResource; +} + +struct Resource::Iterator::IteratorData +{ + Addressee::Map::Iterator mIt; +}; + +struct Resource::ConstIterator::ConstIteratorData +{ + Addressee::Map::ConstIterator mIt; +}; + +Resource::Iterator::Iterator() +{ + d = new IteratorData; +} + +Resource::Iterator::Iterator( const Resource::Iterator &i ) +{ + d = new IteratorData; + d->mIt = i.d->mIt; +} + +Resource::Iterator &Resource::Iterator::operator=( const Resource::Iterator &i ) +{ + if ( this == &i ) + return *this; + delete d; + + d = new IteratorData; + d->mIt = i.d->mIt; + return *this; +} + +Resource::Iterator::~Iterator() +{ + delete d; +} + +const Addressee &Resource::Iterator::operator*() const +{ + return d->mIt.data(); +} + +Addressee &Resource::Iterator::operator*() +{ + return d->mIt.data(); +} + +Resource::Iterator &Resource::Iterator::operator++() +{ + (d->mIt)++; + return *this; +} + +Resource::Iterator &Resource::Iterator::operator++( int ) +{ + (d->mIt)++; + return *this; +} + +Resource::Iterator &Resource::Iterator::operator--() +{ + (d->mIt)--; + return *this; +} + +Resource::Iterator &Resource::Iterator::operator--( int ) +{ + (d->mIt)--; + return *this; +} + +bool Resource::Iterator::operator==( const Iterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool Resource::Iterator::operator!=( const Iterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + +Resource::ConstIterator::ConstIterator() +{ + d = new ConstIteratorData; +} + +Resource::ConstIterator::ConstIterator( const Resource::ConstIterator &i ) +{ + d = new ConstIteratorData; + d->mIt = i.d->mIt; +} + +Resource::ConstIterator::ConstIterator( const Resource::Iterator &i ) +{ + d = new ConstIteratorData; + d->mIt = i.d->mIt; +} + +Resource::ConstIterator &Resource::ConstIterator::operator=( const Resource::ConstIterator &i ) +{ + if ( this == &i ) + return *this; + delete d; + + d = new ConstIteratorData; + d->mIt = i.d->mIt; + return *this; +} + +Resource::ConstIterator::~ConstIterator() +{ + delete d; +} + +const Addressee &Resource::ConstIterator::operator*() const +{ + return *(d->mIt); +} + +Resource::ConstIterator &Resource::ConstIterator::operator++() +{ + (d->mIt)++; + return *this; +} + +Resource::ConstIterator &Resource::ConstIterator::operator++( int ) +{ + (d->mIt)++; + return *this; +} + +Resource::ConstIterator &Resource::ConstIterator::operator--() +{ + (d->mIt)--; + return *this; +} + +Resource::ConstIterator &Resource::ConstIterator::operator--( int ) +{ + (d->mIt)--; + return *this; +} + +bool Resource::ConstIterator::operator==( const ConstIterator &it ) +{ + return ( d->mIt == it.d->mIt ); +} + +bool Resource::ConstIterator::operator!=( const ConstIterator &it ) +{ + return ( d->mIt != it.d->mIt ); +} + + +Resource::Resource( const TDEConfig *config ) + : KRES::Resource( config ), mAddressBook( 0 ) +{ +} + +Resource::~Resource() +{ +} + +Resource::Iterator Resource::begin() +{ + Iterator it; + it.d->mIt = mAddrMap.begin(); + + return it; +} + +Resource::ConstIterator Resource::begin() const +{ + ConstIterator it; + it.d->mIt = mAddrMap.constBegin(); + return it; +} + +Resource::Iterator Resource::end() +{ + Iterator it; + it.d->mIt = mAddrMap.end(); + + return it; +} + +Resource::ConstIterator Resource::end() const +{ + ConstIterator it; + it.d->mIt = mAddrMap.constEnd(); + return it; +} + +void Resource::writeConfig( TDEConfig *config ) +{ + KRES::Resource::writeConfig( config ); +} + +void Resource::setAddressBook( AddressBook *ab ) +{ + mAddressBook = ab; +} + +AddressBook *Resource::addressBook() +{ + return mAddressBook; +} + +Ticket *Resource::createTicket( Resource *resource ) +{ + return new Ticket( resource ); +} + +void Resource::insertAddressee( const Addressee &addr ) +{ + mAddrMap.insert( addr.uid(), addr ); +} + +void Resource::removeAddressee( const Addressee &addr ) +{ + mAddrMap.erase( addr.uid() ); +} + +Addressee Resource::findByUid( const TQString &uid ) +{ + Addressee::Map::ConstIterator it = mAddrMap.find( uid ); + + if ( it != mAddrMap.end() ) + return it.data(); + + return Addressee(); +} + +Addressee::List Resource::findByName( const TQString &name ) +{ + Addressee::List results; + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) { + if ( name == (*it).name() ) + results.append( *it ); + } + + return results; +} + +Addressee::List Resource::findByEmail( const TQString &email ) +{ + Addressee::List results; + const TQString lowerEmail = email.lower(); + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) { + const TQStringList mailList = (*it).emails(); + for ( TQStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) { + if ( lowerEmail == (*ite).lower() ) + results.append( *it ); + } + } + + return results; +} + +Addressee::List Resource::findByCategory( const TQString &category ) +{ + Addressee::List results; + + ConstIterator it; + for ( it = begin(); it != end(); ++it ) { + if ( (*it).hasCategory( category) ) { + results.append( *it ); + } + } + + return results; +} + +void Resource::clear() +{ + mAddrMap.clear(); +} + +bool Resource::asyncLoad() +{ + bool ok = load(); + if ( !ok ) + emit loadingError( this, i18n( "Loading resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit loadingFinished( this ); + + return ok; +} + +bool Resource::asyncSave( Ticket *ticket ) { + bool ok = save( ticket ); + if ( !ok ) + emit savingError( this, i18n( "Saving resource '%1' failed!" ) + .arg( resourceName() ) ); + else + emit savingFinished( this ); + + return ok; +} + +#include "resource.moc" diff --git a/tdeabc/resource.h b/tdeabc/resource.h new file mode 100644 index 000000000..0f5167e7b --- /dev/null +++ b/tdeabc/resource.h @@ -0,0 +1,319 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCE_H +#define KABC_RESOURCE_H + +#include + +#include "addressbook.h" +#include "plugin.h" + +namespace KABC { + +/** + * @short Helper class for handling coordinated save of address books. + * + * This class is used as helper class for saving address book. + * @see requestSaveTicket(), save(). + */ +class KABC_EXPORT Ticket +{ + friend class Resource; + + public: + ~Ticket(); + + Resource *resource(); + + private: + Ticket( Resource *resource ); + + Resource *mResource; +}; + +/** + * @internal + */ +class KABC_EXPORT Resource : public KRES::Resource +{ + Q_OBJECT + + public: + + /** + @short Resource Iterator + + This class provides an iterator for resource entries. + By default it points to a TQValueList::Iterator, + but you can reimplement this class to fit your own needs. + */ + class KABC_EXPORT Iterator + { + public: + Iterator(); + Iterator( const Iterator & ); + virtual ~Iterator(); + + virtual Iterator &operator=( const Iterator & ); + virtual const Addressee &operator*() const; + virtual Addressee &operator*(); + virtual Iterator &operator++(); + virtual Iterator &operator++( int ); + virtual Iterator &operator--(); + virtual Iterator &operator--( int ); + virtual bool operator==( const Iterator &it ); + virtual bool operator!=( const Iterator &it ); + + struct IteratorData; + IteratorData *d; + }; + + /** + @short Resource Const Iterator + + This class provides a const iterator for resource entries. + */ + class KABC_EXPORT ConstIterator + { + public: + ConstIterator(); + ConstIterator( const ConstIterator & ); + ConstIterator( const Iterator & ); + virtual ~ConstIterator(); + + virtual ConstIterator &operator=( const ConstIterator & ); + virtual const Addressee &operator*() const ; + virtual ConstIterator &operator++(); + virtual ConstIterator &operator++( int ); + virtual ConstIterator &operator--(); + virtual ConstIterator &operator--( int ); + virtual bool operator==( const ConstIterator &it ); + virtual bool operator!=( const ConstIterator &it ); + + struct ConstIteratorData; + ConstIteratorData *d; + }; + + /** + Constructor. + + @param config The config object where the derived classes can + read out their settings. + */ + Resource( const TDEConfig *config ); + + /** + Destructor. + */ + virtual ~Resource(); + + /** + Returns an iterator pointing to the first addressee in the resource. + This iterator equals end() if the resource is empty. + */ + virtual ConstIterator begin() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + virtual Iterator begin(); + + /** + Returns an iterator pointing to the last addressee in the resource. + This iterator equals begin() if the resource is empty. + */ + virtual ConstIterator end() const; + + /** + This is an overloaded member function, provided for convenience. It + behaves essentially like the above function. + */ + virtual Iterator end(); + + /** + Returns a pointer to the addressbook. + */ + AddressBook *addressBook(); + + /** + Writes the resource specific config to file. + */ + virtual void writeConfig( TDEConfig *config ); + + /** + Request a ticket, you have to pass through save() to + allow locking. The resource has to create its locks + in this function. + */ + virtual Ticket *requestSaveTicket() = 0; + + /** + Releases the ticket previousely requested with requestSaveTicket(). + The resource has to remove its locks in this function. + This function is also responsible for deleting the ticket. + */ + virtual void releaseSaveTicket( Ticket* ) = 0; + + /** + Loads all addressees synchronously. + + @returns Whether the loading was successfully. + */ + virtual bool load() = 0; + + /** + Loads all addressees asyncronously. You have to make sure that either + the loadingFinished() or loadingError() signal is emitted from within + this function. + + The default implementation simply calls the synchronous load. + + @return Whether the synchronous part of loading was successfully. + */ + virtual bool asyncLoad(); + + /** + Insert an addressee into the resource. + */ + virtual void insertAddressee( const Addressee& ); + + /** + Removes an addressee from resource. + */ + virtual void removeAddressee( const Addressee& addr ); + + /** + Saves all addressees synchronously. + + @param ticket You have to release the ticket later with + releaseSaveTicket() explicitely. + @return Whether the saving was successfully. + */ + virtual bool save( Ticket *ticket ) = 0; + + /** + Saves all addressees asynchronously. You have to make sure that either + the savingFinished() or savingError() signal is emitted from within + this function. + + The default implementation simply calls the synchronous save. + + @param ticket You have to release the ticket later with + releaseSaveTicket() explicitely. + @return Whether the saving was successfully. + */ + virtual bool asyncSave( Ticket *ticket ); + + /** + Searches an addressee with the specified unique identifier. + + @param uid The unique identifier you are looking for. + @return The addressee with the specified unique identifier or an + empty addressee. + */ + virtual Addressee findByUid( const TQString &uid ); + + /** + Searches all addressees which match the specified name. + + @param name The name you are looking for. + @return A list of all matching addressees. + */ + virtual Addressee::List findByName( const TQString &name ); + + /** + Searches all addressees which match the specified email address. + + @param email The email address you are looking for. + @return A list of all matching addressees. + */ + virtual Addressee::List findByEmail( const TQString &email ); + + /** + Searches all addressees which belongs to the specified category. + + @param category The category you are looking for. + @return A list of all matching addressees. + */ + virtual Addressee::List findByCategory( const TQString &category ); + + /** + Removes all addressees from the resource. + */ + virtual void clear(); + + /** + @internal + + Sets the address book of the resource. + */ + void setAddressBook( AddressBook* ); + + signals: + /** + This signal is emitted when the resource has finished the loading of all + addressees from the backend to the internal cache. + + @param resource The pointer to the resource which emitted this signal. + */ + void loadingFinished( Resource *resource ); + + /** + This signal is emitted when an error occured during loading the + addressees from the backend to the internal cache. + + @param resource The pointer to the resource which emitted this signal. + @param msg A translated error message. + */ + void loadingError( Resource *resource, const TQString &msg ); + + /** + This signal is emitted when the resource has finished the saving of all + addressees from the internal cache to the backend. + + @param resource The pointer to the resource which emitted this signal. + */ + void savingFinished( Resource *resource ); + + /** + This signal is emitted when an error occured during saving the + addressees from the internal cache to the backend. + + @param resource The pointer to the resource which emitted this signal. + @param msg A translated error message. + */ + void savingError( Resource *resource, const TQString &msg ); + + protected: + Ticket *createTicket( Resource * ); + Addressee::Map mAddrMap; + + private: + AddressBook *mAddressBook; + + class ResourcePrivate; + ResourcePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/resourceselectdialog.cpp b/tdeabc/resourceselectdialog.cpp new file mode 100644 index 000000000..92f770ed4 --- /dev/null +++ b/tdeabc/resourceselectdialog.cpp @@ -0,0 +1,111 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include + +#include "resource.h" +#include "addressbook.h" + +#include "resourceselectdialog.h" + +using namespace KABC; + +ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, const char *name ) + : KDialog( parent, name, true ) +{ + setCaption( i18n( "Resource Selection" ) ); + resize( 300, 200 ); + + TQVBoxLayout *mainLayout = new TQVBoxLayout( this ); + mainLayout->setMargin( marginHint() ); + + TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); + groupBox->setTitle( i18n( "Resources" ) ); + + mResourceId = new TDEListBox( groupBox ); + + mainLayout->addWidget( groupBox ); + + mainLayout->addSpacing( 10 ); + + KButtonBox *buttonBox = new KButtonBox( this ); + + buttonBox->addStretch(); + buttonBox->addButton( KStdGuiItem::ok(), TQT_TQOBJECT(this), TQT_SLOT( accept() ) ); + buttonBox->addButton( KStdGuiItem::cancel(), TQT_TQOBJECT(this), TQT_SLOT( reject() ) ); + buttonBox->layout(); + + mainLayout->addWidget( buttonBox ); + + // setup listbox + uint counter = 0; + TQPtrList list = ab->resources(); + for ( uint i = 0; i < list.count(); ++i ) { + Resource *resource = list.at( i ); + if ( resource && !resource->readOnly() ) { + mResourceMap.insert( counter, resource ); + mResourceId->insertItem( resource->resourceName() ); + counter++; + } + } + + mResourceId->setCurrentItem( 0 ); +} + +Resource *ResourceSelectDialog::resource() +{ + if ( mResourceId->currentItem() != -1 ) + return mResourceMap[ mResourceId->currentItem() ]; + else + return 0; +} + +Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent ) +{ + TQPtrList resources = ab->resources(); + if ( resources.count() == 1 ) return resources.first(); + + Resource *found = 0; + Resource *r = resources.first(); + while( r ) { + if ( !r->readOnly() ) { + if ( found ) { + found = 0; + break; + } else { + found = r; + } + } + r = resources.next(); + } + if ( found ) return found; + + ResourceSelectDialog dlg( ab, parent ); + if ( dlg.exec() == KDialog::Accepted ) return dlg.resource(); + else return 0; +} + +#include "resourceselectdialog.moc" diff --git a/tdeabc/resourceselectdialog.h b/tdeabc/resourceselectdialog.h new file mode 100644 index 000000000..f5f2d6984 --- /dev/null +++ b/tdeabc/resourceselectdialog.h @@ -0,0 +1,57 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_RESOURCESELECTDIALOG_H +#define KABC_RESOURCESELECTDIALOG_H + +#include + +#include +#include + +class TDEListBox; + +namespace KABC { + +class AddressBook; +class Resource; + +/** + This class is @deprecated, use KRES::SelectDialog instead. + */ +class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog +{ + Q_OBJECT + + public: + ResourceSelectDialog( AddressBook *ab, TQWidget *parent = 0, + const char *name = 0); + Resource *resource(); + + static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 ); + + private: + TDEListBox *mResourceId; + TQMap mResourceMap; +}; + +} + +#endif diff --git a/tdeabc/scripts/Makefile.am b/tdeabc/scripts/Makefile.am new file mode 100644 index 000000000..7715fba5c --- /dev/null +++ b/tdeabc/scripts/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = $(srcdir)/makeaddressee \ + $(srcdir)/addressee.src.cpp \ + $(srcdir)/addressee.src.h \ + $(srcdir)/entrylist \ + $(srcdir)/field.src.cpp + diff --git a/tdeabc/scripts/addressee.src.cpp b/tdeabc/scripts/addressee.src.cpp new file mode 100644 index 000000000..7514b4a1d --- /dev/null +++ b/tdeabc/scripts/addressee.src.cpp @@ -0,0 +1,1127 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + Copyright (c) 2003 Carsten Pfeiffer + Copyright (c) 2005 Ingo Kloecker + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include +#include +#include + +#include "addresseehelper.h" +#include "field.h" +#include "resource.h" +#include "sortmode.h" + +#include "addressee.h" + +using namespace KABC; + +static bool matchBinaryPattern( int value, int pattern ); + +template +static bool listEquals( const TQValueList&, const TQValueList& ); +static bool emailsEquals( const TQStringList&, const TQStringList& ); + +KABC::SortMode *Addressee::mSortMode = 0; + +struct Addressee::AddresseeData : public TDEShared +{ + TQString uid; + TQString uri; + --VARIABLES-- + + PhoneNumber::List phoneNumbers; + Address::List addresses; + Key::List keys; + TQStringList emails; + TQStringList categories; + TQStringList custom; + + Resource *resource; + + bool empty :1; + bool changed :1; +}; + +Addressee::AddresseeData* Addressee::shared_null = 0; + +Addressee::AddresseeData* Addressee::makeSharedNull() +{ + Addressee::shared_null = new AddresseeData; + shared_null->_TDEShared_ref(); //just in case (we should add KSD) + shared_null->empty = true; + shared_null->changed = false; + shared_null->resource = 0; + return shared_null; +} + +Addressee::Addressee() +{ + mData = shared_null ? shared_null : makeSharedNull(); +} + +Addressee::~Addressee() +{ +} + +Addressee::Addressee( const Addressee &a ) +{ + mData = a.mData; +} + +Addressee &Addressee::operator=( const Addressee &a ) +{ + if ( this == &a ) + return (*this); + + mData = a.mData; + return (*this); +} + +void Addressee::detach() +{ + if ( mData.data() == shared_null ) { + mData = new AddresseeData; + mData->empty = true; + mData->changed = false; + mData->resource = 0; + mData->uid = TDEApplication::randomString( 10 ); + return; + } else if ( mData.count() == 1 ) return; + + AddresseeData data = *mData; + mData = new AddresseeData( data ); +} + +bool Addressee::operator==( const Addressee &a ) const +{ + if ( uid() != a.uid() ) { + kdDebug(5700) << "uid differs" << endl; + return false; + } + --EQUALSTEST-- + if ( ( mData->url.isValid() || a.mData->url.isValid() ) && + ( mData->url != a.mData->url ) ) { + kdDebug(5700) << "url differs" << endl; + return false; + } + if ( !listEquals( mData->phoneNumbers, a.mData->phoneNumbers ) ) { + kdDebug(5700) << "phoneNumbers differs" << endl; + return false; + } + if ( !listEquals( mData->addresses, a.mData->addresses ) ) { + kdDebug(5700) << "addresses differs" << endl; + return false; + } + if ( !listEquals( mData->keys, a.mData->keys ) ) { + kdDebug(5700) << "keys differs" << endl; + return false; + } + if ( !emailsEquals( mData->emails, a.mData->emails ) ) { + kdDebug(5700) << "emails differs" << endl; + return false; + } + if ( !listEquals( mData->categories, a.mData->categories ) ) { + kdDebug(5700) << "categories differs" << endl; + return false; + } + if ( !listEquals( mData->custom, a.mData->custom ) ) { + kdDebug(5700) << "custom differs" << endl; + return false; + } + + return true; +} + +bool Addressee::operator!=( const Addressee &a ) const +{ + return !( a == *this ); +} + +bool Addressee::isEmpty() const +{ + return mData->empty; +} + +void Addressee::setUid( const TQString &id ) +{ + if ( id == mData->uid ) return; + detach(); + mData->empty = false; + mData->uid = id; +} + +TQString Addressee::uid() const +{ + return mData->uid; +} + +TQString Addressee::uidLabel() +{ + return i18n("Unique Identifier"); +} + +void Addressee::setUri( const TQString &id ) +{ + if ( id == mData->uri ) return; + detach(); + mData->empty = false; + mData->uri = id; +} + +TQString Addressee::uri() const +{ + return mData->uri; +} + +TQString Addressee::uriLabel() +{ + return i18n("Unique Resource Identifier"); +} + +--DEFINITIONS-- + +void Addressee::setNameFromString( const TQString &s ) +{ + TQString str = s; + //remove enclosing quotes from string + if ( str.length() > 1 && s[ 0 ] == '"' && s[ s.length() - 1 ] == '"' ) + str = s.mid( 1, s.length() - 2 ); + + setFormattedName( str ); + setName( str ); + + // clear all name parts + setPrefix( TQString() ); + setGivenName( TQString() ); + setAdditionalName( TQString() ); + setFamilyName( TQString() ); + setSuffix( TQString() ); + + if ( str.isEmpty() ) + return; + + TQString spaceStr = " "; + TQString emptyStr = ""; + AddresseeHelper *helper = AddresseeHelper::self(); + + int i = str.find( ',' ); + if( i < 0 ) { + TQStringList parts = TQStringList::split( spaceStr, str ); + int leftOffset = 0; + int rightOffset = parts.count() - 1; + + TQString suffix; + while ( rightOffset >= 0 ) { + if ( helper->containsSuffix( parts[ rightOffset ] ) ) { + suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); + rightOffset--; + } else + break; + } + setSuffix( suffix ); + + if ( rightOffset < 0 ) + return; + + TQStringList inclusionList; + for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) { + if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) { + inclusionList.prepend( parts[ rightOffset - n ] ); + } else + break; + } + + if ( !inclusionList.isEmpty() ) { + setFamilyName( inclusionList.join( " " ) + spaceStr + parts[ rightOffset ] ); + rightOffset -= inclusionList.count(); + } else { + if ( helper->tradeAsFamilyName() ) + setFamilyName( parts[ rightOffset ] ); + else + setGivenName( parts[ rightOffset ] ); + } + + TQString prefix; + while ( leftOffset < rightOffset ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { + prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } else + break; + } + setPrefix( prefix ); + + if ( leftOffset < rightOffset ) { + setGivenName( parts[ leftOffset ] ); + leftOffset++; + } + + TQString additionalName; + while ( leftOffset < rightOffset ) { + additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } + setAdditionalName( additionalName ); + } else { + TQString part1 = str.left( i ); + TQString part2 = str.mid( i + 1 ); + + TQStringList parts = TQStringList::split( spaceStr, part1 ); + int leftOffset = 0; + int rightOffset = parts.count() - 1; + + if ( parts.count() > 0 ) { + + TQString suffix; + while ( rightOffset >= 0 ) { + if ( helper->containsSuffix( parts[ rightOffset ] ) ) { + suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); + rightOffset--; + } else + break; + } + setSuffix( suffix ); + + if ( rightOffset - 1 >= 0 && helper->containsPrefix( parts[ rightOffset - 1 ].lower() ) ) { + setFamilyName( parts[ rightOffset - 1 ] + spaceStr + parts[ rightOffset ] ); + rightOffset--; + } else + setFamilyName( parts[ rightOffset ] ); + + TQString prefix; + while ( leftOffset < rightOffset ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { + prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } else + break; + } + } else { + setPrefix( "" ); + setFamilyName( "" ); + setSuffix( "" ); + } + + parts = TQStringList::split( spaceStr, part2 ); + + leftOffset = 0; + rightOffset = parts.count(); + + if ( parts.count() > 0 ) { + + TQString prefix; + while ( leftOffset < rightOffset ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { + prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } else + break; + } + setPrefix( prefix ); + + if ( leftOffset < rightOffset ) { + setGivenName( parts[ leftOffset ] ); + leftOffset++; + } + + TQString additionalName; + while ( leftOffset < rightOffset ) { + additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); + leftOffset++; + } + setAdditionalName( additionalName ); + } else { + setGivenName( "" ); + setAdditionalName( "" ); + } + } +} + +TQString Addressee::realName() const +{ + TQString n( formattedName() ); + if ( !n.isEmpty() ) + return n; + + n = assembledName(); + if ( !n.isEmpty() ) + return n; + + n = name(); + if ( !n.isEmpty() ) + return n; + + return organization(); +} + +TQString Addressee::assembledName() const +{ + TQString name = prefix() + " " + givenName() + " " + additionalName() + " " + + familyName() + " " + suffix(); + + return name.simplifyWhiteSpace(); +} + +TQString Addressee::fullEmail( const TQString &email ) const +{ + TQString e; + if ( email.isNull() ) { + e = preferredEmail(); + } else { + e = email; + } + if ( e.isEmpty() ) return TQString(); + + TQString text; + if ( realName().isEmpty() ) + text = e; + else { + TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ); + if ( realName().find( needQuotes ) != -1 ) { + TQString name = realName(); + name.replace( "\"", "\\\"" ); + text = "\"" + name + "\" <" + e + ">"; + } else + text = realName() + " <" + e + ">"; + } + + return text; +} + +void Addressee::insertEmail( const TQString &email, bool preferred ) +{ + if ( email.simplifyWhiteSpace().isEmpty() ) + return; + + detach(); + mData->empty = false; + + TQStringList::Iterator it = mData->emails.find( email ); + + if ( it != mData->emails.end() ) { + if ( !preferred || it == mData->emails.begin() ) return; + mData->emails.remove( it ); + mData->emails.prepend( email ); + } else { + if ( preferred ) { + mData->emails.prepend( email ); + } else { + mData->emails.append( email ); + } + } +} + +void Addressee::removeEmail( const TQString &email ) +{ + detach(); + + TQStringList::Iterator it = mData->emails.find( email ); + if ( it == mData->emails.end() ) return; + + mData->emails.remove( it ); +} + +TQString Addressee::preferredEmail() const +{ + if ( mData->emails.count() == 0 ) return TQString(); + else return mData->emails.first(); +} + +TQStringList Addressee::emails() const +{ + return mData->emails; +} +void Addressee::setEmails( const TQStringList& emails ) { + detach(); + + mData->emails = emails; +} +void Addressee::insertPhoneNumber( const PhoneNumber &phoneNumber ) +{ + detach(); + mData->empty = false; + + PhoneNumber::List::Iterator it; + for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { + if ( (*it).id() == phoneNumber.id() ) { + *it = phoneNumber; + return; + } + } + if ( !phoneNumber.number().simplifyWhiteSpace().isEmpty() ) + mData->phoneNumbers.append( phoneNumber ); +} + +void Addressee::removePhoneNumber( const PhoneNumber &phoneNumber ) +{ + detach(); + + PhoneNumber::List::Iterator it; + for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { + if ( (*it).id() == phoneNumber.id() ) { + mData->phoneNumbers.remove( it ); + return; + } + } +} + +PhoneNumber Addressee::phoneNumber( int type ) const +{ + PhoneNumber phoneNumber( "", type ); + PhoneNumber::List::ConstIterator it; + for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + if ( (*it).type() & PhoneNumber::Pref ) + return (*it); + else if ( phoneNumber.number().isEmpty() ) + phoneNumber = (*it); + } + } + + return phoneNumber; +} + +PhoneNumber::List Addressee::phoneNumbers() const +{ + return mData->phoneNumbers; +} + +PhoneNumber::List Addressee::phoneNumbers( int type ) const +{ + PhoneNumber::List list; + + PhoneNumber::List::ConstIterator it; + for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + list.append( *it ); + } + } + return list; +} + +PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const +{ + PhoneNumber::List::ConstIterator it; + for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { + if ( (*it).id() == id ) { + return *it; + } + } + return PhoneNumber(); +} + +void Addressee::insertKey( const Key &key ) +{ + detach(); + mData->empty = false; + + Key::List::Iterator it; + for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { + if ( (*it).id() == key.id() ) { + *it = key; + return; + } + } + mData->keys.append( key ); +} + +void Addressee::removeKey( const Key &key ) +{ + detach(); + + Key::List::Iterator it; + for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { + if ( (*it).id() == key.id() ) { + mData->keys.remove( key ); + return; + } + } +} + +Key Addressee::key( int type, TQString customTypeString ) const +{ + Key::List::ConstIterator it; + for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { + if ( (*it).type() == type ) { + if ( type == Key::Custom ) { + if ( customTypeString.isEmpty() ) { + return *it; + } else { + if ( (*it).customTypeString() == customTypeString ) + return (*it); + } + } else { + return *it; + } + } + } + return Key( TQString(), type ); +} + +void Addressee::setKeys( const Key::List& list ) +{ + detach(); + mData->keys = list; +} + +Key::List Addressee::keys() const +{ + return mData->keys; +} + +Key::List Addressee::keys( int type, TQString customTypeString ) const +{ + Key::List list; + + Key::List::ConstIterator it; + for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { + if ( (*it).type() == type ) { + if ( type == Key::Custom ) { + if ( customTypeString.isEmpty() ) { + list.append( *it ); + } else { + if ( (*it).customTypeString() == customTypeString ) + list.append( *it ); + } + } else { + list.append( *it ); + } + } + } + return list; +} + +Key Addressee::findKey( const TQString &id ) const +{ + Key::List::ConstIterator it; + for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { + if ( (*it).id() == id ) { + return *it; + } + } + return Key(); +} + +TQString Addressee::asString() const +{ + return "Smith, agent Smith..."; +} + +void Addressee::dump() const +{ + kdDebug(5700) << "Addressee {" << endl; + + kdDebug(5700) << " Uid: '" << uid() << "'" << endl; + + --DEBUG-- + + kdDebug(5700) << " Emails {" << endl; + const TQStringList e = emails(); + TQStringList::ConstIterator it; + for( it = e.begin(); it != e.end(); ++it ) { + kdDebug(5700) << " " << (*it) << endl; + } + kdDebug(5700) << " }" << endl; + + kdDebug(5700) << " PhoneNumbers {" << endl; + const PhoneNumber::List p = phoneNumbers(); + PhoneNumber::List::ConstIterator it2; + for( it2 = p.begin(); it2 != p.end(); ++it2 ) { + kdDebug(5700) << " Type: " << int((*it2).type()) << " Number: " << (*it2).number() << endl; + } + kdDebug(5700) << " }" << endl; + + const Address::List a = addresses(); + Address::List::ConstIterator it3; + for( it3 = a.begin(); it3 != a.end(); ++it3 ) { + (*it3).dump(); + } + + kdDebug(5700) << " Keys {" << endl; + const Key::List k = keys(); + Key::List::ConstIterator it4; + for( it4 = k.begin(); it4 != k.end(); ++it4 ) { + kdDebug(5700) << " Type: " << int((*it4).type()) << + " Key: " << (*it4).textData() << + " CustomString: " << (*it4).customTypeString() << endl; + } + kdDebug(5700) << " }" << endl; + + kdDebug(5700) << "}" << endl; +} + + +void Addressee::insertAddress( const Address &address ) +{ + if ( address.isEmpty() ) + return; + + detach(); + mData->empty = false; + + Address::List::Iterator it; + for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { + if ( (*it).id() == address.id() ) { + *it = address; + return; + } + } + + mData->addresses.append( address ); +} + +void Addressee::removeAddress( const Address &address ) +{ + detach(); + + Address::List::Iterator it; + for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { + if ( (*it).id() == address.id() ) { + mData->addresses.remove( it ); + return; + } + } +} + +Address Addressee::address( int type ) const +{ + Address address( type ); + Address::List::ConstIterator it; + for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + if ( (*it).type() & Address::Pref ) + return (*it); + else if ( address.isEmpty() ) + address = (*it); + } + } + + return address; +} + +Address::List Addressee::addresses() const +{ + return mData->addresses; +} + +Address::List Addressee::addresses( int type ) const +{ + Address::List list; + + Address::List::ConstIterator it; + for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { + if ( matchBinaryPattern( (*it).type(), type ) ) { + list.append( *it ); + } + } + + return list; +} + +Address Addressee::findAddress( const TQString &id ) const +{ + Address::List::ConstIterator it; + for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) { + if ( (*it).id() == id ) { + return *it; + } + } + return Address(); +} + +void Addressee::insertCategory( const TQString &c ) +{ + detach(); + mData->empty = false; + + if ( mData->categories.findIndex( c ) != -1 ) return; + + mData->categories.append( c ); +} + +void Addressee::removeCategory( const TQString &c ) +{ + detach(); + + TQStringList::Iterator it = mData->categories.find( c ); + if ( it == mData->categories.end() ) return; + + mData->categories.remove( it ); +} + +bool Addressee::hasCategory( const TQString &c ) const +{ + return ( mData->categories.findIndex( c ) != -1 ); +} + +void Addressee::setCategories( const TQStringList &c ) +{ + detach(); + mData->empty = false; + + mData->categories = c; +} + +TQStringList Addressee::categories() const +{ + return mData->categories; +} + +void Addressee::insertCustom( const TQString &app, const TQString &name, + const TQString &value ) +{ + if ( value.isEmpty() || name.isEmpty() || app.isEmpty() ) return; + + detach(); + mData->empty = false; + + TQString qualifiedName = app + "-" + name + ":"; + + TQStringList::Iterator it; + for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { + if ( (*it).startsWith( qualifiedName ) ) { + (*it) = qualifiedName + value; + return; + } + } + + mData->custom.append( qualifiedName + value ); +} + +void Addressee::removeCustom( const TQString &app, const TQString &name) +{ + detach(); + + TQString qualifiedName = app + "-" + name + ":"; + + TQStringList::Iterator it; + for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) { + if ( (*it).startsWith( qualifiedName ) ) { + mData->custom.remove( it ); + return; + } + } +} + +TQString Addressee::custom( const TQString &app, const TQString &name ) const +{ + TQString qualifiedName = app + "-" + name + ":"; + TQString value; + + TQStringList::ConstIterator it; + for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) { + if ( (*it).startsWith( qualifiedName ) ) { + value = (*it).mid( (*it).find( ":" ) + 1 ); + break; + } + } + + return value; +} + +void Addressee::setCustoms( const TQStringList &l ) +{ + detach(); + mData->empty = false; + + mData->custom = l; +} + +TQStringList Addressee::customs() const +{ + return mData->custom; +} + +void Addressee::parseEmailAddress( const TQString &rawEmail, TQString &fullName, + TQString &email) +{ + // This is a simplified version of KPIM::splitAddress(). + + fullName = ""; + email = ""; + if ( rawEmail.isEmpty() ) + return; // KPIM::AddressEmpty; + + // The code works on 8-bit strings, so convert the input to UTF-8. + TQCString address = rawEmail.utf8(); + + TQCString displayName; + TQCString addrSpec; + TQCString comment; + + // The following is a primitive parser for a mailbox-list (cf. RFC 2822). + // The purpose is to extract a displayable string from the mailboxes. + // Comments in the addr-spec are not handled. No error checking is done. + + enum { TopLevel, InComment, InAngleAddress } context = TopLevel; + bool inQuotedString = false; + int commentLevel = 0; + bool stop = false; + + for ( char* p = address.data(); *p && !stop; ++p ) { + switch ( context ) { + case TopLevel : { + switch ( *p ) { + case '"' : inQuotedString = !inQuotedString; + displayName += *p; + break; + case '(' : if ( !inQuotedString ) { + context = InComment; + commentLevel = 1; + } + else + displayName += *p; + break; + case '<' : if ( !inQuotedString ) { + context = InAngleAddress; + } + else + displayName += *p; + break; + case '\\' : // quoted character + displayName += *p; + ++p; // skip the '\' + if ( *p ) + displayName += *p; + else + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + break; + case ',' : if ( !inQuotedString ) { + //if ( allowMultipleAddresses ) + // stop = true; + //else + // return KPIM::UnexpectedComma; + goto ABORT_PARSING; + } + else + displayName += *p; + break; + default : displayName += *p; + } + break; + } + case InComment : { + switch ( *p ) { + case '(' : ++commentLevel; + comment += *p; + break; + case ')' : --commentLevel; + if ( commentLevel == 0 ) { + context = TopLevel; + comment += ' '; // separate the text of several comments + } + else + comment += *p; + break; + case '\\' : // quoted character + comment += *p; + ++p; // skip the '\' + if ( *p ) + comment += *p; + else + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + break; + default : comment += *p; + } + break; + } + case InAngleAddress : { + switch ( *p ) { + case '"' : inQuotedString = !inQuotedString; + addrSpec += *p; + break; + case '>' : if ( !inQuotedString ) { + context = TopLevel; + } + else + addrSpec += *p; + break; + case '\\' : // quoted character + addrSpec += *p; + ++p; // skip the '\' + if ( *p ) + addrSpec += *p; + else + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + break; + default : addrSpec += *p; + } + break; + } + } // switch ( context ) + } + +ABORT_PARSING: + displayName = displayName.stripWhiteSpace(); + comment = comment.stripWhiteSpace(); + addrSpec = addrSpec.stripWhiteSpace(); + + fullName = TQString::fromUtf8( displayName ); + email = TQString::fromUtf8( addrSpec ); + + // check for errors + if ( inQuotedString ) + return; // KPIM::UnbalancedQuote; + if ( context == InComment ) + return; // KPIM::UnbalancedParens; + if ( context == InAngleAddress ) + return; // KPIM::UnclosedAngleAddr; + + if ( addrSpec.isEmpty() ) { + if ( displayName.isEmpty() ) + return; // KPIM::NoAddressSpec; + else { + //addrSpec = displayName; + //displayName.truncate( 0 ); + // Address of the form "foo@bar" or "foo@bar (Name)". + email = fullName; + fullName = TQString::fromUtf8( comment ); + } + } + + // Check that we do not have any extra characters on the end of the + // strings + unsigned int len = fullName.length(); + if ( fullName[ 0 ] == '"' && fullName[ len - 1 ] == '"' ) + fullName = fullName.mid( 1, len - 2 ); +} + +void Addressee::setResource( Resource *resource ) +{ + detach(); + mData->resource = resource; +} + +Resource *Addressee::resource() const +{ + return mData->resource; +} + +void Addressee::setChanged( bool value ) +{ + detach(); + mData->changed = value; +} + +bool Addressee::changed() const +{ + return mData->changed; +} + +void Addressee::setSortMode( KABC::SortMode *mode ) +{ + mSortMode = mode; +} + +bool Addressee::operator< ( const Addressee &addr ) +{ + if ( !mSortMode ) + return false; + else + return mSortMode->lesser( *this, addr ); +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Addressee &a ) +{ + if (!a.mData) return s; + + s << a.uid(); + + --STREAMOUT-- + s << a.mData->phoneNumbers; + s << a.mData->addresses; + s << a.mData->emails; + s << a.mData->categories; + s << a.mData->custom; + s << a.mData->keys; + return s; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Addressee &a ) +{ + if (!a.mData) + return s; + + a.detach(); + + s >> a.mData->uid; + + --STREAMIN-- + s >> a.mData->phoneNumbers; + s >> a.mData->addresses; + s >> a.mData->emails; + s >> a.mData->categories; + s >> a.mData->custom; + s >> a.mData->keys; + + a.mData->empty = false; + + return s; +} + +bool matchBinaryPattern( int value, int pattern ) +{ + /** + We want to match all telephonnumbers/addresses which have the bits in the + pattern set. More are allowed. + if pattern == 0 we have a special handling, then we want only those with + exactly no bit set. + */ + if ( pattern == 0 ) + return ( value == 0 ); + else + return ( pattern == ( pattern & value ) ); +} + +template +bool listEquals( const TQValueList &list, const TQValueList &pattern ) +{ + if ( list.count() != pattern.count() ) + return false; + + for ( uint i = 0; i < list.count(); ++i ) + if ( pattern.find( list[ i ] ) == pattern.end() ) + return false; + + return true; +} + +bool emailsEquals( const TQStringList &list, const TQStringList &pattern ) +{ + if ( list.count() != pattern.count() ) + return false; + + if ( list.first() != pattern.first() ) + return false; + + TQStringList::ConstIterator it; + for ( it = list.begin(); it != list.end(); ++it ) + if ( pattern.find( *it ) == pattern.end() ) + return false; + + return true; +} diff --git a/tdeabc/scripts/addressee.src.h b/tdeabc/scripts/addressee.src.h new file mode 100644 index 000000000..9cadfd41e --- /dev/null +++ b/tdeabc/scripts/addressee.src.h @@ -0,0 +1,407 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_ADDRESSEE_H +#define KABC_ADDRESSEE_H + +#include +#include +#include +#include + +#include +#include + +#include "address.h" +#include "agent.h" +#include "geo.h" +#include "key.h" +#include "phonenumber.h" +#include "picture.h" +#include "secrecy.h" +#include "sound.h" +#include "timezone.h" + +namespace KABC { + +class Resource; +class Field; +class SortMode; + +/** + @short address book entry + + This class represents an entry in the address book. + + The data of this class is implicitly shared. You can pass this class by value. + + If you need the name of a field for presenting it to the user you should use + the functions ending in Label(). They return a translated string which can be + used as label for the corresponding field. + + About the name fields: + + givenName() is the first name and familyName() the last name. In some + countries the family name comes first, that's the reason for the + naming. formattedName() is the full name with the correct formatting. + It is used as an override, when the correct formatting can't be generated + from the other name fields automatically. + + realName() returns a fully formatted name(). It uses formattedName, if set, + otherwise it constucts the name from the name fields. As fallback, if + nothing else is set it uses name(). + + name() is the NAME type of RFC2426. It can be used as internal name for the + data enty, but shouldn't be used for displaying the data to the user. + */ +class KABC_EXPORT Addressee +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); + + public: + typedef TQValueList List; + typedef TQMap Map; + + /** + Construct an empty address book entry. + */ + Addressee(); + ~Addressee(); + + Addressee( const Addressee & ); + Addressee &operator=( const Addressee & ); + + bool operator==( const Addressee & ) const; + bool operator!=( const Addressee & ) const; + + /** + Return, if the address book entry is empty. + */ + bool isEmpty() const; + + /** + Set unique identifier. + */ + void setUid( const TQString &uid ); + /** + Return unique identifier. + */ + TQString uid() const; + /** + Return translated label for uid field. + */ + static TQString uidLabel(); + + /** + Set unique resource identifier. + */ + void setUri( const TQString &uid ); + /** + Return unique resource identifier. + */ + TQString uri() const; + /** + Return translated label for uri field. + */ + static TQString uriLabel(); + + --DECLARATIONS-- + /** + Set name fields by parsing the given string and trying to associate the + parts of the string with according fields. This function should probably + be a bit more clever. + */ + void setNameFromString( const TQString & ); + + /** + Return the name of the addressee. This is calculated from all the name + fields. + */ + TQString realName() const; + + /** + Return the name that consists of all name parts. + */ + TQString assembledName() const; + + /** + Return email address including real name. + + @param email Email address to be used to construct the full email string. + If this is TQString::null the preferred email address is used. + */ + TQString fullEmail( const TQString &email=TQString::null ) const; + + /** + Insert an email address. If the email address already exists in this + addressee it is not duplicated. + + @param email Email address + @param preferred Set to true, if this is the preferred email address of + the addressee. + */ + void insertEmail( const TQString &email, bool preferred=false ); + + /** + Remove email address. If the email address doesn't exist, nothing happens. + */ + void removeEmail( const TQString &email ); + + /** + Return preferred email address. This is the first email address or the + last one added with insertEmail() with a set preferred parameter. + */ + TQString preferredEmail() const; + + /** + Return list of all email addresses. + */ + TQStringList emails() const; + + /** + Set the emails to @p list. + The first email address gets the preferred one! + @param list The list of email addresses. + */ + void setEmails( const TQStringList& list); + + /** + Insert a phone number. If a phone number with the same id already exists + in this addressee it is not duplicated. + */ + void insertPhoneNumber( const PhoneNumber &phoneNumber ); + + /** + Remove phone number. If no phone number with the given id exists for this + addresse nothing happens. + */ + void removePhoneNumber( const PhoneNumber &phoneNumber ); + + /** + Return phone number, which matches the given type. + */ + PhoneNumber phoneNumber( int type ) const; + + /** + Return list of all phone numbers. + */ + PhoneNumber::List phoneNumbers() const; + + /** + Return list of phone numbers with a special type. + */ + PhoneNumber::List phoneNumbers( int type ) const; + + /** + Return phone number with the given id. + */ + PhoneNumber findPhoneNumber( const TQString &id ) const; + + /** + Insert a key. If a key with the same id already exists + in this addressee it is not duplicated. + */ + void insertKey( const Key &key ); + + /** + Remove a key. If no key with the given id exists for this + addresse nothing happens. + */ + void removeKey( const Key &key ); + + /** + Return key, which matches the given type. + If @p type == Key::Custom you can specify a string + that should match. If you leave the string empty, the first + key with a custom value is returned. + */ + Key key( int type, TQString customTypeString = TQString::null ) const; + + /** + Return list of all keys. + */ + Key::List keys() const; + + /** + Set the list of keys + @param keys The keys to be set. + */ + void setKeys( const Key::List& keys); + + /** + Return list of keys with a special type. + If @p type == Key::Custom you can specify a string + that should match. If you leave the string empty, all custom + keys will be returned. + */ + Key::List keys( int type, TQString customTypeString = TQString::null ) const; + + /** + Return key with the given id. + */ + Key findKey( const TQString &id ) const; + + /** + Insert an address. If an address with the same id already exists + in this addressee it is not duplicated. + */ + void insertAddress( const Address &address ); + + /** + Remove address. If no address with the given id exists for this + addresse nothing happens. + */ + void removeAddress( const Address &address ); + + /** + Return address, which matches the given type. + */ + Address address( int type ) const; + + /** + Return list of all addresses. + */ + Address::List addresses() const; + + /** + Return list of addresses with a special type. + */ + Address::List addresses( int type ) const; + + /** + Return address with the given id. + */ + Address findAddress( const TQString &id ) const; + + /** + Insert category. If the category already exists it is not duplicated. + */ + void insertCategory( const TQString & ); + + /** + Remove category. + */ + void removeCategory( const TQString & ); + + /** + Return, if addressee has the given category. + */ + bool hasCategory( const TQString & ) const; + + /** + Set categories to given value. + */ + void setCategories( const TQStringList & ); + + /** + Return list of all set categories. + */ + TQStringList categories() const; + + /** + Insert custom entry. The entry is identified by the name of the inserting + application and a unique name. If an entry with the given app and name + already exists its value is replaced with the new given value. + + An empty value isn't allowed (nothing happens if this is called with + any of the three arguments being empty) + */ + void insertCustom( const TQString &app, const TQString &name, + const TQString &value ); + + /** + Remove custom entry. + */ + void removeCustom( const TQString &app, const TQString &name ); + + /** + Return value of custom entry, identified by app and entry name. + */ + TQString custom( const TQString &app, const TQString &name ) const; + + /** + Set all custom entries. + */ + void setCustoms( const TQStringList & ); + + /** + Return list of all custom entries. + */ + TQStringList customs() const; + + /** + Parse full email address. The result is given back in fullName and email. + */ + static void parseEmailAddress( const TQString &rawEmail, TQString &fullName, + TQString &email ); + + /** + Debug output. + */ + void dump() const; + + /** + Returns string representation of the addressee. + */ + TQString asString() const; + + /** + Set resource where the addressee is from. + */ + void setResource( Resource *resource ); + + /** + Return pointer to resource. + */ + Resource *resource() const; + + /** + Mark addressee as changed. + */ + void setChanged( bool value ); + + /** + Return whether the addressee is changed. + */ + bool changed() const; + + static void setSortMode( KABC::SortMode *mode ); + + bool operator< ( const Addressee &addr ); + + private: + void detach(); + + struct AddresseeData; + mutable TDESharedPtr mData; + + private: + static AddresseeData* shared_null; + static AddresseeData* makeSharedNull(); + static KABC::SortMode *mSortMode; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & ); + +} + +#endif diff --git a/tdeabc/scripts/createisomap.pl b/tdeabc/scripts/createisomap.pl new file mode 100755 index 000000000..897cd4896 --- /dev/null +++ b/tdeabc/scripts/createisomap.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl +# +# Create a translation table countryname->iso-code from the entry.desktop +# files in tdebase/l10n/*/ +# +# USAGE EXAMPLE: +# ./createisomap.pl $TDEDIR/share/locale/l10n > countrytransl.map +# +# Don't laugh at me. I put this together with an old perl book, perl +# being a language I've never used before. + +@entries = <$ARGV[0]/*/entry.desktop>; +chomp @entries; +foreach $entry (@entries) { + local ( $entryiso, @entryfile, @mappings ); + # print "--> $entry\n"; + $entryiso = $entry; + $entryiso =~ s/$ARGV[0]\///; + $entryiso =~ s/\/entry\.desktop//; + # print " $entryiso\n"; + open (IN, $entry); + @entryfile = ; + close IN; + chomp @entryfile; + foreach $entryfileline (@entryfile) { + if ( $entryfileline =~ /^Name.*=(.*)$/ ) { + # push (@mappings, $1 . "\t" . $entryiso ); + print "$1\t$entryiso\n"; + } + } +} + +# add some convenience entries which aren't part of the entry.desktop files + +print "Czech Republic\tcz\n"; diff --git a/tdeabc/scripts/entrylist b/tdeabc/scripts/entrylist new file mode 100644 index 000000000..87c342a06 --- /dev/null +++ b/tdeabc/scripts/entrylist @@ -0,0 +1,82 @@ +# This file describes the fields of an address book entry. +# +# The following comma-separated fields are used: +# +# Control: A generates accessor functions. +# L generates a static function for returning a tranlsated label +# F generates a Field id and object for generic field handling +# E generate an equality test in Addressee::operator==(). +# Field Name : A descriptive name which is shown to the user. +# Comment : A comment helping translators to understand the field name +# Type : C++ type of field. +# Identifier : A string used in code as variable name etc. +# Field Category : Categories the field belongs to (see Field::FieldCategory). +# Output function: Function used to convert type to string for debug output (optional) + +ALE,name,,TQString,name + +ALFE,formatted name,,TQString,formattedName,Frequent + +ALFE,family name,,TQString,familyName,Frequent +ALFE,given name,,TQString,givenName,Frequent +ALFE,additional names,,TQString,additionalName +ALFE,honorific prefixes,,TQString,prefix +ALFE,honorific suffixes,,TQString,suffix + +ALFE,nick name,,TQString,nickName,Personal + +ALFE,birthday,,TQDateTime,birthday,Personal,.toString() + +#Address address +LF,home address street,,TQString,homeAddressStreet,Address|Personal +LF,home address city,,TQString,homeAddressLocality,Address|Personal +LF,home address state,,TQString,homeAddressRegion,Address|Personal +LF,home address zip code,,TQString,homeAddressPostalCode,Address|Personal +LF,home address country,,TQString,homeAddressCountry,Address|Personal +LF,home address label,,TQString,homeAddressLabel,Address|Personal + +LF,business address street,,TQString,businessAddressStreet,Address|Organization +LF,business address city,,TQString,businessAddressLocality,Address|Organization +LF,business address state,,TQString,businessAddressRegion,Address|Organization +LF,business address zip code,,TQString,businessAddressPostalCode,Address|Organization +LF,business address country,,TQString,businessAddressCountry,Address|Organization +LF,business address label,,TQString,businessAddressLabel,Address|Organization + +#phoneNumbers +LF,home phone,,TQString,homePhone,Personal|Frequent +LF,business phone,,TQString,businessPhone,Organization|Frequent +LF,mobile phone,,TQString,mobilePhone,Frequent +LF,home fax,,TQString,homeFax +LF,business fax,,TQString,businessFax +LF,car phone,,TQString,carPhone +LF,ISDN,,TQString,isdn +LF,pager,,TQString,pager + +#emails +LF,email address,,TQString,email,Email|Frequent + +ALFE,mail client,,TQString,mailer,Email + +ALE,time zone,,TimeZone,timeZone,,.asString() +ALE,geographic position,,Geo,geo,,.asString() + +ALFE,title,person,TQString,title,Organization +ALFE,role,person in organization,TQString,role,Organization +ALFE,organization,,TQString,organization,Organization +ALFE,department,,TQString,department,Organization + +ALFE,note,,TQString,note + +ALE,product identifier,,TQString,productId +ALE,revision date,,TQDateTime,revision,,.toString() + +ALE,sort string,,TQString,sortString + +ALF,homepage,,KURL,url,,.url() + +ALE,security class,,Secrecy,secrecy,,.asString() + +ALE,logo,,Picture,logo,,.asString() +ALE,photo,,Picture,photo,,.asString() +ALE,sound,,Sound,sound,,.asString() +ALE,agent,,Agent,agent,,.asString() diff --git a/tdeabc/scripts/field.src.cpp b/tdeabc/scripts/field.src.cpp new file mode 100644 index 000000000..bec318880 --- /dev/null +++ b/tdeabc/scripts/field.src.cpp @@ -0,0 +1,512 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "field.h" +#include "address.h" + +using namespace KABC; + +class Field::FieldImpl +{ + public: + FieldImpl( int fieldId, int category = 0, + const TQString &label = TQString::null, + const TQString &key = TQString::null, + const TQString &app = TQString::null ) + : mFieldId( fieldId ), mCategory( category ), mLabel( label ), + mKey( key ), mApp( app ) {} + + enum FieldId + { + CustomField, + --ENUMS-- + }; + + int fieldId() { return mFieldId; } + int category() { return mCategory; } + + TQString label() { return mLabel; } + TQString key() { return mKey; } + TQString app() { return mApp; } + + private: + int mFieldId; + int mCategory; + + TQString mLabel; + TQString mKey; + TQString mApp; +}; + + +Field::List Field::mAllFields; +Field::List Field::mDefaultFields; +Field::List Field::mCustomFields; + + +Field::Field( FieldImpl *impl ) +{ + mImpl = impl; +} + +Field::~Field() +{ + delete mImpl; +} + +TQString Field::label() +{ + switch ( mImpl->fieldId() ) { + --CASELABEL-- + case FieldImpl::CustomField: + return mImpl->label(); + default: + return i18n("Unknown Field"); + } +} + +int Field::category() +{ + return mImpl->category(); +} + +TQString Field::categoryLabel( int category ) +{ + switch ( category ) { + case All: + return i18n("All"); + case Frequent: + return i18n("Frequent"); + case Address: + return i18n("street/postal","Address"); + case Email: + return i18n("Email"); + case Personal: + return i18n("Personal"); + case Organization: + return i18n("Organization"); + case CustomCategory: + return i18n("Custom"); + default: + return i18n("Undefined"); + } +} + +TQString Field::value( const KABC::Addressee &a ) +{ + switch ( mImpl->fieldId() ) { + --CASEVALUE-- + case FieldImpl::Email: + return a.preferredEmail(); + case FieldImpl::Birthday: + if ( a.birthday().isValid() ) + return a.birthday().date().toString( Qt::ISODate ); + else + return TQString::null; + case FieldImpl::Url: + return a.url().prettyURL(); + case FieldImpl::HomePhone: + { + PhoneNumber::List::ConstIterator it; + + { + // check for preferred number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home | PhoneNumber::Pref ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) + return (*it).number(); + } + + { + // check for normal home number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Home ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home ) + return (*it).number(); + } + + return TQString::null; + } + case FieldImpl::BusinessPhone: + { + PhoneNumber::List::ConstIterator it; + + { + // check for preferred number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work | PhoneNumber::Pref ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) + return (*it).number(); + } + + { + // check for normal work number + const PhoneNumber::List list = a.phoneNumbers( PhoneNumber::Work ); + for ( it = list.begin(); it != list.end(); ++it ) + if ( ((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work ) + return (*it).number(); + } + + return TQString::null; + } + case FieldImpl::MobilePhone: + return a.phoneNumber( PhoneNumber::Cell ).number(); + case FieldImpl::HomeFax: + return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); + case FieldImpl::BusinessFax: + return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); + case FieldImpl::CarPhone: + return a.phoneNumber( PhoneNumber::Car ).number(); + case FieldImpl::Isdn: + return a.phoneNumber( PhoneNumber::Isdn ).number(); + case FieldImpl::Pager: + return a.phoneNumber( PhoneNumber::Pager ).number(); + case FieldImpl::HomeAddressStreet: + return a.address( Address::Home ).street(); + case FieldImpl::HomeAddressLocality: + return a.address( Address::Home ).locality(); + case FieldImpl::HomeAddressRegion: + return a.address( Address::Home ).region(); + case FieldImpl::HomeAddressPostalCode: + return a.address( Address::Home ).postalCode(); + case FieldImpl::HomeAddressCountry: + return a.address( Address::Home ).country(); + case FieldImpl::HomeAddressLabel: + return a.address( Address::Home ).label(); + case FieldImpl::BusinessAddressStreet: + return a.address( Address::Work ).street(); + case FieldImpl::BusinessAddressLocality: + return a.address( Address::Work ).locality(); + case FieldImpl::BusinessAddressRegion: + return a.address( Address::Work ).region(); + case FieldImpl::BusinessAddressPostalCode: + return a.address( Address::Work ).postalCode(); + case FieldImpl::BusinessAddressCountry: + return a.address( Address::Work ).country(); + case FieldImpl::BusinessAddressLabel: + return a.address( Address::Work ).label(); + case FieldImpl::CustomField: + return a.custom( mImpl->app(), mImpl->key() ); + default: + return TQString::null; + } +} + +bool Field::setValue( KABC::Addressee &a, const TQString &value ) +{ + switch ( mImpl->fieldId() ) { + --CASESETVALUE-- + case FieldImpl::MobilePhone: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Cell ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::HomeFax: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::BusinessFax: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::CarPhone: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Car ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::Isdn: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Isdn ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::Pager: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Pager ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::HomeAddressStreet: + { + KABC::Address address = a.address( Address::Home ); + address.setStreet( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressLocality: + { + KABC::Address address = a.address( Address::Home ); + address.setLocality( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressRegion: + { + KABC::Address address = a.address( Address::Home ); + address.setRegion( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressPostalCode: + { + KABC::Address address = a.address( Address::Home ); + address.setPostalCode( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressCountry: + { + KABC::Address address = a.address( Address::Home ); + address.setCountry( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressLabel: + { + KABC::Address address = a.address( Address::Home ); + address.setLabel( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressStreet: + { + KABC::Address address = a.address( Address::Work ); + address.setStreet( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressLocality: + { + KABC::Address address = a.address( Address::Work ); + address.setLocality( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressRegion: + { + KABC::Address address = a.address( Address::Work ); + address.setRegion( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressPostalCode: + { + KABC::Address address = a.address( Address::Work ); + address.setPostalCode( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressCountry: + { + KABC::Address address = a.address( Address::Work ); + address.setCountry( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressLabel: + { + KABC::Address address = a.address( Address::Work ); + address.setLabel( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::Birthday: + a.setBirthday( TQT_TQDATE_OBJECT(TQDate::fromString( value, Qt::ISODate )) ); + return true; + case FieldImpl::CustomField: + a.insertCustom( mImpl->app(), mImpl->key(), value ); + return true; + default: + return false; + } +} + +TQString Field::sortKey( const KABC::Addressee &a ) +{ + switch ( mImpl->fieldId() ) { + --CASEVALUE-- + case FieldImpl::Birthday: + if ( a.birthday().isValid() ) { + TQDate date = TQT_TQDATE_OBJECT(a.birthday().date()); + TQString key; + key.sprintf( "%02d-%02d", date.month(), date.day() ); + return key; + } else + return TQString( "00-00" ); + default: + return value( a ).lower(); + } +} + +bool Field::isCustom() +{ + return mImpl->fieldId() == FieldImpl::CustomField; +} + +Field::List Field::allFields() +{ + if ( mAllFields.isEmpty() ) { + --CREATEFIELDS-- + } + + return mAllFields; +} + +Field::List Field::defaultFields() +{ + if ( mDefaultFields.isEmpty() ) { + createDefaultField( FieldImpl::FormattedName ); + createDefaultField( FieldImpl::Email ); + } + + return mDefaultFields; +} + +void Field::createField( int id, int category ) +{ + mAllFields.append( new Field( new FieldImpl( id, category ) ) ); +} + +void Field::createDefaultField( int id, int category ) +{ + mDefaultFields.append( new Field( new FieldImpl( id, category ) ) ); +} + +void Field::deleteFields() +{ + Field::List::ConstIterator it; + + for ( it = mAllFields.constBegin(); it != mAllFields.constEnd(); ++it ) { + delete (*it); + } + mAllFields.clear(); + + for ( it = mDefaultFields.constBegin(); it != mDefaultFields.constEnd(); ++it ) { + delete (*it); + } + mDefaultFields.clear(); + + for ( it = mCustomFields.constBegin(); it != mCustomFields.constEnd(); ++it ) { + delete (*it); + } + mCustomFields.clear(); +} + +void Field::saveFields( const TQString &identifier, + const Field::List &fields ) +{ + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); + + saveFields( cfg, identifier, fields ); +} + +void Field::saveFields( TDEConfig *cfg, const TQString &identifier, + const Field::List &fields ) +{ + TQValueList fieldIds; + + int custom = 0; + Field::List::ConstIterator it; + for( it = fields.begin(); it != fields.end(); ++it ) { + fieldIds.append( (*it)->mImpl->fieldId() ); + if( (*it)->isCustom() ) { + TQStringList customEntry; + customEntry << (*it)->mImpl->label(); + customEntry << (*it)->mImpl->key(); + customEntry << (*it)->mImpl->app(); + cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" + + TQString::number( custom++ ), customEntry ); + } + } + + cfg->writeEntry( identifier, fieldIds ); +} + +Field::List Field::restoreFields( const TQString &identifier ) +{ + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); + + return restoreFields( cfg, identifier ); +} + +Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier ) +{ + const TQValueList fieldIds = cfg->readIntListEntry( identifier ); + + Field::List fields; + + int custom = 0; + TQValueList::ConstIterator it; + for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { + FieldImpl *f = 0; + if ( (*it) == FieldImpl::CustomField ) { + TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" + + identifier + "_" + + TQString::number( custom++ ) ); + f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ], + customEntry[ 1 ], customEntry[ 2 ] ); + } else { + f = new FieldImpl( *it ); + } + fields.append( new Field( f ) ); + } + + return fields; +} + +bool Field::equals( Field *field ) +{ + bool sameId = ( mImpl->fieldId() == field->mImpl->fieldId() ); + + if ( !sameId ) return false; + + if ( mImpl->fieldId() != FieldImpl::CustomField ) return true; + + return mImpl->key() == field->mImpl->key(); +} + +Field *Field::createCustomField( const TQString &label, int category, + const TQString &key, const TQString &app ) +{ + Field *field = new Field( new FieldImpl( FieldImpl::CustomField, + category | CustomCategory, + label, key, app ) ); + mCustomFields.append( field ); + + return field; +} diff --git a/tdeabc/scripts/makeaddressee b/tdeabc/scripts/makeaddressee new file mode 100755 index 000000000..fa955b0bf --- /dev/null +++ b/tdeabc/scripts/makeaddressee @@ -0,0 +1,215 @@ +#!/usr/bin/perl + +my $srcdir; +$srcdir = `dirname $0` || die "Can't determine \$srcdir."; +chomp $srcdir; + +if (!open( ENTRIES, "$srcdir/entrylist" ) ) { + print "Can't open $srcdir/entrylist\n"; + exit 1; +} + + while() { + if (/^#/) { next; } + chop; + @entries = split /,/; + if (!/^.+,(\w+),(\w+)/) { next; } + push @entryCtrl, @entries[0]; + push @entryRealNames, @entries[1]; + push @entryComments, @entries[2]; + push @entryTypes, @entries[3]; + push @entryNames, @entries[4]; + push @entryCategory, @entries[5]; + push @entryDebug, @entries[6]; + } + +close ENTRIES; + +if (!open( H_IN, "$srcdir/addressee.src.h" ) ) { + print "Can't open $srcdir/addressee.src.h\n"; + exit 1; +} +if (!open( H_OUT, ">../addressee.h" ) ) { + print "Can't open addressee.h\n"; + exit 1; +} + print H_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; + + while( ) { + if (/--DECLARATIONS--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print H_OUT " /**\n"; + print H_OUT " Set $entryRealNames[$i].\n"; + print H_OUT " */\n"; + print H_OUT " void set" . ucfirst($entryNames[$i]); + print H_OUT "( const $entryTypes[$i] &$entryNames[$i] );\n"; + + print H_OUT " /**\n"; + print H_OUT " Return $entryRealNames[$i].\n"; + print H_OUT " */\n"; + print H_OUT " $entryTypes[$i] $entryNames[$i]() const;\n"; + } + + if ( $entryCtrl[$i] !~ /L/ ) { next; } + print H_OUT " /**\n"; + print H_OUT " Return translated label for $entryNames[$i] field.\n"; + print H_OUT " */\n"; + print H_OUT " static TQString $entryNames[$i]Label();\n\n"; + } + } else { + print H_OUT; + } + } + +close H_OUT; +close H_IN; + +if (!open( CPP_IN, "$srcdir/addressee.src.cpp" ) ) { + print "Can't open $srcdir/addressee.src.cpp\n"; + exit 1; +} +if (!open( CPP_OUT, ">../addressee.cpp" ) ) { + print "Can't open addressee.cpp\n"; + exit 1; +} + print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; + + while( ) { + if (/--VARIABLES--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + print CPP_OUT " $entryTypes[$i] $entryNames[$i];\n"; + } + } elsif (/--DEFINITIONS--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print CPP_OUT "void Addressee::set" . ucfirst($entryNames[$i]); + print CPP_OUT "( const $entryTypes[$i] &$entryNames[$i] )\n{\n"; + print CPP_OUT " if ( $entryNames[$i] == mData->$entryNames[$i] ) return;\n"; + print CPP_OUT " detach();\n mData->empty = false;\n"; + print CPP_OUT " mData->$entryNames[$i] = $entryNames[$i];\n}\n\n"; + + print CPP_OUT "$entryTypes[$i] Addressee::$entryNames[$i]() const\n{\n"; + print CPP_OUT " return mData->$entryNames[$i];\n}\n\n"; + } + + if ( $entryCtrl[$i] !~ /L/ ) { next; } + @labelwords = split ' ', $entryRealNames[$i]; + for( $j=0; $j < @labelwords; ++$j ) { + $labelwords[$j] = ucfirst $labelwords[$j]; + } + $label = join ' ', @labelwords; + print CPP_OUT "TQString Addressee::$entryNames[$i]Label()\n{\n"; + if ( $entryComments[$i] ) { + print CPP_OUT " return i18n(\"$entryComments[$i]\",\"$label\");\n"; + } else { + print CPP_OUT " return i18n(\"$label\");\n"; + } + print CPP_OUT "}\n\n\n"; + } + } elsif (/--EQUALSTEST--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /E/ ) { + if ( $entryNames[$i] !~ "revision" ) { + if ( $entryTypes[$i] =~ "TQString" ) { + print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] &&\n"; + print CPP_OUT " !( mData->$entryNames[$i].isEmpty() && a.mData->$entryNames[$i].isEmpty() ) ) {\n"; + print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; + print CPP_OUT " return false;\n"; + print CPP_OUT " }\n"; + } else { + print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] ) {\n"; + print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; + print CPP_OUT " return false;\n"; + print CPP_OUT " }\n"; + } + } + } + } + } elsif (/--STREAMOUT--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print CPP_OUT " s << a.mData->$entryNames[$i];\n"; + } + } + } elsif (/--STREAMIN--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] =~ /A/ ) { + print CPP_OUT " s >> a.mData->$entryNames[$i];\n"; + } + } + } elsif (/--DEBUG--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + print CPP_OUT " kdDebug(5700) << \" " . ucfirst($entryNames[$i]); + print CPP_OUT ": '\" << $entryNames[$i]()$entryDebug[$i] << \"'\" << endl;\n"; + } + } else { + print CPP_OUT; + } + } + +close CPP_OUT; +close CPP_IN; + +if (!open( CPP_IN, "$srcdir/field.src.cpp" ) ) { + print "Can't open $srcdir/field.src.cpp\n"; + exit 1; +} +if (!open( CPP_OUT, ">../field.cpp" ) ) { + print "Can't open field.cpp\n"; + exit 1; +} + print CPP_OUT "/*** Warning! This file has been generated by the script makeaddressee ***/\n"; + + while( ) { + if (/--ENUMS--/) { + $first = 1; + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $first ) { $first = 0; } + else { print CPP_OUT ",\n"; } + print CPP_OUT " " . ucfirst($entryNames[$i]); + } + print CPP_OUT "\n"; + } elsif (/--CASELABEL--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $entryCtrl[$i] !~ /L/ ) { next; } + print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; + print CPP_OUT " return Addressee::$entryNames[$i]Label();\n"; + } + } elsif (/--CASEVALUE--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $entryTypes[$i] ne "TQString" ) { next; } + print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; + print CPP_OUT " return a.$entryNames[$i]();\n"; + } + } elsif (/--CASESETVALUE--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /A/ ) { next; } + if ( $entryCtrl[$i] !~ /F/ ) { next; } + if ( $entryTypes[$i] ne "TQString" ) { next; } + print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; + print CPP_OUT " a.set" . ucfirst($entryNames[$i]) . "( value );\n"; + print CPP_OUT " return true;\n"; + } + } elsif (/--CREATEFIELDS--/) { + for( $i=0; $i<@entryNames; ++$i ) { + if ( $entryCtrl[$i] !~ /F/ ) { next; } + print CPP_OUT " createField( FieldImpl::" . ucfirst($entryNames[$i]); + if ( $entryCategory[$i] ) { + print CPP_OUT ", $entryCategory[$i]"; + } + print CPP_OUT " );\n"; + } + } else { + print CPP_OUT; + } + } + +close CPP_OUT; +close CPP_IN; diff --git a/tdeabc/secrecy.cpp b/tdeabc/secrecy.cpp new file mode 100644 index 000000000..2725612bc --- /dev/null +++ b/tdeabc/secrecy.cpp @@ -0,0 +1,100 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "secrecy.h" + +using namespace KABC; + +Secrecy::Secrecy( int type ) + : mType( type ) +{ +} + +bool Secrecy::operator==( const Secrecy &s ) const +{ + return ( mType == s.mType ); +} + +bool Secrecy::operator!=( const Secrecy &s ) const +{ + return !( *this == s ); +} + +bool Secrecy::isValid() const +{ + return mType != Invalid; +} + +void Secrecy::setType( int type ) +{ + mType = type; +} + +int Secrecy::type() const +{ + return mType; +} + +Secrecy::TypeList Secrecy::typeList() +{ + static TypeList list; + + if ( list.isEmpty() ) + list << Public << Private << Confidential; + + return list; +} + +TQString Secrecy::typeLabel( int type ) +{ + switch ( type ) { + case Public: + return i18n( "Public" ); + break; + case Private: + return i18n( "Private" ); + break; + case Confidential: + return i18n( "Confidential" ); + break; + default: + return i18n( "Unknown type" ); + break; + } +} + +TQString Secrecy::asString() const +{ + return typeLabel( mType ); +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Secrecy &secrecy ) +{ + return s << secrecy.mType; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Secrecy &secrecy ) +{ + s >> secrecy.mType; + + return s; +} diff --git a/tdeabc/secrecy.h b/tdeabc/secrecy.h new file mode 100644 index 000000000..5cc60b11d --- /dev/null +++ b/tdeabc/secrecy.h @@ -0,0 +1,100 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_SECRECY_H +#define KABC_SECRECY_H + +#include + +#include + +namespace KABC { + +class KABC_EXPORT Secrecy +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Secrecy & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Secrecy & ); + +public: + typedef TQValueList TypeList; + + /** + * Secrecy types + * + * @li Public - for public access + * @li Private - only private access + * @li Confidential - access for confidential persons + */ + enum Types { + Public, + Private, + Confidential, + Invalid + }; + + /** + * Constructor. + * + * @param type The secrecy type, see Types. + */ + Secrecy( int type = Invalid ); + + bool operator==( const Secrecy & ) const; + bool operator!=( const Secrecy & ) const; + + /** + Returns if the Secrecy object has a valid value. + */ + bool isValid() const; + + /** + * Sets the type, see Types. + */ + void setType( int type ); + + /** + * Returns the type, see Types. + */ + int type() const; + + /** + * Returns a list of all available secrecy types. + */ + static TypeList typeList(); + + /** + * Returns a translated label for a given secrecy type. + */ + static TQString typeLabel( int type ); + + /** + * For debug. + */ + TQString asString() const; + +private: + int mType; +}; + +KABC_EXPORT TQDataStream& operator<<( TQDataStream &s, const Secrecy &secrecy ); +KABC_EXPORT TQDataStream& operator>>( TQDataStream &s, Secrecy &secrecy ); + +} +#endif diff --git a/tdeabc/sortmode.cpp b/tdeabc/sortmode.cpp new file mode 100644 index 000000000..efb4a3919 --- /dev/null +++ b/tdeabc/sortmode.cpp @@ -0,0 +1,79 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "sortmode.h" + +using namespace KABC; + +NameSortMode::NameSortMode() + : mNameType( FormattedName ), mAscendingOrder( true ), d( 0 ) +{ + mNameType = FormattedName; +} + +NameSortMode::NameSortMode( NameType type, bool ascending ) + : mNameType( type ), mAscendingOrder( ascending ), d( 0 ) +{ +} + +bool NameSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const +{ + bool lesser = false; + + switch ( mNameType ) { + case FormattedName: + lesser = TQString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0; + break; + case FamilyName: + lesser = TQString::localeAwareCompare( first.familyName(), second.familyName() ) < 0; + break; + case GivenName: + lesser = TQString::localeAwareCompare( first.givenName(), second.givenName() ) < 0; + break; + default: + lesser = false; + break; + } + + if ( !mAscendingOrder ) + lesser = !lesser; + + return lesser; +} + +FieldSortMode::FieldSortMode( KABC::Field *field, bool ascending ) + : mField( field ), mAscendingOrder( ascending ), d( 0 ) +{ +} + +bool FieldSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const +{ + if ( !mField ) + return false; + else { + bool lesser = TQString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0; + if ( !mAscendingOrder ) + lesser = !lesser; + + return lesser; + } +} diff --git a/tdeabc/sortmode.h b/tdeabc/sortmode.h new file mode 100644 index 000000000..f02662b7d --- /dev/null +++ b/tdeabc/sortmode.h @@ -0,0 +1,114 @@ +/* + This file is part of libkabc. + Copyright (c) 2004 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_SORTMODE_H +#define KABC_SORTMODE_H + +#include + +#include + +namespace KABC { + +/** + @short Sort method for sorting an addressee list. + + This interface should be reimplemented by classes which shall act as + SortModes for KABC::AddresseeList. +*/ +class KABC_EXPORT SortMode +{ + public: + /** + Reimplement this method and return whether the first contact is 'smaller' + than the second. + */ + virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const = 0; +}; + +class KABC_EXPORT NameSortMode : public SortMode +{ + public: + enum NameType + { + FormattedName, + FamilyName, + GivenName + }; + + /** + Constructor. + + Creates a NameSortMethod with FormattedName as name type set. + */ + NameSortMode(); + + /** + Constructor. + + Creates a NameSortMethod with the specified name type. + + @param type The name type. + @param ascending true for ascending sort, false for descending. + */ + NameSortMode( NameType type, bool ascending = true ); + + /** + Returns whether the first contact is 'smaller' then the second. + */ + virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; + + private: + NameType mNameType; + bool mAscendingOrder; + + class NameSortModePrivate; + NameSortModePrivate *d; +}; + +class KABC_EXPORT FieldSortMode : public SortMode +{ + public: + /** + Constructor. + + Creates a FieldSortMethod with the specified field. + + @param field The field. + @param ascending true for ascending sort, false for descending. + */ + FieldSortMode( KABC::Field *field, bool ascending = true ); + + /** + Returns whether the first contact is 'smaller' then the second. + */ + virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const; + + private: + KABC::Field *mField; + bool mAscendingOrder; + + class FieldSortModePrivate; + FieldSortModePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/sound.cpp b/tdeabc/sound.cpp new file mode 100644 index 000000000..cf645be83 --- /dev/null +++ b/tdeabc/sound.cpp @@ -0,0 +1,118 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "sound.h" + +#include + +using namespace KABC; + +Sound::Sound() + : mIntern( false ) +{ +} + +Sound::Sound( const TQString &url ) + : mUrl( url ), mIntern( false ) +{ +} + +Sound::Sound( const TQByteArray &data ) + : mData( data ), mIntern( true ) +{ +} + +Sound::~Sound() +{ +} + +bool Sound::operator==( const Sound &s ) const +{ + if ( mIntern != s.mIntern ) return false; + + if ( mIntern ) { + if ( mData != s.mData ) + return false; + } else { + if ( mUrl != s.mUrl ) + return false; + } + + return true; +} + +bool Sound::operator!=( const Sound &s ) const +{ + return !( s == *this ); +} + +void Sound::setUrl( const TQString &url ) +{ + mUrl = url; + mIntern = false; +} + +void Sound::setData( const TQByteArray &data ) +{ + mData = data; + mIntern = true; +} + +bool Sound::isIntern() const +{ + return mIntern; +} + +bool Sound::isEmpty() const +{ + return (!mIntern) && mUrl.isEmpty(); + +} + +TQString Sound::url() const +{ + return mUrl; +} + +TQByteArray Sound::data() const +{ + return mData; +} + +TQString Sound::asString() const +{ + if ( mIntern ) + return "intern sound"; + else + return mUrl; +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const Sound &sound ) +{ + return s << sound.mIntern << sound.mUrl; +// return s << sound.mIntern << sound.mUrl << sound.mData; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, Sound &sound ) +{ + s >> sound.mIntern >> sound.mUrl; +// s >> sound.mIntern >> sound.mUrl >> sound.mData; + return s; +} diff --git a/tdeabc/sound.h b/tdeabc/sound.h new file mode 100644 index 000000000..98dcf320b --- /dev/null +++ b/tdeabc/sound.h @@ -0,0 +1,153 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_SOUND_H +#define KABC_SOUND_H + +#include +#include + +#include + +namespace KABC { + +/** @short Class that holds a Sound clip for a contact. + * + * The sound can be played doing something like this: + * + * \code + * KTempFile tmp; + * if(sound.isIntern()) { + * tmp.file()->tqwriteBlock( sound.data() ); + * tmp.close(); + * KAudioPlayer::play( tmp.name() ); + * } else if(!sound.url().isEmpty()) { + * TQString tmpFile; + * if(!TDEIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) + * { + * KMessageBox::error(0L, + * TDEIO::NetAccess::lastErrorString(), + * i18n("Failed to download sound file"), + * KMessageBox::Notify + * ); + * return; + * } + * KAudioPlayer::play( tmpFile ); + * } + * \endcode + * + * Unfortunetly KAudioPlayer::play is ASync, so to delete the temporary file, the best you can really do is set a timer. + * + */ +class KABC_EXPORT Sound +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); + +public: + + /** + * Consturctor. Creates an empty object. + */ + Sound(); + + /** + * Consturctor. + * + * @param url A URL that describes the position of the sound file. + */ + Sound( const TQString &url ); + + /** + * Consturctor. + * + * @param data The raw data of the sound. + */ + Sound( const TQByteArray &data ); + + /** + * Destructor. + */ + ~Sound(); + + + bool operator==( const Sound & ) const; + bool operator!=( const Sound & ) const; + + /** + * Sets a URL for the location of the sound file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * + * @param url The location URL of the sound file. + */ + void setUrl( const TQString &url ); + + /** + * Test if this sound file has been set. + * Just does: !isIntern() && url.isEmpty() + * @since 3.4 + */ + bool isEmpty() const; + + /** + * Sets the raw data of the sound. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param data The raw data of the sound. + */ + void setData( const TQByteArray &data ); + + /** + * Returns whether the sound is described by a URL (extern) or + * by the raw data (intern). + * When this method returns 'true' you can use data() to + * get the raw data. Otherwise you can request the URL of this + * sound by url() and load the raw data from that location. + */ + bool isIntern() const; + + /** + * Returns the location URL of this sound. + */ + TQString url() const; + + /** + * Returns the raw data of this sound. + */ + TQByteArray data() const; + + /** + * Returns string representation of the sound. + */ + TQString asString() const; + +private: + TQString mUrl; + TQByteArray mData; + + int mIntern; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & ); + +} +#endif diff --git a/tdeabc/stdaddressbook.cpp b/tdeabc/stdaddressbook.cpp new file mode 100644 index 000000000..3e64645ea --- /dev/null +++ b/tdeabc/stdaddressbook.cpp @@ -0,0 +1,203 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "resource.h" + +#include "stdaddressbook.h" + +using namespace KABC; + +StdAddressBook *StdAddressBook::mSelf = 0; +bool StdAddressBook::mAutomaticSave = true; + +static KStaticDeleter addressBookDeleter; + +TQString StdAddressBook::fileName() +{ + return locateLocal( "data", "tdeabc/std.vcf" ); +} + +TQString StdAddressBook::directoryName() +{ + return locateLocal( "data", "tdeabc/stdvcf" ); +} + +void StdAddressBook::handleCrash() +{ +} + +StdAddressBook *StdAddressBook::self() +{ + if ( !mSelf ) + addressBookDeleter.setObject( mSelf, new StdAddressBook ); + + return mSelf; +} + +StdAddressBook *StdAddressBook::self( bool asynchronous ) +{ + if ( !mSelf ) + addressBookDeleter.setObject( mSelf, new StdAddressBook( asynchronous ) ); + + return mSelf; +} + +StdAddressBook::StdAddressBook() + : AddressBook( "" ) +{ + kdDebug(5700) << "StdAddressBook::StdAddressBook()" << endl; + + init( false ); +} + +StdAddressBook::StdAddressBook( bool asynchronous ) + : AddressBook( "" ) +{ + kdDebug(5700) << "StdAddressBook::StdAddressBook( bool )" << endl; + + init( asynchronous ); +} + +StdAddressBook::~StdAddressBook() +{ + if ( mAutomaticSave ) + saveAll(); +} + +void StdAddressBook::init( bool asynchronous ) +{ + KRES::Manager *manager = resourceManager(); + + KRES::Manager::ActiveIterator it; + for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { + (*it)->setAddressBook( this ); + if ( !(*it)->open() ) { + error( TQString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); + continue; + } + connect( *it, TQT_SIGNAL( loadingFinished( Resource* ) ), + this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) ); + connect( *it, TQT_SIGNAL( savingFinished( Resource* ) ), + this, TQT_SLOT( resourceSavingFinished( Resource* ) ) ); + + connect( *it, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) ); + connect( *it, TQT_SIGNAL( savingError( Resource*, const TQString& ) ), + this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) ); + } + + Resource *res = standardResource(); + if ( !res ) { + res = manager->createResource( "file" ); + if ( res ) + addResource( res ); + else + kdDebug(5700) << "No resource available!!!" << endl; + } + + setStandardResource( res ); + manager->writeConfig(); + + if ( asynchronous ) + asyncLoad(); + else + load(); +} + +bool StdAddressBook::saveAll() +{ + kdDebug(5700) << "StdAddressBook::saveAll()" << endl; + bool ok = true; + + deleteRemovedAddressees(); + + KRES::Manager::ActiveIterator it; + KRES::Manager *manager = resourceManager(); + for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { + if ( !(*it)->readOnly() && (*it)->isOpen() ) { + Ticket *ticket = requestSaveTicket( *it ); + if ( !ticket ) { + error( i18n( "Unable to save to resource '%1'. It is locked." ) + .arg( (*it)->resourceName() ) ); + return false; + } + + if ( !AddressBook::save( ticket ) ) { + ok = false; + releaseSaveTicket( ticket ); + } + } + } + + return ok; +} + +bool StdAddressBook::save() +{ + kdDebug(5700) << "StdAddressBook::save()" << endl; + + if ( mSelf ) + return mSelf->saveAll(); + else + return true; +} + +void StdAddressBook::close() +{ + addressBookDeleter.destructObject(); +} + +void StdAddressBook::setAutomaticSave( bool enable ) +{ + mAutomaticSave = enable; +} + +bool StdAddressBook::automaticSave() +{ + return mAutomaticSave; +} + +// should get const for 4.X +Addressee StdAddressBook::whoAmI() +{ + TDEConfig config( "kabcrc" ); + config.setGroup( "General" ); + + return findByUid( config.readEntry( "WhoAmI" ) ); +} + +void StdAddressBook::setWhoAmI( const Addressee &addr ) +{ + TDEConfig config( "kabcrc" ); + config.setGroup( "General" ); + + config.writeEntry( "WhoAmI", addr.uid() ); +} diff --git a/tdeabc/stdaddressbook.h b/tdeabc/stdaddressbook.h new file mode 100644 index 000000000..935b2bad1 --- /dev/null +++ b/tdeabc/stdaddressbook.h @@ -0,0 +1,153 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_STDADDRESSBOOK_H +#define KABC_STDADDRESSBOOK_H + +#include "addressbook.h" + +namespace KABC { + +/** + Standard KDE address book + + This class provides access to the standard KDE address book shared by all + applications. + + It's implemented as a singleton. Use self() to get the address book + object. On the first self() call the address book also gets loaded. + + Example: + + \code + KABC::AddressBook *ab = KABC::StdAddressBook::self(); + + AddressBook::Ticket *ticket = ab->requestSaveTicket(); + + if ( ticket ) { + KABC::AddressBook::Iterator it; + for ( it = ab->begin(); it != ab->end(); ++it ) { + kdDebug() << "UID=" << (*it).uid() << endl; + + // do some other stuff + } + + KABC::StdAddressBook::save( ticket ); + } + \endcode +*/ +class KABC_EXPORT StdAddressBook : public AddressBook +{ + public: + + /** + Destructor. + */ + ~StdAddressBook(); + + /** + Returns the standard addressbook object. It also loads all resources of + the users standard address book synchronously. + */ + static StdAddressBook *self(); + + /** + This is the same as above, but with specified behaviour of resource loading. + + @param asynchronous When true, the resources are loaded asynchronous, that + means you have the data foremost the addressBookChanged() + signal has been emitted. So connect to this signal when + using this method! + */ + static StdAddressBook *self( bool asynchronous ); + + /** + Saves the standard address book to disk. + + @deprecated Use AddressBook::save( Ticket* ) instead + */ + static bool save() KDE_DEPRECATED; + + /** + @deprecated There is no need to call this function anymore. + */ + static void handleCrash() KDE_DEPRECATED; + + /** + Returns the default file name for vcard-based addressbook + */ + static TQString fileName(); + + /** + Returns the default directory name for vcard-based addressbook + */ + static TQString directoryName(); + + /** + Sets the automatic save property of the address book. + + @param state If true, the address book is saved automatically + at destruction time, otherwise you have to call + AddressBook::save( Ticket* ). + */ + static void setAutomaticSave( bool state ); + + /** + Closes the address book. Depending on automaticSave() it will + save the address book first. + */ + static void close(); + + /** + Returns whether the address book is saved at destruction time. + See also setAutomaticSave(). + */ + static bool automaticSave(); + + /** + Returns the contact, that is associated with the owner of the + address book. This contact should be used by other programs + to access user specific data. + */ + Addressee whoAmI(); + + /** + Sets the users contact. See whoAmI() for more information. + + @param addr The users contact. + */ + void setWhoAmI( const Addressee &addr ); + + protected: + StdAddressBook(); + StdAddressBook( bool asynchronous ); + + void init( bool asynchronous ); + bool saveAll(); + + private: + static StdAddressBook *mSelf; + static bool mAutomaticSave; +}; + +} + +#endif + diff --git a/tdeabc/tdeab2tdeabc.cpp b/tdeabc/tdeab2tdeabc.cpp new file mode 100644 index 000000000..13b433abc --- /dev/null +++ b/tdeabc/tdeab2tdeabc.cpp @@ -0,0 +1,476 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "stdaddressbook.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, + { "quiet", "", 0 }, + { "o", 0, 0 }, + { "override", I18N_NOOP( "Override existing entries" ), "1" }, + TDECmdLineLastOption +}; + +void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) +{ + kdDebug() << "KMAILENTRY: " << kmailEntry << endl; + + TQString entry = kmailEntry.simplifyWhiteSpace(); + if ( entry.isEmpty() ) return; + + TQString email; + TQString name; + TQString comment; + + if ( entry.at( entry.length() -1 ) == ')' ) { + int br = entry.findRev( '(' ); + if ( br >= 0 ) { + comment = entry.mid( br + 1, entry.length() - br - 2 ); + entry.truncate( br ); + if ( entry.at( entry.length() - 1 ).isSpace() ) { + entry.truncate( br - 1 ); + } + } + } + + int posSpace = entry.findRev( ' ' ); + if ( posSpace < 0 ) { + email = entry; + if ( !comment.isEmpty() ) { + name = comment; + comment = ""; + } + } else { + email = entry.mid( posSpace + 1 ); + name = entry.left( posSpace ); + } + + if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { + email = email.mid( 1, email.length() - 2 ); + } + if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { + name = name.mid( 1, name.length() - 2 ); + } + if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { + name = name.mid( 1, name.length() - 2 ); + } + + if ( name.at( name.length() -1 ) == ')' ) { + int br = name.findRev( '(' ); + if ( br >= 0 ) { + comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; + name.truncate( br ); + if ( name.at( name.length() - 1 ).isSpace() ) { + name.truncate( br - 1 ); + } + } + } + + kdDebug() << " EMAIL : " << email << endl; + kdDebug() << " NAME : " << name << endl; + kdDebug() << " COMMENT : " << comment << endl; + + KABC::Addressee::List al = ab->findByEmail( email ); + if ( al.isEmpty() ) { + KABC::Addressee a; + a.setNameFromString( name ); + a.insertEmail( email ); + a.setNote( comment ); + + ab->insertAddressee( a ); + + kdDebug() << "--INSERTED: " << a.realName() << endl; + } +} + +void importKMailAddressBook( KABC::AddressBook *ab ) +{ + TQString fileName = locateLocal( "data", "kmail/addressbook" ); + TQString kmailConfigName = locate( "config", "kmailrc" ); + if ( !kmailConfigName.isEmpty() ) { + TDEConfig cfg( kmailConfigName ); + cfg.setGroup( "Addressbook" ); + fileName = cfg.readPathEntry( "default", fileName ); + } + if ( !TDEStandardDirs::exists( fileName ) ) { + kdDebug(5700) << "Couldn't find KMail addressbook." << endl; + return; + } + + TQFile f( fileName ); + if ( !f.open(IO_ReadOnly) ) { + kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl; + return; + } + + TQStringList kmailEntries; + + TQTextStream t( &f ); + while ( !t.eof() ) { + kmailEntries.append( t.readLine() ); + } + f.close(); + + TQStringList::ConstIterator it; + for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { + if ( (*it).at( 0 ) == '#' ) continue; + bool insideQuote = false; + int end = (*it).length() - 1; + for ( int i = end; i; i-- ) { + if ( (*it).at( i ) == '"' ) { + if ( insideQuote ) + insideQuote = false; + else + insideQuote = true; + } else if ( (*it).at( i ) == ',' && !insideQuote ) { + readKMailEntry( (*it).mid( i + 1, end - i ), ab ); + end = i - 1; + } + } + + readKMailEntry( (*it).mid( 0, end + 1 ), ab ); + } +} + +void readKAddressBookEntries( const TQString &dataString, Addressee &a ) +{ + // Strip "KMail:1.0" prefix and "[EOS]" suffix. + TQString str = dataString.mid( 11, dataString.length() - 24 ); + + TQStringList entries = TQStringList::split( "\n[EOR]\n ", str ); + + Address homeAddress( Address::Home ); + Address businessAddress( Address::Work ); + Address otherAddress; + + TQStringList::ConstIterator it; + for ( it = entries.begin(); it != entries.end(); ++it ) { + int pos = (*it).find( "\n" ); + TQString fieldName = (*it).left( pos ); + TQString fieldValue = (*it).mid( pos + 2 ); + + if ( fieldName == "X-HomeFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home | + PhoneNumber::Fax ) ); + } else if ( fieldName == "X-OtherPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) ); + } else if ( fieldName == "X-PrimaryPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) ); + } else if ( fieldName == "X-BusinessFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work | + PhoneNumber::Fax ) ); + } else if ( fieldName == "X-CarPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) ); + } else if ( fieldName == "X-MobilePhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) ); + } else if ( fieldName == "X-ISDN" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) ); + } else if ( fieldName == "X-OtherFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) ); + } else if ( fieldName == "X-Pager" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) ); + } else if ( fieldName == "X-BusinessPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) ); + } else if ( fieldName == "X-HomePhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) ); + } else if ( fieldName == "X-HomeAddress" ) { + homeAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-HomeAddressStreet" ) { + homeAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-HomeAddressCity" ) { + homeAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-HomeAddressPostalCode" ) { + homeAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-HomeAddressState" ) { + homeAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-HomeAddressCountry" ) { + homeAddress.setCountry( fieldValue ); + } else if ( fieldName == "X-BusinessAddress" ) { + businessAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-BusinessAddressStreet" ) { + businessAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-BusinessAddressCity" ) { + businessAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-BusinessAddressPostalCode" ) { + businessAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-BusinessAddressState" ) { + businessAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-BusinessAddressCountry" ) { + businessAddress.setCountry( fieldValue ); + } else if ( fieldName == "X-OtherAddress" ) { + otherAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-OtherAddressStreet" ) { + otherAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-OtherAddressCity" ) { + otherAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-OtherAddressPostalCode" ) { + otherAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-OtherAddressState" ) { + otherAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-OtherAddressCountry" ) { + otherAddress.setCountry( fieldValue ); + } else if ( fieldName == "NICKNAME" ) { + a.setNickName( fieldValue ); + } else if ( fieldName == "ORG" ) { + a.setOrganization( fieldValue ); + } else if ( fieldName == "ROLE" ) { + a.setRole( fieldValue ); + } else if ( fieldName == "BDAY" ) { + a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) ); + } else if ( fieldName == "WEBPAGE" ) { + a.setUrl( KURL( fieldValue ) ); + } else if ( fieldName == "N" ) { + } else if ( fieldName == "X-FirstName" ) { + } else if ( fieldName == "X-MiddleName" ) { + } else if ( fieldName == "X-LastName" ) { + } else if ( fieldName == "X-Title" ) { + } else if ( fieldName == "X-Suffix" ) { + } else if ( fieldName == "X-FileAs" ) { + } else if ( fieldName == "EMAIL" ) { + a.insertEmail( fieldValue, true ); + } else if ( fieldName == "X-E-mail2" ) { + a.insertEmail( fieldValue ); + } else if ( fieldName == "X-E-mail3" ) { + a.insertEmail( fieldValue ); + } else if ( fieldName == "X-Notes" ) { + } else { + a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue ); + } + } + + if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress ); + if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress ); + if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress ); +} + +void importKab( KABC::AddressBook *ab, bool override, bool quiet ) +{ + TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" ); + fileName += "addressbook.kab"; + if ( !TQFile::exists( fileName ) ) { + if ( !quiet ) { + KMessageBox::error( 0, "" + i18n( "Address book file %1 not found! Make sure the old address book is located there and you have read permission for this file." ) + .arg( fileName ) + "" ); + } + kdDebug(5700) << "No KDE 2 addressbook found." << endl; + return; + } + + kdDebug(5700) << "Converting old-style kab addressbook to " + "new-style kabc addressbook." << endl; + + KabAPI kab( 0 ); + if ( kab.init() != ::AddressBook::NoError ) { + kdDebug(5700) << "Error initing kab" << endl; + exit( 1 ); + } + + KabKey key; + ::AddressBook::Entry entry; + + int num = kab.addressbook()->noOfEntries(); + + kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl; + + for ( int i = 0; i < num; ++i ) { + if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) { + kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl; + continue; + } + if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) { + kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl; + continue; + } + + Addressee a; + + // Convert custom entries + int count = 0; + bool idFound = false; + TQStringList::ConstIterator customIt; + for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { + if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { + a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); + idFound = true; + } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { + readKAddressBookEntries( *customIt, a ); + } else { + a.insertCustom( "tdeab2tdeabc", TQString::number( count++ ), *customIt ); + } + } + if ( idFound ) { + if ( !override ) continue; + } else { + entry.custom << "X-KABC-UID:" + a.uid(); + ::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry ); + if ( error != ::AddressBook::NoError ) { + kdDebug(5700) << "kab.change returned with error " << error << endl; + } else { + kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl; + } + } + + a.setTitle( entry.title ); + a.setFormattedName( entry.fn ); + a.setPrefix( entry.nameprefix ); + a.setGivenName( entry.firstname ); + a.setAdditionalName( entry.middlename ); + a.setFamilyName( entry.lastname ); + a.setBirthday( entry.birthday ); + + TQStringList::ConstIterator emailIt; + for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt ) + a.insertEmail( *emailIt ); + + TQStringList::ConstIterator phoneIt; + for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) { + int kabType = (*phoneIt++).toInt(); + if ( phoneIt == entry.telephone.end() ) break; + TQString number = *phoneIt; + int type = 0; + if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice; + else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice; + else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax; + else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem; + a.insertPhoneNumber( PhoneNumber( number, type ) ); + } + + if ( entry.URLs.count() > 0 ) { + a.setUrl( KURL( entry.URLs.first() ) ); + if ( entry.URLs.count() > 1 ) { + kdWarning() << "More than one URL. Ignoring all but the first." << endl; + } + } + + int noAdr = entry.noOfAddresses(); + for ( int j = 0; j < noAdr; ++j ) { + ::AddressBook::Entry::Address kabAddress; + entry.getAddress( j, kabAddress ); + + Address adr; + + adr.setStreet( kabAddress.address ); + adr.setPostalCode( kabAddress.zip ); + adr.setLocality( kabAddress.town ); + adr.setCountry( kabAddress.country ); + adr.setRegion( kabAddress.state ); + + TQString label; + if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n"; + if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n"; + if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n"; + if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n"; + if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n"; + if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n"; + adr.setLabel( label ); + + a.insertAddress( adr ); + } + + TQString note = entry.comment; + + if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1; + if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2; + if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3; + if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4; + + if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " ); + + TQStringList::ConstIterator talkIt; + for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) { + note += "\nTalk: " + (*talkIt); + } + + a.setNote( note ); + + a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix + + a.setCategories( entry.categories ); + + kdDebug(5700) << "Addressee: " << a.familyName() << endl; + + ab->insertAddressee( a ); + } + + kab.save( true ); +} + +int main( int argc, char **argv ) +{ + TDEAboutData aboutData( "tdeab2tdeabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" ); + aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + bool override = false; + + if ( args->isSet( "override" ) ) { + kdDebug() << "Override existing entries." << endl; + + override = true; + } + + bool quiet = false; + + if ( args->isSet( "quiet" ) ) + quiet = true; + + if ( args->isSet( "disable-autostart" ) ) { + kdDebug() << "Disable autostart." << endl; + + TDEConfig *config = app.config(); + config->setGroup( "Startup" ); + config->writeEntry( "EnableAutostart", false ); + } + + KABC::AddressBook *kabcBook = StdAddressBook::self(); + + importKMailAddressBook( kabcBook ); + + importKab( kabcBook, override, quiet ); + + StdAddressBook::save(); + + kdDebug(5700) << "Saved kabc addressbook to '" << kabcBook->identifier() << "'" << endl; +} + diff --git a/tdeabc/tdeab2tdeabc.desktop b/tdeabc/tdeab2tdeabc.desktop new file mode 100644 index 000000000..ef7641b23 --- /dev/null +++ b/tdeabc/tdeab2tdeabc.desktop @@ -0,0 +1,105 @@ +[Desktop Entry] +Name=tdeab2tdeabc +Name[af]=kab-na-kabc +Name[csb]=Kònwersëjô adresowi knéżczi +Name[eo]=Konvertilo de "kab" al "kabc" +Name[fr]=KAB2KABC +Name[fy]=Kab2kabc +Name[hu]=Kab2kabc +Name[it]=Kab2Kabc +Name[nl]=Kab2kabc +Name[pl]=Konwersja książki adresowej +Name[pt_BR]=Conversão de kab para kabc +Name[ro]=Kab2kabc +Name[sv]=Kab2kabc +Name[te]=కెఎబి2కెఎబిసి +Name[zu]=i-tdeab2tdeabc +Exec=tdeab2tdeabc --disable-autostart --quiet +Icon=misc +Type=Application +Comment=libkab to libkabc conversion tool. +Comment[af]=libkab na libkabc omskakeling program. +Comment[ar]=أداة تحويل libkab إلى libkabc. +Comment[az]=libkab - libkabc dönüşdürmÉ™ vasitÉ™si. +Comment[be]=ІнÑтрумент пераўтварÑÐ½Ð½Ñ libkab у libkabc. +Comment[bg]=Програма за конвертиране на libkab до libkabc. +Comment[bn]=libkab থেকে libtdeabc-তে পরিবরà§à¦¤à¦¨ করার পà§à¦°à§‹à¦—à§à¦°à¦¾à¦®à¥¤ +Comment[bs]=alat za pretvaranje libkab u libkabc. +Comment[ca]=Eina de conversió de libkab a libkabc. +Comment[cs]=PÅ™evod dat z libkab do libkabc. +Comment[csb]=Nôrzãdze do kònwersëji z libkab do libkabc. +Comment[cy]=erfyn trosi libkab i libkabc +Comment[da]=libkab-til-libtdeabc-konverteringsværktøj. +Comment[de]=Konvertierung von libkab in libkabc +Comment[el]=ΕÏγαλείο μετατÏοπής από το libkab στο libkabc. +Comment[eo]=Konvertilo de "libkab" al "libkabc" +Comment[es]=Conversor libkab a libkabc. +Comment[et]=libkab -> libkabc teisendamine +Comment[eu]=libkab-etik libtdeabc-era bihurtzeko tresna. +Comment[fa]=ابزار تبدیل libkab به libcabc. +Comment[fi]=libkab-libkabc -muunnin +Comment[fr]=Outil de conversion de libkab vers libkabc. +Comment[fy]=Konversjeprogramma fan libkab nei libkabc. +Comment[ga]=Uirlis tiontaithe ó libkab go libkabc. +Comment[gl]=Ferramenta de conversión de libkab a libkabc. +Comment[he]=כלי המרה מ־libkab ל־libkabc +Comment[hi]=libkab से libkabc बदलने वाला औजार +Comment[hr]=Alat za pretvaranje iz libkab u libkabc +Comment[hsb]=libkab -> libkabc konwerter +Comment[hu]=libkab -> libkabc konvertáló. +Comment[id]=konverter libkab ke libkabc. +Comment[is]=libkab í libkabc breytingatól. +Comment[it]=Strumento di conversione da libkab a libkabc. +Comment[ja]=libkab ã‹ã‚‰ libkabc ã¸ã®å¤‰æ›ãƒ„ール +Comment[ka]=libkab => libkabc გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ხელსáƒáƒ¬áƒ§áƒ. +Comment[kk]=libkab дегеннен libkabc дегенге айналдыру құралы. +Comment[km]=ឧបករណáŸâ€‹áž”ម្លែង​ពី libkab ទៅ libkabc +Comment[ko]=libkabì„ libkabc로 바꿔주는 연장. +Comment[lb]=libkab op libkabc Konvertéierungs-Hëllefsmëttel. +Comment[lt]=libkab į libkabc konvertavimo įrankis. +Comment[lv]=libkab uz libkabc kovertēšanas rÄ«ks. +Comment[mk]=алатка за претворање од libkab во libkabc. +Comment[mn]=libkab-Ð°Ð°Ñ libtdeabc-руу хөрвүүлÑгч +Comment[ms]=perkakasan penukaran libkab to libkabc. +Comment[mt]=Għodda għall-konverżjoni libkab għal libkabc +Comment[nb]=libkab til libkabc konverteringsverktøy. +Comment[nds]=Warktüüch för't Ümwanneln vun libkab na libkabc. +Comment[ne]=libkab to libkabc रूपानà¥à¤¤à¤°à¤£ उपकरण । +Comment[nl]=Conversieprogramma van libkab naar libkabc. +Comment[nn]=Konverterer libkab til libkabc +Comment[nso]=Sebereka sa phetosetso ya libkab go libkabc +Comment[pa]=libkab ਤੋ libkabc ਤਬਦੀਲੀ ਸੰਦ। +Comment[pl]=NarzÄ™dzie do konwersji z libkab do libkabc. +Comment[pt]=Ferramenta de conversão de libkab para libkabc. +Comment[pt_BR]=Ferramenta de conversão de libkab para libkabc. +Comment[ro]=Utilitar de conversie de la "libkab" la "libkabc". +Comment[ru]=утилита Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ libkab в libkabc. +Comment[rw]=Igikoresho cy'ihindura libkab muri libkabc. +Comment[se]=konverterenreaidu libkab:as libkabc:ai +Comment[sk]=Prevod dát z libkab do libkabc. +Comment[sl]=Orodje za pretvorbo iz libkab v libkabc +Comment[sq]=Vegla për shëndrimin e libkab në libkabc. +Comment[sr]=Ðлат за конверзију из libkab-а у libkabc. +Comment[sr@Latn]=Alat za konverziju iz libkab-a u libkabc. +Comment[ss]=Lithulusi lekutjintja le-libkab kuya ku-libkabc. +Comment[sv]=Konverteringsverktyg frÃ¥n libkab till libkabc +Comment[ta]=libkab இலிரà¯à®¨à¯à®¤à¯ libkabc கà¯à®•௠மாறà¯à®±à¯à®®à¯ கரà¯à®µà®¿. +Comment[te]=libkab à°¨à±à°‚à°šà°¿ libkabc కౠమారà±à°šà± పనిమà±à°Ÿà±à°Ÿà± +Comment[tg]=аÑбоби дигаргунÑози libkab ба libkabc +Comment[th]=เครื่องมือเปลี่ยน libkab เป็น libkabc +Comment[tr]=libkab' tan libkabc' ye dönüştürme aracı +Comment[tt]=libkab-›libkabc äyländerü qoralı. +Comment[uk]=ЗаÑіб Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ libkab до libkabc. +Comment[uz]=libkab'ni libkabc'ga aylantiradigan vosita. +Comment[uz@cyrillic]=libkab'ни libkabc'га айлантирадиган воÑита. +Comment[ven]=Tshishumiswa tsha u shandukisa libkab itshi ya kha libkabc +Comment[vi]=Công cụ chuyển đổi libkab sang libkabc. +Comment[xh]=libkab kwi libkabc isixhobo sokuguqulela. +Comment[zh_CN]=libkab 到 libkabc 的转æ¢å·¥å…·ã€‚ +Comment[zh_HK]=libkab 至 libkabc 的轉æ›å·¥å…· +Comment[zh_TW]=libkab 至 libkabc 轉æ›å·¥å…· +Comment[zu]=Ithuluzi lokuguqula le-libkab kuyaku-libkabc +Terminal=false +NoDisplay=true +X-TDE-autostart-condition=tdeab2tdeabcrc:Startup:EnableAutostart:true +OnlyShowIn=TDE; diff --git a/tdeabc/tests/Makefile.am b/tdeabc/tests/Makefile.am new file mode 100644 index 000000000..201cf746a --- /dev/null +++ b/tdeabc/tests/Makefile.am @@ -0,0 +1,55 @@ +# Make sure $(all_includes) remains last! +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc -I$(top_srcdir)/kab \ + -I$(srcdir)/../vcardparser/ -I$(srcdir)/../vcard/include \ + -I$(srcdir)/../vcard/include/generated \ + -I$(srcdir)/../vcardparser $(all_includes) +LDADD = ../libkabc.la + +METASOURCES = AUTO + +check_PROGRAMS = testlock testldapclient + +testlock_LDFLAGS = $(all_libraries) +testlock_SOURCES = testlock.cpp + +testldapclient_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testldapclient_SOURCES = testldapclient.cpp + +EXTRA_PROGRAMS = testkabc testkabcdlg testdistlist bigread bigwrite testdb \ + testaddressee testaddresseelist testaddressfmt kabcargl testaddresslineedit + +testkabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testkabc_SOURCES = testkabc.cpp + +testaddressee_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddressee_SOURCES = testaddressee.cpp + +testaddresseelist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddresseelist_SOURCES = testaddresseelist.cpp + +testaddressfmt_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddressfmt_SOURCES = testaddressfmt.cpp + +testkabcdlg_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testkabcdlg_SOURCES = testkabcdlg.cpp + +testdistlist_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testdistlist_SOURCES = testdistlist.cpp + +testaddresslineedit_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testaddresslineedit_SOURCES = testaddresslineedit.cpp + +bigread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +bigread_LDADD = ../libkabc.la $(top_builddir)/tdeabc/plugins/file/libkabc_file.la +bigread_SOURCES = bigread.cpp + +bigwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +bigwrite_LDADD = ../libkabc.la $(top_builddir)/tdeabc/plugins/file/libkabc_file.la +bigwrite_SOURCES = bigwrite.cpp + +testdb_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testdb_SOURCES = testdb.cpp + +kabcargl_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +kabcargl_SOURCES = kabcargl.cpp + diff --git a/tdeabc/tests/bigread.cpp b/tdeabc/tests/bigread.cpp new file mode 100644 index 000000000..a5022367c --- /dev/null +++ b/tdeabc/tests/bigread.cpp @@ -0,0 +1,65 @@ +#include + +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "vcardformat.h" +#include "plugins/file/resourcefile.h" +#if 0 +#include "resourcesql.h" +#endif + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("bigread","BigReadKabc","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app( false, false ); + + AddressBook ab; + + ResourceFile r( "my.kabc", "vcard2" ); + ab.addResource( &r ); + +#if 0 + ResourceSql rsql( &ab, "root", "kde4ever", "localhost" ); + ab.addResource( &rsql ); +#endif + + struct tms start; + + times( &start ); + +#if 0 + kdDebug() << "utime : " << int( start.tms_utime ) << endl; + kdDebug() << "stime : " << int( start.tms_stime ) << endl; + kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; +#endif + + kdDebug() << "Start load" << endl; + ab.load(); + kdDebug() << "Finished load" << endl; + + struct tms end; + + times( &end ); + +#if 0 + kdDebug() << "utime : " << int( end.tms_utime ) << endl; + kdDebug() << "stime : " << int( end.tms_stime ) << endl; + kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; +#endif + + kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; + kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; + +// ab.dump(); +} diff --git a/tdeabc/tests/bigwrite.cpp b/tdeabc/tests/bigwrite.cpp new file mode 100644 index 000000000..4b9fa7bc3 --- /dev/null +++ b/tdeabc/tests/bigwrite.cpp @@ -0,0 +1,70 @@ +#include + +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "vcardformat.h" +#include "plugins/file/resourcefile.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("bigwrite","BigWriteKabc","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app( false, false ); + + AddressBook ab; + ResourceFile r( "my.kabc", "vcard" ); + ab.addResource( &r ); + + for( int i = 0; i < 5000; ++i ) { + Addressee a; + a.setGivenName( "number" + TQString::number( i ) ); + a.setFamilyName( "Name" ); + a.insertEmail( TQString::number( i ) + "@domain" ); + + ab.insertAddressee( a ); + } + printf( "\n" ); + + Ticket *t = ab.requestSaveTicket( &r ); + if ( t ) { + struct tms start; + + times( &start ); + +#if 0 + kdDebug() << "utime : " << int( start.tms_utime ) << endl; + kdDebug() << "stime : " << int( start.tms_stime ) << endl; + kdDebug() << "cutime: " << int( start.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( start.tms_cstime ) << endl; +#endif + + if ( !ab.save( t ) ) { + kdDebug() << "Can't save." << endl; + } + + struct tms end; + + times( &end ); + +#if 0 + kdDebug() << "utime : " << int( end.tms_utime ) << endl; + kdDebug() << "stime : " << int( end.tms_stime ) << endl; + kdDebug() << "cutime: " << int( end.tms_cutime ) << endl; + kdDebug() << "cstime: " << int( end.tms_cstime ) << endl; +#endif + + kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl; + kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl; + + } else { + kdDebug() << "No ticket for save." << endl; + } +} diff --git a/tdeabc/tests/kabcargl.cpp b/tdeabc/tests/kabcargl.cpp new file mode 100644 index 000000000..e38a8a22e --- /dev/null +++ b/tdeabc/tests/kabcargl.cpp @@ -0,0 +1,70 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "stdaddressbook.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("kabcargl","Fix broken pre3.0rc3 format","0.1"); + aboutData.addAuthor("Cornelius Schumacher", 0, "schumacher@kde.org"); + + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app; + + TQString filename = StdAddressBook::fileName(); + + TQFile f( filename ); + if ( !f.open( IO_ReadOnly ) ) { + kdDebug() << "Error opening file '" << filename << "' for reading." << endl; + return 1; + } + + TQTextStream t( &f ); + t.setEncoding(TQTextStream::UnicodeUTF8); + TQString text = t.read(); + f.close(); + + text = TQString::fromUtf8( text.local8Bit() ); + text.replace( "\n", "\r\n" ); + + if ( !f.open( IO_WriteOnly ) ) { + kdDebug() << "Error opening file '" << filename << "' for writing." << endl; + return 1; + } + + TQTextStream t2( &f ); + t2.setEncoding(TQTextStream::UnicodeUTF8); + t2 << text; + f.close(); +} diff --git a/tdeabc/tests/testaddressee.cpp b/tdeabc/tests/testaddressee.cpp new file mode 100644 index 000000000..ef55ae403 --- /dev/null +++ b/tdeabc/tests/testaddressee.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "plugins/file/resourcefile.h" +#include "formats/binaryformat.h" +#include "vcardformat.h" +#include "phonenumber.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "save", "", 0 }, + { "number", "", 0 }, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testaddressee","TestAddressee","0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); + + kdDebug() << "Creating a" << endl; + Addressee a; + + kdDebug() << "tick1" << endl; + a.setGivenName("Hans"); + kdDebug() << "tick2" << endl; + a.setPrefix("Dr."); + + kdDebug() << "Creating b" << endl; + Addressee b( a ); + + kdDebug() << "tack1" << endl; + a.setFamilyName("Wurst"); + kdDebug() << "tack2" << endl; + a.setNickName("hansi"); + + kdDebug() << "Creating c" << endl; + Addressee c = a; + + kdDebug() << "tock1" << endl; + c.setGivenName("Eberhard"); + + a.dump(); + b.dump(); + c.dump(); +} diff --git a/tdeabc/tests/testaddresseelist.cpp b/tdeabc/tests/testaddresseelist.cpp new file mode 100644 index 000000000..f247f1744 --- /dev/null +++ b/tdeabc/tests/testaddresseelist.cpp @@ -0,0 +1,196 @@ +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "addresseelist.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "save", "", 0 }, + { "number", "", 0 }, + TDECmdLineLastOption +}; + +int main(int /*argc*/,char /* **argv*/) +{ +/* TDEAboutData aboutData("testaddresseelist","TestAddresseeList","0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); */ + + kdDebug() << "Creating addressees" << endl; + Addressee a, b, c, d, e, f; + a.setGivenName ("Peter"); + a.setFamilyName("Pan"); + a.setFormattedName("Pan, Peter"); + a.setUid("Asdf"); + b.setGivenName ("Phileas"); + b.setFamilyName("Fogg"); + b.setFormattedName("Fogg, Phileas"); + b.setUid("Rsdf"); + c.setGivenName ("Jim"); + c.setFamilyName("Hawkins"); + c.setFormattedName("Hawkins, Jim"); + c.setUid("Fhwn"); + d.setGivenName ("John"); + d.setFamilyName("Silver"); + d.setPrefix ("Long"); + d.setFormattedName("Long John Silver"); + d.setUid("Z2hk"); + e.setGivenName ("Alice"); + e.setFamilyName("Liddel"); + e.setFormattedName("Liddel, Alice"); + e.setUid("kk45"); + f.setGivenName ("Edmond"); + f.setFamilyName("Dantes"); + f.setFormattedName("Dantes, Edmond"); + f.setUid("78ze"); + + kdDebug() << "Adding to list" << endl; + AddresseeList list; + list.append(a); + list.append(b); + list.append(c); + list.append(d); + list.append(e); + list.append(f); + + list.sortBy(FamilyName); + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Rsdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="kk45" + && (*list.at(4)).uid()=="Asdf" + && (*list.at(5)).uid()=="Z2hk" + ) ) { + kdError() << "SORTING BY FAMILY NAME NOT CORRECT!" << endl; + kdDebug() << "list sorted by family name:" << endl; + list.dump(); + } else { + kdDebug() << "Sorting by family name correct." << endl; + } + list.setReverseSorting(true); + list.sort(); + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Rsdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="kk45" + && (*list.at(1)).uid()=="Asdf" + && (*list.at(0)).uid()=="Z2hk" + ) ) { + kdError() << "REVERSE SORTING BY FAMILY NAME NOT CORRECT!" << endl; + kdDebug() << "list reverse sorted by family name:" << endl; + list.dump(); + } else { + kdDebug() << "Reverse sorting by family name correct." << endl; + } + + list.setReverseSorting(false); + list.sortBy(FormattedName); + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Rsdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="kk45" + && (*list.at(4)).uid()=="Z2hk" + && (*list.at(5)).uid()=="Asdf" + ) ) { + kdError() << "SORTING BY FORMATTED NAME NOT CORRECT!" << endl; + kdDebug() << "list sorted by formatted name:" << endl; + list.dump(); + } else { + kdDebug() << "Sorting by formatted name correct." << endl; + } + list.setReverseSorting(true); + list.sort(); + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Rsdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="kk45" + && (*list.at(1)).uid()=="Z2hk" + && (*list.at(0)).uid()=="Asdf" + ) ) { + kdError() << "REVERSE SORTING BY FORMATTED NAME NOT CORRECT!" << endl; + kdDebug() << "list reverse sorted by formatted name:" << endl; + list.dump(); + } else { + kdDebug() << "Reverse sorting by formatted name correct." << endl; + } + + + list.setReverseSorting(false); + list.sortBy(Uid); + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Asdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="Rsdf" + && (*list.at(4)).uid()=="Z2hk" + && (*list.at(5)).uid()=="kk45" + ) ) { + kdError() << "SORTING BY UID NOT CORRECT!" << endl; + kdDebug() << "list sorted by Uid:" << endl; + list.dump(); + } else { + kdDebug() << "Sorting by Uid correct." << endl; + } + list.setReverseSorting(true); + list.sortBy(Uid); + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Asdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="Rsdf" + && (*list.at(1)).uid()=="Z2hk" + && (*list.at(0)).uid()=="kk45" + ) ) { + kdError() << "REVERSE SORTING BY UID NOT CORRECT!" << endl; + kdDebug() << "list sorted by Uid:" << endl; + list.dump(); + } else { + kdDebug() << "Reverse sorting by Uid correct." << endl; + } + + // zero, one or two entries might give errors in a poor sorting + // implementation + kdDebug() << "sorting empty list" << endl; + AddresseeList list2; + list2.sort(); + + kdDebug() << "sorting one entry list" << endl; + list2.append(a); + list2.sort(); + + kdDebug() << "sorting two entry list" << endl; + list2.append(f); + list2.setReverseSorting(false); + list2.sort(); + if ( !( (*list2.at(0)).uid()=="78ze" + && (*list2.at(1)).uid()=="Asdf" + ) ) { + kdError() << "SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; + kdDebug() << "list sorted by formatted name, two entries:" << endl; + list2.dump(); + } else { + kdDebug() << "Sorting by FormattedName in a two entry list correct." << endl; + } + list2.setReverseSorting(true); + list2.sort(); + if ( !( (*list2.at(1)).uid()=="78ze" + && (*list2.at(0)).uid()=="Asdf" + ) ) { + kdError() << "REVERSE SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; + kdDebug() << "list reverse sorted by formatted name, two entries:" << endl; + list2.dump(); + } else { + kdDebug() << "Reverse sorting by FormattedName in a two entry list correct." << endl; + } + +} + + diff --git a/tdeabc/tests/testaddressfmt.cpp b/tdeabc/tests/testaddressfmt.cpp new file mode 100644 index 000000000..2eb438335 --- /dev/null +++ b/tdeabc/tests/testaddressfmt.cpp @@ -0,0 +1,63 @@ +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "address.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + { "save", "", 0 }, + { "number", "", 0 }, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testaddressfmt","TestAddressFormat","0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + + TDEApplication app; + + Address a; + a.setStreet("Lummerlandstr. 1"); + a.setPostalCode("12345"); + a.setLocality("Lummerstadt"); + a.setCountry ("Germany"); + + Address b; + b.setStreet("457 Foobar Ave"); + b.setPostalCode("1A2B3C"); + b.setLocality("Nervousbreaktown"); + b.setRegion("DC"); + b.setCountry("United States of America"); + + Address c; + c.setStreet("Lummerlandstr. 1"); + c.setPostalCode("12345"); + c.setLocality("Lummerstadt"); + c.setCountry ("Deutschland"); + + Address d; + d.setStreet("Lummerlandstr. 1"); + d.setPostalCode("12345"); + d.setLocality("Lummerstadt"); + d.setCountry (""); + + tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); + tqDebug( a.formattedAddress("Jim Knopf").latin1() ); + tqDebug( "-------------------------------------\nShould have US address formatting, local country formatting\n" ); + tqDebug( b.formattedAddress("Huck Finn").latin1() ); + tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); + tqDebug( c.formattedAddress("Jim Knopf").latin1() ); + tqDebug( "-------------------------------------\nShould have local address formatting, local country formatting\n" ); + tqDebug( d.formattedAddress("Jim Knopf").latin1() ); +} + + diff --git a/tdeabc/tests/testaddresslineedit.cpp b/tdeabc/tests/testaddresslineedit.cpp new file mode 100644 index 000000000..74446f482 --- /dev/null +++ b/tdeabc/tests/testaddresslineedit.cpp @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include + +#include "addresslineedit.h" + +using namespace KABC; + +int main( int argc,char **argv ) +{ + TDEAboutData aboutData( "testaddresslineedit", + I18N_NOOP( "Test Address LineEdit" ), "0.1" ); + TDECmdLineArgs::init( argc, argv, &aboutData ); + + TDEApplication app; + + AddressLineEdit *lineEdit = new AddressLineEdit( 0 ); + + lineEdit->show(); + app.setMainWidget( lineEdit ); + + TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); + + app.exec(); + + delete lineEdit; +} diff --git a/tdeabc/tests/testdb.cpp b/tdeabc/tests/testdb.cpp new file mode 100644 index 000000000..f7ec1d17c --- /dev/null +++ b/tdeabc/tests/testdb.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "vcardformat.h" +#include "resourcesql.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testdb","TestKabcDB","0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + +// TDEApplication app( false, false ); + TDEApplication app; + + AddressBook ab; + + ResourceSql r( &ab, "root", "kde4ever", "localhost" ); + if ( ! r.open() ) { + kdDebug() << "Failed to open resource." << endl; + } + + r.load( &ab ); + + r.close(); + + ab.dump(); +} diff --git a/tdeabc/tests/testdistlist.cpp b/tdeabc/tests/testdistlist.cpp new file mode 100644 index 000000000..69a309ff9 --- /dev/null +++ b/tdeabc/tests/testdistlist.cpp @@ -0,0 +1,59 @@ +#include + +#include +#include +#include +#include +#include + +#include "stdaddressbook.h" + +#include "distributionlisteditor.h" +#include "distributionlist.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + {"list ", I18N_NOOP("Show distribution list with name "), 0}, + TDECmdLineLastOption +}; + + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testdistlist",I18N_NOOP("Test Distribution Lists"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if (args->isSet("list")) { + TQString name = args->getOption("list"); + + DistributionListManager *manager = + new DistributionListManager( StdAddressBook::self() ); + manager->load(); + DistributionList *list = manager->list( name ); + if ( !list ) { + kdDebug() << "No list with name '" << name << "'" << endl; + return 1; + } else { + kdDebug() << "RESULT: " << list->emails().join(", ") << endl; + return 0; + } + } + + DistributionListEditor *editor = + new DistributionListEditor( StdAddressBook::self(), 0 ); + + editor->show(); + app.setMainWidget(editor); + + TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); + + app.exec(); + + delete editor; +} diff --git a/tdeabc/tests/testkabc.cpp b/tdeabc/tests/testkabc.cpp new file mode 100644 index 000000000..427262cab --- /dev/null +++ b/tdeabc/tests/testkabc.cpp @@ -0,0 +1,62 @@ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "geo.h" +#include "secrecy.h" +#include "stdaddressbook.h" +#include "timezone.h" +#include "key.h" +#include "agent.h" +#include "vcardconverter.h" + +using namespace KABC; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testkabc",I18N_NOOP("TestKabc"),"0.1"); + TDECmdLineArgs::init(argc, argv, &aboutData); + + TDEApplication app( false, false ); + AddressBook *ab = StdAddressBook::self(); + +#define READ + +#ifdef READ + AddressBook::Iterator it; + for ( it = ab->begin(); it != ab->end(); ++it ) { + TQString vcard; + VCardConverter converter; + converter.addresseeToVCard( *it, vcard ); + kdDebug() << "card=" << vcard << endl; + } +#else + Addressee addr; + + addr.setGivenName("Tobias"); + addr.setFamilyName("Koenig"); + + + Picture pic; + TQImage img; + img.load("/home/tobias/test.png"); +/* + pic.setData(img); + pic.setType(TQImage::imageFormat("/home/tobias/test.png")); +*/ + pic.setUrl("http://www.mypict.de"); + addr.setLogo( pic ); + + ab->insertAddressee( addr ); + + StdAddressBook::save(); +#endif + + return 0; +} diff --git a/tdeabc/tests/testkabcdlg.cpp b/tdeabc/tests/testkabcdlg.cpp new file mode 100644 index 000000000..aef203d28 --- /dev/null +++ b/tdeabc/tests/testkabcdlg.cpp @@ -0,0 +1,45 @@ +#include + +#include +#include +#include +#include +#include + +#include "addresseedialog.h" + +using namespace KABC; + +static const TDECmdLineOptions options[] = +{ + {"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0}, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testkabcdlg",I18N_NOOP("TestKabc"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if (args->isSet("multiple")) { + Addressee::List al = AddresseeDialog::getAddressees( 0 ); + Addressee::List::ConstIterator it; + kdDebug() << "Selected Addressees:" << endl; + for( it = al.begin(); it != al.end(); ++it ) { + kdDebug() << " " << (*it).fullEmail() << endl; + } + } else { + Addressee a = AddresseeDialog::getAddressee( 0 ); + + if ( !a.isEmpty() ) { + kdDebug() << "Selected Addressee:" << endl; + a.dump(); + } else { + kdDebug() << "No Addressee selected." << endl; + } + } +} diff --git a/tdeabc/tests/testldapclient.cpp b/tdeabc/tests/testldapclient.cpp new file mode 100644 index 000000000..df9fd6226 --- /dev/null +++ b/tdeabc/tests/testldapclient.cpp @@ -0,0 +1,161 @@ +/* This file is part of the KDE project + Copyright (C) 2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testldapclient.h" + +#include +#include +#include + +#include + +#include +#include + +int main(int argc, char *argv[]) +{ + TDEApplication::disableAutoDcopRegistration(); + TDECmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0); + TDEApplication app; + + TestLDAPClient test; + test.setup(); + test.runAll(); + test.cleanup(); + kdDebug() << "All tests OK." << endl; + return 0; +} + +void TestLDAPClient::setup() +{ +} + +void TestLDAPClient::runAll() +{ + testIntevation(); +} + +bool TestLDAPClient::check(const TQString& txt, TQString a, TQString b) +{ + if (a.isEmpty()) + a = TQString::null; + if (b.isEmpty()) + b = TQString::null; + if (a == b) { + kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; + } + else { + kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl; + cleanup(); + exit(1); + } + return true; +} + +void TestLDAPClient::cleanup() +{ + mClient = 0; +} + +void TestLDAPClient::testIntevation() +{ + kdDebug() << k_funcinfo << endl; + mClient = new LdapClient( this ); + + mClient->setHost( "ca.intevation.de" ); + mClient->setPort( "389" ); + mClient->setBase( "o=Intevation GmbH,c=de" ); + + // Same list as in kaddressbook's ldapsearchdialog + TQStringList attrs; + attrs << "l" << "Company" << "co" << "department" << "description" << "mail" << "facsimileTelephoneNumber" << "cn" << "homePhone" << "mobile" << "o" << "pager" << "postalAddress" << "st" << "street" << "title" << "uid" << "telephoneNumber" << "postalCode" << "objectClass"; + // the list from ldapclient.cpp + //attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass"; + mClient->setAttrs( attrs ); + + // Taken from LdapSearch + //TQString mSearchText = TQString::fromUtf8( "Till" ); + //TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" ) + // .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ); + + // For some reason a fromUtf8 broke the search for me (no results). + // But this certainly looks fishy, it might break on non-utf8 systems. + TQString filter = "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(|(cn=*Ägypten MDK*)(sn=*Ägypten MDK*))"; + + connect( mClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ), + this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) ); + connect( mClient, TQT_SIGNAL( done() ), + this, TQT_SLOT( slotLDAPDone() ) ); + connect( mClient, TQT_SIGNAL( error( const TQString& ) ), + this, TQT_SLOT( slotLDAPError( const TQString& ) ) ); + mClient->startQuery( filter ); + kapp->eventLoop()->enterLoop(); + delete mClient; mClient = 0; +} + +// from kaddressbook... ugly though... +static TQString asUtf8( const TQByteArray &val ) +{ + if ( val.isEmpty() ) + return TQString::null; + + const char *data = val.data(); + + //TQString::fromUtf8() bug workaround + if ( data[ val.size() - 1 ] == '\0' ) + return TQString::fromUtf8( data, val.size() - 1 ); + else + return TQString::fromUtf8( data, val.size() ); +} + +static TQString join( const KABC::LdapAttrValue& lst, const TQString& sep ) +{ + TQString res; + bool already = false; + for ( KABC::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + if ( already ) + res += sep; + already = TRUE; + res += asUtf8( *it ); + } + return res; +} + +void TestLDAPClient::slotLDAPResult( const KABC::LdapObject& obj ) +{ + TQString cn = join( obj.attrs[ "cn" ], ", " ); + kdDebug() << " cn:" << cn << endl; + assert( !obj.attrs[ "mail" ].isEmpty() ); + TQString mail = join( obj.attrs[ "mail" ], ", " ); + kdDebug() << " mail:" << mail << endl; + assert( mail.contains( '@' ) ); +} + +void TestLDAPClient::slotLDAPError( const TQString& err ) +{ + kdDebug() << k_funcinfo << err << endl; + ::exit( 1 ); +} + +void TestLDAPClient::slotLDAPDone() +{ + kdDebug() << k_funcinfo << endl; + kapp->eventLoop()->exitLoop(); +} + +#include "testldapclient.moc" diff --git a/tdeabc/tests/testldapclient.h b/tdeabc/tests/testldapclient.h new file mode 100644 index 000000000..1995914c3 --- /dev/null +++ b/tdeabc/tests/testldapclient.h @@ -0,0 +1,51 @@ +/* This file is part of the KDE project + Copyright (C) 2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TESTLDAPCLIENT_H +#define TESTLDAPCLIENT_H + +#include + +#include "../ldapclient.h" +typedef KABC::LdapClient LdapClient; + +class TestLDAPClient : public TQObject +{ + Q_OBJECT + +public: + TestLDAPClient() {} + void setup(); + void runAll(); + void cleanup(); + + // tests + void testIntevation(); + +private slots: + void slotLDAPResult( const KABC::LdapObject& ); + void slotLDAPError( const TQString& ); + void slotLDAPDone(); + +private: + bool check(const TQString& txt, TQString a, TQString b); + + LdapClient* mClient; +}; + +#endif diff --git a/tdeabc/tests/testlock.cpp b/tdeabc/tests/testlock.cpp new file mode 100644 index 000000000..3ebd724bb --- /dev/null +++ b/tdeabc/tests/testlock.cpp @@ -0,0 +1,206 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testlock.h" + +#include "stdaddressbook.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +using namespace KABC; + +LockWidget::LockWidget( const TQString &identifier ) +{ + TQVBoxLayout *topLayout = new TQVBoxLayout( this ); + topLayout->setMargin( KDialog::marginHint() ); + topLayout->setSpacing( KDialog::spacingHint() ); + + if ( identifier.isEmpty() ) { + mLock = 0; + } else { + mLock = new Lock( identifier ); + + int pid = getpid(); + + TQLabel *pidLabel = new TQLabel( "Process ID: " + TQString::number( pid ), + this ); + topLayout->addWidget( pidLabel ); + + TQHBoxLayout *identifierLayout = new TQHBoxLayout( topLayout ); + + TQLabel *resourceLabel = new TQLabel( "Identifier:", this ); + identifierLayout->addWidget( resourceLabel ); + + TQLabel *resourceIdentifier = new TQLabel( identifier, this ); + identifierLayout->addWidget( resourceIdentifier ); + + mStatus = new TQLabel( "Status: Unlocked", this ); + topLayout->addWidget( mStatus ); + + TQPushButton *button = new TQPushButton( "Lock", this ); + topLayout->addWidget( button ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( lock() ) ); + + button = new TQPushButton( "Unlock", this ); + topLayout->addWidget( button ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( unlock() ) ); + } + + mLockView = new TQListView( this ); + topLayout->addWidget( mLockView ); + mLockView->addColumn( "Lock File" ); + mLockView->addColumn( "PID" ); + mLockView->addColumn( "Locking App" ); + + updateLockView(); + + TQPushButton *quitButton = new TQPushButton( "Quit", this ); + topLayout->addWidget( quitButton ); + connect( quitButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) ); + + KDirWatch *watch = KDirWatch::self(); + connect( watch, TQT_SIGNAL( dirty( const TQString & ) ), + TQT_SLOT( updateLockView() ) ); + connect( watch, TQT_SIGNAL( created( const TQString & ) ), + TQT_SLOT( updateLockView() ) ); + connect( watch, TQT_SIGNAL( deleted( const TQString & ) ), + TQT_SLOT( updateLockView() ) ); + watch->addDir( Lock::locksDir() ); + watch->startScan(); +} + +LockWidget::~LockWidget() +{ + delete mLock; +} + +void LockWidget::updateLockView() +{ + mLockView->clear(); + + TQDir dir( Lock::locksDir() ); + + TQStringList files = dir.entryList( "*.lock" ); + + TQStringList::ConstIterator it; + for( it = files.begin(); it != files.end(); ++it ) { + if ( *it == "." || *it == ".." ) continue; + + TQString app; + int pid; + if ( !Lock::readLockFile( dir.filePath( *it ), pid, app ) ) { + kdWarning() << "Unable to open lock file '" << *it << "'" << endl; + } else { + new TQListViewItem( mLockView, *it, TQString::number( pid ), app ); + } + } +} + +void LockWidget::lock() +{ + if ( !mLock->lock() ) { + KMessageBox::sorry( this, mLock->error() ); + } else { + mStatus->setText( "Status: Locked" ); + } +} + +void LockWidget::unlock() +{ + if ( !mLock->unlock() ) { + KMessageBox::sorry( this, mLock->error() ); + } else { + mStatus->setText( "Status: Unlocked" ); + } +} + + +static const TDECmdLineOptions options[] = +{ + { "a", 0, 0 }, + { "addressbook", "Standard address book", 0 }, + { "d", 0, 0 }, + { "diraddressbook", "Standard address book directory resource", 0 }, + { "+identifier", "Identifier of resource to be locked, e.g. filename", 0 }, + TDECmdLineLastOption +}; + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testlock",I18N_NOOP("Test libkabc Lock"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TQString identifier; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if ( args->count() == 1 ) { + identifier = args->arg( 0 ); + } else if ( args->count() != 0 ) { + std::cerr << "Usage: testlock " << std::endl; + return 1; + } + + if ( args->isSet( "addressbook" ) ) { + if ( args->count() == 1 ) { + std::cerr << "Ignoring resource identifier" << std::endl; + } + identifier = StdAddressBook::fileName(); + } + + if ( args->isSet( "diraddressbook" ) ) { + if ( args->count() == 1 ) { + std::cerr << "Ignoring resource identifier" << std::endl; + } + identifier = StdAddressBook::directoryName(); + } + + LockWidget mainWidget( identifier ); + + kapp->setMainWidget( &mainWidget ); + mainWidget.show(); + + return app.exec(); +} + +#include "testlock.moc" diff --git a/tdeabc/tests/testlock.h b/tdeabc/tests/testlock.h new file mode 100644 index 000000000..a94d4e8c6 --- /dev/null +++ b/tdeabc/tests/testlock.h @@ -0,0 +1,51 @@ +/* + This file is part of libkabc. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_TESTLOCK_H +#define KABC_TESTLOCK_H + +#include "lock.h" + +#include + +class TQLabel; +class TQListView; + +class KABC_EXPORT LockWidget : public TQWidget +{ + Q_OBJECT + public: + LockWidget( const TQString &identifier ); + ~LockWidget(); + + protected slots: + void lock(); + void unlock(); + + void updateLockView(); + + private: + KABC::Lock *mLock; + + TQLabel *mStatus; + TQListView *mLockView; +}; + +#endif diff --git a/tdeabc/timezone.cpp b/tdeabc/timezone.cpp new file mode 100644 index 000000000..59a184c6d --- /dev/null +++ b/tdeabc/timezone.cpp @@ -0,0 +1,85 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "timezone.h" + +using namespace KABC; + +TimeZone::TimeZone() : + mOffset( 0 ), mValid( false ) +{ +} + +TimeZone::TimeZone( int offset ) : + mOffset( offset ), mValid( true ) +{ +} + +void TimeZone::setOffset( int offset ) +{ + mOffset = offset; + mValid = true; +} + +int TimeZone::offset() const +{ + return mOffset; +} + +bool TimeZone::isValid() const +{ + return mValid; +} + +bool TimeZone::operator==( const TimeZone &t ) const +{ + if ( !t.isValid() && !isValid() ) return true; + if ( !t.isValid() || !isValid() ) return false; + if ( t.mOffset == mOffset ) return true; + return false; +} + +bool TimeZone::operator!=( const TimeZone &t ) const +{ + if ( !t.isValid() && !isValid() ) return false; + if ( !t.isValid() || !isValid() ) return true; + if ( t.mOffset != mOffset ) return true; + return false; +} + +TQString TimeZone::asString() const +{ + return TQString::number( mOffset ); +} + +TQDataStream &KABC::operator<<( TQDataStream &s, const TimeZone &zone ) +{ + return s << zone.mOffset; +} + +TQDataStream &KABC::operator>>( TQDataStream &s, TimeZone &zone ) +{ + s >> zone.mOffset; + zone.mValid = true; + + return s; +} diff --git a/tdeabc/timezone.h b/tdeabc/timezone.h new file mode 100644 index 000000000..8705797fb --- /dev/null +++ b/tdeabc/timezone.h @@ -0,0 +1,89 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_TIMEZONE_H +#define KABC_TIMEZONE_H + +#include + +#include + +namespace KABC { + +/** + * @short Time zone information. + * + * This class stores information about a time zone. + */ +class KABC_EXPORT TimeZone +{ + friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); + friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); + +public: + + /** + * Construct invalid time zone. + */ + TimeZone(); + + /** + * Construct time zone. + * + * @param offset Offset in minutes relative to UTC. + */ + TimeZone( int offset ); + + /** + * Set time zone offset relative to UTC. + * + * @param offset Offset in minutes. + */ + void setOffset( int offset ); + + /** + * Return offset in minutes relative to UTC. + */ + int offset() const; + + /** + * Return, if this time zone object is valid. + */ + bool isValid() const; + + bool operator==( const TimeZone & ) const; + bool operator!=( const TimeZone & ) const; + + /** + * Return string representation of time zone offset. + */ + TQString asString() const; + +private: + int mOffset; // Offset in minutes + + bool mValid; +}; + +KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & ); +KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & ); + +} +#endif diff --git a/tdeabc/vcard/AdrParam.cpp b/tdeabc/vcard/AdrParam.cpp new file mode 100644 index 000000000..5ad56f4fb --- /dev/null +++ b/tdeabc/vcard/AdrParam.cpp @@ -0,0 +1,126 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +using namespace VCARD; + +AdrParam::AdrParam() + : Param() +{ +} + +AdrParam::AdrParam(const AdrParam & x) + : Param(x), + adrTypeList_ (x.adrTypeList_) +{ +} + +AdrParam::AdrParam(const TQCString & s) + : Param(s) +{ +} + + AdrParam & +AdrParam::operator = (AdrParam & x) +{ + if (*this == x) return *this; + + adrTypeList_ = x.adrTypeList(); + textParam_ = x.textParam(); + + Param::operator = (x); + return *this; +} + + AdrParam & +AdrParam::operator = (const TQCString & s) +{ + Param::operator = (s); + + adrTypeList_.clear(); + textParam_.truncate(0); + + return *this; +} + + bool +AdrParam::operator == (AdrParam & x) +{ + parse(); + + if (!x.textParam().isEmpty()) + return (x.textParam_ == textParam_); + + if (x.adrTypeList().count() != adrTypeList_.count()) + return false; + + TQStrListIterator it(x.adrTypeList_); + + for (; it.current(); ++it) + if (!adrTypeList_.find(it.current())) + return false; + + return true; +} + +AdrParam::~AdrParam() +{ +} + + void +AdrParam::_parse() +{ + adrTypeList_.clear(); + + if (strRep_.left(4) != "TYPE") { + textParam_ = strRep_; + return; + } + + if (!strRep_.contains('=')) + return; + + RTokenise(strRep_, ",", adrTypeList_); +} + + void +AdrParam::_assemble() +{ + if (!textParam_.isEmpty()) { + strRep_ = textParam_; + return; + } + + TQStrListIterator it(adrTypeList_); + + for (; it.current(); ++it) { + + strRep_ += it.current(); + + if (it.current() != adrTypeList_.last()) + strRep_ += ','; + } +} diff --git a/tdeabc/vcard/AdrValue.cpp b/tdeabc/vcard/AdrValue.cpp new file mode 100644 index 000000000..535ba6980 --- /dev/null +++ b/tdeabc/vcard/AdrValue.cpp @@ -0,0 +1,140 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include +#include + +using namespace VCARD; + +AdrValue::AdrValue() + : Value() +{ +} + +AdrValue::AdrValue(const AdrValue & x) + : Value(x), + poBox_ (x.poBox_), + extAddress_ (x.extAddress_), + street_ (x.street_), + locality_ (x.locality_), + region_ (x.region_), + postCode_ (x.postCode_), + countryName_ (x.countryName_) +{ +} + +AdrValue::AdrValue(const TQCString & s) + : Value(s) +{ +} + + AdrValue & +AdrValue::operator = (AdrValue & x) +{ + if (*this == x) return *this; + + poBox_ = x.poBox_; + extAddress_ = x.extAddress_; + street_ = x.street_; + locality_ = x.locality_; + region_ = x.region_; + postCode_ = x.postCode_; + countryName_ = x.countryName_; + + Value::operator = (x); + return *this; +} + + AdrValue & +AdrValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +AdrValue::operator == (AdrValue & x) +{ + parse(); + x.parse(); + + return ( + poBox_ == x.poBox_ && + extAddress_ == x.extAddress_ && + street_ == x.street_ && + locality_ == x.locality_ && + region_ == x.region_ && + postCode_ == x.postCode_ && + countryName_ == x.countryName_); +} + +AdrValue::~AdrValue() +{ +} + + AdrValue * +AdrValue::clone() +{ + return new AdrValue( *this ); +} + + void +AdrValue::_parse() +{ + vDebug("AdrValue::_parse()"); + + TQStrList l; + RTokenise(strRep_, ";", l); + + for (unsigned int i = 0; i < l.count(); i++) { + + switch (i) { + + case 0: poBox_ = l.at(0); break; + case 1: extAddress_ = l.at(1); break; + case 2: street_ = l.at(2); break; + case 3: locality_ = l.at(3); break; + case 4: region_ = l.at(4); break; + case 5: postCode_ = l.at(5); break; + case 6: countryName_ = l.at(6); break; + default: break; + } + } +} + + void +AdrValue::_assemble() +{ + vDebug("AdrValue::_assemble"); + + strRep_ = poBox_; + strRep_ += ";" + extAddress_; + strRep_ += ";" + street_; + strRep_ += ";" + locality_; + strRep_ += ";" + region_; + strRep_ += ";" + postCode_; + strRep_ += ";" + countryName_; +} + diff --git a/tdeabc/vcard/AgentParam.cpp b/tdeabc/vcard/AgentParam.cpp new file mode 100644 index 000000000..9e4531b02 --- /dev/null +++ b/tdeabc/vcard/AgentParam.cpp @@ -0,0 +1,103 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +AgentParam::AgentParam() + : Param() +{ +} + +AgentParam::AgentParam(const AgentParam & x) + : Param(x), + refer_ (x.refer_), + uri_ (x.uri_) +{ +} + +AgentParam::AgentParam(const TQCString & s) + : Param(s) +{ +} + + AgentParam & +AgentParam::operator = (AgentParam & x) +{ + if (*this == x) return *this; + + refer_ = x.refer_; + uri_ = x.uri_; + + Param::operator = (x); + return *this; +} + + AgentParam & +AgentParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +AgentParam::operator == (AgentParam & x) +{ + parse(); + + if (refer_) + return (x.refer() && uri_ == x.uri_); + + return !x.refer(); +} + +AgentParam::~AgentParam() +{ +} + + void +AgentParam::_parse() +{ + if (strRep_.isEmpty()) { + refer_ = false; + return; + } + + refer_ = true; + uri_ = strRep_; +} + + void +AgentParam::_assemble() +{ + if (!refer_) { + strRep_.truncate(0); + return; + } + + strRep_ = uri_.asString(); + return; +} diff --git a/tdeabc/vcard/AgentValue.cpp b/tdeabc/vcard/AgentValue.cpp new file mode 100644 index 000000000..7d356f8d7 --- /dev/null +++ b/tdeabc/vcard/AgentValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +AgentValue::AgentValue() + : Value() +{ +} + +AgentValue::AgentValue(const AgentValue & x) + : Value(x) +{ +} + +AgentValue::AgentValue(const TQCString & s) + : Value(s) +{ +} + + AgentValue & +AgentValue::operator = (AgentValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + AgentValue & +AgentValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +AgentValue::operator == (AgentValue & x) +{ + x.parse(); + return false; +} + +AgentValue::~AgentValue() +{ +} + + void +AgentValue::_parse() +{ +} + + void +AgentValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/CMakeLists.txt b/tdeabc/vcard/CMakeLists.txt new file mode 100644 index 000000000..8ad988434 --- /dev/null +++ b/tdeabc/vcard/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/generated + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdecore +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### vcard ##################################### + +set( target vcard ) + +set( ${target}_SRCS + vCard-all.cpp +) + +tde_add_library( ${target} SHARED + SOURCES ${${target}_SRCS} + VERSION 0.0.0 + LINK tdecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/tdeabc/vcard/ClassValue.cpp b/tdeabc/vcard/ClassValue.cpp new file mode 100644 index 000000000..21417f87b --- /dev/null +++ b/tdeabc/vcard/ClassValue.cpp @@ -0,0 +1,120 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +ClassValue::ClassValue() + : Value() +{ +} + +ClassValue::ClassValue(const ClassValue & x) + : Value(x), + classType_(x.classType_) +{ +} + +ClassValue::ClassValue(const TQCString & s) + : Value(s) +{ +} + + ClassValue & +ClassValue::operator = (ClassValue & x) +{ + if (*this == x) return *this; + x.parse(); + + classType_ = x.classType_; + + Value::operator = (x); + return *this; +} + + ClassValue & +ClassValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +ClassValue::operator == (ClassValue & x) +{ + x.parse(); + return ( classType_ == x.classType_ ); +} + +ClassValue::~ClassValue() +{ +} + + ClassValue * +ClassValue::clone() +{ + return new ClassValue( *this ); +} + + void +ClassValue::_parse() +{ + if (tqstricmp(strRep_, "PUBLIC") == 0) + classType_ = Public; + + else if (tqstricmp(strRep_, "PRIVATE") == 0) + classType_ = Private; + + else if (tqstricmp(strRep_, "CONFIDENTIAL") == 0) + classType_ = Confidential; + + else classType_ = Other; +} + + void +ClassValue::_assemble() +{ + switch (classType_) { + + case Public: + strRep_ = "PUBLIC"; + break; + + case Private: + strRep_ = "PRIVATE"; + break; + + case Confidential: + strRep_ = "CONFIDENTIAL"; + break; + + default: + break; + } +} + diff --git a/tdeabc/vcard/ContentLine.cpp b/tdeabc/vcard/ContentLine.cpp new file mode 100644 index 000000000..52bcdf4f5 --- /dev/null +++ b/tdeabc/vcard/ContentLine.cpp @@ -0,0 +1,302 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +using namespace VCARD; + +ContentLine::ContentLine() + : Entity(), + value_(0), + paramType_( ParamUnknown ), + valueType_( ValueUnknown ), + entityType_( EntityUnknown ) +{ +} + +ContentLine::ContentLine(const ContentLine & x) + : Entity(x), + group_ (x.group_), + name_ (x.name_), + paramList_(x.paramList_), + value_(x.value_->clone()), + paramType_( x.paramType_ ), + valueType_( x.valueType_ ), + entityType_( x.entityType_ ) +{ +} + +ContentLine::ContentLine(const TQCString & s) + : Entity(s), + value_(0), + paramType_( ParamUnknown ), + valueType_( ValueUnknown ), + entityType_( EntityUnknown ) +{ +} + + ContentLine & +ContentLine::operator = (ContentLine & x) +{ + if (*this == x) return *this; + + paramList_ = x.paramList(); + value_ = x.value_->clone(); + + Entity::operator = (x); + return *this; +} + + ContentLine & +ContentLine::operator = (const TQCString & s) +{ + Entity::operator = (s); + delete value_; + value_ = 0; + return *this; +} + + bool +ContentLine::operator == (ContentLine & x) +{ + x.parse(); + + TQPtrListIterator it(x.paramList()); + + if (!paramList_.find(it.current())) + return false; + + return true; +} + +ContentLine::~ContentLine() +{ + delete value_; + value_ = 0; +} + + void +ContentLine::_parse() +{ + vDebug("parse"); + + // Unqote newlines + strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" ); + + int split = strRep_.find(':'); + + if (split == -1) { // invalid content line + vDebug("No ':'"); + return; + } + + TQCString firstPart(strRep_.left(split)); + TQCString valuePart(strRep_.mid(split + 1)); + + split = firstPart.find('.'); + + if (split != -1) { + group_ = firstPart.left(split); + firstPart = firstPart.mid(split + 1); + } + + vDebug("Group == " + group_); + vDebug("firstPart == " + firstPart); + vDebug("valuePart == " + valuePart); + + // Now we have the group, the name and param list together and the value. + + TQStrList l; + + RTokenise(firstPart, ";", l); + + if (l.count() == 0) {// invalid - no name ! + vDebug("No name for this content line !"); + return; + } + + name_ = l.at(0); + + // Now we have the name, so the rest of 'l' is the params. + // Remove the name part. + l.remove(0u); + + entityType_ = EntityNameToEntityType(name_); + paramType_ = EntityTypeToParamType(entityType_); + + unsigned int i = 0; + + // For each parameter, create a new parameter of the correct type. + + TQStrListIterator it(l); + + for (; it.current(); ++it, i++) { + + TQCString str = *it; + + split = str.find("="); + if (split < 0 ) { + vDebug("No '=' in parameter."); + continue; + } + + TQCString paraName = str.left(split); + TQCString paraValue = str.mid(split + 1); + + TQStrList paraValues; + RTokenise(paraValue, ",", paraValues); + + TQStrListIterator it2( paraValues ); + + for(; it2.current(); ++it2) { + + Param *p = new Param; + p->setName( paraName ); + p->setValue( *it2 ); + + paramList_.append(p); + } + } + + // Create a new value of the correct type. + + valueType_ = EntityTypeToValueType(entityType_); + +// kdDebug(5710) << "valueType: " << valueType_ << endl; + + switch (valueType_) { + + case ValueSound: value_ = new SoundValue; break; + case ValueAgent: value_ = new AgentValue; break; + case ValueAddress: value_ = new AdrValue; break; + case ValueTel: value_ = new TelValue; break; + case ValueTextBin: value_ = new TextBinValue; break; + case ValueOrg: value_ = new OrgValue; break; + case ValueN: value_ = new NValue; break; + case ValueUTC: value_ = new UTCValue; break; + case ValueURI: value_ = new URIValue; break; + case ValueClass: value_ = new ClassValue; break; + case ValueFloat: value_ = new FloatValue; break; + case ValueImage: value_ = new ImageValue; break; + case ValueDate: value_ = new DateValue; break; + case ValueTextList: value_ = new TextListValue; break; + case ValueGeo: value_ = new GeoValue; break; + case ValueText: + case ValueUnknown: + default: value_ = new TextValue; break; + } + + *value_ = valuePart; +} + + void +ContentLine::_assemble() +{ + vDebug("Assemble (argl) - my name is \"" + name_ + "\""); + strRep_.truncate(0); + + TQCString line; + + if (!group_.isEmpty()) + line += group_ + '.'; + + line += name_; + + vDebug("Adding parameters"); + ParamListIterator it(paramList_); + + for (; it.current(); ++it) + line += ";" + it.current()->asString(); + + vDebug("Adding value"); + if (value_ != 0) + line += ":" + value_->asString(); + else { + vDebug("No value"); + } + + // Quote newlines + line = line.replace( TQRegExp( "\n" ), "\\n" ); + + // Fold lines longer than 72 chars + const int maxLen = 72; + uint cursor = 0; + while( line.length() > ( cursor + 1 ) * maxLen ) { + strRep_ += line.mid( cursor * maxLen, maxLen ); + strRep_ += "\r\n "; + ++cursor; + } + strRep_ += line.mid( cursor * maxLen ); +} + + void +ContentLine::clear() +{ + group_.truncate(0); + name_.truncate(0); + paramList_.clear(); + delete value_; + value_ = 0; + paramType_ = ParamUnknown; + valueType_ = ValueUnknown; + entityType_ = EntityUnknown; +} diff --git a/tdeabc/vcard/DateParam.cpp b/tdeabc/vcard/DateParam.cpp new file mode 100644 index 000000000..ffaf4b3f6 --- /dev/null +++ b/tdeabc/vcard/DateParam.cpp @@ -0,0 +1,82 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +DateParam::DateParam() + : Param() +{ +} + +DateParam::DateParam(const DateParam & x) + : Param(x) +{ +} + +DateParam::DateParam(const TQCString & s) + : Param(s) +{ +} + + DateParam & +DateParam::operator = (DateParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + DateParam & +DateParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +DateParam::operator == (DateParam & x) +{ + x.parse(); + + return false; +} + +DateParam::~DateParam() +{ +} + + void +DateParam::_parse() +{ +} + + void +DateParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/DateValue.cpp b/tdeabc/vcard/DateValue.cpp new file mode 100644 index 000000000..9f578a158 --- /dev/null +++ b/tdeabc/vcard/DateValue.cpp @@ -0,0 +1,434 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include +#include +#include + +using namespace VCARD; + +DateValue::DateValue() + : Value() +{ + vDebug("DateValue::DateValue()"); +} + +DateValue::DateValue( + unsigned int year, + unsigned int month, + unsigned int day, + unsigned int hour, + unsigned int minute, + unsigned int second, + double secFrac, + bool zonePositive, + unsigned int zoneHour, + unsigned int zoneMinute) + : Value (), + year_ (year), + month_ (month), + day_ (day), + hour_ (hour), + minute_ (minute), + second_ (second), + zoneHour_ (zoneHour), + zoneMinute_ (zoneMinute), + secFrac_ (secFrac), + zonePositive_ (zonePositive), + hasTime_(true) +{ + parsed_ = true; + assembled_ = false; +} + +DateValue::DateValue(const TQDate & d) + : Value (), + year_ (d.year()), + month_ (d.month()), + day_ (d.day()), + hasTime_(false) +{ + parsed_ = true; + assembled_ = false; +} + +DateValue::DateValue(const TQDateTime & d) + : Value (), + year_ (d.date().year()), + month_ (d.date().month()), + day_ (d.date().day()), + hour_ (d.time().hour()), + minute_ (d.time().minute()), + second_ (d.time().second()), + hasTime_(true) +{ + parsed_ = true; + assembled_ = false; +} + +DateValue::DateValue(const DateValue & x) + : Value(x) +{ + year_ = x.year_; + month_ = x.month_; + day_ = x.day_; + hour_ = x.hour_; + minute_ = x.minute_; + second_ = x.second_; + zoneHour_ = x.zoneHour_; + zoneMinute_ = x.zoneMinute_; + secFrac_ = x.secFrac_; + hasTime_ = x.hasTime_; +} + +DateValue::DateValue(const TQCString & s) + : Value(s) +{ +} + + DateValue & +DateValue::operator = (DateValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + DateValue & +DateValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +DateValue::operator == (DateValue & x) +{ + x.parse(); + return false; +} + +DateValue::~DateValue() +{ +} + + DateValue * +DateValue::clone() +{ + return new DateValue( *this ); +} + + void +DateValue::_parse() +{ + vDebug("DateValue::_parse()"); + + // date = date-full-year ["-"] date-month ["-"] date-mday + // time = time-hour [":"] time-minute [":"] time-second [":"] + // [time-secfrac] [time-zone] + + int timeSep = strRep_.find('T'); + + TQCString dateStr; + TQCString timeStr; + + if (timeSep == -1) { + + dateStr = strRep_; + vDebug("Has date string \"" + dateStr + "\""); + + } else { + + dateStr = strRep_.left(timeSep); + vDebug("Has date string \"" + dateStr + "\""); + + timeStr = strRep_.mid(timeSep + 1); + vDebug("Has time string \"" + timeStr + "\""); + } + + /////////////////////////////////////////////////////////////// DATE + + dateStr.replace(TQRegExp("-"), ""); + + kdDebug(5710) << "dateStr: " << dateStr << endl; + + year_ = dateStr.left(4).toInt(); + month_ = dateStr.mid(4, 2).toInt(); + day_ = dateStr.right(2).toInt(); + + if (timeSep == -1) { + hasTime_ = false; + return; // No time, done. + } + else + hasTime_ = true; + + /////////////////////////////////////////////////////////////// TIME + + /////////////////////////////////////////////////////////////// ZONE + + int zoneSep = timeStr.find('Z'); + + if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { + + TQCString zoneStr(timeStr.mid(zoneSep + 1)); + vDebug("zoneStr == " + zoneStr); + + zonePositive_ = (zoneStr[0] == '+'); + zoneHour_ = zoneStr.mid(1, 2).toInt(); + zoneMinute_ = zoneStr.right(2).toInt(); + + timeStr.remove(zoneSep, timeStr.length() - zoneSep); + } + + //////////////////////////////////////////////////// SECOND FRACTION + + int secFracSep = timeStr.findRev(','); + + if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. + TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); + secFrac_ = quirkafleeg.toDouble(); + } + + /////////////////////////////////////////////////////////////// HMS + + timeStr.replace(TQRegExp(":"), ""); + + hour_ = timeStr.left(2).toInt(); + minute_ = timeStr.mid(2, 2).toInt(); + second_ = timeStr.mid(4, 2).toInt(); +} + + void +DateValue::_assemble() +{ + vDebug("DateValue::_assemble"); + + TQCString year; + TQCString month; + TQCString day; + + year.setNum( year_ ); + month.setNum( month_ ); + day.setNum( day_ ); + + if ( month.length() < 2 ) month.prepend( "0" ); + if ( day.length() < 2 ) day.prepend( "0" ); + + strRep_ = year + '-' + month + '-' + day; + + if ( hasTime_ ) { + TQCString hour; + TQCString minute; + TQCString second; + + hour.setNum( hour_ ); + minute.setNum( minute_ ); + second.setNum( second_ ); + + if ( hour.length() < 2 ) hour.prepend( "0" ); + if ( minute.length() < 2 ) minute.prepend( "0" ); + if ( second.length() < 2 ) second.prepend( "0" ); + + strRep_ += 'T' + hour + ':' + minute + ':' + second + 'Z'; + } +} + + unsigned int +DateValue::year() +{ + parse(); + return year_; +} + + unsigned int +DateValue::month() +{ + parse(); + return month_; +} + + unsigned int +DateValue::day() +{ + parse(); + return day_; +} + unsigned int +DateValue::hour() +{ + parse(); + return hour_; +} + + unsigned int +DateValue::minute() +{ + parse(); + return minute_; +} + + unsigned int +DateValue::second() +{ + parse(); + return second_; +} + + double +DateValue::secondFraction() +{ + parse(); + return secFrac_; +} + + bool +DateValue::zonePositive() +{ + parse(); + return zonePositive_; +} + + unsigned int +DateValue::zoneHour() +{ + parse(); + return zoneHour_; +} + + unsigned int +DateValue::zoneMinute() +{ + parse(); + return zoneMinute_; +} + + void +DateValue::setYear(unsigned int i) +{ + year_ = i; + assembled_ = false; +} + + void +DateValue::setMonth(unsigned int i) +{ + month_ = i; + assembled_ = false; +} + + void +DateValue::setDay(unsigned int i) +{ + day_ = i; + assembled_ = false; +} + + void +DateValue::setHour(unsigned int i) +{ + hour_ = i; + assembled_ = false; +} + + void +DateValue::setMinute(unsigned int i) +{ + minute_ = i; + assembled_ = false; +} + + void +DateValue::setSecond(unsigned int i) +{ + second_ = i; + assembled_ = false; +} + + void +DateValue::setSecondFraction(double d) +{ + secFrac_ = d; + assembled_ = false; +} + + void +DateValue::setZonePositive(bool b) +{ + zonePositive_ = b; + assembled_ = false; +} + + void +DateValue::setZoneHour(unsigned int i) +{ + zoneHour_ = i; + assembled_ = false; +} + + void +DateValue::setZoneMinute(unsigned int i) +{ + zoneMinute_ = i; + assembled_ = false; +} + + TQDate +DateValue::qdate() +{ + parse(); + TQDate d(year_, month_, day_); + return d; +} + + TQTime +DateValue::qtime() +{ + parse(); + TQTime t(hour_, minute_, second_); +// t.setMs(1 / secFrac_); + return t; +} + + TQDateTime +DateValue::qdt() +{ + parse(); + TQDateTime dt; + dt.setDate(qdate()); + dt.setTime(qtime()); + return dt; +} + + bool +DateValue::hasTime() +{ + parse(); + return hasTime_; +} + diff --git a/tdeabc/vcard/EmailParam.cpp b/tdeabc/vcard/EmailParam.cpp new file mode 100644 index 000000000..7daf19ccc --- /dev/null +++ b/tdeabc/vcard/EmailParam.cpp @@ -0,0 +1,116 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +using namespace VCARD; + +EmailParam::EmailParam() + : Param() +{ + vDebug("ctor"); +} + +EmailParam::EmailParam(const EmailParam & x) + : Param(x), + emailType_ (x.emailType_), + pref_ (x.pref_) +{ +} + +EmailParam::EmailParam(const TQCString & s) + : Param(s) +{ +} + + EmailParam & +EmailParam::operator = (EmailParam & x) +{ + if (*this == x) return *this; + + emailType_ = x.emailType(); + pref_ = x.pref_; + + Param::operator = (x); + return *this; +} + + EmailParam & +EmailParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +EmailParam::operator == (EmailParam & x) +{ + parse(); + + if (pref_) + return (x.pref_ && x.emailType() == emailType_); + + return !x.pref(); +} + +EmailParam::~EmailParam() +{ +} + + void +EmailParam::_parse() +{ +#if 0 + Param::parseToList(); + + SubParamListIterator it(subParamList_); + + pref_ = true; + emailType_ = ""; + + for (; it.current(); ++it) { + + if (tqstricmp(it.current()->name(), "TYPE") == 0) { + emailType_ = it.current()->value(); + continue; + } + + if (tqstricmp(it.current()->name(), "PREF") == 0) { + pref_ = true; + } + } +#endif +} + + void +EmailParam::_assemble() +{ + strRep_ = "TYPE="; + strRep_ += emailType_; + + if (pref_) + strRep_ += ",PREF"; +} + diff --git a/tdeabc/vcard/Entity.cpp b/tdeabc/vcard/Entity.cpp new file mode 100644 index 000000000..5eaf6a1d0 --- /dev/null +++ b/tdeabc/vcard/Entity.cpp @@ -0,0 +1,134 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +using namespace VCARD; + +Entity::Entity() + : parsed_ (false), + assembled_ (true) +{ + // empty +} + +Entity::Entity(const Entity & e) + : strRep_ (e.strRep_), + parsed_ (e.parsed_), + assembled_ (e.assembled_) +{ + // empty +} + +Entity::Entity(const TQCString & s) + : strRep_ (s), + parsed_ (false), + assembled_ (true) +{ + // empty +} + + Entity & +Entity::operator = (const Entity & e) +{ + if (this == &e) return *this; + + strRep_ = e.strRep_; + parsed_ = e.parsed_; + assembled_ = e.assembled_; + + return *this; +} + + Entity & +Entity::operator = (const TQCString & s) +{ + strRep_ = s; + parsed_ = false; + assembled_ = true; + + return *this; +} + + bool +Entity::operator == (Entity & e) +{ + return asString() == e.asString(); +} + + bool +Entity::operator != (Entity & e) +{ + return !(*this == e); +} + + bool +Entity::operator == (const TQCString & s) +{ + return asString() == s; +} + + bool +Entity::operator != (const TQCString & s) +{ + return !(*this == s); +} + +Entity::~Entity() +{ + // empty +} + + TQCString +Entity::asString() +{ +// vDebug("Entity::asString()"); + assemble(); + + return strRep_; +} + + void +Entity::parse() +{ +// vDebug( "Entity::parse()" ); + + if (!parsed_) _parse(); + + parsed_ = true; + assembled_ = false; +} + + void +Entity::assemble() +{ +// vDebug( "Entity::assemble()" ); + + if (assembled_) return; + + parse(); + _assemble(); + + assembled_ = true; +} + diff --git a/tdeabc/vcard/Enum.cpp b/tdeabc/vcard/Enum.cpp new file mode 100644 index 000000000..bcb48f98a --- /dev/null +++ b/tdeabc/vcard/Enum.cpp @@ -0,0 +1,490 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include + +#include + +using namespace VCARD; + +// There are 31 possible types, not including extensions. +// URI is a custom field designed to store the upstream URI for each contact +// in order to handle certain limited CardDAV systems such as Zimbra + const TQCString +VCARD::paramNames [] = +{ + "NAME", + "PROFILE", + "SOURCE", + "FN", + "N", + "NICKNAME", + "PHOTO", + "BDAY", + "ADR", + "LABEL", + "TEL", + "EMAIL", + "MAILER", + "TZ", + "GEO", + "TITLE", + "ROLE", + "LOGO", + "AGENT", + "ORG", + "CATEGORIES", + "NOTE", + "PRODID", + "REV", + "SORT-STRING", + "SOUND", + "UID", + "URL", + "VERSION", + "CLASS", + "KEY", + "URI" +}; + + const ParamType +VCARD::paramTypesTable[] = { + ParamNone, // NAME + ParamNone, // PROFILE + ParamSource, // SOURCE + ParamText, // FN + ParamText, // N + ParamText, // NICKNAME + ParamImage, // PHOTO (inline/refer) + ParamDate, // BDAY ("VALUE = "date-time/date) + ParamAddrText, // ADR (adr-param/text-param) + ParamAddrText, // LABEL (adr-param/text-param) + ParamTel, // TEL + ParamEmail, // EMAIL + ParamText, // MAILER + ParamNone, // TZ + ParamNone, // GEO + ParamText, // TITLE + ParamText, // ROLE + ParamImage, // LOGO + ParamAgent, // AGENT + ParamText, // ORG + ParamText, // CATEGORIES + ParamText, // NOTE + ParamNone, // PRODID + ParamDate, // REV + ParamText, // SORT-STRING + ParamSound, // SOUND + ParamNone, // UID + ParamNone, // URL + ParamNone, // VERSION + ParamNone, // CLASS + ParamTextBin, // KEY + ParamTextNS, // X + ParamNone // URI +}; + + ParamType +VCARD::EntityTypeToParamType(EntityType e) +{ + ParamType t(ParamUnknown); + + switch (e) { + + //---------------------------------------------------------------// + case EntityAgent: t = ParamAgent; break; + //---------------------------------------------------------------// + case EntitySound: t = ParamSound; break; + //---------------------------------------------------------------// + case EntitySource: t = ParamSource; break; + //---------------------------------------------------------------// + case EntityTelephone: t = ParamTel; break; + //---------------------------------------------------------------// + case EntityEmail: t = ParamEmail; break; + //---------------------------------------------------------------// + case EntityKey: t = ParamTextBin; break; + //---------------------------------------------------------------// + case EntityExtension: t = ParamTextNS; break; + //---------------------------------------------------------------// + case EntityAddress: + case EntityLabel: t = ParamAddrText; break; + //---------------------------------------------------------------// + case EntityBirthday: + case EntityRevision: t = ParamDate; break; + //---------------------------------------------------------------// + case EntityPhoto: + case EntityLogo: t = ParamImage; break; + //---------------------------------------------------------------// + case EntityOrganisation: + case EntityTitle: + case EntityRole: + case EntityFullName: + case EntityMailer: + case EntityN: + case EntitySortString: + case EntityNickname: + case EntityCategories: + case EntityNote: t = ParamText; break; + //---------------------------------------------------------------// + case EntityProductID: + case EntityTimeZone: + case EntityUID: + case EntityURL: + case EntityClass: + case EntityGeo: + case EntityName: + case EntityVersion: + case EntityProfile: + case EntityURI: + default: t = ParamNone; break; + //---------------------------------------------------------------// + + } + + return t; +} + + ValueType +VCARD::EntityTypeToValueType(EntityType e) +{ + ValueType t(ValueUnknown); + + switch (e) { + + //---------------------------------------------------------------// + case EntitySound: t = ValueSound; break; + //---------------------------------------------------------------// + case EntityAgent: t = ValueAgent; break; + //---------------------------------------------------------------// + case EntityAddress: t = ValueAddress; break; + //---------------------------------------------------------------// + case EntityTelephone: t = ValueTel; break; + //---------------------------------------------------------------// + case EntityKey: t = ValueTextBin; break; + //---------------------------------------------------------------// + case EntityOrganisation: t = ValueOrg; break; + //---------------------------------------------------------------// + case EntityN: t = ValueN; break; + //---------------------------------------------------------------// + case EntityTimeZone: t = ValueUTC; break; + //---------------------------------------------------------------// + case EntityClass: t = ValueClass; break; + //---------------------------------------------------------------// + case EntityGeo: t = ValueGeo; break; + //---------------------------------------------------------------// + case EntitySource: + case EntityURL: t = ValueURI; break; + //---------------------------------------------------------------// + case EntityPhoto: + case EntityLogo: t = ValueImage; break; + //---------------------------------------------------------------// + case EntityBirthday: + case EntityRevision: t = ValueDate; break; + //---------------------------------------------------------------// + case EntityCategories: + case EntityNickname: t = ValueTextList; break; + //---------------------------------------------------------------// + case EntityLabel: + case EntityExtension: + case EntityEmail: + case EntityTitle: + case EntityRole: + case EntityFullName: + case EntityMailer: + case EntityProductID: + case EntityName: + case EntitySortString: + case EntityVersion: + case EntityProfile: + case EntityUID: + case EntityNote: + case EntityURI: + default: t = ValueText; break; + //---------------------------------------------------------------// + + } + + return t; +} + + TQCString +VCARD::EntityTypeToParamName(EntityType e) +{ + if ( e > EntityUnknown ) e = EntityUnknown; + return paramNames[ int( e ) ]; +} + + EntityType +VCARD::EntityNameToEntityType(const TQCString & s) +{ + if (s.isEmpty()) return EntityUnknown; + + EntityType t(EntityUnknown); + + switch (s[0]) { + + case 'A': + if (s == "ADR") + t = EntityAddress; + else if (s == "AGENT") + t = EntityAgent; + break; + + case 'B': + if (s == "BDAY") + t = EntityBirthday; + break; + + case 'C': + if (s == "CATEGORIES") + t = EntityCategories; + else if (s == "CLASS") + t = EntityClass; + break; + + case 'E': + if (s == "EMAIL") + t = EntityEmail; + break; + + case 'F': + if (s == "FN") + t = EntityFullName; + break; + + case 'G': + if (s == "GEO") + t = EntityGeo; + break; + + case 'K': + if (s == "KEY") + t = EntityKey; + break; + + case 'L': + if (s == "LABEL") + t = EntityLabel; + else if (s == "LOGO") + t = EntityLogo; + break; + + case 'M': + if (s == "MAILER") + t = EntityMailer; + break; + + case 'N': + if (s == "N") + t = EntityN; + else if (s == "NAME") + t = EntityName; + else if (s == "NICKNAME") + t = EntityNickname; + else if (s == "NOTE") + t = EntityNote; + break; + + case 'O': + if (s == "ORG") + t = EntityOrganisation; + break; + + case 'P': + if (s == "PHOTO") + t = EntityPhoto; + else if (s == "PRODID") + t = EntityProductID; + else if (s == "PROFILE") + t = EntityProfile; + break; + + case 'R': + if (s == "REV") + t = EntityRevision; + else if (s == "ROLE") + t = EntityRole; + break; + + case 'S': + if (s == "SORT-STRING") + t = EntitySortString; + else if (s == "SOUND") + t = EntitySound; + else if (s == "SOURCE") + t = EntitySource; + break; + + case 'T': + if (s == "TEL") + t = EntityTelephone; + else if (s == "TITLE") + t = EntityTitle; + else if (s == "TZ") + t = EntityTimeZone; + break; + + case 'U': + if (s == "UID") + t = EntityUID; + else if (s == "URL") + t = EntityURL; + else if (s == "URI") + t = EntityURI; + case 'V': + if (s == "VERSION") + t = EntityVersion; + break; + + case 'X': + if (s.left(2) == "X-") + t = EntityExtension; + break; + + default: + + t = EntityUnknown; + } + + return t; +} + +// The copyright notice below refers to the base64 codec functions used below, +// which are modified from the original sources. + +/* + * Original version Copyright 1988 by The Leland Stanford Junior University + * Copyright 1998 by the University of Washington + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notices appear in all copies and that both the + * above copyright notices and this permission notice appear in supporting + * documentation, and that the name of the University of Washington or The + * Leland Stanford Junior University not be used in advertising or publicity + * pertaining to distribution of the software without specific, written prior + * permission. This software is made available "as is", and + * THE UNIVERSITY OF WASHINGTON AND THE LELAND STANFORD JUNIOR UNIVERSITY + * DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE, + * INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF + * WASHINGTON OR THE LELAND STANFORD JUNIOR UNIVERSITY BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +static char B64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +// the mime base64 disctionary used for decoding +static signed char b64dec[] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30 + -1, -1, -1,-19, -1, -1, -1,-16, -4, -4, // 40 -19 == '+' -16 == '/' + -4, -4, -4, -4, -4, -4, -4, -4, -1, -1, // 50 -4 == '0' + -1, 0, -1, -1, -1, 65, 65, 65, 65, 65, // 60 0 == '=' 65 == 'A' + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 70 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, // 80 + 65, -1, -1, -1, -1, -1, -1, 71, 71, 71, // 90 71 == 'a' + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 100 + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, // 110 + 71, 71, 71, -1, -1, -1, -1, -1, -1, -1, // 120 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 130 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 140 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 150 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 160 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 170 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 180 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 190 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 200 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 210 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 220 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 230 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 240 + -1, -1, -1, -1, -1, -1, -1 // 250 +}; + + char * +VCARD::decodeBase64(const char * s, unsigned long srcl, unsigned long & len) +{ + register unsigned char c; + register unsigned long e(0); + len = 0; + unsigned const char * src = (unsigned const char *)s; + char * ret = new char[srcl + (srcl / 4 + 1)]; + register char *d = ret; + while (srcl--) { // Critical loop + c = *src++; + int dec = b64dec[c]; + if (dec == -1) continue; + if (c == '=') { + switch (e++) { + case 3: e = 0; break; + case 2: if (*src == '=') break; + default: delete [] ret; ret = 0; return 0; break; + } + continue; + } + c -= dec; + if (e == 0) { *d = c << 2; ++e; continue; } + switch (e) { + case 1: *d |= c >> 4; *++d = c << 4; break; + case 2: *d |= c >> 2; *++d = c << 6; break; + case 3: *d++ |= c; e = 0; continue; break; + } + ++e; + } + len = d - (char *)ret; + return ret; +} + + + char * +VCARD::encodeBase64(const char * src, unsigned long srcl, unsigned long & destl) +{ + register const unsigned char *s = (unsigned char *)src; + register unsigned long i = ((srcl + 2) / 3) * 4; + destl = i += 2 * ((i / 60) + 1); + i = 0; + char * ret = new char[destl]; + register unsigned char *d((unsigned char *)ret); + while (srcl != 0) { // Critical loop + *d++ = B64[s[0] >> 2]; + *d++ = B64[((s[0] << 4) + (--srcl == 0 ? 0 : s[1] >> 4)) & 0x3f]; + *d++ = srcl == 0 ? '=' : + B64[((s[1] << 2) + (--srcl == 0 ? 0 : s[2] >> 6)) & 0x3f]; + *d++ = srcl == 0 ? '=' : B64[s[2] & 0x3f]; + if (srcl != 0) srcl--; + if (++i == 15) { i = 0; *d++ = '\r'; *d++ = '\n'; } + s += 3; + } + *d = '\r'; *++d = '\n'; *++d = '\0'; + return ret; +} + diff --git a/tdeabc/vcard/FloatValue.cpp b/tdeabc/vcard/FloatValue.cpp new file mode 100644 index 000000000..ac1f2c6b5 --- /dev/null +++ b/tdeabc/vcard/FloatValue.cpp @@ -0,0 +1,120 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +FloatValue::FloatValue() + : Value() +{ +} + +FloatValue::FloatValue(float f) + : Value (), + value_ (f) +{ + parsed_ = true; +} + +FloatValue::FloatValue(const FloatValue & x) + : Value(x) +{ + value_ = x.value_; +} + +FloatValue::FloatValue(const TQCString & s) + : Value(s) +{ +} + + FloatValue & +FloatValue::operator = (FloatValue & x) +{ + if (*this == x) return *this; + + x.parse(); + value_ = x.value_; + + Value::operator = (x); + return *this; +} + + FloatValue & +FloatValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +FloatValue::operator == (FloatValue & x) +{ + x.parse(); + return (value_ == x.value_); +} + +FloatValue::~FloatValue() +{ +} + + void +FloatValue::_parse() +{ + bool negative(false); + + if (strRep_[0] == '-' || strRep_[1] == '+') { + + if (strRep_[0] == '-') + negative = true; + + strRep_.remove(0, 1); + } + + value_ = strRep_.toFloat(); + if (negative) + value_ = -value_; +} + + void +FloatValue::_assemble() +{ + strRep_ = TQCString().setNum(value_); +} + + float +FloatValue::value() +{ + parse(); + return value_; +} + + void +FloatValue::setValue(float f) +{ + parsed_ = true; + value_ = f; +} + diff --git a/tdeabc/vcard/GeoValue.cpp b/tdeabc/vcard/GeoValue.cpp new file mode 100644 index 000000000..2bac28c1e --- /dev/null +++ b/tdeabc/vcard/GeoValue.cpp @@ -0,0 +1,100 @@ +/* + This file is part of libvcard. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +GeoValue::GeoValue() + : Value() +{ +} + +GeoValue::GeoValue(const GeoValue & x) + : Value(x), latitude_(x.latitude_), longitude_(x.longitude_) +{ +} + +GeoValue::GeoValue(const TQCString & s) + : Value(s) +{ +} + + GeoValue & +GeoValue::operator = (GeoValue & x) +{ + if (*this == x) return *this; + + latitude_ = x.latitude_; + longitude_ = x.longitude_; + + Value::operator = (x); + return *this; +} + + GeoValue & +GeoValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +GeoValue::operator == (GeoValue & x) +{ + x.parse(); + + if ( latitude_ != x.latitude_ ) return false; + if ( longitude_ != x.longitude_ ) return false; + + return true; +} + +GeoValue::~GeoValue() +{ +} + + GeoValue * +GeoValue::clone() +{ + return new GeoValue( *this ); +} + + void +GeoValue::_parse() +{ + int semiColon = strRep_.find( ";" ); + + if ( semiColon == -1 ) // invalid + return; + + latitude_ = strRep_.left( semiColon ).toFloat(); + longitude_ = strRep_.mid( semiColon + 1, strRep_.length() - semiColon ).toFloat(); +} + + void +GeoValue::_assemble() +{ + strRep_.sprintf( "%.6f;%.6f", latitude_, longitude_ ); +} diff --git a/tdeabc/vcard/ImageParam.cpp b/tdeabc/vcard/ImageParam.cpp new file mode 100644 index 000000000..69611eeab --- /dev/null +++ b/tdeabc/vcard/ImageParam.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +ImageParam::ImageParam() + : Param() +{ +} + +ImageParam::ImageParam(const ImageParam & x) + : Param(x) +{ +} + +ImageParam::ImageParam(const TQCString & s) + : Param(s) +{ +} + + ImageParam & +ImageParam::operator = (ImageParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + ImageParam & +ImageParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +ImageParam::operator == (ImageParam & x) +{ + x.parse(); + return false; +} + +ImageParam::~ImageParam() +{ +} + + void +ImageParam::_parse() +{ +} + + void +ImageParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/ImageValue.cpp b/tdeabc/vcard/ImageValue.cpp new file mode 100644 index 000000000..5d8d29bb7 --- /dev/null +++ b/tdeabc/vcard/ImageValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +ImageValue::ImageValue() + : Value() +{ +} + +ImageValue::ImageValue(const ImageValue & x) + : Value(x) +{ +} + +ImageValue::ImageValue(const TQCString & s) + : Value(s) +{ +} + + ImageValue & +ImageValue::operator = (ImageValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + ImageValue & +ImageValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +ImageValue::operator == (ImageValue & x) +{ + x.parse(); + return false; +} + +ImageValue::~ImageValue() +{ +} + + void +ImageValue::_parse() +{ +} + + void +ImageValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/ImgValue.cpp b/tdeabc/vcard/ImgValue.cpp new file mode 100644 index 000000000..42889acd8 --- /dev/null +++ b/tdeabc/vcard/ImgValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +ImgValue::ImgValue() + : Value() +{ +} + +ImgValue::ImgValue(const ImgValue & x) + : Value(x) +{ +} + +ImgValue::ImgValue(const TQCString & s) + : Value(s) +{ +} + + ImgValue & +ImgValue::operator = (ImgValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + ImgValue & +ImgValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +ImgValue::operator == (ImgValue & x) +{ + x.parse(); + return false; +} + +ImgValue::~ImgValue() +{ +} + + void +ImgValue::_parse() +{ +} + + void +ImgValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/LangValue.cpp b/tdeabc/vcard/LangValue.cpp new file mode 100644 index 000000000..f7e5a759e --- /dev/null +++ b/tdeabc/vcard/LangValue.cpp @@ -0,0 +1,127 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +LangValue::LangValue() + : Value() +{ +} + +LangValue::LangValue(const LangValue & x) + : Value(x) +{ +} + +LangValue::LangValue(const TQCString & s) + : Value(s) +{ +} + + LangValue & +LangValue::operator = (LangValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + LangValue & +LangValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +LangValue::operator == (LangValue & x) +{ + x.parse(); + return false; +} + +LangValue::~LangValue() +{ +} + + void +LangValue::_parse() +{ + TQStrList l; + RTokenise(strRep_, "-", l); + + if (l.count() == 0) return; + + primary_ = l.at(0); + + l.remove(0u); + + subtags_ = l; +} + + void +LangValue::_assemble() +{ + strRep_ = primary_; + + TQStrListIterator it(subtags_); + + for (; it.current(); ++it) + strRep_ += TQCString('-') + it.current(); +} + + TQCString +LangValue::primary() +{ + parse(); + return primary_; +} + + TQStrList +LangValue::subtags() +{ + parse(); + return subtags_; +} + + void +LangValue::setPrimary(const TQCString & s) +{ + parse(); + primary_ = s; +} + + void +LangValue::setSubTags(const TQStrList & l) +{ + parse(); + subtags_ = l; +} + diff --git a/tdeabc/vcard/Makefile.am b/tdeabc/vcard/Makefile.am new file mode 100644 index 000000000..e8a33c3a9 --- /dev/null +++ b/tdeabc/vcard/Makefile.am @@ -0,0 +1,21 @@ +INCLUDES = \ + -I$(srcdir)/include \ + -I$(srcdir)/include/generated \ + $(all_includes) + +### KDE 4.0: either make noinst or rename to something like libkvcard +lib_LTLIBRARIES = libvcard.la + +libvcard_la_SOURCES = vCard-all.cpp +libvcard_la_LDFLAGS = $(all_libraries) +libvcard_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) + +check_PROGRAMS = testwrite testread + +testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testwrite_LDADD = libvcard.la +testwrite_SOURCES = testwrite.cpp + +testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testread_LDADD = libvcard.la +testread_SOURCES = testread.cpp diff --git a/tdeabc/vcard/NValue.cpp b/tdeabc/vcard/NValue.cpp new file mode 100644 index 000000000..e63268134 --- /dev/null +++ b/tdeabc/vcard/NValue.cpp @@ -0,0 +1,128 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include +#include +#include + +using namespace VCARD; + +NValue::NValue() + : Value() +{ + vDebug("ctor"); +} + +NValue::NValue(const NValue & x) + : Value(x), + family_ (x.family_), + given_ (x.given_), + middle_ (x.middle_), + prefix_ (x.prefix_), + suffix_ (x.suffix_) +{ +} + +NValue::NValue(const TQCString & s) + : Value(s) +{ + vDebug("ctor"); +} + + NValue & +NValue::operator = (NValue & x) +{ + if (*this == x) return *this; + + family_ = x.family_; + given_ = x.given_; + middle_ = x.middle_; + prefix_ = x.prefix_; + suffix_ = x.suffix_; + + Value::operator = (x); + return *this; +} + + NValue & +NValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +NValue::operator == (NValue & x) +{ + x.parse(); + + return ( + family_ == x.family_ && + given_ == x.given_ && + middle_ == x.middle_ && + prefix_ == x.prefix_ && + suffix_ == x.suffix_); +} + +NValue::~NValue() +{ +} + + NValue * +NValue::clone() +{ + return new NValue( *this ); +} + + void +NValue::_parse() +{ + TQStrList l; + RTokenise(strRep_, ";", l); + + for (unsigned int i = 0; i < l.count(); i++) { + + switch (i) { + case 0: family_ = l.at(0); break; + case 1: given_ = l.at(1); break; + case 2: middle_ = l.at(2); break; + case 3: prefix_ = l.at(3); break; + case 4: suffix_ = l.at(4); break; + default: break; + } + } +} + + void +NValue::_assemble() +{ + strRep_ = family_; + strRep_ += ";" + given_; + strRep_ += ";" + middle_; + strRep_ += ";" + prefix_; + strRep_ += ";" + suffix_; +} + diff --git a/tdeabc/vcard/OrgValue.cpp b/tdeabc/vcard/OrgValue.cpp new file mode 100644 index 000000000..94ca18243 --- /dev/null +++ b/tdeabc/vcard/OrgValue.cpp @@ -0,0 +1,107 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +OrgValue::OrgValue() + : Value() +{ +} + +OrgValue::OrgValue(const OrgValue & x) + : Value(x) +{ +} + +OrgValue::OrgValue(const TQCString & s) + : Value(s) +{ +} + + OrgValue & +OrgValue::operator = (OrgValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + OrgValue & +OrgValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +OrgValue::operator == (OrgValue & x) +{ + x.parse(); + return false; +} + +OrgValue::~OrgValue() +{ +} + + void +OrgValue::_parse() +{ + RTokenise(strRep_, ";", valueList_); +} + + void +OrgValue::_assemble() +{ + bool first(true); + + TQStrListIterator it(valueList_); + + for (; it.current(); ++it) { + if (!first) strRep_ += ';'; + strRep_ += it.current(); + first = false; + } +} + + unsigned int +OrgValue::numValues() +{ + parse(); + return valueList_.count(); +} + + TQCString +OrgValue::value(unsigned int i) +{ + parse(); + return valueList_.at(i); +} + diff --git a/tdeabc/vcard/Param.cpp b/tdeabc/vcard/Param.cpp new file mode 100644 index 000000000..8c5ad9e2c --- /dev/null +++ b/tdeabc/vcard/Param.cpp @@ -0,0 +1,129 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +Param::Param() + : Entity(), + name_(""), + value_("") +{ +} + +Param::Param(const Param & x) + : Entity(x), + name_(x.name_), + value_(x.value_) +{ +} + +Param::Param(const TQCString & s) + : Entity(s), + name_(""), + value_("") +{ +} + + Param & +Param::operator = (Param & x) +{ + if (*this == x) return *this; + + Entity::operator = (x); + name_ = x.name_; + value_ = x.value_; + + return *this; +} + + Param & +Param::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +Param::operator == (Param & x) +{ + x.parse(); + return false; +} + +Param::~Param() +{ +} + + void +Param::_parse() +{ +} + + void +Param::_assemble() +{ + strRep_ = name_ + "=" + value_; +} + +Param::Param(const TQCString &name, const TQCString &value) + : Entity(), + name_(name), + value_(value) +{ + parsed_ = true; + assembled_ = false; +} + + void +Param::setName(const TQCString & name) +{ + name_ = name; + + assembled_ = false; +} + + void +Param::setValue(const TQCString & value) +{ + value_ = value; + + assembled_ = false; +} + + TQCString +Param::name() +{ + return name_; +} + + TQCString +Param::value() +{ + return value_; +} diff --git a/tdeabc/vcard/PhoneNumberValue.cpp b/tdeabc/vcard/PhoneNumberValue.cpp new file mode 100644 index 000000000..02a1266fe --- /dev/null +++ b/tdeabc/vcard/PhoneNumberValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +PhoneNumberValue::PhoneNumberValue() + : Value() +{ +} + +PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) + : Value(x) +{ +} + +PhoneNumberValue::PhoneNumberValue(const TQCString & s) + : Value(s) +{ +} + + PhoneNumberValue & +PhoneNumberValue::operator = (PhoneNumberValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + PhoneNumberValue & +PhoneNumberValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +PhoneNumberValue::operator == (PhoneNumberValue & x) +{ + x.parse(); + return false; +} + +PhoneNumberValue::~PhoneNumberValue() +{ +} + + void +PhoneNumberValue::_parse() +{ +} + + void +PhoneNumberValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/README b/tdeabc/vcard/README new file mode 100644 index 000000000..18a9daf4a --- /dev/null +++ b/tdeabc/vcard/README @@ -0,0 +1,15 @@ +libvcard (C) 1999 Rik Hemsley +Written for the KDE project. + +This software is licensed under the MIT license. + +A vCard 3.0 parser based on the same principles that librmm (from Empath) uses. + +It's small and very fast due to parsing and assembly of object being lazy. + +There is a base64 codec declared in Enum.h + +Feedback welcome. + +Rik + diff --git a/tdeabc/vcard/RToken.cpp b/tdeabc/vcard/RToken.cpp new file mode 100644 index 000000000..582a9e1c7 --- /dev/null +++ b/tdeabc/vcard/RToken.cpp @@ -0,0 +1,88 @@ +/* + + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include +#include + +namespace VCARD +{ + + TQ_UINT32 +RTokenise(const char * str, const char * delim, TQStrList & l) +{ + // FIXME no stderr ! + l.clear(); + + if (!delim || !str || strlen(delim) == 0 || strlen(str) == 0) return 0; + + char * len = (char *)(str + strlen(str)); // End of string. + + register char * rstart = new char[strlen(str) + 1]; + register char * r = rstart; + + + register const char * i = str; // Cursor. + + while (i <= len) { + + if (*i == '\\') { // Escaped chars go straight through. + *r++ = *i++; + if (i <= len) + *r++ = *i++; + continue; + } + + if (strchr(delim, *i) != 0) { + // We hit a delimiter. If we have some text, make a new token. + // This has the effect that multiple delimiters are collapsed. + // cs: We mustn't collapse multiple delimiters, otherwise we + // lose empty fields. + *r = '\0'; +// if (r != rstart) { + l.append(rstart); +// } + r = rstart; + ++i; + continue; + } + + *r++ = *i++; + } + + // Catch last token +// if (r != rstart) { + *r = '\0'; + l.append(rstart); +// } + + r = 0; + + delete [] rstart; + + return l.count(); +} + +} diff --git a/tdeabc/vcard/SoundValue.cpp b/tdeabc/vcard/SoundValue.cpp new file mode 100644 index 000000000..5be75d358 --- /dev/null +++ b/tdeabc/vcard/SoundValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +SoundValue::SoundValue() + : Value() +{ +} + +SoundValue::SoundValue(const SoundValue & x) + : Value(x) +{ +} + +SoundValue::SoundValue(const TQCString & s) + : Value(s) +{ +} + + SoundValue & +SoundValue::operator = (SoundValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + SoundValue & +SoundValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +SoundValue::operator == (SoundValue & x) +{ + x.parse(); + return false; +} + +SoundValue::~SoundValue() +{ +} + + void +SoundValue::_parse() +{ +} + + void +SoundValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/SourceParam.cpp b/tdeabc/vcard/SourceParam.cpp new file mode 100644 index 000000000..6a0e772ac --- /dev/null +++ b/tdeabc/vcard/SourceParam.cpp @@ -0,0 +1,112 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +SourceParam::SourceParam() + : Param(), + type_(SourceParam::TypeUnknown) +{ +} + +SourceParam::SourceParam(const SourceParam & x) + : Param(x), + type_ (x.type_), + par_ (x.par_), + val_ (x.val_) +{ +} + +SourceParam::SourceParam(const TQCString & s) + : Param(s), + type_(SourceParam::TypeUnknown) +{ +} + + SourceParam & +SourceParam::operator = (SourceParam & x) +{ + if (*this == x) return *this; + type_ = x.type(); + par_ = x.par(); + val_ = x.val(); + + Param::operator = (x); + return *this; +} + + SourceParam & +SourceParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +SourceParam::operator == (SourceParam & x) +{ + x.parse(); + return false; +} + +SourceParam::~SourceParam() +{ +} + + void +SourceParam::_parse() +{ + int i = strRep_.find('='); + if (i == -1) // Invalid + return; + + par_ = strRep_.left(i); + val_ = strRep_.right(strRep_.length() - i - 1); + + if (tqstricmp(par_, "VALUE") == 0 && tqstricmp(val_, "uri") == 0) + type_ = TypeValue; + else if (tqstricmp(par_, "CONTEXT") == 0 && tqstricmp(val_, "word") == 0) + type_ = TypeContext; + else if (tqstrnicmp(par_, "X-", 2) == 0) { + type_ = TypeX; + } + else type_ = TypeUnknown; + +} + + void +SourceParam::_assemble() +{ + if (type_ == TypeValue) + strRep_ = "VALUE=uri"; + else if (type_ == TypeContext) + strRep_ = "CONTEXT=word"; + else if (type_ == TypeX) + strRep_ = par_ + "=" + val_; + else strRep_ = ""; +} + diff --git a/tdeabc/vcard/TelParam.cpp b/tdeabc/vcard/TelParam.cpp new file mode 100644 index 000000000..072b1dc81 --- /dev/null +++ b/tdeabc/vcard/TelParam.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TelParam::TelParam() + : Param() +{ +} + +TelParam::TelParam(const TelParam & x) + : Param(x) +{ +} + +TelParam::TelParam(const TQCString & s) + : Param(s) +{ +} + + TelParam & +TelParam::operator = (TelParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + TelParam & +TelParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +TelParam::operator == (TelParam & x) +{ + x.parse(); + return false; +} + +TelParam::~TelParam() +{ +} + + void +TelParam::_parse() +{ +} + + void +TelParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/TelValue.cpp b/tdeabc/vcard/TelValue.cpp new file mode 100644 index 000000000..c9c1b85aa --- /dev/null +++ b/tdeabc/vcard/TelValue.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TelValue::TelValue() + : Value() +{ +} + +TelValue::TelValue(const TelValue & x) + : Value(x) +{ +} + +TelValue::TelValue(const TQCString & s) + : Value(s) +{ +} + + TelValue & +TelValue::operator = (TelValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + TelValue & +TelValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TelValue::operator == (TelValue & x) +{ + x.parse(); + return false; +} + +TelValue::~TelValue() +{ +} + + void +TelValue::_parse() +{ +} + + void +TelValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/TextBinParam.cpp b/tdeabc/vcard/TextBinParam.cpp new file mode 100644 index 000000000..4e0ebadff --- /dev/null +++ b/tdeabc/vcard/TextBinParam.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TextBinParam::TextBinParam() + : Param() +{ +} + +TextBinParam::TextBinParam(const TextBinParam & x) + : Param(x) +{ +} + +TextBinParam::TextBinParam(const TQCString & s) + : Param(s) +{ +} + + TextBinParam & +TextBinParam::operator = (TextBinParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + TextBinParam & +TextBinParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +TextBinParam::operator == (TextBinParam & x) +{ + x.parse(); + return false; +} + +TextBinParam::~TextBinParam() +{ +} + + void +TextBinParam::_parse() +{ +} + + void +TextBinParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/TextBinValue.cpp b/tdeabc/vcard/TextBinValue.cpp new file mode 100644 index 000000000..e7da0b7c6 --- /dev/null +++ b/tdeabc/vcard/TextBinValue.cpp @@ -0,0 +1,104 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include + +using namespace VCARD; + +TextBinValue::TextBinValue() + : Value() +{ +} + +TextBinValue::TextBinValue(const TextBinValue & x) + : Value(x) +{ + mIsBinary_ = x.mIsBinary_; + mData_ = x.mData_; + mUrl_ = x.mUrl_; +} + +TextBinValue::TextBinValue(const TQCString & s) + : Value(s) +{ +} + + TextBinValue & +TextBinValue::operator = (TextBinValue & x) +{ + if (*this == x) return *this; + + mIsBinary_ = x.mIsBinary_; + mData_ = x.mData_; + mUrl_ = x.mUrl_; + + Value::operator = (x); + return *this; +} + + TextBinValue & +TextBinValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TextBinValue::operator == (TextBinValue & x) +{ + x.parse(); + + if ( mIsBinary_ != x.mIsBinary_ ) return false; + if ( mData_ != x.mData_ ) return false; + if ( mUrl_ != x.mUrl_ ) return false; + + return true; +} + +TextBinValue::~TextBinValue() +{ +} + + TextBinValue * +TextBinValue::clone() +{ + return new TextBinValue( *this ); +} + + void +TextBinValue::_parse() +{ +} + + void +TextBinValue::_assemble() +{ + if ( mIsBinary_ ) { + strRep_ = KCodecs::base64Encode( mData_ ); + } else + strRep_ = mUrl_.utf8(); +} + diff --git a/tdeabc/vcard/TextListValue.cpp b/tdeabc/vcard/TextListValue.cpp new file mode 100644 index 000000000..2bec2e181 --- /dev/null +++ b/tdeabc/vcard/TextListValue.cpp @@ -0,0 +1,107 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +#include + +using namespace VCARD; + +TextListValue::TextListValue() + : Value() +{ +} + +TextListValue::TextListValue(const TextListValue & x) + : Value(x) +{ +} + +TextListValue::TextListValue(const TQCString & s) + : Value(s) +{ +} + + TextListValue & +TextListValue::operator = (TextListValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + TextListValue & +TextListValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TextListValue::operator == (TextListValue & x) +{ + x.parse(); + return false; +} + +TextListValue::~TextListValue() +{ +} + + void +TextListValue::_parse() +{ + RTokenise(strRep_, ";", valueList_); +} + + void +TextListValue::_assemble() +{ + bool first(true); + + TQStrListIterator it(valueList_); + + for (; it.current(); ++it) { + if (!first) strRep_ += ';'; + strRep_ += it.current(); + first = false; + } +} + + unsigned int +TextListValue::numValues() +{ + parse(); + return valueList_.count(); +} + + TQCString +TextListValue::value(unsigned int i) +{ + parse(); + return valueList_.at(i); +} + diff --git a/tdeabc/vcard/TextParam.cpp b/tdeabc/vcard/TextParam.cpp new file mode 100644 index 000000000..b353483ec --- /dev/null +++ b/tdeabc/vcard/TextParam.cpp @@ -0,0 +1,82 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TextParam::TextParam() + : Param() +{ +} + +TextParam::TextParam(const TextParam & x) + : Param(x) +{ +} + +TextParam::TextParam(const TQCString & s) + : Param(s) +{ +} + + TextParam & +TextParam::operator = (TextParam & x) +{ + if (*this == x) return *this; + + Param::operator = (x); + return *this; +} + + TextParam & +TextParam::operator = (const TQCString & s) +{ + Param::operator = (s); + return *this; +} + + bool +TextParam::operator == (TextParam & x) +{ + x.parse(); + + return false; +} + +TextParam::~TextParam() +{ +} + + void +TextParam::_parse() +{ +} + + void +TextParam::_assemble() +{ +} + diff --git a/tdeabc/vcard/TextValue.cpp b/tdeabc/vcard/TextValue.cpp new file mode 100644 index 000000000..cf8e0673f --- /dev/null +++ b/tdeabc/vcard/TextValue.cpp @@ -0,0 +1,86 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +TextValue::TextValue() + : Value() +{ +} + +TextValue::TextValue(const TextValue & x) + : Value(x) +{ +} + +TextValue::TextValue(const TQCString & s) + : Value(s) +{ +} + + TextValue & +TextValue::operator = (TextValue & x) +{ + if (*this == x) return *this; + + Value::operator = (x); + return *this; +} + + TextValue & +TextValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +TextValue::operator == (TextValue & x) +{ + return strRep_ == x.strRep_; +} + +TextValue::~TextValue() +{ +} + + TextValue * +TextValue::clone() +{ + return new TextValue( *this ); +} + + void +TextValue::_parse() +{ +} + + void +TextValue::_assemble() +{ +} + diff --git a/tdeabc/vcard/URIValue.cpp b/tdeabc/vcard/URIValue.cpp new file mode 100644 index 000000000..bba8db0fa --- /dev/null +++ b/tdeabc/vcard/URIValue.cpp @@ -0,0 +1,133 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +URIValue::URIValue() + : Value() +{ +} + +URIValue::URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart) + : Value(), + scheme_ (scheme), + schemeSpecificPart_ (schemeSpecificPart) +{ + parsed_ = true; +} + +URIValue::URIValue(const URIValue & x) + : Value (x), + scheme_ (x.scheme_), + schemeSpecificPart_ (x.schemeSpecificPart_) +{ +} + +URIValue::URIValue(const TQCString & s) + : Value(s) +{ +} + + URIValue & +URIValue::operator = (URIValue & x) +{ + if (*this == x) return *this; + + scheme_ = x.scheme_; + schemeSpecificPart_ = x.schemeSpecificPart_; + + Value::operator = (x); + return *this; +} + + URIValue & +URIValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +URIValue::operator == (URIValue & x) +{ + x.parse(); + return ( + (scheme_ == x.scheme_) && + (schemeSpecificPart_ == x.schemeSpecificPart_)); + + return false; +} + +URIValue::~URIValue() +{ +} + + void +URIValue::_parse() +{ + int split = strRep_.find(':'); + if (split == -1) + return; + + scheme_ = strRep_.left(split); + schemeSpecificPart_ = strRep_.mid(split + 1); +} + + void +URIValue::_assemble() +{ + strRep_ = scheme_ + ':' + schemeSpecificPart_; +} + + TQCString +URIValue::scheme() +{ + parse(); + return scheme_; +} + + TQCString +URIValue::schemeSpecificPart() +{ + parse(); + return schemeSpecificPart_; +} + + void +URIValue::setScheme(const TQCString & s) +{ + parse(); + scheme_ = s; +} + + void +URIValue::setSchemeSpecificPart(const TQCString & s) +{ + parse(); + schemeSpecificPart_ = s; +} + diff --git a/tdeabc/vcard/UTCValue.cpp b/tdeabc/vcard/UTCValue.cpp new file mode 100644 index 000000000..30473661f --- /dev/null +++ b/tdeabc/vcard/UTCValue.cpp @@ -0,0 +1,110 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include + +using namespace VCARD; + +UTCValue::UTCValue() + : Value() +{ +} + +UTCValue::UTCValue(const UTCValue & x) + : Value(x), positive_(x.positive_), hour_(x.hour_), minute_(x.minute_) + +{ +} + +UTCValue::UTCValue(const TQCString & s) + : Value(s) +{ +} + + UTCValue & +UTCValue::operator = (UTCValue & x) +{ + if (*this == x) return *this; + + positive_ = x.positive_; + hour_ = x.hour_; + minute_ = x.minute_; + + Value::operator = (x); + return *this; +} + + UTCValue & +UTCValue::operator = (const TQCString & s) +{ + Value::operator = (s); + return *this; +} + + bool +UTCValue::operator == (UTCValue & x) +{ + x.parse(); + + if (positive_ != x.positive_) return false; + if (hour_ != x.hour_) return false; + if (minute_ != x.minute_) return false; + + return true; +} + +UTCValue::~UTCValue() +{ +} + + UTCValue * +UTCValue::clone() +{ + return new UTCValue( *this ); +} + + void +UTCValue::_parse() +{ + if ( strRep_.isEmpty() ) + return; + + positive_ = ( strRep_[0] == '+' ); + + int colon = strRep_.find( ':' ); + + if ( colon == -1 ) // Not valid. + return; + + hour_ = strRep_.mid( 1, 2 ).toInt(); + minute_ = strRep_.right( 2 ).toInt(); +} + + void +UTCValue::_assemble() +{ + strRep_.sprintf( "%c%.2i:%.2i", (positive_ ? '+' : '-'), hour_, minute_ ); +} + diff --git a/tdeabc/vcard/VCard.cpp b/tdeabc/vcard/VCard.cpp new file mode 100644 index 000000000..eb3f57f6e --- /dev/null +++ b/tdeabc/vcard/VCard.cpp @@ -0,0 +1,283 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include + +#include +#include +#include +#include + +#include + +using namespace VCARD; + +VCard::VCard() + : Entity() +{ + contentLineList_.setAutoDelete( true ); +} + +VCard::VCard(const VCard & x) + : Entity(x), + group_(x.group_), + contentLineList_(x.contentLineList_) +{ +} + +VCard::VCard(const TQCString & s) + : Entity(s) +{ +} + + VCard & +VCard::operator = (VCard & x) +{ + if (*this == x) return *this; + + group_ = x.group(); + contentLineList_ = x.contentLineList_; + + Entity::operator = (x); + return *this; +} + + VCard & +VCard::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +VCard::operator == (VCard & x) +{ + x.parse(); + return false; +} + +VCard::~VCard() +{ +} + + void +VCard::_parse() +{ + vDebug("parse() called"); + TQStrList l; + + RTokenise(strRep_, "\r\n", l); + + if (l.count() < 3) { // Invalid VCARD ! + vDebug("Invalid vcard"); + return; + } + + // Get the first line + TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace(); + + vDebug("Begin line == \"" + beginLine + "\""); + + // Remove extra blank lines + while (TQCString(l.last()).isEmpty()) + l.remove(l.last()); + + // Now we know this is the last line + TQCString endLine = l.last(); + + // Trash the first and last lines as we have seen them. + l.remove(0u); + l.remove(l.last()); + + /////////////////////////////////////////////////////////////// + // FIRST LINE + + int split = beginLine.find(':'); + + if (split == -1) { // invalid, no BEGIN + vDebug("No split"); + return; + } + + TQCString firstPart(beginLine.left(split)); + TQCString valuePart(beginLine.mid(split + 1)); + + split = firstPart.find('.'); + + if (split != -1) { + group_ = firstPart.left(split); + firstPart = firstPart.right(firstPart.length() - split - 1); + } + + if (tqstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN ! + vDebug("No BEGIN"); + return; + } + + if (tqstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard ! + vDebug("No VCARD"); + return; + } + + /////////////////////////////////////////////////////////////// + // CONTENT LINES + // + vDebug("Content lines"); + + // Handle folded lines. + + TQStrList refolded; + + TQStrListIterator it(l); + + TQCString cur; + + for (; it.current(); ++it) { + + cur = it.current(); + + ++it; + + while ( + it.current() && + it.current()[0] == ' ' && + strlen(it.current()) != 1) + { + cur += it.current() + 1; + ++it; + } + + --it; + + refolded.append(cur); + } + + TQStrListIterator it2(refolded); + + for (; it2.current(); ++it2) { + + vDebug("New contentline using \"" + TQCString(it2.current()) + "\""); + ContentLine * cl = new ContentLine(it2.current()); + + cl->parse(); + + contentLineList_.append(cl); + } + + /////////////////////////////////////////////////////////////// + // LAST LINE + + split = endLine.find(':'); + + if (split == -1) // invalid, no END + return; + + firstPart = endLine.left(split); + valuePart = endLine.right(firstPart.length() - split - 1); + + split = firstPart.find('.'); + + if (split != -1) { + group_ = firstPart.left(split); + firstPart = firstPart.right(firstPart.length() - split - 1); + } + + if (tqstricmp(firstPart, "END") != 0) // No END ! + return; + + if (tqstricmp(valuePart, "VCARD") != 0) // Not a vcard ! + return; +} + + void +VCard::_assemble() +{ + vDebug("Assembling vcard"); + strRep_ = "BEGIN:VCARD\r\n"; + strRep_ += "VERSION:3.0\r\n"; + + TQPtrListIterator it(contentLineList_); + + for (; it.current(); ++it) + strRep_ += it.current()->asString() + "\r\n"; + + strRep_ += "END:VCARD\r\n"; +} + + bool +VCard::has(EntityType t) +{ + parse(); + return contentLine(t) == 0 ? false : true; +} + + bool +VCard::has(const TQCString & s) +{ + parse(); + return contentLine(s) == 0 ? false : true; +} + + void +VCard::add(const ContentLine & cl) +{ + parse(); + ContentLine * c = new ContentLine(cl); + contentLineList_.append(c); +} + + void +VCard::add(const TQCString & s) +{ + parse(); + ContentLine * c = new ContentLine(s); + contentLineList_.append(c); +} + + ContentLine * +VCard::contentLine(EntityType t) +{ + parse(); + TQPtrListIterator it(contentLineList_); + + for (; it.current(); ++it) + if (it.current()->entityType() == t) + return it.current(); + + return 0; +} + + ContentLine * +VCard::contentLine(const TQCString & s) +{ + parse(); + TQPtrListIterator it(contentLineList_); + + for (; it.current(); ++it) + if (it.current()->entityType() == EntityNameToEntityType(s)) + return it.current(); + + return 0; +} + diff --git a/tdeabc/vcard/VCardEntity.cpp b/tdeabc/vcard/VCardEntity.cpp new file mode 100644 index 000000000..1f8cea5b1 --- /dev/null +++ b/tdeabc/vcard/VCardEntity.cpp @@ -0,0 +1,119 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include + +using namespace VCARD; + +VCardEntity::VCardEntity() + : Entity() +{ +} + +VCardEntity::VCardEntity(const VCardEntity & x) + : Entity(x) +{ +} + +VCardEntity::VCardEntity(const TQCString & s) + : Entity(s) +{ +} + + VCardEntity & +VCardEntity::operator = (VCardEntity & x) +{ + if (*this == x) return *this; + + Entity::operator = (x); + return *this; +} + + VCardEntity & +VCardEntity::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +VCardEntity::operator == (VCardEntity & x) +{ + x.parse(); + return false; +} + +VCardEntity::~VCardEntity() +{ +} + + void +VCardEntity::_parse() +{ + vDebug("parse"); + TQCString s(strRep_); + + int i = s.find(TQRegExp("BEGIN:VCARD", false)); + + while (i != -1) { + + i = s.find(TQRegExp("BEGIN:VCARD", false), 11); + + TQCString cardStr(s.left(i)); + + VCard * v = new VCard(cardStr); + + cardList_.append(v); + + v->parse(); + + s.remove(0, i); + } +} + + void +VCardEntity::_assemble() +{ + VCardListIterator it(cardList_); + + for (; it.current(); ++it) + strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. +} + + VCardList & +VCardEntity::cardList() +{ + parse(); + return cardList_; +} + + void +VCardEntity::setCardList(const VCardList & l) +{ + parse(); + cardList_ = l; +} + diff --git a/tdeabc/vcard/Value.cpp b/tdeabc/vcard/Value.cpp new file mode 100644 index 000000000..c95c0712b --- /dev/null +++ b/tdeabc/vcard/Value.cpp @@ -0,0 +1,81 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include + +using namespace VCARD; + +Value::Value() + : Entity() +{ +} + +Value::Value(const Value & x) + : Entity(x) +{ +} + +Value::Value(const TQCString & s) + : Entity(s) +{ +} + + Value & +Value::operator = (Value & x) +{ + if (*this == x) return *this; + + Entity::operator = (x); + return *this; +} + + Value & +Value::operator = (const TQCString & s) +{ + Entity::operator = (s); + return *this; +} + + bool +Value::operator == (Value & x) +{ + x.parse(); + return false; +} + +Value::~Value() +{ +} + + void +Value::_parse() +{ +} + + void +Value::_assemble() +{ + vDebug("Value::_assemble()"); +} + diff --git a/tdeabc/vcard/include/VCard.h b/tdeabc/vcard/include/VCard.h new file mode 100644 index 000000000..17b50e8f2 --- /dev/null +++ b/tdeabc/vcard/include/VCard.h @@ -0,0 +1,43 @@ +#ifndef VCARD_H +#define VCARD_H + +#include "VCardAdrParam.h" +#include "VCardAdrValue.h" +#include "VCardAgentParam.h" +#include "VCardAgentValue.h" +#include "VCardClassValue.h" +#include "VCardContentLine.h" +#include "VCardDateParam.h" +#include "VCardDateValue.h" +#include "VCardDefines.h" +#include "VCardEmailParam.h" +#include "VCardEntity.h" +#include "VCardEnum.h" +#include "VCardFloatValue.h" +#include "VCardGeoValue.h" +#include "VCardGroup.h" +#include "VCardImageParam.h" +#include "VCardImageValue.h" +#include "VCardImgValue.h" +#include "VCardLangValue.h" +#include "VCardNValue.h" +#include "VCardOrgValue.h" +#include "VCardParam.h" +#include "VCardPhoneNumberValue.h" +#include "VCardRToken.h" +#include "VCardSoundValue.h" +#include "VCardSourceParam.h" +#include "VCardTelParam.h" +#include "VCardTelValue.h" +#include "VCardTextBinParam.h" +#include "VCardTextBinValue.h" +#include "VCardTextListValue.h" +#include "VCardTextParam.h" +#include "VCardTextValue.h" +#include "VCardURIValue.h" +#include "VCardUTCValue.h" +#include "VCardVCard.h" +#include "VCardVCardEntity.h" +#include "VCardValue.h" + +#endif diff --git a/tdeabc/vcard/include/VCardAdrParam.h b/tdeabc/vcard/include/VCardAdrParam.h new file mode 100644 index 000000000..d40165f4a --- /dev/null +++ b/tdeabc/vcard/include/VCardAdrParam.h @@ -0,0 +1,64 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ADRPARAM_H +#define ADRPARAM_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AdrParam : public Param +{ + +#include "AdrParam-generated.h" + + TQStrList adrTypeList() + { parse(); return adrTypeList_; } + + TQCString textParam() + { parse(); return textParam_; } + + void setAdrTypeList(const TQStrList & l) + { adrTypeList_ = l; assembled_ = false; } + + void setTextParam(const TQCString & s) + { textParam_ = s; assembled_ = false; } + + enum AdrType { + AdrDom, AdrIntl, AdrPostal, AdrParcel, AdrHome, AdrWork, AdrPref, + AdrIANA, AdrX + }; + + private: + + TQStrList adrTypeList_; + TQCString textParam_; +}; +} + +#endif diff --git a/tdeabc/vcard/include/VCardAdrValue.h b/tdeabc/vcard/include/VCardAdrValue.h new file mode 100644 index 000000000..94ed93aee --- /dev/null +++ b/tdeabc/vcard/include/VCardAdrValue.h @@ -0,0 +1,83 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ADRVALUE_H +#define ADRVALUE_H + +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AdrValue : public Value +{ + +#include "AdrValue-generated.h" + + AdrValue *clone(); + + void setPOBox(const TQCString & s) + { poBox_ = s; assembled_ = false; } + + void setExtAddress(const TQCString & s) + { extAddress_ = s; assembled_ = false; } + + void setStreet(const TQCString & s) + { street_ = s; assembled_ = false; } + + void setLocality(const TQCString & s) + { locality_ = s; assembled_ = false; } + + void setRegion(const TQCString & s) + { region_ = s; assembled_ = false; } + + void setPostCode(const TQCString & s) + { postCode_ = s; assembled_ = false; } + + void setCountryName(const TQCString & s) + { countryName_ = s; assembled_ = false; } + + TQCString poBox() { parse(); return poBox_; } + TQCString extAddress() { parse(); return extAddress_; } + TQCString street() { parse(); return street_; } + TQCString locality() { parse(); return locality_; } + TQCString region() { parse(); return region_; } + TQCString postCode() { parse(); return postCode_; } + TQCString countryName() { parse(); return countryName_; } + + private: + + TQCString poBox_; + TQCString extAddress_; + TQCString street_; + TQCString locality_; + TQCString region_; + TQCString postCode_; + TQCString countryName_; +}; + +} + +#endif + diff --git a/tdeabc/vcard/include/VCardAgentParam.h b/tdeabc/vcard/include/VCardAgentParam.h new file mode 100644 index 000000000..90c3bd528 --- /dev/null +++ b/tdeabc/vcard/include/VCardAgentParam.h @@ -0,0 +1,60 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef AGENTPARAM_H +#define AGENTPARAM_H + +#include + +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AgentParam : public Param +{ + +#include "AgentParam-generated.h" + + bool refer() + { parse(); return refer_; } + + URIValue uri() + { parse(); return uri_; } + + void setRefer(bool b) + { refer_ = b; assembled_ = false; } + + void setURI(const TQCString & s) + { uri_ = s; assembled_ = false; } + + private: + + bool refer_; + URIValue uri_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardAgentValue.h b/tdeabc/vcard/include/VCardAgentValue.h new file mode 100644 index 000000000..dd68145c9 --- /dev/null +++ b/tdeabc/vcard/include/VCardAgentValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef AGENTVALUE_H +#define AGENTVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT AgentValue : public Value +{ + +#include "AgentValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardClassValue.h b/tdeabc/vcard/include/VCardClassValue.h new file mode 100644 index 000000000..5de79167b --- /dev/null +++ b/tdeabc/vcard/include/VCardClassValue.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef CLASSVALUE_H +#define CLASSVALUE_H + +#include + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ClassValue : public Value +{ + +#include "ClassValue-generated.h" + + enum ClassType { + Public, Private, Confidential, Other + }; + + ClassValue *clone(); + + void setType( int type ) { classType_ = type; assembled_ = false; parsed_ = true; } + int type() { parse(); return classType_; } + + private: + int classType_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardContentLine.h b/tdeabc/vcard/include/VCardContentLine.h new file mode 100644 index 000000000..ea59444a0 --- /dev/null +++ b/tdeabc/vcard/include/VCardContentLine.h @@ -0,0 +1,77 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef CONTENTLINE_H +#define CONTENTLINE_H + +#include + +#include "VCardEnum.h" +#include "VCardEntity.h" +#include "VCardParam.h" +#include "VCardValue.h" + +namespace VCARD +{ + +class KVCARD_EXPORT ContentLine : public Entity +{ + +#include "ContentLine-generated.h" + + TQCString group() { parse(); return group_; } + TQCString name() { parse(); return name_; } + Value * value() { parse(); return value_; } + ParamList paramList() { parse(); return paramList_; } + ParamType paramType() { parse(); return paramType_; } + ValueType valueType() { parse(); return valueType_; } + EntityType entityType() { parse(); return entityType_; } + + void setGroup (const TQCString & s) + { group_ = s; assembled_ = false; } + + void setName (const TQCString & s) + { name_ = s; assembled_ = false; } + + void setValue (Value *s) + { value_ = s; assembled_ = false; } + + void setParamList (const ParamList & l) + { paramList_ = l; assembled_ = false; } + + void clear (); + + private: + + TQCString group_; + TQCString name_; + TQPtrList paramList_; + Value * value_; + + ParamType paramType_; + ValueType valueType_; + EntityType entityType_; +}; +} + +#endif diff --git a/tdeabc/vcard/include/VCardDateParam.h b/tdeabc/vcard/include/VCardDateParam.h new file mode 100644 index 000000000..410eae6b7 --- /dev/null +++ b/tdeabc/vcard/include/VCardDateParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef DATEPARAM_H +#define DATEPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT DateParam : public Param +{ + +#include "DateParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardDateValue.h b/tdeabc/vcard/include/VCardDateValue.h new file mode 100644 index 000000000..4f2e2fe7f --- /dev/null +++ b/tdeabc/vcard/include/VCardDateValue.h @@ -0,0 +1,99 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef DATEVALUE_H +#define DATEVALUE_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT DateValue : public Value +{ +#include "DateValue-generated.h" + + DateValue( + unsigned int year, + unsigned int month, + unsigned int day, + unsigned int hour = 0, + unsigned int minute = 0, + unsigned int second = 0, + double secFrac = 0, + bool zonePositive = true, + unsigned int zoneHour = 0, + unsigned int zoneMinute = 0); + + DateValue(const TQDate &); + DateValue(const TQDateTime &); + + DateValue *clone(); + + bool hasTime(); + + unsigned int year(); + unsigned int month(); + unsigned int day(); + unsigned int hour(); + unsigned int minute(); + unsigned int second(); + double secondFraction(); + bool zonePositive(); + unsigned int zoneHour(); + unsigned int zoneMinute(); + + void setYear (unsigned int); + void setMonth (unsigned int); + void setDay (unsigned int); + void setHour (unsigned int); + void setMinute (unsigned int); + void setSecond (unsigned int); + void setSecondFraction (double); + void setZonePositive (bool); + void setZoneHour (unsigned int); + void setZoneMinute (unsigned int); + + TQDate qdate(); + TQTime qtime(); + TQDateTime qdt(); + + private: + + unsigned int year_, month_, day_, + hour_, minute_, second_, + zoneHour_, zoneMinute_; + + double secFrac_; + + bool zonePositive_; + + bool hasTime_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardDefines.h b/tdeabc/vcard/include/VCardDefines.h new file mode 100644 index 000000000..e778bc24f --- /dev/null +++ b/tdeabc/vcard/include/VCardDefines.h @@ -0,0 +1,52 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1998 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VCARD_DEFINES_H +#define VCARD_DEFINES_H + +#include + +#ifdef VCARD_DEBUG +#define vDebug(a) kdDebug(5710) << a << endl; +#else +#define vDebug(a) +#endif + +#if 0 +#ifndef NDEBUG +# include +# include +# ifdef __GNUG__ +# define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ + << __LINE__ << "): " << TQCString((a)).data() << endl; +# else +# define vDebug(a) cerr << className() << ": " \ + << TQCString((a)).data() << endl; +# endif +#else +# define vDebug(a) +#endif +#endif + +#endif // Included this file + diff --git a/tdeabc/vcard/include/VCardEmailParam.h b/tdeabc/vcard/include/VCardEmailParam.h new file mode 100644 index 000000000..1fe558afd --- /dev/null +++ b/tdeabc/vcard/include/VCardEmailParam.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef EMAILPARAM_H +#define EMAILPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT EmailParam : public Param +{ + +#include "EmailParam-generated.h" + + TQCString emailType() { parse(); return emailType_; } + bool pref() { parse(); return pref_; } + + void setEmailType(const TQCString & s) + { emailType_ = s; assembled_ = false; } + + void setPref(bool b) + { pref_ = b; assembled_ = false; } + + private: + + TQCString emailType_; + bool pref_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardEntity.h b/tdeabc/vcard/include/VCardEntity.h new file mode 100644 index 000000000..e87c5f1a6 --- /dev/null +++ b/tdeabc/vcard/include/VCardEntity.h @@ -0,0 +1,68 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ENTITY_H +#define ENTITY_H + +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Entity +{ + public: + + Entity(); + Entity(const Entity & e); + Entity(const TQCString & s); + + virtual Entity & operator = (const Entity & e); + virtual Entity & operator = (const TQCString & s); + + virtual bool operator == (Entity & e); + virtual bool operator != (Entity & e); + virtual bool operator == (const TQCString & s); + virtual bool operator != (const TQCString & s); + + virtual ~Entity(); + + TQCString asString(); + + virtual void parse(); + virtual void assemble(); + + virtual void _parse() = 0; + virtual void _assemble() = 0; + + protected: + + TQCString strRep_; + bool parsed_; + bool assembled_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardEnum.h b/tdeabc/vcard/include/VCardEnum.h new file mode 100644 index 000000000..4552ccdbc --- /dev/null +++ b/tdeabc/vcard/include/VCardEnum.h @@ -0,0 +1,123 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ENUM_H +#define ENUM_H + +#include + +#include + +namespace VCARD +{ + +extern const TQCString paramNames []; + +enum EntityType { + EntityName, + EntityProfile, + EntitySource, + EntityFullName, + EntityN, + EntityNickname, + EntityPhoto, + EntityBirthday, + EntityAddress, + EntityLabel, + EntityTelephone, + EntityEmail, + EntityMailer, + EntityTimeZone, + EntityGeo, + EntityTitle, + EntityRole, + EntityLogo, + EntityAgent, + EntityOrganisation, + EntityCategories, + EntityNote, + EntityProductID, + EntityRevision, + EntitySortString, + EntitySound, + EntityUID, + EntityURI, + EntityURL, + EntityVersion, + EntityClass, + EntityKey, + EntityExtension, + EntityUnknown +}; + +enum ValueType { + ValueSound, + ValueAgent, + ValueAddress, + ValueTel, + ValueTextBin, + ValueOrg, + ValueN, + ValueUTC, + ValueURI, + ValueClass, + ValueFloat, + ValueImage, + ValueDate, + ValueTextList, + ValueText, + ValueGeo, + ValueUnknown +}; + +enum ParamType { + ParamUnknown, + ParamNone, + ParamSource, + ParamText, + ParamImage, + ParamDate, + ParamAddrText, + ParamTel, + ParamEmail, + ParamMailer, + ParamAgent, + ParamTextBin, + ParamTextNS, + ParamSound +}; + +extern const ParamType paramTypesTable[]; + +KVCARD_EXPORT ParamType EntityTypeToParamType(EntityType); +KVCARD_EXPORT ValueType EntityTypeToValueType(EntityType); +KVCARD_EXPORT TQCString EntityTypeToParamName(EntityType); +KVCARD_EXPORT EntityType EntityNameToEntityType(const TQCString &); + +KVCARD_EXPORT char * encodeBase64(const char *, unsigned long, unsigned long &); +KVCARD_EXPORT char * decodeBase64(const char *, unsigned long, unsigned long &); + +} + +#endif + diff --git a/tdeabc/vcard/include/VCardFloatValue.h b/tdeabc/vcard/include/VCardFloatValue.h new file mode 100644 index 000000000..45a6823be --- /dev/null +++ b/tdeabc/vcard/include/VCardFloatValue.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef FLOATVALUE_H +#define FLOATVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT FloatValue : public Value +{ + +#include "FloatValue-generated.h" + + FloatValue(float); + + float value(); + void setValue(float); + + private: + + float value_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardGeoValue.h b/tdeabc/vcard/include/VCardGeoValue.h new file mode 100644 index 000000000..4228587a4 --- /dev/null +++ b/tdeabc/vcard/include/VCardGeoValue.h @@ -0,0 +1,49 @@ +/* + This file is part of libvcard. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef GEOVALUE_H +#define GEOVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT GeoValue : public Value +{ + +#include "GeoValue-generated.h" + + GeoValue *clone(); + + void setLatitude( float lat ) { latitude_ = lat; assembled_ = false; } + void setLongitude( float lon ) { longitude_ = lon; assembled_ = false; } + + float latitude() { parse(); return latitude_; } + float longitude() { parse(); return longitude_; } + + private: + float latitude_; + float longitude_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardGroup.h b/tdeabc/vcard/include/VCardGroup.h new file mode 100644 index 000000000..ce884f100 --- /dev/null +++ b/tdeabc/vcard/include/VCardGroup.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GROUP_H +#define GROUP_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Group : public Entity +{ +#include "Group-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardImageParam.h b/tdeabc/vcard/include/VCardImageParam.h new file mode 100644 index 000000000..10ab8a3f5 --- /dev/null +++ b/tdeabc/vcard/include/VCardImageParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef IMGPARAM_H +#define IMGPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ImageParam : public Param +{ + +#include "ImageParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardImageValue.h b/tdeabc/vcard/include/VCardImageValue.h new file mode 100644 index 000000000..45fbcad9c --- /dev/null +++ b/tdeabc/vcard/include/VCardImageValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef IMAGEVALUE_H +#define IMAGEVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ImageValue : public Value +{ + +#include "ImageValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardImgValue.h b/tdeabc/vcard/include/VCardImgValue.h new file mode 100644 index 000000000..7d4bbfa2d --- /dev/null +++ b/tdeabc/vcard/include/VCardImgValue.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef IMGVALUE_H +#define IMGVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT ImgValue : public Value +{ +#include "ImgValue-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardLangValue.h b/tdeabc/vcard/include/VCardLangValue.h new file mode 100644 index 000000000..7767d52fa --- /dev/null +++ b/tdeabc/vcard/include/VCardLangValue.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef LANGVALUE_H +#define LANGVALUE_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT LangValue : public Value +{ +#include "LangValue-generated.h" + + TQCString primary(); + TQStrList subtags(); + + void setPrimary(const TQCString &); + void setSubTags(const TQStrList &); + + TQCString primary_; + TQStrList subtags_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardNValue.h b/tdeabc/vcard/include/VCardNValue.h new file mode 100644 index 000000000..9db37fbbc --- /dev/null +++ b/tdeabc/vcard/include/VCardNValue.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef NVALUE_H +#define NVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT NValue : public Value +{ +#include "NValue-generated.h" + NValue *clone(); + + TQCString family() { parse(); return family_; } + TQCString given() { parse(); return given_; } + TQCString middle() { parse(); return middle_; } + TQCString prefix() { parse(); return prefix_; } + TQCString suffix() { parse(); return suffix_; } + + void setFamily (const TQCString & s) { family_ = s; assembled_ = false; } + void setGiven (const TQCString & s) { given_ = s; assembled_ = false; } + void setMiddle (const TQCString & s) { middle_ = s; assembled_ = false; } + void setPrefix (const TQCString & s) { prefix_ = s; assembled_ = false; } + void setSuffix (const TQCString & s) { suffix_ = s; assembled_ = false; } + + private: + + TQCString family_, given_, middle_, prefix_, suffix_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardOrgValue.h b/tdeabc/vcard/include/VCardOrgValue.h new file mode 100644 index 000000000..a2bd803e5 --- /dev/null +++ b/tdeabc/vcard/include/VCardOrgValue.h @@ -0,0 +1,50 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ORGVALUE_H +#define ORGVALUE_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT OrgValue : public Value +{ + +#include "OrgValue-generated.h" + + unsigned int numValues(); + TQCString value(unsigned int); + + private: + + TQStrList valueList_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardParam.h b/tdeabc/vcard/include/VCardParam.h new file mode 100644 index 000000000..93d70f06b --- /dev/null +++ b/tdeabc/vcard/include/VCardParam.h @@ -0,0 +1,59 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef PARAM_H +#define PARAM_H + +#include +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Param : public Entity +{ + +#include "Param-generated.h" + + Param(const TQCString &name, const TQCString &value); + + void setName(const TQCString &); + void setValue(const TQCString &); + + TQCString name(); + TQCString value(); + + private: + + TQCString name_; + TQCString value_; +}; + +typedef TQPtrList ParamList; +typedef TQPtrListIterator ParamListIterator; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardPhoneNumberValue.h b/tdeabc/vcard/include/VCardPhoneNumberValue.h new file mode 100644 index 000000000..3f9e106ca --- /dev/null +++ b/tdeabc/vcard/include/VCardPhoneNumberValue.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef PHONENUMBERVALUE_H +#define PHONENUMBERVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT PhoneNumberValue : public Value +{ +#include "PhoneNumberValue-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardRToken.h b/tdeabc/vcard/include/VCardRToken.h new file mode 100644 index 000000000..17a3943d3 --- /dev/null +++ b/tdeabc/vcard/include/VCardRToken.h @@ -0,0 +1,40 @@ +/* + + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef RTOKEN_H +#define RTOKEN_H + +#include + +#include + +namespace VCARD +{ + +KVCARD_EXPORT TQ_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l); + +} + +#endif + diff --git a/tdeabc/vcard/include/VCardSndValue.h b/tdeabc/vcard/include/VCardSndValue.h new file mode 100644 index 000000000..09a3a8238 --- /dev/null +++ b/tdeabc/vcard/include/VCardSndValue.h @@ -0,0 +1,39 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SNDVALUE_H +#define SNDVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT SndValue : public Value +{ +#include "SndValue-generated.h" +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardSoundValue.h b/tdeabc/vcard/include/VCardSoundValue.h new file mode 100644 index 000000000..61858f058 --- /dev/null +++ b/tdeabc/vcard/include/VCardSoundValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SOUNDVALUE_H +#define SOUNDVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT SoundValue : public Value +{ + +#include "SoundValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardSourceParam.h b/tdeabc/vcard/include/VCardSourceParam.h new file mode 100644 index 000000000..1d9d03d47 --- /dev/null +++ b/tdeabc/vcard/include/VCardSourceParam.h @@ -0,0 +1,58 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SOURCEPARAM_H +#define SOURCEPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT SourceParam : public Param +{ + +#include "SourceParam-generated.h" + + enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX }; + + SourceParamType type() { parse(); return type_;} + TQCString par() { parse(); return par_; } + TQCString val() { parse(); return val_; } + + void setType(SourceParamType t) { type_ = t; assembled_ = false; } + void setPar(const TQCString & s) { par_ = s; assembled_ = false; } + void setVal(const TQCString & s) { val_ = s; assembled_ = false; } + + private: + + SourceParamType type_; + // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" + TQCString par_, val_; // Sub-parameter, value +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTelParam.h b/tdeabc/vcard/include/VCardTelParam.h new file mode 100644 index 000000000..9eea5da2f --- /dev/null +++ b/tdeabc/vcard/include/VCardTelParam.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TELPARAM_H +#define TELPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TelParam : public Param +{ +#include "TelParam-generated.h" + + enum TelType { + TelHome, TelWork, TelPref, TelVoice, TelFex, TelMsg, TelCell, + TelPager, TelBBS, TelModem, TelCar, TelISDN, TelVideo, TelPCS, + TelIANA, TelX + }; + + private: + + TQPtrList types_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTelValue.h b/tdeabc/vcard/include/VCardTelValue.h new file mode 100644 index 000000000..043a45aa9 --- /dev/null +++ b/tdeabc/vcard/include/VCardTelValue.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TELVALUE_H +#define TELVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TelValue : public Value +{ + +#include "TelValue-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextBinParam.h b/tdeabc/vcard/include/VCardTextBinParam.h new file mode 100644 index 000000000..5a681ad48 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextBinParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTBINPARAM_H +#define TEXTBINPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextBinParam : public Param +{ + +#include "TextBinParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextBinValue.h b/tdeabc/vcard/include/VCardTextBinValue.h new file mode 100644 index 000000000..316fa7832 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextBinValue.h @@ -0,0 +1,67 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTBINVALUE_H +#define TEXTBINVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextBinValue : public Value +{ + +#include "TextBinValue-generated.h" + + TextBinValue *clone(); + + bool isBinary() { parse(); return mIsBinary_; } + TQByteArray data() { parse(); return mData_; } + TQString url() { parse(); return mUrl_; } + + void setData( const TQByteArray &data ) + { + mData_ = data; + mIsBinary_ = true; + assembled_ = false; + } + + void setUrl( const TQString &url ) + { + mUrl_ = url; + mIsBinary_ = false; + assembled_ = false; + } + + private: + int mIsBinary_; + TQByteArray mData_; + TQString mUrl_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextListValue.h b/tdeabc/vcard/include/VCardTextListValue.h new file mode 100644 index 000000000..53760c75a --- /dev/null +++ b/tdeabc/vcard/include/VCardTextListValue.h @@ -0,0 +1,51 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTLISTVALUE_H +#define TEXTLISTVALUE_H + +#include + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextListValue : public Value +{ + +#include "TextListValue-generated.h" + + unsigned int numValues(); + TQCString value(unsigned int); + + private: + + TQStrList valueList_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextParam.h b/tdeabc/vcard/include/VCardTextParam.h new file mode 100644 index 000000000..d593c0578 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextParam.h @@ -0,0 +1,44 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTPARAM_H +#define TEXTPARAM_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextParam : public Param +{ + +#include "TextParam-generated.h" + + private: +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardTextValue.h b/tdeabc/vcard/include/VCardTextValue.h new file mode 100644 index 000000000..66eed32a8 --- /dev/null +++ b/tdeabc/vcard/include/VCardTextValue.h @@ -0,0 +1,41 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef TEXTVALUE_H +#define TEXTVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT TextValue : public Value +{ +#include "TextValue-generated.h" + + TextValue *clone(); +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardURIValue.h b/tdeabc/vcard/include/VCardURIValue.h new file mode 100644 index 000000000..696887774 --- /dev/null +++ b/tdeabc/vcard/include/VCardURIValue.h @@ -0,0 +1,52 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef URIVALUE_H +#define URIVALUE_H + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT URIValue : public Value +{ +#include "URIValue-generated.h" + + URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart); + + TQCString scheme(); + TQCString schemeSpecificPart(); + + void setScheme (const TQCString &); + void setSchemeSpecificPart (const TQCString &); + + private: + + TQCString scheme_; + TQCString schemeSpecificPart_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardUTCValue.h b/tdeabc/vcard/include/VCardUTCValue.h new file mode 100644 index 000000000..cb09ccf00 --- /dev/null +++ b/tdeabc/vcard/include/VCardUTCValue.h @@ -0,0 +1,58 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef UTCVALUE_H +#define UTCVALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT UTCValue : public Value +{ + +#include "UTCValue-generated.h" + + UTCValue *clone(); + + void setPositive( int p ) { positive_ = p; assembled_ = false; } + void setHour( int h ) { hour_ = h; assembled_ = false; } + void setMinute( int m ) { minute_ = m; assembled_ = false; } + + bool positive() { parse(); return positive_; } + unsigned int hour() { parse(); return hour_; } + unsigned int minute() { parse(); return minute_; } + + private: + + bool positive_; + unsigned int hour_; + unsigned int minute_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardVCard.h b/tdeabc/vcard/include/VCardVCard.h new file mode 100644 index 000000000..53563e8c0 --- /dev/null +++ b/tdeabc/vcard/include/VCardVCard.h @@ -0,0 +1,63 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VCARD_VCARD_H +#define VCARD_VCARD_H + +#include +#include + +#include +#include +#include + +namespace VCARD +{ + +class KVCARD_EXPORT VCard : public Entity +{ + +#include "VCard-generated.h" + + bool has(EntityType); + bool has(const TQCString &); + + void add(const ContentLine &); + void add(const TQCString &); + + ContentLine * contentLine(EntityType); + ContentLine * contentLine(const TQCString &); + + TQCString group() { parse(); return group_; } + + TQPtrList contentLineList() { parse(); return contentLineList_; } + + private: + + TQCString group_; + TQPtrList contentLineList_; +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardVCardEntity.h b/tdeabc/vcard/include/VCardVCardEntity.h new file mode 100644 index 000000000..422790c22 --- /dev/null +++ b/tdeabc/vcard/include/VCardVCardEntity.h @@ -0,0 +1,56 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VCARD_ENTITY_H +#define VCARD_ENTITY_H + +#include +#include + +#include +#include +#include + +namespace VCARD +{ + +typedef TQPtrList VCardList; +typedef TQPtrListIterator VCardListIterator; + +class KVCARD_EXPORT VCardEntity : public Entity +{ + +#include "VCardEntity-generated.h" + + void setCardList(const VCardList & l); + VCardList & cardList(); + + private: + + VCardList cardList_; + +}; + +} + +#endif diff --git a/tdeabc/vcard/include/VCardValue.h b/tdeabc/vcard/include/VCardValue.h new file mode 100644 index 000000000..3c167d70a --- /dev/null +++ b/tdeabc/vcard/include/VCardValue.h @@ -0,0 +1,46 @@ +/* + libvcard - vCard parsing library for vCard version 3.0 + + Copyright (C) 1999 Rik Hemsley rik@kde.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef VALUE_H +#define VALUE_H + +#include + +#include + +namespace VCARD +{ + +class KVCARD_EXPORT Value : public Entity +{ +#include "Value-generated.h" + + virtual Value *clone() { return new Value( *this ); } +}; + +typedef TQPtrList ValueList; +typedef TQPtrListIterator ValueListIterator; + +} + +#endif diff --git a/tdeabc/vcard/include/generated/AdrParam-generated.h b/tdeabc/vcard/include/generated/AdrParam-generated.h new file mode 100644 index 000000000..1afdcd36a --- /dev/null +++ b/tdeabc/vcard/include/generated/AdrParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AdrParam(); +AdrParam(const AdrParam&); +AdrParam(const TQCString&); +AdrParam & operator = (AdrParam&); +AdrParam & operator = (const TQCString&); +bool operator ==(AdrParam&); +bool operator !=(AdrParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AdrParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AdrParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AdrParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/AdrValue-generated.h b/tdeabc/vcard/include/generated/AdrValue-generated.h new file mode 100644 index 000000000..9882d1186 --- /dev/null +++ b/tdeabc/vcard/include/generated/AdrValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AdrValue(); +AdrValue(const AdrValue&); +AdrValue(const TQCString&); +AdrValue & operator = (AdrValue&); +AdrValue & operator = (const TQCString&); +bool operator ==(AdrValue&); +bool operator !=(AdrValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AdrValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AdrValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AdrValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/AgentParam-generated.h b/tdeabc/vcard/include/generated/AgentParam-generated.h new file mode 100644 index 000000000..07b87d106 --- /dev/null +++ b/tdeabc/vcard/include/generated/AgentParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AgentParam(); +AgentParam(const AgentParam&); +AgentParam(const TQCString&); +AgentParam & operator = (AgentParam&); +AgentParam & operator = (const TQCString&); +bool operator ==(AgentParam&); +bool operator !=(AgentParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AgentParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AgentParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AgentParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/AgentValue-generated.h b/tdeabc/vcard/include/generated/AgentValue-generated.h new file mode 100644 index 000000000..e2866bb8f --- /dev/null +++ b/tdeabc/vcard/include/generated/AgentValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +AgentValue(); +AgentValue(const AgentValue&); +AgentValue(const TQCString&); +AgentValue & operator = (AgentValue&); +AgentValue & operator = (const TQCString&); +bool operator ==(AgentValue&); +bool operator !=(AgentValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {AgentValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~AgentValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "AgentValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ClassValue-generated.h b/tdeabc/vcard/include/generated/ClassValue-generated.h new file mode 100644 index 000000000..e10c65568 --- /dev/null +++ b/tdeabc/vcard/include/generated/ClassValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ClassValue(); +ClassValue(const ClassValue&); +ClassValue(const TQCString&); +ClassValue & operator = (ClassValue&); +ClassValue & operator = (const TQCString&); +bool operator ==(ClassValue&); +bool operator !=(ClassValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ClassValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ClassValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ClassValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ContentLine-generated.h b/tdeabc/vcard/include/generated/ContentLine-generated.h new file mode 100644 index 000000000..ad2ac7649 --- /dev/null +++ b/tdeabc/vcard/include/generated/ContentLine-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ContentLine(); +ContentLine(const ContentLine&); +ContentLine(const TQCString&); +ContentLine & operator = (ContentLine&); +ContentLine & operator = (const TQCString&); +bool operator ==(ContentLine&); +bool operator !=(ContentLine& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ContentLine a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ContentLine(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ContentLine"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/DateParam-generated.h b/tdeabc/vcard/include/generated/DateParam-generated.h new file mode 100644 index 000000000..75e7ad72d --- /dev/null +++ b/tdeabc/vcard/include/generated/DateParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +DateParam(); +DateParam(const DateParam&); +DateParam(const TQCString&); +DateParam & operator = (DateParam&); +DateParam & operator = (const TQCString&); +bool operator ==(DateParam&); +bool operator !=(DateParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {DateParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~DateParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "DateParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/DateValue-generated.h b/tdeabc/vcard/include/generated/DateValue-generated.h new file mode 100644 index 000000000..cf0eb40d8 --- /dev/null +++ b/tdeabc/vcard/include/generated/DateValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +DateValue(); +DateValue(const DateValue&); +DateValue(const TQCString&); +DateValue & operator = (DateValue&); +DateValue & operator = (const TQCString&); +bool operator ==(DateValue&); +bool operator !=(DateValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {DateValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~DateValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "DateValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/EmailParam-generated.h b/tdeabc/vcard/include/generated/EmailParam-generated.h new file mode 100644 index 000000000..46ae1f80f --- /dev/null +++ b/tdeabc/vcard/include/generated/EmailParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +EmailParam(); +EmailParam(const EmailParam&); +EmailParam(const TQCString&); +EmailParam & operator = (EmailParam&); +EmailParam & operator = (const TQCString&); +bool operator ==(EmailParam&); +bool operator !=(EmailParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {EmailParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~EmailParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "EmailParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/FloatValue-generated.h b/tdeabc/vcard/include/generated/FloatValue-generated.h new file mode 100644 index 000000000..155f52ae1 --- /dev/null +++ b/tdeabc/vcard/include/generated/FloatValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +FloatValue(); +FloatValue(const FloatValue&); +FloatValue(const TQCString&); +FloatValue & operator = (FloatValue&); +FloatValue & operator = (const TQCString&); +bool operator ==(FloatValue&); +bool operator !=(FloatValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {FloatValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~FloatValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "FloatValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/GeoValue-generated.h b/tdeabc/vcard/include/generated/GeoValue-generated.h new file mode 100644 index 000000000..b525e8c21 --- /dev/null +++ b/tdeabc/vcard/include/generated/GeoValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +GeoValue(); +GeoValue(const GeoValue&); +GeoValue(const TQCString&); +GeoValue & operator = (GeoValue&); +GeoValue & operator = (const TQCString&); +bool operator ==(GeoValue&); +bool operator !=(GeoValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {GeoValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~GeoValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "GeoValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Group-generated.h b/tdeabc/vcard/include/generated/Group-generated.h new file mode 100644 index 000000000..38e1c2a3a --- /dev/null +++ b/tdeabc/vcard/include/generated/Group-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +Group(); +Group(const Group&); +Group(const TQCString&); +Group & operator = (Group&); +Group & operator = (const TQCString&); +bool operator ==(Group&); +bool operator !=(Group& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {Group a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~Group(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "Group"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImageParam-generated.h b/tdeabc/vcard/include/generated/ImageParam-generated.h new file mode 100644 index 000000000..78a5a97cf --- /dev/null +++ b/tdeabc/vcard/include/generated/ImageParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImageParam(); +ImageParam(const ImageParam&); +ImageParam(const TQCString&); +ImageParam & operator = (ImageParam&); +ImageParam & operator = (const TQCString&); +bool operator ==(ImageParam&); +bool operator !=(ImageParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImageParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImageParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ImageParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImageValue-generated.h b/tdeabc/vcard/include/generated/ImageValue-generated.h new file mode 100644 index 000000000..882081fbc --- /dev/null +++ b/tdeabc/vcard/include/generated/ImageValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImageValue(); +ImageValue(const ImageValue&); +ImageValue(const TQCString&); +ImageValue & operator = (ImageValue&); +ImageValue & operator = (const TQCString&); +bool operator ==(ImageValue&); +bool operator !=(ImageValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImageValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImageValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "ImageValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImgParam-generated.h b/tdeabc/vcard/include/generated/ImgParam-generated.h new file mode 100644 index 000000000..04132c857 --- /dev/null +++ b/tdeabc/vcard/include/generated/ImgParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImgParam(); +ImgParam(const ImgParam&); +ImgParam(const TQCString&); +ImgParam & operator = (ImgParam&); +ImgParam & operator = (const TQCString&); +bool operator ==(ImgParam&); +bool operator !=(ImgParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImgParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImgParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +virtual const char * className() const { return "ImgParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ImgValue-generated.h b/tdeabc/vcard/include/generated/ImgValue-generated.h new file mode 100644 index 000000000..0774de9bf --- /dev/null +++ b/tdeabc/vcard/include/generated/ImgValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +ImgValue(); +ImgValue(const ImgValue&); +ImgValue(const TQCString&); +ImgValue & operator = (ImgValue&); +ImgValue & operator = (const TQCString&); +bool operator ==(ImgValue&); +bool operator !=(ImgValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {ImgValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~ImgValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +virtual const char * className() const { return "ImgValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/LangValue-generated.h b/tdeabc/vcard/include/generated/LangValue-generated.h new file mode 100644 index 000000000..c4930c59e --- /dev/null +++ b/tdeabc/vcard/include/generated/LangValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +LangValue(); +LangValue(const LangValue&); +LangValue(const TQCString&); +LangValue & operator = (LangValue&); +LangValue & operator = (const TQCString&); +bool operator ==(LangValue&); +bool operator !=(LangValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {LangValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~LangValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "LangValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/NValue-generated.h b/tdeabc/vcard/include/generated/NValue-generated.h new file mode 100644 index 000000000..d78715ec0 --- /dev/null +++ b/tdeabc/vcard/include/generated/NValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +NValue(); +NValue(const NValue&); +NValue(const TQCString&); +NValue & operator = (NValue&); +NValue & operator = (const TQCString&); +bool operator ==(NValue&); +bool operator !=(NValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {NValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~NValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "NValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Name-generated.h b/tdeabc/vcard/include/generated/Name-generated.h new file mode 100644 index 000000000..17d56e680 --- /dev/null +++ b/tdeabc/vcard/include/generated/Name-generated.h @@ -0,0 +1,22 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +V_Name(); +V_Name(const V_Name&); +V_Name(const TQCString&); +V_Name & operator = (V_Name&); +V_Name & operator = (const TQCString&); +bool operator ==(V_Name&); +bool operator !=(V_Name& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {V_Name a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~V_Name(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/OrgValue-generated.h b/tdeabc/vcard/include/generated/OrgValue-generated.h new file mode 100644 index 000000000..661ecf5a3 --- /dev/null +++ b/tdeabc/vcard/include/generated/OrgValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +OrgValue(); +OrgValue(const OrgValue&); +OrgValue(const TQCString&); +OrgValue & operator = (OrgValue&); +OrgValue & operator = (const TQCString&); +bool operator ==(OrgValue&); +bool operator !=(OrgValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {OrgValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~OrgValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "OrgValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Param-generated.h b/tdeabc/vcard/include/generated/Param-generated.h new file mode 100644 index 000000000..bf63e7166 --- /dev/null +++ b/tdeabc/vcard/include/generated/Param-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +Param(); +Param(const Param&); +Param(const TQCString&); +Param & operator = (Param&); +Param & operator = (const TQCString&); +bool operator ==(Param&); +bool operator !=(Param& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {Param a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~Param(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "Param"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ParamName-generated.h b/tdeabc/vcard/include/generated/ParamName-generated.h new file mode 100644 index 000000000..60b1e12d5 --- /dev/null +++ b/tdeabc/vcard/include/generated/ParamName-generated.h @@ -0,0 +1,22 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +V_ParamName(); +V_ParamName(const V_ParamName&); +V_ParamName(const TQCString&); +V_ParamName & operator = (V_ParamName&); +V_ParamName & operator = (const TQCString&); +bool operator ==(V_ParamName&); +bool operator !=(V_ParamName& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {V_ParamName a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~V_ParamName(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/ParamValue-generated.h b/tdeabc/vcard/include/generated/ParamValue-generated.h new file mode 100644 index 000000000..f31a166c6 --- /dev/null +++ b/tdeabc/vcard/include/generated/ParamValue-generated.h @@ -0,0 +1,22 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +V_ParamValue(); +V_ParamValue(const V_ParamValue&); +V_ParamValue(const TQCString&); +V_ParamValue & operator = (V_ParamValue&); +V_ParamValue & operator = (const TQCString&); +bool operator ==(V_ParamValue&); +bool operator !=(V_ParamValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {V_ParamValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~V_ParamValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/PhoneNumberValue-generated.h b/tdeabc/vcard/include/generated/PhoneNumberValue-generated.h new file mode 100644 index 000000000..f0eb6b4f4 --- /dev/null +++ b/tdeabc/vcard/include/generated/PhoneNumberValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +PhoneNumberValue(); +PhoneNumberValue(const PhoneNumberValue&); +PhoneNumberValue(const TQCString&); +PhoneNumberValue & operator = (PhoneNumberValue&); +PhoneNumberValue & operator = (const TQCString&); +bool operator ==(PhoneNumberValue&); +bool operator !=(PhoneNumberValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {PhoneNumberValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~PhoneNumberValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "PhoneNumberValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/SoundValue-generated.h b/tdeabc/vcard/include/generated/SoundValue-generated.h new file mode 100644 index 000000000..64081be0b --- /dev/null +++ b/tdeabc/vcard/include/generated/SoundValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +SoundValue(); +SoundValue(const SoundValue&); +SoundValue(const TQCString&); +SoundValue & operator = (SoundValue&); +SoundValue & operator = (const TQCString&); +bool operator ==(SoundValue&); +bool operator !=(SoundValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {SoundValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~SoundValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "SoundValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/SourceParam-generated.h b/tdeabc/vcard/include/generated/SourceParam-generated.h new file mode 100644 index 000000000..e3b13bca1 --- /dev/null +++ b/tdeabc/vcard/include/generated/SourceParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +SourceParam(); +SourceParam(const SourceParam&); +SourceParam(const TQCString&); +SourceParam & operator = (SourceParam&); +SourceParam & operator = (const TQCString&); +bool operator ==(SourceParam&); +bool operator !=(SourceParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {SourceParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~SourceParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "SourceParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TelParam-generated.h b/tdeabc/vcard/include/generated/TelParam-generated.h new file mode 100644 index 000000000..9f8f24270 --- /dev/null +++ b/tdeabc/vcard/include/generated/TelParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TelParam(); +TelParam(const TelParam&); +TelParam(const TQCString&); +TelParam & operator = (TelParam&); +TelParam & operator = (const TQCString&); +bool operator ==(TelParam&); +bool operator !=(TelParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TelParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TelParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TelParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TelValue-generated.h b/tdeabc/vcard/include/generated/TelValue-generated.h new file mode 100644 index 000000000..600da7727 --- /dev/null +++ b/tdeabc/vcard/include/generated/TelValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TelValue(); +TelValue(const TelValue&); +TelValue(const TQCString&); +TelValue & operator = (TelValue&); +TelValue & operator = (const TQCString&); +bool operator ==(TelValue&); +bool operator !=(TelValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TelValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TelValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TelValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextBinParam-generated.h b/tdeabc/vcard/include/generated/TextBinParam-generated.h new file mode 100644 index 000000000..37dc56e55 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextBinParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextBinParam(); +TextBinParam(const TextBinParam&); +TextBinParam(const TQCString&); +TextBinParam & operator = (TextBinParam&); +TextBinParam & operator = (const TQCString&); +bool operator ==(TextBinParam&); +bool operator !=(TextBinParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextBinParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextBinParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextBinParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextBinValue-generated.h b/tdeabc/vcard/include/generated/TextBinValue-generated.h new file mode 100644 index 000000000..4c9580421 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextBinValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextBinValue(); +TextBinValue(const TextBinValue&); +TextBinValue(const TQCString&); +TextBinValue & operator = (TextBinValue&); +TextBinValue & operator = (const TQCString&); +bool operator ==(TextBinValue&); +bool operator !=(TextBinValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextBinValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextBinValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextBinValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextListValue-generated.h b/tdeabc/vcard/include/generated/TextListValue-generated.h new file mode 100644 index 000000000..8babb0d9f --- /dev/null +++ b/tdeabc/vcard/include/generated/TextListValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextListValue(); +TextListValue(const TextListValue&); +TextListValue(const TQCString&); +TextListValue & operator = (TextListValue&); +TextListValue & operator = (const TQCString&); +bool operator ==(TextListValue&); +bool operator !=(TextListValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextListValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextListValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextListValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextNSParam-generated.h b/tdeabc/vcard/include/generated/TextNSParam-generated.h new file mode 100644 index 000000000..bd8e74b07 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextNSParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextNSParam(); +TextNSParam(const TextNSParam&); +TextNSParam(const TQCString&); +TextNSParam & operator = (TextNSParam&); +TextNSParam & operator = (const TQCString&); +bool operator ==(TextNSParam&); +bool operator !=(TextNSParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextNSParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextNSParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextNSParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextParam-generated.h b/tdeabc/vcard/include/generated/TextParam-generated.h new file mode 100644 index 000000000..54ae611a5 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextParam-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextParam(); +TextParam(const TextParam&); +TextParam(const TQCString&); +TextParam & operator = (TextParam&); +TextParam & operator = (const TQCString&); +bool operator ==(TextParam&); +bool operator !=(TextParam& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextParam a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextParam(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextParam"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/TextValue-generated.h b/tdeabc/vcard/include/generated/TextValue-generated.h new file mode 100644 index 000000000..5b56b54a7 --- /dev/null +++ b/tdeabc/vcard/include/generated/TextValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +TextValue(); +TextValue(const TextValue&); +TextValue(const TQCString&); +TextValue & operator = (TextValue&); +TextValue & operator = (const TQCString&); +bool operator ==(TextValue&); +bool operator !=(TextValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {TextValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~TextValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "TextValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/URIValue-generated.h b/tdeabc/vcard/include/generated/URIValue-generated.h new file mode 100644 index 000000000..5a691e6d6 --- /dev/null +++ b/tdeabc/vcard/include/generated/URIValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +URIValue(); +URIValue(const URIValue&); +URIValue(const TQCString&); +URIValue & operator = (URIValue&); +URIValue & operator = (const TQCString&); +bool operator ==(URIValue&); +bool operator !=(URIValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {URIValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~URIValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "URIValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/UTCValue-generated.h b/tdeabc/vcard/include/generated/UTCValue-generated.h new file mode 100644 index 000000000..0c6edfb46 --- /dev/null +++ b/tdeabc/vcard/include/generated/UTCValue-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +UTCValue(); +UTCValue(const UTCValue&); +UTCValue(const TQCString&); +UTCValue & operator = (UTCValue&); +UTCValue & operator = (const TQCString&); +bool operator ==(UTCValue&); +bool operator !=(UTCValue& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {UTCValue a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~UTCValue(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "UTCValue"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/VCard-generated.h b/tdeabc/vcard/include/generated/VCard-generated.h new file mode 100644 index 000000000..4f36d11da --- /dev/null +++ b/tdeabc/vcard/include/generated/VCard-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +VCard(); +VCard(const VCard&); +VCard(const TQCString&); +VCard & operator = (VCard&); +VCard & operator = (const TQCString&); +bool operator ==(VCard&); +bool operator !=(VCard& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {VCard a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~VCard(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "VCard"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/VCardEntity-generated.h b/tdeabc/vcard/include/generated/VCardEntity-generated.h new file mode 100644 index 000000000..4e973e62a --- /dev/null +++ b/tdeabc/vcard/include/generated/VCardEntity-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +VCardEntity(); +VCardEntity(const VCardEntity&); +VCardEntity(const TQCString&); +VCardEntity & operator = (VCardEntity&); +VCardEntity & operator = (const TQCString&); +bool operator ==(VCardEntity&); +bool operator !=(VCardEntity& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {VCardEntity a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~VCardEntity(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "VCardEntity"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/Value-generated.h b/tdeabc/vcard/include/generated/Value-generated.h new file mode 100644 index 000000000..935d137b6 --- /dev/null +++ b/tdeabc/vcard/include/generated/Value-generated.h @@ -0,0 +1,23 @@ +// XXX Automatically generated. DO NOT EDIT! XXX // + +public: +Value(); +Value(const Value&); +Value(const TQCString&); +Value & operator = (Value&); +Value & operator = (const TQCString&); +bool operator ==(Value&); +bool operator !=(Value& x) {return !(*this==x);} +bool operator ==(const TQCString& s) {Value a(s);return(*this==a);} +bool operator != (const TQCString& s) {return !(*this == s);} + +virtual ~Value(); +void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} + +void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} + +void _parse(); +void _assemble(); +const char * className() const { return "Value"; } + +// End of automatically generated code // diff --git a/tdeabc/vcard/include/generated/generate b/tdeabc/vcard/include/generated/generate new file mode 100755 index 000000000..926dbf136 --- /dev/null +++ b/tdeabc/vcard/include/generated/generate @@ -0,0 +1,2 @@ +#!/bin/sh +cat headerBodies | awk -f generateHeaders.awk diff --git a/tdeabc/vcard/include/generated/generateHeaders.awk b/tdeabc/vcard/include/generated/generateHeaders.awk new file mode 100755 index 000000000..471db11b4 --- /dev/null +++ b/tdeabc/vcard/include/generated/generateHeaders.awk @@ -0,0 +1,41 @@ +#!/bin/awk -f + +{ + outfile = $1 "-generated.h" + name = $1 + + OFS="" + + print "// XXX Automatically generated. DO NOT EDIT! XXX //\n" > outfile + print "// WARNING! All changes made in this file will be lost!\n" > outfile + + if ($2 == "v") { pre = "virtual " } else { pre = "" } + + print "public:" >> outfile + print name "();" >> outfile + print name "(const " name "&);" >> outfile + print name "(const QCString&);" >> outfile + print pre name " & operator = (" name "&);" >> outfile + print pre name " & operator = (const QCString&);" >> outfile + print pre "bool operator ==(" name "&);" >> outfile + print pre "bool operator !=(" name "& x) {return !(*this==x);}" \ + >> outfile + print pre "bool operator ==(const QCString& s) {" name " a(s);" \ + "return(*this==a);} " >> outfile + print pre "bool operator != (const QCString& s) {return !(*this == s);}\n" \ + >> outfile + print "virtual ~" name "();" >> outfile + print pre "void parse() " \ + "{if(!parsed_) _parse();parsed_=true;assembled_=false;}\n" \ + >> outfile + print pre "void assemble() " \ + "{if(assembled_) return;parse();_assemble();assembled_=true;}\n" \ + >> outfile + print pre "void _parse();" >> outfile + print pre "void _assemble();" >> outfile + print pre "const char * className() const { return \"" name "\"; }" \ + >> outfile + + print "\n// End of automatically generated code //" >> outfile +} + diff --git a/tdeabc/vcard/include/generated/headerBodies b/tdeabc/vcard/include/generated/headerBodies new file mode 100644 index 000000000..5e77b2b5e --- /dev/null +++ b/tdeabc/vcard/include/generated/headerBodies @@ -0,0 +1,34 @@ +AdrParam Param +AdrValue Value +AgentParam Param +ContentLine Entity +DateParam Param +DateValue Value +EmailParam Param +GeoValue Value +Group Entity +ImageParam Param +ImageValue Value +LangValue Value +NValue Value +Param Entity +PhoneNumberValue Value +SourceParam Param +TelParam Param +TextParam Param +TextNSParam Param +TextValue Value +TextBinParam Param +URIValue Value +VCard Entity +VCardEntity Entity +Value Entity +SoundValue Value +AgentValue Value +TelValue Value +TextBinValue Value +OrgValue Value +UTCValue Value +ClassValue Value +FloatValue Value +TextListValue Value diff --git a/tdeabc/vcard/testread.cpp b/tdeabc/vcard/testread.cpp new file mode 100644 index 000000000..3a33c7d54 --- /dev/null +++ b/tdeabc/vcard/testread.cpp @@ -0,0 +1,129 @@ +#include +#include +#include + +#include +#include + +#include + +using namespace std; + +int main(int argc, char * argv[]) +{ + if (argc != 2) { + cerr << "Usage: " << argv[0] << " " << endl; + exit(1); + } + + TQFile f(argv[1]); + + TQCString str; + + if (!f.open(IO_ReadOnly)) { + cerr << "Couldn't open file \"" << argv[1] << endl; + exit(1); + } + + TQTextStream t(&f); + + while (!t.eof()) + str += t.readLine().utf8() + '\n'; + + using namespace VCARD; + + // Iterate through all vCards in the file. + + cout << "--------- begin ----------" << endl; + cout << str.data(); + cout << "--------- end ----------" << endl; + + VCardEntity e(str); + + VCardListIterator it(e.cardList()); + + for (; it.current(); ++it) { + + cerr << "****************** VCARD ********************" << endl; + + // Create a vcard using the string representation. + VCard & v (*it.current()); + + if (v.has(EntityEmail)) { + cerr << "Email parameter found" << endl; + + TQCString s = v.contentLine(EntityEmail)->value()->asString(); + + cerr << "Email value == " << s << endl; + } + + if (v.has(EntityNickname)) { + cerr << "Nickname parameter found" << endl; + + cerr << "Nickname value == " << + v.contentLine(EntityNickname)->value()->asString() << + endl; + } + + if (v.has(EntityRevision)) { + + cerr << "Revision parameter found" << endl; + + DateValue * d = + (DateValue *) + v.contentLine(EntityRevision)->value(); + + assert(d != 0); + + cerr << "Revision date: " << endl; + cerr << "Day : " << d->day() << endl; + cerr << "Month : " << d->month() << endl; + cerr << "Year : " << d->year() << endl; + + if (d->hasTime()) { + cerr << "Revision date has a time component" << endl; + cerr << "Revision time: " << endl; + cerr << "Hour : " << d->hour() << endl; + cerr << "Minute : " << d->minute() << endl; + cerr << "Second : " << d->second() << endl; + + } + else cerr << "Revision date does NOT have a time component" << endl; + } + + if (v.has(EntityURL)) { + cerr << "URL Parameter found" << endl; + + cerr << "URL Value == " << + v.contentLine(EntityURL)->value()->asString() << + endl; + + URIValue * urlVal = + (URIValue *)v.contentLine(EntityURL)->value(); + + assert(urlVal != 0); + + cerr << "URL scheme == " << + urlVal->scheme() << endl; + + cerr << "URL scheme specific part == " << + urlVal->schemeSpecificPart() << endl; + } + + if (v.has(EntityN)) { + cerr << "N Parameter found" << endl; + + NValue * n = + (NValue *)(v.contentLine(EntityN)->value()); + + cerr << "Family name == " << n->family() << endl; + cerr << "Given name == " << n->given() << endl; + cerr << "Middle name == " << n->middle() << endl; + cerr << "Prefix == " << n->prefix() << endl; + cerr << "Suffix == " << n->suffix() << endl; + } + + cerr << "***************** END VCARD ******************" << endl; + } +} + diff --git a/tdeabc/vcard/testwrite.cpp b/tdeabc/vcard/testwrite.cpp new file mode 100644 index 000000000..42b76c80f --- /dev/null +++ b/tdeabc/vcard/testwrite.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include + +#include + +int main(int argc,char **argv) +{ + TDEAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1"); + TDECmdLineArgs::init(argc,argv,&aboutData); + + TDEApplication app; + + kdDebug() << "Test Write VCard" << endl; + + using namespace VCARD; + + VCard v; + + ContentLine cl1; + cl1.setName(EntityTypeToParamName(EntityName)); + cl1.setValue(new TextValue("Hans Wurst")); + v.add(cl1); + + ContentLine cl2; + cl2.setName(EntityTypeToParamName(EntityTelephone)); + cl2.setValue(new TelValue("12345")); + ParamList p; + p.append( new TelParam("home") ); + p.append( new TelParam("fax") ); + cl2.setParamList( p ); + v.add(cl2); + + TQCString str = v.asString(); + + kdDebug() << "--- VCard begin ---" << endl + << str + << "--- VCard end ---" << endl; +} diff --git a/tdeabc/vcard/vCard-all.cpp b/tdeabc/vcard/vCard-all.cpp new file mode 100644 index 000000000..07bbcd2bb --- /dev/null +++ b/tdeabc/vcard/vCard-all.cpp @@ -0,0 +1,37 @@ +#include "AdrParam.cpp" +#include "AdrValue.cpp" +#include "AgentParam.cpp" +#include "AgentValue.cpp" +#include "ClassValue.cpp" +#include "ContentLine.cpp" +#include "DateParam.cpp" +#include "DateValue.cpp" +#include "EmailParam.cpp" +#include "Entity.cpp" +#include "Enum.cpp" +#include "FloatValue.cpp" +#include "GeoValue.cpp" +#include "ImageParam.cpp" +#include "ImageValue.cpp" +#include "ImgValue.cpp" +#include "LangValue.cpp" +#include "NValue.cpp" +#include "OrgValue.cpp" +#include "Param.cpp" +#include "PhoneNumberValue.cpp" +#include "RToken.cpp" +#include "SoundValue.cpp" +#include "SourceParam.cpp" +#include "TelParam.cpp" +#include "TelValue.cpp" +#include "TextBinParam.cpp" +#include "TextBinValue.cpp" +#include "TextListValue.cpp" +#include "TextParam.cpp" +#include "TextValue.cpp" +#include "URIValue.cpp" +#include "UTCValue.cpp" +#include "VCard.cpp" +#include "VCardEntity.cpp" +#include "Value.cpp" + diff --git a/tdeabc/vcard21parser.cpp b/tdeabc/vcard21parser.cpp new file mode 100644 index 000000000..8a3bfcaea --- /dev/null +++ b/tdeabc/vcard21parser.cpp @@ -0,0 +1,608 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Mark Westcott + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "vcard21parser.h" +#include "vcardconverter.h" + +using namespace KABC; + +bool VCardLineX::isValid() const +{ + // Invalid: if it is "begin:vcard" or "end:vcard" + if ( name == VCARD_BEGIN_N || name == VCARD_END_N ) + return false; + + if ( name[0] == 'x' && name[1] == '-' ) // A custom x- line + return true; + + // This is long but it makes it a bit faster (and saves me from using + // a tree which is probably the ideal situation, but a bit memory heavy) + switch( name[0] ) { + case 'a': + if ( name == VCARD_ADR && qualified && + (qualifiers.contains(VCARD_ADR_DOM) || + qualifiers.contains(VCARD_ADR_INTL) || + qualifiers.contains(VCARD_ADR_POSTAL) || + qualifiers.contains(VCARD_ADR_HOME) || + qualifiers.contains(VCARD_ADR_WORK) || + qualifiers.contains(VCARD_ADR_PREF) + ) ) + return true; + + if ( name == VCARD_AGENT ) + return true; + break; + + case 'b': + if ( name == VCARD_BDAY ) + return true; + break; + + case 'c': + if ( name == VCARD_CATEGORIES ) + return true; + if ( name == VCARD_CLASS && qualified && + (qualifiers.contains(VCARD_CLASS_PUBLIC) || + qualifiers.contains(VCARD_CLASS_PRIVATE) || + qualifiers.contains(VCARD_CLASS_CONFIDENTIAL) + ) ) + return true; + break; + + case 'e': + if ( name == VCARD_EMAIL && qualified && + (qualifiers.contains(VCARD_EMAIL_INTERNET) || + qualifiers.contains(VCARD_EMAIL_PREF) || + qualifiers.contains(VCARD_EMAIL_X400) + ) ) + return true; + break; + + case 'f': + if ( name == VCARD_FN ) + return true; + break; + + case 'g': + if ( name == VCARD_GEO ) + return true; + break; + + case 'k': + if ( name == VCARD_KEY && qualified && + (qualifiers.contains(VCARD_KEY_X509) || + qualifiers.contains(VCARD_KEY_PGP) + ) ) + return true; + break; + + case 'l': + if ( name == VCARD_LABEL ) + return true; + if ( name == VCARD_LOGO ) + return true; + break; + + case 'm': + if ( name == VCARD_MAILER ) + return true; + break; + + case 'n': + if ( name == VCARD_N ) + return true; + if ( name == VCARD_NAME ) + return true; + if ( name == VCARD_NICKNAME ) + return true; + if ( name == VCARD_NOTE ) + return true; + break; + + case 'o': + if ( name == VCARD_ORG ) + return true; + break; + + case 'p': + if ( name == VCARD_PHOTO ) + return true; + if ( name == VCARD_PROFILE ) + return true; + if ( name == VCARD_PRODID ) + return true; + break; + + case 'r': + if ( name == VCARD_ROLE ) + return true; + if ( name == VCARD_REV ) + return true; + break; + + case 's': + if ( name == VCARD_SOURCE ) + return true; + if ( name == VCARD_SOUND ) + return true; + break; + + case 't': + if ( name == VCARD_TEL && qualified && + (qualifiers.contains(VCARD_TEL_HOME) || + qualifiers.contains(VCARD_TEL_WORK) || + qualifiers.contains(VCARD_TEL_PREF) || + qualifiers.contains(VCARD_TEL_VOICE) || + qualifiers.contains(VCARD_TEL_FAX) || + qualifiers.contains(VCARD_TEL_MSG) || + qualifiers.contains(VCARD_TEL_CELL) || + qualifiers.contains(VCARD_TEL_PAGER) || + qualifiers.contains(VCARD_TEL_BBS) || + qualifiers.contains(VCARD_TEL_MODEM) || + qualifiers.contains(VCARD_TEL_CAR) || + qualifiers.contains(VCARD_TEL_ISDN) || + qualifiers.contains(VCARD_TEL_VIDEO) || + qualifiers.contains(VCARD_TEL_PCS) + ) ) + return true; + if ( name == VCARD_TZ ) + return true; + if ( name == VCARD_TITLE ) + return true; + break; + + case 'u': + if ( name == VCARD_URL ) + return true; + if ( name == VCARD_UID ) + return true; + break; + + case 'v': + if ( name == VCARD_VERSION ) + return true; + break; + default: + break; + } + + return false; +} + + +VCard21Parser::VCard21Parser() +{ +} + +VCard21Parser::~VCard21Parser() +{ +} + +void VCard21Parser::readFromString(KABC::AddressBook *addressbook, const TQString &data) +{ + KABC::Addressee mAddressee = readFromString(data); + addressbook->insertAddressee(mAddressee); +} + +KABC::Addressee VCard21Parser::readFromString( const TQString &data) +{ + KABC::Addressee addressee; + VCard21ParserImpl *vCard = VCard21ParserImpl::parseVCard(data); + TQString tmpStr; + + // Check if parsing failed + if (vCard == 0) + { + kdDebug() << "Parsing failed" << endl; + return addressee; + } + //set the addressees name and formated name + TQStringList tmpList = vCard->getValues(VCARD_N); + TQString formattedName = ""; + if (tmpList.count() > 0) + addressee.setFamilyName(tmpList[0]); + if (tmpList.count() > 1) + addressee.setGivenName(tmpList[1]); + if (tmpList.count() > 2) + addressee.setAdditionalName(tmpList[2]); + if (tmpList.count() > 3) + addressee.setPrefix(tmpList[3]); + if (tmpList.count() > 4) + addressee.setSuffix(tmpList[4]); + + tmpStr = (vCard->getValue(VCARD_FN)); + if (!tmpStr.isEmpty()) + addressee.setFormattedName(tmpStr); + + //set the addressee's nick name + tmpStr = vCard->getValue(VCARD_NICKNAME); + addressee.setNickName(tmpStr); + //set the addressee's organization + tmpStr = vCard->getValue(VCARD_ORG); + addressee.setOrganization(tmpStr); + //set the addressee's title + tmpStr = vCard->getValue(VCARD_TITLE); + addressee.setTitle(tmpStr); + //set the addressee's email - we can only deal with two. The preferenced one and one other. + tmpStr = vCard->getValue(VCARD_EMAIL, VCARD_EMAIL_INTERNET); + addressee.insertEmail(tmpStr, false); + tmpStr = vCard->getValue(VCARD_EMAIL,VCARD_EMAIL_PREF); + addressee.insertEmail(tmpStr, true); + //set the addressee's url + tmpStr = vCard->getValue(VCARD_URL); + if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_WORK); + if (tmpStr.isEmpty()) tmpStr = vCard->getValue(VCARD_URL, VCARD_ADR_HOME); + if (!tmpStr.isEmpty()) { + addressee.setUrl(KURL(tmpStr)); + } + + //set the addressee's birthday + tmpStr = vCard->getValue(VCARD_BDAY); + addressee.setBirthday(VCardStringToDate(tmpStr)); + + //set the addressee's phone numbers + for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { + if ( (*i).name == VCARD_TEL ) { + int type = 0; + if ( (*i).qualified ) { + if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) + type |= PhoneNumber::Home; + if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) + type |= PhoneNumber::Work; + if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) + type |= PhoneNumber::Pref; + // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) + // type |= PhoneNumber::Voice; + if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) + type |= PhoneNumber::Fax; + if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) + type |= PhoneNumber::Msg; + if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) + type |= PhoneNumber::Cell; + if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) + type |= PhoneNumber::Pager; + if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) + type |= PhoneNumber::Bbs; + if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) + type |= PhoneNumber::Modem; + if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) + type |= PhoneNumber::Car; + if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) + type |= PhoneNumber::Isdn; + if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) + type |= PhoneNumber::Video; + if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) + type |= PhoneNumber::Pcs; + } + addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); + } + } + + //set the addressee's addresses + for ( TQValueListIterator i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) { + if ( (*i).name == VCARD_ADR ) { + int type = 0; + if ( (*i).qualified ) { + if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) + type |= Address::Dom; + if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) + type |= Address::Intl; + if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) + type |= Address::Postal; + if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) + type |= Address::Parcel; + if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) + type |= Address::Home; + if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) + type |= Address::Work; + if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) + type |= Address::Pref; + } + addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); + } + } + + //set the addressee's delivery label + tmpStr = vCard->getValue(VCARD_LABEL); + if (!tmpStr.isEmpty()) { + tmpStr.replace("\r\n","\n"); + Address tmpAddress; + tmpAddress.setLabel(tmpStr); + addressee.insertAddress(tmpAddress); + } + + //set the addressee's notes + tmpStr = vCard->getValue(VCARD_NOTE); + tmpStr.replace("\r\n","\n"); + addressee.setNote(tmpStr); + + //set the addressee's timezone + tmpStr = vCard->getValue(VCARD_TZ); + TimeZone tmpZone(tmpStr.toInt()); + addressee.setTimeZone(tmpZone); + + //set the addressee's geographical position + tmpList = vCard->getValues(VCARD_GEO); + if (tmpList.count()==2) + { + tmpStr = tmpList[0]; + float glat = tmpStr.toFloat(); + tmpStr = tmpList[1]; + float glong = tmpStr.toFloat(); + Geo tmpGeo(glat,glong); + addressee.setGeo(tmpGeo); + } + + //set the last revision date + tmpStr = vCard->getValue(VCARD_REV); + addressee.setRevision(VCardStringToDate(tmpStr)); + + //set the role of the addressee + tmpStr = vCard->getValue(VCARD_ROLE); + addressee.setRole(tmpStr); + + delete vCard; + + return addressee; +} + + + +KABC::Address VCard21Parser::readAddressFromQStringList ( const TQStringList &data, const int type ) +{ + KABC::Address mAddress; + mAddress.setType( type ); + + if ( data.count() > 0 ) + mAddress.setPostOfficeBox( data[0] ); + if ( data.count() > 1 ) + mAddress.setExtended( data[1] ); + if ( data.count() > 2 ) + mAddress.setStreet( data[2] ); + if ( data.count() > 3 ) + mAddress.setLocality( data[3] ); + if ( data.count() > 4 ) + mAddress.setRegion( data[4] ); + if ( data.count() > 5 ) + mAddress.setPostalCode( data[5] ); + if ( data.count() > 6 ) + mAddress.setCountry( data[6] ); + + return mAddress; +} + + +VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err ) +{ + int _err = 0; + int _state = VC_STATE_BEGIN; + + TQValueList *vcdata; + TQValueList lines; + + vcdata = new TQValueList; + + lines = TQStringList::split( TQRegExp( "[\x0d\x0a]" ), vc ); + + // for each line in the vCard + for ( TQStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) { + VCardLineX _vcl; + + // take spaces off the end - ugly but necessary hack + for ( int g = (*j).length()-1; g > 0 && (*j)[g].isSpace(); --g ) + (*j)[g] = 0; + + // first token: + // verify state, update if necessary + if ( _state & VC_STATE_BEGIN) { + if ( !tqstricmp( (*j).latin1(), VCARD_BEGIN ) ) { + _state = VC_STATE_BODY; + continue; + } else { + _err = VC_ERR_NO_BEGIN; + break; + } + } else if ( _state & VC_STATE_BODY ) { + if ( !tqstricmp( (*j).latin1(), VCARD_END ) ) { + _state |= VC_STATE_END; + break; + } + + // split into two tokens + int colon = (*j).find( ':' ); + if ( colon < 0 ) { + _err = VC_ERR_INVALID_LINE; + break; + } + + TQString key = (*j).left( colon ); + TQString value = (*j).mid( colon + 1 ); + + // check for qualifiers and + // set name, qualified, qualifier(s) + TQStringList keyTokens = TQStringList::split( ';', key ); + bool qp = false, first_pass = true; + bool b64 = false; + + if ( keyTokens.count() > 0 ) { + _vcl.qualified = false; + _vcl.name = keyTokens[ 0 ].lower(); + + for ( TQStringList::Iterator z = keyTokens.begin(); z != keyTokens.end(); ++z ) { + TQString zz = (*z).lower(); + if ( zz == VCARD_QUOTED_PRINTABLE || zz == VCARD_ENCODING_QUOTED_PRINTABLE ) { + qp = true; + } else if ( zz == VCARD_BASE64 ) { + b64 = true; + } else if ( !first_pass ) { + _vcl.qualified = true; + _vcl.qualifiers.append( zz ); + } + first_pass = false; + } + } else { + _err = VC_ERR_INVALID_LINE; + } + + if ( _err != 0 ) + break; + + if ( _vcl.name == VCARD_VERSION ) + _state |= VC_STATE_HAVE_VERSION; + + if ( _vcl.name == VCARD_N || _vcl.name == VCARD_FN ) + _state |= VC_STATE_HAVE_N; + + // second token: + // split into tokens by ; + // add to parameters vector + if ( b64 ) { + if ( value[ value.length() - 1 ] != '=' ) + do { + value += *( ++j ); + } while ( (*j)[ (*j).length() - 1 ] != '=' ); + } else { + if ( qp ) { // join any split lines + while ( value[ value.length() - 1 ] == '=' ) { + value.remove( value.length() - 1, 1 ); + value.append(*( ++j )); + } + } + _vcl.parameters = TQStringList::split( ';', value, true ); + if ( qp ) { // decode the quoted printable + for ( TQStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) + *z = KCodecs::quotedPrintableDecode( TQCString((*z).latin1()) ); + } + } + } else { + _err = VC_ERR_INTERNAL; + break; + } + + // validate VCardLineX + if ( !_vcl.isValid() ) { + _err = VC_ERR_INVALID_LINE; + break; + } + + // add to vector + vcdata->append( _vcl ); + } + + // errors to check at the last minute (exit state related) + if ( _err == 0 ) { + if ( !( _state & VC_STATE_END ) ) // we have to have an end!! + _err = VC_ERR_NO_END; + + if ( !( _state & VC_STATE_HAVE_N ) || // we have to have the mandatories! + !( _state & VC_STATE_HAVE_VERSION ) ) + _err = VC_ERR_MISSING_MANDATORY; + } + + // set the error message if we can, and only return an object + // if the vCard was valid. + if ( err ) + *err = _err; + + if ( _err != 0 ) { + delete vcdata; + return 0; + } + + return new VCard21ParserImpl( vcdata ); +} + +VCard21ParserImpl::VCard21ParserImpl() + : _vcdata( 0 ) +{ +} + +VCard21ParserImpl::VCard21ParserImpl(TQValueList *_vcd) + : _vcdata(_vcd) +{ +} + +VCard21ParserImpl::~VCard21ParserImpl() +{ + delete _vcdata; + _vcdata = 0; +} + +TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& qualifier) +{ + TQString failed; + const TQString lowname = name.lower(); + const TQString lowqualifier = qualifier.lower(); + + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { + if ((*i).parameters.count() > 0) + return (*i).parameters[0]; + else return failed; + } + } + return failed; +} + + +TQString VCard21ParserImpl::getValue(const TQString& name) +{ + TQString failed; + const TQString lowname = name.lower(); + + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && !(*i).qualified) { + if ((*i).parameters.count() > 0) + return (*i).parameters[0]; + else return failed; + } + } + return failed; +} + + +TQStringList VCard21ParserImpl::getValues(const TQString& name) +{ + const TQString lowname = name.lower(); + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && !(*i).qualified) + return (*i).parameters; + } + // failed. + return TQStringList(); +} + +TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& qualifier) +{ + const TQString lowname = name.lower(); + const TQString lowqualifier = qualifier.lower(); + for (TQValueListIterator i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) + return (*i).parameters; + } + // failed. + return TQStringList(); +} + + diff --git a/tdeabc/vcard21parser.h b/tdeabc/vcard21parser.h new file mode 100644 index 000000000..0eb66fa93 --- /dev/null +++ b/tdeabc/vcard21parser.h @@ -0,0 +1,221 @@ +/* + This file is part of libkabc. + + Copyright (c) 2002 Mark Westcott + Copyright (c) 2000 George Staikos + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARD21FORMAT_H +#define KABC_VCARD21FORMAT_H + +#include +#include +#include +#include +#include +#include + +#include "addressee.h" +#include "addressbook.h" +#include "phonenumber.h" + + +#define VCARD_BEGIN "begin:vcard" +#define VCARD_END "end:vcard" +#define VCARD_BEGIN_N "begin" +#define VCARD_END_N "end" +#define VCARD_VERSION "version" + +#define VCARD_FN "fn" +#define VCARD_N "n" + +// optional +#define VCARD_NAME "name" +#define VCARD_NICKNAME "nickname" +#define VCARD_PHOTO "photo" +#define VCARD_BDAY "bday" +#define VCARD_ADR "adr" + +// types +#define VCARD_ADR_DOM "dom" +#define VCARD_ADR_INTL "intl" +#define VCARD_ADR_POSTAL "postal" +#define VCARD_ADR_PARCEL "parcel" +#define VCARD_ADR_HOME "home" +#define VCARD_ADR_WORK "work" +#define VCARD_ADR_PREF "pref" +// values +#define VCARD_ADR_POBOX "PO Box" +#define VCARD_ADR_EXTADR "Extended Address" +#define VCARD_ADR_STREET "Street" +#define VCARD_ADR_LOCALITY "Locality" +#define VCARD_ADR_REGION "Region" +#define VCARD_ADR_POSTCODE "Postal Code" +#define VCARD_ADR_COUNTRY "Country Name" +#define VCARD_LABEL "label" +#define VCARD_PROFILE "profile" +#define VCARD_SOURCE "source" +#define VCARD_TEL "tel" +// types +#define VCARD_TEL_HOME "home" +#define VCARD_TEL_WORK "work" +#define VCARD_TEL_PREF "pref" +#define VCARD_TEL_VOICE "voice" +#define VCARD_TEL_FAX "fax" +#define VCARD_TEL_MSG "msg" +#define VCARD_TEL_CELL "cell" +#define VCARD_TEL_PAGER "pager" +#define VCARD_TEL_BBS "bbs" +#define VCARD_TEL_MODEM "modem" +#define VCARD_TEL_CAR "car" +#define VCARD_TEL_ISDN "isdn" +#define VCARD_TEL_VIDEO "video" +#define VCARD_TEL_PCS "pcs" +#define VCARD_EMAIL "email" +// types +#define VCARD_EMAIL_PREF "pref" +#define VCARD_EMAIL_INTERNET "internet" +#define VCARD_EMAIL_X400 "x400" +#define VCARD_TZ "tz" +#define VCARD_GEO "geo" +#define VCARD_MAILER "mailer" +#define VCARD_TITLE "title" +#define VCARD_ROLE "role" +#define VCARD_LOGO "logo" +#define VCARD_AGENT "agent" +#define VCARD_ORG "org" +#define VCARD_CATEGORIES "categories" +#define VCARD_NOTE "note" +#define VCARD_PRODID "prodid" +#define VCARD_REV "rev" +#define VCARD_SOUND "sound" +#define VCARD_UID "uid" +#define VCARD_URL "url" +#define VCARD_CLASS "class" +#define VCARD_CLASS_PUBLIC "public" +#define VCARD_CLASS_PRIVATE "private" +#define VCARD_CLASS_CONFIDENTIAL "confidential" +#define VCARD_KEY "key" +// types +#define VCARD_KEY_X509 "x509" +#define VCARD_KEY_PGP "pgp" + +#define VCARD_QUOTED_PRINTABLE "quoted-printable" +// this one is a temporary hack until we support TYPE=VALUE +#define VCARD_ENCODING_QUOTED_PRINTABLE "encoding=quoted-printable" +#define VCARD_BASE64 "base64" + +#define VC_STATE_BEGIN 1 +#define VC_STATE_BODY 2 +#define VC_STATE_END 4 +#define VC_STATE_HAVE_N 8 +#define VC_STATE_HAVE_VERSION 16 + +#define VC_ERR_NO_BEGIN 1 +#define VC_ERR_NO_END 2 +#define VC_ERR_INVALID_LINE 3 +#define VC_ERR_INTERNAL 4 +#define VC_ERR_INVALID_NAME 5 +#define VC_ERR_MISSING_MANDATORY 6 + +namespace KABC { + +class AddressBook; + +/** + @deprecated use VCardConverter instead. + */ +class KABC_EXPORT_DEPRECATED VCard21Parser +{ +public: + + /** + * Constructor. + */ + VCard21Parser(); + + /** + * Destructor. + */ + virtual ~VCard21Parser(); + + /** + * Parses a string in vcard2.1 format and saves the single addressees + * to the address book. + * + * @param ab The address book. + * @param str The vcard string. + */ + void readFromString( KABC::AddressBook *ab, const TQString &str ); + + /** + * FIXME: we need a writeToString method + * TQString writeToString (KABC::AddressBook *); + */ + + /** + * Parses a string in vcard2.1 format and returns the inherent addressee. + */ + KABC::Addressee readFromString( const TQString &data); + + /** + * Helper method to store a address. + * + * @param data A string list, that is filled with 'street', 'house number' ... + * @param type The type of the returned address. + */ + static KABC::Address readAddressFromQStringList (const TQStringList &data, const int type); +}; + +} + +/** + * @short Helper class + */ +class KABC_EXPORT VCardLineX +{ +public: + TQString name; + bool qualified; + TQValueList qualifiers; + TQValueList parameters; + bool isValid() const; +}; + +/** + * @short Helper class + */ +class KABC_EXPORT VCard21ParserImpl +{ + friend class VCardLineX; + +public: + VCard21ParserImpl(); + virtual ~VCard21ParserImpl(); + static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = NULL); + TQString getValue(const TQString& name, const TQString& qualifier); + TQString getValue(const TQString& name); + TQStringList getValues(const TQString& name, const TQString& qualifier); + TQStringList getValues(const TQString& name); + + TQValueList *_vcdata; + +private: + VCard21ParserImpl (TQValueList *_vcd); +}; + +#endif diff --git a/tdeabc/vcardconverter.cpp b/tdeabc/vcardconverter.cpp new file mode 100644 index 000000000..d575b019c --- /dev/null +++ b/tdeabc/vcardconverter.cpp @@ -0,0 +1,129 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcard21parser.h" +#include "vcardformatimpl.h" +#include "vcardtool.h" + +#include "vcardconverter.h" + +using namespace KABC; + +struct VCardConverter::VCardConverterData +{ + VCard21Parser vcard21parser; + VCardFormatImpl vcard30parser; +}; + +VCardConverter::VCardConverter() + : d( new VCardConverterData ) +{ +} + +VCardConverter::~VCardConverter() +{ + delete d; + d = 0; +} + +TQString VCardConverter::createVCard( const Addressee &addr, Version version ) +{ + Addressee::List list; + list.append( addr ); + + return createVCards( list, version ); +} + +TQString VCardConverter::createVCards( Addressee::List list, Version version ) +{ + VCardTool tool; + + return tool.createVCards( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) ); +} + +Addressee VCardConverter::parseVCard( const TQString& vcard ) +{ + Addressee::List list = parseVCards( vcard ); + + return list[ 0 ]; +} + +Addressee::List VCardConverter::parseVCards( const TQString& vcard ) +{ + VCardTool tool; + + return tool.parseVCards( vcard ); +} + +// ---------------------------- deprecated stuff ---------------------------- // + +bool VCardConverter::vCardToAddressee( const TQString &str, Addressee &addr, Version version ) +{ + if ( version == v2_1 ) { + addr = d->vcard21parser.readFromString( str ); + return true; + } + + if ( version == v3_0 ) + return d->vcard30parser.readFromString( str, addr ); + + return false; +} + +bool VCardConverter::addresseeToVCard( const Addressee &addr, TQString &str, Version version ) +{ + if ( version == v2_1 ) + return false; + + if ( version == v3_0 ) + return d->vcard30parser.writeToString( addr, str ); + + return false; +} + + +/* Helper functions */ + +TQString KABC::dateToVCardString( const TQDateTime &dateTime ) +{ + return dateTime.toString("yyyyMMddThhmmssZ"); +} + +TQString KABC::dateToVCardString( const TQDate &date ) +{ + return date.toString("yyyyMMdd"); +} + +TQDateTime KABC::VCardStringToDate( const TQString &dateString ) +{ + TQDate date; + TQTime time; + TQString d( dateString ); + + d = d.remove('-').remove(':'); + + if (d.length()>=8) + date = TQDate( d.mid(0,4).toUInt(), d.mid(4,2).toUInt(), d.mid(6,2).toUInt() ); + if (d.length()>9 && d[8].upper()=='T') + time = TQTime( d.mid(9,2).toUInt(), d.mid(11,2).toUInt(), d.mid(13,2).toUInt() ); + + return TQDateTime( date, time ); +} + diff --git a/tdeabc/vcardconverter.h b/tdeabc/vcardconverter.h new file mode 100644 index 000000000..ab09279f2 --- /dev/null +++ b/tdeabc/vcardconverter.h @@ -0,0 +1,163 @@ +/* + This file is part of libkabc. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDCONVERTER_H +#define KABC_VCARDCONVERTER_H + +#include + +#include "addressee.h" + +namespace KABC { + +/** + @short Class to converting contact objects into vCard format and vice versa. + + This class implements reading and writing of contact using from/to the + vCard format. Currently vCard version 2.1 and 3.0 is supported. + + Example: + + \code + + TQFile file( "myfile.vcf" ); + file.open( IO_ReadOnly ); + + TQString data = file.readAll(); + + VCardConverter converter; + Addressee::List list = converter.parseVCards( data ); + + // print formatted name of first contact + tqDebug( "name=%s", list[ 0 ].formattedName().latin1() ); + + \endcode +*/ +class KABC_EXPORT VCardConverter +{ + public: + + /** + @li v2_1 - VCard format version 2.1 + @li v3_0 - VCard format version 3.0 + */ + enum Version + { + v2_1, + v3_0 + }; + + /** + Constructor. + */ + VCardConverter(); + + /** + Destructor. + */ + ~VCardConverter(); + + /** + Creates a string in vCard format which contains the given + contact. + + @param addr The contact object + @param version The version of the generated vCard format + */ + TQString createVCard( const Addressee &addr, Version version = v3_0 ); + + /** + Creates a string in vCard format which contains the given + list of contact. + + @param list The list of contact objects + @param version The version of the generated vCard format + */ + // FIXME: Add error handling + TQString createVCards( Addressee::List list, Version version = v3_0 ); + + // FIXME: Add "createVCards( AddressBook * )" + + /** + Parses a string in vCard format and returns the first contact. + */ + Addressee parseVCard( const TQString& vcard ); + + /** + Parses a string in vCard format and returns a list of contact objects. + */ + // FIXME: Add error handling + Addressee::List parseVCards( const TQString& vcard ); + + // FIXME: Add "bool parseVCards( AddressBook *, const TQString &vcard )" + + /** + @deprecated + */ + bool vCardToAddressee( const TQString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED; + + /** + @deprecated + */ + bool addresseeToVCard( const Addressee&, TQString&, Version version = v3_0 ) KDE_DEPRECATED; + + private: + /** + Split a string and replaces escaped separators on the fly with + unescaped ones. + */ + TQStringList splitString( const TQChar &sep, const TQString &value ); + + struct VCardConverterData; + VCardConverterData *d; +}; + + +/** + Helper functions + */ + +/** + * Converts a TQDateTime to a date string as it is used in VCard and LDIF files. + * The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z") + * @param dateTime date and time to be converted + * @since 3.2 + */ +KABC_EXPORT TQString dateToVCardString( const TQDateTime &dateTime ); + +/** + * Converts a TQDate to a short date string as it is used in VCard and LDIF files. + * The return value is in the form "yyyyMMdd" (e.g. "20031201") + * @param date date to be converted + * @since 3.2 + */ +KABC_EXPORT TQString dateToVCardString( const TQDate &date ); + +/** + * Converts a date string as it is used in VCard and LDIF files to a TQDateTime value. + * If the date string does not contain a time value, it will be returned as 00:00:00. + * (e.g. "20031201T120000" will return a TQDateTime for 2003-12-01 at 12:00) + * @param dateString string representing the date and time. + * @since 3.2 + */ +KABC_EXPORT TQDateTime VCardStringToDate( const TQString &dateString ); + +} +#endif diff --git a/tdeabc/vcardformat.cpp b/tdeabc/vcardformat.cpp new file mode 100644 index 000000000..147aa4259 --- /dev/null +++ b/tdeabc/vcardformat.cpp @@ -0,0 +1,59 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardformatimpl.h" + +#include "vcardformat.h" + +using namespace KABC; + +VCardFormat::VCardFormat() +{ + mImpl = new VCardFormatImpl; +} + +VCardFormat::~VCardFormat() +{ + delete mImpl; +} + +bool VCardFormat::load( AddressBook *addressBook, const TQString &fileName ) +{ + TQFile f( fileName ); + if ( !f.open( IO_ReadOnly ) ) return false; + + bool result = mImpl->loadAll( addressBook, 0, &f ); + + f.close(); + + return result; +} + +bool VCardFormat::save( AddressBook *addressBook, const TQString &fileName ) +{ + TQFile f( fileName ); + if ( !f.open( IO_WriteOnly ) ) return false; + + mImpl->saveAll( addressBook, 0, &f ); + + f.close(); + + return true; +} diff --git a/tdeabc/vcardformat.h b/tdeabc/vcardformat.h new file mode 100644 index 000000000..8194056cb --- /dev/null +++ b/tdeabc/vcardformat.h @@ -0,0 +1,49 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KABC_VCARDFORMAT_H +#define KABC_VCARDFORMAT_H + +#include + +#include "format.h" + +namespace KABC { + +class AddressBook; +class VCardFormatImpl; + +/** + @deprecated use VCardFormatPlugin instead. + */ +class KABC_EXPORT_DEPRECATED VCardFormat : public Format { + public: + VCardFormat(); + virtual ~VCardFormat(); + + bool load( AddressBook *, const TQString &fileName ); + bool save( AddressBook *, const TQString &fileName ); + + private: + VCardFormatImpl *mImpl; +}; + +} + +#endif diff --git a/tdeabc/vcardformatimpl.cpp b/tdeabc/vcardformatimpl.cpp new file mode 100644 index 000000000..c0d39bb95 --- /dev/null +++ b/tdeabc/vcardformatimpl.cpp @@ -0,0 +1,1001 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include +#include + +#include +#include +#include +#include + +#include + +#include "addressbook.h" +#include "vcardformatimpl.h" + +using namespace KABC; +using namespace VCARD; + +bool VCardFormatImpl::load( Addressee &addressee, TQFile *file ) +{ + kdDebug(5700) << "VCardFormat::load()" << endl; + + TQByteArray fdata = file->readAll(); + TQCString data(fdata.data(), fdata.size()+1); + + VCardEntity e( data ); + + VCardListIterator it( e.cardList() ); + + if ( it.current() ) { + VCARD::VCard v(*it.current()); + loadAddressee( addressee, v ); + return true; + } + + return false; +} + +bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, TQFile *file ) +{ + kdDebug(5700) << "VCardFormat::loadAll()" << endl; + + TQByteArray fdata = file->readAll(); + TQCString data(fdata.data(), fdata.size()+1); + + VCardEntity e( data ); + + VCardListIterator it( e.cardList() ); + + for (; it.current(); ++it) { + VCARD::VCard v(*it.current()); + Addressee addressee; + loadAddressee( addressee, v ); + addressee.setResource( resource ); + addressBook->insertAddressee( addressee ); + } + + return true; +} + +void VCardFormatImpl::save( const Addressee &addressee, TQFile *file ) +{ + VCardEntity vcards; + VCardList vcardlist; + vcardlist.setAutoDelete( true ); + + VCARD::VCard *v = new VCARD::VCard; + + saveAddressee( addressee, v, false ); + + vcardlist.append( v ); + vcards.setCardList( vcardlist ); + + TQCString vcardData = vcards.asString(); + file->writeBlock( (const char*)vcardData, vcardData.length() ); +} + +void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, TQFile *file ) +{ + VCardEntity vcards; + VCardList vcardlist; + vcardlist.setAutoDelete( true ); + + AddressBook::Iterator it; + for ( it = ab->begin(); it != ab->end(); ++it ) { + if ( (*it).resource() == resource ) { + VCARD::VCard *v = new VCARD::VCard; + saveAddressee( (*it), v, false ); + (*it).setChanged( false ); + vcardlist.append( v ); + } + } + + vcards.setCardList( vcardlist ); + + TQCString vcardData = vcards.asString(); + file->writeBlock( (const char*)vcardData, vcardData.length() ); +} + +bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v ) +{ + TQPtrList contentLines = v.contentLineList(); + ContentLine *cl; + + for( cl = contentLines.first(); cl; cl = contentLines.next() ) { + TQCString n = cl->name(); + if ( n.left( 2 ) == "X-" ) { + n = n.mid( 2 ); + int posDash = n.find( "-" ); + addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ), + TQString::fromUtf8( n.mid( posDash + 1 ) ), + TQString::fromUtf8( cl->value()->asString() ) ); + continue; + } + + EntityType type = cl->entityType(); + switch( type ) { + + case EntityUID: + addressee.setUid( readTextValue( cl ) ); + break; + + case EntityURI: + addressee.setUri( readTextValue( cl ) ); + break; + + case EntityEmail: + addressee.insertEmail( readTextValue( cl ) ); + break; + + case EntityName: + addressee.setName( readTextValue( cl ) ); + break; + + case EntityFullName: + addressee.setFormattedName( readTextValue( cl ) ); + break; + + case EntityURL: + addressee.setUrl( KURL( readTextValue( cl ) ) ); + break; + + case EntityNickname: + addressee.setNickName( readTextValue( cl ) ); + break; + + case EntityLabel: + // not yet supported by kabc + break; + + case EntityMailer: + addressee.setMailer( readTextValue( cl ) ); + break; + + case EntityTitle: + addressee.setTitle( readTextValue( cl ) ); + break; + + case EntityRole: + addressee.setRole( readTextValue( cl ) ); + break; + + case EntityOrganisation: + addressee.setOrganization( readTextValue( cl ) ); + break; + + case EntityNote: + addressee.setNote( readTextValue( cl ) ); + break; + + case EntityProductID: + addressee.setProductId( readTextValue( cl ) ); + break; + + case EntitySortString: + addressee.setSortString( readTextValue( cl ) ); + break; + + case EntityN: + readNValue( cl, addressee ); + break; + + case EntityAddress: + addressee.insertAddress( readAddressValue( cl ) ); + break; + + case EntityTelephone: + addressee.insertPhoneNumber( readTelephoneValue( cl ) ); + break; + + case EntityCategories: + addressee.setCategories( TQStringList::split( ",", readTextValue( cl ) ) ); + break; + + case EntityBirthday: + addressee.setBirthday( readDateValue( cl ) ); + break; + + case EntityRevision: + addressee.setRevision( readDateTimeValue( cl ) ); + break; + + case EntityGeo: + addressee.setGeo( readGeoValue( cl ) ); + break; + + case EntityTimeZone: + addressee.setTimeZone( readUTCValue( cl ) ); + break; + + case EntityVersion: + break; + + case EntityClass: + addressee.setSecrecy( readClassValue( cl ) ); + break; + + case EntityKey: + addressee.insertKey( readKeyValue( cl ) ); + break; + + case EntityPhoto: + addressee.setPhoto( readPictureValue( cl, EntityPhoto, addressee ) ); + break; + + case EntityLogo: + addressee.setLogo( readPictureValue( cl, EntityLogo, addressee ) ); + break; + + case EntityAgent: + addressee.setAgent( readAgentValue( cl ) ); + break; + + case EntitySound: + addressee.setSound( readSoundValue( cl, addressee ) ); + break; + + default: + kdDebug(5700) << "VCardFormat::load(): Unsupported entity: " + << int( type ) << ": " << cl->asString() << endl; + break; + } + } + + for( cl = contentLines.first(); cl; cl = contentLines.next() ) { + EntityType type = cl->entityType(); + if ( type == EntityLabel ) { + int type = readAddressParam( cl ); + Address address = addressee.address( type ); + if ( address.isEmpty() ) + address.setType( type ); + + address.setLabel( TQString::fromUtf8( cl->value()->asString() ) ); + addressee.insertAddress( address ); + } + } + + return true; +} + +void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v, bool intern ) +{ + ContentLine cl; + TQString value; + + addTextValue( v, EntityName, addressee.name() ); + addTextValue( v, EntityUID, addressee.uid() ); + addTextValue( v, EntityURI, addressee.uri() ); + addTextValue( v, EntityFullName, addressee.formattedName() ); + + TQStringList emails = addressee.emails(); + TQStringList::ConstIterator it4; + for( it4 = emails.begin(); it4 != emails.end(); ++it4 ) { + addTextValue( v, EntityEmail, *it4 ); + } + + TQStringList customs = addressee.customs(); + TQStringList::ConstIterator it5; + for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { + addCustomValue( v, *it5 ); + } + + addTextValue( v, EntityURL, addressee.url().url() ); + + addNValue( v, addressee ); + + addTextValue( v, EntityNickname, addressee.nickName() ); + addTextValue( v, EntityMailer, addressee.mailer() ); + addTextValue( v, EntityTitle, addressee.title() ); + addTextValue( v, EntityRole, addressee.role() ); + addTextValue( v, EntityOrganisation, addressee.organization() ); + addTextValue( v, EntityNote, addressee.note() ); + addTextValue( v, EntityProductID, addressee.productId() ); + addTextValue( v, EntitySortString, addressee.sortString() ); + + Address::List addresses = addressee.addresses(); + Address::List::ConstIterator it3; + for( it3 = addresses.begin(); it3 != addresses.end(); ++it3 ) { + addAddressValue( v, *it3 ); + addLabelValue( v, *it3 ); + } + + PhoneNumber::List phoneNumbers = addressee.phoneNumbers(); + PhoneNumber::List::ConstIterator it2; + for( it2 = phoneNumbers.begin(); it2 != phoneNumbers.end(); ++it2 ) { + addTelephoneValue( v, *it2 ); + } + + Key::List keys = addressee.keys(); + Key::List::ConstIterator it6; + for( it6 = keys.begin(); it6 != keys.end(); ++it6 ) { + addKeyValue( v, *it6 ); + } + + addTextValue( v, EntityCategories, addressee.categories().join(",") ); + + addDateValue( v, EntityBirthday, TQT_TQDATE_OBJECT(addressee.birthday().date()) ); + addDateTimeValue( v, EntityRevision, TQT_TQDATETIME_OBJECT(addressee.revision()) ); + addGeoValue( v, addressee.geo() ); + addUTCValue( v, addressee.timeZone() ); + + addClassValue( v, addressee.secrecy() ); + + addPictureValue( v, EntityPhoto, addressee.photo(), addressee, intern ); + addPictureValue( v, EntityLogo, addressee.logo(), addressee, intern ); + + addAgentValue( v, addressee.agent() ); + + addSoundValue( v, addressee.sound(), addressee, intern ); +} + +void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt ) +{ + if ( txt.isEmpty() ) return; + + ContentLine cl; + cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() ); + TQString value = txt.mid( txt.find( ":" ) + 1 ); + if ( value.isEmpty() ) + return; + cl.setValue( new TextValue( value.utf8() ) ); + v->add(cl); +} + +void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const TQString &txt ) +{ + if ( txt.isEmpty() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + cl.setValue( new TextValue( txt.utf8() ) ); + v->add(cl); +} + +void VCardFormatImpl::addDateValue( VCARD::VCard *vcard, EntityType type, + const TQDate &date ) +{ + if ( !date.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + + DateValue *v = new DateValue( date ); + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addDateTimeValue( VCARD::VCard *vcard, EntityType type, + const TQDateTime &dateTime ) +{ + if ( !dateTime.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + + DateValue *v = new DateValue( dateTime ); + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addAddressValue( VCARD::VCard *vcard, const Address &a ) +{ + if ( a.isEmpty() ) + return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityAddress ) ); + + AdrValue *v = new AdrValue; + v->setPOBox( a.postOfficeBox().utf8() ); + v->setExtAddress( a.extended().utf8() ); + v->setStreet( a.street().utf8() ); + v->setLocality( a.locality().utf8() ); + v->setRegion( a.region().utf8() ); + v->setPostCode( a.postalCode().utf8() ); + v->setCountryName( a.country().utf8() ); + cl.setValue( v ); + + addAddressParam( &cl, a.type() ); + + vcard->add( cl ); +} + +void VCardFormatImpl::addLabelValue( VCARD::VCard *vcard, const Address &a ) +{ + if ( a.label().isEmpty() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityLabel ) ); + cl.setValue( new TextValue( a.label().utf8() ) ); + + addAddressParam( &cl, a.type() ); + + vcard->add( cl ); +} + +void VCardFormatImpl::addAddressParam( ContentLine *cl, int type ) +{ + ParamList params; + if ( type & Address::Dom ) params.append( new Param( "TYPE", "dom" ) ); + if ( type & Address::Intl ) params.append( new Param( "TYPE", "intl" ) ); + if ( type & Address::Parcel ) params.append( new Param( "TYPE", "parcel" ) ); + if ( type & Address::Postal ) params.append( new Param( "TYPE", "postal" ) ); + if ( type & Address::Work ) params.append( new Param( "TYPE", "work" ) ); + if ( type & Address::Home ) params.append( new Param( "TYPE", "home" ) ); + if ( type & Address::Pref ) params.append( new Param( "TYPE", "pref" ) ); + cl->setParamList( params ); +} + +void VCardFormatImpl::addGeoValue( VCARD::VCard *vcard, const Geo &geo ) +{ + if ( !geo.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityGeo ) ); + + GeoValue *v = new GeoValue; + v->setLatitude( geo.latitude() ); + v->setLongitude( geo.longitude() ); + + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addUTCValue( VCARD::VCard *vcard, const TimeZone &tz ) +{ + if ( !tz.isValid() ) return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityTimeZone ) ); + + UTCValue *v = new UTCValue; + + v->setPositive( tz.offset() >= 0 ); + v->setHour( (tz.offset() / 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); + v->setMinute( (tz.offset() % 60) * ( tz.offset() >= 0 ? 1 : -1 ) ); + + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::addClassValue( VCARD::VCard *vcard, const Secrecy &secrecy ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityClass ) ); + + ClassValue *v = new ClassValue; + switch ( secrecy.type() ) { + case Secrecy::Public: + v->setType( (int)ClassValue::Public ); + break; + case Secrecy::Private: + v->setType( (int)ClassValue::Private ); + break; + case Secrecy::Confidential: + v->setType( (int)ClassValue::Confidential ); + break; + } + + cl.setValue( v ); + vcard->add(cl); +} + + +Address VCardFormatImpl::readAddressValue( ContentLine *cl ) +{ + Address a; + AdrValue *v = (AdrValue *)cl->value(); + a.setPostOfficeBox( TQString::fromUtf8( v->poBox() ) ); + a.setExtended( TQString::fromUtf8( v->extAddress() ) ); + a.setStreet( TQString::fromUtf8( v->street() ) ); + a.setLocality( TQString::fromUtf8( v->locality() ) ); + a.setRegion( TQString::fromUtf8( v->region() ) ); + a.setPostalCode( TQString::fromUtf8( v->postCode() ) ); + a.setCountry( TQString::fromUtf8( v->countryName() ) ); + + a.setType( readAddressParam( cl ) ); + + return a; +} + +int VCardFormatImpl::readAddressParam( ContentLine *cl ) +{ + int type = 0; + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "TYPE" ) { + if ( (*it)->value() == "dom" ) type |= Address::Dom; + else if ( (*it)->value() == "intl" ) type |= Address::Intl; + else if ( (*it)->value() == "parcel" ) type |= Address::Parcel; + else if ( (*it)->value() == "postal" ) type |= Address::Postal; + else if ( (*it)->value() == "work" ) type |= Address::Work; + else if ( (*it)->value() == "home" ) type |= Address::Home; + else if ( (*it)->value() == "pref" ) type |= Address::Pref; + } + } + return type; +} + +void VCardFormatImpl::addNValue( VCARD::VCard *vcard, const Addressee &a ) +{ + ContentLine cl; + cl.setName(EntityTypeToParamName( EntityN ) ); + NValue *v = new NValue; + v->setFamily( TQString(a.familyName()).utf8() ); + v->setGiven( TQString(a.givenName()).utf8() ); + v->setMiddle( TQString(a.additionalName()).utf8() ); + v->setPrefix( TQString(a.prefix()).utf8() ); + v->setSuffix( TQString(a.suffix()).utf8() ); + + cl.setValue( v ); + vcard->add(cl); +} + +void VCardFormatImpl::readNValue( ContentLine *cl, Addressee &a ) +{ + NValue *v = (NValue *)cl->value(); + a.setFamilyName( TQString::fromUtf8( v->family() ) ); + a.setGivenName( TQString::fromUtf8( v->given() ) ); + a.setAdditionalName( TQString::fromUtf8( v->middle() ) ); + a.setPrefix( TQString::fromUtf8( v->prefix() ) ); + a.setSuffix( TQString::fromUtf8( v->suffix() ) ); +} + +void VCardFormatImpl::addTelephoneValue( VCARD::VCard *v, const PhoneNumber &p ) +{ + if ( p.number().isEmpty() ) + return; + + ContentLine cl; + cl.setName(EntityTypeToParamName(EntityTelephone)); + cl.setValue(new TelValue( p.number().utf8() )); + + ParamList params; + if( p.type() & PhoneNumber::Home ) params.append( new Param( "TYPE", "home" ) ); + if( p.type() & PhoneNumber::Work ) params.append( new Param( "TYPE", "work" ) ); + if( p.type() & PhoneNumber::Msg ) params.append( new Param( "TYPE", "msg" ) ); + if( p.type() & PhoneNumber::Pref ) params.append( new Param( "TYPE", "pref" ) ); + if( p.type() & PhoneNumber::Voice ) params.append( new Param( "TYPE", "voice" ) ); + if( p.type() & PhoneNumber::Fax ) params.append( new Param( "TYPE", "fax" ) ); + if( p.type() & PhoneNumber::Cell ) params.append( new Param( "TYPE", "cell" ) ); + if( p.type() & PhoneNumber::Video ) params.append( new Param( "TYPE", "video" ) ); + if( p.type() & PhoneNumber::Bbs ) params.append( new Param( "TYPE", "bbs" ) ); + if( p.type() & PhoneNumber::Modem ) params.append( new Param( "TYPE", "modem" ) ); + if( p.type() & PhoneNumber::Car ) params.append( new Param( "TYPE", "car" ) ); + if( p.type() & PhoneNumber::Isdn ) params.append( new Param( "TYPE", "isdn" ) ); + if( p.type() & PhoneNumber::Pcs ) params.append( new Param( "TYPE", "pcs" ) ); + if( p.type() & PhoneNumber::Pager ) params.append( new Param( "TYPE", "pager" ) ); + cl.setParamList( params ); + + v->add(cl); +} + +PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) +{ + PhoneNumber p; + TelValue *value = (TelValue *)cl->value(); + p.setNumber( TQString::fromUtf8( value->asString() ) ); + + int type = 0; + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "TYPE" ) { + if ( (*it)->value() == "home" ) type |= PhoneNumber::Home; + else if ( (*it)->value() == "work" ) type |= PhoneNumber::Work; + else if ( (*it)->value() == "msg" ) type |= PhoneNumber::Msg; + else if ( (*it)->value() == "pref" ) type |= PhoneNumber::Pref; + else if ( (*it)->value() == "voice" ) type |= PhoneNumber::Voice; + else if ( (*it)->value() == "fax" ) type |= PhoneNumber::Fax; + else if ( (*it)->value() == "cell" ) type |= PhoneNumber::Cell; + else if ( (*it)->value() == "video" ) type |= PhoneNumber::Video; + else if ( (*it)->value() == "bbs" ) type |= PhoneNumber::Bbs; + else if ( (*it)->value() == "modem" ) type |= PhoneNumber::Modem; + else if ( (*it)->value() == "car" ) type |= PhoneNumber::Car; + else if ( (*it)->value() == "isdn" ) type |= PhoneNumber::Isdn; + else if ( (*it)->value() == "pcs" ) type |= PhoneNumber::Pcs; + else if ( (*it)->value() == "pager" ) type |= PhoneNumber::Pager; + } + } + p.setType( type ); + + return p; +} + +TQString VCardFormatImpl::readTextValue( ContentLine *cl ) +{ + VCARD::Value *value = cl->value(); + if ( value ) { + return TQString::fromUtf8( value->asString() ); + } else { + kdDebug(5700) << "No value: " << cl->asString() << endl; + return TQString::null; + } +} + +TQDate VCardFormatImpl::readDateValue( ContentLine *cl ) +{ + DateValue *dateValue = (DateValue *)cl->value(); + if ( dateValue ) + return dateValue->qdate(); + else + return TQDate(); +} + +TQDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl ) +{ + DateValue *dateValue = (DateValue *)cl->value(); + if ( dateValue ) + return dateValue->qdt(); + else + return TQDateTime(); +} + +Geo VCardFormatImpl::readGeoValue( ContentLine *cl ) +{ + GeoValue *geoValue = (GeoValue *)cl->value(); + if ( geoValue ) { + Geo geo( geoValue->latitude(), geoValue->longitude() ); + return geo; + } else + return Geo(); +} + +TimeZone VCardFormatImpl::readUTCValue( ContentLine *cl ) +{ + UTCValue *utcValue = (UTCValue *)cl->value(); + if ( utcValue ) { + TimeZone tz; + tz.setOffset(((utcValue->hour()*60)+utcValue->minute())*(utcValue->positive() ? 1 : -1)); + return tz; + } else + return TimeZone(); +} + +Secrecy VCardFormatImpl::readClassValue( ContentLine *cl ) +{ + ClassValue *classValue = (ClassValue *)cl->value(); + if ( classValue ) { + Secrecy secrecy; + switch ( classValue->type() ) { + case ClassValue::Public: + secrecy.setType( Secrecy::Public ); + break; + case ClassValue::Private: + secrecy.setType( Secrecy::Private ); + break; + case ClassValue::Confidential: + secrecy.setType( Secrecy::Confidential ); + break; + } + + return secrecy; + } else + return Secrecy(); +} + +void VCardFormatImpl::addKeyValue( VCARD::VCard *vcard, const Key &key ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityKey ) ); + + ParamList params; + if ( key.isBinary() ) { + cl.setValue( new TextValue( KCodecs::base64Encode( key.binaryData() ) ) ); + params.append( new Param( "ENCODING", "b" ) ); + } else { + cl.setValue( new TextValue( key.textData().utf8() ) ); + } + + switch ( key.type() ) { + case Key::X509: + params.append( new Param( "TYPE", "X509" ) ); + break; + case Key::PGP: + params.append( new Param( "TYPE", "PGP" ) ); + break; + case Key::Custom: + params.append( new Param( "TYPE", key.customTypeString().utf8() ) ); + break; + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Key VCardFormatImpl::readKeyValue( VCARD::ContentLine *cl ) +{ + Key key; + bool isBinary = false; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) + isBinary = true; + if ( (*it)->name() == "TYPE" ) { + if ( (*it)->value().isEmpty() ) + continue; + if ( (*it)->value() == "X509" ) + key.setType( Key::X509 ); + else if ( (*it)->value() == "PGP" ) + key.setType( Key::PGP ); + else { + key.setType( Key::Custom ); + key.setCustomTypeString( TQString::fromUtf8( (*it)->value() ) ); + } + } + } + + + if ( isBinary ) { + TQByteArray data; + KCodecs::base64Decode( v->asString().stripWhiteSpace(), data ); + key.setBinaryData( data ); + } else { + key.setTextData( TQString::fromUtf8( v->asString() ) ); + } + + return key; +} + + +void VCardFormatImpl::addAgentValue( VCARD::VCard *vcard, const Agent &agent ) +{ + if ( agent.isIntern() && !agent.addressee() ) + return; + + if ( !agent.isIntern() && agent.url().isEmpty() ) + return; + + ContentLine cl; + cl.setName( EntityTypeToParamName( EntityAgent ) ); + + ParamList params; + if ( agent.isIntern() ) { + TQString vstr; + Addressee *addr = agent.addressee(); + if ( addr ) { + writeToString( (*addr), vstr ); + vstr.replace( ":", "\\:" ); + vstr.replace( ",", "\\," ); + vstr.replace( ";", "\\;" ); + vstr.replace( "\r\n", "\\n" ); + cl.setValue( new TextValue( vstr.utf8() ) ); + } else + return; + } else { + cl.setValue( new TextValue( agent.url().utf8() ) ); + params.append( new Param( "VALUE", "uri" ) ); + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl ) +{ + Agent agent; + bool isIntern = true; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "VALUE" && (*it)->value() == "uri" ) + isIntern = false; + } + + if ( isIntern ) { + TQString vstr = TQString::fromUtf8( v->asString() ); + vstr.replace( "\\n", "\r\n" ); + vstr.replace( "\\:", ":" ); + vstr.replace( "\\,", "," ); + vstr.replace( "\\;", ";" ); + Addressee *addr = new Addressee; + readFromString( vstr, *addr ); + agent.setAddressee( addr ); + } else { + agent.setUrl( TQString::fromUtf8( v->asString() ) ); + } + + return agent; +} + +void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType type, const Picture &pic, const Addressee &addr, bool intern ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( type ) ); + + if ( pic.isIntern() && pic.data().isNull() ) + return; + + if ( !pic.isIntern() && pic.url().isEmpty() ) + return; + + ParamList params; + if ( pic.isIntern() ) { + TQImage img = pic.data(); + if ( intern ) { // only for vCard export we really write the data inline + TQByteArray data; + TQDataStream s( data, IO_WriteOnly ); + s.setVersion( 4 ); // to produce valid png files + s << img; + cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); + } else { // save picture in cache + TQString dir; + if ( type == EntityPhoto ) + dir = "photos"; + if ( type == EntityLogo ) + dir = "logos"; + + img.save( locateLocal( "data", "tdeabc/" + dir + "/" + addr.uid() ), pic.type().utf8() ); + cl.setValue( new TextValue( "" ) ); + } + params.append( new Param( "ENCODING", "b" ) ); + if ( !pic.type().isEmpty() ) + params.append( new Param( "TYPE", pic.type().utf8() ) ); + } else { + cl.setValue( new TextValue( pic.url().utf8() ) ); + params.append( new Param( "VALUE", "uri" ) ); + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::EntityType type, const Addressee &addr ) +{ + Picture pic; + bool isInline = false; + TQString picType; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) + isInline = true; + if ( (*it)->name() == "TYPE" && !(*it)->value().isEmpty() ) + picType = TQString::fromUtf8( (*it)->value() ); + } + + if ( isInline ) { + TQImage img; + if ( v->asString() == "" ) { // no picture inline stored => picture is in cache + TQString dir; + if ( type == EntityPhoto ) + dir = "photos"; + if ( type == EntityLogo ) + dir = "logos"; + + img.load( locateLocal( "data", "tdeabc/" + dir + "/" + addr.uid() ) ); + } else { + TQByteArray data; + KCodecs::base64Decode( v->asString(), data ); + img.loadFromData( data ); + } + pic.setData( img ); + pic.setType( picType ); + } else { + pic.setUrl( TQString::fromUtf8( v->asString() ) ); + } + + return pic; +} + +void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, const Addressee &addr, bool intern ) +{ + ContentLine cl; + cl.setName( EntityTypeToParamName( EntitySound ) ); + + if ( sound.isIntern() && sound.data().isNull() ) + return; + + if ( !sound.isIntern() && sound.url().isEmpty() ) + return; + + ParamList params; + if ( sound.isIntern() ) { + TQByteArray data = sound.data(); + if ( intern ) { // only for vCard export we really write the data inline + cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); + } else { // save sound in cache + TQFile file( locateLocal( "data", "tdeabc/sounds/" + addr.uid() ) ); + if ( file.open( IO_WriteOnly ) ) { + file.writeBlock( data ); + } + cl.setValue( new TextValue( "" ) ); + } + params.append( new Param( "ENCODING", "b" ) ); + } else { + cl.setValue( new TextValue( sound.url().utf8() ) ); + params.append( new Param( "VALUE", "uri" ) ); + } + + cl.setParamList( params ); + vcard->add( cl ); +} + +Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &addr ) +{ + Sound sound; + bool isInline = false; + TextValue *v = (TextValue *)cl->value(); + + ParamList params = cl->paramList(); + ParamListIterator it( params ); + for( ; it.current(); ++it ) { + if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) + isInline = true; + } + + if ( isInline ) { + TQByteArray data; + if ( v->asString() == "" ) { // no sound inline stored => sound is in cache + TQFile file( locateLocal( "data", "tdeabc/sounds/" + addr.uid() ) ); + if ( file.open( IO_ReadOnly ) ) { + data = file.readAll(); + file.close(); + } + } else { + KCodecs::base64Decode( v->asString(), data ); + } + sound.setData( data ); + } else { + sound.setUrl( TQString::fromUtf8( v->asString() ) ); + } + + return sound; +} + +bool VCardFormatImpl::readFromString( const TQString &vcard, Addressee &addressee ) +{ + VCardEntity e( vcard.utf8() ); + VCardListIterator it( e.cardList() ); + + if ( it.current() ) { + VCARD::VCard v(*it.current()); + loadAddressee( addressee, v ); + return true; + } + + return false; +} + +bool VCardFormatImpl::writeToString( const Addressee &addressee, TQString &vcard ) +{ + VCardEntity vcards; + VCardList vcardlist; + vcardlist.setAutoDelete( true ); + + VCARD::VCard *v = new VCARD::VCard; + + saveAddressee( addressee, v, true ); + + vcardlist.append( v ); + vcards.setCardList( vcardlist ); + vcard = TQString::fromUtf8( vcards.asString() ); + + return true; +} diff --git a/tdeabc/vcardformatimpl.h b/tdeabc/vcardformatimpl.h new file mode 100644 index 000000000..78c466a86 --- /dev/null +++ b/tdeabc/vcardformatimpl.h @@ -0,0 +1,106 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDFORMATIMPL_H +#define KABC_VCARDFORMATIMPL_H + +#include +#include + +#include "address.h" +#include "addressee.h" + +#ifdef __CYGWIN__ +#include +#else +#include +#endif + +namespace KABC { + +class AddressBook; + +/** + @deprecated use VCardFormatPlugin instead. + */ +class KABC_EXPORT_DEPRECATED VCardFormatImpl +{ + public: + bool load( Addressee &, TQFile *file ); + bool loadAll( AddressBook *, Resource *, TQFile *file ); + void save( const Addressee &, TQFile *file ); + void saveAll( AddressBook *, Resource *, TQFile *file ); + + bool readFromString( const TQString &vcard, Addressee &addr ); + bool writeToString( const Addressee &addressee, TQString &vcard ); + + protected: + bool loadAddressee( Addressee &, VCARD::VCard & ); + void saveAddressee( const Addressee &, VCARD::VCard *, bool intern ); + + void addTextValue (VCARD::VCard *, VCARD::EntityType, const TQString & ); + TQString readTextValue( VCARD::ContentLine * ); + + void addDateValue( VCARD::VCard *, VCARD::EntityType, const TQDate & ); + TQDate readDateValue( VCARD::ContentLine * ); + + void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const TQDateTime & ); + TQDateTime readDateTimeValue( VCARD::ContentLine * ); + + void addAddressValue( VCARD::VCard *, const Address & ); + Address readAddressValue( VCARD::ContentLine * ); + + void addLabelValue( VCARD::VCard *, const Address & ); + + void addTelephoneValue( VCARD::VCard *, const PhoneNumber & ); + PhoneNumber readTelephoneValue( VCARD::ContentLine * ); + + void addNValue( VCARD::VCard *, const Addressee & ); + void readNValue( VCARD::ContentLine *, Addressee & ); + + void addCustomValue( VCARD::VCard *, const TQString & ); + + void addAddressParam( VCARD::ContentLine *, int ); + int readAddressParam( VCARD::ContentLine * ); + + void addGeoValue( VCARD::VCard *, const Geo & ); + Geo readGeoValue( VCARD::ContentLine * ); + + void addUTCValue( VCARD::VCard *, const TimeZone & ); + TimeZone readUTCValue( VCARD::ContentLine * ); + + void addClassValue( VCARD::VCard *, const Secrecy & ); + Secrecy readClassValue( VCARD::ContentLine * ); + + void addKeyValue( VCARD::VCard *, const Key & ); + Key readKeyValue( VCARD::ContentLine * ); + + void addPictureValue( VCARD::VCard *, VCARD::EntityType, const Picture &, const Addressee &, bool ); + Picture readPictureValue( VCARD::ContentLine *, VCARD::EntityType, const Addressee &addr ); + + void addSoundValue( VCARD::VCard *, const Sound &, const Addressee &, bool ); + Sound readSoundValue( VCARD::ContentLine *, const Addressee &addr ); + + void addAgentValue( VCARD::VCard *, const Agent & ); + Agent readAgentValue( VCARD::ContentLine * ); +}; + +} +#endif diff --git a/tdeabc/vcardformatplugin.cpp b/tdeabc/vcardformatplugin.cpp new file mode 100644 index 000000000..6194cd0fe --- /dev/null +++ b/tdeabc/vcardformatplugin.cpp @@ -0,0 +1,120 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "address.h" +#include "addressee.h" +#include "vcardconverter.h" + +#include "vcardformatplugin.h" + +using namespace KABC; + +VCardFormatPlugin::VCardFormatPlugin() +{ +} + +VCardFormatPlugin::~VCardFormatPlugin() +{ +} + +bool VCardFormatPlugin::load( Addressee &addressee, TQFile *file ) +{ + TQString data; + + TQTextStream t( file ); + t.setEncoding( TQTextStream::Latin1 ); + data = t.read(); + + VCardConverter converter; + Addressee::List l = converter.parseVCards( data ); + + if ( ! l.first().isEmpty() ) { + addressee = l.first(); + return true; + } + + return false; +} + +bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, TQFile *file ) +{ + TQString data; + + TQTextStream t( file ); + t.setEncoding( TQTextStream::Latin1 ); + data = t.read(); + + VCardConverter converter; + + Addressee::List l = converter.parseVCards( data ); + + Addressee::List::iterator itr; + for ( itr = l.begin(); itr != l.end(); ++itr) { + Addressee addressee = *itr; + addressee.setResource( resource ); + addressee.setChanged( false ); + resource->insertAddressee( addressee ); + } + + return true; +} + +void VCardFormatPlugin::save( const Addressee &addressee, TQFile *file ) +{ + VCardConverter converter ; + Addressee::List vcardlist; + + + vcardlist.append( addressee ); + + TQTextStream t( file ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + t << converter.createVCards( vcardlist ); +} + +void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, TQFile *file ) +{ + VCardConverter converter; + Addressee::List vcardlist; + + Resource::Iterator it; + for ( it = resource->begin(); it != resource->end(); ++it ) { + (*it).setChanged( false ); + vcardlist.append( *it ); + } + + TQTextStream t( file ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + t << converter.createVCards( vcardlist ); +} + +bool VCardFormatPlugin::checkFormat( TQFile *file ) const +{ + TQString line; + + file->readLine( line, 1024 ); + line = line.stripWhiteSpace(); + if ( line == "BEGIN:VCARD" ) + return true; + else + return false; +} diff --git a/tdeabc/vcardformatplugin.h b/tdeabc/vcardformatplugin.h new file mode 100644 index 000000000..5ac7e49c2 --- /dev/null +++ b/tdeabc/vcardformatplugin.h @@ -0,0 +1,56 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDFORMATPLUGIN_H +#define KABC_VCARDFORMATPLUGIN_H + +#include "formatplugin.h" + +namespace KABC { + +class AddressBook; +class Addressee; + +/** + @short Interface of vCard backend for address book. + + This class implements the file format interface of address book entries for + the vCard format. +*/ +class KABC_EXPORT VCardFormatPlugin : public FormatPlugin +{ + public: + VCardFormatPlugin(); + virtual ~VCardFormatPlugin(); + + bool load( Addressee &, TQFile *file ); + bool loadAll( AddressBook *, Resource *, TQFile *file ); + void save( const Addressee &, TQFile *file ); + void saveAll( AddressBook *, Resource *, TQFile *file ); + + bool checkFormat( TQFile *file ) const; + + private: + struct VCardFormatPrivate; + VCardFormatPrivate *d; +}; + +} +#endif diff --git a/tdeabc/vcardparser/CMakeLists.txt b/tdeabc/vcardparser/CMakeLists.txt new file mode 100644 index 000000000..2c6fa112a --- /dev/null +++ b/tdeabc/vcardparser/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdecore +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + vcard.h vcardline.h vcardparser.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kabc ) + + +##### vcards #################################### + +set( target vcards ) + +set( ${target}_SRCS + vcard.cpp vcardline.cpp vcardparser.cpp +) + +tde_add_library( ${target} STATIC_PIC + SOURCES ${${target}_SRCS} +) diff --git a/tdeabc/vcardparser/Makefile.am b/tdeabc/vcardparser/Makefile.am new file mode 100644 index 000000000..a855c9756 --- /dev/null +++ b/tdeabc/vcardparser/Makefile.am @@ -0,0 +1,31 @@ +INCLUDES = -I$(top_builddir)/kabc -I$(top_srcdir)/kabc $(all_includes) + +noinst_LTLIBRARIES = libvcards.la +libvcards_la_SOURCES = vcard.cpp vcardline.cpp vcardparser.cpp + +vcardsincludedir = $(includedir)/kabc +vcardsinclude_HEADERS = vcard.h vcardline.h vcardparser.h + +check_PROGRAMS = testread testwrite testread2 + +testread_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testread_LDADD = libvcards.la $(top_builddir)/tdeabc/libkabc.la +testread_SOURCES = testread.cpp + +testread2_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testread2_LDADD = libvcards.la $(top_builddir)/tdeabc/libkabc.la +testread2_SOURCES = testread2.cpp testutils.cpp + +testwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +testwrite_LDADD = libvcards.la $(top_builddir)/tdeabc/libkabc.la +testwrite_SOURCES = testwrite.cpp + +TESTFILES = vcard1.vcf vcard2.vcf vcard3.vcf vcard4.vcf vcard6.vcf vcard7.vcf + +check-local: testread + rm -f FAILED; \ + for i in $(TESTFILES); \ + do perl $(top_srcdir)/tdeabc/vcardparser/checkvcard.pl \ + $(top_srcdir)/tdeabc/vcardparser/tests/$$i; \ + done; \ + [ ! -e FAILED ] diff --git a/tdeabc/vcardparser/README.testing b/tdeabc/vcardparser/README.testing new file mode 100644 index 000000000..a7794931d --- /dev/null +++ b/tdeabc/vcardparser/README.testing @@ -0,0 +1,15 @@ +For testing the vcardparser there are some test files and a small testsuite +automatically checking for regressions. The tests directory contains some vCard +files and correpsonding reference output files (with an additional ".ref" +suffix). For running the geression test do "make check". This will compile some +test programs, parse the test files, write them out as vCard again and compare +the output to the reference file. The check fails, if there are unexpected +differences and shows which lines differed. + +For creating a new test put a vCard file to be parsed into the tests directory. +Create a reference file by running "testread" on the test file. It will put out +the parsed data as vCard again on stdout. Carefully check the output, manually +correct any errors and save the result as reference file in the tests directory. +Now add the filename to the TESTFILES variable in Makefile.am and run "make +check". If the check fails adapt the reference file or fix the bugs in the +parser, whatever is appropriate. diff --git a/tdeabc/vcardparser/checkvcard.pl b/tdeabc/vcardparser/checkvcard.pl new file mode 100755 index 000000000..67160ea4a --- /dev/null +++ b/tdeabc/vcardparser/checkvcard.pl @@ -0,0 +1,75 @@ +#!/usr/bin/perl + +if ( @ARGV != 1 ) { + print STDERR "Missing arg: filename\n"; + exit 1; +} + +$file = $ARGV[0]; + +if ( !open( IN, "$file" ) ) { + print STDERR "Unable to open '$file'\n"; + exit 1; +} + +while( ) { + if (/^VERSION:(.*)$/ ) { + $version = $1; + if ( $version eq "2.1" ) { $options = "--vcard21"; } + } +} + +close IN; + +$ref = "$file.ref"; + +if ( !open( REF, "$ref" ) ) { + print STDERR "Unable to open $ref\n"; + exit 1; +} + +while( ) { + push @ref, $_; +} + +close REF; + +if ( !open( READ, "./testread $file $options 2> /dev/null |" ) ) { + print STDERR "Unable to open testread\n"; + exit 1; +} + +print "Checking '$file':\n"; + +$gotsomething = 0; +$error = 0; +$i = 0; +while( ) { + $gotsomething = 1; + $out = $_; + $ref = @ref[$i++]; + + if ( $out ne $ref ) { + if ( $ref =~ /^UID/ && $out =~ /^UID/ ) { next; } + $error++; + print " Expected : $ref"; + print " Parser output : $out"; + } +} + +close READ; + +if ( $gotsomething == 0 ) { + print "\n FAILED: testread didn't output anything\n"; + system "touch FAILED"; + exit 1; +} +if ( $error > 0 ) { + print "\n FAILED: $error errors found.\n"; + system "touch FAILED"; + exit 1; +} else { + print " OK\n"; +} + +exit 0; diff --git a/tdeabc/vcardparser/testread.cpp b/tdeabc/vcardparser/testread.cpp new file mode 100644 index 000000000..fd3524b56 --- /dev/null +++ b/tdeabc/vcardparser/testread.cpp @@ -0,0 +1,89 @@ +/* + This file is part of libkabc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "vcardconverter.h" +#include "vcard.h" + +static const TDECmdLineOptions options[] = +{ + {"vcard21", I18N_NOOP("vCard 2.1"), 0}, + {"+inputfile", I18N_NOOP("Input file"), 0}, + TDECmdLineLastOption +}; + +int main( int argc, char **argv ) +{ + TDEApplication::disableAutoDcopRegistration(); + + TDEAboutData aboutData( "testread", "vCard test reader", "0.1" ); + aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app( false, false ); + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + if ( args->count() != 1 ) { + std::cerr << "Missing argument" << std::endl; + return 1; + } + + TQString inputFile( args->arg( 0 ) ); + + TQFile file( inputFile ); + if ( !file.open( IO_ReadOnly ) ) { + tqDebug( "Unable to open file '%s' for reading!", file.name().latin1() ); + return 1; + } + + TQString text; + + TQTextStream s( &file ); + s.setEncoding( TQTextStream::Latin1 ); + text = s.read(); + file.close(); + + KABC::VCardConverter converter; + KABC::Addressee::List list = converter.parseVCards( text ); + + if ( args->isSet( "vcard21" ) ) { + text = converter.createVCards( list, KABC::VCardConverter::v2_1 ); // uses version 2.1 + } else { + text = converter.createVCards( list ); // uses version 3.0 + } + + std::cout << text.utf8(); + + return 0; +} diff --git a/tdeabc/vcardparser/testread2.cpp b/tdeabc/vcardparser/testread2.cpp new file mode 100644 index 000000000..ea278602c --- /dev/null +++ b/tdeabc/vcardparser/testread2.cpp @@ -0,0 +1,42 @@ +#include "testutils.h" +#include +#include +#include + +using namespace KABC; + +int +main() +{ + Addressee::List l = vCardsAsAddresseeList(); + TQString vcards = vCardsAsText(); + + VCardConverter vct; + + Addressee::List parsed = vct.parseVCards( vcards ); + + if ( l.size() != parsed.size() ) { + kdDebug()<<"\tSize - FAILED : "< +#include +#include + +using namespace KABC; + +Addressee +vcard1() +{ + Addressee addr; + + addr.setName( "Frank Dawson" ); + addr.setOrganization( "Lotus Development Corporation" ); + addr.setUrl( KURL( "http://home.earthlink.net/~fdawson") ); + addr.insertEmail( "fdawson@earthlink.net" ); + addr.insertEmail( "Frank_Dawson@Lotus.com", true ); + addr.insertPhoneNumber( PhoneNumber("+1-919-676-9515",PhoneNumber::Voice|PhoneNumber::Msg + |PhoneNumber::Work ) ); + addr.insertPhoneNumber( PhoneNumber("+1-919-676-9564",PhoneNumber::Fax |PhoneNumber::Work )); + Address a( Address::Work | Address::Postal | Address::Parcel ); + a.setStreet( "6544 Battleford Drive" ); + a.setLocality( "Raleigh" ); + a.setRegion( "NC" ); + a.setPostalCode( "27613-3502" ); + a.setCountry( "U.S.A." ); + addr.insertAddress( a ); + return addr; +} + +Addressee +vcard2() +{ + Addressee addr; + + addr.setName( "Tim Howes" ); + addr.setOrganization( "Netscape Communications Corp." ); + addr.insertEmail( "howes@netscape.com" ); + addr.insertPhoneNumber( PhoneNumber("+1-415-937-3419",PhoneNumber::Voice|PhoneNumber::Msg + |PhoneNumber::Work) ); + addr.insertPhoneNumber( PhoneNumber("+1-415-528-4164",PhoneNumber::Fax |PhoneNumber::Work) ); + Address a( Address::Work ); + a.setStreet( "501 E. Middlefield Rd." ); + a.setLocality( "Mountain View" ); + a.setRegion( "CA" ); + a.setPostalCode( "94043" ); + a.setCountry( "U.S.A." ); + addr.insertAddress( a ); + return addr; +} + +Addressee +vcard3() +{ + Addressee addr; + + addr.setName( "ian geiser" ); + addr.setOrganization( "Source eXtreme" ); + addr.insertEmail( "geiseri@yahoo.com" ); + addr.setTitle( "VP of Engineering" ); + return addr; +} + + +QString +vcardAsText( const TQString& location ) +{ + TQString line; + TQFile file( location ); + if ( file.open( IO_ReadOnly ) ) { + TQTextStream stream( &file ); + if ( !stream.eof() ) { + line = stream.read(); + } + file.close(); + } + return line; +} + +Addressee::List +vCardsAsAddresseeList() +{ + Addressee::List l; + + l.append( vcard1() ); + l.append( vcard2() ); + l.append( vcard3() ); + + return l; +} + +QString +vCardsAsText() +{ + TQString vcards = vcardAsText( "tests/vcard1.vcf" ); + vcards += vcardAsText( "tests/vcard2.vcf" ); + vcards += vcardAsText( "tests/vcard3.vcf" ); + + return vcards; +} diff --git a/tdeabc/vcardparser/testutils.h b/tdeabc/vcardparser/testutils.h new file mode 100644 index 000000000..c8218b7ba --- /dev/null +++ b/tdeabc/vcardparser/testutils.h @@ -0,0 +1,14 @@ +#ifndef TESTUTILS_H +#define TESTUTILS_H + +#include +#include + +KABC::Addressee vcard1(); +KABC::Addressee vcard2(); +KABC::Addressee vcard3(); +KABC::Addressee::List vCardsAsAddresseeList(); +TQString vCardAsText( const TQString& location ); +TQString vCardsAsText(); + +#endif diff --git a/tdeabc/vcardparser/testwrite.cpp b/tdeabc/vcardparser/testwrite.cpp new file mode 100644 index 000000000..e40ffe4d0 --- /dev/null +++ b/tdeabc/vcardparser/testwrite.cpp @@ -0,0 +1,134 @@ +/* + This file is part of libkabc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "vcardconverter.h" + +int main( int argc, char **argv ) +{ + TDEAboutData aboutData( "testwrite", "vCard test writer", "0.1" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + + TDEApplication app( false, false ); + + + KABC::Addressee addressee; + + addressee.setNameFromString( "Mr. Tobias Koenig Jr." ); + addressee.setNickName( "tokoe" ); + addressee.setBirthday( TQDate( 1982, 7, 19 ) ); + addressee.setMailer( "mutt1.2" ); + addressee.setTimeZone( KABC::TimeZone( +2 ) ); + + KABC::Geo geo; + geo.setLatitude( 30 ); + geo.setLongitude( 51 ); + addressee.setGeo( geo ); + + addressee.setTitle( "nerd" ); + addressee.setRole( "Maintainer" ); + addressee.setOrganization( "KDE" ); + addressee.setNote( "nerver\ntouch a running system" ); + addressee.setProductId( "testId" ); + addressee.setRevision( TQDateTime::currentDateTime() ); + addressee.setSortString( "koenig" ); + addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); + addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); +/* + TQImage img; + img.load( "testimg.png", "PNG" ); + KABC::Picture photo; + photo.setData( img ); + addressee.setPhoto( photo ); + + TQImage img2; + img2.load( "testimg.png", "PNG" ); + KABC::Picture logo; + logo.setData( img2 ); + addressee.setLogo( logo ); + + TQFile soundFile( "testsound.wav" ); + soundFile.open( IO_ReadOnly ); + TQByteArray data = soundFile.readAll(); + soundFile.close(); + KABC::Sound sound; + sound.setData( data ); + addressee.setSound( sound ); +*/ + addressee.insertEmail( "tokoe@kde.org", true ); + addressee.insertEmail( "tokoe82@yahoo.de", true ); + + KABC::PhoneNumber phone1( "3541523475", KABC::PhoneNumber::Pref | KABC::PhoneNumber::Home ); + KABC::PhoneNumber phone2( "+46745673475", KABC::PhoneNumber::Work ); + addressee.insertPhoneNumber( phone1 ); + addressee.insertPhoneNumber( phone2 ); + + KABC::Key key( "secret key", KABC::Key::X509 ); + addressee.insertKey( key ); + + TQStringList categories; + categories << "Friends" << "School" << "KDE"; + addressee.setCategories( categories ); + + KABC::Address a( KABC::Address::Work | KABC::Address::Postal | KABC::Address::Parcel ); + a.setStreet( "6544 Battleford Drive" ); + a.setLocality( "Raleigh" ); + a.setRegion( "NC" ); + a.setPostalCode( "27613-3502" ); + a.setCountry( "U.S.A." ); + addressee.insertAddress( a ); + + addressee.insertCustom( "1hsdf", "ertuer", "iurt" ); + addressee.insertCustom( "2hsdf", "ertuer", "iurt" ); + addressee.insertCustom( "3hsdf", "ertuer", "iurt" ); + + KABC::Addressee::List list; + for ( int i = 0; i < 1000; ++i ) { + KABC::Addressee addr = addressee; + addr.setUid( TQString::number( i ) ); + list.append( addr ); + } + + KABC::VCardConverter converter; + TQString txt = converter.createVCards( list ); + + TQFile file( "out.vcf" ); + file.open( IO_WriteOnly ); + + TQTextStream s( &file ); + s.setEncoding( TQTextStream::UnicodeUTF8 ); + s << txt; + file.close(); + + return 0; +} diff --git a/tdeabc/vcardparser/vcard.cpp b/tdeabc/vcardparser/vcard.cpp new file mode 100644 index 000000000..30a8e1c49 --- /dev/null +++ b/tdeabc/vcardparser/vcard.cpp @@ -0,0 +1,109 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcard.h" + +using namespace KABC; + +VCard::VCard() +{ +} + +VCard::VCard( const VCard& vcard ) +{ + mLineMap = vcard.mLineMap; +} + +VCard::~VCard() +{ +} + +VCard& VCard::operator=( const VCard& vcard ) +{ + if ( &vcard == this ) + return *this; + + mLineMap = vcard.mLineMap; + + return *this; +} + +void VCard::clear() +{ + mLineMap.clear(); +} + +TQStringList VCard::identifiers() const +{ + return mLineMap.keys(); +} + +void VCard::addLine( const VCardLine& line ) +{ + mLineMap[ line.identifier() ].append( line ); +} + +VCardLine::List VCard::lines( const TQString& identifier ) const +{ + LineMap::ConstIterator it = mLineMap.find( identifier ); + if ( it == mLineMap.end() ) + return VCardLine::List(); + + return *it; +} + +VCardLine VCard::line( const TQString& identifier ) const +{ + LineMap::ConstIterator it = mLineMap.find( identifier ); + if ( it == mLineMap.end() ) + return VCardLine(); + + if ( (*it).isEmpty() ) + return VCardLine(); + else + return (*it).first(); +} + +void VCard::setVersion( Version version ) +{ + mLineMap.erase( "VERSION" ); + + VCardLine line; + line.setIdentifier( "VERSION" ); + if ( version == v2_1 ) + line.setIdentifier( "2.1" ); + else if ( version == v3_0 ) + line.setIdentifier( "3.0" ); + + mLineMap[ "VERSION" ].append( line ); +} + +VCard::Version VCard::version() const +{ + LineMap::ConstIterator versionEntry = mLineMap.find( "VERSION" ); + if ( versionEntry == mLineMap.end() ) + return v3_0; + + VCardLine line = ( *versionEntry )[ 0 ]; + if ( line.value() == "2.1" ) + return v2_1; + else + return v3_0; +} diff --git a/tdeabc/vcardparser/vcard.h b/tdeabc/vcardparser/vcard.h new file mode 100644 index 000000000..6afeeda26 --- /dev/null +++ b/tdeabc/vcardparser/vcard.h @@ -0,0 +1,91 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDPARSER_VCARD_H +#define VCARDPARSER_VCARD_H + +#include "vcardline.h" +#include +#include +#include + +namespace KABC { + +class VCard +{ + public: + typedef TQValueList List; + typedef TQMap< TQString, VCardLine::List > LineMap; + + enum Version { v2_1, v3_0 }; + + VCard(); + VCard( const VCard& ); + + ~VCard(); + + VCard& operator=( const VCard& ); + + /** + * Removes all lines from the vCard. + */ + void clear(); + + /** + * Returns a list of all identifiers that exists in the + * vCard. + */ + TQStringList identifiers() const; + + /** + * Adds a VCardLine to the VCard + */ + void addLine( const VCardLine& line ); + + /** + * Returns all lines of the vcard with a special identifier. + */ + VCardLine::List lines( const TQString& identifier ) const; + + /** + * Returns only the first line of the vcard with a special identifier. + */ + VCardLine line( const TQString& identifier ) const; + + /** + * Set the version of the vCard. + */ + void setVersion( Version version ); + + /** + * Returns the version of this vCard. + */ + Version version() const; + + private: + LineMap mLineMap; + + class VCardPrivate; + VCardPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/vcardparser/vcardline.cpp b/tdeabc/vcardparser/vcardline.cpp new file mode 100644 index 000000000..6680cf7d0 --- /dev/null +++ b/tdeabc/vcardparser/vcardline.cpp @@ -0,0 +1,151 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardline.h" + +using namespace KABC; + +class VCardLine::VCardLinePrivate +{ + public: + TQString mGroup; +}; + +VCardLine::VCardLine() + : d( 0 ) +{ +} + +VCardLine::VCardLine( const TQString &identifier ) + : d( 0 ) +{ + mIdentifier = identifier; +} + +VCardLine::VCardLine( const TQString &identifier, const TQVariant &value ) + : d( 0 ) +{ + mIdentifier = identifier; + mValue = value; +} + +VCardLine::VCardLine( const VCardLine& line ) + : d( 0 ) +{ + mParamMap = line.mParamMap; + mValue = line.mValue; + mIdentifier = line.mIdentifier; +} + +VCardLine::~VCardLine() +{ + delete d; + d = 0; +} + +VCardLine& VCardLine::operator=( const VCardLine& line ) +{ + if ( &line == this ) + return *this; + + mParamMap = line.mParamMap; + mValue = line.mValue; + mIdentifier = line.mIdentifier; + + return *this; +} + +void VCardLine::setIdentifier( const TQString& identifier ) +{ + mIdentifier = identifier; +} + +TQString VCardLine::identifier() const +{ + return mIdentifier; +} + +void VCardLine::setValue( const TQVariant& value ) +{ + mValue = value; +} + +TQVariant VCardLine::value() const +{ + return mValue; +} + +void VCardLine::setGroup( const TQString& group ) +{ + if ( !d ) + d = new VCardLinePrivate(); + + d->mGroup = group; +} + +TQString VCardLine::group() const +{ + if ( d ) + return d->mGroup; + else + return TQString(); +} + +bool VCardLine::hasGroup() const +{ + if ( !d ) + return false; + else + return d->mGroup.isEmpty(); +} + +TQStringList VCardLine::parameterList() const +{ + return mParamMap.keys(); +} + +void VCardLine::addParameter( const TQString& param, const TQString& value ) +{ + TQStringList &list = mParamMap[ param ]; + if ( list.findIndex( value ) == -1 ) // not included yet + list.append( value ); +} + +TQStringList VCardLine::parameters( const TQString& param ) const +{ + ParamMap::ConstIterator it = mParamMap.find( param ); + if ( it == mParamMap.end() ) + return TQStringList(); + else + return *it; +} + +TQString VCardLine::parameter( const TQString& param ) const +{ + ParamMap::ConstIterator it = mParamMap.find( param ); + if ( it == mParamMap.end() ) + return TQString::null; + else { + if ( (*it).isEmpty() ) + return TQString::null; + else + return (*it).first(); + } +} diff --git a/tdeabc/vcardparser/vcardline.h b/tdeabc/vcardparser/vcardline.h new file mode 100644 index 000000000..92fe743f6 --- /dev/null +++ b/tdeabc/vcardparser/vcardline.h @@ -0,0 +1,115 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDLINE_H +#define VCARDLINE_H + +#include +#include +#include +#include +#include + +namespace KABC { + +class VCardLine +{ + public: + typedef TQValueList List; + typedef TQMap ParamMap; + + VCardLine(); + VCardLine( const TQString &identifier ); + VCardLine( const TQString &identifier, const TQVariant &value ); + VCardLine( const VCardLine& ); + + ~VCardLine(); + + VCardLine& operator=( const VCardLine& ); + + /** + * Sets the identifier of this line e.g. UID, FN, CLASS + */ + void setIdentifier( const TQString& identifier ); + + /** + * Returns the identifier of this line. + */ + TQString identifier() const; + + /** + * Sets the value of of this line. + */ + void setValue( const TQVariant& value ); + + /** + * Returns the value of this line. + */ + TQVariant value() const; + + /** + * Sets the group the line belongs to. + */ + void setGroup( const TQString& group ); + + /** + * Returns the group the line belongs to. + */ + TQString group() const; + + /** + * Returns whether the line belongs to a group. + */ + bool hasGroup() const; + + /** + * Returns all parameters. + */ + TQStringList parameterList() const; + + /** + * Add a new parameter to the line. + */ + void addParameter( const TQString& param, const TQString& value ); + + /** + * Returns the values of a special parameter. + * You can get a list of all parameters with paramList(). + */ + TQStringList parameters( const TQString& param ) const; + + /** + * Returns only the first value of a special parameter. + * You can get a list of all parameters with paramList(). + */ + TQString parameter( const TQString& param ) const; + + private: + ParamMap mParamMap; + TQString mIdentifier; + TQVariant mValue; + + class VCardLinePrivate; + VCardLinePrivate *d; +}; + +} + +#endif diff --git a/tdeabc/vcardparser/vcardparser.cpp b/tdeabc/vcardparser/vcardparser.cpp new file mode 100644 index 000000000..aed9ebd39 --- /dev/null +++ b/tdeabc/vcardparser/vcardparser.cpp @@ -0,0 +1,297 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include + +#include "vcardparser.h" + +#define FOLD_WIDTH 75 + +using namespace KABC; + +static TQString backslash( "\\\\" ); +static TQString comma( "\\," ); +static TQString newline( "\\n" ); +static TQString cr( "\\r" ); + +static void addEscapes( TQString &str ) +{ + str.replace( '\\', backslash ); + str.replace( ',', comma ); + str.replace( '\r', cr ); + str.replace( '\n', newline ); +} + +static void removeEscapes( TQString &str ) +{ + str.replace( cr, "\\r" ); + str.replace( newline, "\n" ); + str.replace( comma, "," ); + str.replace( backslash, "\\" ); +} + +VCardParser::VCardParser() +{ +} + +VCardParser::~VCardParser() +{ +} + +VCard::List VCardParser::parseVCards( const TQString& text ) +{ + static TQRegExp sep( "[\x0d\x0a]" ); + + VCard currentVCard; + VCard::List vCardList; + TQString currentLine; + + const TQStringList lines = TQStringList::split( sep, text ); + TQStringList::ConstIterator it; + + bool inVCard = false; + TQStringList::ConstIterator linesEnd( lines.end() ); + for ( it = lines.begin(); it != linesEnd; ++it ) { + + if ( (*it).isEmpty() ) // empty line + continue; + + if ( (*it)[ 0 ] == ' ' || (*it)[ 0 ] == '\t' ) { // folded line => append to previous + currentLine += TQString( *it ).remove( 0, 1 ); + continue; + } else { + if ( inVCard && !currentLine.isEmpty() ) { // now parse the line + int colon = currentLine.find( ':' ); + if ( colon == -1 ) { // invalid line + currentLine = (*it); + continue; + } + + VCardLine vCardLine; + const TQString key = currentLine.left( colon ).stripWhiteSpace(); + TQString value = currentLine.mid( colon + 1 ); + + TQStringList params = TQStringList::split( ';', key ); + + // check for group + if ( params[0].find( '.' ) != -1 ) { + const TQStringList groupList = TQStringList::split( '.', params[0] ); + vCardLine.setGroup( groupList[0] ); + vCardLine.setIdentifier( groupList[1] ); + } else + vCardLine.setIdentifier( params[0] ); + + if ( params.count() > 1 ) { // find all parameters + TQStringList::ConstIterator paramIt = params.begin(); + for ( ++paramIt; paramIt != params.end(); ++paramIt ) { + TQStringList pair = TQStringList::split( '=', *paramIt ); + if ( pair.size() == 1 ) { + // correct the 2.1 'standard' + if ( pair[0].lower() == "quoted-printable" ) { + pair[0] = "encoding"; + pair[1] = "quoted-printable"; + } else if ( pair[0].lower() == "base64" ) { + pair[0] = "encoding"; + pair[1] = "base64"; + } else { + pair.prepend( "type" ); + } + } + // This is pretty much a faster pair[1].contains( ',' )... + if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format + const TQStringList args = TQStringList::split( ',', pair[ 1 ] ); + TQStringList::ConstIterator argIt; + for ( argIt = args.begin(); argIt != args.end(); ++argIt ) + vCardLine.addParameter( pair[0].lower(), *argIt ); + } else + vCardLine.addParameter( pair[0].lower(), pair[1] ); + } + } + + removeEscapes( value ); + + TQByteArray output; + bool wasBase64Encoded = false; + + params = vCardLine.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data + TQByteArray input; + input = TQCString(value.latin1()); + if ( vCardLine.parameter( "encoding" ).lower() == "b" || + vCardLine.parameter( "encoding" ).lower() == "base64" ) { + KCodecs::base64Decode( input, output ); + wasBase64Encoded = true; + } + else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) { + // join any qp-folded lines + while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) { + value = value.remove( value.length() - 1, 1 ) + (*it); + ++it; + } + input = TQCString(value.latin1()); + KCodecs::quotedPrintableDecode( input, output ); + } + } else { + output = TQCString(value.latin1()); + } + + if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data + TQTextCodec *codec = + TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() ); + if ( codec ) { + vCardLine.setValue( codec->toUnicode( output ) ); + } else { + vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); + } + } else if ( wasBase64Encoded ) { + vCardLine.setValue( output ); + } else { // if charset not given, assume it's in UTF-8 (as used in previous KDE versions) + vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); + } + + currentVCard.addLine( vCardLine ); + } + + // we do not save the start and end tag as vcardline + if ( (*it).lower().startsWith( "begin:vcard" ) ) { + inVCard = true; + currentLine.setLength( 0 ); + currentVCard.clear(); // flush vcard + continue; + } + + if ( (*it).lower().startsWith( "end:vcard" ) ) { + inVCard = false; + vCardList.append( currentVCard ); + currentLine.setLength( 0 ); + currentVCard.clear(); // flush vcard + continue; + } + + currentLine = (*it); + } + } + + return vCardList; +} + +TQString VCardParser::createVCards( const VCard::List& list ) +{ + TQString text; + TQString textLine; + TQString encodingType; + TQStringList idents; + TQStringList params; + TQStringList values; + TQStringList::ConstIterator identIt; + TQStringList::Iterator paramIt; + TQStringList::ConstIterator valueIt; + + VCardLine::List lines; + VCardLine::List::ConstIterator lineIt; + VCard::List::ConstIterator cardIt; + + bool hasEncoding; + + text.reserve( list.size() * 300 ); // reserve memory to be more efficient + + // iterate over the cards + VCard::List::ConstIterator listEnd( list.end() ); + for ( cardIt = list.begin(); cardIt != listEnd; ++cardIt ) { + text.append( "BEGIN:VCARD\r\n" ); + + idents = (*cardIt).identifiers(); + for ( identIt = idents.constBegin(); identIt != idents.constEnd(); ++identIt ) { + lines = (*cardIt).lines( (*identIt) ); + + // iterate over the lines + for ( lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt ) { + if ( !(*lineIt).value().asString().isEmpty() ) { + if ((*lineIt).identifier() != TQString("URI")) { + if ( (*lineIt).hasGroup() ) + textLine = (*lineIt).group() + "." + (*lineIt).identifier(); + else + textLine = (*lineIt).identifier(); + + params = (*lineIt).parameterList(); + hasEncoding = false; + if ( params.count() > 0 ) { // we have parameters + for ( paramIt = params.begin(); paramIt != params.end(); ++paramIt ) { + if ( (*paramIt) == "encoding" ) { + hasEncoding = true; + encodingType = (*lineIt).parameter( "encoding" ).lower(); + } + + values = (*lineIt).parameters( *paramIt ); + for ( valueIt = values.constBegin(); valueIt != values.constEnd(); ++valueIt ) { + textLine.append( ";" + (*paramIt).upper() ); + if ( !(*valueIt).isEmpty() ) + textLine.append( "=" + (*valueIt) ); + } + } + } + + if ( hasEncoding ) { // have to encode the data + TQByteArray input, output; + if ( encodingType == "b" ) { + input = (*lineIt).value().toByteArray(); + KCodecs::base64Encode( input, output ); + } else if ( encodingType == "quoted-printable" ) { + input = (*lineIt).value().toString().utf8(); + input.resize( input.size() - 1 ); // strip \0 + KCodecs::quotedPrintableEncode( input, output, false ); + } + + TQString value( output ); + addEscapes( value ); + textLine.append( ":" + value ); + } else { + TQString value( (*lineIt).value().asString() ); + addEscapes( value ); + textLine.append( ":" + value ); + } + + if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line + for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) + text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" ); + } else + text.append( textLine + "\r\n" ); + } + else { + // URIs can be full of weird symbols, etc. so bypass all checks + textLine = (*lineIt).identifier(); + TQString value( (*lineIt).value().asString() ); + addEscapes( value ); + textLine.append( ":" + value ); + text.append( textLine + "\r\n" ); + } + } + } + } + + text.append( "END:VCARD\r\n" ); + text.append( "\r\n" ); + } + + return text; +} diff --git a/tdeabc/vcardparser/vcardparser.h b/tdeabc/vcardparser/vcardparser.h new file mode 100644 index 000000000..da5fdd46e --- /dev/null +++ b/tdeabc/vcardparser/vcardparser.h @@ -0,0 +1,44 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDPARSER_H +#define VCARDPARSER_H + +#include "vcard.h" + +namespace KABC { + +class VCardParser +{ + public: + VCardParser(); + ~VCardParser(); + + static VCard::List parseVCards( const TQString& text ); + static TQString createVCards( const VCard::List& list ); + + private: + class VCardParserPrivate; + VCardParserPrivate *d; +}; + +} + +#endif diff --git a/tdeabc/vcardtool.cpp b/tdeabc/vcardtool.cpp new file mode 100644 index 000000000..295360a03 --- /dev/null +++ b/tdeabc/vcardtool.cpp @@ -0,0 +1,896 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "agent.h" +#include "key.h" +#include "picture.h" +#include "secrecy.h" +#include "sound.h" + +#include "vcardtool.h" + +using namespace KABC; + +static bool needsEncoding( const TQString &value ) +{ + uint length = value.length(); + for ( uint i = 0; i < length; ++i ) { + char c = value.at( i ).latin1(); + if ( (c < 33 || c > 126) && c != ' ' && c != '=' ) + return true; + } + + return false; +} + +VCardTool::VCardTool() +{ + mAddressTypeMap.insert( "dom", Address::Dom ); + mAddressTypeMap.insert( "intl", Address::Intl ); + mAddressTypeMap.insert( "postal", Address::Postal ); + mAddressTypeMap.insert( "parcel", Address::Parcel ); + mAddressTypeMap.insert( "home", Address::Home ); + mAddressTypeMap.insert( "work", Address::Work ); + mAddressTypeMap.insert( "pref", Address::Pref ); + + mPhoneTypeMap.insert( "HOME", PhoneNumber::Home ); + mPhoneTypeMap.insert( "WORK", PhoneNumber::Work ); + mPhoneTypeMap.insert( "MSG", PhoneNumber::Msg ); + mPhoneTypeMap.insert( "PREF", PhoneNumber::Pref ); + mPhoneTypeMap.insert( "VOICE", PhoneNumber::Voice ); + mPhoneTypeMap.insert( "FAX", PhoneNumber::Fax ); + mPhoneTypeMap.insert( "CELL", PhoneNumber::Cell ); + mPhoneTypeMap.insert( "VIDEO", PhoneNumber::Video ); + mPhoneTypeMap.insert( "BBS", PhoneNumber::Bbs ); + mPhoneTypeMap.insert( "MODEM", PhoneNumber::Modem ); + mPhoneTypeMap.insert( "CAR", PhoneNumber::Car ); + mPhoneTypeMap.insert( "ISDN", PhoneNumber::Isdn ); + mPhoneTypeMap.insert( "PCS", PhoneNumber::Pcs ); + mPhoneTypeMap.insert( "PAGER", PhoneNumber::Pager ); +} + +VCardTool::~VCardTool() +{ +} + +// TODO: make list a const& +TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) +{ + VCard::List vCardList; + + Addressee::List::ConstIterator addrIt; + Addressee::List::ConstIterator listEnd( list.constEnd() ); + for ( addrIt = list.constBegin(); addrIt != listEnd; ++addrIt ) { + VCard card; + TQStringList::ConstIterator strIt; + + // ADR + LABEL + const Address::List addresses = (*addrIt).addresses(); + for ( Address::List::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { + TQStringList address; + + bool isEmpty = ( (*it).postOfficeBox().isEmpty() && + (*it).extended().isEmpty() && + (*it).street().isEmpty() && + (*it).locality().isEmpty() && + (*it).region().isEmpty() && + (*it).postalCode().isEmpty() && + (*it).country().isEmpty() ); + + address.append( (*it).postOfficeBox().replace( ';', "\\;" ) ); + address.append( (*it).extended().replace( ';', "\\;" ) ); + address.append( (*it).street().replace( ';', "\\;" ) ); + address.append( (*it).locality().replace( ';', "\\;" ) ); + address.append( (*it).region().replace( ';', "\\;" ) ); + address.append( (*it).postalCode().replace( ';', "\\;" ) ); + address.append( (*it).country().replace( ';', "\\;" ) ); + + VCardLine adrLine( "ADR", address.join( ";" ) ); + if ( version == VCard::v2_1 && needsEncoding( address.join( ";" ) ) ) { + adrLine.addParameter( "charset", "UTF-8" ); + adrLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + + VCardLine labelLine( "LABEL", (*it).label() ); + if ( version == VCard::v2_1 && needsEncoding( (*it).label() ) ) { + labelLine.addParameter( "charset", "UTF-8" ); + labelLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + + bool hasLabel = !(*it).label().isEmpty(); + TQMap::ConstIterator typeIt; + for ( typeIt = mAddressTypeMap.constBegin(); typeIt != mAddressTypeMap.constEnd(); ++typeIt ) { + if ( typeIt.data() & (*it).type() ) { + adrLine.addParameter( "TYPE", typeIt.key() ); + if ( hasLabel ) + labelLine.addParameter( "TYPE", typeIt.key() ); + } + } + + if ( !isEmpty ) + card.addLine( adrLine ); + if ( hasLabel ) + card.addLine( labelLine ); + } + + // AGENT + card.addLine( createAgent( version, (*addrIt).agent() ) ); + + // BDAY + card.addLine( VCardLine( "BDAY", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).birthday()) ) ) ); + + // CATEGORIES + if ( version == VCard::v3_0 ) { + TQStringList categories = (*addrIt).categories(); + TQStringList::Iterator catIt; + for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) + (*catIt).replace( ',', "\\," ); + + VCardLine catLine( "CATEGORIES", categories.join( "," ) ); + if ( version == VCard::v2_1 && needsEncoding( categories.join( "," ) ) ) { + catLine.addParameter( "charset", "UTF-8" ); + catLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + + card.addLine( catLine ); + } + + // CLASS + if ( version == VCard::v3_0 ) { + card.addLine( createSecrecy( (*addrIt).secrecy() ) ); + } + + // EMAIL + const TQStringList emails = (*addrIt).emails(); + bool pref = true; + for ( strIt = emails.begin(); strIt != emails.end(); ++strIt ) { + VCardLine line( "EMAIL", *strIt ); + if ( pref == true && emails.count() > 1 ) { + line.addParameter( "TYPE", "PREF" ); + pref = false; + } + card.addLine( line ); + } + + // FN + VCardLine fnLine( "FN", TQString((*addrIt).formattedName()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).formattedName() ) ) { + fnLine.addParameter( "charset", "UTF-8" ); + fnLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( fnLine ); + + // GEO + Geo geo = (*addrIt).geo(); + if ( geo.isValid() ) { + TQString str; + str.sprintf( "%.6f;%.6f", geo.latitude(), geo.longitude() ); + card.addLine( VCardLine( "GEO", str ) ); + } + + // KEY + const Key::List keys = (*addrIt).keys(); + Key::List::ConstIterator keyIt; + for ( keyIt = keys.begin(); keyIt != keys.end(); ++keyIt ) + card.addLine( createKey( *keyIt ) ); + + // LOGO + card.addLine( createPicture( "LOGO", (*addrIt).logo() ) ); + + // MAILER + VCardLine mailerLine( "MAILER", TQString((*addrIt).mailer()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).mailer() ) ) { + mailerLine.addParameter( "charset", "UTF-8" ); + mailerLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( mailerLine ); + + // N + TQStringList name; + name.append( (*addrIt).familyName().replace( ';', "\\;" ) ); + name.append( (*addrIt).givenName().replace( ';', "\\;" ) ); + name.append( (*addrIt).additionalName().replace( ';', "\\;" ) ); + name.append( (*addrIt).prefix().replace( ';', "\\;" ) ); + name.append( (*addrIt).suffix().replace( ';', "\\;" ) ); + + VCardLine nLine( "N", name.join( ";" ) ); + if ( version == VCard::v2_1 && needsEncoding( name.join( ";" ) ) ) { + nLine.addParameter( "charset", "UTF-8" ); + nLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( nLine ); + + // NAME + VCardLine nameLine( "NAME", TQString((*addrIt).name()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).name() ) ) { + nameLine.addParameter( "charset", "UTF-8" ); + nameLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( nameLine ); + + // NICKNAME + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "NICKNAME", TQString((*addrIt).nickName()) ) ); + + // NOTE + VCardLine noteLine( "NOTE", TQString((*addrIt).note()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).note() ) ) { + noteLine.addParameter( "charset", "UTF-8" ); + noteLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( noteLine ); + + // ORG + TQStringList organization; + organization.append( ( *addrIt ).organization().replace( ';', "\\;" ) ); + if ( !( *addrIt ).department().isEmpty() ) + organization.append( ( *addrIt ).department().replace( ';', "\\;" ) ); + VCardLine orgLine( "ORG", organization.join( ";" ) ); + if ( version == VCard::v2_1 && needsEncoding( organization.join( ";" ) ) ) { + orgLine.addParameter( "charset", "UTF-8" ); + orgLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( orgLine ); + + // PHOTO + card.addLine( createPicture( "PHOTO", (*addrIt).photo() ) ); + + // PROID + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "PRODID", TQString((*addrIt).productId()) ) ); + + // REV + card.addLine( VCardLine( "REV", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).revision()) ) ) ); + + // ROLE + VCardLine roleLine( "ROLE", TQString((*addrIt).role()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).role() ) ) { + roleLine.addParameter( "charset", "UTF-8" ); + roleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( roleLine ); + + // SORT-STRING + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "SORT-STRING", TQString((*addrIt).sortString()) ) ); + + // SOUND + card.addLine( createSound( (*addrIt).sound() ) ); + + // TEL + const PhoneNumber::List phoneNumbers = (*addrIt).phoneNumbers(); + PhoneNumber::List::ConstIterator phoneIt; + for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) { + VCardLine line( "TEL", (*phoneIt).number() ); + + TQMap::ConstIterator typeIt; + for ( typeIt = mPhoneTypeMap.constBegin(); typeIt != mPhoneTypeMap.constEnd(); ++typeIt ) { + if ( typeIt.data() & (*phoneIt).type() ) + line.addParameter( "TYPE", typeIt.key() ); + } + + card.addLine( line ); + } + + // TITLE + VCardLine titleLine( "TITLE", TQString((*addrIt).title()) ); + if ( version == VCard::v2_1 && needsEncoding( (*addrIt).title() ) ) { + titleLine.addParameter( "charset", "UTF-8" ); + titleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( titleLine ); + + // TZ + TimeZone timeZone = (*addrIt).timeZone(); + if ( timeZone.isValid() ) { + TQString str; + + int neg = 1; + if ( timeZone.offset() < 0 ) + neg = -1; + + str.sprintf( "%c%02d:%02d", ( timeZone.offset() >= 0 ? '+' : '-' ), + ( timeZone.offset() / 60 ) * neg, + ( timeZone.offset() % 60 ) * neg ); + + card.addLine( VCardLine( "TZ", str ) ); + } + + // UID + card.addLine( VCardLine( "UID", (*addrIt).uid() ) ); + + // UID + card.addLine( VCardLine( "URI", (*addrIt).uri() ) ); + + // URL + card.addLine( VCardLine( "URL", (*addrIt).url().url() ) ); + + // VERSION + if ( version == VCard::v2_1 ) + card.addLine( VCardLine( "VERSION", "2.1" ) ); + if ( version == VCard::v3_0 ) + card.addLine( VCardLine( "VERSION", "3.0" ) ); + + // X- + const TQStringList customs = (*addrIt).customs(); + for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) { + TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) ); + TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 ); + if ( value.isEmpty() ) + continue; + + VCardLine line( identifier, value ); + if ( version == VCard::v2_1 && needsEncoding( value ) ) { + line.addParameter( "charset", "UTF-8" ); + line.addParameter( "encoding", "QUOTED-PRINTABLE" ); + } + card.addLine( line ); + } + + vCardList.append( card ); + } + + return VCardParser::createVCards( vCardList ); +} + +Addressee::List VCardTool::parseVCards( const TQString& vcard ) +{ + static const TQChar semicolonSep( ';' ); + static const TQChar commaSep( ',' ); + TQString identifier; + + Addressee::List addrList; + const VCard::List vCardList = VCardParser::parseVCards( vcard ); + + VCard::List::ConstIterator cardIt; + VCard::List::ConstIterator listEnd( vCardList.end() ); + for ( cardIt = vCardList.begin(); cardIt != listEnd; ++cardIt ) { + Addressee addr; + + const TQStringList idents = (*cardIt).identifiers(); + TQStringList::ConstIterator identIt; + TQStringList::ConstIterator identEnd( idents.end() ); + for ( identIt = idents.begin(); identIt != identEnd; ++identIt ) { + const VCardLine::List lines = (*cardIt).lines( (*identIt) ); + VCardLine::List::ConstIterator lineIt; + + // iterate over the lines + for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { + identifier = (*lineIt).identifier().lower(); + // ADR + if ( identifier == "adr" ) { + Address address; + const TQStringList addrParts = splitString( semicolonSep, (*lineIt).value().asString() ); + if ( addrParts.count() > 0 ) + address.setPostOfficeBox( addrParts[ 0 ] ); + if ( addrParts.count() > 1 ) + address.setExtended( addrParts[ 1 ] ); + if ( addrParts.count() > 2 ) + address.setStreet( addrParts[ 2 ] ); + if ( addrParts.count() > 3 ) + address.setLocality( addrParts[ 3 ] ); + if ( addrParts.count() > 4 ) + address.setRegion( addrParts[ 4 ] ); + if ( addrParts.count() > 5 ) + address.setPostalCode( addrParts[ 5 ] ); + if ( addrParts.count() > 6 ) + address.setCountry( addrParts[ 6 ] ); + + int type = 0; + + const TQStringList types = (*lineIt).parameters( "type" ); + for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) + type += mAddressTypeMap[ (*it).lower() ]; + + address.setType( type ); + addr.insertAddress( address ); + } + + // AGENT + else if ( identifier == "agent" ) + addr.setAgent( parseAgent( *lineIt ) ); + + // BDAY + else if ( identifier == "bday" ) + addr.setBirthday( parseDateTime( (*lineIt).value().asString() ) ); + + // CATEGORIES + else if ( identifier == "categories" ) { + const TQStringList categories = splitString( commaSep, (*lineIt).value().asString() ); + addr.setCategories( categories ); + } + + // CLASS + else if ( identifier == "class" ) + addr.setSecrecy( parseSecrecy( *lineIt ) ); + + // EMAIL + else if ( identifier == "email" ) { + const TQStringList types = (*lineIt).parameters( "type" ); + addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 ); + } + + // FN + else if ( identifier == "fn" ) + addr.setFormattedName( (*lineIt).value().asString() ); + + // GEO + else if ( identifier == "geo" ) { + Geo geo; + + const TQStringList geoParts = TQStringList::split( ';', (*lineIt).value().asString(), true ); + geo.setLatitude( geoParts[ 0 ].toFloat() ); + geo.setLongitude( geoParts[ 1 ].toFloat() ); + + addr.setGeo( geo ); + } + + // KEY + else if ( identifier == "key" ) + addr.insertKey( parseKey( *lineIt ) ); + + // LABEL + else if ( identifier == "label" ) { + int type = 0; + + const TQStringList types = (*lineIt).parameters( "type" ); + for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) + type += mAddressTypeMap[ (*it).lower() ]; + + bool available = false; + KABC::Address::List addressList = addr.addresses(); + KABC::Address::List::Iterator it; + for ( it = addressList.begin(); it != addressList.end(); ++it ) { + if ( (*it).type() == type ) { + (*it).setLabel( (*lineIt).value().asString() ); + addr.insertAddress( *it ); + available = true; + break; + } + } + + if ( !available ) { // a standalone LABEL tag + KABC::Address address( type ); + address.setLabel( (*lineIt).value().asString() ); + addr.insertAddress( address ); + } + } + + // LOGO + else if ( identifier == "logo" ) + addr.setLogo( parsePicture( *lineIt ) ); + + // MAILER + else if ( identifier == "mailer" ) + addr.setMailer( (*lineIt).value().asString() ); + + // N + else if ( identifier == "n" ) { + const TQStringList nameParts = splitString( semicolonSep, (*lineIt).value().asString() ); + if ( nameParts.count() > 0 ) + addr.setFamilyName( nameParts[ 0 ] ); + if ( nameParts.count() > 1 ) + addr.setGivenName( nameParts[ 1 ] ); + if ( nameParts.count() > 2 ) + addr.setAdditionalName( nameParts[ 2 ] ); + if ( nameParts.count() > 3 ) + addr.setPrefix( nameParts[ 3 ] ); + if ( nameParts.count() > 4 ) + addr.setSuffix( nameParts[ 4 ] ); + } + + // NAME + else if ( identifier == "name" ) + addr.setName( (*lineIt).value().asString() ); + + // NICKNAME + else if ( identifier == "nickname" ) + addr.setNickName( (*lineIt).value().asString() ); + + // NOTE + else if ( identifier == "note" ) + addr.setNote( (*lineIt).value().asString() ); + + // ORGANIZATION + else if ( identifier == "org" ) { + const TQStringList orgParts = splitString( semicolonSep, (*lineIt).value().asString() ); + if ( orgParts.count() > 0 ) + addr.setOrganization( orgParts[ 0 ] ); + if ( orgParts.count() > 1 ) + addr.setDepartment( orgParts[ 1 ] ); + } + + // PHOTO + else if ( identifier == "photo" ) + addr.setPhoto( parsePicture( *lineIt ) ); + + // PROID + else if ( identifier == "prodid" ) + addr.setProductId( (*lineIt).value().asString() ); + + // REV + else if ( identifier == "rev" ) + addr.setRevision( parseDateTime( (*lineIt).value().asString() ) ); + + // ROLE + else if ( identifier == "role" ) + addr.setRole( (*lineIt).value().asString() ); + + // SORT-STRING + else if ( identifier == "sort-string" ) + addr.setSortString( (*lineIt).value().asString() ); + + // SOUND + else if ( identifier == "sound" ) + addr.setSound( parseSound( *lineIt ) ); + + // TEL + else if ( identifier == "tel" ) { + PhoneNumber phone; + phone.setNumber( (*lineIt).value().asString() ); + + int type = 0; + + const TQStringList types = (*lineIt).parameters( "type" ); + for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it ) + type += mPhoneTypeMap[(*it).upper()]; + + phone.setType( type ); + + addr.insertPhoneNumber( phone ); + } + + // TITLE + else if ( identifier == "title" ) + addr.setTitle( (*lineIt).value().asString() ); + + // TZ + else if ( identifier == "tz" ) { + TimeZone tz; + const TQString date = (*lineIt).value().asString(); + + int hours = date.mid( 1, 2).toInt(); + int minutes = date.mid( 4, 2 ).toInt(); + int offset = ( hours * 60 ) + minutes; + offset = offset * ( date[ 0 ] == '+' ? 1 : -1 ); + + tz.setOffset( offset ); + addr.setTimeZone( tz ); + } + + // UID + else if ( identifier == "uid" ) + addr.setUid( (*lineIt).value().asString() ); + + // URI + else if ( identifier == "uri" ) + addr.setUri( (*lineIt).value().asString() ); + + // URL + else if ( identifier == "url" ) + addr.setUrl( KURL( (*lineIt).value().asString() ) ); + + // X- + else if ( identifier.startsWith( "x-" ) ) { + const TQString key = (*lineIt).identifier().mid( 2 ); + int dash = key.find( "-" ); + addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() ); + } + } + } + + addrList.append( addr ); + } + + return addrList; +} + +TQDateTime VCardTool::parseDateTime( const TQString &str ) +{ + TQDateTime dateTime; + + if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd) + dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(), + str.mid( 6, 2 ).toInt() ) ); + + if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss + dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), + str.mid( 17, 2 ).toInt() ) ); + + } else { // is extended format yyyy-mm-dd + dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(), + str.mid( 8, 2 ).toInt() ) ); + + if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss + dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), + str.mid( 17, 2 ).toInt() ) ); + } + + return dateTime; +} + +TQString VCardTool::createDateTime( const TQDateTime &dateTime ) +{ + TQString str; + + if ( dateTime.date().isValid() ) { + str.sprintf( "%4d-%02d-%02d", dateTime.date().year(), dateTime.date().month(), + dateTime.date().day() ); + if ( dateTime.time().isValid() ) { + TQString tmp; + tmp.sprintf( "T%02d:%02d:%02dZ", dateTime.time().hour(), dateTime.time().minute(), + dateTime.time().second() ); + str += tmp; + } + } + + return str; +} + +Picture VCardTool::parsePicture( const VCardLine &line ) +{ + Picture pic; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) { + TQImage img; + img.loadFromData( line.value().asByteArray() ); + pic.setData( img ); + } else if ( params.findIndex( "value" ) != -1 ) { + if ( line.parameter( "value" ).lower() == "uri" ) + pic.setUrl( line.value().asString() ); + } + + if ( params.findIndex( "type" ) != -1 ) + pic.setType( line.parameter( "type" ) ); + + return pic; +} + +VCardLine VCardTool::createPicture( const TQString &identifier, const Picture &pic ) +{ + VCardLine line( identifier ); + + if ( pic.isIntern() ) { + if ( !pic.data().isNull() ) { + TQByteArray input; + TQBuffer buffer( input ); + buffer.open( IO_WriteOnly ); + + TQImageIO iio( &buffer, "JPEG" ); + iio.setImage( pic.data() ); + iio.setQuality( 100 ); + iio.write(); + + line.setValue( input ); + line.addParameter( "encoding", "b" ); + line.addParameter( "type", "image/jpeg" ); + } + } else if ( !pic.url().isEmpty() ) { + line.setValue( pic.url() ); + line.addParameter( "value", "URI" ); + } + + return line; +} + +Sound VCardTool::parseSound( const VCardLine &line ) +{ + Sound snd; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) + snd.setData( line.value().asByteArray() ); + else if ( params.findIndex( "value" ) != -1 ) { + if ( line.parameter( "value" ).lower() == "uri" ) + snd.setUrl( line.value().asString() ); + } + +/* TODO: support sound types + if ( params.contains( "type" ) ) + snd.setType( line.parameter( "type" ) ); +*/ + + return snd; +} + +VCardLine VCardTool::createSound( const Sound &snd ) +{ + VCardLine line( "SOUND" ); + + if ( snd.isIntern() ) { + if ( !snd.data().isEmpty() ) { + line.setValue( snd.data() ); + line.addParameter( "encoding", "b" ); + // TODO: need to store sound type!!! + } + } else if ( !snd.url().isEmpty() ) { + line.setValue( snd.url() ); + line.addParameter( "value", "URI" ); + } + + return line; +} + +Key VCardTool::parseKey( const VCardLine &line ) +{ + Key key; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "encoding" ) != -1 ) + key.setBinaryData( line.value().asByteArray() ); + else + key.setTextData( line.value().asString() ); + + if ( params.findIndex( "type" ) != -1 ) { + if ( line.parameter( "type" ).lower() == "x509" ) + key.setType( Key::X509 ); + else if ( line.parameter( "type" ).lower() == "pgp" ) + key.setType( Key::PGP ); + else { + key.setType( Key::Custom ); + key.setCustomTypeString( line.parameter( "type" ) ); + } + } + + return key; +} + +VCardLine VCardTool::createKey( const Key &key ) +{ + VCardLine line( "KEY" ); + + if ( key.isBinary() ) { + if ( !key.binaryData().isEmpty() ) { + line.setValue( key.binaryData() ); + line.addParameter( "encoding", "b" ); + } + } else if ( !key.textData().isEmpty() ) + line.setValue( key.textData() ); + + if ( key.type() == Key::X509 ) + line.addParameter( "type", "X509" ); + else if ( key.type() == Key::PGP ) + line.addParameter( "type", "PGP" ); + else if ( key.type() == Key::Custom ) + line.addParameter( "type", key.customTypeString() ); + + return line; +} + +Secrecy VCardTool::parseSecrecy( const VCardLine &line ) +{ + Secrecy secrecy; + + if ( line.value().asString().lower() == "public" ) + secrecy.setType( Secrecy::Public ); + if ( line.value().asString().lower() == "private" ) + secrecy.setType( Secrecy::Private ); + if ( line.value().asString().lower() == "confidential" ) + secrecy.setType( Secrecy::Confidential ); + + return secrecy; +} + +VCardLine VCardTool::createSecrecy( const Secrecy &secrecy ) +{ + VCardLine line( "CLASS" ); + + int type = secrecy.type(); + + if ( type == Secrecy::Public ) + line.setValue( "PUBLIC" ); + else if ( type == Secrecy::Private ) + line.setValue( "PRIVATE" ); + else if ( type == Secrecy::Confidential ) + line.setValue( "CONFIDENTIAL" ); + + return line; +} + +Agent VCardTool::parseAgent( const VCardLine &line ) +{ + Agent agent; + + const TQStringList params = line.parameterList(); + if ( params.findIndex( "value" ) != -1 ) { + if ( line.parameter( "value" ).lower() == "uri" ) + agent.setUrl( line.value().asString() ); + } else { + TQString str = line.value().asString(); + str.replace( "\\n", "\r\n" ); + str.replace( "\\N", "\r\n" ); + str.replace( "\\;", ";" ); + str.replace( "\\:", ":" ); + str.replace( "\\,", "," ); + + const Addressee::List list = parseVCards( str ); + if ( list.count() > 0 ) { + Addressee *addr = new Addressee; + *addr = list[ 0 ]; + agent.setAddressee( addr ); + } + } + + return agent; +} + +VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent ) +{ + VCardLine line( "AGENT" ); + + if ( agent.isIntern() ) { + if ( agent.addressee() != 0 ) { + Addressee::List list; + list.append( *agent.addressee() ); + + TQString str = createVCards( list, version ); + str.replace( "\r\n", "\\n" ); + str.replace( ";", "\\;" ); + str.replace( ":", "\\:" ); + str.replace( ",", "\\," ); + line.setValue( str ); + } + } else if ( !agent.url().isEmpty() ) { + line.setValue( agent.url() ); + line.addParameter( "value", "URI" ); + } + + return line; +} + +TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str ) +{ + TQStringList list; + TQString value( str ); + + int start = 0; + int pos = value.find( sep, start ); + + while ( pos != -1 ) { + if ( value[ pos - 1 ] != '\\' ) { + if ( pos > start && pos <= (int)value.length() ) + list << value.mid( start, pos - start ); + else + list << TQString::null; + + start = pos + 1; + pos = value.find( sep, start ); + } else { + if ( pos != 0 ) { + value.replace( pos - 1, 2, sep ); + pos = value.find( sep, pos ); + } else + pos = value.find( sep, pos + 1 ); + } + } + + int l = value.length() - 1; + if ( value.mid( start, l - start + 1 ).length() > 0 ) + list << value.mid( start, l - start + 1 ); + else + list << TQString::null; + + return list; +} diff --git a/tdeabc/vcardtool.h b/tdeabc/vcardtool.h new file mode 100644 index 000000000..fbf959613 --- /dev/null +++ b/tdeabc/vcardtool.h @@ -0,0 +1,88 @@ +/* + This file is part of libkabc. + Copyright (c) 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KABC_VCARDTOOL_H +#define KABC_VCARDTOOL_H + +#include "addressee.h" +#include "vcardparser.h" + +class TQDateTime; + +namespace KABC { + +class Agent; +class Key; +class Picture; +class Secrecy; +class Sound; + +class KABC_EXPORT VCardTool +{ + public: + VCardTool(); + ~VCardTool(); + + /** + Creates a string that contains the addressees from the list in + the vCard format. + */ + TQString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 ); + + /** + Parses the string and returns a list of addressee objects. + */ + Addressee::List parseVCards( const TQString& vcard ); + + private: + /** + Split a string and replaces escaped separators on the fly with + unescaped ones. + */ + TQStringList splitString( const TQChar &sep, const TQString &value ); + + TQDateTime parseDateTime( const TQString &str ); + TQString createDateTime( const TQDateTime &dateTime ); + + Picture parsePicture( const VCardLine &line ); + VCardLine createPicture( const TQString &identifier, const Picture &pic ); + + Sound parseSound( const VCardLine &line ); + VCardLine createSound( const Sound &snd ); + + Key parseKey( const VCardLine &line ); + VCardLine createKey( const Key &key ); + + Secrecy parseSecrecy( const VCardLine &line ); + VCardLine createSecrecy( const Secrecy &secrecy ); + + Agent parseAgent( const VCardLine &line ); + VCardLine createAgent( VCard::Version version, const Agent &agent ); + + TQMap mAddressTypeMap; + TQMap mPhoneTypeMap; + + class VCardToolPrivate; + VCardToolPrivate *d; +}; + +} + +#endif diff --git a/tdecert/tdecertpart.cc b/tdecert/tdecertpart.cc index 7c84f31d1..9a50e6e29 100644 --- a/tdecert/tdecertpart.cc +++ b/tdecert/tdecertpart.cc @@ -24,14 +24,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdecmshell/main.cpp b/tdecmshell/main.cpp index 3d54abc45..72f3c66f2 100644 --- a/tdecmshell/main.cpp +++ b/tdecmshell/main.cpp @@ -37,12 +37,12 @@ #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include "main.h" #include "main.moc" diff --git a/tdeconf_update/tdeconf_update.cpp b/tdeconf_update/tdeconf_update.cpp index 458b3b523..814e68a16 100644 --- a/tdeconf_update/tdeconf_update.cpp +++ b/tdeconf_update/tdeconf_update.cpp @@ -30,13 +30,13 @@ #include #include -#include +#include #include -#include +#include #include #include #include -#include +#include static TDECmdLineOptions options[] = { diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt index 850bb10f2..b8f512873 100644 --- a/tdecore/CMakeLists.txt +++ b/tdecore/CMakeLists.txt @@ -74,19 +74,19 @@ install( FILES kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h kapp.h tdeapplication.h kuniqueapp.h kuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h kprocctrl.h - klocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h + tdelocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h kregexp.h kcompletion.h kstringhandler.h kstddirs.h - kstandarddirs.h kglobal.h kglobalsettings.h ksharedptr.h + kstandarddirs.h tdeglobal.h tdeglobalsettings.h ksharedptr.h kallocator.h kvmallocator.h kcrash.h krfcdate.h kinstance.h - kpalette.h kipc.h klibloader.h ktempfile.h ksavefile.h + kpalette.h kipc.h klibloader.h tdetempfile.h ksavefile.h krandomsequence.h knotifyclient.h kiconeffect.h kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h kextsock.h kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h tdesycoca.h - tdesycocaentry.h tdesycocatype.h kxmessages.h kstartupinfo.h + tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc ktypelist.h ksortablevaluelist.h kdebugclasses.h kclipboard.h kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h @@ -123,15 +123,15 @@ set( ${target}_SRCS libintl.cpp tdeapplication.cpp kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp kstandarddirs.cpp - ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp klocale.cpp + ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp kiconloader.cpp twin.cpp twinmodule.cpp krootprop.cpp kcharsets.cpp kckey.cpp tdeshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp tdeaccelaction.cpp tdeshortcutmenu.cpp tdeaccelbase.cpp tdeaccel.cpp kglobalaccel_x11.cpp kglobalaccel.cpp tdestdaccel.cpp tdeshortcutlist.cpp - kcrash.cpp kurl.cpp kregexp.cpp kglobal.cpp kglobalsettings.cpp + kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp - kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp ktempfile.cpp + kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp kuniqueapplication.cpp tdeaccelmanager.cpp ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp @@ -139,7 +139,7 @@ set( ${target}_SRCS kextsock.cpp netsupp.cpp kprocio.cpp kbufferedio.cpp kpixmapprovider.cpp kurldrag.cpp kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c tdesycoca.cpp tdesycocadict.cpp tdesycoca.skel - tdesycocafactory.cpp kxmessages.cpp kstartupinfo.cpp + tdesycocafactory.cpp kxmessages.cpp tdestartupinfo.cpp kcatalogue.cpp kasyncio.cpp tdemultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp tdeversion.cpp kdebugdcopiface.cpp diff --git a/tdecore/MAINTAINERS b/tdecore/MAINTAINERS index e4a9ad80d..ae94ecd7c 100644 --- a/tdecore/MAINTAINERS +++ b/tdecore/MAINTAINERS @@ -27,10 +27,10 @@ kcrash.cpp Waldo Bastian kdcoppropertyproxy.cpp kdebug.cpp Stephan Kulow kdesktopfile.cpp -kglobal.cpp Stephan Kulow +tdeglobal.cpp Stephan Kulow kglobalaccel.cpp Ellis Whitehead kglobalaccel_x11.cpp Ellis Whitehead -kglobalsettings.cpp David Faure +tdeglobalsettings.cpp David Faure kiconeffect.cpp kiconloader.cpp kicontheme.cpp @@ -41,7 +41,7 @@ kkeynative_x11.cpp Ellis Whitehead kkeysequence.cpp Ellis Whitehead kkeysequence_emb.cpp Ellis Whitehead klibloader.cpp -klocale.cpp Hans Petter Bieker +tdelocale.cpp Hans Petter Bieker kmdcodec.cpp kmimesourcefactory.cpp tdemultipledrag.cpp David Faure @@ -60,14 +60,14 @@ tdeshortcut.cpp Ellis Whitehead ksimpleconfig.cpp Waldo Bastian ksocks.cpp kstandarddirs.cpp Waldo Bastian -kstartupinfo.cpp Lubos Lunak +tdestartupinfo.cpp Lubos Lunak kstaticdeleter.cpp Stephan Kulow tdestdaccel.cpp Ellis Whitehead kstringhandler.cpp tdesycoca.cpp Waldo Bastian tdesycocadict.cpp Waldo Bastian tdesycocafactory.cpp Waldo Bastian -ktempfile.cpp Waldo Bastian +tdetempfile.cpp Waldo Bastian kuniqueapplication.cpp Waldo Bastian kurl.cpp Waldo Bastian kurldrag.cpp David Faure diff --git a/tdecore/Makefile.am b/tdecore/Makefile.am index ae5048ed9..c04ee4c6d 100644 --- a/tdecore/Makefile.am +++ b/tdecore/Makefile.am @@ -41,19 +41,19 @@ include_HEADERS = tdeconfig.h tdeconfigskeleton.h \ tdeconfigbase.h kdesktopfile.h kurl.h ksock.h tdeaboutdata.h \ tdecmdlineargs.h tdeconfigbackend.h kapp.h tdeapplication.h kuniqueapp.h \ kuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h \ - kprocctrl.h klocale.h kicontheme.h kiconloader.h kdebug.h \ + kprocctrl.h tdelocale.h kicontheme.h kiconloader.h kdebug.h \ twinmodule.h twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h \ kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h \ kregexp.h kcompletion.h kstringhandler.h \ - kstddirs.h kstandarddirs.h kglobal.h kglobalsettings.h ksharedptr.h \ + kstddirs.h kstandarddirs.h tdeglobal.h tdeglobalsettings.h ksharedptr.h \ kallocator.h kvmallocator.h kcrash.h krfcdate.h \ - kinstance.h kpalette.h kipc.h klibloader.h ktempfile.h ksavefile.h \ + kinstance.h kpalette.h kipc.h klibloader.h tdetempfile.h ksavefile.h \ krandomsequence.h knotifyclient.h kiconeffect.h \ kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h \ netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h \ kextsock.h kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h \ kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h \ - tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h kstartupinfo.h \ + tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h \ klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc \ ktypelist.h ksortablevaluelist.h kdebugclasses.h kclipboard.h \ kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h \ @@ -93,14 +93,14 @@ libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \ kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp \ tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp \ kstandarddirs.cpp ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp \ - klocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \ + tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \ kiconloader.cpp twin.cpp twinmodule.cpp krootprop.cpp kcharsets.cpp \ kckey.cpp tdeshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp \ tdeaccelaction.cpp tdeshortcutmenu.cpp tdeaccelbase.cpp tdeaccel.cpp \ kglobalaccel_x11.cpp kglobalaccel.cpp tdestdaccel.cpp tdeshortcutlist.cpp \ - kcrash.cpp kurl.cpp kregexp.cpp kglobal.cpp kglobalsettings.cpp \ + kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp \ kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp \ - kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp ktempfile.cpp \ + kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp \ kuniqueapplication.cpp tdeaccelmanager.cpp \ ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp \ tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \ @@ -109,7 +109,7 @@ libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \ kpixmapprovider.cpp kurldrag.cpp \ kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c \ tdesycoca.cpp tdesycocadict.cpp tdesycocafactory.cpp tdesycoca.skel \ - kxmessages.cpp kstartupinfo.cpp kcatalogue.cpp kasyncio.cpp \ + kxmessages.cpp tdestartupinfo.cpp kcatalogue.cpp kasyncio.cpp \ tdemultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp \ kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp \ tdeversion.cpp kdebugdcopiface.cpp kdebugdcopiface.skel \ diff --git a/tdecore/kappdcopiface.cpp b/tdecore/kappdcopiface.cpp index 31bc8dd5b..ed6e26163 100644 --- a/tdecore/kappdcopiface.cpp +++ b/tdecore/kappdcopiface.cpp @@ -20,7 +20,7 @@ #include "kappdcopiface.h" #include #include -#include +#include #include diff --git a/tdecore/kapplication_win.cpp b/tdecore/kapplication_win.cpp index 940bc379e..38bafaef8 100644 --- a/tdecore/kapplication_win.cpp +++ b/tdecore/kapplication_win.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include "kcheckaccelerators.h" diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp index 39331e170..20d00d181 100644 --- a/tdecore/kcalendarsystem.cpp +++ b/tdecore/kcalendarsystem.cpp @@ -22,10 +22,10 @@ // systems. // Also default gregorian and factory classes -#include +#include #include "kcalendarsystem.h" -#include "klocale.h" +#include "tdelocale.h" class KCalendarSystemPrivate { diff --git a/tdecore/kcalendarsystemgregorian.cpp b/tdecore/kcalendarsystemgregorian.cpp index ead1aca66..9d4d14661 100644 --- a/tdecore/kcalendarsystemgregorian.cpp +++ b/tdecore/kcalendarsystemgregorian.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "kcalendarsystemgregorian.h" diff --git a/tdecore/kcalendarsystemhebrew.cpp b/tdecore/kcalendarsystemhebrew.cpp index a0db927f4..2f0aa111a 100644 --- a/tdecore/kcalendarsystemhebrew.cpp +++ b/tdecore/kcalendarsystemhebrew.cpp @@ -21,7 +21,7 @@ // Derived hebrew kde calendar class -#include +#include #include #include "kcalendarsystemhebrew.h" diff --git a/tdecore/kcalendarsystemhijri.cpp b/tdecore/kcalendarsystemhijri.cpp index 8c9fac471..cc66805e0 100644 --- a/tdecore/kcalendarsystemhijri.cpp +++ b/tdecore/kcalendarsystemhijri.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include "kcalendarsystemhijri.h" diff --git a/tdecore/kcalendarsystemjalali.cpp b/tdecore/kcalendarsystemjalali.cpp index 559ebb39c..631693e45 100644 --- a/tdecore/kcalendarsystemjalali.cpp +++ b/tdecore/kcalendarsystemjalali.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp index fa623b693..23786c53e 100644 --- a/tdecore/kcharsets.cpp +++ b/tdecore/kcharsets.cpp @@ -22,8 +22,8 @@ #include "kentities.c" #include -#include -#include +#include +#include #include #include diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index b7e113f4b..306591e67 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -41,9 +41,9 @@ #include #include -#include +#include #include -#include +#include /* diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index 54d051486..8ab23cccc 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "kclipboard.h" diff --git a/tdecore/kcompletion.cpp b/tdecore/kcompletion.cpp index a5349b3ee..4a80d85df 100644 --- a/tdecore/kcompletion.cpp +++ b/tdecore/kcompletion.cpp @@ -20,9 +20,9 @@ #include #include -#include +#include #include -#include +#include #include diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index e6d7f5314..2bce648fb 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -28,7 +28,7 @@ #include #include "tdelibs_export.h" -#include +#include #include #include diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp index 2eed7c282..08abe75c7 100644 --- a/tdecore/kcrash.cpp +++ b/tdecore/kcrash.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index b6e742489..5653a9a03 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -184,7 +184,7 @@ 5602 kontact (plugins) 5650 tderesources 5700 kabc -5710 kabc/vcard +5710 tdeabc/vcard 5720 kaddressbook 5800 libkcal 5850 korganizer diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index 062864fca..656edf6f9 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -28,12 +28,12 @@ #include "kdebugdcopiface.h" #include "tdeapplication.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kinstance.h" #include "kstandarddirs.h" #include -#include +#include #include #include #include diff --git a/tdecore/kdebugrc b/tdecore/kdebugrc index e1317ddfb..dbf3ed53f 100644 --- a/tdecore/kdebugrc +++ b/tdecore/kdebugrc @@ -96,7 +96,7 @@ InfoOutput=4 [5400] InfoOutput=4 -# kabc/vcard +# tdeabc/vcard [5710] InfoOutput=4 diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp index a5a57cdd8..b385eeb18 100644 --- a/tdecore/kdesktopfile.cpp +++ b/tdecore/kdesktopfile.cpp @@ -35,7 +35,7 @@ #include "kstandarddirs.h" #include "kmountpoint.h" #include "kcatalogue.h" -#include "klocale.h" +#include "tdelocale.h" #include "kdesktopfile.h" #include "kdesktopfile.moc" diff --git a/tdecore/kdetcompmgr.cpp b/tdecore/kdetcompmgr.cpp index d78d76b34..964cd49be 100644 --- a/tdecore/kdetcompmgr.cpp +++ b/tdecore/kdetcompmgr.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/kgenericfactory.h b/tdecore/kgenericfactory.h index 426b29ef1..7f2b7b453 100644 --- a/tdecore/kgenericfactory.h +++ b/tdecore/kgenericfactory.h @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include #include /* @internal */ diff --git a/tdecore/kglobal.cpp b/tdecore/kglobal.cpp index 965a537a3..f8639d526 100644 --- a/tdecore/kglobal.cpp +++ b/tdecore/kglobal.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ /* -* kglobal.cpp -- Implementation of class TDEGlobal. +* tdeglobal.cpp -- Implementation of class TDEGlobal. * Author: Sirtaj Singh Kang * Version: $Id$ * Generated: Sat May 1 02:08:43 EST 1999 @@ -25,13 +25,13 @@ #include #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include #include #include #include -#include +#include #include #include #include diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp index 6af97065d..746721e40 100644 --- a/tdecore/kglobalaccel.cpp +++ b/tdecore/kglobalaccel.cpp @@ -32,7 +32,7 @@ #include "tdeaccelbase.h" #include #include -#include +#include //---------------------------------------------------- diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index a103c4652..c0c6329c7 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ #include "config.h" -#include "kglobalsettings.h" +#include "tdeglobalsettings.h" #include #include @@ -40,12 +40,12 @@ static QRgb qt_colorref2qrgb(COLORREF col) #endif #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index e865a1317..c1a4a8ca5 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include #include "kiconeffect.h" diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp index be44a921f..e81293986 100644 --- a/tdecore/kiconloader.cpp +++ b/tdecore/kiconloader.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdecore/kiconloader.h b/tdecore/kiconloader.h index 0c7e67a26..434a3d976 100644 --- a/tdecore/kiconloader.h +++ b/tdecore/kiconloader.h @@ -27,7 +27,7 @@ #undef TDEIconLoaderXStatus #endif -#include +#include #include #include diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp index 9d5d2b7d0..544eefe01 100644 --- a/tdecore/kicontheme.cpp +++ b/tdecore/kicontheme.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp index cf0b35791..6760c95a0 100644 --- a/tdecore/kinstance.cpp +++ b/tdecore/kinstance.cpp @@ -21,7 +21,7 @@ #include #include "tdeconfig.h" -#include "klocale.h" +#include "tdelocale.h" #include "kcharsets.h" #include "kiconloader.h" #include "tdehardwaredevices.h" @@ -29,7 +29,7 @@ #include "tdeaboutdata.h" #include "kstandarddirs.h" #include "kdebug.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kmimesourcefactory.h" #include diff --git a/tdecore/kkeynative_x11.cpp b/tdecore/kkeynative_x11.cpp index 64635acc3..a44305dad 100644 --- a/tdecore/kkeynative_x11.cpp +++ b/tdecore/kkeynative_x11.cpp @@ -32,7 +32,7 @@ #include #include "kckey.h" #include -#include +#include #ifdef Q_WS_X11 #define XK_MISCELLANY diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index cd4abb6fb..64bfe383d 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -33,8 +33,8 @@ #include #include -#include -#include +#include +#include #ifdef Q_WS_X11 # define XK_MISCELLANY diff --git a/tdecore/klibloader.cpp b/tdecore/klibloader.cpp index f7e63c215..aed2c06af 100644 --- a/tdecore/klibloader.cpp +++ b/tdecore/klibloader.cpp @@ -29,7 +29,7 @@ #include "klibloader.h" #include "kstandarddirs.h" #include "kdebug.h" -#include "klocale.h" +#include "tdelocale.h" #include "ltdl.h" diff --git a/tdecore/klibloader.h b/tdecore/klibloader.h index 3e8f9ff45..d9e632184 100644 --- a/tdecore/klibloader.h +++ b/tdecore/klibloader.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include // For backwards compatibility diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index 3e169ba03..4402dd183 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -33,7 +33,7 @@ #include #include "kcatalogue.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "ksimpleconfig.h" #include "kinstance.h" @@ -41,7 +41,7 @@ #include "kdebug.h" #include "kcalendarsystem.h" #include "kcalendarsystemfactory.h" -#include "klocale.h" +#include "tdelocale.h" #ifdef Q_WS_WIN #include diff --git a/tdecore/klocale.h b/tdecore/klocale.h index 65a21d13d..94cf704f1 100644 --- a/tdecore/klocale.h +++ b/tdecore/klocale.h @@ -39,7 +39,7 @@ class KCatalogue; class KCalendarSystem; /** - * \file klocale.h + * \file tdelocale.h */ #ifndef I18N_NOOP diff --git a/tdecore/klockfile.cpp b/tdecore/klockfile.cpp index ee09a06c8..1f4f8337e 100644 --- a/tdecore/klockfile.cpp +++ b/tdecore/klockfile.cpp @@ -39,8 +39,8 @@ #include #include #include -#include -#include +#include +#include // TODO: http://www.spinnaker.de/linux/nfs-locking.html // TODO: Make regression test diff --git a/tdecore/kmimesourcefactory.cpp b/tdecore/kmimesourcefactory.cpp index f08cb249a..8ed02941e 100644 --- a/tdecore/kmimesourcefactory.cpp +++ b/tdecore/kmimesourcefactory.cpp @@ -19,7 +19,7 @@ */ #include -#include +#include #include #include diff --git a/tdecore/kmimesourcefactory.h b/tdecore/kmimesourcefactory.h index 16302dfe4..8292cda42 100644 --- a/tdecore/kmimesourcefactory.h +++ b/tdecore/kmimesourcefactory.h @@ -23,7 +23,7 @@ #define KMIMESOURCEFACTORY_H #include -#include +#include class KMimeSourceFactoryPrivate; class TDEInstance; diff --git a/tdecore/kpalette.cpp b/tdecore/kpalette.cpp index c06184221..7335e8e14 100644 --- a/tdecore/kpalette.cpp +++ b/tdecore/kpalette.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/kprotocolinfo_tdecore.cpp b/tdecore/kprotocolinfo_tdecore.cpp index 8cc5091c5..86a9a6fcc 100644 --- a/tdecore/kprotocolinfo_tdecore.cpp +++ b/tdecore/kprotocolinfo_tdecore.cpp @@ -26,7 +26,7 @@ #include "kprotocolinfofactory.h" #include -#include +#include #include #include #include diff --git a/tdecore/kprotocolinfofactory.cpp b/tdecore/kprotocolinfofactory.cpp index 4daab08dd..115a44f25 100644 --- a/tdecore/kprotocolinfofactory.cpp +++ b/tdecore/kprotocolinfofactory.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include #include diff --git a/tdecore/krootprop.cpp b/tdecore/krootprop.cpp index bb15462dd..c717a1823 100644 --- a/tdecore/krootprop.cpp +++ b/tdecore/krootprop.cpp @@ -23,8 +23,8 @@ #ifdef Q_WS_X11 // not needed anyway :-) #include "krootprop.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kcharsets.h" #include "tdeapplication.h" #include diff --git a/tdecore/ksavefile.h b/tdecore/ksavefile.h index e035115a9..282652dea 100644 --- a/tdecore/ksavefile.h +++ b/tdecore/ksavefile.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include class KSaveFilePrivate; diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/ksimpleconfig.cpp index 55cf7485b..dc359f17e 100644 --- a/tdecore/ksimpleconfig.cpp +++ b/tdecore/ksimpleconfig.cpp @@ -31,7 +31,7 @@ #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "tdeconfigbackend.h" diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index f39a94221..835566268 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/ksockaddr.cpp b/tdecore/ksockaddr.cpp index cd2f9c93c..a645b3aa9 100644 --- a/tdecore/ksockaddr.cpp +++ b/tdecore/ksockaddr.cpp @@ -38,7 +38,7 @@ #include #include "kdebug.h" -#include "klocale.h" +#include "tdelocale.h" //#include "kextsock.h" #ifndef HAVE_STRUCT_SOCKADDR_IN6 diff --git a/tdecore/ksocks.cpp b/tdecore/ksocks.cpp index 95e36dc15..a6ecc37d2 100644 --- a/tdecore/ksocks.cpp +++ b/tdecore/ksocks.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include "klibloader.h" #include diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h index 7eb654f42..7cdf44e37 100644 --- a/tdecore/kstandarddirs.h +++ b/tdecore/kstandarddirs.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include class TDEConfig; class TDEStandardDirsPrivate; diff --git a/tdecore/kstartupinfo.cpp b/tdecore/kstartupinfo.cpp index a472de5fd..3d798cdc1 100644 --- a/tdecore/kstartupinfo.cpp +++ b/tdecore/kstartupinfo.cpp @@ -45,7 +45,7 @@ DEALINGS IN THE SOFTWARE. #define QT_CLEAN_NAMESPACE #endif -#include "kstartupinfo.h" +#include "tdestartupinfo.h" #include #include @@ -1525,5 +1525,5 @@ static TQString escape_str( const TQString& str_P ) return ret; } -#include "kstartupinfo.moc" +#include "tdestartupinfo.moc" #endif diff --git a/tdecore/kstartupinfo.h b/tdecore/kstartupinfo.h index dcc80f978..3f8310f6b 100644 --- a/tdecore/kstartupinfo.h +++ b/tdecore/kstartupinfo.h @@ -49,7 +49,7 @@ class TDEStartupInfoPrivate; * * This class can be used to send information about started application, * change the information and receive this information. For detailed - * description, see tdelibs/tdecore/README.kstartupinfo. + * description, see tdelibs/tdecore/README.tdestartupinfo. * * You usually don't need to use this class for sending the notification * information, as KDE libraries should do this when an application is diff --git a/tdecore/kstaticdeleter.h b/tdecore/kstaticdeleter.h index dd759adf7..b6967268c 100644 --- a/tdecore/kstaticdeleter.h +++ b/tdecore/kstaticdeleter.h @@ -23,7 +23,7 @@ #ifndef _KSTATIC_DELETER_H_ #define _KSTATIC_DELETER_H_ -#include +#include /** * Static deleters are used to manage static resources. They can register diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp index c562c539f..b19c5b875 100644 --- a/tdecore/kstringhandler.cpp +++ b/tdecore/kstringhandler.cpp @@ -18,7 +18,7 @@ */ #include "kstringhandler.h" -#include "kglobal.h" +#include "tdeglobal.h" static void parsePythonRange( const TQCString &range, uint &start, uint &end ) { diff --git a/tdecore/ktempdir.cpp b/tdecore/ktempdir.cpp index 53cc83f99..d16d2e185 100644 --- a/tdecore/ktempdir.cpp +++ b/tdecore/ktempdir.cpp @@ -47,7 +47,7 @@ #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include "tdeapplication.h" #include "kinstance.h" #include "ktempdir.h" diff --git a/tdecore/ktempfile.cpp b/tdecore/ktempfile.cpp index 973e14070..805d315a1 100644 --- a/tdecore/ktempfile.cpp +++ b/tdecore/ktempfile.cpp @@ -48,10 +48,10 @@ #include #include -#include "kglobal.h" +#include "tdeglobal.h" #include "tdeapplication.h" #include "kinstance.h" -#include "ktempfile.h" +#include "tdetempfile.h" #include "kstandarddirs.h" #include "kde_file.h" #include "kdebug.h" diff --git a/tdecore/ktimezones.cpp b/tdecore/ktimezones.cpp index 6b21e0392..3436cdabb 100644 --- a/tdecore/ktimezones.cpp +++ b/tdecore/ktimezones.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdecore/kuniqueapplication.cpp b/tdecore/kuniqueapplication.cpp index 964c7c8c7..0a3a0962a 100644 --- a/tdecore/kuniqueapplication.cpp +++ b/tdecore/kuniqueapplication.cpp @@ -40,7 +40,7 @@ #if defined Q_WS_X11 #include -#include +#include #endif #include diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp index 9479029a9..2079c050b 100644 --- a/tdecore/kurl.cpp +++ b/tdecore/kurl.cpp @@ -27,7 +27,7 @@ // KDE_QT_ONLY is first used for dcop/client (e.g. marshalling) #ifndef KDE_QT_ONLY #include -#include +#include #include #include #endif diff --git a/tdecore/kurldrag.cpp b/tdecore/kurldrag.cpp index 20aa6388e..5e64d09b2 100644 --- a/tdecore/kurldrag.cpp +++ b/tdecore/kurldrag.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include class KURLDragPrivate diff --git a/tdecore/kvmallocator.cpp b/tdecore/kvmallocator.cpp index 996d55791..3b887eeee 100644 --- a/tdecore/kvmallocator.cpp +++ b/tdecore/kvmallocator.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include "kvmallocator.h" diff --git a/tdecore/netsupp.cpp b/tdecore/netsupp.cpp index c7e968c16..0c072752c 100644 --- a/tdecore/netsupp.cpp +++ b/tdecore/netsupp.cpp @@ -37,7 +37,7 @@ #include "config.h" #include "kdebug.h" -#include "klocale.h" +#include "tdelocale.h" #ifndef IN6_IS_ADDR_V4MAPPED #define NEED_IN6_TESTS diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index 1c32e80ec..b9ac605c0 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -54,7 +54,7 @@ #endif // KDE -#include +#include // Us #include "kresolver.h" diff --git a/tdecore/network/kresolverstandardworkers.cpp b/tdecore/network/kresolverstandardworkers.cpp index cde24f752..96519d1aa 100644 --- a/tdecore/network/kresolverstandardworkers.cpp +++ b/tdecore/network/kresolverstandardworkers.cpp @@ -44,7 +44,7 @@ #include #include "kdebug.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "tdeapplication.h" diff --git a/tdecore/network/tdesocketaddress.cpp b/tdecore/network/tdesocketaddress.cpp index ff97699c8..a6da5f7c0 100644 --- a/tdecore/network/tdesocketaddress.cpp +++ b/tdecore/network/tdesocketaddress.cpp @@ -36,7 +36,7 @@ #include #include -#include "klocale.h" +#include "tdelocale.h" #include "tdesocketaddress.h" #include "netsupp.h" diff --git a/tdecore/network/tdesocketbase.cpp b/tdecore/network/tdesocketbase.cpp index 0eb31bbc1..66decb15d 100644 --- a/tdecore/network/tdesocketbase.cpp +++ b/tdecore/network/tdesocketbase.cpp @@ -24,7 +24,7 @@ #include #include -#include "klocale.h" +#include "tdelocale.h" #include "tdesocketbase.h" #include "tdesocketdevice.h" diff --git a/tdecore/networkbackends/network-manager/network-manager_p.h b/tdecore/networkbackends/network-manager/network-manager_p.h index 474f628bb..0e1fe4de8 100644 --- a/tdecore/networkbackends/network-manager/network-manager_p.h +++ b/tdecore/networkbackends/network-manager/network-manager_p.h @@ -27,7 +27,7 @@ /* TDE headers */ #include -#include +#include /* TQDbus headers */ #include diff --git a/tdecore/tde-config.cpp.cmake b/tdecore/tde-config.cpp.cmake index 98481cefe..36e752f33 100644 --- a/tdecore/tde-config.cpp.cmake +++ b/tdecore/tde-config.cpp.cmake @@ -1,11 +1,11 @@ // -*- c++ -*- #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdecore/tde-config.cpp.in b/tdecore/tde-config.cpp.in index ac49e5c41..f86e5f5db 100644 --- a/tdecore/tde-config.cpp.in +++ b/tdecore/tde-config.cpp.in @@ -1,11 +1,11 @@ // -*- c++ -*- #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdecore/tdeaboutdata.h b/tdecore/tdeaboutdata.h index d5addac0a..db76287f2 100644 --- a/tdecore/tdeaboutdata.h +++ b/tdecore/tdeaboutdata.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #ifndef _KABOUTDATA_H_ #define _KABOUTDATA_H_ diff --git a/tdecore/tdeaccel.cpp b/tdecore/tdeaccel.cpp index e019baafc..5430c2529 100644 --- a/tdecore/tdeaccel.cpp +++ b/tdecore/tdeaccel.cpp @@ -29,7 +29,7 @@ #include "tdeaccelbase.h" #include #include -#include +#include #include #include "tdeaccelprivate.h" diff --git a/tdecore/tdeaccelaction.cpp b/tdecore/tdeaccelaction.cpp index 93f17ae25..89d8efaa2 100644 --- a/tdecore/tdeaccelaction.cpp +++ b/tdecore/tdeaccelaction.cpp @@ -28,9 +28,9 @@ #include #include "kckey.h" #include -#include +#include #include -#include +#include #include //--------------------------------------------------------------------- diff --git a/tdecore/tdeaccelbase.cpp b/tdecore/tdeaccelbase.cpp index 434801f61..6673cabb4 100644 --- a/tdecore/tdeaccelbase.cpp +++ b/tdecore/tdeaccelbase.cpp @@ -29,10 +29,10 @@ #include #include "kckey.h" #include -#include +#include #include #include "kkeyserver.h" -#include +#include #include "tdeshortcutmenu.h" //--------------------------------------------------------------------- diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp index 24c77826b..58b010e4e 100644 --- a/tdecore/tdeapplication.cpp +++ b/tdecore/tdeapplication.cpp @@ -61,10 +61,10 @@ #include #endif -#include +#include #include #include -#include +#include #include #include #include @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include #include @@ -89,7 +89,7 @@ #include #if defined Q_WS_X11 -#include +#include #endif #include diff --git a/tdecore/tdecmdlineargs.cpp b/tdecore/tdecmdlineargs.cpp index ad24467e2..46d1b9f4a 100644 --- a/tdecore/tdecmdlineargs.cpp +++ b/tdecore/tdecmdlineargs.cpp @@ -37,9 +37,9 @@ #include "tdecmdlineargs.h" #include -#include +#include #include -#include +#include #include #include diff --git a/tdecore/tdeconfig.cpp b/tdecore/tdeconfig.cpp index 35c5b73bc..68307dc85 100644 --- a/tdecore/tdeconfig.cpp +++ b/tdecore/tdeconfig.cpp @@ -36,7 +36,7 @@ #include "tdeconfigbackend.h" #include "tdeconfig.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kstandarddirs.h" #include "kstaticdeleter.h" #include diff --git a/tdecore/tdeconfig_compiler/example/autoexample.cpp b/tdecore/tdeconfig_compiler/example/autoexample.cpp index e25219787..6085fa6eb 100644 --- a/tdecore/tdeconfig_compiler/example/autoexample.cpp +++ b/tdecore/tdeconfig_compiler/example/autoexample.cpp @@ -27,9 +27,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdecore/tdeconfig_compiler/example/example.cpp b/tdecore/tdeconfig_compiler/example/example.cpp index c08339d4a..157570d98 100644 --- a/tdecore/tdeconfig_compiler/example/example.cpp +++ b/tdecore/tdeconfig_compiler/example/example.cpp @@ -24,9 +24,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp index 753bae532..207a78402 100644 --- a/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp +++ b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -1151,7 +1151,7 @@ int main( int argc, char **argv ) if ( headerIncludes.count() > 0 ) h << endl; if ( !singleton && cfgFileNameArg && parameters.isEmpty() ) - h << "#include " << endl; + h << "#include " << endl; h << "#include " << endl; h << "#include " << endl << endl; @@ -1421,7 +1421,7 @@ int main( int argc, char **argv ) cpp << "#include \"" << headerFileName << "\"" << endl << endl; - if ( setUserTexts ) cpp << "#include " << endl << endl; + if ( setUserTexts ) cpp << "#include " << endl << endl; // Header required by singleton implementation if ( singleton ) diff --git a/tdecore/tdeconfig_compiler/tests/test2.cpp.ref b/tdecore/tdeconfig_compiler/tests/test2.cpp.ref index cc3f67b5e..e66c5b9da 100644 --- a/tdecore/tdeconfig_compiler/tests/test2.cpp.ref +++ b/tdecore/tdeconfig_compiler/tests/test2.cpp.ref @@ -3,7 +3,7 @@ #include "test2.h" -#include +#include Test2::Test2( ) : MyPrefs( TQString::fromLatin1( "korganizerrc" ) ) diff --git a/tdecore/tdeconfig_compiler/tests/test8a.h.ref b/tdecore/tdeconfig_compiler/tests/test8a.h.ref index 88686ca1b..a1e5b7e37 100644 --- a/tdecore/tdeconfig_compiler/tests/test8a.h.ref +++ b/tdecore/tdeconfig_compiler/tests/test8a.h.ref @@ -3,7 +3,7 @@ #ifndef TEST8A_H #define TEST8A_H -#include +#include #include #include diff --git a/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref b/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref index 5aad12fe8..b3fde4334 100644 --- a/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref +++ b/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref @@ -3,7 +3,7 @@ #include "test_dpointer.h" -#include +#include #include diff --git a/tdecore/tdeconfigbackend.cpp b/tdecore/tdeconfigbackend.cpp index d050a2efe..6d5197ff7 100644 --- a/tdecore/tdeconfigbackend.cpp +++ b/tdecore/tdeconfigbackend.cpp @@ -42,9 +42,9 @@ #include "tdeconfigbackend.h" #include "tdeconfigbase.h" #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdecore/tdeconfigbackend.h b/tdecore/tdeconfigbackend.h index 71ba15288..83c8047bc 100644 --- a/tdecore/tdeconfigbackend.h +++ b/tdecore/tdeconfigbackend.h @@ -25,7 +25,7 @@ #include "tdeconfigdata.h" #include #include -#include +#include #include "tdelibs_export.h" class TQFile; diff --git a/tdecore/tdeconfigbase.cpp b/tdecore/tdeconfigbase.cpp index 668a688d8..a3b15185b 100644 --- a/tdecore/tdeconfigbase.cpp +++ b/tdecore/tdeconfigbase.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include "tdeconfigbase.h" diff --git a/tdecore/tdeconfigdialogmanager.cpp b/tdecore/tdeconfigdialogmanager.cpp index dfabefb59..9578c05c1 100644 --- a/tdecore/tdeconfigdialogmanager.cpp +++ b/tdecore/tdeconfigdialogmanager.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include diff --git a/tdecore/tdeconfigskeleton.cpp b/tdecore/tdeconfigskeleton.cpp index 1abaf388b..45a4b4112 100644 --- a/tdecore/tdeconfigskeleton.cpp +++ b/tdecore/tdeconfigskeleton.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include "kstringhandler.h" diff --git a/tdecore/tdeconfigskeleton.h b/tdecore/tdeconfigskeleton.h index ccbf4529b..b260db1e8 100644 --- a/tdecore/tdeconfigskeleton.h +++ b/tdecore/tdeconfigskeleton.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include /** * @short Class for storing a preferences setting diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index 263bc5507..60f3efde9 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -23,10 +23,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp index 2705343f7..2682aa991 100644 --- a/tdecore/tdenetworkconnections.cpp +++ b/tdecore/tdenetworkconnections.cpp @@ -23,7 +23,7 @@ #include -#include +#include // #define DEBUG_SIGNAL_QUEUE 1 diff --git a/tdecore/tdeshortcut.cpp b/tdecore/tdeshortcut.cpp index 33797b0bc..bae897e98 100644 --- a/tdecore/tdeshortcut.cpp +++ b/tdecore/tdeshortcut.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include //---------------------------------------------------- diff --git a/tdecore/tdeshortcutlist.cpp b/tdecore/tdeshortcutlist.cpp index 645e69565..ffacd001c 100644 --- a/tdecore/tdeshortcutlist.cpp +++ b/tdecore/tdeshortcutlist.cpp @@ -5,7 +5,7 @@ #include "tdeaccelaction.h" #include #include -#include +#include #include #include #include diff --git a/tdecore/tdeshortcutmenu.cpp b/tdecore/tdeshortcutmenu.cpp index 91061a734..c035c0df9 100644 --- a/tdecore/tdeshortcutmenu.cpp +++ b/tdecore/tdeshortcutmenu.cpp @@ -23,7 +23,7 @@ #include "tdeaccelaction.h" #include -#include +#include #include "tdeshortcutmenu.h" //#include diff --git a/tdecore/tdestdaccel.cpp b/tdecore/tdestdaccel.cpp index f91d2ee66..ba3e64ca5 100644 --- a/tdecore/tdestdaccel.cpp +++ b/tdecore/tdestdaccel.cpp @@ -25,8 +25,8 @@ #include "tdeaccelbase.h" #include #include -#include -#include +#include +#include #include #include diff --git a/tdecore/tdesycoca.cpp b/tdecore/tdesycoca.cpp index 16914c0bc..8f5ede967 100644 --- a/tdecore/tdesycoca.cpp +++ b/tdecore/tdesycoca.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am index 2911d3ab8..a831eb65c 100644 --- a/tdecore/tests/Makefile.am +++ b/tdecore/tests/Makefile.am @@ -41,7 +41,7 @@ LDADD = ../libtdecore.la tdeconfigtestgui_SOURCES = tdeconfigtestgui.cpp kdebugtest_SOURCES = kdebugtest.cpp klocaletest_SOURCES = klocaletest.cpp -#klocaletest2_SOURCES = klocaletest2.cpp klocale.cpp libintl.cpp kcatalogue.cpp +#klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp #kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp kurltest_SOURCES = kurltest.cpp diff --git a/tdecore/tests/kapptest.cpp b/tdecore/tests/kapptest.cpp index 0952f292c..6a3abace9 100644 --- a/tdecore/tests/kapptest.cpp +++ b/tdecore/tests/kapptest.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include int diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp index 12c9010e2..7dc2cc6d7 100644 --- a/tdecore/tests/kcalendartest.cpp +++ b/tdecore/tests/kcalendartest.cpp @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include class TDELocale; diff --git a/tdecore/tests/kcmdlineargstest.cpp b/tdecore/tests/kcmdlineargstest.cpp index 8148e4208..5213e443f 100644 --- a/tdecore/tests/kcmdlineargstest.cpp +++ b/tdecore/tests/kcmdlineargstest.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/tdecore/tests/kglobaltest.cpp b/tdecore/tests/kglobaltest.cpp index eaab091f9..852e2ba34 100644 --- a/tdecore/tests/kglobaltest.cpp +++ b/tdecore/tests/kglobaltest.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 0647a10d3..36f301d6c 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -11,9 +11,9 @@ #include #include -#include -#include -#include "klocale.h" +#include +#include +#include "tdelocale.h" #include #include #include diff --git a/tdecore/tests/kmdcodectest.cpp b/tdecore/tests/kmdcodectest.cpp index bd3162f52..571d3f10b 100644 --- a/tdecore/tests/kmdcodectest.cpp +++ b/tdecore/tests/kmdcodectest.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp index 6ef0fe5e5..94358a8f1 100644 --- a/tdecore/tests/krfcdatetest.cpp +++ b/tdecore/tests/krfcdatetest.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp index 01a9c4c3a..a1ce8f86b 100644 --- a/tdecore/tests/ksocktest.cpp +++ b/tdecore/tests/ksocktest.cpp @@ -17,7 +17,7 @@ */ #include "kuniqueapplication.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "kdebug.h" #include "ksock.h" #include "ksockaddr.h" diff --git a/tdecore/tests/ktempfiletest.cpp b/tdecore/tests/ktempfiletest.cpp index 20cd6b36d..5c2354fff 100644 --- a/tdecore/tests/ktempfiletest.cpp +++ b/tdecore/tests/ktempfiletest.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ -#include "ktempfile.h" +#include "tdetempfile.h" #include "tdeapplication.h" #include "kstandarddirs.h" #include diff --git a/tdecore/tests/kuniqueapptest.cpp b/tdecore/tests/kuniqueapptest.cpp index 60ac98b5a..13b8ca534 100644 --- a/tdecore/tests/kuniqueapptest.cpp +++ b/tdecore/tests/kuniqueapptest.cpp @@ -17,7 +17,7 @@ */ #include "kuniqueapplication.h" -#include "kglobalsettings.h" +#include "tdeglobalsettings.h" #include #include diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp index 6694d0d80..0f57dd97c 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdecore/tests/startserviceby.cpp b/tdecore/tests/startserviceby.cpp index 20fc95f34..67c535cec 100644 --- a/tdecore/tests/startserviceby.cpp +++ b/tdecore/tests/startserviceby.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include int diff --git a/tdecore/tests/testqtargs.cpp b/tdecore/tests/testqtargs.cpp index 8383f930e..d69b3f6f4 100644 --- a/tdecore/tests/testqtargs.cpp +++ b/tdecore/tests/testqtargs.cpp @@ -46,7 +46,7 @@ application palette (light and dark shades are\ncalculated)."), 0}, #include #include #include -#include +#include static const TDECmdLineOptions options[] = { diff --git a/tdecore/twin.cpp b/tdecore/twin.cpp index 93352dacc..e96c25011 100644 --- a/tdecore/twin.cpp +++ b/tdecore/twin.cpp @@ -37,16 +37,16 @@ #include "twin.h" #include "tdeapplication.h" -#include +#include #include #include #include -#include +#include #include #include #ifdef Q_WS_X11 -#include +#include #include #include diff --git a/tdecore/twinmodule.cpp b/tdecore/twinmodule.cpp index 27b8b0cdd..a37370e58 100644 --- a/tdecore/twinmodule.cpp +++ b/tdecore/twinmodule.cpp @@ -30,7 +30,7 @@ #include "kdebug.h" #include #include -#include +#include #include #include "netwm.h" diff --git a/tdefile-plugins/elf/tdefile_elf.cpp b/tdefile-plugins/elf/tdefile_elf.cpp index cad269713..7308a40d1 100644 --- a/tdefile-plugins/elf/tdefile_elf.cpp +++ b/tdefile-plugins/elf/tdefile_elf.cpp @@ -21,7 +21,7 @@ #include "tdefile_elf.h" #include -#include +#include #include #include #include diff --git a/tdehtml/css/csshelper.cpp b/tdehtml/css/csshelper.cpp index 02b5b3d39..a6ea9c38b 100644 --- a/tdehtml/css/csshelper.cpp +++ b/tdehtml/css/csshelper.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "rendering/render_style.h" diff --git a/tdehtml/css/cssparser.cpp b/tdehtml/css/cssparser.cpp index b33151b59..8b11c78d2 100644 --- a/tdehtml/css/cssparser.cpp +++ b/tdehtml/css/cssparser.cpp @@ -26,7 +26,7 @@ #define YYDEBUG 0 #include -#include +#include #include #include "cssparser.h" diff --git a/tdehtml/css/cssstyleselector.cpp b/tdehtml/css/cssstyleselector.cpp index 2a1fb5477..79f8ba251 100644 --- a/tdehtml/css/cssstyleselector.cpp +++ b/tdehtml/css/cssstyleselector.cpp @@ -57,7 +57,7 @@ using namespace DOM; #include #include -#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp index f1b2b430d..b7bd23de3 100644 --- a/tdehtml/ecma/kjs_debugwin.cpp +++ b/tdehtml/ecma/kjs_debugwin.cpp @@ -41,17 +41,17 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_html.cpp b/tdehtml/ecma/kjs_html.cpp index 8a63ba943..abd059e75 100644 --- a/tdehtml/ecma/kjs_html.cpp +++ b/tdehtml/ecma/kjs_html.cpp @@ -56,9 +56,9 @@ #include "rendering/render_frames.h" #include "rendering/render_layer.h" -#include "kmessagebox.h" +#include "tdemessagebox.h" #include -#include +#include #include diff --git a/tdehtml/ecma/kjs_mozilla.cpp b/tdehtml/ecma/kjs_mozilla.cpp index 6fc7688dd..d26aabb5e 100644 --- a/tdehtml/ecma/kjs_mozilla.cpp +++ b/tdehtml/ecma/kjs_mozilla.cpp @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include #include "kjs_mozilla.h" diff --git a/tdehtml/ecma/kjs_navigator.cpp b/tdehtml/ecma/kjs_navigator.cpp index 03bc22987..296290744 100644 --- a/tdehtml/ecma/kjs_navigator.cpp +++ b/tdehtml/ecma/kjs_navigator.cpp @@ -21,13 +21,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_proxy.cpp b/tdehtml/ecma/kjs_proxy.cpp index 578cd30f0..bdd7183fe 100644 --- a/tdehtml/ecma/kjs_proxy.cpp +++ b/tdehtml/ecma/kjs_proxy.cpp @@ -38,10 +38,10 @@ #include "xml/dom_nodeimpl.h" #include "tdehtmlpart_p.h" #include -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/ecma/kjs_window.cpp b/tdehtml/ecma/kjs_window.cpp index 1d38de27e..554781cb9 100644 --- a/tdehtml/ecma/kjs_window.cpp +++ b/tdehtml/ecma/kjs_window.cpp @@ -36,9 +36,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ #ifndef KONQ_EMBEDDED #include #endif -#include +#include #include #include #include diff --git a/tdehtml/html/dtd.cpp b/tdehtml/html/dtd.cpp index accc8b855..d3ea86d51 100644 --- a/tdehtml/html/dtd.cpp +++ b/tdehtml/html/dtd.cpp @@ -26,7 +26,7 @@ using namespace DOM; #include -#include +#include // priority of tags. Closing tags of higher priority close tags of lower // priority. diff --git a/tdehtml/html/html_documentimpl.cpp b/tdehtml/html/html_documentimpl.cpp index e4f090973..52ada7a7b 100644 --- a/tdehtml/html/html_documentimpl.cpp +++ b/tdehtml/html/html_documentimpl.cpp @@ -47,9 +47,9 @@ #include #include #include -#include +#include #include -#include +#include #include "css/cssproperties.h" #include "css/cssstyleselector.h" diff --git a/tdehtml/html/html_elementimpl.cpp b/tdehtml/html/html_elementimpl.cpp index 1153e8b7f..fc116caf3 100644 --- a/tdehtml/html/html_elementimpl.cpp +++ b/tdehtml/html/html_elementimpl.cpp @@ -50,7 +50,7 @@ #include "xml/dom2_eventsimpl.h" #include -#include +#include #include "html_elementimpl.h" using namespace DOM; diff --git a/tdehtml/html/html_formimpl.cpp b/tdehtml/html/html_formimpl.cpp index 372904e0e..6fae233dd 100644 --- a/tdehtml/html/html_formimpl.cpp +++ b/tdehtml/html/html_formimpl.cpp @@ -47,12 +47,12 @@ #include "rendering/render_form.h" #include -#include +#include #include #include -#include +#include #include -#include +#include #ifndef TDEHTML_NO_WALLET #include #endif diff --git a/tdehtml/html/html_imageimpl.cpp b/tdehtml/html/html_imageimpl.cpp index b1972aad4..a006b3bd0 100644 --- a/tdehtml/html/html_imageimpl.cpp +++ b/tdehtml/html/html_imageimpl.cpp @@ -29,7 +29,7 @@ #include "tdehtml_part.h" #include -#include +#include #include #include "rendering/render_image.h" diff --git a/tdehtml/html/html_tableimpl.cpp b/tdehtml/html/html_tableimpl.cpp index 71fe14773..f14ad8583 100644 --- a/tdehtml/html/html_tableimpl.cpp +++ b/tdehtml/html/html_tableimpl.cpp @@ -43,7 +43,7 @@ #include "rendering/render_table.h" #include -#include +#include using namespace tdehtml; using namespace DOM; diff --git a/tdehtml/html/htmlparser.cpp b/tdehtml/html/htmlparser.cpp index f7cc1daaf..31d3d4c17 100644 --- a/tdehtml/html/htmlparser.cpp +++ b/tdehtml/html/htmlparser.cpp @@ -56,7 +56,7 @@ #include "html/htmlparser.h" #include -#include +#include using namespace DOM; using namespace tdehtml; diff --git a/tdehtml/html/htmltokenizer.cpp b/tdehtml/html/htmltokenizer.cpp index 62d3ffab6..292d1773d 100644 --- a/tdehtml/html/htmltokenizer.cpp +++ b/tdehtml/html/htmltokenizer.cpp @@ -50,7 +50,7 @@ #include "css/csshelper.h" #include "ecma/kjs_proxy.h" #include -#include +#include #include #include #include diff --git a/tdehtml/java/kjavaapplet.cpp b/tdehtml/java/kjavaapplet.cpp index 70a39afbc..a28e541e2 100644 --- a/tdehtml/java/kjavaapplet.cpp +++ b/tdehtml/java/kjavaapplet.cpp @@ -22,7 +22,7 @@ #include "kjavaappletwidget.h" #include "kjavaappletcontext.h" -#include +#include #include #include diff --git a/tdehtml/java/kjavaappletcontext.cpp b/tdehtml/java/kjavaappletcontext.cpp index 76914a5dc..b644b67ca 100644 --- a/tdehtml/java/kjavaappletcontext.cpp +++ b/tdehtml/java/kjavaappletcontext.cpp @@ -23,8 +23,8 @@ #include "kjavaappletserver.h" #include "kjavaprocess.h" #include "kjavaapplet.h" -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/java/kjavaappletserver.cpp b/tdehtml/java/kjavaappletserver.cpp index 5d108ffcf..952fe143b 100644 --- a/tdehtml/java/kjavaappletserver.cpp +++ b/tdehtml/java/kjavaappletserver.cpp @@ -27,13 +27,13 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/java/kjavaappletviewer.cpp b/tdehtml/java/kjavaappletviewer.cpp index 5d5b47fbf..f80690aa9 100644 --- a/tdehtml/java/kjavaappletviewer.cpp +++ b/tdehtml/java/kjavaappletviewer.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/java/kjavaappletwidget.cpp b/tdehtml/java/kjavaappletwidget.cpp index c096261cd..a1f5b8f11 100644 --- a/tdehtml/java/kjavaappletwidget.cpp +++ b/tdehtml/java/kjavaappletwidget.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include diff --git a/tdehtml/java/kjavaprocess.cpp b/tdehtml/java/kjavaprocess.cpp index 1ff68dd74..6b505c343 100644 --- a/tdehtml/java/kjavaprocess.cpp +++ b/tdehtml/java/kjavaprocess.cpp @@ -22,7 +22,7 @@ #include "kjavaprocess.h" #include -#include +#include #include #include diff --git a/tdehtml/misc/arena.cpp b/tdehtml/misc/arena.cpp index cfbce24ab..e2513ba36 100644 --- a/tdehtml/misc/arena.cpp +++ b/tdehtml/misc/arena.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "arena.h" #ifdef HAVE_GETPAGESIZE diff --git a/tdehtml/misc/decoder.cpp b/tdehtml/misc/decoder.cpp index 6000aa9cf..28c8a5e9d 100644 --- a/tdehtml/misc/decoder.cpp +++ b/tdehtml/misc/decoder.cpp @@ -39,12 +39,12 @@ using namespace tdehtml; #include #include -#include +#include #include #include #include -#include +#include diff --git a/tdehtml/misc/htmlhashes.cpp b/tdehtml/misc/htmlhashes.cpp index e073f0964..376007819 100644 --- a/tdehtml/misc/htmlhashes.cpp +++ b/tdehtml/misc/htmlhashes.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include "htmlhashes.h" #include "htmltags.c" diff --git a/tdehtml/misc/htmltags.h b/tdehtml/misc/htmltags.h index d8fbb3236..bf9a8ded8 100644 --- a/tdehtml/misc/htmltags.h +++ b/tdehtml/misc/htmltags.h @@ -5,7 +5,7 @@ #define TDEHTML_TAGS_H #include "dom/dom_string.h" -#include +#include KDE_NO_EXPORT const char* getTagName(unsigned short id); diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp index 0edcc34ea..b8b94cd6b 100644 --- a/tdehtml/misc/knsplugininstaller.cpp +++ b/tdehtml/misc/knsplugininstaller.cpp @@ -24,11 +24,11 @@ #include "knsplugininstaller.moc" #include -#include +#include #include -#include +#include #include -#include +#include #include #include diff --git a/tdehtml/misc/loader.cpp b/tdehtml/misc/loader.cpp index b7f42aa29..7621b5e4f 100644 --- a/tdehtml/misc/loader.cpp +++ b/tdehtml/misc/loader.cpp @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include #include @@ -71,7 +71,7 @@ #ifdef IMAGE_TITLES #include #include -#include +#include #endif #include "html/html_documentimpl.h" diff --git a/tdehtml/misc/loader_jpeg.cpp b/tdehtml/misc/loader_jpeg.cpp index 72816817f..9ee5378f9 100644 --- a/tdehtml/misc/loader_jpeg.cpp +++ b/tdehtml/misc/loader_jpeg.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include extern "C" { #define XMD_H diff --git a/tdehtml/misc/maketags b/tdehtml/misc/maketags index b2b472892..8a6abf0ed 100644 --- a/tdehtml/misc/maketags +++ b/tdehtml/misc/maketags @@ -41,7 +41,7 @@ print header < +#include KDE_NO_EXPORT const char* getTagName(unsigned short id); diff --git a/tdehtml/rendering/font.cpp b/tdehtml/rendering/font.cpp index b7632fc8d..c70073940 100644 --- a/tdehtml/rendering/font.cpp +++ b/tdehtml/rendering/font.cpp @@ -33,7 +33,7 @@ #include "tdehtml_settings.h" #include -#include +#include #include #include diff --git a/tdehtml/rendering/render_applet.cpp b/tdehtml/rendering/render_applet.cpp index d14a93553..eb9762897 100644 --- a/tdehtml/rendering/render_applet.cpp +++ b/tdehtml/rendering/render_applet.cpp @@ -20,7 +20,7 @@ * */ #include -#include +#include #include diff --git a/tdehtml/rendering/render_body.cpp b/tdehtml/rendering/render_body.cpp index 80a613000..820b1b872 100644 --- a/tdehtml/rendering/render_body.cpp +++ b/tdehtml/rendering/render_body.cpp @@ -25,7 +25,7 @@ #include "xml/dom_docimpl.h" #include "tdehtmlview.h" -#include +#include #include using namespace tdehtml; diff --git a/tdehtml/rendering/render_box.cpp b/tdehtml/rendering/render_box.cpp index d138d3ee2..85e1f6665 100644 --- a/tdehtml/rendering/render_box.cpp +++ b/tdehtml/rendering/render_box.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include diff --git a/tdehtml/rendering/render_canvas.cpp b/tdehtml/rendering/render_canvas.cpp index a3dc548b2..862f374b2 100644 --- a/tdehtml/rendering/render_canvas.cpp +++ b/tdehtml/rendering/render_canvas.cpp @@ -29,7 +29,7 @@ #include "tdehtmlview.h" #include "tdehtml_part.h" #include -#include +#include using namespace tdehtml; diff --git a/tdehtml/rendering/render_flow.cpp b/tdehtml/rendering/render_flow.cpp index 272ceb2db..a535b218e 100644 --- a/tdehtml/rendering/render_flow.cpp +++ b/tdehtml/rendering/render_flow.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "rendering/render_flow.h" #include "rendering/render_text.h" diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 89f38a7b2..9d302bfc8 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -30,8 +30,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/rendering/render_frames.cpp b/tdehtml/rendering/render_frames.cpp index 12d0d75ec..68c66495a 100644 --- a/tdehtml/rendering/render_frames.cpp +++ b/tdehtml/rendering/render_frames.cpp @@ -39,9 +39,9 @@ #include "misc/knsplugininstaller.h" #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdehtml/rendering/render_image.cpp b/tdehtml/rendering/render_image.cpp index b41911e3a..ad8f18bb3 100644 --- a/tdehtml/rendering/render_image.cpp +++ b/tdehtml/rendering/render_image.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include "css/csshelper.h" #include "misc/helper.h" diff --git a/tdehtml/rendering/render_inline.cpp b/tdehtml/rendering/render_inline.cpp index aee43a817..15bc1b0df 100644 --- a/tdehtml/rendering/render_inline.cpp +++ b/tdehtml/rendering/render_inline.cpp @@ -23,7 +23,7 @@ * */ -#include +#include #include "rendering/render_arena.h" #include "rendering/render_inline.h" diff --git a/tdehtml/rendering/render_line.cpp b/tdehtml/rendering/render_line.cpp index b518d3a43..d8bc8d0e2 100644 --- a/tdehtml/rendering/render_line.cpp +++ b/tdehtml/rendering/render_line.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "rendering/render_flow.h" #include "rendering/render_text.h" diff --git a/tdehtml/rendering/render_list.cpp b/tdehtml/rendering/render_list.cpp index 5af983a72..cc9ba4e5b 100644 --- a/tdehtml/rendering/render_list.cpp +++ b/tdehtml/rendering/render_list.cpp @@ -35,7 +35,7 @@ #include "xml/dom_docimpl.h" #include -#include +#include #include //#define BOX_DEBUG diff --git a/tdehtml/rendering/render_object.cpp b/tdehtml/rendering/render_object.cpp index 1d16057a2..a979e1dc1 100644 --- a/tdehtml/rendering/render_object.cpp +++ b/tdehtml/rendering/render_object.cpp @@ -45,7 +45,7 @@ #include "misc/loader.h" #include -#include +#include #include #include "tdehtmlview.h" #include diff --git a/tdehtml/rendering/render_object.h b/tdehtml/rendering/render_object.h index 8d066201c..bf120ff84 100644 --- a/tdehtml/rendering/render_object.h +++ b/tdehtml/rendering/render_object.h @@ -32,7 +32,7 @@ #include #include -#include +#include #include "xml/dom_docimpl.h" #include "misc/tdehtmllayout.h" diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp index 5a96d06f0..2d991c3a2 100644 --- a/tdehtml/rendering/render_replaced.cpp +++ b/tdehtml/rendering/render_replaced.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdehtml/rendering/render_table.cpp b/tdehtml/rendering/render_table.cpp index 8a75c73f2..9f2cc3366 100644 --- a/tdehtml/rendering/render_table.cpp +++ b/tdehtml/rendering/render_table.cpp @@ -40,7 +40,7 @@ #include "rendering/render_line.h" #include "xml/dom_docimpl.h" -#include +#include #include #include diff --git a/tdehtml/rendering/render_text.cpp b/tdehtml/rendering/render_text.cpp index d125b04c6..411f3f221 100644 --- a/tdehtml/rendering/render_text.cpp +++ b/tdehtml/rendering/render_text.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/rendering/table_layout.cpp b/tdehtml/rendering/table_layout.cpp index eb8153331..97a6a4c91 100644 --- a/tdehtml/rendering/table_layout.cpp +++ b/tdehtml/rendering/table_layout.cpp @@ -23,7 +23,7 @@ #include "table_layout.h" #include "render_table.h" -#include +#include using namespace tdehtml; diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp index 3cc65676d..b7dfb8a42 100644 --- a/tdehtml/tdehtml_ext.cpp +++ b/tdehtml/tdehtml_ext.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/tdehtml_factory.cpp b/tdehtml/tdehtml_factory.cpp index b52476ea1..4094030c6 100644 --- a/tdehtml/tdehtml_factory.cpp +++ b/tdehtml/tdehtml_factory.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include diff --git a/tdehtml/tdehtml_pagecache.cpp b/tdehtml/tdehtml_pagecache.cpp index c2e0a89e1..319dd8162 100644 --- a/tdehtml/tdehtml_pagecache.cpp +++ b/tdehtml/tdehtml_pagecache.cpp @@ -21,7 +21,7 @@ #include "tdehtml_pagecache.h" #include -#include +#include #include #include diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index c4bba759c..28b15c7d1 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -78,18 +78,18 @@ using namespace DOM; #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/tdehtml_printsettings.cpp b/tdehtml/tdehtml_printsettings.cpp index 251c3403f..19fe7bdbf 100644 --- a/tdehtml/tdehtml_printsettings.cpp +++ b/tdehtml/tdehtml_printsettings.cpp @@ -19,7 +19,7 @@ #include "tdehtml_printsettings.h" -#include +#include #include #include #include diff --git a/tdehtml/tdehtml_run.cpp b/tdehtml/tdehtml_run.cpp index 2a5fd1861..499616cce 100644 --- a/tdehtml/tdehtml_run.cpp +++ b/tdehtml/tdehtml_run.cpp @@ -24,7 +24,7 @@ #include "tdehtml_run.h" #include #include -#include +#include #include "tdehtml_ext.h" #include diff --git a/tdehtml/tdehtml_settings.cc b/tdehtml/tdehtml_settings.cc index 8e36f5891..7f799e311 100644 --- a/tdehtml/tdehtml_settings.cc +++ b/tdehtml/tdehtml_settings.cc @@ -21,14 +21,14 @@ #include "tdehtml_settings.h" #include "tdehtmldefaults.h" -#include +#include #include -#include -#include +#include +#include #include #include #include -#include +#include /** * @internal diff --git a/tdehtml/tdehtmlimage.cpp b/tdehtml/tdehtmlimage.cpp index bf05d8495..31311cb3d 100644 --- a/tdehtml/tdehtmlimage.cpp +++ b/tdehtml/tdehtmlimage.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include K_EXPORT_COMPONENT_FACTORY( tdehtmlimagefactory /*NOT the part name, see Makefile.am*/, TDEHTMLImageFactory ) diff --git a/tdehtml/tdehtmlview.cpp b/tdehtml/tdehtmlview.cpp index 010075f2a..16b274cbd 100644 --- a/tdehtml/tdehtmlview.cpp +++ b/tdehtml/tdehtmlview.cpp @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdehtml/tdemultipart/tdemultipart.cpp b/tdehtml/tdemultipart/tdemultipart.cpp index dd864d65b..201f1ef60 100644 --- a/tdehtml/tdemultipart/tdemultipart.cpp +++ b/tdehtml/tdemultipart/tdemultipart.cpp @@ -22,11 +22,11 @@ #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp index 028fadc36..62842e086 100644 --- a/tdehtml/test_regression.cpp +++ b/tdehtml/test_regression.cpp @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdehtml/xml/dom_docimpl.cpp b/tdehtml/xml/dom_docimpl.cpp index 47836b41e..423a2a51e 100644 --- a/tdehtml/xml/dom_docimpl.cpp +++ b/tdehtml/xml/dom_docimpl.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include "rendering/counter_tree.h" @@ -60,7 +60,7 @@ #include "tdehtmlview.h" #include "tdehtml_part.h" -#include +#include #include #include #include "tdehtml_settings.h" diff --git a/tdehtml/xml/dom_nodeimpl.cpp b/tdehtml/xml/dom_nodeimpl.cpp index ac8ca630e..7e2e1bc5f 100644 --- a/tdehtml/xml/dom_nodeimpl.cpp +++ b/tdehtml/xml/dom_nodeimpl.cpp @@ -33,7 +33,7 @@ #include "xml/dom_nodeimpl.h" #include "xml/dom_restyler.h" -#include +#include #include #include "rendering/render_text.h" diff --git a/tdehtml/xml/xml_tokenizer.cpp b/tdehtml/xml/xml_tokenizer.cpp index 44f90673f..2ee90097b 100644 --- a/tdehtml/xml/xml_tokenizer.cpp +++ b/tdehtml/xml/xml_tokenizer.cpp @@ -36,7 +36,7 @@ #include "tdehtml_part.h" #include #include -#include +#include using namespace DOM; using namespace tdehtml; diff --git a/tdeio/bookmarks/kbookmark.cc b/tdeio/bookmarks/kbookmark.cc index e6bef2e02..8bbaa5e43 100644 --- a/tdeio/bookmarks/kbookmark.cc +++ b/tdeio/bookmarks/kbookmark.cc @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkexporter.cc b/tdeio/bookmarks/kbookmarkexporter.cc index 30c52bdb8..ee33612a2 100644 --- a/tdeio/bookmarks/kbookmarkexporter.cc +++ b/tdeio/bookmarks/kbookmarkexporter.cc @@ -24,7 +24,7 @@ #include #include -#include +#include #include "kbookmarkmanager.h" #include "kbookmarkexporter.h" diff --git a/tdeio/bookmarks/kbookmarkimporter.cc b/tdeio/bookmarks/kbookmarkimporter.cc index 366802905..513f89b40 100644 --- a/tdeio/bookmarks/kbookmarkimporter.cc +++ b/tdeio/bookmarks/kbookmarkimporter.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_crash.cc b/tdeio/bookmarks/kbookmarkimporter_crash.cc index 0443b3b1c..9b0cacf25 100644 --- a/tdeio/bookmarks/kbookmarkimporter_crash.cc +++ b/tdeio/bookmarks/kbookmarkimporter_crash.cc @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_ie.cc b/tdeio/bookmarks/kbookmarkimporter_ie.cc index 092ebe596..d588517a3 100644 --- a/tdeio/bookmarks/kbookmarkimporter_ie.cc +++ b/tdeio/bookmarks/kbookmarkimporter_ie.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_kde1.cc b/tdeio/bookmarks/kbookmarkimporter_kde1.cc index 6aca22b84..95937f890 100644 --- a/tdeio/bookmarks/kbookmarkimporter_kde1.cc +++ b/tdeio/bookmarks/kbookmarkimporter_kde1.cc @@ -21,7 +21,7 @@ #include "kbookmarkimporter_kde1.h" #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_ns.cc b/tdeio/bookmarks/kbookmarkimporter_ns.cc index 8ce06a79b..29960ce51 100644 --- a/tdeio/bookmarks/kbookmarkimporter_ns.cc +++ b/tdeio/bookmarks/kbookmarkimporter_ns.cc @@ -25,7 +25,7 @@ #include "kbookmarkmanager.h" #include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkimporter_opera.cc b/tdeio/bookmarks/kbookmarkimporter_opera.cc index 57b5d6208..0609c7a3b 100644 --- a/tdeio/bookmarks/kbookmarkimporter_opera.cc +++ b/tdeio/bookmarks/kbookmarkimporter_opera.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/bookmarks/kbookmarkmanager.cc b/tdeio/bookmarks/kbookmarkmanager.cc index 205d879ab..60d4f2932 100644 --- a/tdeio/bookmarks/kbookmarkmanager.cc +++ b/tdeio/bookmarks/kbookmarkmanager.cc @@ -29,9 +29,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkmenu.cc b/tdeio/bookmarks/kbookmarkmenu.cc index 0468bcd5a..e1b00bc40 100644 --- a/tdeio/bookmarks/kbookmarkmenu.cc +++ b/tdeio/bookmarks/kbookmarkmenu.cc @@ -32,8 +32,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/bookmarks/kbookmarkmenu.h b/tdeio/bookmarks/kbookmarkmenu.h index 0c1ebb27c..aeed441b0 100644 --- a/tdeio/bookmarks/kbookmarkmenu.h +++ b/tdeio/bookmarks/kbookmarkmenu.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include "kbookmark.h" diff --git a/tdeio/bookmarks/kbookmarkmenu_p.h b/tdeio/bookmarks/kbookmarkmenu_p.h index fc34e9029..b47af8ebf 100644 --- a/tdeio/bookmarks/kbookmarkmenu_p.h +++ b/tdeio/bookmarks/kbookmarkmenu_p.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include "kbookmark.h" diff --git a/tdeio/httpfilter/httpfilter.cc b/tdeio/httpfilter/httpfilter.cc index 21086d613..0f6a45790 100644 --- a/tdeio/httpfilter/httpfilter.cc +++ b/tdeio/httpfilter/httpfilter.cc @@ -19,7 +19,7 @@ #include -#include +#include #include "httpfilter.h" diff --git a/tdeio/kpasswdserver/kpasswdserver.cpp b/tdeio/kpasswdserver/kpasswdserver.cpp index 4986eb45a..cf4e0530c 100644 --- a/tdeio/kpasswdserver/kpasswdserver.cpp +++ b/tdeio/kpasswdserver/kpasswdserver.cpp @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/kssl/kssl.cc b/tdeio/kssl/kssl.cc index 66cc503d5..874da6aa6 100644 --- a/tdeio/kssl/kssl.cc +++ b/tdeio/kssl/kssl.cc @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #define sk_dup d->kossl->sk_dup diff --git a/tdeio/kssl/ksslcertdlg.cc b/tdeio/kssl/ksslcertdlg.cc index ea3c29556..26550e715 100644 --- a/tdeio/kssl/ksslcertdlg.cc +++ b/tdeio/kssl/ksslcertdlg.cc @@ -30,9 +30,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeio/kssl/ksslcertificate.cc b/tdeio/kssl/ksslcertificate.cc index e7310ccdc..1f95c3912 100644 --- a/tdeio/kssl/ksslcertificate.cc +++ b/tdeio/kssl/ksslcertificate.cc @@ -37,9 +37,9 @@ #include #include -#include +#include #include -#include +#include #include diff --git a/tdeio/kssl/ksslinfodlg.cc b/tdeio/kssl/ksslinfodlg.cc index 03a1300e8..7567b8595 100644 --- a/tdeio/kssl/ksslinfodlg.cc +++ b/tdeio/kssl/ksslinfodlg.cc @@ -31,11 +31,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeio/kssl/ksslkeygen.cc b/tdeio/kssl/ksslkeygen.cc index 93d6d2da4..654444994 100644 --- a/tdeio/kssl/ksslkeygen.cc +++ b/tdeio/kssl/ksslkeygen.cc @@ -25,12 +25,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include diff --git a/tdeio/kssl/ksslpemcallback.cc b/tdeio/kssl/ksslpemcallback.cc index 2dfbb9146..207949a0c 100644 --- a/tdeio/kssl/ksslpemcallback.cc +++ b/tdeio/kssl/ksslpemcallback.cc @@ -23,7 +23,7 @@ #endif #include -#include +#include #include "ksslpemcallback.h" int KSSLPemCallback(char *buf, int size, int rwflag, void *userdata) { diff --git a/tdeio/kssl/ksslpkcs12.cc b/tdeio/kssl/ksslpkcs12.cc index b8b23cf1c..9521e907b 100644 --- a/tdeio/kssl/ksslpkcs12.cc +++ b/tdeio/kssl/ksslpkcs12.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/kssl/ksslpkcs7.cc b/tdeio/kssl/ksslpkcs7.cc index 8db0000f0..cb66eb468 100644 --- a/tdeio/kssl/ksslpkcs7.cc +++ b/tdeio/kssl/ksslpkcs7.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/kssl/ksslsettings.cc b/tdeio/kssl/ksslsettings.cc index 9895a702b..fbf10b476 100644 --- a/tdeio/kssl/ksslsettings.cc +++ b/tdeio/kssl/ksslsettings.cc @@ -33,7 +33,7 @@ #include #include "ksslsettings.h" -#include +#include #include #include diff --git a/tdeio/kssl/ksslutils.cc b/tdeio/kssl/ksslutils.cc index 80651757f..444e5dd4a 100644 --- a/tdeio/kssl/ksslutils.cc +++ b/tdeio/kssl/ksslutils.cc @@ -22,8 +22,8 @@ #include "ksslutils.h" #include -#include -#include +#include +#include #include #include "kopenssl.h" diff --git a/tdeio/misc/kpac/discovery.cpp b/tdeio/misc/kpac/discovery.cpp index 4f33d1389..533c4fcca 100644 --- a/tdeio/misc/kpac/discovery.cpp +++ b/tdeio/misc/kpac/discovery.cpp @@ -41,7 +41,7 @@ #include -#include +#include #include #include diff --git a/tdeio/misc/kpac/downloader.cpp b/tdeio/misc/kpac/downloader.cpp index c94cc9b72..483e836cb 100644 --- a/tdeio/misc/kpac/downloader.cpp +++ b/tdeio/misc/kpac/downloader.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include "downloader.moc" diff --git a/tdeio/misc/kpac/proxyscout.cpp b/tdeio/misc/kpac/proxyscout.cpp index a010d328e..dfb682005 100644 --- a/tdeio/misc/kpac/proxyscout.cpp +++ b/tdeio/misc/kpac/proxyscout.cpp @@ -23,9 +23,9 @@ #include #include -#include +#include #include -#include +#include #include "proxyscout.moc" #include "discovery.h" diff --git a/tdeio/misc/kssld/kssld.cpp b/tdeio/misc/kssld/kssld.cpp index d41041636..d47845bbb 100644 --- a/tdeio/misc/kssld/kssld.cpp +++ b/tdeio/misc/kssld/kssld.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/misc/tdefile/fileprops.cpp b/tdeio/misc/tdefile/fileprops.cpp index df210fa4d..aa6590ef5 100644 --- a/tdeio/misc/tdefile/fileprops.cpp +++ b/tdeio/misc/tdefile/fileprops.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "fileprops.h" diff --git a/tdeio/misc/tdemailservice.cpp b/tdeio/misc/tdemailservice.cpp index 2d256c5c9..23066d633 100644 --- a/tdeio/misc/tdemailservice.cpp +++ b/tdeio/misc/tdemailservice.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include #include static const TDECmdLineOptions options[] = diff --git a/tdeio/misc/tdesendbugmail/main.cpp b/tdeio/misc/tdesendbugmail/main.cpp index aaffd3b65..32465039d 100644 --- a/tdeio/misc/tdesendbugmail/main.cpp +++ b/tdeio/misc/tdesendbugmail/main.cpp @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/misc/tdetelnetservice.cpp b/tdeio/misc/tdetelnetservice.cpp index 99260d8d0..bf175bdc9 100644 --- a/tdeio/misc/tdetelnetservice.cpp +++ b/tdeio/misc/tdetelnetservice.cpp @@ -22,10 +22,10 @@ // $Id$ #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/misc/tdewalletd/tdewalletd.cpp b/tdeio/misc/tdewalletd/tdewalletd.cpp index 364197b72..126f0ce2b 100644 --- a/tdeio/misc/tdewalletd/tdewalletd.cpp +++ b/tdeio/misc/tdewalletd/tdewalletd.cpp @@ -32,9 +32,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeio/misc/tdewalletd/tdewalletwizard.ui b/tdeio/misc/tdewalletd/tdewalletwizard.ui index aa3a1c09d..c31062c2a 100644 --- a/tdeio/misc/tdewalletd/tdewalletwizard.ui +++ b/tdeio/misc/tdewalletd/tdewalletwizard.ui @@ -531,7 +531,7 @@ tqcheckbox.h - klocale.h + tdelocale.h tdewalletwizard.ui.h diff --git a/tdeio/misc/uiserver.cpp b/tdeio/misc/uiserver.cpp index 107b57c64..c23628eae 100644 --- a/tdeio/misc/uiserver.cpp +++ b/tdeio/misc/uiserver.cpp @@ -31,12 +31,12 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/CMakeLists.txt b/tdeio/tdefile/CMakeLists.txt index a69cad536..ed0350999 100644 --- a/tdeio/tdefile/CMakeLists.txt +++ b/tdeio/tdefile/CMakeLists.txt @@ -31,7 +31,7 @@ include_directories( install( FILES tdefiledialog.h kencodingfiledialog.h - kdiroperator.h tdefileview.h tdefilefiltercombo.h + tdediroperator.h tdefileview.h tdefilefiltercombo.h tdefiledetailview.h kcombiview.h kdiskfreesp.h tdefileiconview.h tderecentdocument.h kurlrequester.h tdefilepreview.h tdefile.h @@ -56,7 +56,7 @@ set( target tdefile ) set( ${target}_SRCS tdefilefiltercombo.cpp tdefileview.cpp tdefileiconview.cpp - tderecentdocument.cpp tdefiledialog.cpp kdiroperator.cpp + tderecentdocument.cpp tdefiledialog.cpp tdediroperator.cpp tdefiledetailview.cpp kcombiview.cpp kurlrequester.cpp tdefilepreview.cpp kurlcombobox.cpp kurlrequesterdlg.cpp kopenwith.cpp kpropertiesdialog.cpp kicondialog.cpp diff --git a/tdeio/tdefile/ChangeLog b/tdeio/tdefile/ChangeLog index ccfb45ab5..229f9f2f8 100644 --- a/tdeio/tdefile/ChangeLog +++ b/tdeio/tdefile/ChangeLog @@ -1,6 +1,6 @@ Sat Feb 26 00:26:55 2000 Carsten Pfeiffer - * kdiroperator.cpp: + * tdediroperator.cpp: lottsa changes, e.g. action handling more clear now. fixed completed item not clearning the previous selection @@ -17,7 +17,7 @@ Sat Feb 26 00:26:55 2000 Carsten Pfeiffer Sun Feb 20 01:50:44 2000 Carsten Pfeiffer - * kdiroperator.*, tdefiledialog.* (saveConfig): + * tdediroperator.*, tdefiledialog.* (saveConfig): implemented loading, saving and applying configuration * tdefiledialog.cpp (setURL): @@ -37,7 +37,7 @@ Thu Feb 17 19:09:54 2000 Carsten Pfeiffer Added KDirComboBox and replaced the directory combobox with it. It even does something now :) Items need to be indented tho. - * tdefilereader.cpp, kdiroperator.{cpp,h}: + * tdefilereader.cpp, tdediroperator.{cpp,h}: fixed showHidden default Tue Feb 15 14:21:41 2000 Carsten Pfeiffer @@ -60,7 +60,7 @@ Tue Feb 15 14:21:41 2000 Carsten Pfeiffer added static methods for multiselection added getOpenURL(), getOpenURLs and getSaveURL() - * kdiroperator.cpp (setSorting): + * tdediroperator.cpp (setSorting): added setSorting() and sorting() to keep sorting when switching views a few cosmetic and TDEAction changes @@ -86,7 +86,7 @@ Fri Feb 11 12:17:59 2000 Carsten Pfeiffer Thu Feb 10 17:06:36 2000 Carsten Pfeiffer - * kdiroperator.cpp (connectView): + * tdediroperator.cpp (connectView): - Now that TDEToggleAction is fixed, I can commit the new stuff: Offer Actions for all the common functionality, i.e. sorting, setting the view, home(), cdUp(), back, forward, etc. @@ -107,7 +107,7 @@ Thu Feb 10 17:06:36 2000 Carsten Pfeiffer Thu Feb 10 12:59:29 2000 Carsten Pfeiffer - * kdiroperator.cpp (insertNewFiles): + * tdediroperator.cpp (insertNewFiles): aahhh, finally fixed that infinite loop in KFileView::mergeLists clear the view before calling view->addItemList( currentContents ); @@ -173,7 +173,7 @@ Sat Jan 29 15:33:37 2000 Carsten Pfeiffer * tdefileviewitem.cpp: - added time_t mTime() to enable sorting by modification time - * kdiroperator.cpp: + * tdediroperator.cpp: - offer sorting options in popupmenu - use checkAccess before creating directories. I guess this will again change when the new kio will be used, tho. diff --git a/tdeio/tdefile/Makefile.am b/tdeio/tdefile/Makefile.am index 4e6b76ce1..857e843c5 100644 --- a/tdeio/tdefile/Makefile.am +++ b/tdeio/tdefile/Makefile.am @@ -27,7 +27,7 @@ METASOURCES = AUTO #SUBDIRS = . acl_prop_page include_HEADERS = tdefiledialog.h kencodingfiledialog.h\ - kdiroperator.h tdefileview.h tdefilefiltercombo.h \ + tdediroperator.h tdefileview.h tdefilefiltercombo.h \ tdefiledetailview.h kcombiview.h kdiskfreesp.h \ tdefileiconview.h tderecentdocument.h \ kurlrequester.h tdefilepreview.h tdefile.h \ @@ -44,7 +44,7 @@ noinst_HEADERS = config-tdefile.h tderecentdirs.h kmetaprops.h \ libtdefile_la_SOURCES = \ tdefilefiltercombo.cpp \ tdefileview.cpp tdefileiconview.cpp \ - tderecentdocument.cpp tdefiledialog.cpp kdiroperator.cpp \ + tderecentdocument.cpp tdefiledialog.cpp tdediroperator.cpp \ tdefiledetailview.cpp kcombiview.cpp kurlrequester.cpp \ tdefilepreview.cpp kurlcombobox.cpp kurlrequesterdlg.cpp \ kopenwith.cpp kpropertiesdialog.cpp kicondialog.cpp kdirsize.cpp \ diff --git a/tdeio/tdefile/kacleditwidget.cpp b/tdeio/tdefile/kacleditwidget.cpp index 01eb8bcb8..7e8e3dae2 100644 --- a/tdeio/tdefile/kacleditwidget.cpp +++ b/tdeio/tdefile/kacleditwidget.cpp @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kcombiview.cpp b/tdeio/tdefile/kcombiview.cpp index 13830ab01..4c4f0cb06 100644 --- a/tdeio/tdefile/kcombiview.cpp +++ b/tdeio/tdefile/kcombiview.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include diff --git a/tdeio/tdefile/kcombiview.h b/tdeio/tdefile/kcombiview.h index 995b80ffc..af3680571 100644 --- a/tdeio/tdefile/kcombiview.h +++ b/tdeio/tdefile/kcombiview.h @@ -23,7 +23,7 @@ #define _KCOMBIVIEW_H #include -#include +#include #include #include diff --git a/tdeio/tdefile/kcustommenueditor.cpp b/tdeio/tdefile/kcustommenueditor.cpp index 65455aef0..b59108071 100644 --- a/tdeio/tdefile/kcustommenueditor.cpp +++ b/tdeio/tdefile/kcustommenueditor.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/kdiroperator.cpp b/tdeio/tdefile/kdiroperator.cpp index 1ae03daec..dc44aa8ba 100644 --- a/tdeio/tdefile/kdiroperator.cpp +++ b/tdeio/tdefile/kdiroperator.cpp @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ #include "config-tdefile.h" #include "kcombiview.h" -#include "kdiroperator.h" +#include "tdediroperator.h" #include "tdefiledetailview.h" #include "tdefileiconview.h" #include "tdefilepreview.h" @@ -1737,4 +1737,4 @@ TQString KDirOperator::viewConfigGroup() const void KDirOperator::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "kdiroperator.moc" +#include "tdediroperator.moc" diff --git a/tdeio/tdefile/kdirselectdialog.cpp b/tdeio/tdefile/kdirselectdialog.cpp index 39959229d..5027f631c 100644 --- a/tdeio/tdefile/kdirselectdialog.cpp +++ b/tdeio/tdefile/kdirselectdialog.cpp @@ -29,9 +29,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "tdefiletreeview.h" #include "kdirselectdialog.h" diff --git a/tdeio/tdefile/kdirsize.cpp b/tdeio/tdefile/kdirsize.cpp index c2ea4079a..b2d48b4bf 100644 --- a/tdeio/tdefile/kdirsize.cpp +++ b/tdeio/tdefile/kdirsize.cpp @@ -19,7 +19,7 @@ #include "kdirsize.h" #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kencodingfiledialog.cpp b/tdeio/tdefile/kencodingfiledialog.cpp index a49210642..d2d588a4e 100644 --- a/tdeio/tdefile/kencodingfiledialog.cpp +++ b/tdeio/tdefile/kencodingfiledialog.cpp @@ -24,11 +24,11 @@ #include "kencodingfiledialog.h" #include #include -#include -#include +#include +#include #include #include -#include +#include #include struct KEncodingFileDialogPrivate diff --git a/tdeio/tdefile/kicondialog.cpp b/tdeio/tdefile/kicondialog.cpp index 9d7975e2b..154f9e89d 100644 --- a/tdeio/tdefile/kicondialog.cpp +++ b/tdeio/tdefile/kicondialog.cpp @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/kimagefilepreview.cpp b/tdeio/tdefile/kimagefilepreview.cpp index a1ce7d6b3..f96be72fc 100644 --- a/tdeio/tdefile/kimagefilepreview.cpp +++ b/tdeio/tdefile/kimagefilepreview.cpp @@ -16,12 +16,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kmetaprops.cpp b/tdeio/tdefile/kmetaprops.cpp index ce6201177..21c75e0ce 100644 --- a/tdeio/tdefile/kmetaprops.cpp +++ b/tdeio/tdefile/kmetaprops.cpp @@ -23,9 +23,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/tdeio/tdefile/knotifydialog.cpp b/tdeio/tdefile/knotifydialog.cpp index f23ac78e4..8397a5e74 100644 --- a/tdeio/tdefile/knotifydialog.cpp +++ b/tdeio/tdefile/knotifydialog.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/knotifydialog.h b/tdeio/tdefile/knotifydialog.h index f31815e34..c8b5b21ac 100644 --- a/tdeio/tdefile/knotifydialog.h +++ b/tdeio/tdefile/knotifydialog.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "knotifywidgetbase.h" diff --git a/tdeio/tdefile/kopenwith.cpp b/tdeio/tdefile/kopenwith.cpp index 5a855de21..5db8b79d9 100644 --- a/tdeio/tdefile/kopenwith.cpp +++ b/tdeio/tdefile/kopenwith.cpp @@ -39,9 +39,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kpreviewprops.cpp b/tdeio/tdefile/kpreviewprops.cpp index a053d5627..c45330893 100644 --- a/tdeio/tdefile/kpreviewprops.cpp +++ b/tdeio/tdefile/kpreviewprops.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include class KPreviewPropsPlugin::KPreviewPropsPluginPrivate { diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index 389115a3c..87d3926b3 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -96,9 +96,9 @@ extern "C" { #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -109,7 +109,7 @@ extern "C" { #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp index 46b096c2b..2aa79353f 100644 --- a/tdeio/tdefile/kurlbar.cpp +++ b/tdeio/tdefile/kurlbar.cpp @@ -33,12 +33,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kurlcombobox.cpp b/tdeio/tdefile/kurlcombobox.cpp index 150e64b34..66fe8efb8 100644 --- a/tdeio/tdefile/kurlcombobox.cpp +++ b/tdeio/tdefile/kurlcombobox.cpp @@ -20,9 +20,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdefile/kurlrequester.cpp b/tdeio/tdefile/kurlrequester.cpp index 9a76a69a6..7ecfd543d 100644 --- a/tdeio/tdefile/kurlrequester.cpp +++ b/tdeio/tdefile/kurlrequester.cpp @@ -30,10 +30,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/kurlrequesterdlg.cpp b/tdeio/tdefile/kurlrequesterdlg.cpp index d1e9ec109..1a040a656 100644 --- a/tdeio/tdefile/kurlrequesterdlg.cpp +++ b/tdeio/tdefile/kurlrequesterdlg.cpp @@ -28,10 +28,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefiledetailview.cpp b/tdeio/tdefile/tdefiledetailview.cpp index b3c44250e..e267bdb60 100644 --- a/tdeio/tdefile/tdefiledetailview.cpp +++ b/tdeio/tdefile/tdefiledetailview.cpp @@ -27,11 +27,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdefile/tdefiledialog.cpp b/tdeio/tdefile/tdefiledialog.cpp index 8db764724..03bc17757 100644 --- a/tdeio/tdefile/tdefiledialog.cpp +++ b/tdeio/tdefile/tdefiledialog.cpp @@ -50,16 +50,16 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -83,7 +83,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/tdefile/tdefilefiltercombo.cpp b/tdeio/tdefile/tdefilefiltercombo.cpp index cd7bd54d3..ed41f8f82 100644 --- a/tdeio/tdefile/tdefilefiltercombo.cpp +++ b/tdeio/tdefile/tdefilefiltercombo.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefileiconview.cpp b/tdeio/tdefile/tdefileiconview.cpp index 131485273..92bbeba41 100644 --- a/tdeio/tdefile/tdefileiconview.cpp +++ b/tdeio/tdefile/tdefileiconview.cpp @@ -31,10 +31,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdefile/tdefilemetainfowidget.cpp b/tdeio/tdefile/tdefilemetainfowidget.cpp index dea9ea353..50fef856b 100644 --- a/tdeio/tdefile/tdefilemetainfowidget.cpp +++ b/tdeio/tdefile/tdefilemetainfowidget.cpp @@ -21,7 +21,7 @@ #include "tdefilemetainfowidget.h" #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefilepreview.cpp b/tdeio/tdefile/tdefilepreview.cpp index 57543ea8c..acec61475 100644 --- a/tdeio/tdefile/tdefilepreview.cpp +++ b/tdeio/tdefile/tdefilepreview.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include diff --git a/tdeio/tdefile/tdefilesharedlg.cpp b/tdeio/tdefile/tdefilesharedlg.cpp index 6204fa6bb..a2fb01c2c 100644 --- a/tdeio/tdefile/tdefilesharedlg.cpp +++ b/tdeio/tdefile/tdefilesharedlg.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -39,7 +39,7 @@ #include #include #include -#include +#include class KFileSharePropsPlugin::Private { diff --git a/tdeio/tdefile/tdefilespeedbar.cpp b/tdeio/tdefile/tdefilespeedbar.cpp index defcb2157..6f3365a5f 100644 --- a/tdeio/tdefile/tdefilespeedbar.cpp +++ b/tdeio/tdefile/tdefilespeedbar.cpp @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefiletreeview.cpp b/tdeio/tdefile/tdefiletreeview.cpp index 6138b3863..cb7432423 100644 --- a/tdeio/tdefile/tdefiletreeview.cpp +++ b/tdeio/tdefile/tdefiletreeview.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tdefileview.cpp b/tdeio/tdefile/tdefileview.cpp index 63c973723..f171975d8 100644 --- a/tdeio/tdefile/tdefileview.cpp +++ b/tdeio/tdefile/tdefileview.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include "config-tdefile.h" diff --git a/tdeio/tdefile/tderecentdirs.cpp b/tdeio/tdefile/tderecentdirs.cpp index 12c2b6477..0548261dd 100644 --- a/tdeio/tdefile/tderecentdirs.cpp +++ b/tdeio/tdefile/tderecentdirs.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #define MAX_DIR_HISTORY 3 diff --git a/tdeio/tdefile/tests/kcustommenueditortest.cpp b/tdeio/tdefile/tests/kcustommenueditortest.cpp index 3d95b6c9f..9e2189406 100644 --- a/tdeio/tdefile/tests/kcustommenueditortest.cpp +++ b/tdeio/tdefile/tests/kcustommenueditortest.cpp @@ -1,6 +1,6 @@ #include "kcustommenueditor.h" #include -#include +#include #include int main(int argc, char** argv) diff --git a/tdeio/tdefile/tests/kdirselectdialogtest.cpp b/tdeio/tdefile/tests/kdirselectdialogtest.cpp index 0c2209d31..c1178c3bc 100644 --- a/tdeio/tdefile/tests/kdirselectdialogtest.cpp +++ b/tdeio/tdefile/tests/kdirselectdialogtest.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include int main( int argc, char **argv ) diff --git a/tdeio/tdefile/tests/kfdtest.cpp b/tdeio/tdefile/tests/kfdtest.cpp index baf82725f..ce7127d9e 100644 --- a/tdeio/tdefile/tests/kfdtest.cpp +++ b/tdeio/tdefile/tests/kfdtest.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name ) diff --git a/tdeio/tdefile/tests/kfstest.cpp b/tdeio/tdefile/tests/kfstest.cpp index c57e3678e..ada8d825e 100644 --- a/tdeio/tdefile/tests/kfstest.cpp +++ b/tdeio/tdefile/tests/kfstest.cpp @@ -30,12 +30,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp index 529d12dda..9ff0199dc 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/CMakeLists.txt b/tdeio/tdeio/CMakeLists.txt index 8aaf395b6..e2b96ebb1 100644 --- a/tdeio/tdeio/CMakeLists.txt +++ b/tdeio/tdeio/CMakeLists.txt @@ -41,8 +41,8 @@ install( FILES kurlcompletion.h kshellcompletion.h tdefileitem.h tdefileshare.h ksambashare.h knfsshare.h kdirlister.h kservicegroup.h kimageio.h kdirnotify.h kdirnotify_stub.h - kurlpixmapprovider.h kprotocolinfo.h kprotocolmanager.h - kfilterbase.h kfilterdev.h kemailsettings.h kscan.h + kurlpixmapprovider.h kprotocolinfo.h tdeprotocolmanager.h + kfilterbase.h kfilterdev.h tdeemailsettings.h kscan.h kdatatool.h karchive.h tdefilefilter.h tdefilemetainfo.h renamedlgplugin.h kmimetyperesolver.h kdcopservicestarter.h kremoteencoding.h kmimetypechooser.h @@ -71,7 +71,7 @@ install( FILES set( target tdeiocore ) set( ${target}_SRCS - authinfo.cpp kshred.cpp kprotocolmanager.cpp slave.cpp + authinfo.cpp kshred.cpp tdeprotocolmanager.cpp slave.cpp slaveinterface.cpp observer.stub sessiondata.cpp scheduler.cpp connection.cpp job.cpp global.cpp slaveconfig.cpp kurlpixmapprovider.cpp netaccess.cpp @@ -79,7 +79,7 @@ set( ${target}_SRCS slavebase.cpp passdlg.cpp forwardingslavebase.cpp progressbase.cpp defaultprogress.cpp statusbarprogress.cpp kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp - observer.cpp ../misc/uiserver.stub observer.skel kemailsettings.cpp + observer.cpp ../misc/uiserver.stub observer.skel tdeemailsettings.cpp kprotocolinfo.cpp renamedlg.cpp skipdlg.cpp kremoteencoding.cpp kmimetypechooser.cpp ) diff --git a/tdeio/tdeio/Makefile.am b/tdeio/tdeio/Makefile.am index f0766f5c8..587cfe511 100644 --- a/tdeio/tdeio/Makefile.am +++ b/tdeio/tdeio/Makefile.am @@ -53,8 +53,8 @@ include_HEADERS = \ kshellcompletion.h tdefileitem.h tdefileshare.h ksambashare.h knfsshare.h \ kdirlister.h kservicegroup.h \ kimageio.h kdirnotify.h kdirnotify_stub.h \ - kurlpixmapprovider.h kprotocolinfo.h kprotocolmanager.h \ - kfilterbase.h kfilterdev.h kemailsettings.h kscan.h kdatatool.h \ + kurlpixmapprovider.h kprotocolinfo.h tdeprotocolmanager.h \ + kfilterbase.h kfilterdev.h tdeemailsettings.h kscan.h kdatatool.h \ karchive.h tdefilefilter.h tdefilemetainfo.h renamedlgplugin.h \ kmimetyperesolver.h kdcopservicestarter.h kremoteencoding.h \ kmimetypechooser.h @@ -67,7 +67,7 @@ include_HEADERS += kacl.h libtdeiocore_la_SOURCES = authinfo.cpp \ kshred.cpp \ - kprotocolmanager.cpp \ + tdeprotocolmanager.cpp \ slave.cpp slaveinterface.cpp observer.stub \ sessiondata.cpp scheduler.cpp \ connection.cpp \ @@ -81,7 +81,7 @@ libtdeiocore_la_SOURCES = authinfo.cpp \ statusbarprogress.cpp \ kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp \ observer.cpp uiserver.stub observer.skel \ - kemailsettings.cpp \ + tdeemailsettings.cpp \ kprotocolinfo.cpp \ renamedlg.cpp skipdlg.cpp kremoteencoding.cpp \ kmimetypechooser.cpp diff --git a/tdeio/tdeio/chmodjob.cpp b/tdeio/tdeio/chmodjob.cpp index 434466d77..24a5c247d 100644 --- a/tdeio/tdeio/chmodjob.cpp +++ b/tdeio/tdeio/chmodjob.cpp @@ -29,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include "tdeio/job.h" #include "tdeio/chmodjob.h" diff --git a/tdeio/tdeio/dataslave.cpp b/tdeio/tdeio/dataslave.cpp index 528368ba5..a5b6bdf69 100644 --- a/tdeio/tdeio/dataslave.cpp +++ b/tdeio/tdeio/dataslave.cpp @@ -23,7 +23,7 @@ #include "dataslave.h" #include "dataprotocol.h" -#include +#include #include #include diff --git a/tdeio/tdeio/defaultprogress.cpp b/tdeio/tdeio/defaultprogress.cpp index 4293e752e..5db9c5a0c 100644 --- a/tdeio/tdeio/defaultprogress.cpp +++ b/tdeio/tdeio/defaultprogress.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/global.cpp b/tdeio/tdeio/global.cpp index e4bfec5f6..8dce8a5f4 100644 --- a/tdeio/tdeio/global.cpp +++ b/tdeio/tdeio/global.cpp @@ -33,9 +33,9 @@ #include "tdeio/job.h" #include -#include -#include -#include +#include +#include +#include #include #ifdef HAVE_VOLMGT diff --git a/tdeio/tdeio/job.cpp b/tdeio/tdeio/job.cpp index a4e731451..7f8b9bda3 100644 --- a/tdeio/tdeio/job.cpp +++ b/tdeio/tdeio/job.cpp @@ -42,12 +42,12 @@ extern "C" { #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -60,14 +60,14 @@ extern "C" { #include "kdirwatch.h" #include "kmimemagic.h" #include "kprotocolinfo.h" -#include "kprotocolmanager.h" +#include "tdeprotocolmanager.h" #include "tdeio/observer.h" #include "kssl/ksslcsessioncache.h" #include -#include +#include #include #ifdef Q_OS_UNIX diff --git a/tdeio/tdeio/kdcopservicestarter.cpp b/tdeio/tdeio/kdcopservicestarter.cpp index c859cce2b..8a7a67632 100644 --- a/tdeio/tdeio/kdcopservicestarter.cpp +++ b/tdeio/tdeio/kdcopservicestarter.cpp @@ -22,7 +22,7 @@ #include "kservice.h" #include #include -#include +#include #include static KStaticDeleter dss_sd; diff --git a/tdeio/tdeio/kdirlister.cpp b/tdeio/tdeio/kdirlister.cpp index 669766ab5..b0027588d 100644 --- a/tdeio/tdeio/kdirlister.cpp +++ b/tdeio/tdeio/kdirlister.cpp @@ -28,11 +28,11 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/tdeio/tdeio/kdirwatch.cpp b/tdeio/tdeio/kdirwatch.cpp index 63c89b9d7..01b4e0876 100644 --- a/tdeio/tdeio/kdirwatch.cpp +++ b/tdeio/tdeio/kdirwatch.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kemailsettings.cpp b/tdeio/tdeio/kemailsettings.cpp index 296455253..bd46d8708 100644 --- a/tdeio/tdeio/kemailsettings.cpp +++ b/tdeio/tdeio/kemailsettings.cpp @@ -26,10 +26,10 @@ * $Id$ */ -#include "kemailsettings.h" +#include "tdeemailsettings.h" #include -#include +#include #include class KEMailSettingsPrivate { diff --git a/tdeio/tdeio/kimageio.cpp b/tdeio/tdeio/kimageio.cpp index f9de08376..d3768d297 100644 --- a/tdeio/tdeio/kimageio.cpp +++ b/tdeio/tdeio/kimageio.cpp @@ -20,9 +20,9 @@ #include #include "kimageio.h" #include "kimageiofactory.h" -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kmessageboxwrapper.h b/tdeio/tdeio/kmessageboxwrapper.h index c55060549..524eafa74 100644 --- a/tdeio/tdeio/kmessageboxwrapper.h +++ b/tdeio/tdeio/kmessageboxwrapper.h @@ -18,7 +18,7 @@ #ifndef KMESSAGEBOXWRAPPER_H #define KMESSAGEBOXWRAPPER_H -#include +#include #include #include diff --git a/tdeio/tdeio/kmimetype.cpp b/tdeio/tdeio/kmimetype.cpp index 8129b31f9..636c04eea 100644 --- a/tdeio/tdeio/kmimetype.cpp +++ b/tdeio/tdeio/kmimetype.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kmimetypechooser.cpp b/tdeio/tdeio/kmimetypechooser.cpp index 95dfada9c..ffc9a4c78 100644 --- a/tdeio/tdeio/kmimetypechooser.cpp +++ b/tdeio/tdeio/kmimetypechooser.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kprotocolinfo.cpp b/tdeio/tdeio/kprotocolinfo.cpp index 9523b70cb..bf11060e4 100644 --- a/tdeio/tdeio/kprotocolinfo.cpp +++ b/tdeio/tdeio/kprotocolinfo.cpp @@ -24,7 +24,7 @@ #include "kprotocolinfo.h" #include "kprotocolinfofactory.h" -#include "kprotocolmanager.h" +#include "tdeprotocolmanager.h" // Most of this class is implemented in tdecore/kprotocolinfo_tdecore.cpp // This file only contains a few static class-functions that depend on diff --git a/tdeio/tdeio/kprotocolmanager.cpp b/tdeio/tdeio/kprotocolmanager.cpp index 7ed06376b..65ad393a3 100644 --- a/tdeio/tdeio/kprotocolmanager.cpp +++ b/tdeio/tdeio/kprotocolmanager.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -34,7 +34,7 @@ #include #include -#include "kprotocolmanager.h" +#include "tdeprotocolmanager.h" class KProtocolManagerPrivate diff --git a/tdeio/tdeio/krun.cpp b/tdeio/tdeio/krun.cpp index 8547802d6..d92e3ca11 100644 --- a/tdeio/tdeio/krun.cpp +++ b/tdeio/tdeio/krun.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/krun.h b/tdeio/tdeio/krun.h index 40fd36416..6e5604f7a 100644 --- a/tdeio/tdeio/krun.h +++ b/tdeio/tdeio/krun.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include class TDEProcess; class KService; diff --git a/tdeio/tdeio/kscan.cpp b/tdeio/tdeio/kscan.cpp index 7b00f08a9..b49459771 100644 --- a/tdeio/tdeio/kscan.cpp +++ b/tdeio/tdeio/kscan.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include "kscan.h" diff --git a/tdeio/tdeio/kservice.cpp b/tdeio/tdeio/kservice.cpp index 13be78bea..c9a6fdae2 100644 --- a/tdeio/tdeio/kservice.cpp +++ b/tdeio/tdeio/kservice.cpp @@ -40,9 +40,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/kservicefactory.cpp b/tdeio/tdeio/kservicefactory.cpp index f4646fa75..abd6ec61e 100644 --- a/tdeio/tdeio/kservicefactory.cpp +++ b/tdeio/tdeio/kservicefactory.cpp @@ -24,9 +24,9 @@ #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kservicegroup.cpp b/tdeio/tdeio/kservicegroup.cpp index 2e27c99b0..4cb3b8dac 100644 --- a/tdeio/tdeio/kservicegroup.cpp +++ b/tdeio/tdeio/kservicegroup.cpp @@ -19,9 +19,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kservicegroupfactory.cpp b/tdeio/tdeio/kservicegroupfactory.cpp index 56ec0c07f..3caf9c027 100644 --- a/tdeio/tdeio/kservicegroupfactory.cpp +++ b/tdeio/tdeio/kservicegroupfactory.cpp @@ -24,9 +24,9 @@ #include -#include +#include #include -#include +#include #include KServiceGroupFactory::KServiceGroupFactory() diff --git a/tdeio/tdeio/kshred.cpp b/tdeio/tdeio/kshred.cpp index 470f9a03e..0bc01c20a 100644 --- a/tdeio/tdeio/kshred.cpp +++ b/tdeio/tdeio/kshred.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kshred.h" #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/ktar.cpp b/tdeio/tdeio/ktar.cpp index 9bde2873a..cb5bba1fa 100644 --- a/tdeio/tdeio/ktar.cpp +++ b/tdeio/tdeio/ktar.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/kurlcompletion.cpp b/tdeio/tdeio/kurlcompletion.cpp index e9ce26908..441d453ac 100644 --- a/tdeio/tdeio/kurlcompletion.cpp +++ b/tdeio/tdeio/kurlcompletion.cpp @@ -47,8 +47,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeio/tdeio/kuserprofile.cpp b/tdeio/tdeio/kuserprofile.cpp index 124f7f8f8..a9bdc40c1 100644 --- a/tdeio/tdeio/kuserprofile.cpp +++ b/tdeio/tdeio/kuserprofile.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/netaccess.cpp b/tdeio/tdeio/netaccess.cpp index dd3a1bdc8..cbab6684e 100644 --- a/tdeio/tdeio/netaccess.cpp +++ b/tdeio/tdeio/netaccess.cpp @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/observer.cpp b/tdeio/tdeio/observer.cpp index dfd847b04..2309c2142 100644 --- a/tdeio/tdeio/observer.cpp +++ b/tdeio/tdeio/observer.cpp @@ -34,12 +34,12 @@ #include "passdlg.h" #include "slavebase.h" #include "observer_stub.h" -#include +#include #include #include #include #include -#include +#include using namespace TDEIO; diff --git a/tdeio/tdeio/passdlg.cpp b/tdeio/tdeio/passdlg.cpp index 942d16c64..91fba050d 100644 --- a/tdeio/tdeio/passdlg.cpp +++ b/tdeio/tdeio/passdlg.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include using namespace TDEIO; diff --git a/tdeio/tdeio/paste.cpp b/tdeio/tdeio/paste.cpp index fd24f9a0d..42fff5ba2 100644 --- a/tdeio/tdeio/paste.cpp +++ b/tdeio/tdeio/paste.cpp @@ -24,16 +24,16 @@ #include "tdeio/netaccess.h" #include "tdeio/observer.h" #include "tdeio/renamedlg.h" -#include "tdeio/kprotocolmanager.h" +#include "tdeio/tdeprotocolmanager.h" #include #include #include -#include +#include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeio/tdeio/pastedialog.cpp b/tdeio/tdeio/pastedialog.cpp index 0252baff1..d95cc7e88 100644 --- a/tdeio/tdeio/pastedialog.cpp +++ b/tdeio/tdeio/pastedialog.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/previewjob.cpp b/tdeio/tdeio/previewjob.cpp index c51ba154d..5e3148619 100644 --- a/tdeio/tdeio/previewjob.cpp +++ b/tdeio/tdeio/previewjob.cpp @@ -43,10 +43,10 @@ #include // Do not remove, needed for correct bool serialization #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/renamedlg.cpp b/tdeio/tdeio/renamedlg.cpp index 06b12d129..715f73c42 100644 --- a/tdeio/tdeio/renamedlg.cpp +++ b/tdeio/tdeio/renamedlg.cpp @@ -30,15 +30,15 @@ #include #include -#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/scheduler.cpp b/tdeio/tdeio/scheduler.cpp index 01bcde298..3935a91cf 100644 --- a/tdeio/tdeio/scheduler.cpp +++ b/tdeio/tdeio/scheduler.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeio/tdeio/sessiondata.cpp b/tdeio/tdeio/sessiondata.cpp index 99c6a26f3..4e4dd14ac 100644 --- a/tdeio/tdeio/sessiondata.cpp +++ b/tdeio/tdeio/sessiondata.cpp @@ -23,11 +23,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/skipdlg.cpp b/tdeio/tdeio/skipdlg.cpp index 6cd924136..5871bbd09 100644 --- a/tdeio/tdeio/skipdlg.cpp +++ b/tdeio/tdeio/skipdlg.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeio/slave.cpp b/tdeio/tdeio/slave.cpp index e66a719df..b4a7c8f2a 100644 --- a/tdeio/tdeio/slave.cpp +++ b/tdeio/tdeio/slave.cpp @@ -35,11 +35,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ #include "tdeio/slave.h" #include "tdeio/kservice.h" #include -#include +#include #include #ifdef HAVE_PATHS_H diff --git a/tdeio/tdeio/slavebase.cpp b/tdeio/tdeio/slavebase.cpp index 29a8e0c48..76bbc232d 100644 --- a/tdeio/tdeio/slavebase.cpp +++ b/tdeio/tdeio/slavebase.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include "kremoteencoding.h" diff --git a/tdeio/tdeio/slaveconfig.cpp b/tdeio/tdeio/slaveconfig.cpp index e81146e76..af1b7b793 100644 --- a/tdeio/tdeio/slaveconfig.cpp +++ b/tdeio/tdeio/slaveconfig.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "slaveconfig.h" diff --git a/tdeio/tdeio/statusbarprogress.cpp b/tdeio/tdeio/statusbarprogress.cpp index e0497e391..d7ef698c4 100644 --- a/tdeio/tdeio/statusbarprogress.cpp +++ b/tdeio/tdeio/statusbarprogress.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/tcpslavebase.cpp b/tdeio/tdeio/tcpslavebase.cpp index 2a4aff68e..a0d9c86cb 100644 --- a/tdeio/tdeio/tcpslavebase.cpp +++ b/tdeio/tdeio/tcpslavebase.cpp @@ -43,19 +43,19 @@ #include #include #include -#include +#include #ifndef Q_WS_WIN //temporary #include #endif -#include +#include #include #include #include #include -#include +#include #include #include "tdeio/tcpslavebase.h" diff --git a/tdeio/tdeio/tdefilefilter.cpp b/tdeio/tdeio/tdefilefilter.cpp index 310b86221..c1663c2e8 100644 --- a/tdeio/tdeio/tdefilefilter.cpp +++ b/tdeio/tdeio/tdefilefilter.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include "tdefilefilter.h" diff --git a/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index 3d09e6877..378cd5f0a 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -41,11 +41,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tdeio/tdefilemetainfo.cpp b/tdeio/tdeio/tdefilemetainfo.cpp index 796a48305..c1389695d 100644 --- a/tdeio/tdeio/tdefilemetainfo.cpp +++ b/tdeio/tdeio/tdefilemetainfo.cpp @@ -32,7 +32,7 @@ #include #include #include // needed for serialization of bool -#include +#include #include #include "tdefilemetainfo.h" diff --git a/tdeio/tdeio/tdefileshare.cpp b/tdeio/tdeio/tdefileshare.cpp index 16e281c16..dc3f8c05a 100644 --- a/tdeio/tdeio/tdefileshare.cpp +++ b/tdeio/tdeio/tdefileshare.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeio/tdeioexec/main.cpp b/tdeio/tdeioexec/main.cpp index eb615344b..f6324afa5 100644 --- a/tdeio/tdeioexec/main.cpp +++ b/tdeio/tdeioexec/main.cpp @@ -29,16 +29,16 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeio/tests/kiopassdlgtest.cpp b/tdeio/tests/kiopassdlgtest.cpp index 3dd4d7294..ba429e67a 100644 --- a/tdeio/tests/kiopassdlgtest.cpp +++ b/tdeio/tests/kiopassdlgtest.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include #include #include "passdlg.h" diff --git a/tdeio/tests/kpropsdlgtest.cpp b/tdeio/tests/kpropsdlgtest.cpp index 638a60ec2..527077eb0 100644 --- a/tdeio/tests/kpropsdlgtest.cpp +++ b/tdeio/tests/kpropsdlgtest.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/tdeio/tests/kprotocolinfotest.cpp b/tdeio/tests/kprotocolinfotest.cpp index 646249678..9b5242d65 100644 --- a/tdeio/tests/kprotocolinfotest.cpp +++ b/tdeio/tests/kprotocolinfotest.cpp @@ -17,9 +17,9 @@ */ #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeio/tests/tdeioslavetest.cpp b/tdeio/tests/tdeioslavetest.cpp index ecc5e4af5..3cc22d8e2 100644 --- a/tdeio/tests/tdeioslavetest.cpp +++ b/tdeio/tests/tdeioslavetest.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeioslave/file/file.cc b/tdeioslave/file/file.cc index 477db8754..1caeaef3e 100644 --- a/tdeioslave/file/file.cc +++ b/tdeioslave/file/file.cc @@ -75,8 +75,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include "file.h" @@ -93,7 +93,7 @@ #include #include #include -#include +#include #include using namespace TDEIO; diff --git a/tdeioslave/ftp/ftp.cc b/tdeioslave/ftp/ftp.cc index 5b582d376..cf358ce39 100644 --- a/tdeioslave/ftp/ftp.cc +++ b/tdeioslave/ftp/ftp.cc @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeioslave/http/http.cc b/tdeioslave/http/http.cc index 539cc4dc5..a492221d5 100644 --- a/tdeioslave/http/http.cc +++ b/tdeioslave/http/http.cc @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeioslave/http/http_cache_cleaner.cpp b/tdeioslave/http/http_cache_cleaner.cpp index af9ede123..aaf94d25a 100644 --- a/tdeioslave/http/http_cache_cleaner.cpp +++ b/tdeioslave/http/http_cache_cleaner.cpp @@ -33,12 +33,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include -#include +#include #include #include -#include +#include #include diff --git a/tdeioslave/http/kcookiejar/kcookiewin.cpp b/tdeioslave/http/kcookiejar/kcookiewin.cpp index 3b845a104..faa9cdc65 100644 --- a/tdeioslave/http/kcookiejar/kcookiewin.cpp +++ b/tdeioslave/http/kcookiejar/kcookiewin.cpp @@ -58,8 +58,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeioslave/http/kcookiejar/main.cpp b/tdeioslave/http/kcookiejar/main.cpp index 59d912524..414afb41f 100644 --- a/tdeioslave/http/kcookiejar/main.cpp +++ b/tdeioslave/http/kcookiejar/main.cpp @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include static const char description[] = diff --git a/tdeioslave/metainfo/metainfo.cpp b/tdeioslave/metainfo/metainfo.cpp index 54f7acc3a..389a9182e 100644 --- a/tdeioslave/metainfo/metainfo.cpp +++ b/tdeioslave/metainfo/metainfo.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include "metainfo.h" diff --git a/tdelfeditor/tdelfeditor.cpp b/tdelfeditor/tdelfeditor.cpp index 99af949ed..1db2a3d8b 100644 --- a/tdelfeditor/tdelfeditor.cpp +++ b/tdelfeditor/tdelfeditor.cpp @@ -42,7 +42,7 @@ extern "C" { #include #include -#include +#include #include #include #include diff --git a/tdemdi/tdemdi/dockcontainer.cpp b/tdemdi/tdemdi/dockcontainer.cpp index 88bfa020d..be7c00929 100644 --- a/tdemdi/tdemdi/dockcontainer.cpp +++ b/tdemdi/tdemdi/dockcontainer.cpp @@ -29,13 +29,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include //TODO: Well, this is already defined in tdeui/kdockwidget.cpp static const char* const tdemdi_not_close_xpm[]={ diff --git a/tdemdi/tdemdi/guiclient.cpp b/tdemdi/tdemdi/guiclient.cpp index 255150289..9201df7b3 100644 --- a/tdemdi/tdemdi/guiclient.cpp +++ b/tdemdi/tdemdi/guiclient.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdemdi/tdemdi/mainwindow.cpp b/tdemdi/tdemdi/mainwindow.cpp index 4d477fc9c..411d11771 100644 --- a/tdemdi/tdemdi/mainwindow.cpp +++ b/tdemdi/tdemdi/mainwindow.cpp @@ -51,12 +51,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include "dockcontainer.h" diff --git a/tdemdi/tdemdi/mainwindow.h b/tdemdi/tdemdi/mainwindow.h index e8ae6e9fc..0c333a151 100644 --- a/tdemdi/tdemdi/mainwindow.h +++ b/tdemdi/tdemdi/mainwindow.h @@ -43,7 +43,7 @@ #define _KMDI_MAINWINDOW_H_ #include -#include +#include #include #include diff --git a/tdemdi/tdemdichildarea.cpp b/tdemdi/tdemdichildarea.cpp index 9370bbbe7..29b0b3d2d 100644 --- a/tdemdi/tdemdichildarea.cpp +++ b/tdemdi/tdemdichildarea.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdemdi/tdemdichildfrm.cpp b/tdemdi/tdemdichildfrm.cpp index cbc4f4b29..40ced6ffb 100644 --- a/tdemdi/tdemdichildfrm.cpp +++ b/tdemdi/tdemdichildfrm.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include ////////////////////////////////////////////////////////////////////////////// diff --git a/tdemdi/tdemdichildfrmcaption.cpp b/tdemdi/tdemdichildfrmcaption.cpp index cc1a4a187..e8e91ea94 100644 --- a/tdemdi/tdemdichildfrmcaption.cpp +++ b/tdemdi/tdemdichildfrmcaption.cpp @@ -38,7 +38,7 @@ #include "tdemdichildfrm.h" #include "tdemdichildarea.h" #include "tdemdimainfrm.h" -#include +#include #include #ifdef Q_WS_WIN diff --git a/tdemdi/tdemdichildview.cpp b/tdemdi/tdemdichildview.cpp index 1c3f521f7..4d0aa4166 100644 --- a/tdemdi/tdemdichildview.cpp +++ b/tdemdi/tdemdichildview.cpp @@ -39,7 +39,7 @@ #include "tdemdichildfrm.h" #include "tdemdidefines.h" #include -#include +#include #include //============ KMdiChildView ============// diff --git a/tdemdi/tdemdidockcontainer.cpp b/tdemdi/tdemdidockcontainer.cpp index ba0ba0de0..d6771b597 100644 --- a/tdemdi/tdemdidockcontainer.cpp +++ b/tdemdi/tdemdidockcontainer.cpp @@ -28,13 +28,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include //TODO: Well, this is already defined in tdeui/kdockwidget.cpp static const char* const tdemdi_not_close_xpm[] = diff --git a/tdemdi/tdemdiguiclient.cpp b/tdemdi/tdemdiguiclient.cpp index 1c43b8039..0a66ea6ff 100644 --- a/tdemdi/tdemdiguiclient.cpp +++ b/tdemdi/tdemdiguiclient.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdemdi/tdemdimainfrm.cpp b/tdemdi/tdemdimainfrm.cpp index 3c9f7c442..f21cc384b 100644 --- a/tdemdi/tdemdimainfrm.cpp +++ b/tdemdi/tdemdimainfrm.cpp @@ -43,12 +43,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/tdemdi/tdemdimainfrm.h b/tdemdi/tdemdimainfrm.h index 720324ad5..c73fa5af1 100644 --- a/tdemdi/tdemdimainfrm.h +++ b/tdemdi/tdemdimainfrm.h @@ -32,7 +32,7 @@ #define _KMDIMAINFRM_H_ #include -#include +#include #include #include diff --git a/tdeparts/browserextension.cpp b/tdeparts/browserextension.cpp index 630e4cb5a..85bfa4a94 100644 --- a/tdeparts/browserextension.cpp +++ b/tdeparts/browserextension.cpp @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeparts/browserrun.cpp b/tdeparts/browserrun.cpp index 34f4c21c9..3abd01524 100644 --- a/tdeparts/browserrun.cpp +++ b/tdeparts/browserrun.cpp @@ -17,15 +17,15 @@ */ #include "browserrun.h" -#include +#include #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeparts/factory.cpp b/tdeparts/factory.cpp index a3985fd05..485bd9a36 100644 --- a/tdeparts/factory.cpp +++ b/tdeparts/factory.cpp @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/tdeparts/part.cpp b/tdeparts/part.cpp index 9372adc08..954fc83d5 100644 --- a/tdeparts/part.cpp +++ b/tdeparts/part.cpp @@ -33,9 +33,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeparts/partmanager.cpp b/tdeparts/partmanager.cpp index 1af0f1ee3..0f6f59561 100644 --- a/tdeparts/partmanager.cpp +++ b/tdeparts/partmanager.cpp @@ -22,7 +22,7 @@ #include "partmanager.h" #include #include -#include +#include #include #include diff --git a/tdeparts/plugin.cpp b/tdeparts/plugin.cpp index e1469ad1c..378db4a27 100644 --- a/tdeparts/plugin.cpp +++ b/tdeparts/plugin.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeparts/tests/example.cpp b/tdeparts/tests/example.cpp index 403fda062..c8fb77b29 100644 --- a/tdeparts/tests/example.cpp +++ b/tdeparts/tests/example.cpp @@ -10,9 +10,9 @@ #include #include #include -#include +#include #include -#include +#include Shell::Shell() { diff --git a/tdeparts/tests/ghostview.cpp b/tdeparts/tests/ghostview.cpp index 72b165e65..d83ec8f41 100644 --- a/tdeparts/tests/ghostview.cpp +++ b/tdeparts/tests/ghostview.cpp @@ -2,9 +2,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeparts/tests/normalktm.cpp b/tdeparts/tests/normalktm.cpp index 664d6c7ec..92e46254e 100644 --- a/tdeparts/tests/normalktm.cpp +++ b/tdeparts/tests/normalktm.cpp @@ -10,11 +10,11 @@ #include #include #include -#include +#include #include -#include +#include -#include +#include Shell::Shell() { diff --git a/tdeparts/tests/notepad.cpp b/tdeparts/tests/notepad.cpp index 81ff2c1f2..ad81b91b3 100644 --- a/tdeparts/tests/notepad.cpp +++ b/tdeparts/tests/notepad.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeparts/tests/parts.cpp b/tdeparts/tests/parts.cpp index 408e73280..ebfd9c9f1 100644 --- a/tdeparts/tests/parts.cpp +++ b/tdeparts/tests/parts.cpp @@ -14,9 +14,9 @@ #include #include #include -#include +#include #include -#include +#include Part1::Part1( TQObject *parent, TQWidget * parentWidget ) : KParts::ReadOnlyPart( parent, "Part1" ) diff --git a/tdeparts/tests/plugin_spellcheck.cpp b/tdeparts/tests/plugin_spellcheck.cpp index 73d5b7986..d7cf06eac 100644 --- a/tdeparts/tests/plugin_spellcheck.cpp +++ b/tdeparts/tests/plugin_spellcheck.cpp @@ -3,8 +3,8 @@ #include "plugin_spellcheck.h" #include #include -#include -#include +#include +#include #include PluginSpellCheck::PluginSpellCheck( TQObject* parent, const char* name, diff --git a/tdeprint/cups/cupsaddsmb2.cpp b/tdeprint/cups/cupsaddsmb2.cpp index 685ce6e7e..256f5ee23 100644 --- a/tdeprint/cups/cupsaddsmb2.cpp +++ b/tdeprint/cups/cupsaddsmb2.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/cups/cupsdconf2/addressdialog.cpp b/tdeprint/cups/cupsdconf2/addressdialog.cpp index fab6a6fba..83b4d0813 100644 --- a/tdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/tdeprint/cups/cupsdconf2/addressdialog.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include AddressDialog::AddressDialog(TQWidget *parent, const char *name) : KDialogBase(Swallow, i18n("ACL Address"), Ok|Cancel, Ok, parent, name, true, true) diff --git a/tdeprint/cups/cupsdconf2/browsedialog.cpp b/tdeprint/cups/cupsdconf2/browsedialog.cpp index b337eb883..3268c72bc 100644 --- a/tdeprint/cups/cupsdconf2/browsedialog.cpp +++ b/tdeprint/cups/cupsdconf2/browsedialog.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include BrowseDialog::BrowseDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true) diff --git a/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp index 4b056cdb0..e66048b73 100644 --- a/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include CupsdBrowsingPage::CupsdBrowsingPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdcomment.cpp b/tdeprint/cups/cupsdconf2/cupsdcomment.cpp index d17c8bd0c..8a788cad3 100644 --- a/tdeprint/cups/cupsdconf2/cupsdcomment.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdcomment.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include TQString Comment::comment() diff --git a/tdeprint/cups/cupsdconf2/cupsdconf.cpp b/tdeprint/cups/cupsdconf2/cupsdconf.cpp index 102ead1c8..2c5610411 100644 --- a/tdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/cupsddialog.cpp b/tdeprint/cups/cupsdconf2/cupsddialog.cpp index c9b219112..22a3b2d54 100644 --- a/tdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -33,11 +33,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/cupsdconf2/cupsddirpage.cpp b/tdeprint/cups/cupsdconf2/cupsddirpage.cpp index 268465a76..282657255 100644 --- a/tdeprint/cups/cupsdconf2/cupsddirpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddirpage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include CupsdDirPage::CupsdDirPage(TQWidget *parent, const char *name) : CupsdPage(parent, name) diff --git a/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp b/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp index 79c8a9401..e9cb1a0ad 100644 --- a/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include CupsdFilterPage::CupsdFilterPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp b/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp index f12f82f1e..49fdecc7c 100644 --- a/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include CupsdJobsPage::CupsdJobsPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp b/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp index 00972e368..22128b39c 100644 --- a/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include CupsdLogPage::CupsdLogPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp b/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp index 9edca5868..e939c151f 100644 --- a/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include CupsdNetworkPage::CupsdNetworkPage(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp b/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp index d11851c60..6d6061264 100644 --- a/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp @@ -28,9 +28,9 @@ #include #include -#include +#include #include -#include +#include CupsdSecurityPage::CupsdSecurityPage(TQWidget *parent, const char *name) : CupsdPage(parent, name) diff --git a/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp b/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp index cfd731430..e89356af9 100644 --- a/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include int findComboItem(TQComboBox *cb, const TQString& str) { diff --git a/tdeprint/cups/cupsdconf2/cupsdsplash.cpp b/tdeprint/cups/cupsdconf2/cupsdsplash.cpp index a058299f0..c28329e67 100644 --- a/tdeprint/cups/cupsdconf2/cupsdsplash.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdsplash.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include CupsdSplash::CupsdSplash(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/editlist.cpp b/tdeprint/cups/cupsdconf2/editlist.cpp index 3e3fa80e2..936dee212 100644 --- a/tdeprint/cups/cupsdconf2/editlist.cpp +++ b/tdeprint/cups/cupsdconf2/editlist.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/locationdialog.cpp b/tdeprint/cups/cupsdconf2/locationdialog.cpp index 3896f7845..0754ae573 100644 --- a/tdeprint/cups/cupsdconf2/locationdialog.cpp +++ b/tdeprint/cups/cupsdconf2/locationdialog.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include LocationDialog::LocationDialog(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/cupsdconf2/main.cpp b/tdeprint/cups/cupsdconf2/main.cpp index abc81477c..78b0e1edf 100644 --- a/tdeprint/cups/cupsdconf2/main.cpp +++ b/tdeprint/cups/cupsdconf2/main.cpp @@ -20,7 +20,7 @@ #include "cupsddialog.h" #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/portdialog.cpp b/tdeprint/cups/cupsdconf2/portdialog.cpp index 18cade9fc..f758d5d1e 100644 --- a/tdeprint/cups/cupsdconf2/portdialog.cpp +++ b/tdeprint/cups/cupsdconf2/portdialog.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include PortDialog::PortDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true) diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index 628e8d40c..0992e2935 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/cupsdconf2/sizewidget.cpp b/tdeprint/cups/cupsdconf2/sizewidget.cpp index 742702e48..eaa39152f 100644 --- a/tdeprint/cups/cupsdconf2/sizewidget.cpp +++ b/tdeprint/cups/cupsdconf2/sizewidget.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include SizeWidget::SizeWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ) diff --git a/tdeprint/cups/cupsinfos.cpp b/tdeprint/cups/cupsinfos.cpp index 330429583..f6d392bd9 100644 --- a/tdeprint/cups/cupsinfos.cpp +++ b/tdeprint/cups/cupsinfos.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/ippreportdlg.cpp b/tdeprint/cups/ippreportdlg.cpp index 1e07789ac..ed56804bc 100644 --- a/tdeprint/cups/ippreportdlg.cpp +++ b/tdeprint/cups/ippreportdlg.cpp @@ -21,9 +21,9 @@ #include "ipprequest.h" #include "kprinter.h" -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/ipprequest.cpp b/tdeprint/cups/ipprequest.cpp index 4edaefb58..ebbefefe9 100644 --- a/tdeprint/cups/ipprequest.cpp +++ b/tdeprint/cups/ipprequest.cpp @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/cups/kmconfigcups.cpp b/tdeprint/cups/kmconfigcups.cpp index 1b0ccdaea..6bc9ec155 100644 --- a/tdeprint/cups/kmconfigcups.cpp +++ b/tdeprint/cups/kmconfigcups.cpp @@ -20,7 +20,7 @@ #include "kmconfigcups.h" #include "kmcupsconfigwidget.h" -#include +#include #include #include diff --git a/tdeprint/cups/kmconfigcupsdir.cpp b/tdeprint/cups/kmconfigcupsdir.cpp index 6f16f5dfa..10a455226 100644 --- a/tdeprint/cups/kmconfigcupsdir.cpp +++ b/tdeprint/cups/kmconfigcupsdir.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmcupsconfigwidget.cpp b/tdeprint/cups/kmcupsconfigwidget.cpp index a62583b1b..f93c1a4b3 100644 --- a/tdeprint/cups/kmcupsconfigwidget.cpp +++ b/tdeprint/cups/kmcupsconfigwidget.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmcupsfactory.cpp b/tdeprint/cups/kmcupsfactory.cpp index 47384eab6..f42bc449e 100644 --- a/tdeprint/cups/kmcupsfactory.cpp +++ b/tdeprint/cups/kmcupsfactory.cpp @@ -22,7 +22,7 @@ #include "kmcupsuimanager.h" #include "kcupsprinterimpl.h" -#include +#include #include typedef K_TYPELIST_4( KMCupsManager, KMCupsJobManager, KMCupsUiManager, KCupsPrinterImpl ) Products; diff --git a/tdeprint/cups/kmcupsjobmanager.cpp b/tdeprint/cups/kmcupsjobmanager.cpp index b7284d1ad..fa208e551 100644 --- a/tdeprint/cups/kmcupsjobmanager.cpp +++ b/tdeprint/cups/kmcupsjobmanager.cpp @@ -32,7 +32,7 @@ #include "kpcopiespage.h" #include "kptagspage.h" -#include +#include #include #include diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index cd472eefa..eaf5070b8 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -42,12 +42,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmcupsuimanager.cpp b/tdeprint/cups/kmcupsuimanager.cpp index 60e683b84..03b85bb0a 100644 --- a/tdeprint/cups/kmcupsuimanager.cpp +++ b/tdeprint/cups/kmcupsuimanager.cpp @@ -55,10 +55,10 @@ #include #include -#include +#include #include #include -#include +#include #include "config.h" diff --git a/tdeprint/cups/kmpropbanners.cpp b/tdeprint/cups/kmpropbanners.cpp index 22098cdff..602af7f6d 100644 --- a/tdeprint/cups/kmpropbanners.cpp +++ b/tdeprint/cups/kmpropbanners.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include KMPropBanners::KMPropBanners(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/cups/kmpropquota.cpp b/tdeprint/cups/kmpropquota.cpp index 9df6cbcb2..773e667e9 100644 --- a/tdeprint/cups/kmpropquota.cpp +++ b/tdeprint/cups/kmpropquota.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include // some forward declarations (see kmwquota.cpp) const char* unitKeyword(int); diff --git a/tdeprint/cups/kmpropusers.cpp b/tdeprint/cups/kmpropusers.cpp index 0f67205b0..2a2147aed 100644 --- a/tdeprint/cups/kmpropusers.cpp +++ b/tdeprint/cups/kmpropusers.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropUsers::KMPropUsers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/cups/kmwbanners.cpp b/tdeprint/cups/kmwbanners.cpp index c221f69d7..86f1347fb 100644 --- a/tdeprint/cups/kmwbanners.cpp +++ b/tdeprint/cups/kmwbanners.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include TQStringList defaultBanners() { diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp index 05b1b2cfa..15d4f8180 100644 --- a/tdeprint/cups/kmwfax.cpp +++ b/tdeprint/cups/kmwfax.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kmwipp.cpp b/tdeprint/cups/kmwipp.cpp index cb9dedd6c..a8ec8d425 100644 --- a/tdeprint/cups/kmwipp.cpp +++ b/tdeprint/cups/kmwipp.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kmwippprinter.cpp b/tdeprint/cups/kmwippprinter.cpp index e80478f61..f7a4f0593 100644 --- a/tdeprint/cups/kmwippprinter.cpp +++ b/tdeprint/cups/kmwippprinter.cpp @@ -29,12 +29,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp index c3f48ad27..237d74fd1 100644 --- a/tdeprint/cups/kmwippselect.cpp +++ b/tdeprint/cups/kmwippselect.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kmwother.cpp b/tdeprint/cups/kmwother.cpp index 4e640d536..497fa03c3 100644 --- a/tdeprint/cups/kmwother.cpp +++ b/tdeprint/cups/kmwother.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kmwquota.cpp b/tdeprint/cups/kmwquota.cpp index 67245fb20..5085913d0 100644 --- a/tdeprint/cups/kmwquota.cpp +++ b/tdeprint/cups/kmwquota.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #ifdef HAVE_LIMITS_H #include diff --git a/tdeprint/cups/kmwusers.cpp b/tdeprint/cups/kmwusers.cpp index 714f6f4d4..eed7c08af 100644 --- a/tdeprint/cups/kmwusers.cpp +++ b/tdeprint/cups/kmwusers.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include KMWUsers::KMWUsers(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/kphpgl2page.cpp b/tdeprint/cups/kphpgl2page.cpp index 67ad61aec..f804b249d 100644 --- a/tdeprint/cups/kphpgl2page.cpp +++ b/tdeprint/cups/kphpgl2page.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include KPHpgl2Page::KPHpgl2Page(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/kpimagepage.cpp b/tdeprint/cups/kpimagepage.cpp index 669bab190..8d23fe3e0 100644 --- a/tdeprint/cups/kpimagepage.cpp +++ b/tdeprint/cups/kpimagepage.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/cups/kpschedulepage.cpp b/tdeprint/cups/kpschedulepage.cpp index f778139dc..d7f13c8a4 100644 --- a/tdeprint/cups/kpschedulepage.cpp +++ b/tdeprint/cups/kpschedulepage.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/cups/kptagspage.cpp b/tdeprint/cups/kptagspage.cpp index a5d465683..db134d9ba 100644 --- a/tdeprint/cups/kptagspage.cpp +++ b/tdeprint/cups/kptagspage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include KPTagsPage::KPTagsPage(bool ro, TQWidget *parent, const char *name) : KPrintDialogPage(parent, name) diff --git a/tdeprint/cups/kptextpage.cpp b/tdeprint/cups/kptextpage.cpp index eb8bc3553..955434da4 100644 --- a/tdeprint/cups/kptextpage.cpp +++ b/tdeprint/cups/kptextpage.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/driver.cpp b/tdeprint/driver.cpp index abc468f7a..6afc75d0f 100644 --- a/tdeprint/driver.cpp +++ b/tdeprint/driver.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/driverview.cpp b/tdeprint/driverview.cpp index 02c7be610..fece6c40c 100644 --- a/tdeprint/driverview.cpp +++ b/tdeprint/driverview.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include DrListView::DrListView(TQWidget *parent, const char *name) : TDEListView(parent,name) diff --git a/tdeprint/droptionview.cpp b/tdeprint/droptionview.cpp index 1ec954251..77a910b0c 100644 --- a/tdeprint/droptionview.cpp +++ b/tdeprint/droptionview.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include OptionBaseView::OptionBaseView(TQWidget *parent, const char *name) : TQWidget(parent,name) diff --git a/tdeprint/ext/kextprinterimpl.cpp b/tdeprint/ext/kextprinterimpl.cpp index 8959aa3e8..7923ea729 100644 --- a/tdeprint/ext/kextprinterimpl.cpp +++ b/tdeprint/ext/kextprinterimpl.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include KExtPrinterImpl::KExtPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) : KPrinterImpl(parent,name) diff --git a/tdeprint/ext/kmextmanager.cpp b/tdeprint/ext/kmextmanager.cpp index 598dd6648..abc832d6f 100644 --- a/tdeprint/ext/kmextmanager.cpp +++ b/tdeprint/ext/kmextmanager.cpp @@ -20,7 +20,7 @@ #include "kmextmanager.h" #include "kmprinter.h" -#include +#include KMExtManager::KMExtManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMManager(parent,name) diff --git a/tdeprint/ext/kmextuimanager.cpp b/tdeprint/ext/kmextuimanager.cpp index 2fa200848..ee1c4e186 100644 --- a/tdeprint/ext/kmextuimanager.cpp +++ b/tdeprint/ext/kmextuimanager.cpp @@ -21,7 +21,7 @@ #include "kpqtpage.h" #include "kprinterpropertydialog.h" -#include +#include KMExtUiManager::KMExtUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/foomatic/kfoomaticprinterimpl.cpp b/tdeprint/foomatic/kfoomaticprinterimpl.cpp index aacf6be8d..dd694b31b 100644 --- a/tdeprint/foomatic/kfoomaticprinterimpl.cpp +++ b/tdeprint/foomatic/kfoomaticprinterimpl.cpp @@ -21,7 +21,7 @@ #include "kprinter.h" #include -#include +#include KFoomaticPrinterImpl::KFoomaticPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) : KPrinterImpl(parent,name) diff --git a/tdeprint/foomatic/kmfoomaticmanager.cpp b/tdeprint/foomatic/kmfoomaticmanager.cpp index 19e8401d8..e1e741003 100644 --- a/tdeprint/foomatic/kmfoomaticmanager.cpp +++ b/tdeprint/foomatic/kmfoomaticmanager.cpp @@ -22,7 +22,7 @@ #include "driver.h" #include -#include +#include #include #include diff --git a/tdeprint/foomatic2loader.cpp b/tdeprint/foomatic2loader.cpp index 6add13378..0d0637c90 100644 --- a/tdeprint/foomatic2loader.cpp +++ b/tdeprint/foomatic2loader.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include void tdeprint_foomatic2scanner_init( TQIODevice* ); void tdeprint_foomatic2scanner_terminate(); diff --git a/tdeprint/kmfactory.cpp b/tdeprint/kmfactory.cpp index 09a2cf45a..16ec56c32 100644 --- a/tdeprint/kmfactory.cpp +++ b/tdeprint/kmfactory.cpp @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/kmjob.cpp b/tdeprint/kmjob.cpp index 7ff1efb95..2b42506f5 100644 --- a/tdeprint/kmjob.cpp +++ b/tdeprint/kmjob.cpp @@ -19,7 +19,7 @@ #include "kmjob.h" -#include +#include KMJob::KMJob() : KMObject() diff --git a/tdeprint/kmmanager.cpp b/tdeprint/kmmanager.cpp index ca9b1036f..d43239fd7 100644 --- a/tdeprint/kmmanager.cpp +++ b/tdeprint/kmmanager.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/kmprinter.cpp b/tdeprint/kmprinter.cpp index 22fc9d970..c7676e382 100644 --- a/tdeprint/kmprinter.cpp +++ b/tdeprint/kmprinter.cpp @@ -21,7 +21,7 @@ #include "kprinter.h" #include "driver.h" -#include +#include #include KMPrinter::KMPrinter() diff --git a/tdeprint/kmspecialmanager.cpp b/tdeprint/kmspecialmanager.cpp index 84e120e77..910de4931 100644 --- a/tdeprint/kmspecialmanager.cpp +++ b/tdeprint/kmspecialmanager.cpp @@ -26,9 +26,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/kmuimanager.cpp b/tdeprint/kmuimanager.cpp index 962653dd2..4dd6966d3 100644 --- a/tdeprint/kmuimanager.cpp +++ b/tdeprint/kmuimanager.cpp @@ -36,7 +36,7 @@ #include "kxmlcommand.h" #include "kpposterpage.h" -#include +#include #include KMUiManager::KMUiManager(TQObject *parent, const char *name) diff --git a/tdeprint/kmvirtualmanager.cpp b/tdeprint/kmvirtualmanager.cpp index b13637904..dabad3093 100644 --- a/tdeprint/kmvirtualmanager.cpp +++ b/tdeprint/kmvirtualmanager.cpp @@ -28,11 +28,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include diff --git a/tdeprint/kpcopiespage.cpp b/tdeprint/kpcopiespage.cpp index d804cc9f2..10eb6e204 100644 --- a/tdeprint/kpcopiespage.cpp +++ b/tdeprint/kpcopiespage.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/kpdriverpage.cpp b/tdeprint/kpdriverpage.cpp index 18cfeb207..2bea47bc8 100644 --- a/tdeprint/kpdriverpage.cpp +++ b/tdeprint/kpdriverpage.cpp @@ -22,7 +22,7 @@ #include "driver.h" #include -#include +#include KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, TQWidget *parent, const char *name) : KPrintDialogPage(p,d,parent,name) diff --git a/tdeprint/kpfileselectpage.cpp b/tdeprint/kpfileselectpage.cpp index 6847ade2b..8b20386bd 100644 --- a/tdeprint/kpfileselectpage.cpp +++ b/tdeprint/kpfileselectpage.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name) diff --git a/tdeprint/kpfilterpage.cpp b/tdeprint/kpfilterpage.cpp index 4704abb15..6f46085ee 100644 --- a/tdeprint/kpfilterpage.cpp +++ b/tdeprint/kpfilterpage.cpp @@ -27,9 +27,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/kpgeneralpage.cpp b/tdeprint/kpgeneralpage.cpp index ea1ec61e3..821290704 100644 --- a/tdeprint/kpgeneralpage.cpp +++ b/tdeprint/kpgeneralpage.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include // Some ID's #define ORIENT_PORTRAIT_ID 0 diff --git a/tdeprint/kpmarginpage.cpp b/tdeprint/kpmarginpage.cpp index ab70211c8..78b9ca6ef 100644 --- a/tdeprint/kpmarginpage.cpp +++ b/tdeprint/kpmarginpage.cpp @@ -31,9 +31,9 @@ #include #include -#include +#include #include -#include +#include KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent, const char *name) : KPrintDialogPage(0, driver, parent, name) diff --git a/tdeprint/kpposterpage.cpp b/tdeprint/kpposterpage.cpp index f719e251b..9c0a42501 100644 --- a/tdeprint/kpposterpage.cpp +++ b/tdeprint/kpposterpage.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/kpqtpage.cpp b/tdeprint/kpqtpage.cpp index 11b5a6574..c0ca5656e 100644 --- a/tdeprint/kpqtpage.cpp +++ b/tdeprint/kpqtpage.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #define ORIENT_PORTRAIT_ID 0 diff --git a/tdeprint/kprintaction.cpp b/tdeprint/kprintaction.cpp index cc94fe3c8..4a4aac597 100644 --- a/tdeprint/kprintaction.cpp +++ b/tdeprint/kprintaction.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include class KPrintAction::KPrintActionPrivate { diff --git a/tdeprint/kprintdialog.cpp b/tdeprint/kprintdialog.cpp index 312146855..d881971ff 100644 --- a/tdeprint/kprintdialog.cpp +++ b/tdeprint/kprintdialog.cpp @@ -46,18 +46,18 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/kprinter.cpp b/tdeprint/kprinter.cpp index 95cfc1733..4b9a1c98f 100644 --- a/tdeprint/kprinter.cpp +++ b/tdeprint/kprinter.cpp @@ -35,15 +35,15 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include -#include +#include static void dumpOptions(const TQMap& opts); static void reportError(KPrinter*); diff --git a/tdeprint/kprinterimpl.cpp b/tdeprint/kprinterimpl.cpp index ac79220f5..edd380009 100644 --- a/tdeprint/kprinterimpl.cpp +++ b/tdeprint/kprinterimpl.cpp @@ -32,14 +32,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include diff --git a/tdeprint/kprinterpropertydialog.cpp b/tdeprint/kprinterpropertydialog.cpp index 1128a7d3a..c120ba843 100644 --- a/tdeprint/kprinterpropertydialog.cpp +++ b/tdeprint/kprinterpropertydialog.cpp @@ -25,9 +25,9 @@ #include "kmprinter.h" #include "driver.h" -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index 0311f543d..623a7f934 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/kprintprocess.cpp b/tdeprint/kprintprocess.cpp index ec93fcce6..89ef5e2ca 100644 --- a/tdeprint/kprintprocess.cpp +++ b/tdeprint/kprintprocess.cpp @@ -19,7 +19,7 @@ #include "kprintprocess.h" #include -#include +#include #include KPrintProcess::KPrintProcess() diff --git a/tdeprint/kxmlcommand.cpp b/tdeprint/kxmlcommand.cpp index f2dcb99ce..2d5712674 100644 --- a/tdeprint/kxmlcommand.cpp +++ b/tdeprint/kxmlcommand.cpp @@ -30,13 +30,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include static void setOptionText(DrBase *opt, const TQString& s) { diff --git a/tdeprint/lpd/klpdprinterimpl.cpp b/tdeprint/lpd/klpdprinterimpl.cpp index e81b3a8cd..3647f0b38 100644 --- a/tdeprint/lpd/klpdprinterimpl.cpp +++ b/tdeprint/lpd/klpdprinterimpl.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include KLpdPrinterImpl::KLpdPrinterImpl(TQObject *parent, const char *name) : KPrinterImpl(parent,name) diff --git a/tdeprint/lpd/kmlpdmanager.cpp b/tdeprint/lpd/kmlpdmanager.cpp index 23c0422d0..e72733f89 100644 --- a/tdeprint/lpd/kmlpdmanager.cpp +++ b/tdeprint/lpd/kmlpdmanager.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/lpd/kmlpduimanager.cpp b/tdeprint/lpd/kmlpduimanager.cpp index fad3fcd58..173c03b2b 100644 --- a/tdeprint/lpd/kmlpduimanager.cpp +++ b/tdeprint/lpd/kmlpduimanager.cpp @@ -27,7 +27,7 @@ #include "kmpropdriver.h" #include -#include +#include KMLpdUiManager::KMLpdUiManager(TQObject *parent, const char *name) : KMUiManager(parent,name) diff --git a/tdeprint/lpd/lpdtools.cpp b/tdeprint/lpd/lpdtools.cpp index 5131b33f3..54f19c405 100644 --- a/tdeprint/lpd/lpdtools.cpp +++ b/tdeprint/lpd/lpdtools.cpp @@ -22,7 +22,7 @@ #include "kmprinter.h" #include -#include +#include static const char *pt_pagesize[] = { "ledger", I18N_NOOP("Ledger"), diff --git a/tdeprint/lpdunix/klpdunixprinterimpl.cpp b/tdeprint/lpdunix/klpdunixprinterimpl.cpp index 4237bda59..e628a1c41 100644 --- a/tdeprint/lpdunix/klpdunixprinterimpl.cpp +++ b/tdeprint/lpdunix/klpdunixprinterimpl.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include KLpdUnixPrinterImpl::KLpdUnixPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) diff --git a/tdeprint/lpdunix/kmlpdunixmanager.cpp b/tdeprint/lpdunix/kmlpdunixmanager.cpp index 232a49eb0..7a291f6df 100644 --- a/tdeprint/lpdunix/kmlpdunixmanager.cpp +++ b/tdeprint/lpdunix/kmlpdunixmanager.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpdunix/kmlpdunixuimanager.cpp b/tdeprint/lpdunix/kmlpdunixuimanager.cpp index 686dfecbb..b7f059f1a 100644 --- a/tdeprint/lpdunix/kmlpdunixuimanager.cpp +++ b/tdeprint/lpdunix/kmlpdunixuimanager.cpp @@ -21,7 +21,7 @@ #include "kpqtpage.h" #include "kprinterpropertydialog.h" -#include +#include KMLpdUnixUiManager::KMLpdUnixUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/lpr/apshandler.cpp b/tdeprint/lpr/apshandler.cpp index 3d144644a..acb0e0c2d 100644 --- a/tdeprint/lpr/apshandler.cpp +++ b/tdeprint/lpr/apshandler.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/editentrydialog.cpp b/tdeprint/lpr/editentrydialog.cpp index 3977f12f8..9a8f9caa2 100644 --- a/tdeprint/lpr/editentrydialog.cpp +++ b/tdeprint/lpr/editentrydialog.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const char *name) diff --git a/tdeprint/lpr/kmconfiglpr.cpp b/tdeprint/lpr/kmconfiglpr.cpp index 8a6988188..fed1dd17d 100644 --- a/tdeprint/lpr/kmconfiglpr.cpp +++ b/tdeprint/lpr/kmconfiglpr.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name) diff --git a/tdeprint/lpr/kmlprjobmanager.cpp b/tdeprint/lpr/kmlprjobmanager.cpp index 851663664..0738d17c1 100644 --- a/tdeprint/lpr/kmlprjobmanager.cpp +++ b/tdeprint/lpr/kmlprjobmanager.cpp @@ -25,7 +25,7 @@ #include "lprsettings.h" #include -#include +#include KMLprJobManager::KMLprJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMJobManager(parent, name) diff --git a/tdeprint/lpr/kmlprmanager.cpp b/tdeprint/lpr/kmlprmanager.cpp index 157105e60..046f082f7 100644 --- a/tdeprint/lpr/kmlprmanager.cpp +++ b/tdeprint/lpr/kmlprmanager.cpp @@ -30,13 +30,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/kmlpruimanager.cpp b/tdeprint/lpr/kmlpruimanager.cpp index 655309e0c..b7d23bb42 100644 --- a/tdeprint/lpr/kmlpruimanager.cpp +++ b/tdeprint/lpr/kmlpruimanager.cpp @@ -29,7 +29,7 @@ #include "kmwbackend.h" #include "kmconfiglpr.h" -#include +#include KMLprUiManager::KMLprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/lpr/lpchelper.cpp b/tdeprint/lpr/lpchelper.cpp index f72901865..b366537e5 100644 --- a/tdeprint/lpr/lpchelper.cpp +++ b/tdeprint/lpr/lpchelper.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/lprhandler.cpp b/tdeprint/lpr/lprhandler.cpp index fcb838bb9..767b55382 100644 --- a/tdeprint/lpr/lprhandler.cpp +++ b/tdeprint/lpr/lprhandler.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include diff --git a/tdeprint/lpr/lprngtoolhandler.cpp b/tdeprint/lpr/lprngtoolhandler.cpp index d3e283123..960f5adb8 100644 --- a/tdeprint/lpr/lprngtoolhandler.cpp +++ b/tdeprint/lpr/lprngtoolhandler.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/lpr/matichandler.cpp b/tdeprint/lpr/matichandler.cpp index e1242c5fc..826867cd2 100644 --- a/tdeprint/lpr/matichandler.cpp +++ b/tdeprint/lpr/matichandler.cpp @@ -29,7 +29,7 @@ #include "util.h" #include "foomatic2loader.h" -#include +#include #include #include #include diff --git a/tdeprint/management/kaddprinterwizard.cpp b/tdeprint/management/kaddprinterwizard.cpp index 256b85011..466c75853 100644 --- a/tdeprint/management/kaddprinterwizard.cpp +++ b/tdeprint/management/kaddprinterwizard.cpp @@ -1,9 +1,9 @@ #include "kmmanager.h" #include #include -#include -#include -#include +#include +#include +#include static TDECmdLineOptions options[] = { diff --git a/tdeprint/management/kmconfigcommand.cpp b/tdeprint/management/kmconfigcommand.cpp index 32fb7db11..4cf33998f 100644 --- a/tdeprint/management/kmconfigcommand.cpp +++ b/tdeprint/management/kmconfigcommand.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include KMConfigCommand::KMConfigCommand(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmconfigdialog.cpp b/tdeprint/management/kmconfigdialog.cpp index 6f0e76e19..50eabe9b1 100644 --- a/tdeprint/management/kmconfigdialog.cpp +++ b/tdeprint/management/kmconfigdialog.cpp @@ -30,7 +30,7 @@ #include "kmconfigjobs.h" #include -#include +#include #include #include diff --git a/tdeprint/management/kmconfigfilter.cpp b/tdeprint/management/kmconfigfilter.cpp index 21cbc418e..b7be0a1e6 100644 --- a/tdeprint/management/kmconfigfilter.cpp +++ b/tdeprint/management/kmconfigfilter.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmconfigfonts.cpp b/tdeprint/management/kmconfigfonts.cpp index 54ebdb87c..890a42045 100644 --- a/tdeprint/management/kmconfigfonts.cpp +++ b/tdeprint/management/kmconfigfonts.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmconfiggeneral.cpp b/tdeprint/management/kmconfiggeneral.cpp index b7c0a1522..635667cec 100644 --- a/tdeprint/management/kmconfiggeneral.cpp +++ b/tdeprint/management/kmconfiggeneral.cpp @@ -26,13 +26,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmconfigjobs.cpp b/tdeprint/management/kmconfigjobs.cpp index 667b40381..c31e525be 100644 --- a/tdeprint/management/kmconfigjobs.cpp +++ b/tdeprint/management/kmconfigjobs.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmconfigpreview.cpp b/tdeprint/management/kmconfigpreview.cpp index 3d084f735..2fdcbcb4b 100644 --- a/tdeprint/management/kmconfigpreview.cpp +++ b/tdeprint/management/kmconfigpreview.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmdbcreator.cpp b/tdeprint/management/kmdbcreator.cpp index 2297d4034..6154ebea2 100644 --- a/tdeprint/management/kmdbcreator.cpp +++ b/tdeprint/management/kmdbcreator.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmdriverdb.cpp b/tdeprint/management/kmdriverdb.cpp index 9eb28cf87..5a172281b 100644 --- a/tdeprint/management/kmdriverdb.cpp +++ b/tdeprint/management/kmdriverdb.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include KMDriverDB* KMDriverDB::m_self = 0; diff --git a/tdeprint/management/kmdriverdbwidget.cpp b/tdeprint/management/kmdriverdbwidget.cpp index 42d573e71..50297bdca 100644 --- a/tdeprint/management/kmdriverdbwidget.cpp +++ b/tdeprint/management/kmdriverdbwidget.cpp @@ -28,12 +28,12 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmdriverdialog.cpp b/tdeprint/management/kmdriverdialog.cpp index ef37e333c..c43017cc7 100644 --- a/tdeprint/management/kmdriverdialog.cpp +++ b/tdeprint/management/kmdriverdialog.cpp @@ -20,8 +20,8 @@ #include "kmdriverdialog.h" #include "driverview.h" -#include -#include +#include +#include KMDriverDialog::KMDriverDialog(TQWidget *parent, const char *name) : KDialogBase(KDialogBase::Swallow,i18n("Configure"),KDialogBase::Ok|KDialogBase::Cancel,KDialogBase::Ok,parent,name,true,false) diff --git a/tdeprint/management/kminfopage.cpp b/tdeprint/management/kminfopage.cpp index 9987ccb4c..bae2b6ad6 100644 --- a/tdeprint/management/kminfopage.cpp +++ b/tdeprint/management/kminfopage.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/management/kminstancepage.cpp b/tdeprint/management/kminstancepage.cpp index 8c263bb48..0cadf3dba 100644 --- a/tdeprint/management/kminstancepage.cpp +++ b/tdeprint/management/kminstancepage.cpp @@ -30,10 +30,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index 741e69378..98e9595f9 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/management/kmjobviewer.cpp @@ -33,15 +33,15 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmlistview.cpp b/tdeprint/management/kmlistview.cpp index 10741d7fe..806cc0d9f 100644 --- a/tdeprint/management/kmlistview.cpp +++ b/tdeprint/management/kmlistview.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp index 5e68f3726..4aba92dad 100644 --- a/tdeprint/management/kmmainview.cpp +++ b/tdeprint/management/kmmainview.cpp @@ -36,15 +36,15 @@ #include "messagewindow.h" #include -#include +#include #include #include #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmpages.cpp b/tdeprint/management/kmpages.cpp index 4f0f1f4f7..d0c413966 100644 --- a/tdeprint/management/kmpages.cpp +++ b/tdeprint/management/kmpages.cpp @@ -23,7 +23,7 @@ #include "kmpropertypage.h" #include "kminstancepage.h" -#include +#include #include #include diff --git a/tdeprint/management/kmprinterview.cpp b/tdeprint/management/kmprinterview.cpp index 6d7edb707..d311f75c3 100644 --- a/tdeprint/management/kmprinterview.cpp +++ b/tdeprint/management/kmprinterview.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include KMPrinterView::KMPrinterView(TQWidget *parent, const char *name) : TQWidgetStack(parent,name), m_type(KMPrinterView::Icons) diff --git a/tdeprint/management/kmpropbackend.cpp b/tdeprint/management/kmpropbackend.cpp index 98004d2ed..00aac2b40 100644 --- a/tdeprint/management/kmpropbackend.cpp +++ b/tdeprint/management/kmpropbackend.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropBackend::KMPropBackend(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropcontainer.cpp b/tdeprint/management/kmpropcontainer.cpp index 9c7808199..c94838098 100644 --- a/tdeprint/management/kmpropcontainer.cpp +++ b/tdeprint/management/kmpropcontainer.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmpropdriver.cpp b/tdeprint/management/kmpropdriver.cpp index 55daf0ed5..6f20494fc 100644 --- a/tdeprint/management/kmpropdriver.cpp +++ b/tdeprint/management/kmpropdriver.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropDriver::KMPropDriver(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropgeneral.cpp b/tdeprint/management/kmpropgeneral.cpp index c55603da9..6b24b0466 100644 --- a/tdeprint/management/kmpropgeneral.cpp +++ b/tdeprint/management/kmpropgeneral.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropmembers.cpp b/tdeprint/management/kmpropmembers.cpp index 26671eed8..7fc4155a0 100644 --- a/tdeprint/management/kmpropmembers.cpp +++ b/tdeprint/management/kmpropmembers.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropMembers::KMPropMembers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/management/kmpropwidget.cpp b/tdeprint/management/kmpropwidget.cpp index ae8b03cbf..50c1a75e8 100644 --- a/tdeprint/management/kmpropwidget.cpp +++ b/tdeprint/management/kmpropwidget.cpp @@ -23,8 +23,8 @@ #include "kmmanager.h" #include "kmtimer.h" -#include -#include +#include +#include KMPropWidget::KMPropWidget(TQWidget *parent, const char *name) : TQWidget(parent,name) diff --git a/tdeprint/management/kmspecialprinterdlg.cpp b/tdeprint/management/kmspecialprinterdlg.cpp index 2d2a245c7..7c4c0173d 100644 --- a/tdeprint/management/kmspecialprinterdlg.cpp +++ b/tdeprint/management/kmspecialprinterdlg.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/management/kmwbackend.cpp b/tdeprint/management/kmwbackend.cpp index 6fd8cf2dc..b2e8fdcd4 100644 --- a/tdeprint/management/kmwbackend.cpp +++ b/tdeprint/management/kmwbackend.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmwclass.cpp b/tdeprint/management/kmwclass.cpp index aee060e5f..e04467632 100644 --- a/tdeprint/management/kmwclass.cpp +++ b/tdeprint/management/kmwclass.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include KMWClass::KMWClass(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwdriver.cpp b/tdeprint/management/kmwdriver.cpp index 58793c192..9876c0420 100644 --- a/tdeprint/management/kmwdriver.cpp +++ b/tdeprint/management/kmwdriver.cpp @@ -24,7 +24,7 @@ #include "kmdriverdb.h" #include -#include +#include KMWDriver::KMWDriver(TQWidget *parent, const char *name) : KMWizardPage(parent,name) diff --git a/tdeprint/management/kmwdriverselect.cpp b/tdeprint/management/kmwdriverselect.cpp index f60dcface..cc52f1015 100644 --- a/tdeprint/management/kmwdriverselect.cpp +++ b/tdeprint/management/kmwdriverselect.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name) : KMWizardPage(parent,name) diff --git a/tdeprint/management/kmwdrivertest.cpp b/tdeprint/management/kmwdrivertest.cpp index cb46a45a0..73871988a 100644 --- a/tdeprint/management/kmwdrivertest.cpp +++ b/tdeprint/management/kmwdrivertest.cpp @@ -28,9 +28,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/management/kmwend.cpp b/tdeprint/management/kmwend.cpp index 2881b4ea0..4ad564cf6 100644 --- a/tdeprint/management/kmwend.cpp +++ b/tdeprint/management/kmwend.cpp @@ -23,7 +23,7 @@ #include "util.h" #include -#include +#include #include KMWEnd::KMWEnd(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwfile.cpp b/tdeprint/management/kmwfile.cpp index f3b54dcdc..58a61e8e4 100644 --- a/tdeprint/management/kmwfile.cpp +++ b/tdeprint/management/kmwfile.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include KMWFile::KMWFile(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwinfopage.cpp b/tdeprint/management/kmwinfopage.cpp index fd9e92697..175ff7e74 100644 --- a/tdeprint/management/kmwinfopage.cpp +++ b/tdeprint/management/kmwinfopage.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include KMWInfoPage::KMWInfoPage(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwizard.cpp b/tdeprint/management/kmwizard.cpp index 5bb86967a..bc894c478 100644 --- a/tdeprint/management/kmwizard.cpp +++ b/tdeprint/management/kmwizard.cpp @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kmwlocal.cpp b/tdeprint/management/kmwlocal.cpp index ea79563ec..424e40100 100644 --- a/tdeprint/management/kmwlocal.cpp +++ b/tdeprint/management/kmwlocal.cpp @@ -23,13 +23,13 @@ #include "kmfactory.h" #include "kmmanager.h" -#include +#include #include #include #include #include #include -#include +#include #include KMWLocal::KMWLocal(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwlpd.cpp b/tdeprint/management/kmwlpd.cpp index 352a075c5..3c4794ad1 100644 --- a/tdeprint/management/kmwlpd.cpp +++ b/tdeprint/management/kmwlpd.cpp @@ -23,11 +23,11 @@ #include "kmprinter.h" #include -#include +#include #include #include #include -#include +#include #include static bool checkLpdQueue(const char *host, const char *queue); diff --git a/tdeprint/management/kmwname.cpp b/tdeprint/management/kmwname.cpp index fe567f7bb..e8378371a 100644 --- a/tdeprint/management/kmwname.cpp +++ b/tdeprint/management/kmwname.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include KMWName::KMWName(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwpassword.cpp b/tdeprint/management/kmwpassword.cpp index 8490a179c..3cd71aadd 100644 --- a/tdeprint/management/kmwpassword.cpp +++ b/tdeprint/management/kmwpassword.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/management/kmwsmb.cpp b/tdeprint/management/kmwsmb.cpp index e76240cf8..836a7fb15 100644 --- a/tdeprint/management/kmwsmb.cpp +++ b/tdeprint/management/kmwsmb.cpp @@ -23,7 +23,7 @@ #include "kmprinter.h" #include "util.h" -#include +#include #include #include #include diff --git a/tdeprint/management/kmwsocket.cpp b/tdeprint/management/kmwsocket.cpp index 6b8f4aae9..a3fb71b3d 100644 --- a/tdeprint/management/kmwsocket.cpp +++ b/tdeprint/management/kmwsocket.cpp @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/management/kmwsocketutil.cpp b/tdeprint/management/kmwsocketutil.cpp index a4f23959a..02b0a6b69 100644 --- a/tdeprint/management/kmwsocketutil.cpp +++ b/tdeprint/management/kmwsocketutil.cpp @@ -27,13 +27,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include diff --git a/tdeprint/management/kxmlcommanddlg.cpp b/tdeprint/management/kxmlcommanddlg.cpp index 2080149d9..9b165e432 100644 --- a/tdeprint/management/kxmlcommanddlg.cpp +++ b/tdeprint/management/kxmlcommanddlg.cpp @@ -38,13 +38,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/management/kxmlcommandselector.cpp b/tdeprint/management/kxmlcommandselector.cpp index 67627fb53..08722cf6e 100644 --- a/tdeprint/management/kxmlcommandselector.cpp +++ b/tdeprint/management/kxmlcommandselector.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/networkscanner.cpp b/tdeprint/management/networkscanner.cpp index 1943f9354..ee4e7dbc7 100644 --- a/tdeprint/management/networkscanner.cpp +++ b/tdeprint/management/networkscanner.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/management/smbview.cpp b/tdeprint/management/smbview.cpp index 10ac359f9..f5977bfb0 100644 --- a/tdeprint/management/smbview.cpp +++ b/tdeprint/management/smbview.cpp @@ -20,14 +20,14 @@ #include "smbview.h" #include -#include +#include #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeprint/management/tdeprint_management_module.cpp b/tdeprint/management/tdeprint_management_module.cpp index d15ef791f..89d315c0f 100644 --- a/tdeprint/management/tdeprint_management_module.cpp +++ b/tdeprint/management/tdeprint_management_module.cpp @@ -26,9 +26,9 @@ #include "kmprinter.h" #include "kmmainview.h" -#include +#include #include -#include +#include extern "C" { diff --git a/tdeprint/marginpreview.cpp b/tdeprint/marginpreview.cpp index 2a5e21e59..45f70b7f1 100644 --- a/tdeprint/marginpreview.cpp +++ b/tdeprint/marginpreview.cpp @@ -19,7 +19,7 @@ #include "marginpreview.h" -#include +#include #include #include #include diff --git a/tdeprint/marginwidget.cpp b/tdeprint/marginwidget.cpp index 3ec1872f2..c483be123 100644 --- a/tdeprint/marginwidget.cpp +++ b/tdeprint/marginwidget.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include MarginWidget::MarginWidget(TQWidget *parent, const char* name, bool allowMetricUnit) : TQWidget(parent, name), m_default(4, 0), m_pagesize( 2 ) diff --git a/tdeprint/plugincombobox.cpp b/tdeprint/plugincombobox.cpp index 9ccfc8074..b2a686f6e 100644 --- a/tdeprint/plugincombobox.cpp +++ b/tdeprint/plugincombobox.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include PluginComboBox::PluginComboBox(TQWidget *parent, const char *name) diff --git a/tdeprint/posterpreview.cpp b/tdeprint/posterpreview.cpp index b76c0181a..0839af3d7 100644 --- a/tdeprint/posterpreview.cpp +++ b/tdeprint/posterpreview.cpp @@ -25,9 +25,9 @@ #include #include #include -#include +#include #include -#include +#include PosterPreview::PosterPreview( TQWidget *parent, const char *name ) : TQFrame( parent, name ) diff --git a/tdeprint/ppdloader.cpp b/tdeprint/ppdloader.cpp index dcf272b0a..b829e2e17 100644 --- a/tdeprint/ppdloader.cpp +++ b/tdeprint/ppdloader.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeprint/printerfilter.cpp b/tdeprint/printerfilter.cpp index d1889dd1c..4fc362350 100644 --- a/tdeprint/printerfilter.cpp +++ b/tdeprint/printerfilter.cpp @@ -22,7 +22,7 @@ #include "kmfactory.h" #include -#include +#include #include PrinterFilter::PrinterFilter(TQObject *parent, const char *name) diff --git a/tdeprint/rlpr/kmconfigproxy.cpp b/tdeprint/rlpr/kmconfigproxy.cpp index 78513dad3..d41adcdee 100644 --- a/tdeprint/rlpr/kmconfigproxy.cpp +++ b/tdeprint/rlpr/kmconfigproxy.cpp @@ -21,7 +21,7 @@ #include "kmproxywidget.h" #include -#include +#include KMConfigProxy::KMConfigProxy(TQWidget *parent) : KMConfigPage(parent,"Proxy") diff --git a/tdeprint/rlpr/kmproprlpr.cpp b/tdeprint/rlpr/kmproprlpr.cpp index 62fe97827..08713a784 100644 --- a/tdeprint/rlpr/kmproprlpr.cpp +++ b/tdeprint/rlpr/kmproprlpr.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include KMPropRlpr::KMPropRlpr(TQWidget *parent, const char *name) : KMPropWidget(parent,name) diff --git a/tdeprint/rlpr/kmproxywidget.cpp b/tdeprint/rlpr/kmproxywidget.cpp index a2a3e6a85..870da43c4 100644 --- a/tdeprint/rlpr/kmproxywidget.cpp +++ b/tdeprint/rlpr/kmproxywidget.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeprint/rlpr/kmrlprmanager.cpp b/tdeprint/rlpr/kmrlprmanager.cpp index c6704ed09..7b8ceac2d 100644 --- a/tdeprint/rlpr/kmrlprmanager.cpp +++ b/tdeprint/rlpr/kmrlprmanager.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include KMRlprManager::KMRlprManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMManager(parent,name) diff --git a/tdeprint/rlpr/kmrlpruimanager.cpp b/tdeprint/rlpr/kmrlpruimanager.cpp index 9bae2cdc4..fa6383962 100644 --- a/tdeprint/rlpr/kmrlpruimanager.cpp +++ b/tdeprint/rlpr/kmrlpruimanager.cpp @@ -26,7 +26,7 @@ #include "kmproprlpr.h" #include "kmconfigproxy.h" -#include +#include KMRlprUiManager::KMRlprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/) : KMUiManager(parent,name) diff --git a/tdeprint/rlpr/kmwrlpr.cpp b/tdeprint/rlpr/kmwrlpr.cpp index 79682b91a..056cba1f0 100644 --- a/tdeprint/rlpr/kmwrlpr.cpp +++ b/tdeprint/rlpr/kmwrlpr.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include static TQListViewItem* rlpr_findChild(TQListViewItem *c, const TQString& txt) diff --git a/tdeprint/rlpr/krlprprinterimpl.cpp b/tdeprint/rlpr/krlprprinterimpl.cpp index 8ca1c6569..4ef5ebe1e 100644 --- a/tdeprint/rlpr/krlprprinterimpl.cpp +++ b/tdeprint/rlpr/krlprprinterimpl.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include KRlprPrinterImpl::KRlprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) : KPrinterImpl(parent,name) diff --git a/tdeprint/tdefilelist.cpp b/tdeprint/tdefilelist.cpp index 19ffb481b..bf2fb3d12 100644 --- a/tdeprint/tdefilelist.cpp +++ b/tdeprint/tdefilelist.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/tdeprintd.cpp b/tdeprint/tdeprintd.cpp index 5080cc40c..9b7b6c955 100644 --- a/tdeprint/tdeprintd.cpp +++ b/tdeprint/tdeprintd.cpp @@ -21,9 +21,9 @@ #include "kprintprocess.h" #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeprint/tests/helpwindow.cpp b/tdeprint/tests/helpwindow.cpp index 11cf22fd2..54d160c73 100644 --- a/tdeprint/tests/helpwindow.cpp +++ b/tdeprint/tests/helpwindow.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeprint/tools/escputil/escpwidget.cpp b/tdeprint/tools/escputil/escpwidget.cpp index de54f2de1..9afff64ac 100644 --- a/tdeprint/tools/escputil/escpwidget.cpp +++ b/tdeprint/tools/escputil/escpwidget.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeprint/util.h b/tdeprint/util.h index dafcdaa90..75811aee6 100644 --- a/tdeprint/util.h +++ b/tdeprint/util.h @@ -23,7 +23,7 @@ #include "kprinter.h" #include #include -#include +#include KURL smbToUrl(const TQString& work, const TQString& server, const TQString& printer); void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& printer); diff --git a/tderandr/ktimerdialog.cpp b/tderandr/ktimerdialog.cpp index 0be416be7..eba497372 100644 --- a/tderandr/ktimerdialog.cpp +++ b/tderandr/ktimerdialog.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include "ktimerdialog.h" diff --git a/tderandr/libtderandr.cc b/tderandr/libtderandr.cc index 976b156ac..fe9461715 100644 --- a/tderandr/libtderandr.cc +++ b/tderandr/libtderandr.cc @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tderandr/randr.cpp b/tderandr/randr.cpp index 68bfc2e68..59fd0e8ae 100644 --- a/tderandr/randr.cpp +++ b/tderandr/randr.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tderesources/configdialog.cpp b/tderesources/configdialog.cpp index b6d29dcd3..4eb528835 100644 --- a/tderesources/configdialog.cpp +++ b/tderesources/configdialog.cpp @@ -21,9 +21,9 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include -#include +#include #include #include diff --git a/tderesources/configpage.cpp b/tderesources/configpage.cpp index e70332c71..8378707e6 100644 --- a/tderesources/configpage.cpp +++ b/tderesources/configpage.cpp @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tderesources/factory.cpp b/tderesources/factory.cpp index 09140e7b7..eea2d3673 100644 --- a/tderesources/factory.cpp +++ b/tderesources/factory.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include #include #include diff --git a/tderesources/kcmtderesources.cpp b/tderesources/kcmtderesources.cpp index 1b779fabd..c3d5ae09e 100644 --- a/tderesources/kcmtderesources.cpp +++ b/tderesources/kcmtderesources.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include "configpage.h" diff --git a/tderesources/resource.cpp b/tderesources/resource.cpp index 41c08767e..e6fc4ebbd 100644 --- a/tderesources/resource.cpp +++ b/tderesources/resource.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "resource.h" using namespace KRES; diff --git a/tderesources/selectdialog.cpp b/tderesources/selectdialog.cpp index c50bd36fd..c8009ae47 100644 --- a/tderesources/selectdialog.cpp +++ b/tderesources/selectdialog.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdersync/rsyncconfigdialog.cpp b/tdersync/rsyncconfigdialog.cpp index 78df9e335..675044140 100644 --- a/tdersync/rsyncconfigdialog.cpp +++ b/tdersync/rsyncconfigdialog.cpp @@ -71,13 +71,13 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tdersync/tdersync.h b/tdersync/tdersync.h index a4908fe63..b57c350a4 100644 --- a/tdersync/tdersync.h +++ b/tdersync/tdersync.h @@ -49,14 +49,14 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tdespell2/settings.cpp b/tdespell2/settings.cpp index 57535b85c..a23fb062f 100644 --- a/tdespell2/settings.cpp +++ b/tdespell2/settings.cpp @@ -23,8 +23,8 @@ #include "broker.h" -#include -#include +#include +#include #include #include diff --git a/tdespell2/ui/configdialog.cpp b/tdespell2/ui/configdialog.cpp index 56e39ca2b..288d62a29 100644 --- a/tdespell2/ui/configdialog.cpp +++ b/tdespell2/ui/configdialog.cpp @@ -21,7 +21,7 @@ #include "configdialog.h" #include "configwidget.h" -#include +#include #include diff --git a/tdespell2/ui/configwidget.cpp b/tdespell2/ui/configwidget.cpp index 6d98955ae..2317f7307 100644 --- a/tdespell2/ui/configwidget.cpp +++ b/tdespell2/ui/configwidget.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/tdespell2/ui/dialog.cpp b/tdespell2/ui/dialog.cpp index a0ff36c01..0c45f3cd1 100644 --- a/tdespell2/ui/dialog.cpp +++ b/tdespell2/ui/dialog.cpp @@ -28,7 +28,7 @@ #include "settings.h" #include -#include +#include #include #include diff --git a/tdesu/ssh.cpp b/tdesu/ssh.cpp index f45b38e7e..c23ca459b 100644 --- a/tdesu/ssh.cpp +++ b/tdesu/ssh.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "ssh.h" diff --git a/tdesu/su.cpp b/tdesu/su.cpp index d75970dd8..e29288ab9 100644 --- a/tdesu/su.cpp +++ b/tdesu/su.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "su.h" diff --git a/tdeui/CMakeLists.txt b/tdeui/CMakeLists.txt index 85d2fc9b4..8cff8df1c 100644 --- a/tdeui/CMakeLists.txt +++ b/tdeui/CMakeLists.txt @@ -43,7 +43,7 @@ install( FILES kcolordialog.h tdeselect.h kdatepik.h kdatepicker.h kdatetbl.h tdefontdialog.h tdepopupmenu.h tdefontrequester.h ktabctl.h kstatusbar.h - tdemainwindow.h tdemainwindowiface.h tdetoolbar.h kmenubar.h + tdemainwindow.h tdemainwindowiface.h tdetoolbar.h tdemenubar.h knuminput.h kseparator.h klineedit.h krestrictedline.h kcolorbutton.h kcolorbtn.h ksystemtray.h kdockwindow.h kbuttonbox.h @@ -54,7 +54,7 @@ install( FILES kcharselect.h kcolordrag.h qxembed.h knumvalidator.h kdialog.h kdialogbase.h kjanuswidget.h tdeaboutdialog.h - kauthicon.h kmessagebox.h ksharedpixmap.h + kauthicon.h tdemessagebox.h ksharedpixmap.h kdualcolorbtn.h kdualcolorbutton.h tdetoolbarbutton.h tdetoolbarradiogroup.h ktextbrowser.h tdeaction.h tdeactioncollection.h tdeactionclasses.h khelpmenu.h kswitchlanguagedialog.h @@ -103,7 +103,7 @@ set( ${target}_SRCS qxembed.cpp ksharedpixmap.cpp kpixmapio.cpp tdepopupmenu.cpp tdetoolbar.cpp tdeaction.cpp kstdaction.cpp tdeactioncollection.cpp tdeactionclasses.cpp - kurllabel.cpp kmenubar.cpp kinputdialog.cpp + kurllabel.cpp tdemenubar.cpp kinputdialog.cpp knuminput.cpp klineedit.cpp tdelistview.cpp kprogress.cpp kprogressbox.cpp kcolordialog.cpp tdeselect.cpp kdatepicker.cpp kdatetbl.cpp tdefontrequester.cpp tdefontdialog.cpp ktabctl.cpp @@ -118,7 +118,7 @@ set( ${target}_SRCS kcharselect.cpp kcolordrag.cpp knumvalidator.cpp kdialog.cpp kdialogbase.cpp kjanuswidget.cpp tdeaboutdialog.cpp - kauthicon.cpp kmessagebox.cpp kdualcolorbutton.cpp + kauthicon.cpp tdemessagebox.cpp kdualcolorbutton.cpp tdetoolbarradiogroup.cpp tdetoolbarbutton.cpp ktextbrowser.cpp khelpmenu.cpp kswitchlanguagedialog.cpp kcmenumngr.cpp kpanelmenu.cpp diff --git a/tdeui/MAINTAINERS b/tdeui/MAINTAINERS index f4e2165fb..2caa911a2 100644 --- a/tdeui/MAINTAINERS +++ b/tdeui/MAINTAINERS @@ -54,8 +54,8 @@ tdelistbox.cpp tdelistview.cpp tdemainwindow.cpp tdemainwindowiface.cpp -kmenubar.cpp -kmessagebox.cpp Waldo Bastian +tdemenubar.cpp +tdemessagebox.cpp Waldo Bastian knuminput.cpp Dirk Mueller knumvalidator.cpp kpanelapplet.cpp diff --git a/tdeui/Makefile.am b/tdeui/Makefile.am index 26a9423cd..eac8cde0e 100644 --- a/tdeui/Makefile.am +++ b/tdeui/Makefile.am @@ -40,7 +40,7 @@ include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ kcolordialog.h tdeselect.h \ kdatepik.h kdatepicker.h kdatetbl.h tdefontdialog.h tdepopupmenu.h \ tdefontrequester.h ktabctl.h kstatusbar.h \ - tdemainwindow.h tdemainwindowiface.h tdetoolbar.h kmenubar.h \ + tdemainwindow.h tdemainwindowiface.h tdetoolbar.h tdemenubar.h \ knuminput.h kseparator.h klineedit.h \ krestrictedline.h kcolorbutton.h kcolorbtn.h \ ksystemtray.h kdockwindow.h kbuttonbox.h \ @@ -51,7 +51,7 @@ include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ kcharselect.h kcolordrag.h qxembed.h \ knumvalidator.h kdialog.h kdialogbase.h \ kjanuswidget.h tdeaboutdialog.h \ - kauthicon.h kmessagebox.h ksharedpixmap.h \ + kauthicon.h tdemessagebox.h ksharedpixmap.h \ kdualcolorbtn.h kdualcolorbutton.h tdetoolbarbutton.h \ tdetoolbarradiogroup.h ktextbrowser.h \ tdeaction.h tdeactioncollection.h tdeactionclasses.h khelpmenu.h kswitchlanguagedialog.h \ @@ -84,7 +84,7 @@ libtdeui_la_SOURCES = \ qxembed.cpp ksharedpixmap.cpp kpixmapio.cpp \ tdepopupmenu.cpp tdetoolbar.cpp tdeaction.cpp kstdaction.cpp \ tdeactioncollection.cpp tdeactionclasses.cpp \ - kurllabel.cpp kmenubar.cpp kinputdialog.cpp \ + kurllabel.cpp tdemenubar.cpp kinputdialog.cpp \ knuminput.cpp klineedit.cpp tdelistview.cpp kprogress.cpp \ kprogressbox.cpp kcolordialog.cpp tdeselect.cpp kdatepicker.cpp \ kdatetbl.cpp tdefontrequester.cpp tdefontdialog.cpp ktabctl.cpp \ @@ -99,7 +99,7 @@ libtdeui_la_SOURCES = \ kcharselect.cpp kcolordrag.cpp \ knumvalidator.cpp kdialog.cpp kdialogbase.cpp \ kjanuswidget.cpp tdeaboutdialog.cpp \ - kauthicon.cpp kmessagebox.cpp kdualcolorbutton.cpp \ + kauthicon.cpp tdemessagebox.cpp kdualcolorbutton.cpp \ tdetoolbarradiogroup.cpp tdetoolbarbutton.cpp \ ktextbrowser.cpp khelpmenu.cpp kswitchlanguagedialog.cpp \ kcmenumngr.cpp kpanelmenu.cpp \ diff --git a/tdeui/kauthicon.cpp b/tdeui/kauthicon.cpp index d4c18a114..d45217d9b 100644 --- a/tdeui/kauthicon.cpp +++ b/tdeui/kauthicon.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "kauthicon.h" diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index 91c6aa66c..3e49e112c 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -50,7 +50,7 @@ #include "kdepackages.h" #include #include -#include +#include #include #include diff --git a/tdeui/kbuttonbox.cpp b/tdeui/kbuttonbox.cpp index 6351c512d..faa26e95e 100644 --- a/tdeui/kbuttonbox.cpp +++ b/tdeui/kbuttonbox.cpp @@ -50,7 +50,7 @@ */ #include "kbuttonbox.moc" -#include +#include #include #include #include diff --git a/tdeui/kcharselect.cpp b/tdeui/kcharselect.cpp index a623b3efa..5561e5883 100644 --- a/tdeui/kcharselect.cpp +++ b/tdeui/kcharselect.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include class KCharSelect::KCharSelectPrivate { diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index b0f261890..60e250575 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -21,7 +21,7 @@ #include #include #include "kcmenumngr.h" -#include "kglobal.h" +#include "tdeglobal.h" #include "tdeconfig.h" #include "tdeshortcut.h" diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index 993530497..5a42406a0 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "kcolordialog.h" #include "kcolorbutton.h" diff --git a/tdeui/kcolorcombo.cpp b/tdeui/kcolorcombo.cpp index 7e9353cf4..87d5de32a 100644 --- a/tdeui/kcolorcombo.cpp +++ b/tdeui/kcolorcombo.cpp @@ -46,12 +46,12 @@ #include #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index 29292f960..458fb50a8 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -47,13 +47,13 @@ #include #include -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 3ddb4390b..cfef5fd5b 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kcommand.cpp b/tdeui/kcommand.cpp index e039a03ca..994d1262e 100644 --- a/tdeui/kcommand.cpp +++ b/tdeui/kcommand.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include KCommand::~KCommand() diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 3cc224f4a..17f523d86 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 98d72030d..99f1ce4af 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -32,10 +32,10 @@ #include #include "kdatepicker.h" -#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index 542f89f08..56edf9a5c 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -33,11 +33,11 @@ // dateSelected(TQDate) #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeui/kdatewidget.cpp b/tdeui/kdatewidget.cpp index 2f240a256..e9185a9c1 100644 --- a/tdeui/kdatewidget.cpp +++ b/tdeui/kdatewidget.cpp @@ -23,8 +23,8 @@ #include #include "knuminput.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kcalendarsystem.h" //#include "kdatepicker.h" #include "kdialog.h" diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index f6b2b8b56..86f7f7476 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 6656d6803..890f79179 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -34,11 +34,11 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index a761f43c6..bf99c6801 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -34,13 +34,13 @@ #ifndef NO_KDE2 #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include "config.h" #ifdef Q_WS_X11 diff --git a/tdeui/kdualcolorbutton.cpp b/tdeui/kdualcolorbutton.cpp index f0cd5cae1..532e4aaaa 100644 --- a/tdeui/kdualcolorbutton.cpp +++ b/tdeui/kdualcolorbutton.cpp @@ -21,7 +21,7 @@ #include "kcolordrag.h" #include "dcolorarrow.xbm" #include "dcolorreset.xpm" -#include +#include #include #include #include diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index 37cee99fb..a550a7af1 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/keditcl2.cpp b/tdeui/keditcl2.cpp index a7db92555..4749a471f 100644 --- a/tdeui/keditcl2.cpp +++ b/tdeui/keditcl2.cpp @@ -34,9 +34,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 1a31bbaa4..6f22b091a 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index e1abdc875..639b22926 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -33,11 +33,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kguiitem.h b/tdeui/kguiitem.h index bb1233de3..538275f3d 100644 --- a/tdeui/kguiitem.h +++ b/tdeui/kguiitem.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include /** * @short An abstract class for GUI data such as ToolTip and Icon. diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 41fa063c2..08755b860 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index bcf9550b4..7273cbe13 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -27,8 +27,8 @@ #include "kwordwrap.h" #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/kiconviewsearchline.cpp b/tdeui/kiconviewsearchline.cpp index 33df94a6a..7082fc910 100644 --- a/tdeui/kiconviewsearchline.cpp +++ b/tdeui/kiconviewsearchline.cpp @@ -27,7 +27,7 @@ #include "kiconviewsearchline.h" #include -#include +#include #include #include diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index e9dd9df85..c3a8838e9 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -35,9 +35,9 @@ #include #include // Access to some static members -#include -#include -#include +#include +#include +#include #include #include #include "kjanuswidget.h" diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index 24191aa45..9b530b751 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "config.h" #ifdef Q_WS_X11 diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 7faad35c4..35fe0e45f 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -42,12 +42,12 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index a1c05aaab..588746ec1 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/klineeditdlg.cpp b/tdeui/klineeditdlg.cpp index ca4fd8266..8fc0a9a4f 100644 --- a/tdeui/klineeditdlg.cpp +++ b/tdeui/klineeditdlg.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index 71158370b..0a5fe0188 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -33,10 +33,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include #include @@ -568,4 +568,4 @@ void KMenuBar::drawContents( TQPainter* p ) void KMenuBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "kmenubar.moc" +#include "tdemenubar.moc" diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index 5684c6484..3208e94d8 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -37,13 +37,13 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #ifdef Q_WS_X11 #include diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp index f6c3d9dd7..40f87da29 100644 --- a/tdeui/knuminput.cpp +++ b/tdeui/knuminput.cpp @@ -44,8 +44,8 @@ #include #include -#include -#include +#include +#include #include #include "kdialog.h" diff --git a/tdeui/knumvalidator.cpp b/tdeui/knumvalidator.cpp index ce5c66842..6cf486ad1 100644 --- a/tdeui/knumvalidator.cpp +++ b/tdeui/knumvalidator.cpp @@ -26,8 +26,8 @@ #include #include "knumvalidator.h" -#include -#include +#include +#include #include /////////////////////////////////////////////////////////////// diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index 184e83422..287208b66 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include +#include #include #include diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 302b4e679..64904c581 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -34,12 +34,12 @@ #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeui/kpassivepopup.cpp b/tdeui/kpassivepopup.cpp index 8892ce153..ba3459b45 100644 --- a/tdeui/kpassivepopup.cpp +++ b/tdeui/kpassivepopup.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "config.h" #ifdef Q_WS_X11 diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index 7ce3a1be2..02054aad3 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/tdeui/kpixmapregionselectordialog.cpp b/tdeui/kpixmapregionselectordialog.cpp index c394af0f3..8228cd2f1 100644 --- a/tdeui/kpixmapregionselectordialog.cpp +++ b/tdeui/kpixmapregionselectordialog.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent, diff --git a/tdeui/kpixmapregionselectorwidget.cpp b/tdeui/kpixmapregionselectorwidget.cpp index bd82cae72..21ac875db 100644 --- a/tdeui/kpixmapregionselectorwidget.cpp +++ b/tdeui/kpixmapregionselectorwidget.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kprogress.cpp b/tdeui/kprogress.cpp index 3f0186e3d..8fb050a11 100644 --- a/tdeui/kprogress.cpp +++ b/tdeui/kprogress.cpp @@ -35,7 +35,7 @@ #include "kprogress.h" #include -#include +#include #include KProgress::KProgress(TQWidget *parent, const char *name, WFlags f) diff --git a/tdeui/kprogressbox.cpp b/tdeui/kprogressbox.cpp index 6dda25a33..2472207f4 100644 --- a/tdeui/kprogressbox.cpp +++ b/tdeui/kprogressbox.cpp @@ -38,7 +38,7 @@ #include "kprogressbox.h" #include -#include +#include #include struct KProgressBoxDialog::KProgressBoxDialogPrivate diff --git a/tdeui/kpushbutton.cpp b/tdeui/kpushbutton.cpp index e92fe8583..6f994dbe3 100644 --- a/tdeui/kpushbutton.cpp +++ b/tdeui/kpushbutton.cpp @@ -25,9 +25,9 @@ #include "config.h" -#include +#include #include -#include +#include #include #include diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index d27ae07ca..a9958dea9 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -30,9 +30,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index 997de84b3..40cbb8ee4 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -25,7 +25,7 @@ #include "kscrollview.h" #include #include -#include +#include struct KScrollView::KScrollViewPrivate { KScrollViewPrivate() : dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false) {} diff --git a/tdeui/ksplashscreen.cpp b/tdeui/ksplashscreen.cpp index a45a579bb..82234bd94 100644 --- a/tdeui/ksplashscreen.cpp +++ b/tdeui/ksplashscreen.cpp @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include #include diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index 134d7f1a5..daa22f46b 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include KStatusBarLabel::KStatusBarLabel( const TQString& text, int _id, diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index 8dd874a9d..652534601 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -25,9 +25,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include "kstdaction_p.h" diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h index a5449d8e7..4a8fee92e 100644 --- a/tdeui/kstdaction_p.h +++ b/tdeui/kstdaction_p.h @@ -19,7 +19,7 @@ #ifndef _KSTDACTION_PRIVATE_H_ #define _KSTDACTION_PRIVATE_H_ -#include +#include #include namespace KStdAction diff --git a/tdeui/kstdguiitem.cpp b/tdeui/kstdguiitem.cpp index 78f3fd6f6..80bf54bce 100644 --- a/tdeui/kstdguiitem.cpp +++ b/tdeui/kstdguiitem.cpp @@ -19,7 +19,7 @@ #include "kstdguiitem.h" #include -#include +#include #include KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum ) diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index c9bb7552a..c82ffb83d 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index ba938382b..f7627621c 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -26,10 +26,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index fcd0389da..5004d4bf1 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -20,12 +20,12 @@ #include "config.h" #include "tdeaction.h" -#include "kmessagebox.h" +#include "tdemessagebox.h" #include "tdeshortcut.h" #include "ksystemtray.h" #include "tdepopupmenu.h" #include "tdeapplication.h" -#include "klocale.h" +#include "tdelocale.h" #include "tdeaboutdata.h" #ifdef Q_WS_X11 diff --git a/tdeui/ksystemtray.h b/tdeui/ksystemtray.h index 711515985..f7e81c9b1 100644 --- a/tdeui/ksystemtray.h +++ b/tdeui/ksystemtray.h @@ -18,7 +18,7 @@ #ifndef KSYSTEMTRAY_H #define KSYSTEMTRAY_H -#include +#include #include class TDEActionCollection; diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp index 2e2fbe301..911162f14 100644 --- a/tdeui/ktabbar.cpp +++ b/tdeui/ktabbar.cpp @@ -26,9 +26,9 @@ #include #include -#include +#include #include -#include +#include #include "ktabbar.h" #include "ktabwidget.h" diff --git a/tdeui/ktextbrowser.cpp b/tdeui/ktextbrowser.cpp index b17e38067..a4b716db7 100644 --- a/tdeui/ktextbrowser.cpp +++ b/tdeui/ktextbrowser.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index fb0e607fa..445540099 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -26,10 +26,10 @@ #include #include #include -#include +#include #include #include -#include +#include class KTextEdit::KTextEditPrivate { diff --git a/tdeui/ktimezonewidget.cpp b/tdeui/ktimezonewidget.cpp index c7046231f..f6488847f 100644 --- a/tdeui/ktimezonewidget.cpp +++ b/tdeui/ktimezonewidget.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 44f710fb9..b3e7d832b 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -37,16 +37,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include -#include +#include #include #include #include #include #include #include -#include +#include #ifdef Q_WS_X11 #include diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index 0a95a2c70..749b4f5b5 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include "kurllabel.h" diff --git a/tdeui/kwhatsthismanager.cpp b/tdeui/kwhatsthismanager.cpp index bcf48438c..46643f6f0 100644 --- a/tdeui/kwhatsthismanager.cpp +++ b/tdeui/kwhatsthismanager.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include KWhatsThisManager *KWhatsThisManager::s_instance = 0; diff --git a/tdeui/kwizard.cpp b/tdeui/kwizard.cpp index 0e378dbf2..b8fa1e88a 100644 --- a/tdeui/kwizard.cpp +++ b/tdeui/kwizard.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include "kwizard.h" diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index 6fd472ad5..ff4083779 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -20,14 +20,14 @@ #include "tdeapplication.h" #include "kxmlguibuilder.h" -#include "kmenubar.h" +#include "tdemenubar.h" #include "tdepopupmenu.h" #include "tdetoolbar.h" #include "kstatusbar.h" #include "tdemainwindow.h" #include "tdeaction.h" -#include "kglobalsettings.h" -#include +#include "tdeglobalsettings.h" +#include #include #include #include diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 0a2aae41d..87015bfd5 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/kxmlguifactory_p.cpp b/tdeui/kxmlguifactory_p.cpp index ffe9ffab1..699f9579d 100644 --- a/tdeui/kxmlguifactory_p.cpp +++ b/tdeui/kxmlguifactory_p.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/tdeui/tdeaboutapplication.cpp b/tdeui/tdeaboutapplication.cpp index 08ee46450..ef9efb181 100644 --- a/tdeui/tdeaboutapplication.cpp +++ b/tdeui/tdeaboutapplication.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include "ktextedit.h" diff --git a/tdeui/tdeaboutdialog.cpp b/tdeui/tdeaboutdialog.cpp index b46c0b959..895247161 100644 --- a/tdeui/tdeaboutdialog.cpp +++ b/tdeui/tdeaboutdialog.cpp @@ -32,9 +32,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/tdeui/tdeabouttde.cpp b/tdeui/tdeabouttde.cpp index 0e7078af4..d5f45c85a 100644 --- a/tdeui/tdeabouttde.cpp +++ b/tdeui/tdeabouttde.cpp @@ -22,7 +22,7 @@ // I (espen) prefer that header files are included alphabetically #include #include -#include +#include #include diff --git a/tdeui/tdeaction.cpp b/tdeui/tdeaction.cpp index d817a5ba4..6f29ab848 100644 --- a/tdeui/tdeaction.cpp +++ b/tdeui/tdeaction.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/tdeactionclasses.cpp b/tdeui/tdeactionclasses.cpp index 1fc963887..4b589f166 100644 --- a/tdeui/tdeactionclasses.cpp +++ b/tdeui/tdeactionclasses.cpp @@ -47,9 +47,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tdeui/tdeactionselector.cpp b/tdeui/tdeactionselector.cpp index 3ef22a45f..c3c7329b8 100644 --- a/tdeui/tdeactionselector.cpp +++ b/tdeui/tdeactionselector.cpp @@ -19,7 +19,7 @@ #include "tdeactionselector.h" -#include +#include #include #include // for spacingHint() #include diff --git a/tdeui/tdecmodule.cpp b/tdeui/tdecmodule.cpp index 4e6ce943f..c6b7d3726 100644 --- a/tdeui/tdecmodule.cpp +++ b/tdeui/tdecmodule.cpp @@ -27,9 +27,9 @@ #include #include #include -#include +#include #include -#include +#include #include "tdecmodule.h" #include "tdecmodule.moc" diff --git a/tdeui/tdecompletionbox.cpp b/tdeui/tdecompletionbox.cpp index 53a8c71fb..96c9c1794 100644 --- a/tdeui/tdecompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "tdecompletionbox.h" diff --git a/tdeui/tdeconfigdialog.cpp b/tdeui/tdeconfigdialog.cpp index c8e848fa3..df43defc5 100644 --- a/tdeui/tdeconfigdialog.cpp +++ b/tdeui/tdeconfigdialog.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/tdeui/tdefontcombo.cpp b/tdeui/tdefontcombo.cpp index fc9ae830b..cb250385f 100644 --- a/tdeui/tdefontcombo.cpp +++ b/tdeui/tdefontcombo.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "tdefontcombo.h" diff --git a/tdeui/tdefontdialog.cpp b/tdeui/tdefontdialog.cpp index 15c687e13..75f4599e0 100644 --- a/tdeui/tdefontdialog.cpp +++ b/tdeui/tdefontdialog.cpp @@ -45,11 +45,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/tdeui/tdefontrequester.cpp b/tdeui/tdefontrequester.cpp index 64eba5701..459938d12 100644 --- a/tdeui/tdefontrequester.cpp +++ b/tdeui/tdefontrequester.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name, bool onlyFixed ) : TQWidget( parent, name ), diff --git a/tdeui/tdelistbox.cpp b/tdeui/tdelistbox.cpp index 9f7c23688..0e4c5d520 100644 --- a/tdeui/tdelistbox.cpp +++ b/tdeui/tdelistbox.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include #include diff --git a/tdeui/tdelistview.cpp b/tdeui/tdelistview.cpp index 020f18679..4750a7138 100644 --- a/tdeui/tdelistview.cpp +++ b/tdeui/tdelistview.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/tdelistviewsearchline.cpp b/tdeui/tdelistviewsearchline.cpp index 20d78add2..b74b4d1c1 100644 --- a/tdeui/tdelistviewsearchline.cpp +++ b/tdeui/tdelistviewsearchline.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tdemainwindow.cpp b/tdeui/tdemainwindow.cpp index 01b6a09e0..ba9c51556 100644 --- a/tdeui/tdemainwindow.cpp +++ b/tdeui/tdemainwindow.cpp @@ -40,13 +40,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #if defined Q_WS_X11 diff --git a/tdeui/tdeshortcutdialog.cpp b/tdeui/tdeshortcutdialog.cpp index fe3593b7e..35a7706c7 100644 --- a/tdeui/tdeshortcutdialog.cpp +++ b/tdeui/tdeshortcutdialog.cpp @@ -55,10 +55,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/tdeui/tdespell.cpp b/tdeui/tdespell.cpp index 629013121..031011f0a 100644 --- a/tdeui/tdespell.cpp +++ b/tdeui/tdespell.cpp @@ -38,9 +38,9 @@ #include #include -#include +#include #include -#include +#include #include "tdespell.h" #include "tdespelldlg.h" #include diff --git a/tdeui/tdespelldlg.cpp b/tdeui/tdespelldlg.cpp index 280ddf861..9e8206505 100644 --- a/tdeui/tdespelldlg.cpp +++ b/tdeui/tdespelldlg.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/tdetoolbar.cpp b/tdeui/tdetoolbar.cpp index a095f1493..a3ced3a19 100644 --- a/tdeui/tdetoolbar.cpp +++ b/tdeui/tdetoolbar.cpp @@ -46,11 +46,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tdeui/tdetoolbar.h b/tdeui/tdetoolbar.h index 37e22c9bb..857673f28 100644 --- a/tdeui/tdetoolbar.h +++ b/tdeui/tdetoolbar.h @@ -33,7 +33,7 @@ #include #include -#include +#include class TQDomElement; class TQSize; diff --git a/tdeui/tdetoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index 608c31a32..abf23ffc7 100644 --- a/tdeui/tdetoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -40,8 +40,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tdeui/tdetoolbarbutton.h b/tdeui/tdetoolbarbutton.h index 49e906e6e..c73c1145a 100644 --- a/tdeui/tdetoolbarbutton.h +++ b/tdeui/tdetoolbarbutton.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include class TDEToolBar; class TDEToolBarButtonPrivate; diff --git a/tdeui/tdetoolbarhandler.cpp b/tdeui/tdetoolbarhandler.cpp index 4242a119e..da621fadd 100644 --- a/tdeui/tdetoolbarhandler.cpp +++ b/tdeui/tdetoolbarhandler.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index c96d6a4eb..c3b6d1ddc 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/tdeui/tests/kaboutdialogtest.cpp b/tdeui/tests/kaboutdialogtest.cpp index c3be2de25..e0680b52f 100644 --- a/tdeui/tests/kaboutdialogtest.cpp +++ b/tdeui/tests/kaboutdialogtest.cpp @@ -12,7 +12,7 @@ // #include #include #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kcharselecttest.cpp b/tdeui/tests/kcharselecttest.cpp index ccd6cd10a..5ee4ee381 100644 --- a/tdeui/tests/kcharselecttest.cpp +++ b/tdeui/tests/kcharselecttest.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "kcharselect.h" int main (int argc,char **argv) diff --git a/tdeui/tests/kcolordlgtest.cpp b/tdeui/tests/kcolordlgtest.cpp index f45df0de7..dbe39484c 100644 --- a/tdeui/tests/kcolordlgtest.cpp +++ b/tdeui/tests/kcolordlgtest.cpp @@ -20,7 +20,7 @@ #include #include "kcolordialog.h" #include -#include +#include int main( int argc, char *argv[] ) { diff --git a/tdeui/tests/kcomboboxtest.cpp b/tdeui/tests/kcomboboxtest.cpp index 225c80c0f..d2b59a4c2 100644 --- a/tdeui/tests/kcomboboxtest.cpp +++ b/tdeui/tests/kcomboboxtest.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tests/kcompletiontest.cpp b/tdeui/tests/kcompletiontest.cpp index 12e3835dc..261534465 100644 --- a/tdeui/tests/kcompletiontest.cpp +++ b/tdeui/tests/kcompletiontest.cpp @@ -1,4 +1,4 @@ -#include +#include /**************************************************************************** ** Form implementation generated from reading ui file './kcompletiontest.ui' ** diff --git a/tdeui/tests/kdatepicktest.cpp b/tdeui/tests/kdatepicktest.cpp index abcfeb24a..8bdab90a4 100644 --- a/tdeui/tests/kdatepicktest.cpp +++ b/tdeui/tests/kdatepicktest.cpp @@ -1,7 +1,7 @@ #include "kdatepicker.h" #include #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kdatetimewidgettest.cpp b/tdeui/tests/kdatetimewidgettest.cpp index 721f86492..f94a2a9f7 100644 --- a/tdeui/tests/kdatetimewidgettest.cpp +++ b/tdeui/tests/kdatetimewidgettest.cpp @@ -1,6 +1,6 @@ #include "kdatetimewidget.h" #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kdatewidgettest.cpp b/tdeui/tests/kdatewidgettest.cpp index 11fb243f3..22340b4c9 100644 --- a/tdeui/tests/kdatewidgettest.cpp +++ b/tdeui/tests/kdatewidgettest.cpp @@ -1,7 +1,7 @@ #include "kdatewidget.h" #include #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/kdockwidgettest.cpp b/tdeui/tests/kdockwidgettest.cpp index 683d42acd..aacac19a0 100644 --- a/tdeui/tests/kdockwidgettest.cpp +++ b/tdeui/tests/kdockwidgettest.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/tdeui/tests/kdualcolortest.cpp b/tdeui/tests/kdualcolortest.cpp index e52d6e671..512bfc610 100644 --- a/tdeui/tests/kdualcolortest.cpp +++ b/tdeui/tests/kdualcolortest.cpp @@ -1,7 +1,7 @@ #include "kdualcolortest.h" #include #include -#include +#include #include #include diff --git a/tdeui/tests/klineedittest.cpp b/tdeui/tests/klineedittest.cpp index 793988968..20e9b6ca8 100644 --- a/tdeui/tests/klineedittest.cpp +++ b/tdeui/tests/klineedittest.cpp @@ -9,9 +9,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include "klineedittest.h" diff --git a/tdeui/tests/kmessageboxtest.cpp b/tdeui/tests/kmessageboxtest.cpp index ce333edee..2a56a7ead 100644 --- a/tdeui/tests/kmessageboxtest.cpp +++ b/tdeui/tests/kmessageboxtest.cpp @@ -1,4 +1,4 @@ -#include "kmessagebox.h" +#include "tdemessagebox.h" #include #include @@ -10,7 +10,7 @@ #include #include -#include +#include class ExampleWidget : public QLabel { diff --git a/tdeui/tests/kstatusbartest.cpp b/tdeui/tests/kstatusbartest.cpp index 82c03e271..0a8c6d10c 100644 --- a/tdeui/tests/kstatusbartest.cpp +++ b/tdeui/tests/kstatusbartest.cpp @@ -12,7 +12,7 @@ #include "kstatusbar.h" #include #include -#include +#include #include "kstatusbartest.h" testWindow::testWindow (TQWidget *, const char *name) diff --git a/tdeui/tests/kstatusbartest.h b/tdeui/tests/kstatusbartest.h index 34dd6df81..712f24352 100644 --- a/tdeui/tests/kstatusbartest.h +++ b/tdeui/tests/kstatusbartest.h @@ -1,7 +1,7 @@ #ifndef test_kstatusbar_h #define test_kstatusbar_h -#include +#include #include #include #include diff --git a/tdeui/tests/ktimewidgettest.cpp b/tdeui/tests/ktimewidgettest.cpp index bbff45648..731dc3219 100644 --- a/tdeui/tests/ktimewidgettest.cpp +++ b/tdeui/tests/ktimewidgettest.cpp @@ -1,6 +1,6 @@ #include "ktimewidget.h" #include -#include +#include int main(int argc, char** argv) { diff --git a/tdeui/tests/tdemainwindowtest.cpp b/tdeui/tests/tdemainwindowtest.cpp index c8ace159e..b19818d4c 100644 --- a/tdeui/tests/tdemainwindowtest.cpp +++ b/tdeui/tests/tdemainwindowtest.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "tdemainwindowtest.h" diff --git a/tdeui/tests/twindowtest.cpp b/tdeui/tests/twindowtest.cpp index 3823ab46f..77e01d289 100644 --- a/tdeui/tests/twindowtest.cpp +++ b/tdeui/tests/twindowtest.cpp @@ -13,14 +13,14 @@ #include #include #include -#include +#include #include #include #include #include #include "twindowtest.h" -#include +#include //#include diff --git a/tdeui/tests/twindowtest.h b/tdeui/tests/twindowtest.h index 83a0d75bf..d1d9d460e 100644 --- a/tdeui/tests/twindowtest.h +++ b/tdeui/tests/twindowtest.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index 7ca8fda3f..bc2df2f66 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include +#include #include #include diff --git a/tdeunittest/modrunner.cpp b/tdeunittest/modrunner.cpp index 4caa2d609..350778f6c 100644 --- a/tdeunittest/modrunner.cpp +++ b/tdeunittest/modrunner.cpp @@ -24,11 +24,11 @@ */ #include -#include +#include #include #include #include -#include +#include #include "runner.h" diff --git a/tdeunittest/runner.cpp b/tdeunittest/runner.cpp index 6a961fecd..c63b6ed6c 100644 --- a/tdeunittest/runner.cpp +++ b/tdeunittest/runner.cpp @@ -35,7 +35,7 @@ using namespace std; #include #include -#include +#include #include #include "runner.h" diff --git a/tdeunittest/tester.h b/tdeunittest/tester.h index 332381ec8..b0ce3e685 100644 --- a/tdeunittest/tester.h +++ b/tdeunittest/tester.h @@ -138,7 +138,7 @@ SampleTest - 1 test passed, 1 test failed * #include * #include * #include - * #include + * #include * #include * * static const char description[] = I18N_NOOP("SampleTests"); diff --git a/tdeutils/kcmultidialog.cpp b/tdeutils/kcmultidialog.cpp index 9bb067ca0..6a074040b 100644 --- a/tdeutils/kcmultidialog.cpp +++ b/tdeutils/kcmultidialog.cpp @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeutils/kcmultidialog.h b/tdeutils/kcmultidialog.h index 46dde98fb..ca6d2d6c7 100644 --- a/tdeutils/kcmultidialog.h +++ b/tdeutils/kcmultidialog.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include class TDECModuleProxy; diff --git a/tdeutils/kfind.cpp b/tdeutils/kfind.cpp index 99ef317b6..74fb46e9a 100644 --- a/tdeutils/kfind.cpp +++ b/tdeutils/kfind.cpp @@ -22,8 +22,8 @@ #include "kfind.h" #include "kfinddialog.h" #include -#include -#include +#include +#include #include #include #include diff --git a/tdeutils/kfinddialog.cpp b/tdeutils/kfinddialog.cpp index d9a5284e1..718fdca2f 100644 --- a/tdeutils/kfinddialog.cpp +++ b/tdeutils/kfinddialog.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/tdeutils/kplugininfo.cpp b/tdeutils/kplugininfo.cpp index cb93b2600..9ea0eb2bc 100644 --- a/tdeutils/kplugininfo.cpp +++ b/tdeutils/kplugininfo.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeutils/kpluginselector.cpp b/tdeutils/kpluginselector.cpp index 5747df7c4..9fe08b027 100644 --- a/tdeutils/kpluginselector.cpp +++ b/tdeutils/kpluginselector.cpp @@ -35,12 +35,12 @@ #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdeutils/kreplace.cpp b/tdeutils/kreplace.cpp index 0aad733da..98e3ce93c 100644 --- a/tdeutils/kreplace.cpp +++ b/tdeutils/kreplace.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include "kreplace.h" #include "kreplacedialog.h" #include diff --git a/tdeutils/kreplacedialog.cpp b/tdeutils/kreplacedialog.cpp index 88c006b4d..d8e74af44 100644 --- a/tdeutils/kreplacedialog.cpp +++ b/tdeutils/kreplacedialog.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include /** diff --git a/tdeutils/ksettings/componentsdialog.cpp b/tdeutils/ksettings/componentsdialog.cpp index 50ad97a03..f60613bce 100644 --- a/tdeutils/ksettings/componentsdialog.cpp +++ b/tdeutils/ksettings/componentsdialog.cpp @@ -18,7 +18,7 @@ */ #include "ksettings/componentsdialog.h" -#include +#include #include #include #include diff --git a/tdeutils/ksettings/dialog.cpp b/tdeutils/ksettings/dialog.cpp index 49918b5e7..e74b9ac48 100644 --- a/tdeutils/ksettings/dialog.cpp +++ b/tdeutils/ksettings/dialog.cpp @@ -21,7 +21,7 @@ #include -#include +#include #include #include #include diff --git a/tdeutils/tdecmodulecontainer.cpp b/tdeutils/tdecmodulecontainer.cpp index c379a9857..004ceb78a 100644 --- a/tdeutils/tdecmodulecontainer.cpp +++ b/tdeutils/tdecmodulecontainer.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdeutils/tdecmoduleinfo.cpp b/tdeutils/tdecmoduleinfo.cpp index 3a7fdfd63..4869bb1ef 100644 --- a/tdeutils/tdecmoduleinfo.cpp +++ b/tdeutils/tdecmoduleinfo.cpp @@ -25,9 +25,9 @@ #include #include -#include +#include #include -#include +#include #include "tdecmoduleinfo.h" diff --git a/tdeutils/tdecmoduleloader.cpp b/tdeutils/tdecmoduleloader.cpp index 73f92379f..ced28ae7a 100644 --- a/tdeutils/tdecmoduleloader.cpp +++ b/tdeutils/tdecmoduleloader.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include "tdecmoduleloader.h" diff --git a/tdeutils/tdecmoduleproxy.cpp b/tdeutils/tdecmoduleproxy.cpp index 2d3150935..eeac43b02 100644 --- a/tdeutils/tdecmoduleproxy.cpp +++ b/tdeutils/tdecmoduleproxy.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdewallet/backend/tdewalletbackend.cc b/tdewallet/backend/tdewalletbackend.cc index 9871b9d7b..17fecae0c 100644 --- a/tdewallet/backend/tdewalletbackend.cc +++ b/tdewallet/backend/tdewalletbackend.cc @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tdewallet/tests/tdewalletasync.cpp b/tdewallet/tests/tdewalletasync.cpp index 7668b90a7..75d475b97 100644 --- a/tdewallet/tests/tdewalletasync.cpp +++ b/tdewallet/tests/tdewalletasync.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdewallet/tests/tdewalletboth.cpp b/tdewallet/tests/tdewalletboth.cpp index a5ba26711..efeeebc98 100644 --- a/tdewallet/tests/tdewalletboth.cpp +++ b/tdewallet/tests/tdewalletboth.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tdewallet/tests/tdewalletsync.cpp b/tdewallet/tests/tdewalletsync.cpp index 4774e289e..9ee39e4d4 100644 --- a/tdewallet/tests/tdewalletsync.cpp +++ b/tdewallet/tests/tdewalletsync.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/win/pro_files/kabc/kabc.pro b/win/pro_files/kabc/kabc.pro index 7e38e3c7d..b3eae05b4 100644 --- a/win/pro_files/kabc/kabc.pro +++ b/win/pro_files/kabc/kabc.pro @@ -8,8 +8,8 @@ LIBS += $$KDELIBDESTDIR\tdecore$$KDELIB_SUFFIX $$KDELIBDESTDIR\tdeui$$KDELIB_SUF $$KDELIBDESTDIR\tderesources$$KDELIB_SUFFIX $$KDELIBDESTDIR\dcop$$KDELIB_SUFFIX \ $$KDELIBDESTDIR\kio$$KDELIB_SUFFIX $$KDELIBDESTDIR\kvcard$$KDELIB_SUFFIX -INCLUDEPATH += $(KDELIBS)/kabc/vcard/include $(KDELIBS)/kabc/vcard/include/generated \ - $(KDELIBS)/kabc/vcardparser +INCLUDEPATH += $(KDELIBS)/tdeabc/vcard/include $(KDELIBS)/tdeabc/vcard/include/generated \ + $(KDELIBS)/tdeabc/vcardparser system( bash kmoc ) system( bash kdcopidl ) diff --git a/win/pro_files/kabc/vcard/vcard.pro b/win/pro_files/kabc/vcard/vcard.pro index 8dedc015e..e2de8e6d7 100644 --- a/win/pro_files/kabc/vcard/vcard.pro +++ b/win/pro_files/kabc/vcard/vcard.pro @@ -7,8 +7,8 @@ DEFINES += MAKE_KVCARD_LIB LIBS += $$KDELIBDESTDIR\tdecore$$KDELIB_SUFFIX -INCLUDEPATH += $(KDELIBS)/kabc/vcard/include $(KDELIBS)/kabc/vcard/include/generated \ - $(KDELIBS)/kabc/vcardparser +INCLUDEPATH += $(KDELIBS)/tdeabc/vcard/include $(KDELIBS)/tdeabc/vcard/include/generated \ + $(KDELIBS)/tdeabc/vcardparser system( bash kmoc ) system( bash kdcopidl ) diff --git a/win/pro_files/kio/kio.pro b/win/pro_files/kio/kio.pro index da790d7d1..dc16d76b8 100644 --- a/win/pro_files/kio/kio.pro +++ b/win/pro_files/kio/kio.pro @@ -46,7 +46,7 @@ tdeio/kdcopservicestarter.cpp \ tdeio/kdirlister.cpp \ tdeio/kdirnotify.cpp \ tdeio/kdirwatch.cpp \ -tdeio/kemailsettings.cpp \ +tdeio/tdeemailsettings.cpp \ tdeio/tdefilefilter.cpp \ tdeio/tdefileitem.cpp \ tdeio/tdefilemetainfo.cpp \ @@ -59,7 +59,7 @@ tdeio/kmimetype.cpp \ tdeio/kmimetypechooser.cpp \ tdeio/knfsshare.cpp \ tdeio/kprotocolinfo.cpp \ -tdeio/kprotocolmanager.cpp \ +tdeio/tdeprotocolmanager.cpp \ tdeio/kremoteencoding.cpp \ tdeio/krun.cpp \ tdeio/ksambashare.cpp \ @@ -118,7 +118,7 @@ bookmarks/kbookmarkmenu.cc \ \ tdefile/kcombiview.cpp \ tdefile/kcustommenueditor.cpp \ -tdefile/kdiroperator.cpp \ +tdefile/tdediroperator.cpp \ tdefile/kdirselectdialog.cpp \ tdefile/kdirsize.cpp \ tdefile/kdiskfreesp.cpp \ diff --git a/win/pro_files/tdecore/tdecore.pro b/win/pro_files/tdecore/tdecore.pro index 7e564a250..fbc415726 100644 --- a/win/pro_files/tdecore/tdecore.pro +++ b/win/pro_files/tdecore/tdecore.pro @@ -49,9 +49,9 @@ kstandarddirs.cpp \ tdeconfig.cpp \ tdeconfigdialogmanager.cpp \ kcharsets.cpp \ -kglobal.cpp \ +tdeglobal.cpp \ kdebug.cpp \ -ktempfile.cpp \ +tdetempfile.cpp \ ktempdir.cpp \ ksavefile.cpp \ tdeconfigbackend.cpp \ @@ -70,11 +70,11 @@ tdeshortcutmenu.cpp \ tdeshortcutlist.cpp \ kinstance.cpp \ tdeversion.cpp \ -klocale.cpp \ +tdelocale.cpp \ kicontheme.cpp \ kiconloader.cpp \ kiconeffect.cpp \ -kglobalsettings.cpp \ +tdeglobalsettings.cpp \ kckey.cpp \ kglobalaccel.cpp \ kglobalaccel_win.cpp \ @@ -120,7 +120,7 @@ kqiodevicegzip_p.cpp #network/tdesocketdevice.cpp \ #network/ksockssocketdevice.cpp -#kstartupinfo.cpp \ +#tdestartupinfo.cpp \ #todo: kextsock.cpp \ #todo: ksock.cpp \ #todo: ksocks.cpp \ diff --git a/win/pro_files/tdeui/tdeui.pro b/win/pro_files/tdeui/tdeui.pro index b5a506f8b..aa1065c7d 100644 --- a/win/pro_files/tdeui/tdeui.pro +++ b/win/pro_files/tdeui/tdeui.pro @@ -71,7 +71,7 @@ tdelistview.cpp \ tdelistviewsearchline.cpp \ tdemainwindowiface.cpp \ tdemainwindow.cpp \ -kmenubar.cpp \ +tdemenubar.cpp \ knuminput.cpp \ knumvalidator.cpp \ kpanelapplet.cpp \ @@ -132,7 +132,7 @@ exists( kmessagebox_win.cpp ) { SOURCES += kmessagebox_win.cpp } !exists( kmessagebox_win.cpp ) { - SOURCES += kmessagebox.cpp + SOURCES += tdemessagebox.cpp } # generated: diff --git a/win/tools/build_tdelibs_dbg b/win/tools/build_tdelibs_dbg index 3fcfe0c20..79f3b0f32 100644 --- a/win/tools/build_tdelibs_dbg +++ b/win/tools/build_tdelibs_dbg @@ -48,7 +48,7 @@ tdecore \ tdeui \ kio \ tderesources \ -kabc/vcard \ +tdeabc/vcard \ kabc \ tdeutils \ tdeparts \ diff --git a/win/tools/build_tdelibs_rel b/win/tools/build_tdelibs_rel index 399dcadda..2fe77ef36 100644 --- a/win/tools/build_tdelibs_rel +++ b/win/tools/build_tdelibs_rel @@ -48,7 +48,7 @@ tdeui \ kstyles/thinkeramik/widget-engine \ kio \ tderesources \ -kabc/vcard \ +tdeabc/vcard \ kabc \ tdeutils \ tdeparts \ -- cgit v1.2.3
    KHTMLWidget::setDefaultFontBase()TDEHTMLWidget::setDefaultFontBase() -> setFontSizes()
    -      #include <kglobal.h>
    +      #include <tdeglobal.h>
           #include <tdeconfig.h>      // Needed to use TDEConfig
    -      #include <klocale.h>      // Needed to use TDELocale
    +      #include <tdelocale.h>      // Needed to use TDELocale
           #include <kiconloader.h>  // Needed to use TDEIconLoader