git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kopete-otr@1092925 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
498ff4e365
@ -0,0 +1,2 @@
|
|||||||
|
Michael Zanetti <michael_zanetti@gmx.net
|
||||||
|
Frank Scheffold <fscheffold@googlemail.com>
|
@ -0,0 +1,355 @@
|
|||||||
|
GNU Free Documentation License
|
||||||
|
Version 1.1, March 2000
|
||||||
|
|
||||||
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
0. PREAMBLE
|
||||||
|
|
||||||
|
The purpose of this License is to make a manual, textbook, or other
|
||||||
|
written document "free" in the sense of freedom: to assure everyone
|
||||||
|
the effective freedom to copy and redistribute it, with or without
|
||||||
|
modifying it, either commercially or noncommercially. Secondarily,
|
||||||
|
this License preserves for the author and publisher a way to get
|
||||||
|
credit for their work, while not being considered responsible for
|
||||||
|
modifications made by others.
|
||||||
|
|
||||||
|
This License is a kind of "copyleft", which means that derivative
|
||||||
|
works of the document must themselves be free in the same sense. It
|
||||||
|
complements the GNU General Public License, which is a copyleft
|
||||||
|
license designed for free software.
|
||||||
|
|
||||||
|
We have designed this License in order to use it for manuals for free
|
||||||
|
software, because free software needs free documentation: a free
|
||||||
|
program should come with manuals providing the same freedoms that the
|
||||||
|
software does. But this License is not limited to software manuals;
|
||||||
|
it can be used for any textual work, regardless of subject matter or
|
||||||
|
whether it is published as a printed book. We recommend this License
|
||||||
|
principally for works whose purpose is instruction or reference.
|
||||||
|
|
||||||
|
|
||||||
|
1. APPLICABILITY AND DEFINITIONS
|
||||||
|
|
||||||
|
This License applies to any manual or other work that contains a
|
||||||
|
notice placed by the copyright holder saying it can be distributed
|
||||||
|
under the terms of this License. The "Document", below, refers to any
|
||||||
|
such manual or work. Any member of the public is a licensee, and is
|
||||||
|
addressed as "you".
|
||||||
|
|
||||||
|
A "Modified Version" of the Document means any work containing the
|
||||||
|
Document or a portion of it, either copied verbatim, or with
|
||||||
|
modifications and/or translated into another language.
|
||||||
|
|
||||||
|
A "Secondary Section" is a named appendix or a front-matter section of
|
||||||
|
the Document that deals exclusively with the relationship of the
|
||||||
|
publishers or authors of the Document to the Document's overall subject
|
||||||
|
(or to related matters) and contains nothing that could fall directly
|
||||||
|
within that overall subject. (For example, if the Document is in part a
|
||||||
|
textbook of mathematics, a Secondary Section may not explain any
|
||||||
|
mathematics.) The relationship could be a matter of historical
|
||||||
|
connection with the subject or with related matters, or of legal,
|
||||||
|
commercial, philosophical, ethical or political position regarding
|
||||||
|
them.
|
||||||
|
|
||||||
|
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||||
|
are designated, as being those of Invariant Sections, in the notice
|
||||||
|
that says that the Document is released under this License.
|
||||||
|
|
||||||
|
The "Cover Texts" are certain short passages of text that are listed,
|
||||||
|
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||||
|
the Document is released under this License.
|
||||||
|
|
||||||
|
A "Transparent" copy of the Document means a machine-readable copy,
|
||||||
|
represented in a format whose specification is available to the
|
||||||
|
general public, whose contents can be viewed and edited directly and
|
||||||
|
straightforwardly with generic text editors or (for images composed of
|
||||||
|
pixels) generic paint programs or (for drawings) some widely available
|
||||||
|
drawing editor, and that is suitable for input to text formatters or
|
||||||
|
for automatic translation to a variety of formats suitable for input
|
||||||
|
to text formatters. A copy made in an otherwise Transparent file
|
||||||
|
format whose markup has been designed to thwart or discourage
|
||||||
|
subsequent modification by readers is not Transparent. A copy that is
|
||||||
|
not "Transparent" is called "Opaque".
|
||||||
|
|
||||||
|
Examples of suitable formats for Transparent copies include plain
|
||||||
|
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||||
|
or XML using a publicly available DTD, and standard-conforming simple
|
||||||
|
HTML designed for human modification. Opaque formats include
|
||||||
|
PostScript, PDF, proprietary formats that can be read and edited only
|
||||||
|
by proprietary word processors, SGML or XML for which the DTD and/or
|
||||||
|
processing tools are not generally available, and the
|
||||||
|
machine-generated HTML produced by some word processors for output
|
||||||
|
purposes only.
|
||||||
|
|
||||||
|
The "Title Page" means, for a printed book, the title page itself,
|
||||||
|
plus such following pages as are needed to hold, legibly, the material
|
||||||
|
this License requires to appear in the title page. For works in
|
||||||
|
formats which do not have any title page as such, "Title Page" means
|
||||||
|
the text near the most prominent appearance of the work's title,
|
||||||
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
|
||||||
|
2. VERBATIM COPYING
|
||||||
|
|
||||||
|
You may copy and distribute the Document in any medium, either
|
||||||
|
commercially or noncommercially, provided that this License, the
|
||||||
|
copyright notices, and the license notice saying this License applies
|
||||||
|
to the Document are reproduced in all copies, and that you add no other
|
||||||
|
conditions whatsoever to those of this License. You may not use
|
||||||
|
technical measures to obstruct or control the reading or further
|
||||||
|
copying of the copies you make or distribute. However, you may accept
|
||||||
|
compensation in exchange for copies. If you distribute a large enough
|
||||||
|
number of copies you must also follow the conditions in section 3.
|
||||||
|
|
||||||
|
You may also lend copies, under the same conditions stated above, and
|
||||||
|
you may publicly display copies.
|
||||||
|
|
||||||
|
|
||||||
|
3. COPYING IN QUANTITY
|
||||||
|
|
||||||
|
If you publish printed copies of the Document numbering more than 100,
|
||||||
|
and the Document's license notice requires Cover Texts, you must enclose
|
||||||
|
the copies in covers that carry, clearly and legibly, all these Cover
|
||||||
|
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||||
|
the back cover. Both covers must also clearly and legibly identify
|
||||||
|
you as the publisher of these copies. The front cover must present
|
||||||
|
the full title with all words of the title equally prominent and
|
||||||
|
visible. You may add other material on the covers in addition.
|
||||||
|
Copying with changes limited to the covers, as long as they preserve
|
||||||
|
the title of the Document and satisfy these conditions, can be treated
|
||||||
|
as verbatim copying in other respects.
|
||||||
|
|
||||||
|
If the required texts for either cover are too voluminous to fit
|
||||||
|
legibly, you should put the first ones listed (as many as fit
|
||||||
|
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||||
|
pages.
|
||||||
|
|
||||||
|
If you publish or distribute Opaque copies of the Document numbering
|
||||||
|
more than 100, you must either include a machine-readable Transparent
|
||||||
|
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||||
|
a publicly-accessible computer-network location containing a complete
|
||||||
|
Transparent copy of the Document, free of added material, which the
|
||||||
|
general network-using public has access to download anonymously at no
|
||||||
|
charge using public-standard network protocols. If you use the latter
|
||||||
|
option, you must take reasonably prudent steps, when you begin
|
||||||
|
distribution of Opaque copies in quantity, to ensure that this
|
||||||
|
Transparent copy will remain thus accessible at the stated location
|
||||||
|
until at least one year after the last time you distribute an Opaque
|
||||||
|
copy (directly or through your agents or retailers) of that edition to
|
||||||
|
the public.
|
||||||
|
|
||||||
|
It is requested, but not required, that you contact the authors of the
|
||||||
|
Document well before redistributing any large number of copies, to give
|
||||||
|
them a chance to provide you with an updated version of the Document.
|
||||||
|
|
||||||
|
|
||||||
|
4. MODIFICATIONS
|
||||||
|
|
||||||
|
You may copy and distribute a Modified Version of the Document under
|
||||||
|
the conditions of sections 2 and 3 above, provided that you release
|
||||||
|
the Modified Version under precisely this License, with the Modified
|
||||||
|
Version filling the role of the Document, thus licensing distribution
|
||||||
|
and modification of the Modified Version to whoever possesses a copy
|
||||||
|
of it. In addition, you must do these things in the Modified Version:
|
||||||
|
|
||||||
|
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||||
|
from that of the Document, and from those of previous versions
|
||||||
|
(which should, if there were any, be listed in the History section
|
||||||
|
of the Document). You may use the same title as a previous version
|
||||||
|
if the original publisher of that version gives permission.
|
||||||
|
B. List on the Title Page, as authors, one or more persons or entities
|
||||||
|
responsible for authorship of the modifications in the Modified
|
||||||
|
Version, together with at least five of the principal authors of the
|
||||||
|
Document (all of its principal authors, if it has less than five).
|
||||||
|
C. State on the Title page the name of the publisher of the
|
||||||
|
Modified Version, as the publisher.
|
||||||
|
D. Preserve all the copyright notices of the Document.
|
||||||
|
E. Add an appropriate copyright notice for your modifications
|
||||||
|
adjacent to the other copyright notices.
|
||||||
|
F. Include, immediately after the copyright notices, a license notice
|
||||||
|
giving the public permission to use the Modified Version under the
|
||||||
|
terms of this License, in the form shown in the Addendum below.
|
||||||
|
G. Preserve in that license notice the full lists of Invariant Sections
|
||||||
|
and required Cover Texts given in the Document's license notice.
|
||||||
|
H. Include an unaltered copy of this License.
|
||||||
|
I. Preserve the section entitled "History", and its title, and add to
|
||||||
|
it an item stating at least the title, year, new authors, and
|
||||||
|
publisher of the Modified Version as given on the Title Page. If
|
||||||
|
there is no section entitled "History" in the Document, create one
|
||||||
|
stating the title, year, authors, and publisher of the Document as
|
||||||
|
given on its Title Page, then add an item describing the Modified
|
||||||
|
Version as stated in the previous sentence.
|
||||||
|
J. Preserve the network location, if any, given in the Document for
|
||||||
|
public access to a Transparent copy of the Document, and likewise
|
||||||
|
the network locations given in the Document for previous versions
|
||||||
|
it was based on. These may be placed in the "History" section.
|
||||||
|
You may omit a network location for a work that was published at
|
||||||
|
least four years before the Document itself, or if the original
|
||||||
|
publisher of the version it refers to gives permission.
|
||||||
|
K. In any section entitled "Acknowledgements" or "Dedications",
|
||||||
|
preserve the section's title, and preserve in the section all the
|
||||||
|
substance and tone of each of the contributor acknowledgements
|
||||||
|
and/or dedications given therein.
|
||||||
|
L. Preserve all the Invariant Sections of the Document,
|
||||||
|
unaltered in their text and in their titles. Section numbers
|
||||||
|
or the equivalent are not considered part of the section titles.
|
||||||
|
M. Delete any section entitled "Endorsements". Such a section
|
||||||
|
may not be included in the Modified Version.
|
||||||
|
N. Do not retitle any existing section as "Endorsements"
|
||||||
|
or to conflict in title with any Invariant Section.
|
||||||
|
|
||||||
|
If the Modified Version includes new front-matter sections or
|
||||||
|
appendices that qualify as Secondary Sections and contain no material
|
||||||
|
copied from the Document, you may at your option designate some or all
|
||||||
|
of these sections as invariant. To do this, add their titles to the
|
||||||
|
list of Invariant Sections in the Modified Version's license notice.
|
||||||
|
These titles must be distinct from any other section titles.
|
||||||
|
|
||||||
|
You may add a section entitled "Endorsements", provided it contains
|
||||||
|
nothing but endorsements of your Modified Version by various
|
||||||
|
parties--for example, statements of peer review or that the text has
|
||||||
|
been approved by an organization as the authoritative definition of a
|
||||||
|
standard.
|
||||||
|
|
||||||
|
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||||
|
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||||
|
of Cover Texts in the Modified Version. Only one passage of
|
||||||
|
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||||
|
through arrangements made by) any one entity. If the Document already
|
||||||
|
includes a cover text for the same cover, previously added by you or
|
||||||
|
by arrangement made by the same entity you are acting on behalf of,
|
||||||
|
you may not add another; but you may replace the old one, on explicit
|
||||||
|
permission from the previous publisher that added the old one.
|
||||||
|
|
||||||
|
The author(s) and publisher(s) of the Document do not by this License
|
||||||
|
give permission to use their names for publicity for or to assert or
|
||||||
|
imply endorsement of any Modified Version.
|
||||||
|
|
||||||
|
|
||||||
|
5. COMBINING DOCUMENTS
|
||||||
|
|
||||||
|
You may combine the Document with other documents released under this
|
||||||
|
License, under the terms defined in section 4 above for modified
|
||||||
|
versions, provided that you include in the combination all of the
|
||||||
|
Invariant Sections of all of the original documents, unmodified, and
|
||||||
|
list them all as Invariant Sections of your combined work in its
|
||||||
|
license notice.
|
||||||
|
|
||||||
|
The combined work need only contain one copy of this License, and
|
||||||
|
multiple identical Invariant Sections may be replaced with a single
|
||||||
|
copy. If there are multiple Invariant Sections with the same name but
|
||||||
|
different contents, make the title of each such section unique by
|
||||||
|
adding at the end of it, in parentheses, the name of the original
|
||||||
|
author or publisher of that section if known, or else a unique number.
|
||||||
|
Make the same adjustment to the section titles in the list of
|
||||||
|
Invariant Sections in the license notice of the combined work.
|
||||||
|
|
||||||
|
In the combination, you must combine any sections entitled "History"
|
||||||
|
in the various original documents, forming one section entitled
|
||||||
|
"History"; likewise combine any sections entitled "Acknowledgements",
|
||||||
|
and any sections entitled "Dedications". You must delete all sections
|
||||||
|
entitled "Endorsements."
|
||||||
|
|
||||||
|
|
||||||
|
6. COLLECTIONS OF DOCUMENTS
|
||||||
|
|
||||||
|
You may make a collection consisting of the Document and other documents
|
||||||
|
released under this License, and replace the individual copies of this
|
||||||
|
License in the various documents with a single copy that is included in
|
||||||
|
the collection, provided that you follow the rules of this License for
|
||||||
|
verbatim copying of each of the documents in all other respects.
|
||||||
|
|
||||||
|
You may extract a single document from such a collection, and distribute
|
||||||
|
it individually under this License, provided you insert a copy of this
|
||||||
|
License into the extracted document, and follow this License in all
|
||||||
|
other respects regarding verbatim copying of that document.
|
||||||
|
|
||||||
|
|
||||||
|
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||||
|
|
||||||
|
A compilation of the Document or its derivatives with other separate
|
||||||
|
and independent documents or works, in or on a volume of a storage or
|
||||||
|
distribution medium, does not as a whole count as a Modified Version
|
||||||
|
of the Document, provided no compilation copyright is claimed for the
|
||||||
|
compilation. Such a compilation is called an "aggregate", and this
|
||||||
|
License does not apply to the other self-contained works thus compiled
|
||||||
|
with the Document, on account of their being thus compiled, if they
|
||||||
|
are not themselves derivative works of the Document.
|
||||||
|
|
||||||
|
If the Cover Text requirement of section 3 is applicable to these
|
||||||
|
copies of the Document, then if the Document is less than one quarter
|
||||||
|
of the entire aggregate, the Document's Cover Texts may be placed on
|
||||||
|
covers that surround only the Document within the aggregate.
|
||||||
|
Otherwise they must appear on covers around the whole aggregate.
|
||||||
|
|
||||||
|
|
||||||
|
8. TRANSLATION
|
||||||
|
|
||||||
|
Translation is considered a kind of modification, so you may
|
||||||
|
distribute translations of the Document under the terms of section 4.
|
||||||
|
Replacing Invariant Sections with translations requires special
|
||||||
|
permission from their copyright holders, but you may include
|
||||||
|
translations of some or all Invariant Sections in addition to the
|
||||||
|
original versions of these Invariant Sections. You may include a
|
||||||
|
translation of this License provided that you also include the
|
||||||
|
original English version of this License. In case of a disagreement
|
||||||
|
between the translation and the original English version of this
|
||||||
|
License, the original English version will prevail.
|
||||||
|
|
||||||
|
|
||||||
|
9. TERMINATION
|
||||||
|
|
||||||
|
You may not copy, modify, sublicense, or distribute the Document except
|
||||||
|
as expressly provided for under this License. Any other attempt to
|
||||||
|
copy, modify, sublicense or distribute the Document is void, and will
|
||||||
|
automatically terminate your rights under this License. However,
|
||||||
|
parties who have received copies, or rights, from you under this
|
||||||
|
License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
|
||||||
|
10. FUTURE REVISIONS OF THIS LICENSE
|
||||||
|
|
||||||
|
The Free Software Foundation may publish new, revised versions
|
||||||
|
of the GNU Free Documentation License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns. See
|
||||||
|
http://www.gnu.org/copyleft/.
|
||||||
|
|
||||||
|
Each version of the License is given a distinguishing version number.
|
||||||
|
If the Document specifies that a particular numbered version of this
|
||||||
|
License "or any later version" applies to it, you have the option of
|
||||||
|
following the terms and conditions either of that specified version or
|
||||||
|
of any later version that has been published (not as a draft) by the
|
||||||
|
Free Software Foundation. If the Document does not specify a version
|
||||||
|
number of this License, you may choose any version ever published (not
|
||||||
|
as a draft) by the Free Software Foundation.
|
||||||
|
|
||||||
|
|
||||||
|
ADDENDUM: How to use this License for your documents
|
||||||
|
|
||||||
|
To use this License in a document you have written, include a copy of
|
||||||
|
the License in the document and put the following copyright and
|
||||||
|
license notices just after the title page:
|
||||||
|
|
||||||
|
Copyright (c) YEAR YOUR NAME.
|
||||||
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
under the terms of the GNU Free Documentation License, Version 1.1
|
||||||
|
or any later version published by the Free Software Foundation;
|
||||||
|
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||||
|
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||||
|
A copy of the license is included in the section entitled "GNU
|
||||||
|
Free Documentation License".
|
||||||
|
|
||||||
|
If you have no Invariant Sections, write "with no Invariant Sections"
|
||||||
|
instead of saying which ones are invariant. If you have no
|
||||||
|
Front-Cover Texts, write "no Front-Cover Texts" instead of
|
||||||
|
"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
|
||||||
|
|
||||||
|
If your document contains nontrivial examples of program code, we
|
||||||
|
recommend releasing these examples in parallel under your choice of
|
||||||
|
free software license, such as the GNU General Public License,
|
||||||
|
to permit their use in free software.
|
@ -0,0 +1,283 @@
|
|||||||
|
# Doxyfile 1.5.1-KDevelop
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
PROJECT_NAME = kopete-otr
|
||||||
|
PROJECT_NUMBER = 0.6
|
||||||
|
OUTPUT_DIRECTORY =
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
USE_WINDOWS_ENCODING = NO
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = YES
|
||||||
|
STRIP_FROM_PATH = ./kopete_otr-alt/
|
||||||
|
STRIP_FROM_INC_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
DETAILS_AT_TOP = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 8
|
||||||
|
ALIASES =
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = NO
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = YES
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_DIRECTORIES = NO
|
||||||
|
FILE_VERSION_FILTER =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LOGFILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = ./kopete_otr
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.d \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.idl \
|
||||||
|
*.odl \
|
||||||
|
*.cs \
|
||||||
|
*.php \
|
||||||
|
*.php3 \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.C \
|
||||||
|
*.CC \
|
||||||
|
*.C++ \
|
||||||
|
*.II \
|
||||||
|
*.I++ \
|
||||||
|
*.H \
|
||||||
|
*.HH \
|
||||||
|
*.H++ \
|
||||||
|
*.CS \
|
||||||
|
*.PHP \
|
||||||
|
*.PHP3 \
|
||||||
|
*.M \
|
||||||
|
*.MM \
|
||||||
|
*.PY \
|
||||||
|
*.C \
|
||||||
|
*.H \
|
||||||
|
*.tlh \
|
||||||
|
*.diff \
|
||||||
|
*.patch \
|
||||||
|
*.moc \
|
||||||
|
*.xpm \
|
||||||
|
*.dox
|
||||||
|
RECURSIVE = yes
|
||||||
|
EXCLUDE =
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS =
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER =
|
||||||
|
FILTER_PATTERNS =
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = NO
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER =
|
||||||
|
HTML_FOOTER =
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_LATEX = YES
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = NO
|
||||||
|
USE_PDFLATEX = NO
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
MAN_LINKS = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_XML = yes
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the Perl module output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED =
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE = kopete_otr.tag
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 1000
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SEARCHENGINE = NO
|
@ -0,0 +1,167 @@
|
|||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, a file
|
||||||
|
`config.cache' that saves the results of its tests to speed up
|
||||||
|
reconfiguring, and a file `config.log' containing compiler output
|
||||||
|
(useful mainly for debugging `configure').
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If at some point `config.cache'
|
||||||
|
contains results you don't want to keep, you may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.in' is used to create `configure' by a program
|
||||||
|
called `autoconf'. You only need `configure.in' if you want to change
|
||||||
|
it or regenerate `configure' using a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes a while. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
4. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. You can give `configure'
|
||||||
|
initial values for variables by setting them in the environment. Using
|
||||||
|
a Bourne-compatible shell, you can do that on the command line like
|
||||||
|
this:
|
||||||
|
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||||
|
|
||||||
|
Or on systems that have the `env' program, you can do it like this:
|
||||||
|
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not supports the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a time
|
||||||
|
in the source code directory. After you have installed the package for
|
||||||
|
one architecture, use `make distclean' before reconfiguring for another
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' will install the package's files in
|
||||||
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||||
|
installation prefix other than `/usr/local' by giving `configure' the
|
||||||
|
option `--prefix=PATH'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||||
|
PATH as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' can not figure out
|
||||||
|
automatically, but needs to determine by the type of host the package
|
||||||
|
will run on. Usually `configure' can figure that out, but if it prints
|
||||||
|
a message saying it can not guess the host type, give it the
|
||||||
|
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name with three fields:
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the host type.
|
||||||
|
|
||||||
|
If you are building compiler tools for cross-compiling, you can also
|
||||||
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
|
produce code for and the `--build=TYPE' option to select the type of
|
||||||
|
system on which you are compiling the package.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Operation Controls
|
||||||
|
==================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Use and save the results of the tests in FILE instead of
|
||||||
|
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||||
|
debugging `configure'.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made.
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options.
|
||||||
|
|
@ -0,0 +1,23 @@
|
|||||||
|
SUBDIRS = $(TOPSUBDIRS)
|
||||||
|
|
||||||
|
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
|
||||||
|
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
|
||||||
|
|
||||||
|
$(top_srcdir)/subdirs:
|
||||||
|
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
|
||||||
|
|
||||||
|
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
|
||||||
|
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
|
||||||
|
|
||||||
|
package-messages:
|
||||||
|
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
|
||||||
|
$(MAKE) -C po merge
|
||||||
|
|
||||||
|
EXTRA_DIST = admin COPYING configure.in.in
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
cd $(top_distdir) && perl admin/am_edit -padmin
|
||||||
|
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
|
||||||
|
METASOURCES = AUTO
|
@ -0,0 +1,10 @@
|
|||||||
|
all:
|
||||||
|
@echo "This Makefile is only for the CVS repository"
|
||||||
|
@echo "This will be deleted before making the distribution"
|
||||||
|
@echo ""
|
||||||
|
$(MAKE) -f admin/Makefile.common cvs
|
||||||
|
|
||||||
|
dist:
|
||||||
|
$(MAKE) -f admin/Makefile.common dist
|
||||||
|
|
||||||
|
.SILENT:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,998 @@
|
|||||||
|
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
|
# 2005 Free Software Foundation, Inc.
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Off-the-Record Messaging library
|
||||||
|
dnl Copyright (C) 2004-2007 Ian Goldberg, Chris Alexander, Nikita Borisov
|
||||||
|
dnl <otr@cypherpunks.ca>
|
||||||
|
dnl
|
||||||
|
dnl This library is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of version 2.1 of the GNU Lesser General
|
||||||
|
dnl Public License as published by the Free Software Foundation.
|
||||||
|
dnl
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Lesser General Public License for more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU Lesser General Public
|
||||||
|
dnl License along with this library; if not, write to the Free Software
|
||||||
|
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
dnl
|
||||||
|
|
||||||
|
dnl AM_PATH_LIBOTR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for libotr, and define LIBOTR_CFLAGS and LIBOTR_LIBS as appropriate.
|
||||||
|
dnl enables arguments --with-libotr-prefix=
|
||||||
|
dnl --with-libotr-inc-prefix=
|
||||||
|
dnl
|
||||||
|
dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
|
||||||
|
dnl
|
||||||
|
dnl Adapted from alsa.m4, originally by
|
||||||
|
dnl Richard Boulton <richard-alsa@tartarus.org>
|
||||||
|
dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
|
||||||
|
dnl Jaroslav Kysela <perex@suse.cz>
|
||||||
|
|
||||||
|
AC_DEFUN([AM_PATH_LIBOTR],
|
||||||
|
[dnl Save the original CFLAGS, LDFLAGS, and LIBS
|
||||||
|
libotr_save_CFLAGS="$CFLAGS"
|
||||||
|
libotr_save_LDFLAGS="$LDFLAGS"
|
||||||
|
libotr_save_LIBS="$LIBS"
|
||||||
|
libotr_found=yes
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Get the cflags and libraries for libotr
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(libotr-prefix,
|
||||||
|
[ --with-libotr-prefix=PFX Prefix where libotr is installed(optional)],
|
||||||
|
[libotr_prefix="$withval"], [libotr_prefix=""])
|
||||||
|
|
||||||
|
AC_ARG_WITH(libotr-inc-prefix,
|
||||||
|
[ --with-libotr-inc-prefix=PFX Prefix where libotr includes are (optional)],
|
||||||
|
[libotr_inc_prefix="$withval"], [libotr_inc_prefix=""])
|
||||||
|
|
||||||
|
dnl Add any special include directories
|
||||||
|
AC_MSG_CHECKING(for libotr CFLAGS)
|
||||||
|
if test "$libotr_inc_prefix" != "" ; then
|
||||||
|
LIBOTR_CFLAGS="$LIBOTR_CFLAGS -I$libotr_inc_prefix"
|
||||||
|
CFLAGS="$CFLAGS $LIBOTR_CFLAGS"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($LIBOTR_CFLAGS)
|
||||||
|
|
||||||
|
dnl add any special lib dirs
|
||||||
|
AC_MSG_CHECKING(for libotr LIBS)
|
||||||
|
if test "$libotr_prefix" != "" ; then
|
||||||
|
LIBOTR_LIBS="$LIBOTR_LIBS -L$libotr_prefix"
|
||||||
|
LDFLAGS="$LDFLAGS $LIBOTR_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl add the libotr library
|
||||||
|
LIBOTR_LIBS="$LIBOTR_LIBS -lotr"
|
||||||
|
LIBS="$LIBOTR_LIBS $LIBS"
|
||||||
|
AC_MSG_RESULT($LIBOTR_LIBS)
|
||||||
|
|
||||||
|
dnl Check for a working version of libotr that is of the right version.
|
||||||
|
min_libotr_version=ifelse([$1], ,3.0.0,$1)
|
||||||
|
no_libotr=""
|
||||||
|
libotr_min_major_version=`echo $min_libotr_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
libotr_min_minor_version=`echo $min_libotr_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
libotr_min_sub_version=`echo $min_libotr_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
AC_MSG_CHECKING(for libotr headers version $libotr_min_major_version.x >= $min_libotr_version)
|
||||||
|
|
||||||
|
AC_LANG_SAVE
|
||||||
|
AC_LANG_C
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <libotr/version.h>
|
||||||
|
], [
|
||||||
|
# if(OTRL_VERSION_MAJOR != $libotr_min_major_version)
|
||||||
|
# error not present
|
||||||
|
# else
|
||||||
|
|
||||||
|
# if(OTRL_VERSION_MINOR > $libotr_min_minor_version)
|
||||||
|
exit(0);
|
||||||
|
# else
|
||||||
|
# if(OTRL_VERSION_MINOR < $libotr_min_minor_version)
|
||||||
|
# error not present
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if(OTRL_VERSION_SUB < $libotr_min_sub_version)
|
||||||
|
# error not present
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
exit(0);
|
||||||
|
],
|
||||||
|
[AC_MSG_RESULT(found.)],
|
||||||
|
[AC_MSG_RESULT(not present.)
|
||||||
|
ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr not found.)])
|
||||||
|
libotr_found=no]
|
||||||
|
)
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
|
||||||
|
dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
|
||||||
|
AC_CHECK_LIB([otr], [otrl_message_receiving],,
|
||||||
|
[ifelse([$3], , [AC_MSG_ERROR(No linkable libotr was found.)])
|
||||||
|
libotr_found=no],
|
||||||
|
$LIBGCRYPT_LIBS
|
||||||
|
)
|
||||||
|
|
||||||
|
LDFLAGS="$libotr_save_LDFLAGS"
|
||||||
|
LIBS="$libotr_save_LIBS"
|
||||||
|
|
||||||
|
if test "x$libotr_found" = "xyes" ; then
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
LIBOTR_CFLAGS=""
|
||||||
|
LIBOTR_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl That should be it. Now just export our symbols:
|
||||||
|
AC_SUBST(LIBOTR_CFLAGS)
|
||||||
|
AC_SUBST(LIBOTR_LIBS)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_AUTOMAKE_VERSION(VERSION)
|
||||||
|
# ----------------------------
|
||||||
|
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||||
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
|
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||||
|
|
||||||
|
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||||
|
# -------------------------------
|
||||||
|
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||||
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||||
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
|
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||||
|
|
||||||
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||||
|
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||||
|
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||||
|
#
|
||||||
|
# Of course, Automake must honor this variable whenever it calls a
|
||||||
|
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||||
|
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||||
|
# depending on how configure is run. This is pretty annoying, since
|
||||||
|
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||||
|
# source directory, any form will work fine, but in subdirectories a
|
||||||
|
# relative path needs to be adjusted first.
|
||||||
|
#
|
||||||
|
# $ac_aux_dir/missing
|
||||||
|
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||||
|
# $top_srcdir/$ac_aux_dir/missing
|
||||||
|
# fails if $ac_aux_dir is absolute,
|
||||||
|
# fails when called from a subdirectory in a VPATH build with
|
||||||
|
# a relative $ac_aux_dir
|
||||||
|
#
|
||||||
|
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||||
|
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||||
|
# harmless because $srcdir is `.', but things will broke when you
|
||||||
|
# start a VPATH build or use an absolute $srcdir.
|
||||||
|
#
|
||||||
|
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||||
|
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||||
|
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||||
|
# and then we would define $MISSING as
|
||||||
|
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||||
|
# This will work as long as MISSING is not called from configure, because
|
||||||
|
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||||
|
# However there are other variables, like CC, which are often used in
|
||||||
|
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||||
|
#
|
||||||
|
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||||
|
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||||
|
# configured tree to be moved without reconfiguration.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||||
|
[dnl Rely on autoconf to set up CDPATH properly.
|
||||||
|
AC_PREREQ([2.50])dnl
|
||||||
|
# expand $ac_aux_dir to an absolute path
|
||||||
|
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||||
|
])
|
||||||
|
|
||||||
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 7
|
||||||
|
|
||||||
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
|
# -------------------------------------
|
||||||
|
# Define a conditional.
|
||||||
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
|
[AC_PREREQ(2.52)dnl
|
||||||
|
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||||
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||||
|
AC_SUBST([$1_TRUE])
|
||||||
|
AC_SUBST([$1_FALSE])
|
||||||
|
if $2; then
|
||||||
|
$1_TRUE=
|
||||||
|
$1_FALSE='#'
|
||||||
|
else
|
||||||
|
$1_TRUE='#'
|
||||||
|
$1_FALSE=
|
||||||
|
fi
|
||||||
|
AC_CONFIG_COMMANDS_PRE(
|
||||||
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||||
|
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
|
fi])])
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 8
|
||||||
|
|
||||||
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||||
|
# written in clear, in which case automake, when reading aclocal.m4,
|
||||||
|
# will think it sees a *use*, and therefore will trigger all it's
|
||||||
|
# C support machinery. Also note that it means that autoscan, seeing
|
||||||
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||||
|
|
||||||
|
|
||||||
|
# _AM_DEPENDENCIES(NAME)
|
||||||
|
# ----------------------
|
||||||
|
# See how the compiler implements dependency checking.
|
||||||
|
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||||
|
# We try a few techniques and use that to set a single cache variable.
|
||||||
|
#
|
||||||
|
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||||
|
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||||
|
# dependency, and given that the user is not expected to run this macro,
|
||||||
|
# just rely on AC_PROG_CC.
|
||||||
|
AC_DEFUN([_AM_DEPENDENCIES],
|
||||||
|
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||||
|
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||||
|
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||||
|
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||||
|
|
||||||
|
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||||
|
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||||
|
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||||
|
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||||
|
[depcc="$$1" am_compiler_list=])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([dependency style of $depcc],
|
||||||
|
[am_cv_$1_dependencies_compiler_type],
|
||||||
|
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||||
|
# We make a subdir and do the tests there. Otherwise we can end up
|
||||||
|
# making bogus files that we don't know about and never remove. For
|
||||||
|
# instance it was reported that on HP-UX the gcc test will end up
|
||||||
|
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||||
|
# in D'.
|
||||||
|
mkdir conftest.dir
|
||||||
|
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||||
|
# using a relative directory.
|
||||||
|
cp "$am_depcomp" conftest.dir
|
||||||
|
cd conftest.dir
|
||||||
|
# We will build objects and dependencies in a subdirectory because
|
||||||
|
# it helps to detect inapplicable dependency modes. For instance
|
||||||
|
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||||
|
# side effect of compilation, but ICC will put the dependencies in
|
||||||
|
# the current directory while Tru64 will put them in the object
|
||||||
|
# directory.
|
||||||
|
mkdir sub
|
||||||
|
|
||||||
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
|
if test "$am_compiler_list" = ""; then
|
||||||
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||||
|
fi
|
||||||
|
for depmode in $am_compiler_list; do
|
||||||
|
# Setup a source with many dependencies, because some compilers
|
||||||
|
# like to wrap large dependency lists on column 80 (with \), and
|
||||||
|
# we should not choose a depcomp mode which is confused by this.
|
||||||
|
#
|
||||||
|
# We need to recreate these files for each test, as the compiler may
|
||||||
|
# overwrite some of them when testing with obscure command lines.
|
||||||
|
# This happens at least with the AIX C compiler.
|
||||||
|
: > sub/conftest.c
|
||||||
|
for i in 1 2 3 4 5 6; do
|
||||||
|
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||||
|
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||||
|
# Solaris 8's {/usr,}/bin/sh.
|
||||||
|
touch sub/conftst$i.h
|
||||||
|
done
|
||||||
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||||
|
|
||||||
|
case $depmode in
|
||||||
|
nosideeffect)
|
||||||
|
# after this tag, mechanisms are not by side-effect, so they'll
|
||||||
|
# only be used when explicitly requested
|
||||||
|
if test "x$enable_dependency_tracking" = xyes; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
none) break ;;
|
||||||
|
esac
|
||||||
|
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||||
|
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||||
|
# handle `-M -o', and we need to detect this.
|
||||||
|
if depmode=$depmode \
|
||||||
|
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||||
|
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||||
|
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||||
|
>/dev/null 2>conftest.err &&
|
||||||
|
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||||
|
# icc doesn't choke on unknown options, it will just issue warnings
|
||||||
|
# or remarks (even with -Werror). So we grep stderr for any message
|
||||||
|
# that says an option was ignored or not supported.
|
||||||
|
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||||
|
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||||
|
# The diagnosis changed in icc 8.0:
|
||||||
|
# icc: Command line remark: option '-MP' not supported
|
||||||
|
if (grep 'ignoring option' conftest.err ||
|
||||||
|
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||||
|
am_cv_$1_dependencies_compiler_type=$depmode
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf conftest.dir
|
||||||
|
else
|
||||||
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||||
|
AM_CONDITIONAL([am__fastdep$1], [
|
||||||
|
test "x$enable_dependency_tracking" != xno \
|
||||||
|
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_SET_DEPDIR
|
||||||
|
# -------------
|
||||||
|
# Choose a directory name for dependency files.
|
||||||
|
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||||
|
AC_DEFUN([AM_SET_DEPDIR],
|
||||||
|
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_DEP_TRACK
|
||||||
|
# ------------
|
||||||
|
AC_DEFUN([AM_DEP_TRACK],
|
||||||
|
[AC_ARG_ENABLE(dependency-tracking,
|
||||||
|
[ --disable-dependency-tracking speeds up one-time build
|
||||||
|
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||||
|
if test "x$enable_dependency_tracking" != xno; then
|
||||||
|
am_depcomp="$ac_aux_dir/depcomp"
|
||||||
|
AMDEPBACKSLASH='\'
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||||
|
AC_SUBST([AMDEPBACKSLASH])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
#serial 3
|
||||||
|
|
||||||
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[for mf in $CONFIG_FILES; do
|
||||||
|
# Strip MF so we end up with the name of the file.
|
||||||
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||||
|
# Check whether this is an Automake generated Makefile or not.
|
||||||
|
# We used to match only the files named `Makefile.in', but
|
||||||
|
# some people rename them; so instead we look at the file content.
|
||||||
|
# Grep'ing the first line is not enough: some people post-process
|
||||||
|
# each Makefile.in and add a new line on top of each file to say so.
|
||||||
|
# So let's grep whole file.
|
||||||
|
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||||
|
dirpart=`AS_DIRNAME("$mf")`
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||||
|
# from the Makefile without running `make'.
|
||||||
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
|
test -z "$DEPDIR" && continue
|
||||||
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
|
test -z "am__include" && continue
|
||||||
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
|
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||||
|
U=`sed -n 's/^U = //p' < "$mf"`
|
||||||
|
# Find all dependency output files, they are included files with
|
||||||
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
|
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||||
|
# expansion.
|
||||||
|
for file in `sed -n "
|
||||||
|
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||||
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||||
|
# Make sure the directory exists.
|
||||||
|
test -f "$dirpart/$file" && continue
|
||||||
|
fdir=`AS_DIRNAME(["$file"])`
|
||||||
|
AS_MKDIR_P([$dirpart/$fdir])
|
||||||
|
# echo "creating $dirpart/$file"
|
||||||
|
echo '# dummy' > "$dirpart/$file"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# -----------------------------
|
||||||
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||||
|
#
|
||||||
|
# This code is only required when automatic dependency tracking
|
||||||
|
# is enabled. FIXME. This creates each `.P' file that we will
|
||||||
|
# need in order to bootstrap the dependency handling code.
|
||||||
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AC_CONFIG_COMMANDS([depfiles],
|
||||||
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 8
|
||||||
|
|
||||||
|
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||||
|
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||||
|
|
||||||
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 12
|
||||||
|
|
||||||
|
# This macro actually does too much. Some checks are only needed if
|
||||||
|
# your package does certain things. But this isn't really a big deal.
|
||||||
|
|
||||||
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||||
|
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||||
|
# -----------------------------------------------
|
||||||
|
# The call with PACKAGE and VERSION arguments is the old style
|
||||||
|
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||||
|
# and VERSION should now be passed to AC_INIT and removed from
|
||||||
|
# the call to AM_INIT_AUTOMAKE.
|
||||||
|
# We support both call styles for the transition. After
|
||||||
|
# the next Automake release, Autoconf can make the AC_INIT
|
||||||
|
# arguments mandatory, and then we can depend on a new Autoconf
|
||||||
|
# release and drop the old call support.
|
||||||
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
|
[AC_PREREQ([2.58])dnl
|
||||||
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||||
|
dnl the ones we care about.
|
||||||
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
|
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||||
|
# test to see if srcdir already configured
|
||||||
|
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||||
|
test -f $srcdir/config.status; then
|
||||||
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# test whether we have cygpath
|
||||||
|
if test -z "$CYGPATH_W"; then
|
||||||
|
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||||
|
CYGPATH_W='cygpath -w'
|
||||||
|
else
|
||||||
|
CYGPATH_W=echo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([CYGPATH_W])
|
||||||
|
|
||||||
|
# Define the identity of the package.
|
||||||
|
dnl Distinguish between old-style and new-style calls.
|
||||||
|
m4_ifval([$2],
|
||||||
|
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||||
|
AC_SUBST([PACKAGE], [$1])dnl
|
||||||
|
AC_SUBST([VERSION], [$2])],
|
||||||
|
[_AM_SET_OPTIONS([$1])dnl
|
||||||
|
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||||
|
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||||
|
|
||||||
|
_AM_IF_OPTION([no-define],,
|
||||||
|
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||||
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||||
|
|
||||||
|
# Some tools Automake needs.
|
||||||
|
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||||
|
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||||
|
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||||
|
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||||
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||||
|
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||||
|
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||||
|
AM_PROG_INSTALL_SH
|
||||||
|
AM_PROG_INSTALL_STRIP
|
||||||
|
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||||
|
# We need awk for the "check" target. The system "awk" is bad on
|
||||||
|
# some platforms.
|
||||||
|
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||||
|
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||||
|
[_AM_PROG_TAR([v7])])])
|
||||||
|
_AM_IF_OPTION([no-dependencies],,
|
||||||
|
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||||
|
[_AM_DEPENDENCIES(CC)],
|
||||||
|
[define([AC_PROG_CC],
|
||||||
|
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||||
|
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||||
|
[_AM_DEPENDENCIES(CXX)],
|
||||||
|
[define([AC_PROG_CXX],
|
||||||
|
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
|
# This file resides in the same directory as the config header
|
||||||
|
# that is generated. The stamp files are numbered to have different names.
|
||||||
|
|
||||||
|
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||||
|
# loop where config.status creates the headers, so we can generate
|
||||||
|
# our stamp files there.
|
||||||
|
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||||
|
[# Compute $1's index in $config_headers.
|
||||||
|
_am_stamp_count=1
|
||||||
|
for _am_header in $config_headers :; do
|
||||||
|
case $_am_header in
|
||||||
|
$1 | $1:* )
|
||||||
|
break ;;
|
||||||
|
* )
|
||||||
|
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_SH
|
||||||
|
# ------------------
|
||||||
|
# Define $install_sh.
|
||||||
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||||
|
AC_SUBST(install_sh)])
|
||||||
|
|
||||||
|
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# Check whether the underlying file-system supports filenames
|
||||||
|
# with a leading dot. For instance MS-DOS doesn't.
|
||||||
|
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||||
|
[rm -rf .tst 2>/dev/null
|
||||||
|
mkdir .tst 2>/dev/null
|
||||||
|
if test -d .tst; then
|
||||||
|
am__leading_dot=.
|
||||||
|
else
|
||||||
|
am__leading_dot=_
|
||||||
|
fi
|
||||||
|
rmdir .tst 2>/dev/null
|
||||||
|
AC_SUBST([am__leading_dot])])
|
||||||
|
|
||||||
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 3
|
||||||
|
|
||||||
|
# AM_MAKE_INCLUDE()
|
||||||
|
# -----------------
|
||||||
|
# Check to see how make treats includes.
|
||||||
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||||
|
[am_make=${MAKE-make}
|
||||||
|
cat > confinc << 'END'
|
||||||
|
am__doit:
|
||||||
|
@echo done
|
||||||
|
.PHONY: am__doit
|
||||||
|
END
|
||||||
|
# If we don't find an include directive, just comment out the code.
|
||||||
|
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||||
|
am__include="#"
|
||||||
|
am__quote=
|
||||||
|
_am_result=none
|
||||||
|
# First try GNU make style include.
|
||||||
|
echo "include confinc" > confmf
|
||||||
|
# We grep out `Entering directory' and `Leaving directory'
|
||||||
|
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||||
|
# In particular we don't look at `^make:' because GNU make might
|
||||||
|
# be invoked under some other name (usually "gmake"), in which
|
||||||
|
# case it prints its new name instead of `make'.
|
||||||
|
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||||
|
am__include=include
|
||||||
|
am__quote=
|
||||||
|
_am_result=GNU
|
||||||
|
fi
|
||||||
|
# Now try BSD make style include.
|
||||||
|
if test "$am__include" = "#"; then
|
||||||
|
echo '.include "confinc"' > confmf
|
||||||
|
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||||
|
am__include=.include
|
||||||
|
am__quote="\""
|
||||||
|
_am_result=BSD
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([am__include])
|
||||||
|
AC_SUBST([am__quote])
|
||||||
|
AC_MSG_RESULT([$_am_result])
|
||||||
|
rm -f confinc confmf
|
||||||
|
])
|
||||||
|
|
||||||
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([AM_MISSING_PROG],
|
||||||
|
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||||
|
$1=${$1-"${am_missing_run}$2"}
|
||||||
|
AC_SUBST($1)])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_MISSING_HAS_RUN
|
||||||
|
# ------------------
|
||||||
|
# Define MISSING if not defined so far and test if it supports --run.
|
||||||
|
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||||
|
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||||
|
# Use eval to expand $SHELL
|
||||||
|
if eval "$MISSING --run true"; then
|
||||||
|
am_missing_run="$MISSING --run "
|
||||||
|
else
|
||||||
|
am_missing_run=
|
||||||
|
AC_MSG_WARN([`missing' script is too old or missing])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_PROG_MKDIR_P
|
||||||
|
# ---------------
|
||||||
|
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||||
|
#
|
||||||
|
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||||
|
# created by `make install' are always world readable, even if the
|
||||||
|
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||||
|
# This was a mistake. There are at least two reasons why we must not
|
||||||
|
# use `-m 0755':
|
||||||
|
# - it causes special bits like SGID to be ignored,
|
||||||
|
# - it may be too restrictive (some setups expect 775 directories).
|
||||||
|
#
|
||||||
|
# Do not use -m 0755 and let people choose whatever they expect by
|
||||||
|
# setting umask.
|
||||||
|
#
|
||||||
|
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||||
|
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||||
|
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||||
|
# concurrently, both version can detect that a/ is missing, but only
|
||||||
|
# one can create it and the other will error out. Consequently we
|
||||||
|
# restrict ourselves to GNU make (using the --version option ensures
|
||||||
|
# this.)
|
||||||
|
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||||
|
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||||
|
# We used to keeping the `.' as first argument, in order to
|
||||||
|
# allow $(mkdir_p) to be used without argument. As in
|
||||||
|
# $(mkdir_p) $(somedir)
|
||||||
|
# where $(somedir) is conditionally defined. However this is wrong
|
||||||
|
# for two reasons:
|
||||||
|
# 1. if the package is installed by a user who cannot write `.'
|
||||||
|
# make install will fail,
|
||||||
|
# 2. the above comment should most certainly read
|
||||||
|
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||||
|
# so it does not work when $(somedir) is undefined and
|
||||||
|
# $(DESTDIR) is not.
|
||||||
|
# To support the latter case, we have to write
|
||||||
|
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||||
|
# so the `.' trick is pointless.
|
||||||
|
mkdir_p='mkdir -p --'
|
||||||
|
else
|
||||||
|
# On NextStep and OpenStep, the `mkdir' command does not
|
||||||
|
# recognize any option. It will interpret all options as
|
||||||
|
# directories to create, and then abort because `.' already
|
||||||
|
# exists.
|
||||||
|
for d in ./-p ./--version;
|
||||||
|
do
|
||||||
|
test -d $d && rmdir $d
|
||||||
|
done
|
||||||
|
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||||
|
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||||
|
mkdir_p='$(mkinstalldirs)'
|
||||||
|
else
|
||||||
|
mkdir_p='$(install_sh) -d'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([mkdir_p])])
|
||||||
|
|
||||||
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 3
|
||||||
|
|
||||||
|
# _AM_MANGLE_OPTION(NAME)
|
||||||
|
# -----------------------
|
||||||
|
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||||
|
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
# _AM_SET_OPTION(NAME)
|
||||||
|
# ------------------------------
|
||||||
|
# Set option NAME. Presently that only means defining a flag for this option.
|
||||||
|
AC_DEFUN([_AM_SET_OPTION],
|
||||||
|
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||||
|
|
||||||
|
# _AM_SET_OPTIONS(OPTIONS)
|
||||||
|
# ----------------------------------
|
||||||
|
# OPTIONS is a space-separated list of Automake options.
|
||||||
|
AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
|
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||||
|
|
||||||
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||||
|
# -------------------------------------------
|
||||||
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||||
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
# AM_SANITY_CHECK
|
||||||
|
# ---------------
|
||||||
|
AC_DEFUN([AM_SANITY_CHECK],
|
||||||
|
[AC_MSG_CHECKING([whether build environment is sane])
|
||||||
|
# Just in case
|
||||||
|
sleep 1
|
||||||
|
echo timestamp > conftest.file
|
||||||
|
# Do `set' in a subshell so we don't clobber the current shell's
|
||||||
|
# arguments. Must try -L first in case configure is actually a
|
||||||
|
# symlink; some systems play weird games with the mod time of symlinks
|
||||||
|
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||||
|
# directory).
|
||||||
|
if (
|
||||||
|
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||||
|
if test "$[*]" = "X"; then
|
||||||
|
# -L didn't work.
|
||||||
|
set X `ls -t $srcdir/configure conftest.file`
|
||||||
|
fi
|
||||||
|
rm -f conftest.file
|
||||||
|
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||||
|
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||||
|
|
||||||
|
# If neither matched, then we have a broken ls. This can happen
|
||||||
|
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||||
|
# broken ls alias from the environment. This has actually
|
||||||
|
# happened. Such a system could not be considered "sane".
|
||||||
|
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||||
|
alias in your environment])
|
||||||
|
fi
|
||||||
|
|
||||||
|
test "$[2]" = conftest.file
|
||||||
|
)
|
||||||
|
then
|
||||||
|
# Ok.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||||
|
Check your system clock])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_STRIP
|
||||||
|
# ---------------------
|
||||||
|
# One issue with vendor `install' (even GNU) is that you can't
|
||||||
|
# specify the program used to strip binaries. This is especially
|
||||||
|
# annoying in cross-compiling environments, where the build's strip
|
||||||
|
# is unlikely to handle the host's binaries.
|
||||||
|
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||||
|
# always use install-sh in `make install-strip', and initialize
|
||||||
|
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||||
|
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||||
|
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||||
|
# Installed binaries are usually stripped using `strip' when the user
|
||||||
|
# run `make install-strip'. However `strip' might not be the right
|
||||||
|
# tool to use in cross-compilation environments, therefore Automake
|
||||||
|
# will honor the `STRIP' environment variable to overrule this program.
|
||||||
|
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||||
|
if test "$cross_compiling" != no; then
|
||||||
|
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||||
|
fi
|
||||||
|
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||||
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# _AM_PROG_TAR(FORMAT)
|
||||||
|
# --------------------
|
||||||
|
# Check how to create a tarball in format FORMAT.
|
||||||
|
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||||
|
#
|
||||||
|
# Substitute a variable $(am__tar) that is a command
|
||||||
|
# writing to stdout a FORMAT-tarball containing the directory
|
||||||
|
# $tardir.
|
||||||
|
# tardir=directory && $(am__tar) > result.tar
|
||||||
|
#
|
||||||
|
# Substitute a variable $(am__untar) that extract such
|
||||||
|
# a tarball read from stdin.
|
||||||
|
# $(am__untar) < result.tar
|
||||||
|
AC_DEFUN([_AM_PROG_TAR],
|
||||||
|
[# Always define AMTAR for backward compatibility.
|
||||||
|
AM_MISSING_PROG([AMTAR], [tar])
|
||||||
|
m4_if([$1], [v7],
|
||||||
|
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||||
|
[m4_case([$1], [ustar],, [pax],,
|
||||||
|
[m4_fatal([Unknown tar format])])
|
||||||
|
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||||
|
# Loop over all known methods to create a tar archive until one works.
|
||||||
|
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||||
|
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||||
|
# Do not fold the above two line into one, because Tru64 sh and
|
||||||
|
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||||
|
for _am_tool in $_am_tools
|
||||||
|
do
|
||||||
|
case $_am_tool in
|
||||||
|
gnutar)
|
||||||
|
for _am_tar in tar gnutar gtar;
|
||||||
|
do
|
||||||
|
AM_RUN_LOG([$_am_tar --version]) && break
|
||||||
|
done
|
||||||
|
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||||
|
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||||
|
am__untar="$_am_tar -xf -"
|
||||||
|
;;
|
||||||
|
plaintar)
|
||||||
|
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||||
|
# ustar tarball either.
|
||||||
|
(tar --version) >/dev/null 2>&1 && continue
|
||||||
|
am__tar='tar chf - "$$tardir"'
|
||||||
|
am__tar_='tar chf - "$tardir"'
|
||||||
|
am__untar='tar xf -'
|
||||||
|
;;
|
||||||
|
pax)
|
||||||
|
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||||
|
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||||
|
am__untar='pax -r'
|
||||||
|
;;
|
||||||
|
cpio)
|
||||||
|
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__untar='cpio -i -H $1 -d'
|
||||||
|
;;
|
||||||
|
none)
|
||||||
|
am__tar=false
|
||||||
|
am__tar_=false
|
||||||
|
am__untar=false
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If the value was cached, stop now. We just wanted to have am__tar
|
||||||
|
# and am__untar set.
|
||||||
|
test -n "${am_cv_prog_tar_$1}" && break
|
||||||
|
|
||||||
|
# tar/untar a dummy directory, and stop if the command works
|
||||||
|
rm -rf conftest.dir
|
||||||
|
mkdir conftest.dir
|
||||||
|
echo GrepMe > conftest.dir/file
|
||||||
|
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||||
|
rm -rf conftest.dir
|
||||||
|
if test -s conftest.tar; then
|
||||||
|
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||||
|
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -rf conftest.dir
|
||||||
|
|
||||||
|
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||||
|
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||||
|
AC_SUBST([am__tar])
|
||||||
|
AC_SUBST([am__untar])
|
||||||
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
|
m4_include([acinclude.m4])
|
@ -0,0 +1,250 @@
|
|||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
|
||||||
|
#undef HAVE_CARBON_CARBON_H
|
||||||
|
|
||||||
|
/* Define if you have the CoreAudio API */
|
||||||
|
#undef HAVE_COREAUDIO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||||
|
#undef HAVE_CRT_EXTERNS_H
|
||||||
|
|
||||||
|
/* Defines if your system has the crypt function */
|
||||||
|
#undef HAVE_CRYPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define if you have libjpeg */
|
||||||
|
#undef HAVE_LIBJPEG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `otr' library (-lotr). */
|
||||||
|
#undef HAVE_LIBOTR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <libotr/version.h> header file. */
|
||||||
|
#undef HAVE_LIBOTR_VERSION_H
|
||||||
|
|
||||||
|
/* Define if you have libpng */
|
||||||
|
#undef HAVE_LIBPNG
|
||||||
|
|
||||||
|
/* Define if you have a working libpthread (will enable threaded code) */
|
||||||
|
#undef HAVE_LIBPTHREAD
|
||||||
|
|
||||||
|
/* Define if you have libz */
|
||||||
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define if your system needs _NSGetEnviron to set up the environment */
|
||||||
|
#undef HAVE_NSGETENVIRON
|
||||||
|
|
||||||
|
/* Define if you have res_init */
|
||||||
|
#undef HAVE_RES_INIT
|
||||||
|
|
||||||
|
/* Define if you have the res_init prototype */
|
||||||
|
#undef HAVE_RES_INIT_PROTO
|
||||||
|
|
||||||
|
/* Define if you have a STL implementation by SGI */
|
||||||
|
#undef HAVE_SGI_STL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `snprintf' function. */
|
||||||
|
#undef HAVE_SNPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define if you have strlcat */
|
||||||
|
#undef HAVE_STRLCAT
|
||||||
|
|
||||||
|
/* Define if you have the strlcat prototype */
|
||||||
|
#undef HAVE_STRLCAT_PROTO
|
||||||
|
|
||||||
|
/* Define if you have strlcpy */
|
||||||
|
#undef HAVE_STRLCPY
|
||||||
|
|
||||||
|
/* Define if you have the strlcpy prototype */
|
||||||
|
#undef HAVE_STRLCPY_PROTO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||||
|
#undef HAVE_SYS_BITYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsnprintf' function. */
|
||||||
|
#undef HAVE_VSNPRINTF
|
||||||
|
|
||||||
|
/* Suffix for lib directories */
|
||||||
|
#undef KDELIBSUFF
|
||||||
|
|
||||||
|
/* Define a safe value for MAXPATHLEN */
|
||||||
|
#undef KDEMAXPATHLEN
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* The size of `char *', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_CHAR_P
|
||||||
|
|
||||||
|
/* The size of `int', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
|
/* The size of `long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
|
/* The size of `short', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
|
/* The size of `size_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SIZE_T
|
||||||
|
|
||||||
|
/* The size of `unsigned long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_UNSIGNED_LONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Defined if compiling without arts */
|
||||||
|
#undef WITHOUT_ARTS
|
||||||
|
|
||||||
|
/* Define to 1 if your processor stores words with the most significant byte
|
||||||
|
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||||
|
#undef WORDS_BIGENDIAN
|
||||||
|
|
||||||
|
/*
|
||||||
|
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
|
||||||
|
* headers and I'm too lazy to write a configure test as long as only
|
||||||
|
* unixware is related
|
||||||
|
*/
|
||||||
|
#ifdef _UNIXWARE
|
||||||
|
#define HAVE_BOOLEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
|
||||||
|
* that defines bzero.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_AIX)
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
|
||||||
|
# include <sys/time.h>
|
||||||
|
# include <crt_externs.h>
|
||||||
|
# define environ (*_NSGetEnviron())
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_RES_INIT_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
int res_init(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRLCAT_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned long strlcat(char*, const char*, unsigned long);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRLCPY_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned long strlcpy(char*, const char*, unsigned long);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* On HP-UX, the declaration of vsnprintf() is needed every time !
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
|
||||||
|
#if __STDC__
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int snprintf(char *str, size_t n, char const *fmt, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__SVR4) && !defined(__svr4__)
|
||||||
|
#define __svr4__ 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* type to use in place of socklen_t if not defined */
|
||||||
|
#undef kde_socklen_t
|
||||||
|
|
||||||
|
/* type to use in place of socklen_t if not defined (deprecated, use
|
||||||
|
kde_socklen_t) */
|
||||||
|
#undef ksize_t
|
@ -0,0 +1,2 @@
|
|||||||
|
./admin/configure.in.min
|
||||||
|
configure.in.in
|
@ -0,0 +1,145 @@
|
|||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: ./admin/configure.in.min
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
dnl This file is part of the KDE libraries/packages
|
||||||
|
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||||
|
|
||||||
|
dnl This file is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of the GNU Library General Public
|
||||||
|
dnl License as published by the Free Software Foundation; either
|
||||||
|
dnl version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Library General Public License for more details.
|
||||||
|
|
||||||
|
dnl You should have received a copy of the GNU Library General Public License
|
||||||
|
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
dnl Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# Original Author was Kalle@kde.org
|
||||||
|
# I lifted it in some mater. (Stephan Kulow)
|
||||||
|
# I used much code from Janos Farkas
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||||
|
|
||||||
|
dnl This is so we can use kde-common
|
||||||
|
AC_CONFIG_AUX_DIR(admin)
|
||||||
|
|
||||||
|
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||||
|
unset CDPATH
|
||||||
|
|
||||||
|
dnl Checking host/target/build systems, for make, install etc.
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
dnl Perform program name transformation
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
dnl Automake doc recommends to do this only here. (Janos)
|
||||||
|
AM_INIT_AUTOMAKE(kopete_otr, 0.1) dnl searches for some needed programs
|
||||||
|
|
||||||
|
KDE_SET_PREFIX
|
||||||
|
|
||||||
|
dnl generate the config header
|
||||||
|
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||||
|
|
||||||
|
dnl Checks for programs.
|
||||||
|
AC_CHECK_COMPILERS
|
||||||
|
AC_ENABLE_SHARED(yes)
|
||||||
|
AC_ENABLE_STATIC(no)
|
||||||
|
KDE_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl for NLS support. Call them in this order!
|
||||||
|
dnl WITH_NLS is for the po files
|
||||||
|
AM_KDE_WITH_NLS
|
||||||
|
|
||||||
|
KDE_USE_QT(3.2.0)
|
||||||
|
AC_PATH_KDE
|
||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: configure.in.in
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
#MIN_CONFIG(3.2.0)
|
||||||
|
|
||||||
|
dnl PACKAGE set before
|
||||||
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_KDEMAXPATHLEN
|
||||||
|
# Make sure that kde includes, etc. are part of the CPPFLAGS ...
|
||||||
|
CPPFLAGS="$CPPFLAGS $all_includes -I$kde_includes/kopete"
|
||||||
|
|
||||||
|
|
||||||
|
# check for libkopete headers and library
|
||||||
|
AC_CHECK_HEADER(kopeteversion.h,,
|
||||||
|
AC_MSG_ERROR([libkopete header files missing]))
|
||||||
|
|
||||||
|
#AC_CHECK_LIB([kopete], [_ZN6Kopete7AccountD0Ev],,
|
||||||
|
# AC_MSG_ERROR([libkopete library missing]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Check for libotr
|
||||||
|
AC_CHECK_HEADERS([libotr/version.h],,
|
||||||
|
AC_MSG_ERROR([Could not find OTR header files!]))
|
||||||
|
|
||||||
|
m4_pattern_allow([AM_PATH_LIBOTR])
|
||||||
|
|
||||||
|
AM_PATH_LIBOTR(3.1.0,,AC_MSG_ERROR(libotr 3.1.0 or newer is required.))
|
||||||
|
KDE_CREATE_SUBDIRSLIST
|
||||||
|
AC_CONFIG_FILES([ Makefile ])
|
||||||
|
AC_CONFIG_FILES([ doc/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ doc/en/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ po/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ src/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ src/pics/Makefile ])
|
||||||
|
AC_OUTPUT
|
||||||
|
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||||
|
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||||
|
# And if so, warn when they don't match
|
||||||
|
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||||
|
# And if kde doesn't know about the prefix yet
|
||||||
|
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||||
|
if test $? -ne 0; then
|
||||||
|
echo ""
|
||||||
|
echo "Warning: you chose to install this package in $given_prefix,"
|
||||||
|
echo "but KDE was found in $kde_libs_prefix."
|
||||||
|
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||||
|
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||||
|
echo "Then restart KDE."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
|
||||||
|
echo ""
|
||||||
|
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
|
||||||
|
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
|
||||||
|
echo ""
|
||||||
|
echo "For better performance, consider including the Qt visibility supporting patch"
|
||||||
|
echo "located at:"
|
||||||
|
echo ""
|
||||||
|
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
|
||||||
|
echo ""
|
||||||
|
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
|
||||||
|
echo "everything will continue to work just fine without it."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$all_tests" = "bad"; then
|
||||||
|
if test ! "$cache_file" = "/dev/null"; then
|
||||||
|
echo ""
|
||||||
|
echo "Please remove the file $cache_file after changing your setup"
|
||||||
|
echo "so that configure will find the changes next time."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Good - your configure finished. Start make now"
|
||||||
|
echo ""
|
||||||
|
fi
|
@ -0,0 +1,27 @@
|
|||||||
|
#MIN_CONFIG(3.2.0)
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE(kopete_otr, 0.1)
|
||||||
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_KDEMAXPATHLEN
|
||||||
|
# Make sure that kde includes, etc. are part of the CPPFLAGS ...
|
||||||
|
CPPFLAGS="$CPPFLAGS $all_includes -I$kde_includes/kopete"
|
||||||
|
|
||||||
|
|
||||||
|
# check for libkopete headers and library
|
||||||
|
AC_CHECK_HEADER(kopeteversion.h,,
|
||||||
|
AC_MSG_ERROR([libkopete header files missing]))
|
||||||
|
|
||||||
|
#AC_CHECK_LIB([kopete], [_ZN6Kopete7AccountD0Ev],,
|
||||||
|
# AC_MSG_ERROR([libkopete library missing]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Check for libotr
|
||||||
|
AC_CHECK_HEADERS([libotr/version.h],,
|
||||||
|
AC_MSG_ERROR([Could not find OTR header files!]))
|
||||||
|
|
||||||
|
m4_pattern_allow([AM_PATH_LIBOTR])
|
||||||
|
|
||||||
|
AM_PATH_LIBOTR(3.1.0,,AC_MSG_ERROR(libotr 3.1.0 or newer is required.))
|
@ -0,0 +1,6 @@
|
|||||||
|
# the SUBDIRS is filled automatically by am_edit. If files are
|
||||||
|
# in this directory they are installed into the english dir
|
||||||
|
|
||||||
|
KDE_LANG = en
|
||||||
|
KDE_DOCS = kopete_otr
|
||||||
|
SUBDIRS = $(AUTODIRS)
|
@ -0,0 +1,2 @@
|
|||||||
|
KDE_DOCS = kopete_otr
|
||||||
|
KDE_LANG = en
|
@ -0,0 +1,555 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
|
||||||
|
<!ENTITY kopete-otr "<application>kopete-otr 0.1</application>">
|
||||||
|
<!ENTITY kappname "&kopete-otr;"><!-- Do *not* replace kappname-->
|
||||||
|
<!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc -->
|
||||||
|
<!ENTITY % addindex "IGNORE">
|
||||||
|
<!ENTITY % English "INCLUDE"><!-- change language only here -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Do not define any other entities; instead, use the entities
|
||||||
|
from kde-genent.entities and $LANG/user.entities. -->
|
||||||
|
]>
|
||||||
|
<!-- kdoctemplate v0.8 October 1 1999
|
||||||
|
Minor update to "Credits and Licenses" section on August 24, 2000
|
||||||
|
Removed "Revision history" section on 22 January 2001
|
||||||
|
Changed to Installation/Help menu entities 18 October 2001
|
||||||
|
Other minor cleanup and changes 18 October 2001 -->
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This template was designed by: David Rugge davidrugge@mindspring.com
|
||||||
|
with lots of help from: Eric Bischoff ebisch@cybercable.tm.fr
|
||||||
|
and Frederik Fouvry fouvry@sfs.nphil.uni-tuebingen.de
|
||||||
|
of the KDE DocBook team.
|
||||||
|
|
||||||
|
You may freely use this template for writing any sort of KDE documentation.
|
||||||
|
If you have any changes or improvements, please let us know.
|
||||||
|
|
||||||
|
Remember:
|
||||||
|
- in XML, the case of the <tags> and attributes is relevant ;
|
||||||
|
- also, quote all attributes.
|
||||||
|
|
||||||
|
Please don't forget to remove all these comments in your final documentation,
|
||||||
|
thanks ;-).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- ................................................................ -->
|
||||||
|
|
||||||
|
<!-- The language must NOT be changed here. -->
|
||||||
|
|
||||||
|
<book lang="&language;">
|
||||||
|
|
||||||
|
<!-- This header contains all of the meta-information for the document such
|
||||||
|
as Authors, publish date, the abstract, and Keywords -->
|
||||||
|
|
||||||
|
<bookinfo>
|
||||||
|
<title>The &kopete-otr; Handbook</title>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Michael</firstname>
|
||||||
|
<othername></othername>
|
||||||
|
<surname>Zanetti</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address><email>michael_zanetti@gmx.net</email></address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<!-- TRANS:ROLES_OF_TRANSLATORS -->
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2007</year>
|
||||||
|
<year>2007</year>
|
||||||
|
<holder>Michael Zanetti</holder>
|
||||||
|
</copyright>
|
||||||
|
<!-- Translators: put here the copyright notice of the translation -->
|
||||||
|
<!-- Put here the FDL notice. Read the explanation in fdl-notice.docbook
|
||||||
|
and in the FDL itself on how to use it. -->
|
||||||
|
<legalnotice>&FDLNotice;</legalnotice>
|
||||||
|
|
||||||
|
<!-- Date and version information of the documentation
|
||||||
|
Don't forget to include this last date and this last revision number, we
|
||||||
|
need them for translation coordination !
|
||||||
|
Please respect the format of the date (YYYY-MM-DD) and of the version
|
||||||
|
(V.MM.LL), it could be used by automation scripts.
|
||||||
|
Do NOT change these in the translation. -->
|
||||||
|
|
||||||
|
<date>2001-10-18</date>
|
||||||
|
<releaseinfo>0.6</releaseinfo>
|
||||||
|
|
||||||
|
<!-- Abstract about this handbook -->
|
||||||
|
|
||||||
|
<abstract>
|
||||||
|
<para>
|
||||||
|
&kopete-otr; is an application specially designed to do nothing you would
|
||||||
|
ever want.
|
||||||
|
</para>
|
||||||
|
</abstract>
|
||||||
|
|
||||||
|
<!-- This is a set of Keywords for indexing by search engines.
|
||||||
|
Please at least include KDE, the KDE package it is in, the name
|
||||||
|
of your application, and a few relevant keywords. -->
|
||||||
|
|
||||||
|
<keywordset>
|
||||||
|
<keyword>KDE</keyword>
|
||||||
|
<keyword>kopete-otr</keyword>
|
||||||
|
<keyword>nothing</keyword>
|
||||||
|
<keyword>nothing else</keyword>
|
||||||
|
</keywordset>
|
||||||
|
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<!-- The contents of the documentation begin here. Label
|
||||||
|
each chapter so with the id attribute. This is necessary for two reasons: it
|
||||||
|
allows you to easily reference the chapter from other chapters of your
|
||||||
|
document, and if there is no ID, the name of the generated HTML files will vary
|
||||||
|
from time to time making it hard to manage for maintainers and for the CVS
|
||||||
|
system. Any chapter labelled (OPTIONAL) may be left out at the author's
|
||||||
|
discretion. Other chapters should not be left out in order to maintain a
|
||||||
|
consistent documentation style across all KDE apps. -->
|
||||||
|
|
||||||
|
<chapter id="introduction">
|
||||||
|
<title>Introduction</title>
|
||||||
|
|
||||||
|
<!-- The introduction chapter contains a brief introduction for the
|
||||||
|
application that explains what it does and where to report
|
||||||
|
problems. Basically a long version of the abstract. Don't include a
|
||||||
|
revision history. (see installation appendix comment) -->
|
||||||
|
|
||||||
|
<para>
|
||||||
|
&kopete-otr; is a program that lets you do absolutely nothing. Please report
|
||||||
|
any problems or feature requests to the &kde; mailing lists.
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="using-kopete-otr">
|
||||||
|
<title>Using &kopete-otr;</title>
|
||||||
|
|
||||||
|
<!-- This chapter should tell the user how to use your app. You should use as
|
||||||
|
many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
|
||||||
|
your application. -->
|
||||||
|
|
||||||
|
<para>
|
||||||
|
|
||||||
|
<!-- Note that all graphics should be in .png format. Use no gifs because of
|
||||||
|
patent issues. -->
|
||||||
|
|
||||||
|
<screenshot>
|
||||||
|
<screeninfo>Here's a screenshot of &kopete-otr;</screeninfo>
|
||||||
|
<mediaobject>
|
||||||
|
<imageobject>
|
||||||
|
<imagedata fileref="screenshot.png" format="PNG"/>
|
||||||
|
</imageobject>
|
||||||
|
<imageobject>
|
||||||
|
<imagedata fileref="screenshot.eps" format="EPS"/>
|
||||||
|
</imageobject>
|
||||||
|
<textobject>
|
||||||
|
<phrase>Screenshot</phrase>
|
||||||
|
</textobject>
|
||||||
|
</mediaobject>
|
||||||
|
</screenshot>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<sect1 id="kopete-otr-features">
|
||||||
|
<title>More &kopete-otr; features</title>
|
||||||
|
|
||||||
|
<para>It slices! It dices! and it comes with a free toaster!</para>
|
||||||
|
<para>
|
||||||
|
The Squiggle Tool <guiicon><inlinemediaobject>
|
||||||
|
<imageobject>
|
||||||
|
<imagedata fileref="squiggle.png" format="PNG"/>
|
||||||
|
</imageobject>
|
||||||
|
<imageobject>
|
||||||
|
<imagedata fileref="squiggle.eps" format="EPS"/>
|
||||||
|
</imageobject>
|
||||||
|
<textobject>
|
||||||
|
<phrase>Squiggle</phrase>
|
||||||
|
</textobject>
|
||||||
|
</inlinemediaobject></guiicon> is used to draw squiggly lines all over
|
||||||
|
the &kopete-otr; main window. It's not a bug, it's a feature!
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="commands">
|
||||||
|
<title>Command Reference</title>
|
||||||
|
|
||||||
|
<!-- (OPTIONAL, BUT RECOMMENDED) This chapter should list all of the
|
||||||
|
application windows and their menubar and toolbar commands for easy reference.
|
||||||
|
Also include any keys that have a special function but have no equivalent in the
|
||||||
|
menus or toolbars. This may not be necessary for small apps or apps with no tool
|
||||||
|
or menu bars. -->
|
||||||
|
|
||||||
|
<sect1 id="kopete-otr-mainwindow">
|
||||||
|
<title>The main &kopete-otr; window</title>
|
||||||
|
|
||||||
|
<sect2>
|
||||||
|
<title>The File Menu</title>
|
||||||
|
<para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><menuchoice>
|
||||||
|
<shortcut>
|
||||||
|
<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
|
||||||
|
</shortcut>
|
||||||
|
<guimenu>File</guimenu>
|
||||||
|
<guimenuitem>New</guimenuitem>
|
||||||
|
</menuchoice></term>
|
||||||
|
<listitem><para><action>Creates a new document</action></para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><menuchoice>
|
||||||
|
<shortcut>
|
||||||
|
<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
|
||||||
|
</shortcut>
|
||||||
|
<guimenu>File</guimenu>
|
||||||
|
<guimenuitem>Save</guimenuitem>
|
||||||
|
</menuchoice></term>
|
||||||
|
<listitem><para><action>Saves the document</action></para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><menuchoice>
|
||||||
|
<shortcut>
|
||||||
|
<keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo>
|
||||||
|
</shortcut>
|
||||||
|
<guimenu>File</guimenu>
|
||||||
|
<guimenuitem>Quit</guimenuitem>
|
||||||
|
</menuchoice></term>
|
||||||
|
<listitem><para><action>Quits</action> &kopete-otr;</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
<sect2>
|
||||||
|
<title>The <guimenu>Help</guimenu> Menu</title>
|
||||||
|
|
||||||
|
<!-- Assuming you have a standard help menu (help, what's this, about -->
|
||||||
|
<!-- &kopete-otr;, about KDE) then the documentation is already written. -->
|
||||||
|
<!-- The following entity is valid anywhere that a variablelist is -->
|
||||||
|
<!-- valid. -->
|
||||||
|
|
||||||
|
&help.menu.documentation;
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="developers">
|
||||||
|
<title>Developer's Guide to &kopete-otr;</title>
|
||||||
|
|
||||||
|
<!-- (OPTIONAL) A Programming/Scripting reference chapter should be
|
||||||
|
used for apps that use plugins or that provide their own scripting hooks
|
||||||
|
and/or development libraries. -->
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Programming &kopete-otr; plugins is a joy to behold. Just read through the next
|
||||||
|
66 pages of API's to learn how!
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- Use refentries to describe APIs. Refentries are fairly complicated and you
|
||||||
|
should consult the docbook reference for further details. The example below was
|
||||||
|
taken from that reference and shortened a bit for readability. -->
|
||||||
|
|
||||||
|
<refentry id="re-1007-unmanagechildren-1">
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>XtUnmanageChildren</refentrytitle>
|
||||||
|
<refmiscinfo>Xt - Geometry Management</refmiscinfo>
|
||||||
|
</refmeta>
|
||||||
|
<refnamediv>
|
||||||
|
<refname>XtUnmanageChildren
|
||||||
|
</refname>
|
||||||
|
<refpurpose>remove a list of children from a parent widget's managed
|
||||||
|
list.
|
||||||
|
<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
|
||||||
|
<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm>
|
||||||
|
</refpurpose>
|
||||||
|
|
||||||
|
</refnamediv>
|
||||||
|
<refsynopsisdiv>
|
||||||
|
<refsynopsisdivinfo>
|
||||||
|
<date>4 March 1996</date>
|
||||||
|
</refsynopsisdivinfo>
|
||||||
|
<synopsis>
|
||||||
|
void XtUnmanageChildren(<replaceable class="parameter">children</replaceable>, <replaceable class="parameter">num_children</replaceable>)
|
||||||
|
WidgetList <replaceable class="parameter">children</replaceable>;
|
||||||
|
Cardinal <replaceable class="parameter">num_children</replaceable>;
|
||||||
|
</synopsis>
|
||||||
|
|
||||||
|
<refsect2 id="r2-1007-unmanagechildren-1">
|
||||||
|
<title>Inputs</title>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">children</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Specifies an array of child widgets. Each child must be of
|
||||||
|
class RectObj or any subclass thereof.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">num_children</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Specifies the number of elements in <replaceable class="parameter">children</replaceable>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect2></refsynopsisdiv>
|
||||||
|
|
||||||
|
<refsect1 id="r1-1007-unmanagechildren-1">
|
||||||
|
<title>Description
|
||||||
|
</title>
|
||||||
|
<para><function>XtUnmanageChildren()</function> unmaps the specified widgets
|
||||||
|
and removes them from their parent's geometry management.
|
||||||
|
The widgets will disappear from the screen, and (depending
|
||||||
|
on its parent) may no longer have screen space allocated for
|
||||||
|
them.
|
||||||
|
</para>
|
||||||
|
<para>Each of the widgets in the <replaceable class="parameter">children</replaceable> array must have
|
||||||
|
the same parent.
|
||||||
|
</para>
|
||||||
|
<para>See the “Algorithm” section below for full details of the
|
||||||
|
widget unmanagement procedure.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1 id="r1-1007-unmanagechildren-2">
|
||||||
|
<title>Usage</title>
|
||||||
|
<para>Unmanaging widgets is the usual method for temporarily
|
||||||
|
making them invisible. They can be re-managed with
|
||||||
|
<function>XtManageChildren()</function>.
|
||||||
|
</para>
|
||||||
|
<para>You can unmap a widget, but leave it under geometry
|
||||||
|
management by calling <function>XtUnmapWidget()</function>. You can
|
||||||
|
destroy a widget's window without destroying the widget by
|
||||||
|
calling <function>XtUnrealizeWidget()</function>. You can destroy a
|
||||||
|
widget completely with <function>XtDestroyWidget()</function>.
|
||||||
|
</para>
|
||||||
|
<para>If you are only going to unmanage a single widget, it is
|
||||||
|
more convenient to call <function>XtUnmanageChild()</function>. It is
|
||||||
|
often more convenient to call <function>XtUnmanageChild()</function>
|
||||||
|
several times than it is to declare and initialize an array
|
||||||
|
of widgets to pass to <function>XtUnmanageChildren()</function>. Calling
|
||||||
|
<function>XtUnmanageChildren()</function> is more efficient, however,
|
||||||
|
because it only calls the parent's <function>change_managed()</function>
|
||||||
|
method once.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1 id="r1-1007-unmanagechildren-3">
|
||||||
|
<title>Algorithm
|
||||||
|
</title>
|
||||||
|
<para><function>XtUnmanageChildren()</function> performs the following:
|
||||||
|
</para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>-
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Ignores the child if it already is unmanaged or is being
|
||||||
|
destroyed.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>-
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Otherwise, if the child is realized, it makes it nonvisible
|
||||||
|
by unmapping it.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
<para>
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1 id="r1-1007-unmanagechildren-4">
|
||||||
|
<title>Structures</title>
|
||||||
|
<para>The <type>WidgetList</type> type is simply an array of widgets:
|
||||||
|
</para>
|
||||||
|
<screen id="sc-1007-unmanagechildren-1">typedef Widget *WidgetList;
|
||||||
|
</screen>
|
||||||
|
</refsect1>
|
||||||
|
</refentry>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="faq">
|
||||||
|
<title>Questions and Answers</title>
|
||||||
|
|
||||||
|
<!-- (OPTIONAL but recommended) This chapter should include all of the silly
|
||||||
|
(and not-so-silly) newbie questions that fill up your mailbox. This chapter
|
||||||
|
should be reserved for BRIEF questions and answers! If one question uses more
|
||||||
|
than a page or so then it should probably be part of the
|
||||||
|
"Using this Application" chapter instead. You should use links to
|
||||||
|
cross-reference questions to the parts of your documentation that answer them.
|
||||||
|
This is also a great place to provide pointers to other FAQ's if your users
|
||||||
|
must do some complicated configuration on other programs in order for your
|
||||||
|
application work. -->
|
||||||
|
|
||||||
|
&reporting.bugs;
|
||||||
|
&updating.documentation;
|
||||||
|
|
||||||
|
<qandaset id="faqlist">
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>My Mouse doesn't work. How do I quit &kopete-otr;?</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>You silly goose! Check out the <link linkend="commands">Commands
|
||||||
|
Section</link> for the answer.</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>Why can't I twiddle my documents?</para>
|
||||||
|
</question>
|
||||||
|
<answer>
|
||||||
|
<para>You can only twiddle your documents if you have the foobar.lib
|
||||||
|
installed.</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
|
</qandaset>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="credits">
|
||||||
|
|
||||||
|
<!-- Include credits for the programmers, documentation writers, and
|
||||||
|
contributors here. The license for your software should then be included below
|
||||||
|
the credits with a reference to the appropriate license file included in the KDE
|
||||||
|
distribution. -->
|
||||||
|
|
||||||
|
<title>Credits and License</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
&kopete-otr;
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Program copyright 2007 Michael Zanetti <email>michael_zanetti@gmx.net</email>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Contributors:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Konqui the KDE Dragon <email>konqui@kde.org</email></para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Documentation copyright 2007 Michael Zanetti <email>michael_zanetti@gmx.net</email>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
|
||||||
|
|
||||||
|
&underFDL; <!-- FDL: do not remove -->
|
||||||
|
|
||||||
|
<!-- Determine which license your application is licensed under,
|
||||||
|
and delete all the remaining licenses below:
|
||||||
|
|
||||||
|
(NOTE: All documentation are licensed under the FDL,
|
||||||
|
regardless of what license the application uses) -->
|
||||||
|
|
||||||
|
&underGPL; <!-- GPL License -->
|
||||||
|
&underBSDLicense; <!-- BSD License -->
|
||||||
|
&underArtisticLicense; <!-- BSD Artistic License -->
|
||||||
|
&underX11License; <!-- X11 License -->
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<appendix id="installation">
|
||||||
|
<title>Installation</title>
|
||||||
|
|
||||||
|
<sect1 id="getting-kopete-otr">
|
||||||
|
<title>How to obtain &kopete-otr;</title>
|
||||||
|
|
||||||
|
<!-- This first entity contains boiler plate for applications that are
|
||||||
|
part of KDE CVS. You should remove it if you are releasing your
|
||||||
|
application -->
|
||||||
|
|
||||||
|
&install.intro.documentation;
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<sect1 id="requirements">
|
||||||
|
<title>Requirements</title>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
List any special requirements for your application here. This should include:
|
||||||
|
.Libraries or other software that is not included in kdesupport,
|
||||||
|
kdelibs, or kdebase.
|
||||||
|
.Hardware requirements like amount of RAM, disk space, graphics card
|
||||||
|
capabilities, screen resolution, special expansion cards, etc.
|
||||||
|
.Operating systems the app will run on. If your app is designed only for a
|
||||||
|
specific OS, (you wrote a graphical LILO configurator for example) put this
|
||||||
|
information here.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In order to successfully use &kopete-otr;, you need &kde; 1.1. Foobar.lib is
|
||||||
|
required in order to support the advanced &kopete-otr; features. &kopete-otr; uses
|
||||||
|
about 5 megs of memory to run, but this may vary depending on your
|
||||||
|
platform and configuration.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
All required libraries as well as &kopete-otr; itself can be found
|
||||||
|
on <ulink url="ftp://ftp.kopete-otr.org">The &kopete-otr; home page</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- For a list of updates, you may refer to the application web site
|
||||||
|
or the ChangeLog file, or ... -->
|
||||||
|
<para>
|
||||||
|
You can find a list of changes at <ulink
|
||||||
|
url="http://apps.kde.org/kopete-otr">http://apps.kde.org/kopete-otr</ulink>.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<sect1 id="compilation">
|
||||||
|
<title>Compilation and Installation</title>
|
||||||
|
|
||||||
|
<!-- This entity contains the boilerplate text for standard -->
|
||||||
|
<!-- compilation instructions. If your application requires any -->
|
||||||
|
<!-- special handling, remove it, and replace with your own text. -->
|
||||||
|
|
||||||
|
&install.compile.documentation;
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<sect1 id="configuration">
|
||||||
|
<title>Configuration</title>
|
||||||
|
|
||||||
|
<para>Don't forget to tell your system to start the <filename>dtd</filename>
|
||||||
|
dicer-toaster daemon first, or &kopete-otr; won't work !</para>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
</appendix>
|
||||||
|
|
||||||
|
&documentation.index;
|
||||||
|
</book>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Local Variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-indent-step:0
|
||||||
|
sgml-indent-data:nil
|
||||||
|
End:
|
||||||
|
|
||||||
|
vim:tabstop=2:shiftwidth=2:expandtab
|
||||||
|
-->
|
||||||
|
|
@ -0,0 +1,262 @@
|
|||||||
|
<?xml version = '1.0'?>
|
||||||
|
<kdevelop>
|
||||||
|
<general>
|
||||||
|
<author>Michael Zanetti</author>
|
||||||
|
<email>michael_zanetti@gmx.net</email>
|
||||||
|
<version>0.3</version>
|
||||||
|
<projectmanagement>KDevKDEAutoProject</projectmanagement>
|
||||||
|
<primarylanguage>C++</primarylanguage>
|
||||||
|
<keywords>
|
||||||
|
<keyword>C++</keyword>
|
||||||
|
<keyword>Code</keyword>
|
||||||
|
<keyword>Qt</keyword>
|
||||||
|
<keyword>KDE</keyword>
|
||||||
|
</keywords>
|
||||||
|
<ignoreparts/>
|
||||||
|
<projectname>kopete_otr</projectname>
|
||||||
|
<projectdirectory>.</projectdirectory>
|
||||||
|
<absoluteprojectpath>false</absoluteprojectpath>
|
||||||
|
<description/>
|
||||||
|
<defaultencoding/>
|
||||||
|
</general>
|
||||||
|
<kdevcppsupport>
|
||||||
|
<qt>
|
||||||
|
<version>3</version>
|
||||||
|
<used>true</used>
|
||||||
|
<includestyle>3</includestyle>
|
||||||
|
<designerintegration>ExternalDesigner</designerintegration>
|
||||||
|
<root>/usr/qt/3</root>
|
||||||
|
<qmake>/usr/qt/3/bin/qmake</qmake>
|
||||||
|
<designer>/usr/qt/3/bin/designer</designer>
|
||||||
|
<designerpluginpaths/>
|
||||||
|
</qt>
|
||||||
|
<references/>
|
||||||
|
<codecompletion>
|
||||||
|
<automaticCodeCompletion>false</automaticCodeCompletion>
|
||||||
|
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||||
|
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||||
|
<codeCompletionDelay>250</codeCompletionDelay>
|
||||||
|
<argumentsHintDelay>400</argumentsHintDelay>
|
||||||
|
<headerCompletionDelay>250</headerCompletionDelay>
|
||||||
|
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
|
||||||
|
<completionBoxItemOrder>0</completionBoxItemOrder>
|
||||||
|
<howEvaluationContextMenu>true</howEvaluationContextMenu>
|
||||||
|
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
|
||||||
|
<statusBarTypeEvaluation>false</statusBarTypeEvaluation>
|
||||||
|
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
|
||||||
|
<processPrimaryTypes>true</processPrimaryTypes>
|
||||||
|
<processFunctionArguments>false</processFunctionArguments>
|
||||||
|
<preProcessAllHeaders>false</preProcessAllHeaders>
|
||||||
|
<parseMissingHeaders>false</parseMissingHeaders>
|
||||||
|
<resolveIncludePaths>true</resolveIncludePaths>
|
||||||
|
<alwaysParseInBackground>true</alwaysParseInBackground>
|
||||||
|
<usePermanentCaching>true</usePermanentCaching>
|
||||||
|
<alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
|
||||||
|
<includePaths>.;</includePaths>
|
||||||
|
<includeGlobalFunctions>true</includeGlobalFunctions>
|
||||||
|
<includeTypes>true</includeTypes>
|
||||||
|
<includeEnums>true</includeEnums>
|
||||||
|
<includeTypedefs>false</includeTypedefs>
|
||||||
|
<parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
|
||||||
|
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
|
||||||
|
</codecompletion>
|
||||||
|
<creategettersetter>
|
||||||
|
<prefixGet/>
|
||||||
|
<prefixSet>set</prefixSet>
|
||||||
|
<prefixVariable>m_,_</prefixVariable>
|
||||||
|
<parameterName>theValue</parameterName>
|
||||||
|
<inlineGet>true</inlineGet>
|
||||||
|
<inlineSet>true</inlineSet>
|
||||||
|
</creategettersetter>
|
||||||
|
<splitheadersource>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<orientation>Vertical</orientation>
|
||||||
|
</splitheadersource>
|
||||||
|
<designerintegration>
|
||||||
|
<qtdesigner/>
|
||||||
|
</designerintegration>
|
||||||
|
</kdevcppsupport>
|
||||||
|
<kdevautoproject>
|
||||||
|
<general>
|
||||||
|
<activetarget>src/libkotr.la</activetarget>
|
||||||
|
<useconfiguration>default</useconfiguration>
|
||||||
|
</general>
|
||||||
|
<run>
|
||||||
|
<mainprogram>/usr/kde/3.5/bin/kopete</mainprogram>
|
||||||
|
<directoryradio>executable</directoryradio>
|
||||||
|
<programargs/>
|
||||||
|
<globaldebugarguments/>
|
||||||
|
<globalcwd>/home/dreadhead/Develop/kopete_otr/trunk/kopete_otr</globalcwd>
|
||||||
|
<useglobalprogram>true</useglobalprogram>
|
||||||
|
<terminal>false</terminal>
|
||||||
|
<autocompile>false</autocompile>
|
||||||
|
<autoinstall>false</autoinstall>
|
||||||
|
<autokdesu>false</autokdesu>
|
||||||
|
<envvars/>
|
||||||
|
</run>
|
||||||
|
<configurations>
|
||||||
|
<optimized>
|
||||||
|
<builddir>optimized</builddir>
|
||||||
|
<ccompiler>GccOptions</ccompiler>
|
||||||
|
<cxxcompiler>GppOptions</cxxcompiler>
|
||||||
|
<f77compiler>G77Options</f77compiler>
|
||||||
|
<cxxflags>-O2 -g0</cxxflags>
|
||||||
|
</optimized>
|
||||||
|
<debug>
|
||||||
|
<configargs>--enable-debug=full --prefix=/usr</configargs>
|
||||||
|
<builddir>debug</builddir>
|
||||||
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
|
<f77compiler>kdevg77options</f77compiler>
|
||||||
|
<cxxflags>-O0 -g3</cxxflags>
|
||||||
|
<envvars/>
|
||||||
|
<topsourcedir/>
|
||||||
|
<cppflags/>
|
||||||
|
<ldflags/>
|
||||||
|
<ccompilerbinary/>
|
||||||
|
<cxxcompilerbinary/>
|
||||||
|
<f77compilerbinary/>
|
||||||
|
<cflags/>
|
||||||
|
<f77flags/>
|
||||||
|
</debug>
|
||||||
|
<default>
|
||||||
|
<envvars/>
|
||||||
|
<configargs>--enable-debug</configargs>
|
||||||
|
<builddir/>
|
||||||
|
<topsourcedir/>
|
||||||
|
<cppflags/>
|
||||||
|
<ldflags/>
|
||||||
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
|
<f77compiler>kdevg77options</f77compiler>
|
||||||
|
<ccompilerbinary/>
|
||||||
|
<cxxcompilerbinary/>
|
||||||
|
<f77compilerbinary/>
|
||||||
|
<cflags/>
|
||||||
|
<cxxflags/>
|
||||||
|
<f77flags/>
|
||||||
|
</default>
|
||||||
|
</configurations>
|
||||||
|
<make>
|
||||||
|
<envvars>
|
||||||
|
<envvar value="1" name="WANT_AUTOCONF_2_5" />
|
||||||
|
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
|
||||||
|
</envvars>
|
||||||
|
<abortonerror>true</abortonerror>
|
||||||
|
<runmultiplejobs>false</runmultiplejobs>
|
||||||
|
<numberofjobs>1</numberofjobs>
|
||||||
|
<dontact>false</dontact>
|
||||||
|
<makebin/>
|
||||||
|
<prio>0</prio>
|
||||||
|
</make>
|
||||||
|
<subclassing>
|
||||||
|
<subclass uifile="/src/privkeypopupui.ui" sourcefile="/src/privkeypopup.cpp" />
|
||||||
|
<subclass uifile="/src/privkeypopupui.ui" sourcefile="/src/privkeypopup.h" />
|
||||||
|
<subclass uifile="/src/smppopupui.ui" sourcefile="/src/smppopup.cpp" />
|
||||||
|
<subclass uifile="/src/smppopupui.ui" sourcefile="/src/smppopup.h" />
|
||||||
|
</subclassing>
|
||||||
|
</kdevautoproject>
|
||||||
|
<kdevfileview>
|
||||||
|
<groups>
|
||||||
|
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
|
||||||
|
<group pattern="*.ui" name="User Interface" />
|
||||||
|
<group pattern="*.png" name="Icons" />
|
||||||
|
<group pattern="*.po;*.ts" name="Translations" />
|
||||||
|
<group pattern="*" name="Others" />
|
||||||
|
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||||
|
<hidenonlocation>false</hidenonlocation>
|
||||||
|
</groups>
|
||||||
|
<tree>
|
||||||
|
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
|
||||||
|
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||||
|
</tree>
|
||||||
|
</kdevfileview>
|
||||||
|
<kdevdoctreeview>
|
||||||
|
<ignoretocs>
|
||||||
|
<toc>ada</toc>
|
||||||
|
<toc>ada_bugs_gcc</toc>
|
||||||
|
<toc>bash</toc>
|
||||||
|
<toc>bash_bugs</toc>
|
||||||
|
<toc>clanlib</toc>
|
||||||
|
<toc>w3c-dom-level2-html</toc>
|
||||||
|
<toc>fortran_bugs_gcc</toc>
|
||||||
|
<toc>gnome1</toc>
|
||||||
|
<toc>gnustep</toc>
|
||||||
|
<toc>gtk</toc>
|
||||||
|
<toc>gtk_bugs</toc>
|
||||||
|
<toc>haskell</toc>
|
||||||
|
<toc>haskell_bugs_ghc</toc>
|
||||||
|
<toc>java_bugs_gcc</toc>
|
||||||
|
<toc>java_bugs_sun</toc>
|
||||||
|
<toc>pascal_bugs_fp</toc>
|
||||||
|
<toc>php</toc>
|
||||||
|
<toc>php_bugs</toc>
|
||||||
|
<toc>perl</toc>
|
||||||
|
<toc>perl_bugs</toc>
|
||||||
|
<toc>python</toc>
|
||||||
|
<toc>python_bugs</toc>
|
||||||
|
<toc>ruby</toc>
|
||||||
|
<toc>ruby_bugs</toc>
|
||||||
|
<toc>sdl</toc>
|
||||||
|
<toc>w3c-svg</toc>
|
||||||
|
<toc>sw</toc>
|
||||||
|
<toc>w3c-uaag10</toc>
|
||||||
|
<toc>wxwidgets_bugs</toc>
|
||||||
|
</ignoretocs>
|
||||||
|
<ignoreqt_xml>
|
||||||
|
<toc>qmake User Guide</toc>
|
||||||
|
</ignoreqt_xml>
|
||||||
|
</kdevdoctreeview>
|
||||||
|
<kdevdebugger>
|
||||||
|
<general>
|
||||||
|
<dbgshell>libtool</dbgshell>
|
||||||
|
<gdbpath/>
|
||||||
|
<configGdbScript/>
|
||||||
|
<runShellScript/>
|
||||||
|
<runGdbScript/>
|
||||||
|
<breakonloadinglibs>true</breakonloadinglibs>
|
||||||
|
<separatetty>false</separatetty>
|
||||||
|
<floatingtoolbar>false</floatingtoolbar>
|
||||||
|
<programargs/>
|
||||||
|
</general>
|
||||||
|
<display>
|
||||||
|
<staticmembers>false</staticmembers>
|
||||||
|
<demanglenames>true</demanglenames>
|
||||||
|
<outputradix>10</outputradix>
|
||||||
|
</display>
|
||||||
|
</kdevdebugger>
|
||||||
|
<kdevfilecreate>
|
||||||
|
<filetypes/>
|
||||||
|
<useglobaltypes>
|
||||||
|
<type ext="ui" />
|
||||||
|
<type ext="cpp" />
|
||||||
|
<type ext="h" />
|
||||||
|
</useglobaltypes>
|
||||||
|
</kdevfilecreate>
|
||||||
|
<kdevdocumentation>
|
||||||
|
<projectdoc>
|
||||||
|
<docsystem>Doxygen Documentation Collection</docsystem>
|
||||||
|
<docurl>kopete_otr.tag</docurl>
|
||||||
|
</projectdoc>
|
||||||
|
</kdevdocumentation>
|
||||||
|
<substmap>
|
||||||
|
<APPNAME>kopete_otr</APPNAME>
|
||||||
|
<APPNAMELC>kopete_otr</APPNAMELC>
|
||||||
|
<APPNAMESC>Kopete_otr</APPNAMESC>
|
||||||
|
<APPNAMEUC>KOPETE_OTR</APPNAMEUC>
|
||||||
|
<AUTHOR>Frank Scheffold</AUTHOR>
|
||||||
|
<EMAIL>frank.scheffold@gmx.de</EMAIL>
|
||||||
|
<LICENSE>GPL</LICENSE>
|
||||||
|
<LICENSEFILE>COPYING</LICENSEFILE>
|
||||||
|
<VERSION>0.1</VERSION>
|
||||||
|
<YEAR>2007</YEAR>
|
||||||
|
<dest>/home/frank/Programme/kopete_otr</dest>
|
||||||
|
</substmap>
|
||||||
|
<cppsupportpart>
|
||||||
|
<filetemplates>
|
||||||
|
<interfacesuffix>.h</interfacesuffix>
|
||||||
|
<implementationsuffix>.cpp</implementationsuffix>
|
||||||
|
</filetemplates>
|
||||||
|
</cppsupportpart>
|
||||||
|
</kdevelop>
|
Binary file not shown.
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version = '1.0' encoding = 'UTF-8'?>
|
||||||
|
<!DOCTYPE KDevPrjSession>
|
||||||
|
<KDevPrjSession>
|
||||||
|
<DocsAndViews NumberOfDocuments="1" >
|
||||||
|
<Doc0 NumberOfViews="1" URL="file:///home/dreadhead/Develop/kopete_otr/trunk/kopete_otr/po/de.po" >
|
||||||
|
<View0 Encoding="UTF-8" line="285" Type="Source" />
|
||||||
|
</Doc0>
|
||||||
|
</DocsAndViews>
|
||||||
|
<pluginList>
|
||||||
|
<kdevdebugger>
|
||||||
|
<breakpointList/>
|
||||||
|
<showInternalCommands value="0" />
|
||||||
|
</kdevdebugger>
|
||||||
|
<kdevastyle>
|
||||||
|
<Extensions ext="*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm" />
|
||||||
|
<AStyle IndentPreprocessors="0" FillCount="4" PadParenthesesOut="1" IndentNamespaces="1" IndentLabels="1" Fill="Tabs" MaxStatement="40" Brackets="Break" MinConditional="-1" IndentBrackets="0" PadParenthesesUn="1" BlockBreak="0" KeepStatements="1" KeepBlocks="1" BlockIfElse="0" IndentSwitches="1" PadOperators="0" FStyle="UserDefined" IndentCases="0" FillEmptyLines="0" BracketsCloseHeaders="0" BlockBreakAll="0" PadParenthesesIn="1" IndentClasses="1" IndentBlocks="0" FillForce="0" />
|
||||||
|
</kdevastyle>
|
||||||
|
<kdevbookmarks>
|
||||||
|
<bookmarks/>
|
||||||
|
</kdevbookmarks>
|
||||||
|
<kdevvalgrind>
|
||||||
|
<executable path="" params="" />
|
||||||
|
<valgrind path="" params="" />
|
||||||
|
<calltree path="" params="" />
|
||||||
|
<kcachegrind path="" />
|
||||||
|
</kdevvalgrind>
|
||||||
|
</pluginList>
|
||||||
|
</KDevPrjSession>
|
@ -0,0 +1 @@
|
|||||||
|
POFILES = AUTO
|
@ -0,0 +1,413 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2007-11-07 19:37+0100\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: otrguiclient.cpp:61
|
||||||
|
msgid "OTR Settings"
|
||||||
|
msgstr "OTR Einstellungen"
|
||||||
|
|
||||||
|
#: otrguiclient.cpp:63 otrguiclient.cpp:100 otrguiclient.cpp:118
|
||||||
|
msgid "Start OTR session"
|
||||||
|
msgstr "OTR Sitzung starten"
|
||||||
|
|
||||||
|
#: otrguiclient.cpp:64
|
||||||
|
msgid "End OTR session"
|
||||||
|
msgstr "OTR Sitzung beenden"
|
||||||
|
|
||||||
|
#: otrguiclient.cpp:65
|
||||||
|
msgid "Authenticate Contact"
|
||||||
|
msgstr "Kontakt authentifizieren"
|
||||||
|
|
||||||
|
#: otrguiclient.cpp:106 otrguiclient.cpp:112
|
||||||
|
msgid "Refresh OTR session"
|
||||||
|
msgstr "OTR Sitzung erneuern"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:96 otrlconfinterface.cpp:86 rc.cpp:3
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Generating private key"
|
||||||
|
msgstr "Erzeuge privaten Schlüssel"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:178
|
||||||
|
msgid ""
|
||||||
|
"<b>Received a new fingerprint from <a>%1</a>. You should authenticate this "
|
||||||
|
"contact.</b>"
|
||||||
|
msgstr "<b>Neuen Fingerabdruck von <a>%1</a> erhalten. Bitte authentifizieren Sie diesen Kontakt.</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:192
|
||||||
|
msgid "<b>Private OTR session started.</b>"
|
||||||
|
msgstr "<b>Private OTR Sitzung gestartet.</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:196
|
||||||
|
msgid "<b>Unverified OTR session started.</b>"
|
||||||
|
msgstr "<b>Nicht überprüfte OTR Sitzung gestartet.</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:209
|
||||||
|
msgid "<b>OTR Session ended. The conversation is now insecure!</b>"
|
||||||
|
msgstr "<b>OTR Sitzung beendet. Die Unterhaltung ist jetzt unsicher!<b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:216
|
||||||
|
msgid "<b>OTR connection refreshed successfully.</b>"
|
||||||
|
msgstr "<b>OTR Sitzung erfolgreich erneuert.</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:303
|
||||||
|
msgid "<b>%1</b> has ended the OTR session. You should do the same."
|
||||||
|
msgstr "<b>%1</b> hat die OTR Sitzung beendet. Beenden Sie diese ebenfalls oder bauen Sie eine neue auf."
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:318 otrlchatinterface.cpp:490 rc.cpp:121
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Enter authentication secret"
|
||||||
|
msgstr "Geben Sie das Geheimnis zum authentifizieren ein"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:337 otrlchatinterface.cpp:355
|
||||||
|
msgid "<b>Authentication successful. The conversation is now secure!</b>"
|
||||||
|
msgstr "<b>Kontakt erfolgreich authentifiziert. Die Sitzung ist jetzt sicher!</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:341 otrlchatinterface.cpp:359
|
||||||
|
msgid "<b>Authentication failed. The conversation is now insecure!</b>"
|
||||||
|
msgstr "<b>Authentifizierung fehlgeschlagen. Die Sitzung ist jetzt unsicher!</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:368
|
||||||
|
msgid "<b>Authentication error!</b>"
|
||||||
|
msgstr "<b>Fehler beim Authentifizieren!</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:398
|
||||||
|
msgid "Encryption error"
|
||||||
|
msgstr "Verschlüsselungsfehler"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:425
|
||||||
|
msgid "Terminating OTR session."
|
||||||
|
msgstr "Beende OTR Sitzung."
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:652
|
||||||
|
msgid "<b>Authentication aborded. The conversation is now insecure!</b>"
|
||||||
|
msgstr "<b>Authenfizierung abgebrochen. Die Sitzung ist jetzt unsicher!</b>"
|
||||||
|
|
||||||
|
#: otrlchatinterface.cpp:667
|
||||||
|
msgid "<b>Authenticating contact...</b>"
|
||||||
|
msgstr "<b>Authentifiziere Kontakt...</b>"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:72
|
||||||
|
msgid "No fingerprint present."
|
||||||
|
msgstr "Kein Fingerabdruck vorhanden."
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:115
|
||||||
|
msgid "Unused"
|
||||||
|
msgstr "Unbenutzt"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:119
|
||||||
|
msgid "Private"
|
||||||
|
msgstr "Privat"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:121
|
||||||
|
msgid "Unverified"
|
||||||
|
msgstr "Nicht überprüft"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:124
|
||||||
|
msgid "Finished"
|
||||||
|
msgstr "Beendet"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:126
|
||||||
|
msgid "Not Private"
|
||||||
|
msgstr "Nicht Privat"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:129
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Ja"
|
||||||
|
|
||||||
|
#: otrlconfinterface.cpp:129
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Nein"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:145
|
||||||
|
msgid "&Default"
|
||||||
|
msgstr "&Voreinstellung"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:145 rc.cpp:63
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Al&ways"
|
||||||
|
msgstr "&Immer"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:145 rc.cpp:36
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Opportunistic"
|
||||||
|
msgstr "&Automatisch"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:145 rc.cpp:54
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Manual"
|
||||||
|
msgstr "&Manuell"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:145 rc.cpp:45
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Ne&ver"
|
||||||
|
msgstr "&Nie"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:146
|
||||||
|
msgid "&OTR Policy"
|
||||||
|
msgstr "&OTR Einstellung"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:219
|
||||||
|
msgid "Your policy settings do not allow encrypted sessions to this contact."
|
||||||
|
msgstr "Ihre OTR Einstellungen erlauben keine verschlüsselte Verbindung zu diesem Kontakt"
|
||||||
|
|
||||||
|
#: otrplugin.cpp:225
|
||||||
|
msgid "Attempting to refresh the OTR session with <b>%1</b>..."
|
||||||
|
msgstr "Versuche die OTR Sitzung mit <b>%1</b> zu erneuern..."
|
||||||
|
|
||||||
|
#: otrplugin.cpp:227
|
||||||
|
msgid "Attempting to start a private OTR session with <b>%1</b>..."
|
||||||
|
msgstr "Versuche eine private OTR Sitzung mit <b>%1</b> aufzubauen..."
|
||||||
|
|
||||||
|
#: otrpreferences.cpp:119
|
||||||
|
msgid "Selected account already has a key. Do you want to create a new one?"
|
||||||
|
msgstr "Das ausgewählte Konto hat bereits einen Schlüssel. Möchten Sie einen neuen erzeugen?"
|
||||||
|
|
||||||
|
#: otrpreferences.cpp:119
|
||||||
|
msgid "Overwrite key?"
|
||||||
|
msgstr "Schlüssel überschreiben?"
|
||||||
|
|
||||||
|
#: otrpreferences.cpp:156
|
||||||
|
msgid ""
|
||||||
|
"Please contact %1 via another secure way and verify that the following "
|
||||||
|
"Fingerprint is correct:"
|
||||||
|
msgstr ""
|
||||||
|
"Bitte kontaktieren Sie %1 über eine andere sichere Verbindung und überprüfen Sie ob der folgende"
|
||||||
|
"Fingerabdruck korrekt ist:"
|
||||||
|
|
||||||
|
#: otrpreferences.cpp:156
|
||||||
|
msgid "Are you sure you want to trust this fingerprint?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: otrpreferences.cpp:156
|
||||||
|
msgid "Verify fingerprint"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rc.cpp:6
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Please wait while generating the private key"
|
||||||
|
msgstr "Bitte warten Sie während der private Schlüssel erzeugt wird"
|
||||||
|
|
||||||
|
#: rc.cpp:9
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Edit"
|
||||||
|
msgstr "&Bearbeiten"
|
||||||
|
|
||||||
|
#: rc.cpp:12
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Form1"
|
||||||
|
msgstr "Form1"
|
||||||
|
|
||||||
|
#: rc.cpp:15
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Settings"
|
||||||
|
msgstr "&Einstellungen"
|
||||||
|
|
||||||
|
#: rc.cpp:18
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Private Keys"
|
||||||
|
msgstr "Private Schlüssel"
|
||||||
|
|
||||||
|
#: rc.cpp:21
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Generate"
|
||||||
|
msgstr "&Erzeugen"
|
||||||
|
|
||||||
|
#: rc.cpp:24
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+G"
|
||||||
|
msgstr "Alt+E"
|
||||||
|
|
||||||
|
#: rc.cpp:27
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Account:"
|
||||||
|
msgstr "Konto:"
|
||||||
|
|
||||||
|
#: rc.cpp:30
|
||||||
|
#, no-c-format
|
||||||
|
msgid "No Fingerprint"
|
||||||
|
msgstr "Kein Fingerabdruck"
|
||||||
|
|
||||||
|
#: rc.cpp:33
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Default Policy"
|
||||||
|
msgstr "Voreinstellung für Verschlüsselung"
|
||||||
|
|
||||||
|
#: rc.cpp:39 rc.cpp:99 rc.cpp:108 rc.cpp:127
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+O"
|
||||||
|
msgstr "Alt+O"
|
||||||
|
|
||||||
|
#: rc.cpp:42
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Encrypt messages automatically if the other side supports OTR"
|
||||||
|
msgstr "Nachrichten automatisch verschlüsseln wenn die andere Seite OTR unterstützt"
|
||||||
|
|
||||||
|
#: rc.cpp:48 rc.cpp:93
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+V"
|
||||||
|
msgstr "Alt+V"
|
||||||
|
|
||||||
|
#: rc.cpp:51
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Never encrypt messages"
|
||||||
|
msgstr "Nachrichten nie verschlüsseln"
|
||||||
|
|
||||||
|
#: rc.cpp:57 rc.cpp:142
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+M"
|
||||||
|
msgstr "Alt+M"
|
||||||
|
|
||||||
|
#: rc.cpp:60
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Encrypt messages if the other side requests an OTR connection"
|
||||||
|
msgstr "Nachrichten auf Anfrage verschlüsseln"
|
||||||
|
|
||||||
|
#: rc.cpp:66
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+W"
|
||||||
|
msgstr "Alt+I"
|
||||||
|
|
||||||
|
#: rc.cpp:69
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Always encrypt messages"
|
||||||
|
msgstr "Nachrichten immer verschlüsseln"
|
||||||
|
|
||||||
|
#: rc.cpp:72
|
||||||
|
#, no-c-format
|
||||||
|
msgid "K&nown Fingerprints"
|
||||||
|
msgstr "&Bekannte Fingerabdrücke"
|
||||||
|
|
||||||
|
#: rc.cpp:75
|
||||||
|
#, no-c-format
|
||||||
|
msgid "User"
|
||||||
|
msgstr "Benutzer"
|
||||||
|
|
||||||
|
#: rc.cpp:78
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Status"
|
||||||
|
msgstr "Status"
|
||||||
|
|
||||||
|
#: rc.cpp:81
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Verified"
|
||||||
|
msgstr "Überprüft"
|
||||||
|
|
||||||
|
#: rc.cpp:84
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Fingerprint"
|
||||||
|
msgstr "Fingerabdruck"
|
||||||
|
|
||||||
|
#: rc.cpp:87
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Protocol"
|
||||||
|
msgstr "Protokoll"
|
||||||
|
|
||||||
|
#: rc.cpp:90
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Verify Fingerprint"
|
||||||
|
msgstr "Fingerabdruck &überprüfen"
|
||||||
|
|
||||||
|
#: rc.cpp:96
|
||||||
|
#, no-c-format
|
||||||
|
msgid "F&orget Fingerprint"
|
||||||
|
msgstr "Fingerabdruck &löschen"
|
||||||
|
|
||||||
|
#: rc.cpp:102 smppopup.cpp:65
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Verify Fingerprint"
|
||||||
|
msgstr "Fingerabdruck überprüfen"
|
||||||
|
|
||||||
|
#: rc.cpp:105 rc.cpp:124
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&OK"
|
||||||
|
msgstr "&OK"
|
||||||
|
|
||||||
|
#: rc.cpp:112
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Tools"
|
||||||
|
msgstr "&Extras"
|
||||||
|
|
||||||
|
#: rc.cpp:115 rc.cpp:118
|
||||||
|
#, no-c-format
|
||||||
|
msgid "OTR Encryption"
|
||||||
|
msgstr "OTR Verschlüsselung"
|
||||||
|
|
||||||
|
#: rc.cpp:130
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Cancel"
|
||||||
|
msgstr "&Abbrechen"
|
||||||
|
|
||||||
|
#: rc.cpp:133
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+C"
|
||||||
|
msgstr "Alt+C"
|
||||||
|
|
||||||
|
#: rc.cpp:136
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Please enter the secret passphrase to authenticate this contact."
|
||||||
|
msgstr "Bitte geben Sie das Geheimnis um diesen Kontakt zu authentifizieren ein."
|
||||||
|
|
||||||
|
#: rc.cpp:139
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Manual Authentication"
|
||||||
|
msgstr "&Manuelle Überprüfung"
|
||||||
|
|
||||||
|
#: rc.cpp:145
|
||||||
|
#, no-c-format
|
||||||
|
msgid "&Help"
|
||||||
|
msgstr "&Hilfe"
|
||||||
|
|
||||||
|
#: rc.cpp:148
|
||||||
|
#, no-c-format
|
||||||
|
msgid "Alt+H"
|
||||||
|
msgstr "Alt+H"
|
||||||
|
|
||||||
|
#: smppopup.cpp:38
|
||||||
|
msgid "Please enter the secret passphrase to authenticate %1:"
|
||||||
|
msgstr "Bitte geben Sie das Geheimnis ein um %1 zu authentifizieren:"
|
||||||
|
|
||||||
|
#: verifypopup.cpp:39
|
||||||
|
msgid "Verify fingerprint for %1."
|
||||||
|
msgstr "Fingerabdruck für %1 überprüfen"
|
||||||
|
|
||||||
|
#: verifypopup.cpp:40
|
||||||
|
msgid ""
|
||||||
|
"The received fingerprint is:\n"
|
||||||
|
"\n"
|
||||||
|
"%1\n"
|
||||||
|
"\n"
|
||||||
|
"Contact %2 via another secure channel and verify that this fingerprint is "
|
||||||
|
"correct."
|
||||||
|
msgstr ""
|
||||||
|
"Der empfangene Fingerabdruck ist:\n"
|
||||||
|
"\n"
|
||||||
|
"%1\n"
|
||||||
|
"\n"
|
||||||
|
"Kontaktieren Sie %2 über einen anderen sicheren Kanal und überprüfen Sie, ob der fogende Fingerabdruck korrekt ist."
|
||||||
|
|
||||||
|
|
||||||
|
#: verifypopup.cpp:41
|
||||||
|
msgid "verified that this is in fact the correct fingerprint for %1"
|
||||||
|
msgstr "überprüft, dass dieser Fingerabdruck wirklich von %1 stammt."
|
||||||
|
|
||||||
|
#: verifypopup.cpp:42
|
||||||
|
msgid "I have not"
|
||||||
|
msgstr "Ich habe nicht"
|
||||||
|
|
||||||
|
#: verifypopup.cpp:43
|
||||||
|
msgid "I have"
|
||||||
|
msgstr "Ich habe"
|
@ -0,0 +1,48 @@
|
|||||||
|
METASOURCES = AUTO
|
||||||
|
|
||||||
|
messages:
|
||||||
|
extractrc `find . -name \*.ui -o -name \*.rc` > rc.cpp
|
||||||
|
$(XGETTEXT) --keyword=i18n *.cpp -o $(top_srcdir)/po/kopete_otr.pot
|
||||||
|
|
||||||
|
INCLUDES = $(all_includes) -I$(kde_includes)/kopete -I$(kde_includes)/kopete/ui
|
||||||
|
|
||||||
|
kde_module_LTLIBRARIES = kcm_kopete_otr.la kopete_otr.la
|
||||||
|
|
||||||
|
kopete_otr_la_SOURCES = kopete_otr.kcfgc otrguiclient.cpp otrplugin.cpp
|
||||||
|
|
||||||
|
|
||||||
|
kopete_otr_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) \
|
||||||
|
-lkopete
|
||||||
|
|
||||||
|
kcm_kopete_otr_la_SOURCES = kopete_otr.kcfgc otrpreferences.cpp otrprefs.ui
|
||||||
|
|
||||||
|
kcm_kopete_otr_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) \
|
||||||
|
$(all_libraries) -lkopete
|
||||||
|
kcm_kopete_otr_la_LIBADD = libkotr.la -lotr $(LIB_KUTILS)
|
||||||
|
|
||||||
|
service_DATA = kopete_otr.desktop
|
||||||
|
servicedir = $(kde_servicesdir)
|
||||||
|
|
||||||
|
kde_kcfg_DATA = kopete_otr.kcfg
|
||||||
|
|
||||||
|
kcm_DATA = kopete_otr_config.desktop
|
||||||
|
kcmdir = $(kde_servicesdir)/kconfiguredialog
|
||||||
|
|
||||||
|
kopete_otr_la_LIBADD = libkotr.la -lotr
|
||||||
|
|
||||||
|
noinst_HEADERS = otrguiclient.h otrlchatinterface.h otrlconfinterface.h \
|
||||||
|
otrplugin.h otrpreferences.h otrprefs.h privkeypopup.h smppopup.h verifypopup.h
|
||||||
|
|
||||||
|
|
||||||
|
rcdir = $(kde_datadir)/kopete_otr
|
||||||
|
rc_DATA = otrchatui.rc otrui.rc
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libkotr.la
|
||||||
|
libkotr_la_LDFLAGS = $(all_libraries)
|
||||||
|
libkotr_la_SOURCES = otrlchatinterface.cpp otrlconfinterface.cpp \
|
||||||
|
privkeypopup.cpp privkeypopupui.ui smppopup.cpp smppopupui.ui verifypopup.cpp \
|
||||||
|
verifypopupui.ui
|
||||||
|
libkotr_la_LIBADD = -lotr
|
||||||
|
|
||||||
|
SUBDIRS = pics
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=Service
|
||||||
|
X-Kopete-Version=1000900
|
||||||
|
Icon=kopete_otr
|
||||||
|
ServiceTypes=Kopete/Plugin
|
||||||
|
X-KDE-Library=kopete_otr
|
||||||
|
X-KDE-PluginInfo-Author=Michael Zanetti
|
||||||
|
X-KDE-PluginInfo-Email=michael_zanetti@gmx.net
|
||||||
|
X-KDE-PluginInfo-Name=kopete_otr
|
||||||
|
X-KDE-PluginInfo-Version=0.7
|
||||||
|
X-KDE-PluginInfo-Website=http://kopete-otr.follefuder.org
|
||||||
|
X-KDE-PluginInfo-Category=Plugins
|
||||||
|
X-KDE-PluginInfo-Depends=
|
||||||
|
X-KDE-PluginInfo-License=GPL
|
||||||
|
X-KDE-PluginInfo-EnabledByDefault=false
|
||||||
|
Comment=Encrypt chat sessions with Off-The-Record encryption
|
||||||
|
Comment[de]=Verschlüsselt Chat-Sitzungen mit Off-The-Record Verschlüsselung
|
||||||
|
Name=OTR
|
||||||
|
Name[de]=OTR
|
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
|
||||||
|
<kcfg>
|
||||||
|
<kcfgfile name="kopete_otr"/>
|
||||||
|
<group name="Policy">
|
||||||
|
<entry name="rbAlways" type="Bool">
|
||||||
|
<label>Always encrypt outgoing messages</label>
|
||||||
|
<default>false</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="rbOpportunistic" type="Bool">
|
||||||
|
<label>Automatically encrypt mesages if the other side supports OTR</label>
|
||||||
|
<default>true</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="rbManual" type="Bool">
|
||||||
|
<label>Encrypt mesages if the other side requests an OTR connection</label>
|
||||||
|
<default>false</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="rbNever" type="Bool">
|
||||||
|
<label>Never encrypt outgoing messages</label>
|
||||||
|
<default>false</default>
|
||||||
|
</entry>
|
||||||
|
</group>
|
||||||
|
</kcfg>
|
@ -0,0 +1,7 @@
|
|||||||
|
File=kopete_otr.kcfg
|
||||||
|
ClassName=KopeteOtrKcfg
|
||||||
|
Singleton=true
|
||||||
|
Mutators=true
|
||||||
|
MemberVariables=private
|
||||||
|
ItemAccessors=true
|
||||||
|
GlobalEnums=true
|
@ -0,0 +1,16 @@
|
|||||||
|
Begin3
|
||||||
|
Title: kopete-otr -- Some description
|
||||||
|
Version: 0.6
|
||||||
|
Entered-date:
|
||||||
|
Description:
|
||||||
|
Keywords: KDE Qt
|
||||||
|
Author: Michael Zanetti <michael_zanetti@gmx.net>
|
||||||
|
Maintained-by: Michael Zanetti <michael_zanetti@gmx.net>
|
||||||
|
Home-page:
|
||||||
|
Alternate-site:
|
||||||
|
Primary-site: htto://kopete-otr.follefuder.org
|
||||||
|
xxxxxx kopete-otr-0.6.tar.gz
|
||||||
|
xxx kopete_otr-0.6.lsm
|
||||||
|
Platform: Linux. Needs KDE
|
||||||
|
Copying-policy: GPL
|
||||||
|
End
|
@ -0,0 +1,16 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=Service
|
||||||
|
Icon=kopete_otr
|
||||||
|
ServiceTypes=KCModule
|
||||||
|
|
||||||
|
X-KDE-ModuleType=Library
|
||||||
|
X-KDE-Library=kopete_otr
|
||||||
|
X-KDE-FactoryName=OTRPreferencesFactory
|
||||||
|
X-KDE-ParentApp=kopete_otr
|
||||||
|
X-KDE-ParentComponents=kopete_otr
|
||||||
|
|
||||||
|
Comment=Encrypt chat sessions with Off-The-Record encryption
|
||||||
|
Comment[de]=Verschlüsselt Chat-Sitzungen mit Off-The-Record Verschlüsselung
|
||||||
|
Name=OTR
|
||||||
|
Name[de]=OTR
|
@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
|
||||||
|
<kpartgui name="kopete_otr" version="1">
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="tools"><text>&Tools</text>
|
||||||
|
<Menu name="otr_menu"><text>OTR Encryption</text>
|
||||||
|
<Action name="enable_otr" />
|
||||||
|
<Action name="disable_otr" />
|
||||||
|
<Action name="verify_fingerprint"/>
|
||||||
|
</Menu>
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
|
||||||
|
<ToolBar name="mainToolBar">
|
||||||
|
<text>OTR Encryption</text>
|
||||||
|
<Separator name="separator_0" />
|
||||||
|
<Action name="otr_settings" />
|
||||||
|
<Separator name="separator_0" />
|
||||||
|
</ToolBar>
|
||||||
|
</kpartgui>
|
@ -0,0 +1,128 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 <kaction.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kactionclasses.h>
|
||||||
|
#include <kopetechatsession.h>
|
||||||
|
#include <kopeteview.h>
|
||||||
|
#include <kopetemessage.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include "otrguiclient.h"
|
||||||
|
#include "otrplugin.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Frank Scheffold
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
OtrGUIClient::OtrGUIClient( Kopete::ChatSession *parent, const char *name )
|
||||||
|
: QObject( parent, name ), KXMLGUIClient( parent )
|
||||||
|
{
|
||||||
|
setInstance( OTRPlugin::plugin()->instance() );
|
||||||
|
|
||||||
|
connect( OTRPlugin::plugin(),
|
||||||
|
SIGNAL( destroyed( QObject * ) ), this,
|
||||||
|
SLOT( deleteLater() )
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
connect(this, SIGNAL( signalOtrChatsession(Kopete::ChatSession*, bool) ), OTRPlugin::plugin(), SLOT(slotEnableOtr(Kopete::ChatSession*, bool)));
|
||||||
|
|
||||||
|
connect( OTRPlugin::plugin(), SIGNAL( goneSecure( Kopete::ChatSession *, int ) ),
|
||||||
|
this, SLOT( encryptionEnabled( Kopete::ChatSession *, int ) ) );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( signalVerifyFingerprint( Kopete::ChatSession * ) ), OTRPlugin::plugin(), SLOT(slotVerifyFingerprint( Kopete::ChatSession * )) );
|
||||||
|
|
||||||
|
m_manager = parent;
|
||||||
|
otrActionMenu = new KActionMenu(i18n("OTR Settings"),"otr_disabled", actionCollection(), "otr_settings");
|
||||||
|
otrActionMenu->setDelayed( false );
|
||||||
|
actionEnableOtr = new KAction(i18n( "Start OTR session" ), "otr_private", 0,this,SLOT(slotEnableOtr()),actionCollection(), "enable_otr");
|
||||||
|
actionDisableOtr = new KAction(i18n("End OTR session"), "otr_disabled",0, this,SLOT(slotDisableOtr()), actionCollection(), "disable_otr");
|
||||||
|
actionVerifyFingerprint = new KAction(i18n("Authenticate Contact"), "signature",0, this,SLOT(slotVerifyFingerprint()), actionCollection(), "verify_fingerprint");
|
||||||
|
|
||||||
|
otrActionMenu->insert(actionEnableOtr);
|
||||||
|
otrActionMenu->insert(actionDisableOtr);
|
||||||
|
otrActionMenu->insert(actionVerifyFingerprint);
|
||||||
|
|
||||||
|
setXMLFile("otrchatui.rc");
|
||||||
|
|
||||||
|
encryptionEnabled( parent, OtrlChatInterface::self()->privState(parent) );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
OtrGUIClient::~OtrGUIClient()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrGUIClient::slotEnableOtr()
|
||||||
|
{
|
||||||
|
emit signalOtrChatsession( m_manager, true );
|
||||||
|
}
|
||||||
|
void OtrGUIClient::slotDisableOtr()
|
||||||
|
{
|
||||||
|
emit signalOtrChatsession( m_manager, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrGUIClient::slotVerifyFingerprint(){
|
||||||
|
emit signalVerifyFingerprint( m_manager );
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrGUIClient::encryptionEnabled(Kopete::ChatSession *session, int state){
|
||||||
|
if( session == m_manager ){
|
||||||
|
switch(state){
|
||||||
|
case 0:
|
||||||
|
otrActionMenu->setIcon("otr_disabled");
|
||||||
|
actionEnableOtr->setText( i18n("Start OTR session") );
|
||||||
|
actionDisableOtr->setEnabled(false);
|
||||||
|
actionVerifyFingerprint->setEnabled(false);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
otrActionMenu->setIcon("otr_unverified");
|
||||||
|
actionEnableOtr->setText( i18n("Refresh OTR session") );
|
||||||
|
actionDisableOtr->setEnabled(true);
|
||||||
|
actionVerifyFingerprint->setEnabled(true);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
otrActionMenu->setIcon("otr_private");
|
||||||
|
actionEnableOtr->setText( i18n("Refresh OTR session") );
|
||||||
|
actionDisableOtr->setEnabled(true);
|
||||||
|
actionVerifyFingerprint->setEnabled(true);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
otrActionMenu->setIcon("otr_finished");
|
||||||
|
actionEnableOtr->setText( i18n("Start OTR session") );
|
||||||
|
actionDisableOtr->setEnabled(true);
|
||||||
|
actionVerifyFingerprint->setEnabled(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "otrguiclient.moc"
|
||||||
|
|
||||||
|
// vim: set noet ts=4 sts=4 sw=4:
|
@ -0,0 +1,80 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 OTRGUICLIENT_H
|
||||||
|
#define OTRGUICLIENT_H
|
||||||
|
|
||||||
|
#include <qobject.h>
|
||||||
|
#include <kxmlguiclient.h>
|
||||||
|
|
||||||
|
//#include <kio/job.h>
|
||||||
|
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <kiconloader.h>
|
||||||
|
|
||||||
|
#include <kopetemessage.h>
|
||||||
|
#include <kopeteplugin.h>
|
||||||
|
|
||||||
|
|
||||||
|
class KActionMenu;
|
||||||
|
class KAction;
|
||||||
|
|
||||||
|
namespace Kopete { class ChatSession; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Frank Scheffold
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class OtrGUIClient : public QObject , public KXMLGUIClient
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
OtrGUIClient( Kopete::ChatSession *parent, const char *name=0L );
|
||||||
|
~OtrGUIClient();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Kopete::ChatSession *m_manager;
|
||||||
|
KActionMenu *otrActionMenu;
|
||||||
|
KAction *actionEnableOtr;
|
||||||
|
KAction *actionDisableOtr;
|
||||||
|
KAction *actionVerifyFingerprint;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotEnableOtr();
|
||||||
|
void slotDisableOtr();
|
||||||
|
void encryptionEnabled( Kopete::ChatSession* session, int state );
|
||||||
|
void slotVerifyFingerprint();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void signalOtrChatsession( Kopete::ChatSession* session, bool enable );
|
||||||
|
void signalVerifyFingerprint( Kopete::ChatSession *session );
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,685 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include <kopetechatsession.h>
|
||||||
|
#include <kopeteaccount.h>
|
||||||
|
#include <kopeteaccountmanager.h>
|
||||||
|
#include <kopetemessageevent.h>
|
||||||
|
#include <kopetecontactlist.h>
|
||||||
|
#include <kopetemetacontact.h>
|
||||||
|
#include <kopeteview.h>
|
||||||
|
#include <kopeteprotocol.h>
|
||||||
|
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kprogress.h>
|
||||||
|
#include <kpassivepopup.h>
|
||||||
|
#include <kanimwidget.h>
|
||||||
|
#include <kpushbutton.h>
|
||||||
|
|
||||||
|
#include <qvbox.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
#include <qnamespace.h>
|
||||||
|
#include <qeventloop.h>
|
||||||
|
#include <qapplication.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
#include <qfileinfo.h>
|
||||||
|
#include <qptrlist.h>
|
||||||
|
|
||||||
|
#include "otrlchatinterface.h"
|
||||||
|
#include "otrguiclient.h"
|
||||||
|
#include "otrplugin.h"
|
||||||
|
#include "privkeypopup.h"
|
||||||
|
#include "smppopup.h"
|
||||||
|
|
||||||
|
OtrlChatInterface *OtrlChatInterface::mSelf = 0;
|
||||||
|
static OtrlUserState userstate;
|
||||||
|
static OtrlPolicy confPolicy;
|
||||||
|
static void *updateContextList = 0;
|
||||||
|
|
||||||
|
/***************************** Gui_UI_Ops for libotr **********************************/
|
||||||
|
static OtrlPolicy policy(void *opdata, ConnContext *context){
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
bool noerr;
|
||||||
|
|
||||||
|
// Disable OTR for IRC
|
||||||
|
if( session->protocol()->pluginId() == "IRCProtocol" ){
|
||||||
|
kdDebug() << "Disabling OTR for: " << session->protocol()->pluginId() << endl;
|
||||||
|
return OTRL_POLICY_NEVER;
|
||||||
|
}
|
||||||
|
QString policy = session->members().getFirst()->metaContact()->pluginData( OTRPlugin::plugin(), "otr_policy" );
|
||||||
|
switch( policy.toInt( &noerr, 10 ) ){
|
||||||
|
case 1:
|
||||||
|
return OTRL_POLICY_ALWAYS;
|
||||||
|
case 2:
|
||||||
|
return OTRL_POLICY_OPPORTUNISTIC;
|
||||||
|
case 3:
|
||||||
|
return OTRL_POLICY_MANUAL;
|
||||||
|
case 4:
|
||||||
|
return OTRL_POLICY_NEVER;
|
||||||
|
default:
|
||||||
|
return confPolicy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void create_privkey(void *opdata, const char *accountname, const char *protocol){
|
||||||
|
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
|
||||||
|
PrivKeyPopup *popup = new PrivKeyPopup( session->view()->mainWidget(), i18n("Generating private key"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop );
|
||||||
|
KAnimWidget *anim = new KAnimWidget( "kde", 72, popup->animFrame, "kopete" );
|
||||||
|
anim->start();
|
||||||
|
anim->show();
|
||||||
|
|
||||||
|
popup->setCloseLock( true );
|
||||||
|
popup->show();
|
||||||
|
KeyGenThread *keyGenThread = new KeyGenThread( accountname, protocol );
|
||||||
|
keyGenThread->start();
|
||||||
|
while( !keyGenThread->wait(100) ){
|
||||||
|
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers, 100);
|
||||||
|
}
|
||||||
|
popup->setCloseLock( false );
|
||||||
|
popup->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient){
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
Kopete::ContactPtrList list = session->members();
|
||||||
|
for ( QPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
|
||||||
|
if( contact->contactId().compare( recipient ) == 0 ){
|
||||||
|
Kopete::OnlineStatus status = session->contactOnlineStatus( contact );
|
||||||
|
if( status == Kopete::OnlineStatus::Unknown){
|
||||||
|
return -1;
|
||||||
|
} else if( status == Kopete::OnlineStatus::Offline ){
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void inject_message( void *opdata, const char *accountname, const char *protocol, const char *recipient, const char *message ){
|
||||||
|
//KMessageBox::information( NULL, QString(accountname) + ":" + QString(protocol) + ":" + QString(recipient) + ":" + QString(message) );
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
Kopete::ContactPtrList list = session->members();
|
||||||
|
for ( QPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
|
||||||
|
if( contact->contactId().compare( recipient ) == 0 ){
|
||||||
|
Kopete::Message msg( session->account()->myself(), contact, QString( message ), Kopete::Message::Outbound );
|
||||||
|
session->sendMessage( msg );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void notify(void *opdata, OtrlNotifyLevel level, const char *accountname, const char *protocol, const char *username, const char *title, const char *primary, const char *secondary){
|
||||||
|
KMessageBox::information(NULL, QString( primary ) + QString( secondary ), QString( title ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
static int display_otr_message( void *opdata, const char *accountname, const char *protocol, const char *username, const char *message ){
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
Kopete::ContactPtrList list = session->members();
|
||||||
|
for ( QPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
|
||||||
|
if( contact->contactId().compare( username ) == 0 ){
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), QString( message ), Kopete::Message::Internal );
|
||||||
|
msg.setBody( QString( message ), Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void update_context_list(void *opdata){
|
||||||
|
//Not used...
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *protocol_name(void *opdata, const char *protocol){
|
||||||
|
//Never seen...
|
||||||
|
kdDebug() << "protocol_name called" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void protocol_name_free(void *opdata, const char *protocol_name){
|
||||||
|
//Never seen...
|
||||||
|
kdDebug() << "protocol_name_free called" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void new_fingerprint(void *opdata, OtrlUserState us, const char *accountname, const char *protocol, const char *username, unsigned char fingerprint[20]){
|
||||||
|
kdDebug() << "Received a new Fingerprint" << endl;
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Received a new fingerprint from <a>%1</a>. You should authenticate this contact.</b>").arg( session->members().getFirst()->contactId() ), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void write_fingerprints(void *opdata){
|
||||||
|
kdDebug() << "Writing fingerprints" << endl;
|
||||||
|
otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void gone_secure(void *opdata, ConnContext *context){
|
||||||
|
kdDebug() << "gone secure" << endl;
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
|
||||||
|
if( context->active_fingerprint->trust && context->active_fingerprint->trust[0] ){
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Private OTR session started.</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( ((Kopete::ChatSession*)opdata), 2 );
|
||||||
|
} else {
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Unverified OTR session started.</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( ((Kopete::ChatSession*)opdata), 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actually I've never seen this event but its implemented in case someone should receive it
|
||||||
|
kopete, gaim and miranda send a heartbeat message at disconnect. See log_message.
|
||||||
|
Searching libotr I could not find any call of gone_insecure. */
|
||||||
|
static void gone_insecure(void *opdata, ConnContext *context){
|
||||||
|
kdDebug() << "gone insecure" << endl;
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure(((Kopete::ChatSession*)opdata), 0);
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>OTR Session ended. The conversation is now insecure!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void still_secure(void *opdata, ConnContext *context, int is_reply){
|
||||||
|
kdDebug() << "still secure" << endl;
|
||||||
|
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>OTR connection refreshed successfully.</b>") , Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
|
||||||
|
if( context->active_fingerprint->trust && context->active_fingerprint->trust[0] ){
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( session, 2);
|
||||||
|
} else {
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( session, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void log_message(void *opdata, const char *message){
|
||||||
|
kdDebug() << "libotr: "<< message << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
static OtrlMessageAppOps ui_ops = {
|
||||||
|
policy,
|
||||||
|
create_privkey,
|
||||||
|
is_logged_in,
|
||||||
|
inject_message,
|
||||||
|
notify,
|
||||||
|
display_otr_message,
|
||||||
|
update_context_list,
|
||||||
|
protocol_name,
|
||||||
|
protocol_name_free,
|
||||||
|
new_fingerprint,
|
||||||
|
write_fingerprints,
|
||||||
|
gone_secure,
|
||||||
|
gone_insecure,
|
||||||
|
still_secure,
|
||||||
|
log_message
|
||||||
|
};
|
||||||
|
|
||||||
|
/*********************** Gui_UI_Ops finished *************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*********************** Constructor/Destructor **********************/
|
||||||
|
|
||||||
|
OtrlChatInterface::OtrlChatInterface(){
|
||||||
|
kdDebug() << "Creating OtrlChatInterface" << endl;
|
||||||
|
mSelf = this;
|
||||||
|
OTRL_INIT;
|
||||||
|
|
||||||
|
userstate = otrl_userstate_create();
|
||||||
|
|
||||||
|
otrl_privkey_read( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
otrl_privkey_read_fingerprints(userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints", NULL, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
OtrlChatInterface::~ OtrlChatInterface(){
|
||||||
|
otrl_userstate_free(userstate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
OtrlChatInterface *OtrlChatInterface::self(){
|
||||||
|
if( !mSelf ){
|
||||||
|
new OtrlChatInterface();
|
||||||
|
}
|
||||||
|
return mSelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************* Chat section ***************************/
|
||||||
|
|
||||||
|
OtrlUserState OtrlChatInterface::getUserstate(){
|
||||||
|
return userstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int OtrlChatInterface::decryptMessage( QString *msg, QString accountId,
|
||||||
|
QString protocol, QString contactId , Kopete::ChatSession *chatSession){
|
||||||
|
|
||||||
|
int ignoremessage;
|
||||||
|
char *newMessage = NULL;
|
||||||
|
OtrlTLV *tlvs = NULL;
|
||||||
|
OtrlTLV *tlv = NULL;
|
||||||
|
ConnContext *context;
|
||||||
|
NextExpectedSMP nextMsg;
|
||||||
|
|
||||||
|
|
||||||
|
ignoremessage = otrl_message_receiving( userstate, &ui_ops, chatSession, accountId.latin1(), protocol.latin1(), contactId.latin1(), msg->latin1(), &newMessage, &tlvs, NULL, NULL );
|
||||||
|
|
||||||
|
|
||||||
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_DISCONNECTED);
|
||||||
|
if( tlv ){
|
||||||
|
Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>%1</b> has ended the OTR session. You should do the same.").arg(chatSession->members().getFirst()->contactId()) , Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( chatSession, 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
context = otrl_context_find( userstate, contactId.latin1(), accountId.latin1(), protocol.latin1(), 0, NULL, NULL, NULL);
|
||||||
|
if (context) {
|
||||||
|
nextMsg = context->smstate->nextExpected;
|
||||||
|
|
||||||
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP1);
|
||||||
|
if (tlv) {
|
||||||
|
if (nextMsg != OTRL_SMP_EXPECT1){
|
||||||
|
abortSMP( context, chatSession );
|
||||||
|
} else {
|
||||||
|
SMPPopup *popup = new SMPPopup( chatSession->view()->mainWidget(), i18n("Enter authentication secret"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop, context, chatSession, false );
|
||||||
|
popup->show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP2);
|
||||||
|
if (tlv) {
|
||||||
|
if (nextMsg != OTRL_SMP_EXPECT2)
|
||||||
|
abortSMP( context, chatSession );
|
||||||
|
else {
|
||||||
|
kdDebug() << "Update SMP state: 2 -> 3" << endl;
|
||||||
|
context->smstate->nextExpected = OTRL_SMP_EXPECT4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP3);
|
||||||
|
if (tlv) {
|
||||||
|
if (nextMsg != OTRL_SMP_EXPECT3)
|
||||||
|
abortSMP( context, chatSession );
|
||||||
|
else {
|
||||||
|
if (context->active_fingerprint->trust && context->active_fingerprint->trust[0]) {
|
||||||
|
Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>Authentication successful. The conversation is now secure!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( chatSession, 2 );
|
||||||
|
} else {
|
||||||
|
Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>Authentication failed. The conversation is now insecure!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( chatSession, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP4);
|
||||||
|
if (tlv) {
|
||||||
|
if (nextMsg != OTRL_SMP_EXPECT4)
|
||||||
|
abortSMP( context, chatSession );
|
||||||
|
else {
|
||||||
|
if (context->active_fingerprint->trust && context->active_fingerprint->trust[0]) {
|
||||||
|
Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>Authentication successful. The conversation is now secure!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( chatSession, 2 );
|
||||||
|
} else {
|
||||||
|
Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>Authentication failed. The conversation is now insecure!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( chatSession, 1 );
|
||||||
|
}
|
||||||
|
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP_ABORT);
|
||||||
|
if (tlv) {
|
||||||
|
Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>Authentication error!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
||||||
|
}
|
||||||
|
|
||||||
|
otrl_tlv_free(tlvs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// message is now decrypted or is a Plaintext message and ready to deliver
|
||||||
|
if( !ignoremessage ){
|
||||||
|
// message is decrypted
|
||||||
|
if( newMessage != NULL ){
|
||||||
|
*msg = QString::fromUtf8(newMessage);
|
||||||
|
otrl_message_free( newMessage );
|
||||||
|
msg->replace( '\n', "<br>", false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ignoremessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString OtrlChatInterface::encryptMessage( QString msg, QString accountId,
|
||||||
|
QString protocol, QString contactId , Kopete::ChatSession *chatSession ){
|
||||||
|
int err;
|
||||||
|
char * newMessage;
|
||||||
|
if( otrl_proto_message_type( msg ) == OTRL_MSGTYPE_NOTOTR ){
|
||||||
|
msg.replace( '<', "<", false );
|
||||||
|
err = otrl_message_sending( userstate, &ui_ops, chatSession, accountId.latin1(), protocol.latin1(), contactId.latin1(), msg.utf8(), NULL, &newMessage, NULL, NULL );
|
||||||
|
|
||||||
|
if( err != 0 ){
|
||||||
|
msg = i18n("Encryption error");
|
||||||
|
} else {
|
||||||
|
if( newMessage != NULL ){
|
||||||
|
msg = QString::fromUtf8( newMessage );
|
||||||
|
otrl_message_free( newMessage );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OtrlMessageType type = otrl_proto_message_type( msg );
|
||||||
|
if( type == OTRL_MSGTYPE_NOTOTR | type == OTRL_MSGTYPE_TAGGEDPLAINTEXT ){
|
||||||
|
msg.replace( "<", "<", false );
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString OtrlChatInterface::getDefaultQuery( QString accountId ){
|
||||||
|
char *message;
|
||||||
|
message = otrl_proto_default_query_msg( accountId.latin1(), OTRL_POLICY_ALLOW_V2 );
|
||||||
|
QString msg( message );
|
||||||
|
otrl_message_free( message );
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlChatInterface::disconnectSession( Kopete::ChatSession *chatSession ){
|
||||||
|
otrl_message_disconnect( userstate, &ui_ops, chatSession, chatSession->account()->accountId().latin1(), chatSession->account()->protocol()->displayName().latin1(), chatSession->members().getFirst()->contactId() );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( chatSession, false );
|
||||||
|
|
||||||
|
Kopete::Message msg( chatSession->account()->myself(), chatSession->members().getFirst(), i18n("Terminating OTR session."), Kopete::Message::Internal );
|
||||||
|
// msg.setBody( QString( message ), Kopete::Message::RichText );
|
||||||
|
chatSession->appendMessage( msg );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OtrlChatInterface::shouldDiscard( QString message ){
|
||||||
|
if( !message.isEmpty() && !message.isNull() ){
|
||||||
|
switch( otrl_proto_message_type( message.latin1() ) ){
|
||||||
|
case OTRL_MSGTYPE_TAGGEDPLAINTEXT:
|
||||||
|
case OTRL_MSGTYPE_UNKNOWN:
|
||||||
|
case OTRL_MSGTYPE_NOTOTR:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OtrlChatInterface::setPolicy( OtrlPolicy policy ){
|
||||||
|
confPolicy = policy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int OtrlChatInterface::privState( Kopete::ChatSession *session ){
|
||||||
|
ConnContext *context;
|
||||||
|
|
||||||
|
context = otrl_context_find(userstate, session->members().getFirst()->contactId(), session->account()->accountId(), session->account()->protocol()->displayName(), 0, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if( context ){
|
||||||
|
switch( context->msgstate ){
|
||||||
|
case OTRL_MSGSTATE_PLAINTEXT:
|
||||||
|
return 0;
|
||||||
|
case OTRL_MSGSTATE_ENCRYPTED:
|
||||||
|
if( context->active_fingerprint->trust && context->active_fingerprint->trust[0] != '\0' )
|
||||||
|
return 2;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
case OTRL_MSGSTATE_FINISHED:
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString OtrlChatInterface::formatContact(QString contactId){
|
||||||
|
|
||||||
|
Kopete::MetaContact *metaContact = Kopete::ContactList::self()->findMetaContactByContactId(contactId);
|
||||||
|
if( metaContact ){
|
||||||
|
QString displayName = metaContact->displayName();
|
||||||
|
if((displayName != contactId) && !displayName.isNull()){
|
||||||
|
return displayName + " (" + contactId+")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return contactId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlChatInterface::verifyFingerprint( Kopete::ChatSession *session ){
|
||||||
|
ConnContext *context;
|
||||||
|
|
||||||
|
context = otrl_context_find( userstate, session->members().getFirst()->contactId().latin1(), session->account()->accountId().latin1(), session->protocol()->displayName().latin1(), 0, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
SMPPopup *popup = new SMPPopup( session->view()->mainWidget(), i18n("Enter authentication secret"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop, context, session, true );
|
||||||
|
popup->show();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlChatInterface::setTrust( Kopete::ChatSession *session, bool trust ){
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
|
||||||
|
fingerprint = findFingerprint( session->members().getFirst()->contactId() );
|
||||||
|
if( fingerprint != 0 ){
|
||||||
|
if( trust ){
|
||||||
|
otrl_context_set_trust( fingerprint, "verified" );
|
||||||
|
} else {
|
||||||
|
otrl_context_set_trust( fingerprint, NULL );
|
||||||
|
}
|
||||||
|
kdDebug() << "Writing fingerprints" << endl;
|
||||||
|
otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( session, privState( session ) );
|
||||||
|
} else {
|
||||||
|
kdDebug() << "could not find fingerprint" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Fingerprint *OtrlChatInterface::findFingerprint( QString account ){
|
||||||
|
ConnContext *context;
|
||||||
|
|
||||||
|
for( context = userstate->context_root; context != NULL; context = context->next ){
|
||||||
|
kdDebug() << context->username << endl;
|
||||||
|
if( strcmp( context->username, account ) == 0 ){
|
||||||
|
kdDebug() << "found Context" << endl;
|
||||||
|
return context->active_fingerprint ? context->active_fingerprint : NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString OtrlChatInterface::findActiveFingerprint( Kopete::ChatSession *session ){
|
||||||
|
ConnContext *context;
|
||||||
|
char hash[45];
|
||||||
|
|
||||||
|
for( context = userstate->context_root; context != NULL; context = context->next ){
|
||||||
|
kdDebug() << context->username << endl;
|
||||||
|
if( strcmp( context->username, session->members().getFirst()->contactId() ) == 0 ){
|
||||||
|
// otrl_privkey_hash_to_human( hash, context->fingerprint_root.next->fingerprint );
|
||||||
|
otrl_privkey_hash_to_human( hash, context->active_fingerprint->fingerprint );
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OtrlChatInterface::isVerified( Kopete::ChatSession *session ){
|
||||||
|
kdDebug() << "checking for trust" << endl;
|
||||||
|
Fingerprint *fingerprint = findFingerprint( session->members().getFirst()->contactId() );
|
||||||
|
|
||||||
|
if( fingerprint->trust && fingerprint->trust[0] != '\0' ){
|
||||||
|
kdDebug() << "verified" << endl;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
kdDebug() << "not verified" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlChatInterface::updateKeyfile( Kopete::Account *account ){
|
||||||
|
// Updating private keys from <=0.3
|
||||||
|
kdDebug() << "updating keys" << endl;
|
||||||
|
QFile keyfile( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
|
||||||
|
QString line;
|
||||||
|
QString file;
|
||||||
|
|
||||||
|
if( keyfile.open( IO_ReadWrite ) ){
|
||||||
|
kdDebug() << "file open" << endl;
|
||||||
|
while( keyfile.readLine( line, 200 ) != -1){
|
||||||
|
if( line.find( "protocol" ) != -1 ){
|
||||||
|
if( line.find( account->accountLabel() ) != -1 ){
|
||||||
|
line.replace( account->accountLabel(), account->protocol()->displayName() );
|
||||||
|
kdDebug() << "Successfully updated keyfile for account " << account->accountId() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file.append( line );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
keyfile.remove();
|
||||||
|
keyfile.open( IO_ReadWrite );
|
||||||
|
keyfile.writeBlock( file.latin1(), file.length() );
|
||||||
|
keyfile.close();
|
||||||
|
otrl_privkey_forget_all( userstate );
|
||||||
|
otrl_privkey_read( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
|
||||||
|
|
||||||
|
file = "";
|
||||||
|
line = "";
|
||||||
|
// Updating fingerprints from <=0.3
|
||||||
|
kdDebug() << "updating fingerprints" << endl;
|
||||||
|
QFile fingerprintfile( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
|
||||||
|
|
||||||
|
if( fingerprintfile.open( IO_ReadWrite ) ){
|
||||||
|
kdDebug() << "file open" << endl;
|
||||||
|
while( fingerprintfile.readLine( line, 200 ) != -1){
|
||||||
|
int pos = line.findRev( account->accountLabel() );
|
||||||
|
if( pos != -1 ){
|
||||||
|
line.replace( pos, account->accountLabel().length(), account->protocol()->displayName() );
|
||||||
|
kdDebug() << "Successfully updated fingerprint for account " << account->accountId() << endl;
|
||||||
|
}
|
||||||
|
file.append( line );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fingerprintfile.remove();
|
||||||
|
fingerprintfile.open( IO_ReadWrite );
|
||||||
|
fingerprintfile.writeBlock( file.latin1(), file.length() );
|
||||||
|
fingerprintfile.close();
|
||||||
|
otrl_context_forget_all( userstate );
|
||||||
|
otrl_privkey_read_fingerprints(userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints", NULL, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlChatInterface::checkFilePermissions( QString file ){
|
||||||
|
if( QFile::exists( file ) ){
|
||||||
|
QFile privkeys( file );
|
||||||
|
QFileInfo privkeysInfo( privkeys );
|
||||||
|
if( !privkeysInfo.permission( QFileInfo::ReadOwner | QFileInfo::WriteOwner ) |
|
||||||
|
privkeysInfo.permission( QFileInfo::ReadGroup ) |
|
||||||
|
privkeysInfo.permission( QFileInfo::WriteGroup ) |
|
||||||
|
privkeysInfo.permission( QFileInfo::ExeGroup ) |
|
||||||
|
privkeysInfo.permission( QFileInfo::ReadOther ) |
|
||||||
|
privkeysInfo.permission( QFileInfo::WriteOther ) |
|
||||||
|
privkeysInfo.permission( QFileInfo::ExeOther ) ){
|
||||||
|
kdDebug() << "Permissions of OTR storage file are wrong! Correcting..." << endl;
|
||||||
|
chmod( file, 0600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*bool OtrlChatInterface::verifyQuestion( Kopete::ChatSession *session, QString fingerprint ){
|
||||||
|
kdDebug() << "searching for Fingerprint" << endl;
|
||||||
|
|
||||||
|
if( fingerprint != NULL ){
|
||||||
|
int doVerify = KMessageBox::questionYesNo(
|
||||||
|
NULL,
|
||||||
|
i18n("Please contact %1 via another secure way and verify that the following Fingerprint is correct:").arg( formatContact(session->members().getFirst()->contactId())) + "\n\n" + fingerprint + "\n\n" + i18n("Are you sure you want to trust this fingerprint?"),
|
||||||
|
i18n("Verify fingerprint") );
|
||||||
|
if( doVerify == KMessageBox::Yes ){
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
verifyFingerprint( session, false );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
KMessageBox::error( NULL, i18n( "No fingerprint yet received from this contact." ), i18n( "No fingerprint found" ) );
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************** SMP implementations ****************/
|
||||||
|
|
||||||
|
void OtrlChatInterface::abortSMP( ConnContext *context, Kopete::ChatSession *session ){
|
||||||
|
otrl_message_abort_smp( userstate, &ui_ops, session, context);
|
||||||
|
if (context->active_fingerprint->trust && !context->active_fingerprint->trust[0]) {
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( session, 1 );
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Authentication aborded. The conversation is now insecure!</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlChatInterface::respondSMP( ConnContext *context, Kopete::ChatSession *session, QString secret, bool initiate ){
|
||||||
|
if( initiate ){
|
||||||
|
context = otrl_context_find( userstate, session->members().getFirst()->contactId().latin1(), session->account()->accountId().latin1(), session->protocol()->displayName().latin1(), 0, NULL, NULL, NULL);
|
||||||
|
otrl_message_initiate_smp( userstate, &ui_ops, session, context, (unsigned char*)secret.latin1(), secret.length() );
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
otrl_message_respond_smp( userstate, &ui_ops, session, context, (unsigned char*)secret.latin1(), secret.length());
|
||||||
|
}
|
||||||
|
|
||||||
|
Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Authenticating contact...</b>"), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************** KeyGenThread *******************/
|
||||||
|
|
||||||
|
KeyGenThread::KeyGenThread( QString accountname, QString protocol ){
|
||||||
|
this->accountname = accountname;
|
||||||
|
this->protocol = protocol;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KeyGenThread::run()
|
||||||
|
{
|
||||||
|
kdDebug() << "Creating private key... Storing to: " + QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true)) + "privkeys" << endl;
|
||||||
|
otrl_privkey_generate(OtrlChatInterface::self()->getUserstate(), QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys", accountname, protocol);
|
||||||
|
OtrlChatInterface::self()->checkFilePermissions( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 OTRLCHATINTERFACE_H
|
||||||
|
#define OTRLCHATINTERFACE_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qstring.h>
|
||||||
|
#include <qptrlist.h>
|
||||||
|
#include <qvaluelist.h>
|
||||||
|
#include <qthread.h>
|
||||||
|
#include <qmutex.h>
|
||||||
|
|
||||||
|
#include <kopetechatsession.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <libotr/privkey.h>
|
||||||
|
#include <libotr/proto.h>
|
||||||
|
#include <libotr/message.h>
|
||||||
|
#include <libotr/userstate.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
class OtrlChatInterface: public QObject
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
~OtrlChatInterface();
|
||||||
|
static OtrlChatInterface *self();
|
||||||
|
|
||||||
|
int decryptMessage( QString *msg, QString accountId, QString protocol, QString contactId, Kopete::ChatSession *chatSession );
|
||||||
|
QString encryptMessage( QString msg, QString accountId,
|
||||||
|
QString protocol, QString contactId , Kopete::ChatSession *chatSession );
|
||||||
|
QString getDefaultQuery( QString accountId );
|
||||||
|
void disconnectSession( Kopete::ChatSession *chatSession );
|
||||||
|
void setPolicy( OtrlPolicy policy );
|
||||||
|
bool shouldDiscard( QString message );
|
||||||
|
OtrlUserState getUserstate();
|
||||||
|
int privState( Kopete::ChatSession *session );
|
||||||
|
QString formatContact(QString contactId);
|
||||||
|
bool isVerified( Kopete::ChatSession *session );
|
||||||
|
void updateKeyfile( Kopete::Account *account );
|
||||||
|
void checkFilePermissions( QString file );
|
||||||
|
// bool verifyQuestion( Kopete::ChatSession *session, QString fingerprint );
|
||||||
|
QString findActiveFingerprint( Kopete::ChatSession *session );
|
||||||
|
void verifyFingerprint( Kopete::ChatSession *session );
|
||||||
|
void abortSMP( ConnContext *context, Kopete::ChatSession *session );
|
||||||
|
void respondSMP( ConnContext *context, Kopete::ChatSession *session, QString secret, bool initiate );
|
||||||
|
void setTrust( Kopete::ChatSession *session, bool trust );
|
||||||
|
|
||||||
|
private:
|
||||||
|
OtrlChatInterface();
|
||||||
|
static OtrlChatInterface *mSelf;
|
||||||
|
Fingerprint *findFingerprint( QString username );
|
||||||
|
};
|
||||||
|
|
||||||
|
class KeyGenThread : public QThread {
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString accountname;
|
||||||
|
QString protocol;
|
||||||
|
|
||||||
|
public:
|
||||||
|
KeyGenThread( QString accountname, QString protocol );
|
||||||
|
virtual void run();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,231 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qapplication.h>
|
||||||
|
#include <qeventloop.h>
|
||||||
|
|
||||||
|
#include <kopetechatsession.h>
|
||||||
|
#include <kopeteaccount.h>
|
||||||
|
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kanimwidget.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include "otrlconfinterface.h"
|
||||||
|
#include "otrlchatinterface.h"
|
||||||
|
#include "otrplugin.h"
|
||||||
|
#include "privkeypopup.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*********************** Konstruktor/Destruktor **********************/
|
||||||
|
|
||||||
|
OtrlConfInterface::OtrlConfInterface( QWidget *preferencesDialog ){
|
||||||
|
|
||||||
|
this->preferencesDialog = preferencesDialog;
|
||||||
|
|
||||||
|
OTRL_INIT;
|
||||||
|
|
||||||
|
userstate = OtrlChatInterface::self()->getUserstate();
|
||||||
|
|
||||||
|
kdDebug() << "OtrlConfInterface created" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
OtrlConfInterface::~ OtrlConfInterface(){
|
||||||
|
otrl_userstate_free(userstate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************** Functions for kcm module ************************/
|
||||||
|
|
||||||
|
QString OtrlConfInterface::getPrivFingerprint( QString accountId, QString protocol){
|
||||||
|
// if (otrl_privkey_read(userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" ) == 0){
|
||||||
|
char fingerprint[45];
|
||||||
|
if( otrl_privkey_fingerprint( userstate, fingerprint, accountId.latin1(), protocol.latin1()) != 0 ){
|
||||||
|
return fingerprint;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
return i18n("No fingerprint present.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool OtrlConfInterface::hasPrivFingerprint( QString accountId, QString protocol ){
|
||||||
|
char fingerprint[45];
|
||||||
|
if( otrl_privkey_fingerprint( userstate, fingerprint, accountId.latin1(), protocol.latin1() ) != 0 ){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OtrlConfInterface::generateNewPrivKey( QString accountId, QString protocol ){
|
||||||
|
PrivKeyPopup *popup = new PrivKeyPopup( preferencesDialog, i18n("Generating private key"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop );
|
||||||
|
KAnimWidget *anim = new KAnimWidget( "kde", 72, popup->animFrame, "kopete" );
|
||||||
|
anim->start();
|
||||||
|
anim->show();
|
||||||
|
|
||||||
|
popup->setCloseLock( true );
|
||||||
|
popup->show();
|
||||||
|
KeyGenThread *keyGenThread = new KeyGenThread ( accountId, protocol );
|
||||||
|
keyGenThread->start();
|
||||||
|
while( !keyGenThread->wait(100) ){
|
||||||
|
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers, 100);
|
||||||
|
}
|
||||||
|
popup->setCloseLock( false );
|
||||||
|
popup->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
QValueList<QString[5]> OtrlConfInterface::readAllFingerprints(){
|
||||||
|
ConnContext *context;
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
QString entry[5];
|
||||||
|
char hash[45];
|
||||||
|
QValueList<QString[5]> list;
|
||||||
|
|
||||||
|
for( context = userstate->context_root; context != NULL; context = context->next ){
|
||||||
|
fingerprint = context->fingerprint_root.next;
|
||||||
|
while( fingerprint ){
|
||||||
|
entry[0] = context->username;
|
||||||
|
|
||||||
|
if( ( context->msgstate == OTRL_MSGSTATE_ENCRYPTED ) && ( context->active_fingerprint != fingerprint ) ){
|
||||||
|
entry[1] = i18n("Unused");
|
||||||
|
} else {
|
||||||
|
if (context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) {
|
||||||
|
if (context->active_fingerprint->trust && context->active_fingerprint->trust[0] != NULL) {
|
||||||
|
entry[1] = i18n("Private");
|
||||||
|
} else {
|
||||||
|
entry[1] = i18n("Unverified");
|
||||||
|
}
|
||||||
|
} else if (context && context->msgstate == OTRL_MSGSTATE_FINISHED) {
|
||||||
|
entry[1] = i18n("Finished");
|
||||||
|
} else {
|
||||||
|
entry[1] = i18n("Not Private");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entry[2] = ( fingerprint->trust && fingerprint->trust[0] ) ? i18n("Yes") : i18n("No") ;
|
||||||
|
otrl_privkey_hash_to_human( hash, fingerprint->fingerprint );
|
||||||
|
entry[3] = hash;
|
||||||
|
entry[4] = context->protocol;
|
||||||
|
list << entry;
|
||||||
|
fingerprint = fingerprint->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrlConfInterface::verifyFingerprint( QString strFingerprint, bool trust ){
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
|
||||||
|
fingerprint = findFingerprint( strFingerprint );
|
||||||
|
|
||||||
|
if( fingerprint != 0 ){
|
||||||
|
if( trust ){
|
||||||
|
otrl_context_set_trust( fingerprint, "verified" );
|
||||||
|
} else {
|
||||||
|
otrl_context_set_trust( fingerprint, NULL );
|
||||||
|
}
|
||||||
|
kdDebug() << "Writing fingerprints" << endl;
|
||||||
|
otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
|
||||||
|
} else {
|
||||||
|
kdDebug() << "could not find fingerprint" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OtrlConfInterface::isVerified( QString strFingerprint ){
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
|
||||||
|
fingerprint = findFingerprint( strFingerprint );
|
||||||
|
|
||||||
|
if( fingerprint->trust && fingerprint->trust[0] ){
|
||||||
|
kdDebug() << "found trust" << endl;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
kdDebug() << "not trusted" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OtrlConfInterface::forgetFingerprint( QString strFingerprint ){
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
|
||||||
|
fingerprint = findFingerprint( strFingerprint );
|
||||||
|
otrl_context_forget_fingerprint( fingerprint, 1 );
|
||||||
|
otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
|
||||||
|
}
|
||||||
|
|
||||||
|
Fingerprint *OtrlConfInterface::findFingerprint( QString strFingerprint ){
|
||||||
|
// const char *cFingerprint = ;
|
||||||
|
// Fingerprint *fingerprintRoot = &userstate->context_root->fingerprint_root;
|
||||||
|
ConnContext *context;
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
Fingerprint *foundFingerprint = NULL;
|
||||||
|
char hash[45];
|
||||||
|
|
||||||
|
for( context = userstate->context_root; context != NULL; context = context->next ){
|
||||||
|
fingerprint = context->fingerprint_root.next;
|
||||||
|
while( fingerprint ){
|
||||||
|
otrl_privkey_hash_to_human(hash, fingerprint->fingerprint);
|
||||||
|
if( strcmp( hash, strFingerprint.latin1()) == 0 ){
|
||||||
|
foundFingerprint = fingerprint;
|
||||||
|
}
|
||||||
|
fingerprint = fingerprint->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return foundFingerprint;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OtrlConfInterface::isEncrypted( QString strFingerprint ){
|
||||||
|
Fingerprint *fingerprint;
|
||||||
|
Fingerprint *tmpFingerprint;
|
||||||
|
Fingerprint *foundFingerprint;
|
||||||
|
ConnContext *context;
|
||||||
|
ConnContext *foundContext = NULL;
|
||||||
|
|
||||||
|
context = userstate->context_root;
|
||||||
|
|
||||||
|
fingerprint = findFingerprint( strFingerprint );
|
||||||
|
for( context = userstate->context_root; context != NULL; context = context->next ){
|
||||||
|
tmpFingerprint = context->fingerprint_root.next;
|
||||||
|
while( tmpFingerprint ){
|
||||||
|
if( tmpFingerprint == fingerprint ){
|
||||||
|
kdDebug() << "Found context" << endl;
|
||||||
|
foundContext = context;
|
||||||
|
foundFingerprint = tmpFingerprint;
|
||||||
|
}
|
||||||
|
tmpFingerprint = tmpFingerprint->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( foundContext && foundContext->msgstate != OTRL_MSGSTATE_ENCRYPTED ){
|
||||||
|
return false;
|
||||||
|
} else if( foundContext && foundFingerprint && foundContext->active_fingerprint == foundFingerprint ){
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 OTRLCONFINTERFACE_H
|
||||||
|
#define OTRLCONFINTERFACE_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qstring.h>
|
||||||
|
#include <qptrlist.h>
|
||||||
|
#include <qvaluelist.h>
|
||||||
|
#include <qthread.h>
|
||||||
|
|
||||||
|
#include <kopetechatsession.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <libotr/privkey.h>
|
||||||
|
#include <libotr/proto.h>
|
||||||
|
#include <libotr/message.h>
|
||||||
|
#include <libotr/userstate.h>
|
||||||
|
#include <libotr/context.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
class OtrlConfInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
~OtrlConfInterface();
|
||||||
|
OtrlConfInterface( QWidget *preferencesDialog );
|
||||||
|
|
||||||
|
QString getPrivFingerprint( QString accountId, QString protocol );
|
||||||
|
void generateNewPrivKey( QString accountId, QString protocol );
|
||||||
|
QValueList<QString[5]> readAllFingerprints();
|
||||||
|
bool hasPrivFingerprint( QString accountId, QString protocol);
|
||||||
|
void forgetFingerprint( QString strFingerprint );
|
||||||
|
void verifyFingerprint( QString strFingerprint, bool trust );
|
||||||
|
bool isVerified( QString strFingerprint );
|
||||||
|
bool isEncrypted( QString strFingerprint );
|
||||||
|
|
||||||
|
private:
|
||||||
|
OtrlUserState userstate;
|
||||||
|
QWidget *preferencesDialog;
|
||||||
|
|
||||||
|
Fingerprint *findFingerprint( QString strFingerprint );
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,344 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 <qstylesheet.h>
|
||||||
|
#include <qtimer.h>
|
||||||
|
#include <qregexp.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
#include <qcolor.h>
|
||||||
|
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kaction.h>
|
||||||
|
#include <kactionclasses.h>
|
||||||
|
#include <kpopupmenu.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kgenericfactory.h>
|
||||||
|
#include <kdeversion.h>
|
||||||
|
#include <kaboutdata.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
|
||||||
|
#include <kopetemetacontact.h>
|
||||||
|
#include <kopetecontactlist.h>
|
||||||
|
#include <kopetechatsessionmanager.h>
|
||||||
|
#include <kopetesimplemessagehandler.h>
|
||||||
|
#include <kopeteuiglobal.h>
|
||||||
|
#include <kopetecontact.h>
|
||||||
|
#include <kopetemessage.h>
|
||||||
|
#include <kopeteaccount.h>
|
||||||
|
#include <kopeteaccountmanager.h>
|
||||||
|
#include <kopetemessageevent.h>
|
||||||
|
#include <kopeteprotocol.h>
|
||||||
|
|
||||||
|
#include "otrplugin.h"
|
||||||
|
#include "otrguiclient.h"
|
||||||
|
#include "otrlchatinterface.h"
|
||||||
|
#include "kopete_otr.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
typedef KGenericFactory<OTRPlugin> OTRPluginFactory;
|
||||||
|
static const KAboutData aboutdata("kopete_otr", I18N_NOOP("OTR") , "0.7" );
|
||||||
|
K_EXPORT_COMPONENT_FACTORY( kopete_otr, OTRPluginFactory( &aboutdata ) )
|
||||||
|
|
||||||
|
OTRPlugin::OTRPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
|
||||||
|
: Kopete::Plugin( OTRPluginFactory::instance(), parent, name )
|
||||||
|
{
|
||||||
|
if( !pluginStatic_ )
|
||||||
|
pluginStatic_=this;
|
||||||
|
|
||||||
|
m_inboundHandler = new OtrMessageHandlerFactory(this);
|
||||||
|
|
||||||
|
connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ),
|
||||||
|
SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
|
||||||
|
// connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ),
|
||||||
|
// this, SLOT( slotIncomingMessage( Kopete::Message & ) ) );
|
||||||
|
|
||||||
|
connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
|
||||||
|
this, SLOT( slotNewChatSessionWindow( Kopete::ChatSession * ) ) );
|
||||||
|
QObject::connect( this, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//initialize the otrlib and create the interface object
|
||||||
|
otrlChatInterface = OtrlChatInterface::self();
|
||||||
|
|
||||||
|
//update key files when an account is ready to use
|
||||||
|
if( QFile::exists( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey" ) &&
|
||||||
|
!QFile::exists( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" ) ){
|
||||||
|
kdDebug() << "Detected old format keyfile. Doing updates!" << endl;
|
||||||
|
kdDebug() << "Reading old keyfile..." << endl;
|
||||||
|
QFile fpold( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" );
|
||||||
|
QString line;
|
||||||
|
QString file;
|
||||||
|
if( fpold.open( IO_ReadWrite ) ){
|
||||||
|
while( fpold.readLine( line, 100 ) != -1){
|
||||||
|
file.append( line );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kdDebug() << "Writing new keyfile" << endl;
|
||||||
|
QFile fpnew( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
|
||||||
|
fpnew.open( IO_ReadWrite );
|
||||||
|
fpnew.writeBlock( file.latin1(), file.length() );
|
||||||
|
fpnew.close();
|
||||||
|
kdDebug() << "Writing backup for old keyfile" << endl;
|
||||||
|
QFile fpbup( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey.old" );
|
||||||
|
fpbup.open( IO_ReadWrite );
|
||||||
|
fpbup.writeBlock( file.latin1(), file.length() );
|
||||||
|
fpbup.close();
|
||||||
|
kdDebug() << "Deleting old keyfile" << endl;
|
||||||
|
fpold.remove();
|
||||||
|
|
||||||
|
kdDebug() << "Reading old fingerprintsfile..." << endl;
|
||||||
|
QFile fpfingerprintsold( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
|
||||||
|
line = "";
|
||||||
|
file = "";
|
||||||
|
if( fpfingerprintsold.open( IO_ReadWrite ) ){
|
||||||
|
while( fpfingerprintsold.readLine( line, 100 ) != -1){
|
||||||
|
file.append( line );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kdDebug() << "Writing backup for old fingerprintsfile" << endl;
|
||||||
|
QFile fpfingerprintsbup( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints.old" );
|
||||||
|
fpfingerprintsbup.open( IO_ReadWrite );
|
||||||
|
fpfingerprintsbup.writeBlock( file.latin1(), file.length() );
|
||||||
|
fpfingerprintsbup.close();
|
||||||
|
|
||||||
|
kdDebug() << "Waiting for accounts to update keyfile format" << endl;
|
||||||
|
connect( Kopete::AccountManager::self(), SIGNAL( accountRegistered( Kopete::Account * ) ),
|
||||||
|
this, SLOT( accountReady( Kopete::Account * ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checking file Permissions
|
||||||
|
OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" );
|
||||||
|
OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints" );
|
||||||
|
// Check also file permissions for eventuallly old beckup files
|
||||||
|
OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey.old" );
|
||||||
|
OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints.old" );
|
||||||
|
|
||||||
|
//setting the policy
|
||||||
|
slotSettingsChanged();
|
||||||
|
|
||||||
|
//adding menu to contaclists menubar and contacts popup menu
|
||||||
|
QStringList policies;
|
||||||
|
policies << i18n("&Default") << i18n("Al&ways") << i18n("&Opportunistic") << i18n("&Manual") << i18n("Ne&ver");
|
||||||
|
otrPolicyMenu = new KSelectAction( i18n( "&OTR Policy" ), QString::fromLatin1("kopete_otr"), 0, actionCollection(), "otr_policy" );
|
||||||
|
otrPolicyMenu->setItems( policies );
|
||||||
|
otrPolicyMenu->popupMenu()->insertSeparator( 1 );
|
||||||
|
otrPolicyMenu->setEnabled( false );
|
||||||
|
connect( otrPolicyMenu, SIGNAL( activated() ), this, SLOT( slotSetPolicy() ) );
|
||||||
|
connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotSelectionChanged( bool ) ) );
|
||||||
|
|
||||||
|
|
||||||
|
setXMLFile( "otrui.rc" );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Add GUI action to all already existing kmm
|
||||||
|
// (if the plugin is launched when kopete already runing)
|
||||||
|
QValueList<Kopete::ChatSession*> sessions =
|
||||||
|
Kopete::ChatSessionManager::self()->sessions();
|
||||||
|
QValueListIterator<Kopete::ChatSession*> it;
|
||||||
|
for (it= sessions.begin(); it!=sessions.end() ; ++it){
|
||||||
|
slotNewChatSessionWindow( *it );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OTRPlugin::~OTRPlugin()
|
||||||
|
{
|
||||||
|
delete m_inboundHandler;
|
||||||
|
pluginStatic_ = 0L;
|
||||||
|
kdDebug() << "Exiting plugin" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
OTRPlugin* OTRPlugin::plugin()
|
||||||
|
{
|
||||||
|
return pluginStatic_ ;
|
||||||
|
}
|
||||||
|
|
||||||
|
OTRPlugin* OTRPlugin::pluginStatic_ = 0L;
|
||||||
|
|
||||||
|
|
||||||
|
void OTRPlugin::slotNewChatSessionWindow( Kopete::ChatSession *KMM )
|
||||||
|
{
|
||||||
|
//Check if there is another user in the session.
|
||||||
|
//If not it could be a Jabber-MUC
|
||||||
|
//If there are more then one members it is a MUC
|
||||||
|
// Also don't add the Button on an IRC window!
|
||||||
|
if( KMM->members().count() == 1 && (KMM->protocol()) && ( KMM->protocol()->pluginId() != "IRCProtocol" ) ){
|
||||||
|
new OtrGUIClient( KMM );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OTRPlugin::slotOutgoingMessage( Kopete::Message& msg )
|
||||||
|
{
|
||||||
|
if( msg.direction() == Kopete::Message::Outbound ){
|
||||||
|
QString plainBody = msg.plainBody();
|
||||||
|
QString accountId = msg.manager()->account()->accountId();
|
||||||
|
Kopete::Contact *contact = msg.to().first();
|
||||||
|
|
||||||
|
QString encBody = otrlChatInterface->encryptMessage( plainBody, accountId, msg.manager()->account()->protocol()->displayName(), contact->contactId(), msg.manager() );
|
||||||
|
msg.setBody( encBody, Kopete::Message::Crypted );
|
||||||
|
if( !msg.plainBody().isEmpty() ){
|
||||||
|
messageCache.insert( encBody, plainBody );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPlugin::slotEnableOtr( Kopete::ChatSession *session, bool enable ){
|
||||||
|
|
||||||
|
|
||||||
|
if( enable ){
|
||||||
|
QString policy = session->members().getFirst()->metaContact()->pluginData( OTRPlugin::plugin(), "otr_policy" );
|
||||||
|
bool noerr;
|
||||||
|
KopeteOtrKcfg::self()->readConfig();
|
||||||
|
if( policy.toInt( &noerr, 10 ) == 4 || ( policy.toInt( &noerr, 10 ) == 0 && KopeteOtrKcfg::self()->rbNever() ) ){
|
||||||
|
Kopete::Message msg( session->account()->myself(), session->members(), i18n( "Your policy settings do not allow encrypted sessions to this contact." ), Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
session->appendMessage( msg );
|
||||||
|
} else {
|
||||||
|
QString body = otrlChatInterface->getDefaultQuery( session->account()->accountId() );
|
||||||
|
Kopete::Message msg1( session->account()->myself(), session->members().getFirst(), QString( body ), Kopete::Message::Outbound );
|
||||||
|
if( otrlChatInterface->privState( session ) > 0 ){
|
||||||
|
body = i18n("Attempting to refresh the OTR session with <b>%1</b>...").arg( otrlChatInterface->formatContact( session->members().getFirst()->contactId() ) );
|
||||||
|
} else {
|
||||||
|
body = i18n("Attempting to start a private OTR session with <b>%1</b>...").arg( otrlChatInterface->formatContact( session->members().getFirst()->contactId() ) );
|
||||||
|
}
|
||||||
|
Kopete::Message msg2( session->account()->myself(), session->members().getFirst(), body, Kopete::Message::Internal, Kopete::Message::RichText );
|
||||||
|
|
||||||
|
session->sendMessage( msg1 );
|
||||||
|
session->appendMessage( msg2 );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
otrlChatInterface->disconnectSession( session );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPlugin::slotVerifyFingerprint( Kopete::ChatSession *session ){
|
||||||
|
otrlChatInterface->verifyFingerprint( session );
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPlugin::slotSettingsChanged(){
|
||||||
|
KopeteOtrKcfg::self()->readConfig();
|
||||||
|
if( KopeteOtrKcfg::self()->rbAlways() ){
|
||||||
|
otrlChatInterface->setPolicy( OTRL_POLICY_ALWAYS );
|
||||||
|
} else if( KopeteOtrKcfg::self()->rbOpportunistic() ){
|
||||||
|
otrlChatInterface->setPolicy( OTRL_POLICY_OPPORTUNISTIC );
|
||||||
|
} else if( KopeteOtrKcfg::self()->rbManual() ){
|
||||||
|
otrlChatInterface->setPolicy( OTRL_POLICY_MANUAL );
|
||||||
|
} else if( KopeteOtrKcfg::self()->rbNever() ){
|
||||||
|
otrlChatInterface->setPolicy( OTRL_POLICY_NEVER );
|
||||||
|
} else {
|
||||||
|
otrlChatInterface->setPolicy( OTRL_POLICY_DEFAULT );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPlugin::emitGoneSecure( Kopete::ChatSession *session, int status){
|
||||||
|
emit goneSecure( session, status );
|
||||||
|
}
|
||||||
|
|
||||||
|
QMap<QString, QString> OTRPlugin::getMessageCache(){
|
||||||
|
return messageCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OtrMessageHandler::handleMessage( Kopete::MessageEvent *event ){
|
||||||
|
Kopete::Message msg = event->message();
|
||||||
|
Kopete::ChatSession *session = msg.manager();
|
||||||
|
QMap<QString, QString> messageCache = OTRPlugin::plugin()->getMessageCache();
|
||||||
|
|
||||||
|
if( msg.direction() == Kopete::Message::Inbound ){
|
||||||
|
QString body = msg.parsedBody();
|
||||||
|
kdDebug() << "Received Message: " << msg.parsedBody() << endl;
|
||||||
|
QString accountId = msg.manager()->account()->accountId();
|
||||||
|
QString contactId = msg.from()->contactId();
|
||||||
|
int ignoremessage = OtrlChatInterface::self()->decryptMessage( &body, accountId, msg.manager()->account()->protocol()->displayName(), contactId, msg.manager() );
|
||||||
|
msg.setBody( body, Kopete::Message::RichText );
|
||||||
|
if( ignoremessage | OtrlChatInterface::self()->shouldDiscard( msg.plainBody() ) ){
|
||||||
|
event->discard();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if( msg.direction() == Kopete::Message::Outbound ){
|
||||||
|
if( messageCache.contains( msg.plainBody() ) ){
|
||||||
|
msg.setBody( messageCache[msg.plainBody()] );
|
||||||
|
messageCache.remove( messageCache[msg.plainBody()] );
|
||||||
|
if(messageCache.count() > 5) messageCache.clear();
|
||||||
|
}
|
||||||
|
// Check if Message is an OTR message. Should it be discarded or shown?
|
||||||
|
if( OtrlChatInterface::self()->shouldDiscard( msg.plainBody() ) ){
|
||||||
|
event->discard();
|
||||||
|
kdDebug() << "discarding" << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// If the message is sent while a Finished state libotr deletes the messagetext.
|
||||||
|
// This prevents the empty message from beeing shown in out chatwindow
|
||||||
|
if( msg.plainBody().isEmpty() ){
|
||||||
|
event->discard();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
event->setMessage( msg );
|
||||||
|
|
||||||
|
MessageHandler::handleMessage( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OTRPlugin::slotSelectionChanged( bool single){
|
||||||
|
otrPolicyMenu->setEnabled( single );
|
||||||
|
|
||||||
|
if ( !single )
|
||||||
|
return;
|
||||||
|
|
||||||
|
Kopete::MetaContact *metaContact = Kopete::ContactList::self()->selectedMetaContacts().first();
|
||||||
|
|
||||||
|
QString policy = metaContact->pluginData( this, "otr_policy" );
|
||||||
|
|
||||||
|
bool noerr;
|
||||||
|
if ( !policy.isEmpty() && policy != "null" )
|
||||||
|
otrPolicyMenu->setCurrentItem( policy.toInt( &noerr, 10 ));
|
||||||
|
else
|
||||||
|
otrPolicyMenu->setCurrentItem( 0 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPlugin::slotSetPolicy(){
|
||||||
|
kdDebug() << "Setting contact policy" << endl;
|
||||||
|
Kopete::MetaContact *metaContact = Kopete::ContactList::self()->selectedMetaContacts().first();
|
||||||
|
if( metaContact ){
|
||||||
|
metaContact->setPluginData( this, "otr_policy", QString::number( otrPolicyMenu->currentItem() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPlugin::accountReady( Kopete::Account *account ){
|
||||||
|
kdDebug() << "Account " << account->accountId() << " ready. Calling update function."<< endl;
|
||||||
|
otrlChatInterface->updateKeyfile( account );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "otrplugin.moc"
|
||||||
|
|
||||||
|
// vim: set noet ts=4 sts=4 sw=4:
|
||||||
|
|
@ -0,0 +1,118 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
otrplugin.h - description
|
||||||
|
-------------------
|
||||||
|
begin : 11 03 2007
|
||||||
|
copyright : (C) 2007-2007 by Michael Zanetti
|
||||||
|
email : michael_zanetti@gmx.net
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* *
|
||||||
|
* This program 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. *
|
||||||
|
* *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef OTRPLUGIN_H
|
||||||
|
#define OTRPLUGIN_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "kdebug.h"
|
||||||
|
|
||||||
|
#include <kopeteplugin.h>
|
||||||
|
#include <kopetemessagehandler.h>
|
||||||
|
|
||||||
|
#include "otrlchatinterface.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
class OTRPlugin;
|
||||||
|
class KSelectAction;
|
||||||
|
|
||||||
|
class OtrMessageHandler : public Kopete::MessageHandler
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
OTRPlugin *plugin;
|
||||||
|
public:
|
||||||
|
OtrMessageHandler( OTRPlugin *plugin ) : plugin(plugin) {
|
||||||
|
kdDebug() << "MessageHandler created" << endl;
|
||||||
|
}
|
||||||
|
~OtrMessageHandler(){
|
||||||
|
kdDebug() << "MessageHandler destroyed" << endl;
|
||||||
|
}
|
||||||
|
void handleMessage( Kopete::MessageEvent *event );
|
||||||
|
};
|
||||||
|
|
||||||
|
class OtrMessageHandlerFactory : public Kopete::MessageHandlerFactory
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
OTRPlugin *plugin;
|
||||||
|
OtrMessageHandler *messageHandler;
|
||||||
|
public:
|
||||||
|
OtrMessageHandlerFactory( OTRPlugin *plugin ) : plugin(plugin) {}
|
||||||
|
Kopete::MessageHandler *create( Kopete::ChatSession *, Kopete::Message::MessageDirection direction )
|
||||||
|
{
|
||||||
|
return new OtrMessageHandler(plugin);
|
||||||
|
}
|
||||||
|
int filterPosition( Kopete::ChatSession *, Kopete::Message::MessageDirection )
|
||||||
|
{
|
||||||
|
return Kopete::MessageHandlerFactory::InStageToSent+1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class OTRPlugin : public Kopete::Plugin
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
static OTRPlugin *plugin();
|
||||||
|
|
||||||
|
OTRPlugin( QObject *parent, const char *name, const QStringList &args );
|
||||||
|
~OTRPlugin();
|
||||||
|
|
||||||
|
void emitGoneSecure( Kopete::ChatSession *session, int status );
|
||||||
|
QMap<QString, QString> getMessageCache();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void slotOutgoingMessage( Kopete::Message& msg );
|
||||||
|
void slotEnableOtr( Kopete::ChatSession *session, bool enable );
|
||||||
|
void slotSettingsChanged();
|
||||||
|
void slotVerifyFingerprint( Kopete::ChatSession *session );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotNewChatSessionWindow(Kopete::ChatSession * );
|
||||||
|
void slotSelectionChanged( bool single );
|
||||||
|
void slotSetPolicy();
|
||||||
|
void accountReady( Kopete::Account *account );
|
||||||
|
|
||||||
|
private:
|
||||||
|
static OTRPlugin* pluginStatic_;
|
||||||
|
OtrMessageHandlerFactory *m_inboundHandler;
|
||||||
|
OtrlChatInterface *otrlChatInterface;
|
||||||
|
QMap<QString, QString> messageCache;
|
||||||
|
KSelectAction* otrPolicyMenu;
|
||||||
|
|
||||||
|
/* KActionMenu *otrPolicyMenuBar;
|
||||||
|
KActionMenu *otrPolicyPopup;
|
||||||
|
KAction *otrPolicyDefault;
|
||||||
|
KAction *otrPolicyAlways;
|
||||||
|
KAction *otrPolicyOpportunistic;
|
||||||
|
KAction *otrPolicyManual;
|
||||||
|
KAction *otrPolicyNever;
|
||||||
|
// SessionManager manager
|
||||||
|
*/
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void goneSecure( Kopete::ChatSession *session, int state );
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,199 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 <qlayout.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
#include <qmap.h>
|
||||||
|
#include <qptrlist.h>
|
||||||
|
#include <qcombobox.h>
|
||||||
|
#include <qstringlist.h>
|
||||||
|
#include <qtable.h>
|
||||||
|
#include <qpaintdevicemetrics.h>
|
||||||
|
#include <qvbox.h>
|
||||||
|
#include <qradiobutton.h>
|
||||||
|
#include <qtabwidget.h>
|
||||||
|
|
||||||
|
#include <kgenericfactory.h>
|
||||||
|
#include <kurlrequester.h>
|
||||||
|
#include <kmessagebox.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kapplication.h>
|
||||||
|
#include <kanimwidget.h>
|
||||||
|
#include <kpassivepopup.h>
|
||||||
|
#include <kiconloader.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <kactivelabel.h>
|
||||||
|
|
||||||
|
#include <kopeteaccountmanager.h>
|
||||||
|
#include <kopeteaccount.h>
|
||||||
|
#include <kopeteprotocol.h>
|
||||||
|
|
||||||
|
#include "otrprefs.h"
|
||||||
|
#include "otrpreferences.h"
|
||||||
|
#include "otrplugin.h"
|
||||||
|
#include "kopete_otr.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef KGenericFactory<OTRPreferences> OTRPreferencesFactory;
|
||||||
|
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_otr, OTRPreferencesFactory("kcm_kopete_otr"))
|
||||||
|
|
||||||
|
OTRPreferences::OTRPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
|
||||||
|
: KCModule(OTRPreferencesFactory::instance(), parent, args)
|
||||||
|
{
|
||||||
|
( new QVBoxLayout( this ) )->setAutoAdd( true );
|
||||||
|
preferencesDialog = new OTRPrefsUI(this);
|
||||||
|
|
||||||
|
|
||||||
|
this->addConfig( KopeteOtrKcfg::self(), preferencesDialog );
|
||||||
|
KopeteOtrKcfg::self()->readConfig();
|
||||||
|
load();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
otrlConfInterface = new OtrlConfInterface( preferencesDialog );
|
||||||
|
|
||||||
|
connect( preferencesDialog->btGenFingerprint, SIGNAL(clicked()), SLOT(generateFingerprint()));
|
||||||
|
connect( preferencesDialog->cbKeys, SIGNAL(activated(int)), SLOT(showPrivFingerprint(int)));
|
||||||
|
connect( preferencesDialog->btVerify, SIGNAL(clicked()), SLOT(verifyFingerprint()));
|
||||||
|
connect( preferencesDialog->twSettings, SIGNAL(currentChanged(QWidget *)), SLOT(fillFingerprints()));
|
||||||
|
connect( preferencesDialog->tbFingerprints, SIGNAL(currentChanged(int, int)), SLOT(updateButtons(int, int)));
|
||||||
|
connect( preferencesDialog->btForget, SIGNAL( clicked() ), SLOT( forgetFingerprint() ) );
|
||||||
|
|
||||||
|
int index = 0;
|
||||||
|
int accountnr = 0;
|
||||||
|
QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
|
||||||
|
if( !accounts.isEmpty() ){
|
||||||
|
for ( QPtrListIterator<Kopete::Account> it( accounts );
|
||||||
|
Kopete::Account *account = it.current();
|
||||||
|
++it ){
|
||||||
|
if ( account->protocol()->pluginId() != "IRCProtocol" ){
|
||||||
|
preferencesDialog->cbKeys->insertItem(account->accountId() + " (" + account->protocol()->displayName() + ")");
|
||||||
|
privKeys.insert(index++, accountnr);
|
||||||
|
}
|
||||||
|
accountnr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showPrivFingerprint( preferencesDialog->cbKeys->currentItem() );
|
||||||
|
|
||||||
|
preferencesDialog->tbFingerprints->setColumnWidth( 0, 200 );
|
||||||
|
preferencesDialog->tbFingerprints->setColumnWidth( 1, 80 );
|
||||||
|
preferencesDialog->tbFingerprints->setColumnWidth( 2, 60 );
|
||||||
|
preferencesDialog->tbFingerprints->setColumnWidth( 3, 400 );
|
||||||
|
preferencesDialog->tbFingerprints->setColumnWidth( 4, 200 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
OTRPreferences::~OTRPreferences(){
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPreferences::generateFingerprint()
|
||||||
|
{
|
||||||
|
QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
|
||||||
|
|
||||||
|
if( (accounts.isEmpty())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Kopete::Account *account = accounts.at( privKeys[preferencesDialog->cbKeys->currentItem()] );
|
||||||
|
|
||||||
|
if ((otrlConfInterface->hasPrivFingerprint( account->accountId(), account->protocol()->displayName() ) ) && (KMessageBox::questionYesNo(this, i18n("Selected account already has a key. Do you want to create a new one?"), i18n("Overwrite key?")) !=3)) return;
|
||||||
|
|
||||||
|
otrlConfInterface->generateNewPrivKey( account->accountId(), account->protocol()->displayName() );
|
||||||
|
showPrivFingerprint( preferencesDialog->cbKeys->currentItem() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPreferences::showPrivFingerprint( int accountnr )
|
||||||
|
{
|
||||||
|
QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
|
||||||
|
if( !accounts.isEmpty() ){
|
||||||
|
Kopete::Account *account = accounts.at(privKeys[accountnr]);
|
||||||
|
preferencesDialog->tlFingerprint->setText( otrlConfInterface->getPrivFingerprint( account->accountId(), account->protocol()->displayName() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPreferences::fillFingerprints(){
|
||||||
|
QTable *fingerprintsTable = preferencesDialog->tbFingerprints;
|
||||||
|
preferencesDialog->tbFingerprints->setNumRows(0);
|
||||||
|
QValueList<QString[5]> list = otrlConfInterface->readAllFingerprints();
|
||||||
|
QValueList<QString[5]>::iterator it;
|
||||||
|
int j = 0;
|
||||||
|
for( it = list.begin(); it != list.end(); ++it ){
|
||||||
|
preferencesDialog->tbFingerprints->setNumRows( preferencesDialog->tbFingerprints->numRows() +1 );
|
||||||
|
(*it)[0] = OtrlChatInterface::self()->formatContact((*it)[0]);
|
||||||
|
for( int i = 0; i < 5; i++ ){
|
||||||
|
//preferencesDialog->tbFingerprints->setText(j, i, (*it)[i] );
|
||||||
|
fingerprintsTable->setItem(j,i, new QAlignTableItem(fingerprintsTable, QTableItem::Never,(*it)[i],Qt::AlignLeft));
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
updateButtons( preferencesDialog->tbFingerprints->currentRow(), preferencesDialog->tbFingerprints->currentColumn() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPreferences::verifyFingerprint(){
|
||||||
|
|
||||||
|
int doVerify = KMessageBox::questionYesNo(
|
||||||
|
this,
|
||||||
|
i18n("Please contact %1 via another secure way and verify that the following Fingerprint is correct:").arg(preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 0 )) + "\n\n" + preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ) + "\n\n" + i18n("Are you sure you want to trust this fingerprint?"), i18n("Verify fingerprint") );
|
||||||
|
|
||||||
|
|
||||||
|
if( doVerify == KMessageBox::Yes ){
|
||||||
|
otrlConfInterface->verifyFingerprint( preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ), true );
|
||||||
|
} else {
|
||||||
|
otrlConfInterface->verifyFingerprint( preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ), false );
|
||||||
|
}
|
||||||
|
fillFingerprints();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPreferences::updateButtons( int row, int col ){
|
||||||
|
if( row != -1 ){
|
||||||
|
if( !otrlConfInterface->isEncrypted( preferencesDialog->tbFingerprints->text( row, 3 ) ) ){
|
||||||
|
preferencesDialog->btForget->setEnabled( true );
|
||||||
|
} else {
|
||||||
|
preferencesDialog->btForget->setEnabled( false );
|
||||||
|
}
|
||||||
|
preferencesDialog->btVerify->setEnabled( true );
|
||||||
|
} else {
|
||||||
|
preferencesDialog->btVerify->setEnabled( false );
|
||||||
|
preferencesDialog->btForget->setEnabled( false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OTRPreferences::forgetFingerprint(){
|
||||||
|
if( !otrlConfInterface->isEncrypted( preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ) ) ){
|
||||||
|
otrlConfInterface->forgetFingerprint( preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ) );
|
||||||
|
fillFingerprints();
|
||||||
|
} else {
|
||||||
|
updateButtons( preferencesDialog->tbFingerprints->currentRow(), preferencesDialog->tbFingerprints->currentColumn() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QAlignTableItem :: QAlignTableItem( QTable *table, EditType editType, const QString& text, int alignment )
|
||||||
|
: QTableItem( table, editType, text ) {
|
||||||
|
align = alignment;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "otrpreferences.moc"
|
||||||
|
|
||||||
|
// vim: set noet ts=4 sts=4 sw=4:
|
@ -0,0 +1,64 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 OTRPREFERECES_H
|
||||||
|
#define OTRPREFERECES_H
|
||||||
|
|
||||||
|
#include <kcmodule.h>
|
||||||
|
#include "otrlconfinterface.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preference widget for the OTR plugin
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
class OTRPreferences : public KCModule {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
OTRPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
|
||||||
|
~OTRPreferences();
|
||||||
|
|
||||||
|
private:
|
||||||
|
OTRPrefsUI *preferencesDialog;
|
||||||
|
OtrlConfInterface *otrlConfInterface;
|
||||||
|
QMap<int, int> privKeys;
|
||||||
|
|
||||||
|
private slots: // Public slots
|
||||||
|
void generateFingerprint();
|
||||||
|
void showPrivFingerprint(int accountnr);
|
||||||
|
void verifyFingerprint();
|
||||||
|
void fillFingerprints();
|
||||||
|
void updateButtons(int row, int col);
|
||||||
|
void forgetFingerprint();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class QAlignTableItem : public QTableItem {
|
||||||
|
|
||||||
|
public :
|
||||||
|
QAlignTableItem(QTable *table, EditType editType, const QString& text, int alignment);
|
||||||
|
|
||||||
|
private :
|
||||||
|
int align;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,295 @@
|
|||||||
|
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||||
|
<class>OTRPrefsUI</class>
|
||||||
|
<widget class="QWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>OTRPrefsUI</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>480</width>
|
||||||
|
<height>358</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="caption">
|
||||||
|
<string>Form1</string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QTabWidget" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>twSettings</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>settings</cstring>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>&Settings</string>
|
||||||
|
</attribute>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QGroupBox" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>groupBox1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Private Keys</string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" row="0" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>btGenFingerprint</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Generate</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+G</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" row="0" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>cbKeys</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>32767</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Account:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KActiveLabel" row="1" column="0" rowspan="1" colspan="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>tlFingerprint</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>7</hsizetype>
|
||||||
|
<vsizetype>5</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>No Fingerprint</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<widget class="QButtonGroup" row="1" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>bgPolicy</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Default Policy</string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QRadioButton" row="1" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>kcfg_rbOpportunistic</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Opportunistic</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+O</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" stdset="0">
|
||||||
|
<string>Encrypt messages automatically if the other side supports OTR</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" row="1" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>kcfg_rbNever</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ne&ver</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+V</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" stdset="0">
|
||||||
|
<string>Never encrypt messages</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" row="0" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>kcfg_rbManual</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Manual</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+M</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" stdset="0">
|
||||||
|
<string>Encrypt messages if the other side requests an OTR connection</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>kcfg_rbAlways</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="autoMask">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Al&ways</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+W</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" stdset="0">
|
||||||
|
<string>Always encrypt messages</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<spacer row="2" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>spacer2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>161</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>fingerprints</cstring>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>K&nown Fingerprints</string>
|
||||||
|
</attribute>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QTable" row="0" column="0" rowspan="1" colspan="2">
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>User</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Status</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Verified</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Fingerprint</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Protocol</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>tbFingerprints</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="numRows">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="numCols">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="showGrid">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sorting">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>SingleRow</enum>
|
||||||
|
</property>
|
||||||
|
<property name="focusStyle">
|
||||||
|
<enum>FollowStyle</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" row="1" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>btVerify</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Verify Fingerprint</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+V</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" row="1" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>btForget</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>F&orget Fingerprint</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+O</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<slots>
|
||||||
|
<slot access="private">generateFingerprint()</slot>
|
||||||
|
</slots>
|
||||||
|
<layoutdefaults spacing="6" margin="11"/>
|
||||||
|
<includehints>
|
||||||
|
<includehint>kactivelabel.h</includehint>
|
||||||
|
</includehints>
|
||||||
|
</UI>
|
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE kpartgui>
|
||||||
|
<kpartgui name="kopete_otr" version="1">
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="edit">
|
||||||
|
<text>&Edit</text>
|
||||||
|
<Action name="otr_policy" />
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
<Menu name="contact_popup">
|
||||||
|
<Action name="otr_policy" />
|
||||||
|
</Menu>
|
||||||
|
</kpartgui>
|
@ -0,0 +1,4 @@
|
|||||||
|
icondir = $(kde_datadir)/kopete_otr/icons
|
||||||
|
icon_ICON = AUTO
|
||||||
|
KDE_ICON = kopete_otr
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,52 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "privkeypopup.h"
|
||||||
|
|
||||||
|
PrivKeyPopup::PrivKeyPopup(QWidget* parent, const char* name, WFlags fl)
|
||||||
|
: PrivKeyPopupUI(parent,name,fl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
PrivKeyPopup::~PrivKeyPopup()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrivKeyPopup::setCloseLock( bool locked ){
|
||||||
|
closeLock = locked;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrivKeyPopup::closeEvent( QCloseEvent *e ){
|
||||||
|
if( closeLock ){
|
||||||
|
e->ignore();
|
||||||
|
} else {
|
||||||
|
e->accept();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*$SPECIALIZATION$*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "privkeypopup.moc"
|
||||||
|
|
@ -0,0 +1,55 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 PRIVKEYPOPUP_H
|
||||||
|
#define PRIVKEYPOPUP_H
|
||||||
|
|
||||||
|
#include "privkeypopupui.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Michael Zanetti
|
||||||
|
*/
|
||||||
|
|
||||||
|
class PrivKeyPopup : public PrivKeyPopupUI
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
PrivKeyPopup(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~PrivKeyPopup();
|
||||||
|
void setCloseLock( bool locked );
|
||||||
|
/*$PUBLIC_FUNCTIONS$*/
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
/*$PUBLIC_SLOTS$*/
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/*$PROTECTED_FUNCTIONS$*/
|
||||||
|
bool closeLock;
|
||||||
|
|
||||||
|
void closeEvent( QCloseEvent *e );
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
/*$PROTECTED_SLOTS$*/
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,64 @@
|
|||||||
|
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||||
|
<class>PrivKeyPopupUI</class>
|
||||||
|
<widget class="QWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>PrivKeyPopupUI</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>507</width>
|
||||||
|
<height>111</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="caption">
|
||||||
|
<string>Generating private key</string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>tlWait</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<bold>1</bold>
|
||||||
|
<italic>1</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Please wait while generating the private key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QFrame" row="0" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>animFrame</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>72</width>
|
||||||
|
<height>72</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<layoutdefaults spacing="6" margin="11"/>
|
||||||
|
</UI>
|
@ -0,0 +1,71 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 "qlabel.h"
|
||||||
|
|
||||||
|
#include "kdebug.h"
|
||||||
|
#include "klocale.h"
|
||||||
|
#include "klineedit.h"
|
||||||
|
#include "kurl.h"
|
||||||
|
#include "krun.h"
|
||||||
|
|
||||||
|
#include "smppopup.h"
|
||||||
|
#include "verifypopup.h"
|
||||||
|
|
||||||
|
SMPPopup::SMPPopup(QWidget* parent, const char* name, WFlags fl, ConnContext *context, Kopete::ChatSession *session, bool initiate )
|
||||||
|
: SMPPopupUI(parent,name,fl)
|
||||||
|
{
|
||||||
|
this->context = context;
|
||||||
|
this->session = session;
|
||||||
|
this->initiate = initiate;
|
||||||
|
tlText->setText( i18n("Please enter the secret passphrase to authenticate %1:").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
|
||||||
|
}
|
||||||
|
|
||||||
|
SMPPopup::~SMPPopup()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*$SPECIALIZATION$*/
|
||||||
|
void SMPPopup::cancelSMP()
|
||||||
|
{
|
||||||
|
OtrlChatInterface::self()->abortSMP( context, session );
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMPPopup::respondSMP()
|
||||||
|
{
|
||||||
|
OtrlChatInterface::self()->respondSMP( context, session, leSecret->text(), initiate );
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMPPopup::openHelp()
|
||||||
|
{
|
||||||
|
KURL *url = new KURL("http://www.cypherpunks.ca/otr/help/authenticate.php?lang=en");
|
||||||
|
new KRun(*url, 0, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMPPopup::manualAuth(){
|
||||||
|
VerifyPopup *vfPopup = new VerifyPopup(this, i18n("Verify Fingerprint"), session);
|
||||||
|
vfPopup->show();
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "smppopup.moc"
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 SMPPOPUP_H
|
||||||
|
#define SMPPOPUP_H
|
||||||
|
|
||||||
|
#include "kopetechatsession.h"
|
||||||
|
|
||||||
|
#include "smppopupui.h"
|
||||||
|
#include "otrlchatinterface.h"
|
||||||
|
|
||||||
|
extern "C"{
|
||||||
|
#include "libotr/proto.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
class SMPPopup : public SMPPopupUI
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SMPPopup(QWidget* parent = 0, const char* name = 0, WFlags fl = 0, ConnContext *context = 0, Kopete::ChatSession *session = 0, bool initiate = true );
|
||||||
|
~SMPPopup();
|
||||||
|
/*$PUBLIC_FUNCTIONS$*/
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
/*$PUBLIC_SLOTS$*/
|
||||||
|
virtual void cancelSMP();
|
||||||
|
virtual void respondSMP();
|
||||||
|
virtual void openHelp();
|
||||||
|
virtual void manualAuth();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/*$PROTECTED_FUNCTIONS$*/
|
||||||
|
|
||||||
|
ConnContext *context;
|
||||||
|
Kopete::ChatSession *session;
|
||||||
|
bool initiate;
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
/*$PROTECTED_SLOTS$*/
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,191 @@
|
|||||||
|
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||||
|
<class>SMPPopupUI</class>
|
||||||
|
<widget class="QWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>SMPPopupUI</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>536</width>
|
||||||
|
<height>158</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="caption">
|
||||||
|
<string>Enter authentication secret</string>
|
||||||
|
</property>
|
||||||
|
<widget class="KPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pbOK</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>430</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>90</width>
|
||||||
|
<height>30</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&OK</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+O</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pbCancel</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>330</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>91</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Cancel</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+C</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KLineEdit">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>leSecret</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>120</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>tlText</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>124</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>390</width>
|
||||||
|
<height>50</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Please enter the secret passphrase to authenticate this contact.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>WordBreak|AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pLIcon</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>30</y>
|
||||||
|
<width>50</width>
|
||||||
|
<height>50</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap>image0</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pbManual</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>160</width>
|
||||||
|
<height>30</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Manual Authentication</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+M</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pbHelp</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>90</width>
|
||||||
|
<height>30</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Help</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+H</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<images>
|
||||||
|
<image name="image0">
|
||||||
|
<data format="PNG" length="1360">89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000517494441545885c5975d68544714c77f7b5db39b98adf95851a34913158dd1b452db2a488badb5155bfba22f3e54a4da421ffa609fa42fea83a0f8509fc5071529a894422988156cc552d4b40113129ae826249b8fc664f3b17befeede3b7766fa70633edc9bcdfa517ae0b2c3ec9df9ffce393367e6c2ff6c81671d70f6ecb5b052aa1ea80b0428d39acf95523d528a96870fdb2e9e3f7f7a0490ff09c09933df6f0f04025b57adaa0aad5cb98468743152cae3c9a4c5a347fdf4f58d904e9be75a5bef9fb87af5dc502120c142844f9ebc180e040207972faf5cba7bf756caca220402b3d9376d5acbe0e030376ffef9a5d65bde1d1a1af8f8f6ed9fe380c837f782f9c48f1d3b1f564a1f6c6c5cbd74dfbef7282e0e23a5249d4e639a2696656dcf64321886414545191b36d4313c3c1e0d85a2bb1c277bbdbfbf3b05a8e706d8b66df70735354bd7eddfbf13e089287d7d8f696fefa1ab6b60bb942eb69dc6b66d2291080d0d75c462f16830f84a4553d3ad5f0107d0cf0c70e4c877658661ec3d74e8138a8bc32493499249936bd76e73e7ce03f1e0415b4f2cd65bdad939581a8f274a4b4a0c5cd7211a8d5255554e6b6bfc3521c42f7d7db17f00d74f23ef1a504a6fddb8b18ecaca322ccbc2b66d2e5fbe4947c7c3aeebd72f350d0dc54da005d0070e1cfd7a74347978cf9e370887c3545757b3624505f5f56f7e71f7ee8d76c0f68330f2010821963534d4a1b5c6344d9a9b3be9ea8a8f5db870f2f7a1a1f828300e7403dd972e9dfa369148fc78efde437a7b7b0158bffe550c63613d100116fa69e405705df9eaaa55556432198410343777d2d3d3f13790054cc00292400a48f4f5751defee7e4c369b656c6c8cdada65048345af038b9e0bc0715c8a8b4308211042e03882f1f144122f9c4f2f2c75e3c6a576cbca2284606464844864118ee302143147bae74b018ee3e0380eaeeb22844029adf10a8cdfd6924208b4d64829a7c0f116bb6fd19b270202dbb6b16d7b7232172925ccb1a500ed385edd715d77123e6f1dca0fa0b5c6b66d1cc799f45ea1e7929e316626809e67806f5edace36d41b06cb7febed24db761129250b1c87cd65dd6cfe30b1a66aefdaf2c5c50b8461a0811d33c7fe31d049c59843d029412e2c62476d279f1d5d7d3800773e3d15bbcc53e9cbc94bd3e9865d0b17b025525343a4ba26bfbb9e1d9fef8554bc97546f2f89943cbfe344c73778bb47f946209d61cb9a8fdea7eaed46d08ff016fb8bd992b7d631d0b48c891bf70f03a7810120ed0b30616942e551b0aebc1471004c9b506c88096b11403990981320696adc4c3f64ad9723ee2a6819c44d2b92a606af204d2d7e9f0880b415647dcf8e6733a9a0fd31a46ca41364c2c7a7dc08581ad75690cdbf7fe7354742f728980e488deb289256ee96cc8d80a9716d099917888069c3401284f2a2a03c8009b300005782769f330552c1681a5236280d524f0168a9717d6e88fef7019127056ad20bada70bb2ab4048b09c59a2d3bf936d1ff30770d5740a828657aeb49e9e4ca9c94967b4fdfa6601f897e4390024d8024a439eb8d4d31ecd122db0efb922505234dd7e2a9fd30279fa72009e2502a1a0e7b9abc8c9a35f6e0b85f231dfe37860d800a3d203987aa43749bebe9cffa79f8154a8b00848a5e33ffdf05775ac71392b226970b39e074f56fdccf6938539ab9dfb5e7faa88b69152d28e6cc53b8ea7f291731cefac5f1aa9ad2c79a72868546b5dd0b7e35705bcc34446b4dcea787c6530998d0171bc4badaf8001848030de65723e88658500e09dff16308677937601fe058d04715d6cb9690e0000000049454e44ae426082</data>
|
||||||
|
</image>
|
||||||
|
</images>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>pbCancel</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>SMPPopupUI</receiver>
|
||||||
|
<slot>cancelSMP()</slot>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>pbOK</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>SMPPopupUI</receiver>
|
||||||
|
<slot>respondSMP()</slot>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>pbHelp</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>SMPPopupUI</receiver>
|
||||||
|
<slot>openHelp()</slot>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>pbManual</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>SMPPopupUI</receiver>
|
||||||
|
<slot>manualAuth()</slot>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>manualAuth()</slot>
|
||||||
|
<slot>respondSMP()</slot>
|
||||||
|
<slot>openHelp()</slot>
|
||||||
|
<slot>cancelSMP()</slot>
|
||||||
|
</slots>
|
||||||
|
<layoutdefaults spacing="6" margin="11"/>
|
||||||
|
<includehints>
|
||||||
|
<includehint>kpushbutton.h</includehint>
|
||||||
|
<includehint>kpushbutton.h</includehint>
|
||||||
|
<includehint>klineedit.h</includehint>
|
||||||
|
<includehint>kpushbutton.h</includehint>
|
||||||
|
<includehint>kpushbutton.h</includehint>
|
||||||
|
</includehints>
|
||||||
|
</UI>
|
@ -0,0 +1,69 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 "verifypopup.h"
|
||||||
|
#include "otrlchatinterface.h"
|
||||||
|
#include "otrplugin.h"
|
||||||
|
|
||||||
|
#include "qlabel.h"
|
||||||
|
|
||||||
|
#include "klocale.h"
|
||||||
|
#include "kactivelabel.h"
|
||||||
|
#include "kcombobox.h"
|
||||||
|
|
||||||
|
#include "kopetechatsession.h"
|
||||||
|
#include "kopetecontact.h"
|
||||||
|
|
||||||
|
VerifyPopup::VerifyPopup(QWidget* parent, const char* name, Kopete::ChatSession *session, bool modal, WFlags fl)
|
||||||
|
: VerifyPopupUI(parent,name, modal,fl)
|
||||||
|
{
|
||||||
|
this->session = session;
|
||||||
|
alContact->setText(i18n("Verify fingerprint for %1.").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
|
||||||
|
alFingerprint->setText(i18n("The received fingerprint is:\n\n%1\n\nContact %2 via another secure channel and verify that this fingerprint is correct.").arg(OtrlChatInterface::self()->findActiveFingerprint(session)).arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
|
||||||
|
alVerified->setText(i18n("verified that this is in fact the correct fingerprint for %1").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
|
||||||
|
cbVerify->insertItem(i18n("I have not"));
|
||||||
|
cbVerify->insertItem(i18n("I have"));
|
||||||
|
if( OtrlChatInterface::self()->isVerified(session)){
|
||||||
|
cbVerify->setCurrentItem(1);
|
||||||
|
} else {
|
||||||
|
cbVerify->setCurrentItem(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VerifyPopup::~VerifyPopup()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void VerifyPopup::cbChanged(){
|
||||||
|
kdDebug() << "combobox changed" << endl;
|
||||||
|
if( cbVerify->currentItem() == 0 ){
|
||||||
|
OtrlChatInterface::self()->setTrust(session, false);
|
||||||
|
} else {
|
||||||
|
OtrlChatInterface::self()->setTrust(session, true);
|
||||||
|
}
|
||||||
|
OTRPlugin::plugin()->emitGoneSecure( session, OtrlChatInterface::self()->privState( session ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*$SPECIALIZATION$*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "verifypopup.moc"
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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 VERIFYPOPUP_H
|
||||||
|
#define VERIFYPOPUP_H
|
||||||
|
|
||||||
|
#include "verifypopupui.h"
|
||||||
|
#include "kopetechatsession.h"
|
||||||
|
|
||||||
|
class VerifyPopup : public VerifyPopupUI
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
VerifyPopup(QWidget* parent = 0, const char* name = 0, Kopete::ChatSession *session = NULL, bool modal = FALSE, WFlags fl = 0 );
|
||||||
|
~VerifyPopup();
|
||||||
|
/*$PUBLIC_FUNCTIONS$*/
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
/*$PUBLIC_SLOTS$*/
|
||||||
|
virtual void cbChanged();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/*$PROTECTED_FUNCTIONS$*/
|
||||||
|
Kopete::ChatSession *session;
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
/*$PROTECTED_SLOTS$*/
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,113 @@
|
|||||||
|
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||||
|
<class>VerifyPopupUI</class>
|
||||||
|
<widget class="QDialog">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>VerifyPopupUI</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>605</width>
|
||||||
|
<height>250</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="caption">
|
||||||
|
<string>Verify Fingerprint</string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="KPushButton" row="3" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pbOK</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&OK</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+O</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<spacer row="3" column="0" rowspan="1" colspan="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>spacer1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>461</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
<widget class="KActiveLabel" row="2" column="1" rowspan="1" colspan="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>alVerified</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KComboBox" row="2" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>cbVerify</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>130</width>
|
||||||
|
<height>32767</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KActiveLabel" row="0" column="0" rowspan="1" colspan="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>alContact</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="1" column="0" rowspan="1" colspan="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>alFingerprint</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>WordBreak|AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>cbVerify</sender>
|
||||||
|
<signal>activated(int)</signal>
|
||||||
|
<receiver>VerifyPopupUI</receiver>
|
||||||
|
<slot>cbChanged()</slot>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>pbOK</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>VerifyPopupUI</receiver>
|
||||||
|
<slot>close()</slot>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>cbChanged()</slot>
|
||||||
|
</slots>
|
||||||
|
<layoutdefaults spacing="6" margin="11"/>
|
||||||
|
<includehints>
|
||||||
|
<includehint>kpushbutton.h</includehint>
|
||||||
|
<includehint>kactivelabel.h</includehint>
|
||||||
|
<includehint>kcombobox.h</includehint>
|
||||||
|
<includehint>kactivelabel.h</includehint>
|
||||||
|
</includehints>
|
||||||
|
</UI>
|
@ -0,0 +1,19 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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. *
|
||||||
|
***************************************************************************/
|
@ -0,0 +1,19 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007 by Michael Zanetti *
|
||||||
|
* michael_zanetti@gmx.net *
|
||||||
|
* *
|
||||||
|
* This program 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 program 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. *
|
||||||
|
***************************************************************************/
|
Loading…
Reference in new issue