--- /dev/null
+#############################################################################
+# Makefile for building: tpsession
+# Generated by qmake (2.01a) (Qt 4.6.1) on: Mon Feb 8 23:30:46 2010
+# Project: tpsession.pro
+# Template: subdirs
+# Command: /opt/qt4-maemo5/bin/qmake -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tpsession.pro
+#############################################################################
+
+first: make_default
+MAKEFILE = Makefile
+QMAKE = /opt/qt4-maemo5/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+INSTALL_FILE = install -m 644 -p
+INSTALL_PROGRAM = install -m 755 -p
+INSTALL_DIR = $(COPY_DIR)
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+SUBTARGETS = \
+ sub-tpsession \
+ sub-tests
+
+tpsession/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) tpsession/ || $(MKDIR) tpsession/
+ cd tpsession/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/tpsession.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-tpsession-qmake_all: FORCE
+ @$(CHK_DIR_EXISTS) tpsession/ || $(MKDIR) tpsession/
+ cd tpsession/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/tpsession.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-tpsession: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE)
+sub-tpsession-make_default: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE)
+sub-tpsession-make_first: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE) first
+sub-tpsession-all: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE) all
+sub-tpsession-clean: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE) clean
+sub-tpsession-distclean: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE) distclean
+sub-tpsession-install_subtargets: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE) install
+sub-tpsession-uninstall_subtargets: tpsession/$(MAKEFILE) FORCE
+ cd tpsession/ && $(MAKE) -f $(MAKEFILE) uninstall
+tests/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) tests/ || $(MKDIR) tests/
+ cd tests/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/tests.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-tests-qmake_all: FORCE
+ @$(CHK_DIR_EXISTS) tests/ || $(MKDIR) tests/
+ cd tests/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/tests.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-tests: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE)
+sub-tests-make_default: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE)
+sub-tests-make_first: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE) first
+sub-tests-all: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE) all
+sub-tests-clean: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE) clean
+sub-tests-distclean: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE) distclean
+sub-tests-install_subtargets: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE) install
+sub-tests-uninstall_subtargets: tests/$(MAKEFILE) FORCE
+ cd tests/ && $(MAKE) -f $(MAKEFILE) uninstall
+
+Makefile: tpsession.pro /opt/qt4-maemo5/mkspecs/linux-g++-maemo5/qmake.conf /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf
+ $(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tpsession.pro
+/opt/qt4-maemo5/mkspecs/common/unix.conf:
+/opt/qt4-maemo5/mkspecs/common/linux.conf:
+/opt/qt4-maemo5/mkspecs/qconfig.pri:
+/opt/qt4-maemo5/mkspecs/features/qt_functions.prf:
+/opt/qt4-maemo5/mkspecs/features/qt_config.prf:
+/opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf:
+/opt/qt4-maemo5/mkspecs/features/default_pre.prf:
+/opt/qt4-maemo5/mkspecs/features/release.prf:
+/opt/qt4-maemo5/mkspecs/features/default_post.prf:
+/opt/qt4-maemo5/mkspecs/features/warn_on.prf:
+/opt/qt4-maemo5/mkspecs/features/qt.prf:
+/opt/qt4-maemo5/mkspecs/features/unix/thread.prf:
+/opt/qt4-maemo5/mkspecs/features/moc.prf:
+/opt/qt4-maemo5/mkspecs/features/resources.prf:
+/opt/qt4-maemo5/mkspecs/features/uic.prf:
+/opt/qt4-maemo5/mkspecs/features/yacc.prf:
+/opt/qt4-maemo5/mkspecs/features/lex.prf:
+/opt/qt4-maemo5/mkspecs/features/include_source_dir.prf:
+qmake: qmake_all FORCE
+ @$(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tpsession.pro
+
+qmake_all: sub-tpsession-qmake_all sub-tests-qmake_all FORCE
+
+make_default: sub-tpsession-make_default sub-tests-make_default FORCE
+make_first: sub-tpsession-make_first sub-tests-make_first FORCE
+all: sub-tpsession-all sub-tests-all FORCE
+clean: sub-tpsession-clean sub-tests-clean FORCE
+distclean: sub-tpsession-distclean sub-tests-distclean FORCE
+ -$(DEL_FILE) Makefile
+install_subtargets: sub-tpsession-install_subtargets sub-tests-install_subtargets FORCE
+uninstall_subtargets: sub-tpsession-uninstall_subtargets sub-tests-uninstall_subtargets FORCE
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+install: install_subtargets FORCE
+
+uninstall: uninstall_subtargets FORCE
+
+FORCE:
+
--- /dev/null
+tpsession for Debian
+--------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- unknown <kate.alhola@nokia.com> Mon, 8 Feb 2010 14:20:48 +0200
--- /dev/null
+tpsession (0.1-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Kate Alhola <kate.alhola@nokia.com> Mon, 8 Feb 2010 14:20:48 +0200
+
--- /dev/null
+Source: tpsession
+Section: libs
+Priority: extra
+Maintainer: Kate Alhola <kate.alhola@nokia.com>
+Build-Depends: cdbs, cdbs, debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: libtpsession
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Easy to use API to Telepathy-Qt4
+ Easy to use API to Telepathy-Qt4
+
+Package: libtpsession-dev
+Architecture: any
+Section: libdevel
+Depends: libtpsession (=0.1-1)
+Description: Easy to use API to Telepathy-Qt4 dev files
+ Easy to use API to Telepathy-Qt4 dev files
+
+Package: libtpsession-dbg
+Architecture: any
+Section: libdevel
+Depends: tpsession (=0.1)
+Description: Easy to use API to Telepathy-Qt4 debug symbols
+ Easy to use API to Telepathy-Qt4 debug symbols
+
--- /dev/null
+This package was debianized by Kate Alhola <kate.alhola@nokia.com> on
+Mon, 8 Feb 2010 14:20:48 +0200.
+
+It was downloaded from http://tpsession.garage.maemo.org
+
+Upstream Author: Kate Alhola <kate.alhola@nokia.com>
+
+Copyright: (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+
+License:
+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2010, Kate Alhola <kate.alhola@nokia.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
--- /dev/null
+usr/bin
+usr/sbin
--- /dev/null
+libtpsession_0.1-1_armel.deb libs extra
+libtpsession-dev_0.1-1_armel.deb libdevel extra
+libtpsession-dbg_0.1-1_armel.deb libdevel extra
--- /dev/null
+Package: libtpsession-dbg
+Version: 0.1-1
+Section: libdevel
+Priority: extra
+Architecture: armel
+Depends: tpsession (= 0.1)
+Installed-Size: 921
+Maintainer: Kate Alhola <kate.alhola@nokia.com>
+Source: tpsession
+Description: Easy to use API to Telepathy-Qt4 debug symbols
+ Easy to use API to Telepathy-Qt4 debug symbols
--- /dev/null
+91d11f0e5999105be8de26ad0907a05d usr/lib/debug/opt/qt4-maemo5/lib/libtpsession.so.0.1.0
+cceb339a9791e22bbae84647ecda2b8a usr/share/doc/libtpsession-dbg/changelog.Debian.gz
+707f20563222a064607acf41d3e5c7b2 usr/share/doc/libtpsession-dbg/copyright
--- /dev/null
+This package was debianized by Kate Alhola <kate.alhola@nokia.com> on
+Mon, 8 Feb 2010 14:20:48 +0200.
+
+It was downloaded from http://tpsession.garage.maemo.org
+
+Upstream Author: Kate Alhola <kate.alhola@nokia.com>
+
+Copyright: (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+
+License:
+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2010, Kate Alhola <kate.alhola@nokia.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
--- /dev/null
+debian/tmp/usr/include/telepathy-1.0/tpsession/*
+debian/tmp/usr/lib/pkgconfig/*
--- /dev/null
+Package: libtpsession-dev
+Version: 0.1-1
+Section: libdevel
+Priority: extra
+Architecture: armel
+Depends: libtpsession (= 0.1-1)
+Installed-Size: 13
+Maintainer: Kate Alhola <kate.alhola@nokia.com>
+Source: tpsession
+Description: Easy to use API to Telepathy-Qt4 dev files
+ Easy to use API to Telepathy-Qt4 dev files
--- /dev/null
+f5dc0a769f2e6fb59be9c66b55b738ad usr/include/telepathy-1.0/tpsession/tpsession.h
+698278bf13455b61bc558410d9a946db usr/include/telepathy-1.0/tpsession/tpsessionaccount.h
+ac135bff6b7c2388dea6a8c7d3b5f2f3 usr/include/telepathy-1.0/tpsession/tpsessionchannel.h
+da668240e6a6465d26576272ecb52b48 usr/include/telepathy-1.0/tpsession/tpsessionobserver.h
+4987dc18c04e1e486b0c518dcd0ef913 usr/lib/pkgconfig/TpSession.pc
+cceb339a9791e22bbae84647ecda2b8a usr/share/doc/libtpsession-dev/changelog.Debian.gz
+707f20563222a064607acf41d3e5c7b2 usr/share/doc/libtpsession-dev/copyright
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSION_H
+#define TPSESSION_H
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Account>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/PendingChannelRequest>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/AccountManager>
+#include <TelepathyQt4/PendingOperation>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ClientRegistrar>
+#include <TelepathyQt4/Debug>
+
+#include <QString>
+#include <QVector>
+#include <QObject>
+
+#include "tpsessionaccount.h"
+#include "tpsessionobserver.h"
+
+class TpSession:public QObject
+{
+ Q_OBJECT
+public:
+ TpSession(QString cmname=QString(),bool synchronous=FALSE);
+
+
+ static TpSession* instance(bool synchronous=TRUE);
+ void sendMessageToAddress(QString connectionMgr,QString address,QString message);
+ TpSessionAccount* getAccount(const QString cm, const QString protocol=QString());
+ void createChannelListener(const QString &channelType,
+ const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ChannelPtr &channel);
+ void createObserver();
+
+signals:
+ void amReady(TpSession *);
+ void accountReady(TpSessionAccount *);
+ void channeReady(TpSessionAccount *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+private slots:
+ void onAMReady(Tp::PendingOperation *);
+ void onAccountCreated(const QString &);
+ void onReady(Tp::PendingOperation *);
+ void onAccountReady(TpSessionAccount *tpacc);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+public:
+ QVector<TpSessionAccount*> accounts;
+
+private:
+ static TpSession *instancePtr;
+ //TpSession *instancePtr;
+ QString reqCm;
+ QString reqAddress;
+ QString reqMsg;
+
+ bool sync; // Synchronous initialization
+ QEventLoop loop;
+ Tp::AccountManagerPtr mAM;
+ QStringList channels;
+ Tp::ClientRegistrarPtr registrar;
+};
+
+
+
+#endif // TPSESSION_H
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSIONACCOUNT_H
+#define TPSESSIONACCOUNT_H
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Account>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/PendingChannelRequest>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/PendingContacts>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/AccountManager>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ContactManager>
+
+#include <QString>
+#include <QVector>
+
+#include "tpsessionchannel.h"
+
+class TpSessionAccount:public QObject
+{
+
+ Q_OBJECT
+public:
+ TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath);
+ void makeContactFromAddress(QString address);
+ void sendMessageToAddress(QString address,QString message);
+ Tp::ContactPtr getContactFromAddress(QString address);
+ void addOutgoingChannel(const Tp::ContactPtr &contact);
+ void addOutgoingChannel(QString address);
+ TpSessionChannel *getChannelFromPeerAddress(QString id);
+signals:
+ void accountReady(TpSessionAccount *);
+ void channelReady(TpSessionAccount *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+
+private slots:
+ void onReady(Tp::PendingOperation *op);
+ void onOutgoingChannelReady(TpSessionChannel *ch);
+ void onContactsConnectionReady(Tp::PendingOperation *op);
+ void onNewContactRetrieved(Tp::PendingOperation *op);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
+ void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
+ void onNewChannels(const Tp::ChannelDetailsList&);
+public:
+ bool ready;
+ QString reqContact;
+ QString reqMessage;
+ Tp::AccountPtr mAcc;
+ Tp::Account *acc;
+ Tp::ConnectionPtr contactsConn;
+ QSet<Tp::ContactPtr> myContacts;
+ QSet<TpSessionChannel *> myChannels;
+};
+
+#endif // TPSESSIONACCOUNT_H
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSIONCHANNEL_H
+#define TPSESSIONCHANNEL_H
+
+#include <QObject>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Message>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ContactManager>
+#include <TelepathyQt4/Connection>
+
+class TpSessionChannel : public QObject
+{
+ Q_OBJECT
+public:
+ TpSessionChannel(Tp::TextChannelPtr);
+ TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
+ void sendMessage(QString message);
+ QString peerId();
+signals:
+ void channelReady(TpSessionChannel *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
+ void messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
+public slots:
+ void onChannelCreated(Tp::PendingOperation *op);
+ void onChannelReady(Tp::PendingOperation *op);
+ void onMessageReceived(const Tp::ReceivedMessage &);
+ void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
+public:
+ Tp::ContactPtr peerContact;
+ Tp::TextChannelPtr channel;
+};
+
+#endif // TPSESSIONCHANNEL_H
--- /dev/null
+#ifndef TPSESSIONOBSERVER_H
+#define TPSESSIONOBSERVER_H
+
+#include <QObject>
+#include <TelepathyQt4/AbstractClientObserver>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Channel>
+
+class TpSession;
+
+class TpSessionObserver : public QObject , public Tp::AbstractClientObserver
+{
+ Q_OBJECT
+public:
+ TpSessionObserver(const Tp::ChannelClassList &channelfilter,TpSession *session);
+ TpSession *tpSession;
+
+
+ /*!
+ * \brief Realisation of Tp::AbstractClientObserver
+ */
+ virtual void observeChannels(const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ConnectionPtr &connection,
+ const QList<Tp::ChannelPtr> &channels,
+ const Tp::ChannelDispatchOperationPtr &dispatchOperation,
+ const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
+ const QVariantMap &observerInfo);
+};
+
+#endif // TPSESSIONOBSERVER_H
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: TpSesion
+Description: Qt4 Telepalhy-Qt4 easy to use adaptation library
+Version: 0.1
+Requires.private: QtCore >= 4.5, QtDBus >= 4.5
+Libs: -L${libdir} -ltpsession
+Cflags: -I${includedir}/telepathy-1.0/tpsession
--- /dev/null
+This package was debianized by Kate Alhola <kate.alhola@nokia.com> on
+Mon, 8 Feb 2010 14:20:48 +0200.
+
+It was downloaded from http://tpsession.garage.maemo.org
+
+Upstream Author: Kate Alhola <kate.alhola@nokia.com>
+
+Copyright: (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+
+License:
+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2010, Kate Alhola <kate.alhola@nokia.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
--- /dev/null
+debian/tmp/opt/qt4-maemo5/lib/libtpsession.so*
--- /dev/null
+# Automatically added by dh_makeshlibs
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
+# End automatically added section
--- /dev/null
+# Automatically added by dh_makeshlibs
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
+# End automatically added section
--- /dev/null
+shlibs:Depends=libc6 (>= 2.5.0-1), libdbus-1-3 (>= 1.1.4), libdbus-glib-1-2 (>= 0.76), libgcc1 (>= 1:4.2.1), libgconf2-6 (>= 2.13.5), libglib2.0-0 (>= 2.20.0), libqt4-maemo5-core (>= 4.6.1~git20100122), libqt4-maemo5-dbus (>= 4.6.1~git20100122), libqt4-maemo5-network (>= 4.6.1~git20100122), libqt4-maemo5-xml (>= 4.6.1~git20100122), libstdc++6 (>= 4.2.1)
--- /dev/null
+Package: libtpsession
+Version: 0.1-1
+Section: libs
+Priority: extra
+Architecture: armel
+Depends: libc6 (>= 2.5.0-1), libdbus-1-3 (>= 1.1.4), libdbus-glib-1-2 (>= 0.76), libgcc1 (>= 1:4.2.1), libgconf2-6 (>= 2.13.5), libglib2.0-0 (>= 2.20.0), libqt4-maemo5-core (>= 4.6.1~git20100122), libqt4-maemo5-dbus (>= 4.6.1~git20100122), libqt4-maemo5-network (>= 4.6.1~git20100122), libqt4-maemo5-xml (>= 4.6.1~git20100122), libstdc++6 (>= 4.2.1)
+Installed-Size: 73
+Maintainer: Kate Alhola <kate.alhola@nokia.com>
+Source: tpsession
+Description: Easy to use API to Telepathy-Qt4
+ Easy to use API to Telepathy-Qt4
--- /dev/null
+ba3ffd9615361d364d31fe5d4239fce3 opt/qt4-maemo5/lib/libtpsession.so.0.1.0
+cceb339a9791e22bbae84647ecda2b8a usr/share/doc/libtpsession/changelog.Debian.gz
+707f20563222a064607acf41d3e5c7b2 usr/share/doc/libtpsession/copyright
+566711be92c93313ec96c77fe9477c68 usr/share/doc/libtpsession/README.Debian
--- /dev/null
+#!/bin/sh
+set -e
+# Automatically added by dh_makeshlibs
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
+# End automatically added section
--- /dev/null
+#!/bin/sh
+set -e
+# Automatically added by dh_makeshlibs
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
+# End automatically added section
--- /dev/null
+libtpsession 0 libtpsession
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+tpsession for Debian
+--------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- unknown <kate.alhola@nokia.com> Mon, 8 Feb 2010 14:20:48 +0200
--- /dev/null
+This package was debianized by Kate Alhola <kate.alhola@nokia.com> on
+Mon, 8 Feb 2010 14:20:48 +0200.
+
+It was downloaded from http://tpsession.garage.maemo.org
+
+Upstream Author: Kate Alhola <kate.alhola@nokia.com>
+
+Copyright: (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+
+License:
+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2010, Kate Alhola <kate.alhola@nokia.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
--- /dev/null
+#!/usr/bin/make -f
+PKG_CONFIG_PATH=/opt/qt4-maemo5/lib/pkgconfig/
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/qmake.mk
+
+# Add here any variable or target overrides you need.
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSION_H
+#define TPSESSION_H
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Account>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/PendingChannelRequest>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/AccountManager>
+#include <TelepathyQt4/PendingOperation>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ClientRegistrar>
+#include <TelepathyQt4/Debug>
+
+#include <QString>
+#include <QVector>
+#include <QObject>
+
+#include "tpsessionaccount.h"
+#include "tpsessionobserver.h"
+
+class TpSession:public QObject
+{
+ Q_OBJECT
+public:
+ TpSession(QString cmname=QString(),bool synchronous=FALSE);
+
+
+ static TpSession* instance(bool synchronous=TRUE);
+ void sendMessageToAddress(QString connectionMgr,QString address,QString message);
+ TpSessionAccount* getAccount(const QString cm, const QString protocol=QString());
+ void createChannelListener(const QString &channelType,
+ const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ChannelPtr &channel);
+ void createObserver();
+
+signals:
+ void amReady(TpSession *);
+ void accountReady(TpSessionAccount *);
+ void channeReady(TpSessionAccount *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+private slots:
+ void onAMReady(Tp::PendingOperation *);
+ void onAccountCreated(const QString &);
+ void onReady(Tp::PendingOperation *);
+ void onAccountReady(TpSessionAccount *tpacc);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+public:
+ QVector<TpSessionAccount*> accounts;
+
+private:
+ static TpSession *instancePtr;
+ //TpSession *instancePtr;
+ QString reqCm;
+ QString reqAddress;
+ QString reqMsg;
+
+ bool sync; // Synchronous initialization
+ QEventLoop loop;
+ Tp::AccountManagerPtr mAM;
+ QStringList channels;
+ Tp::ClientRegistrarPtr registrar;
+};
+
+
+
+#endif // TPSESSION_H
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSIONACCOUNT_H
+#define TPSESSIONACCOUNT_H
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Account>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/PendingChannelRequest>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/PendingContacts>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/AccountManager>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ContactManager>
+
+#include <QString>
+#include <QVector>
+
+#include "tpsessionchannel.h"
+
+class TpSessionAccount:public QObject
+{
+
+ Q_OBJECT
+public:
+ TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath);
+ void makeContactFromAddress(QString address);
+ void sendMessageToAddress(QString address,QString message);
+ Tp::ContactPtr getContactFromAddress(QString address);
+ void addOutgoingChannel(const Tp::ContactPtr &contact);
+ void addOutgoingChannel(QString address);
+ TpSessionChannel *getChannelFromPeerAddress(QString id);
+signals:
+ void accountReady(TpSessionAccount *);
+ void channelReady(TpSessionAccount *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+
+private slots:
+ void onReady(Tp::PendingOperation *op);
+ void onOutgoingChannelReady(TpSessionChannel *ch);
+ void onContactsConnectionReady(Tp::PendingOperation *op);
+ void onNewContactRetrieved(Tp::PendingOperation *op);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
+ void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
+ void onNewChannels(const Tp::ChannelDetailsList&);
+public:
+ bool ready;
+ QString reqContact;
+ QString reqMessage;
+ Tp::AccountPtr mAcc;
+ Tp::Account *acc;
+ Tp::ConnectionPtr contactsConn;
+ QSet<Tp::ContactPtr> myContacts;
+ QSet<TpSessionChannel *> myChannels;
+};
+
+#endif // TPSESSIONACCOUNT_H
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSIONCHANNEL_H
+#define TPSESSIONCHANNEL_H
+
+#include <QObject>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Message>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ContactManager>
+#include <TelepathyQt4/Connection>
+
+class TpSessionChannel : public QObject
+{
+ Q_OBJECT
+public:
+ TpSessionChannel(Tp::TextChannelPtr);
+ TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
+ void sendMessage(QString message);
+ QString peerId();
+signals:
+ void channelReady(TpSessionChannel *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
+ void messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
+public slots:
+ void onChannelCreated(Tp::PendingOperation *op);
+ void onChannelReady(Tp::PendingOperation *op);
+ void onMessageReceived(const Tp::ReceivedMessage &);
+ void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
+public:
+ Tp::ContactPtr peerContact;
+ Tp::TextChannelPtr channel;
+};
+
+#endif // TPSESSIONCHANNEL_H
--- /dev/null
+#ifndef TPSESSIONOBSERVER_H
+#define TPSESSIONOBSERVER_H
+
+#include <QObject>
+#include <TelepathyQt4/AbstractClientObserver>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Channel>
+
+class TpSession;
+
+class TpSessionObserver : public QObject , public Tp::AbstractClientObserver
+{
+ Q_OBJECT
+public:
+ TpSessionObserver(const Tp::ChannelClassList &channelfilter,TpSession *session);
+ TpSession *tpSession;
+
+
+ /*!
+ * \brief Realisation of Tp::AbstractClientObserver
+ */
+ virtual void observeChannels(const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ConnectionPtr &connection,
+ const QList<Tp::ChannelPtr> &channels,
+ const Tp::ChannelDispatchOperationPtr &dispatchOperation,
+ const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
+ const QVariantMap &observerInfo);
+};
+
+#endif // TPSESSIONOBSERVER_H
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: TpSesion
+Description: Qt4 Telepalhy-Qt4 easy to use adaptation library
+Version: 0.1
+Requires.private: QtCore >= 4.5, QtDBus >= 4.5
+Libs: -L${libdir} -ltpsession
+Cflags: -I${includedir}/telepathy-1.0/tpsession
--- /dev/null
+# Automatically added by dh_makeshlibs
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
+# End automatically added section
--- /dev/null
+# Automatically added by dh_makeshlibs
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
+# End automatically added section
--- /dev/null
+shlibs:Depends=libc6 (>= 2.5.0-1), libdbus-1-3 (>= 1.1.4), libdbus-glib-1-2 (>= 0.76), libgcc1 (>= 1:4.2.1), libgconf2-6 (>= 2.13.5), libglib2.0-0 (>= 2.20.0), libqt4-maemo5-core (>= 4.6.1~git20100122), libqt4-maemo5-dbus (>= 4.6.1~git20100122), libqt4-maemo5-network (>= 4.6.1~git20100122), libqt4-maemo5-xml (>= 4.6.1~git20100122), libstdc++6 (>= 4.2.1)
--- /dev/null
+#############################################################################
+# Makefile for building: tests
+# Generated by qmake (2.01a) (Qt 4.6.1) on: Mon Feb 8 23:30:52 2010
+# Project: tests.pro
+# Template: subdirs
+# Command: /opt/qt4-maemo5/bin/qmake -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tests.pro
+#############################################################################
+
+first: make_default
+MAKEFILE = Makefile
+QMAKE = /opt/qt4-maemo5/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+INSTALL_FILE = install -m 644 -p
+INSTALL_PROGRAM = install -m 755 -p
+INSTALL_DIR = $(COPY_DIR)
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+SUBTARGETS = \
+ sub-smstest \
+ sub-syncsms \
+ sub-showaccounts
+
+smstest/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) smstest/ || $(MKDIR) smstest/
+ cd smstest/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/smstest/smstest.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-smstest-qmake_all: FORCE
+ @$(CHK_DIR_EXISTS) smstest/ || $(MKDIR) smstest/
+ cd smstest/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/smstest/smstest.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-smstest: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE)
+sub-smstest-make_default: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE)
+sub-smstest-make_first: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE) first
+sub-smstest-all: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE) all
+sub-smstest-clean: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE) clean
+sub-smstest-distclean: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE) distclean
+sub-smstest-install_subtargets: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE) install
+sub-smstest-uninstall_subtargets: smstest/$(MAKEFILE) FORCE
+ cd smstest/ && $(MAKE) -f $(MAKEFILE) uninstall
+syncsms/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) syncsms/ || $(MKDIR) syncsms/
+ cd syncsms/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/syncsms/syncsms.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-syncsms-qmake_all: FORCE
+ @$(CHK_DIR_EXISTS) syncsms/ || $(MKDIR) syncsms/
+ cd syncsms/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/syncsms/syncsms.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-syncsms: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE)
+sub-syncsms-make_default: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE)
+sub-syncsms-make_first: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE) first
+sub-syncsms-all: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE) all
+sub-syncsms-clean: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE) clean
+sub-syncsms-distclean: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE) distclean
+sub-syncsms-install_subtargets: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE) install
+sub-syncsms-uninstall_subtargets: syncsms/$(MAKEFILE) FORCE
+ cd syncsms/ && $(MAKE) -f $(MAKEFILE) uninstall
+showaccounts/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) showaccounts/ || $(MKDIR) showaccounts/
+ cd showaccounts/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/showaccounts/showaccounts.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-showaccounts-qmake_all: FORCE
+ @$(CHK_DIR_EXISTS) showaccounts/ || $(MKDIR) showaccounts/
+ cd showaccounts/ && $(QMAKE) /home/kathy/sb/fremantle/tpsession-0.1/tests/showaccounts/showaccounts.pro -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o $(MAKEFILE)
+sub-showaccounts: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE)
+sub-showaccounts-make_default: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE)
+sub-showaccounts-make_first: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE) first
+sub-showaccounts-all: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE) all
+sub-showaccounts-clean: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE) clean
+sub-showaccounts-distclean: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE) distclean
+sub-showaccounts-install_subtargets: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE) install
+sub-showaccounts-uninstall_subtargets: showaccounts/$(MAKEFILE) FORCE
+ cd showaccounts/ && $(MAKE) -f $(MAKEFILE) uninstall
+
+Makefile: tests.pro /opt/qt4-maemo5/mkspecs/linux-g++-maemo5/qmake.conf /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf
+ $(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tests.pro
+/opt/qt4-maemo5/mkspecs/common/unix.conf:
+/opt/qt4-maemo5/mkspecs/common/linux.conf:
+/opt/qt4-maemo5/mkspecs/qconfig.pri:
+/opt/qt4-maemo5/mkspecs/features/qt_functions.prf:
+/opt/qt4-maemo5/mkspecs/features/qt_config.prf:
+/opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf:
+/opt/qt4-maemo5/mkspecs/features/default_pre.prf:
+/opt/qt4-maemo5/mkspecs/features/release.prf:
+/opt/qt4-maemo5/mkspecs/features/default_post.prf:
+/opt/qt4-maemo5/mkspecs/features/warn_on.prf:
+/opt/qt4-maemo5/mkspecs/features/qt.prf:
+/opt/qt4-maemo5/mkspecs/features/unix/thread.prf:
+/opt/qt4-maemo5/mkspecs/features/moc.prf:
+/opt/qt4-maemo5/mkspecs/features/resources.prf:
+/opt/qt4-maemo5/mkspecs/features/uic.prf:
+/opt/qt4-maemo5/mkspecs/features/yacc.prf:
+/opt/qt4-maemo5/mkspecs/features/lex.prf:
+/opt/qt4-maemo5/mkspecs/features/include_source_dir.prf:
+qmake: qmake_all FORCE
+ @$(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tests.pro
+
+qmake_all: sub-smstest-qmake_all sub-syncsms-qmake_all sub-showaccounts-qmake_all FORCE
+
+make_default: sub-smstest-make_default sub-syncsms-make_default sub-showaccounts-make_default FORCE
+make_first: sub-smstest-make_first sub-syncsms-make_first sub-showaccounts-make_first FORCE
+all: sub-smstest-all sub-syncsms-all sub-showaccounts-all FORCE
+clean: sub-smstest-clean sub-syncsms-clean sub-showaccounts-clean FORCE
+distclean: sub-smstest-distclean sub-syncsms-distclean sub-showaccounts-distclean FORCE
+ -$(DEL_FILE) Makefile
+install_subtargets: sub-smstest-install_subtargets sub-syncsms-install_subtargets sub-showaccounts-install_subtargets FORCE
+uninstall_subtargets: sub-smstest-uninstall_subtargets sub-syncsms-uninstall_subtargets sub-showaccounts-uninstall_subtargets FORCE
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+install: install_subtargets FORCE
+
+uninstall: uninstall_subtargets FORCE
+
+FORCE:
+
--- /dev/null
+#############################################################################
+# Makefile for building: showaccounts
+# Generated by qmake (2.01a) (Qt 4.6.1) on: Mon Feb 8 23:30:56 2010
+# Project: showaccounts.pro
+# Template: app
+# Command: /opt/qt4-maemo5/bin/qmake -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile showaccounts.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = cc
+CXX = g++
+DEFINES = -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include -I/usr/include/telepathy-1.0 -I../../tpsession -I.
+LINK = g++
+LFLAGS = -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/opt/qt4-maemo5/lib
+LIBS = $(SUBLIBS) -L/opt/qt4-maemo5/lib -ltelepathy-qt4 -ltpsession -L/opt/qt4-maemo5/lib -lQtNetwork -lgconf-2 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lQtDBus -lQtXml -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /opt/qt4-maemo5/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp moc_testprog.cpp
+OBJECTS = main.o \
+ testprog.o \
+ moc_testprog.o
+DIST = /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ showaccounts.pro
+QMAKE_TARGET = showaccounts
+DESTDIR =
+TARGET = showaccounts
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: showaccounts.pro /opt/qt4-maemo5/mkspecs/linux-g++-maemo5/qmake.conf /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ /opt/qt4-maemo5/lib/libQtDBus.prl \
+ /opt/qt4-maemo5/lib/libQtXml.prl \
+ /opt/qt4-maemo5/lib/libQtCore.prl \
+ /opt/qt4-maemo5/lib/libQtNetwork.prl
+ $(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile showaccounts.pro
+/opt/qt4-maemo5/mkspecs/common/unix.conf:
+/opt/qt4-maemo5/mkspecs/common/linux.conf:
+/opt/qt4-maemo5/mkspecs/qconfig.pri:
+/opt/qt4-maemo5/mkspecs/features/qt_functions.prf:
+/opt/qt4-maemo5/mkspecs/features/qt_config.prf:
+/opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf:
+/opt/qt4-maemo5/mkspecs/features/default_pre.prf:
+/opt/qt4-maemo5/mkspecs/features/release.prf:
+/opt/qt4-maemo5/mkspecs/features/default_post.prf:
+/opt/qt4-maemo5/mkspecs/features/warn_on.prf:
+/opt/qt4-maemo5/mkspecs/features/qt.prf:
+/opt/qt4-maemo5/mkspecs/features/moc.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf:
+/opt/qt4-maemo5/mkspecs/features/unix/thread.prf:
+/opt/qt4-maemo5/mkspecs/features/resources.prf:
+/opt/qt4-maemo5/mkspecs/features/uic.prf:
+/opt/qt4-maemo5/mkspecs/features/yacc.prf:
+/opt/qt4-maemo5/mkspecs/features/lex.prf:
+/opt/qt4-maemo5/mkspecs/features/include_source_dir.prf:
+/opt/qt4-maemo5/lib/libQtDBus.prl:
+/opt/qt4-maemo5/lib/libQtXml.prl:
+/opt/qt4-maemo5/lib/libQtCore.prl:
+/opt/qt4-maemo5/lib/libQtNetwork.prl:
+qmake: FORCE
+ @$(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile showaccounts.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/showaccounts1.0.0 || $(MKDIR) .tmp/showaccounts1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/showaccounts1.0.0/ && $(COPY_FILE) --parents testprog.h .tmp/showaccounts1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp .tmp/showaccounts1.0.0/ && (cd `dirname .tmp/showaccounts1.0.0` && $(TAR) showaccounts1.0.0.tar showaccounts1.0.0 && $(COMPRESS) showaccounts1.0.0.tar) && $(MOVE) `dirname .tmp/showaccounts1.0.0`/showaccounts1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/showaccounts1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_testprog.cpp
+moc_testprog.cpp: testprog.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) testprog.h -o moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+main.o: main.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o testprog.o testprog.cpp
+
+moc_testprog.o: moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_testprog.o moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#include <QtCore/QCoreApplication>
+#include "testprog.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+
+ TestProg t;
+
+ return a.exec();
+}
--- /dev/null
+# -------------------------------------------------
+# Project created by QtCreator 2010-01-25T14:58:18
+# -------------------------------------------------
+QT += network \
+ dbus
+QT -= gui
+INCLUDEPATH += /usr/include/telepathy-1.0/ ../../tpsession
+LIBS += -ltelepathy-qt4 -ltpsession
+TARGET = showaccounts
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ testprog.cpp
+HEADERS += testprog.h
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-CommandLineArguments</variable>
+ <valuelist type="QVariantList" />
+ </data>
+ <data>
+ <variable>RunConfiguration0-ProFile</variable>
+ <value type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/showaccounts/showaccounts.pro</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString" >showaccounts</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetName</variable>
+ <value type="bool" >false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString" >Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int" >0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString" >Debug</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Debug</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="QtVersionId" type="int" >2</value>
+ <value key="buildDirectory" type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/showaccounts</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="buildConfiguration" type="int" >2</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >Debug</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="mkspec" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.gdbmaros</value>
+ <value type="QString" >trolltech.qt4projectmanager.qmake</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.gdbmaros</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray" >System</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap" />
+ </data>
+</qtcreator>
--- /dev/null
+#include "testprog.h"
+#include <TelepathyQt4/Message>
+
+TestProg::TestProg()
+{
+ qDebug() << __PRETTY_FUNCTION__ ;
+ tps =new TpSession("ring",true);
+ foreach (TpSessionAccount *tpacc, tps->accounts) {
+ qDebug() << "ConnectionManager" << tpacc->acc->cmName() << "protocol " << tpacc->acc->protocol() << "uniqueIdentifier" << tpacc->acc->uniqueIdentifier()
+ << "Connection=" << (tpacc->acc->haveConnection()? ( tpacc->acc->connection()->isReady() ? "Ready":"notReady"):"noConnection");
+ qDebug() << "normalizedName" << tpacc->acc->normalizedName() << "nickname " << tpacc->acc->nickname() << "DisplayName" << tpacc->acc->displayName();
+ qDebug() << "icon" << tpacc->acc->icon() << "validAccount " << tpacc->acc->isValidAccount() << "Enabled" << tpacc->acc->isEnabled();
+ qDebug() << "parameters" << tpacc->acc->parameters();
+ }
+
+}
+
--- /dev/null
+#ifndef TESTPROG_H
+#define TESTPROG_H
+
+#include <QObject>
+#include <QDebug>
+#include "tpsession.h"
+#include "tpsessionaccount.h"
+
+
+class TestProg : public QObject
+{
+ Q_OBJECT
+public:
+ TestProg();
+private:
+ TpSession* tps;
+};
+
+#endif // TESTPROG_H
--- /dev/null
+#############################################################################
+# Makefile for building: smstest
+# Generated by qmake (2.01a) (Qt 4.6.1) on: Mon Feb 8 23:30:52 2010
+# Project: smstest.pro
+# Template: app
+# Command: /opt/qt4-maemo5/bin/qmake -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile smstest.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = cc
+CXX = g++
+DEFINES = -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include -I/usr/include/telepathy-1.0 -I../../tpsession -I.
+LINK = g++
+LFLAGS = -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/opt/qt4-maemo5/lib
+LIBS = $(SUBLIBS) -L/opt/qt4-maemo5/lib -ltelepathy-qt4 -L../../tpsession -ltpsession -L/opt/qt4-maemo5/lib -lQtNetwork -lgconf-2 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lQtDBus -lQtXml -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /opt/qt4-maemo5/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp moc_testprog.cpp
+OBJECTS = main.o \
+ testprog.o \
+ moc_testprog.o
+DIST = /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ smstest.pro
+QMAKE_TARGET = smstest
+DESTDIR =
+TARGET = smstest
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: smstest.pro /opt/qt4-maemo5/mkspecs/linux-g++-maemo5/qmake.conf /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ /opt/qt4-maemo5/lib/libQtDBus.prl \
+ /opt/qt4-maemo5/lib/libQtXml.prl \
+ /opt/qt4-maemo5/lib/libQtCore.prl \
+ /opt/qt4-maemo5/lib/libQtNetwork.prl
+ $(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile smstest.pro
+/opt/qt4-maemo5/mkspecs/common/unix.conf:
+/opt/qt4-maemo5/mkspecs/common/linux.conf:
+/opt/qt4-maemo5/mkspecs/qconfig.pri:
+/opt/qt4-maemo5/mkspecs/features/qt_functions.prf:
+/opt/qt4-maemo5/mkspecs/features/qt_config.prf:
+/opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf:
+/opt/qt4-maemo5/mkspecs/features/default_pre.prf:
+/opt/qt4-maemo5/mkspecs/features/release.prf:
+/opt/qt4-maemo5/mkspecs/features/default_post.prf:
+/opt/qt4-maemo5/mkspecs/features/warn_on.prf:
+/opt/qt4-maemo5/mkspecs/features/qt.prf:
+/opt/qt4-maemo5/mkspecs/features/moc.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf:
+/opt/qt4-maemo5/mkspecs/features/unix/thread.prf:
+/opt/qt4-maemo5/mkspecs/features/resources.prf:
+/opt/qt4-maemo5/mkspecs/features/uic.prf:
+/opt/qt4-maemo5/mkspecs/features/yacc.prf:
+/opt/qt4-maemo5/mkspecs/features/lex.prf:
+/opt/qt4-maemo5/mkspecs/features/include_source_dir.prf:
+/opt/qt4-maemo5/lib/libQtDBus.prl:
+/opt/qt4-maemo5/lib/libQtXml.prl:
+/opt/qt4-maemo5/lib/libQtCore.prl:
+/opt/qt4-maemo5/lib/libQtNetwork.prl:
+qmake: FORCE
+ @$(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile smstest.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/smstest1.0.0 || $(MKDIR) .tmp/smstest1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/smstest1.0.0/ && $(COPY_FILE) --parents testprog.h .tmp/smstest1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp .tmp/smstest1.0.0/ && (cd `dirname .tmp/smstest1.0.0` && $(TAR) smstest1.0.0.tar smstest1.0.0 && $(COMPRESS) smstest1.0.0.tar) && $(MOVE) `dirname .tmp/smstest1.0.0`/smstest1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/smstest1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_testprog.cpp
+moc_testprog.cpp: testprog.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) testprog.h -o moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+main.o: main.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o testprog.o testprog.cpp
+
+moc_testprog.o: moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_testprog.o moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#############################################################################
+# Makefile for building: smstest
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:55 2010
+# Project: smstest.pro
+# Template: app
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -gdwarf-2 -Wall -W $(DEFINES)
+CXXFLAGS = -pipe -g -gdwarf-2 -Wall -W $(DEFINES)
+INCPATH = -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtDBus.framework/Versions/4/Headers -I/usr/include/QtDBus -I/usr/include -I/usr/include/telepathy-1.0/ -I../../tpsession -Idebug -I. -F/Library/Frameworks
+LINK = g++
+LFLAGS = -headerpad_max_install_names
+LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -ltelepathy-qt4 -L../../tpsession -ltpsession -framework QtDBus -framework QtXml -framework QtNetwork -framework SystemConfiguration -framework QtCore -lz -lm -framework ApplicationServices
+AR = ar cq
+RANLIB = ranlib -s
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = $(COPY_FILE)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
+####### Output directory
+
+OBJECTS_DIR = debug/
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp debug/moc_testprog.cpp
+OBJECTS = debug/main.o \
+ debug/testprog.o \
+ debug/moc_testprog.o
+DIST = /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/dwarf2.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/build_pass.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusinterfaces.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusadaptors.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ smstest.pro
+QMAKE_TARGET = smstest
+DESTDIR =
+TARGET = smstest
+
+####### Custom Compiler Variables
+QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
+ -g \
+ -gdwarf-2 \
+ -Wall \
+ -W
+
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Debug $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+qmake: FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile.Debug smstest.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) debug/smstest1.0.0 || $(MKDIR) debug/smstest1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/smstest1.0.0/ && $(COPY_FILE) --parents testprog.h debug/smstest1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp debug/smstest1.0.0/ && (cd `dirname debug/smstest1.0.0` && $(TAR) smstest1.0.0.tar smstest1.0.0 && $(COMPRESS) smstest1.0.0.tar) && $(MOVE) `dirname debug/smstest1.0.0`/smstest1.0.0.tar.gz . && $(DEL_FILE) -r debug/smstest1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile.Debug
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_objective_c_make_all:
+compiler_objective_c_clean:
+compiler_moc_header_make_all: debug/moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) debug/moc_testprog.cpp
+debug/moc_testprog.cpp: testprog.h
+ /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ testprog.h -o debug/moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_rez_source_make_all:
+compiler_rez_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+debug/main.o: main.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/main.o main.cpp
+
+debug/testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/testprog.o testprog.cpp
+
+debug/moc_testprog.o: debug/moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_testprog.o debug/moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#############################################################################
+# Makefile for building: smstest
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:55 2010
+# Project: smstest.pro
+# Template: app
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -Os -Wall -W $(DEFINES)
+CXXFLAGS = -pipe -Os -Wall -W $(DEFINES)
+INCPATH = -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtDBus.framework/Versions/4/Headers -I/usr/include/QtDBus -I/usr/include -I/usr/include/telepathy-1.0/ -I../../tpsession -Irelease -I. -F/Library/Frameworks
+LINK = g++
+LFLAGS = -headerpad_max_install_names
+LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -ltelepathy-qt4 -L../../tpsession -ltpsession -framework QtDBus -framework QtXml -framework QtNetwork -framework SystemConfiguration -framework QtCore -lz -lm -framework ApplicationServices
+AR = ar cq
+RANLIB = ranlib -s
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = $(COPY_FILE)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
+####### Output directory
+
+OBJECTS_DIR = release/
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp release/moc_testprog.cpp
+OBJECTS = release/main.o \
+ release/testprog.o \
+ release/moc_testprog.o
+DIST = /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/release.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/build_pass.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusinterfaces.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusadaptors.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ smstest.pro
+QMAKE_TARGET = smstest
+DESTDIR =
+TARGET = smstest
+
+####### Custom Compiler Variables
+QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
+ -Os \
+ -Wall \
+ -W
+
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Release $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+qmake: FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile.Release smstest.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) release/smstest1.0.0 || $(MKDIR) release/smstest1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) release/smstest1.0.0/ && $(COPY_FILE) --parents testprog.h release/smstest1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp release/smstest1.0.0/ && (cd `dirname release/smstest1.0.0` && $(TAR) smstest1.0.0.tar smstest1.0.0 && $(COMPRESS) smstest1.0.0.tar) && $(MOVE) `dirname release/smstest1.0.0`/smstest1.0.0.tar.gz . && $(DEL_FILE) -r release/smstest1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile.Release
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_objective_c_make_all:
+compiler_objective_c_clean:
+compiler_moc_header_make_all: release/moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) release/moc_testprog.cpp
+release/moc_testprog.cpp: testprog.h
+ /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ testprog.h -o release/moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_rez_source_make_all:
+compiler_rez_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+release/main.o: main.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/main.o main.cpp
+
+release/testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/testprog.o testprog.cpp
+
+release/moc_testprog.o: release/moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_testprog.o release/moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#include <QtCore/QCoreApplication>
+#include "testprog.h"
+#include <QDebug>
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+
+ if(argc<2) {
+ qDebug() << "Usage smstest <telephone_number> <message>";
+ exit(0);
+ };
+
+ TestProg t(argv[1],argv[2]);
+
+ return a.exec();
+}
--- /dev/null
+Nokia Qt LGPL Exception version 1.0
+
+As a special exception to the GNU Lesser General Public License version 2.1, the object code form of a "work that uses the Library" may incorporate material from a header file that is part of the Library. You may distribute such object code under terms of your choice, provided that the incorporated material (i) does not exceed more than 5% of the total size of the Library; and (ii) is limited to numerical parameters, data structure layouts, accessors, macros, inline functions and templates.
\ No newline at end of file
--- /dev/null
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 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.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+\f
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library 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.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+\f
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public 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.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
--- /dev/null
+#############################################################################
+# Makefile for building: libgdbmacros.1.0.0.dylib
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:35 2010
+# Project: gdbmacros.pro
+# Template: lib
+# Command: /usr/bin/qmake -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile gdbmacros.pro
+#############################################################################
+
+first: debug
+install: debug-install
+uninstall: debug-uninstall
+MAKEFILE = Makefile
+QMAKE = /usr/bin/qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+COPY = cp -f
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_PROGRAM = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+SUBTARGETS = \
+ debug \
+ release
+
+debug: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug
+debug-make_default: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug
+debug-make_first: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug first
+debug-all: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug all
+debug-clean: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug clean
+debug-distclean: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug distclean
+debug-install: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug install
+debug-uninstall: $(MAKEFILE).Debug FORCE
+ $(MAKE) -f $(MAKEFILE).Debug uninstall
+release: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release
+release-make_default: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release
+release-make_first: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release first
+release-all: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release all
+release-clean: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release clean
+release-distclean: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release distclean
+release-install: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release install
+release-uninstall: $(MAKEFILE).Release FORCE
+ $(MAKE) -f $(MAKEFILE).Release uninstall
+
+Makefile: gdbmacros.pro /usr/local/Qt4.5/mkspecs/macx-g++/qmake.conf /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/dwarf2.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/shared.prf \
+ /usr/local/Qt4.5/mkspecs/features/dll.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ /Library/Frameworks/QtGui.framework/QtGui.prl \
+ /Library/Frameworks/QtCore.framework/QtCore.prl
+ $(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile gdbmacros.pro
+/usr/local/Qt4.5/mkspecs/common/unix.conf:
+/usr/local/Qt4.5/mkspecs/common/mac.conf:
+/usr/local/Qt4.5/mkspecs/common/mac-g++.conf:
+/usr/local/Qt4.5/mkspecs/qconfig.pri:
+/usr/local/Qt4.5/mkspecs/features/qt_functions.prf:
+/usr/local/Qt4.5/mkspecs/features/qt_config.prf:
+/usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf:
+/usr/local/Qt4.5/mkspecs/features/default_pre.prf:
+/usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf:
+/usr/local/Qt4.5/mkspecs/features/mac/dwarf2.prf:
+/usr/local/Qt4.5/mkspecs/features/debug.prf:
+/usr/local/Qt4.5/mkspecs/features/debug_and_release.prf:
+/usr/local/Qt4.5/mkspecs/features/default_post.prf:
+/usr/local/Qt4.5/mkspecs/features/mac/default_post.prf:
+/usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf:
+/usr/local/Qt4.5/mkspecs/features/shared.prf:
+/usr/local/Qt4.5/mkspecs/features/dll.prf:
+/usr/local/Qt4.5/mkspecs/features/warn_on.prf:
+/usr/local/Qt4.5/mkspecs/features/qt.prf:
+/usr/local/Qt4.5/mkspecs/features/unix/thread.prf:
+/usr/local/Qt4.5/mkspecs/features/moc.prf:
+/usr/local/Qt4.5/mkspecs/features/mac/rez.prf:
+/usr/local/Qt4.5/mkspecs/features/mac/sdk.prf:
+/usr/local/Qt4.5/mkspecs/features/resources.prf:
+/usr/local/Qt4.5/mkspecs/features/uic.prf:
+/usr/local/Qt4.5/mkspecs/features/yacc.prf:
+/usr/local/Qt4.5/mkspecs/features/lex.prf:
+/Library/Frameworks/QtGui.framework/QtGui.prl:
+/Library/Frameworks/QtCore.framework/QtCore.prl:
+qmake: qmake_all FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile gdbmacros.pro
+
+qmake_all: FORCE
+
+make_default: debug-make_default release-make_default FORCE
+make_first: debug-make_first release-make_first FORCE
+all: debug-all release-all FORCE
+clean: debug-clean release-clean FORCE
+distclean: debug-distclean release-distclean FORCE
+ -$(DEL_FILE) Makefile
+
+debug-mocclean: $(MAKEFILE).Debug
+ $(MAKE) -f $(MAKEFILE).Debug mocclean
+release-mocclean: $(MAKEFILE).Release
+ $(MAKE) -f $(MAKEFILE).Release mocclean
+mocclean: debug-mocclean release-mocclean
+
+debug-mocables: $(MAKEFILE).Debug
+ $(MAKE) -f $(MAKEFILE).Debug mocables
+release-mocables: $(MAKEFILE).Release
+ $(MAKE) -f $(MAKEFILE).Release mocables
+mocables: debug-mocables release-mocables
+FORCE:
+
+$(MAKEFILE).Debug: Makefile
+$(MAKEFILE).Release: Makefile
--- /dev/null
+#############################################################################
+# Makefile for building: libgdbmacros.1.0.0.dylib
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:35 2010
+# Project: gdbmacros.pro
+# Template: lib
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -gdwarf-2 -Wall -W -fPIC $(DEFINES)
+CXXFLAGS = -pipe -g -gdwarf-2 -Wall -W -fPIC $(DEFINES)
+INCPATH = -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -Idebug -I. -F/Library/Frameworks
+LINK = g++
+LFLAGS = -headerpad_max_install_names -single_module -dynamiclib -compatibility_version 1.0 -current_version 1.0.0 -install_name libgdbmacros.1.dylib
+LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework Carbon -framework AppKit -framework QtCore -lz -lm -framework ApplicationServices
+AR = ar cq
+RANLIB = ranlib -s
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = $(COPY_FILE)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
+####### Output directory
+
+OBJECTS_DIR = debug/
+
+####### Files
+
+SOURCES = gdbmacros.cpp
+OBJECTS = debug/gdbmacros.o
+DIST = /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/dwarf2.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/build_pass.prf \
+ /usr/local/Qt4.5/mkspecs/features/shared.prf \
+ /usr/local/Qt4.5/mkspecs/features/dll.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ gdbmacros.pro
+QMAKE_TARGET = gdbmacros
+DESTDIR =
+TARGET = libgdbmacros.1.0.0.dylib
+TARGETA = libgdbmacros.a
+TARGETD = libgdbmacros.1.0.0.dylib
+TARGET0 = libgdbmacros.dylib
+TARGET1 = libgdbmacros.1.dylib
+TARGET2 = libgdbmacros.1.0.dylib
+
+####### Custom Compiler Variables
+QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
+ -g \
+ -gdwarf-2 \
+ -Wall \
+ -W
+
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Debug $(TARGET)
+
+$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
+ -ln -s $(TARGET) $(TARGET0)
+ -ln -s $(TARGET) $(TARGET1)
+ -ln -s $(TARGET) $(TARGET2)
+
+
+
+staticlib: $(TARGETA)
+
+$(TARGETA): $(OBJECTS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGETA)
+ $(AR) $(TARGETA) $(OBJECTS)
+ $(RANLIB) $(TARGETA)
+
+qmake: FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile.Debug gdbmacros.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) debug/gdbmacros1.0.0 || $(MKDIR) debug/gdbmacros1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/gdbmacros1.0.0/ && $(COPY_FILE) --parents gdbmacros.cpp debug/gdbmacros1.0.0/ && (cd `dirname debug/gdbmacros1.0.0` && $(TAR) gdbmacros1.0.0.tar gdbmacros1.0.0 && $(COMPRESS) gdbmacros1.0.0.tar) && $(MOVE) `dirname debug/gdbmacros1.0.0`/gdbmacros1.0.0.tar.gz . && $(DEL_FILE) -r debug/gdbmacros1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA)
+ -$(DEL_FILE) Makefile.Debug
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_objective_c_make_all:
+compiler_objective_c_clean:
+compiler_moc_header_make_all:
+compiler_moc_header_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_rez_source_make_all:
+compiler_rez_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean:
+
+####### Compile
+
+debug/gdbmacros.o: gdbmacros.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/gdbmacros.o gdbmacros.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#############################################################################
+# Makefile for building: libgdbmacros.1.0.0.dylib
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:35 2010
+# Project: gdbmacros.pro
+# Template: lib
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -Os -Wall -W -fPIC $(DEFINES)
+CXXFLAGS = -pipe -Os -Wall -W -fPIC $(DEFINES)
+INCPATH = -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -Irelease -I. -F/Library/Frameworks
+LINK = g++
+LFLAGS = -headerpad_max_install_names -single_module -dynamiclib -compatibility_version 1.0 -current_version 1.0.0 -install_name libgdbmacros.1.dylib
+LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework Carbon -framework AppKit -framework QtCore -lz -lm -framework ApplicationServices
+AR = ar cq
+RANLIB = ranlib -s
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = $(COPY_FILE)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
+####### Output directory
+
+OBJECTS_DIR = release/
+
+####### Files
+
+SOURCES = gdbmacros.cpp
+OBJECTS = release/gdbmacros.o
+DIST = /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/release.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/build_pass.prf \
+ /usr/local/Qt4.5/mkspecs/features/shared.prf \
+ /usr/local/Qt4.5/mkspecs/features/dll.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ gdbmacros.pro
+QMAKE_TARGET = gdbmacros
+DESTDIR =
+TARGET = libgdbmacros.1.0.0.dylib
+TARGETA = libgdbmacros.a
+TARGETD = libgdbmacros.1.0.0.dylib
+TARGET0 = libgdbmacros.dylib
+TARGET1 = libgdbmacros.1.dylib
+TARGET2 = libgdbmacros.1.0.dylib
+
+####### Custom Compiler Variables
+QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
+ -Os \
+ -Wall \
+ -W
+
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Release $(TARGET)
+
+$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
+ -ln -s $(TARGET) $(TARGET0)
+ -ln -s $(TARGET) $(TARGET1)
+ -ln -s $(TARGET) $(TARGET2)
+
+
+
+staticlib: $(TARGETA)
+
+$(TARGETA): $(OBJECTS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGETA)
+ $(AR) $(TARGETA) $(OBJECTS)
+ $(RANLIB) $(TARGETA)
+
+qmake: FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile.Release gdbmacros.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) release/gdbmacros1.0.0 || $(MKDIR) release/gdbmacros1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) release/gdbmacros1.0.0/ && $(COPY_FILE) --parents gdbmacros.cpp release/gdbmacros1.0.0/ && (cd `dirname release/gdbmacros1.0.0` && $(TAR) gdbmacros1.0.0.tar gdbmacros1.0.0 && $(COMPRESS) gdbmacros1.0.0.tar) && $(MOVE) `dirname release/gdbmacros1.0.0`/gdbmacros1.0.0.tar.gz . && $(DEL_FILE) -r release/gdbmacros1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA)
+ -$(DEL_FILE) Makefile.Release
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_objective_c_make_all:
+compiler_objective_c_clean:
+compiler_moc_header_make_all:
+compiler_moc_header_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_rez_source_make_all:
+compiler_rez_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean:
+
+####### Compile
+
+release/gdbmacros.o: gdbmacros.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/gdbmacros.o gdbmacros.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+**
+**************************************************************************/
+
+#include <qglobal.h>
+
+// this relies on contents copied from qobject_p.h
+#define PRIVATE_OBJECT_ALLOWED 1
+
+#include <QtCore/QDateTime>
+#include <QtCore/QDebug>
+#include <QtCore/QDir>
+#include <QtCore/QFile>
+#include <QtCore/QFileInfo>
+#include <QtCore/QHash>
+#include <QtCore/QLinkedList>
+#include <QtCore/QLocale>
+#include <QtCore/QMap>
+#include <QtCore/QMetaObject>
+#include <QtCore/QMetaProperty>
+#include <QtCore/QModelIndex>
+#include <QtCore/QObject>
+#include <QtCore/QPointer>
+#include <QtCore/QString>
+#include <QtCore/QTextCodec>
+#include <QtCore/QVector>
+
+int qtGhVersion = QT_VERSION;
+
+#ifdef QT_GUI_LIB
+# include <QtGui/QPixmap>
+# include <QtGui/QImage>
+#endif
+
+#include <list>
+#include <map>
+#include <string>
+#include <vector>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <unistd.h>
+
+/*!
+ \class QDumper
+ \brief Helper class for producing "nice" output in Qt Creator's debugger.
+
+ \internal
+
+ The whole "custom dumper" implementation is currently far less modular
+ than it could be. But as the code is still in a flux, making it nicer
+ from a pure archtectural point of view seems still be a waste of resources.
+
+ Some hints:
+
+ New dumpers for non-templated classes should be mentioned in
+ \c{qDumpObjectData440()} in the \c{protocolVersion == 1} branch.
+
+ Templated classes need extra support on the IDE level
+ (see plugins/debugger/gdbengine.cpp) and should not be mentiond in
+ \c{qDumpObjectData440()}.
+
+ In any case, dumper processesing should end up in
+ \c{handleProtocolVersion2and3()} and needs an entry in the bis switch there.
+
+ Next step is to create a suitable \c{static void qDumpFoo(QDumper &d)}
+ function. At the bare minimum it should contain something like:
+
+
+ \c{
+ const Foo &foo = *reinterpret_cast<const Foo *>(d.data);
+
+ P(d, "value", ...);
+ P(d, "type", "Foo");
+ P(d, "numchild", "0");
+ }
+
+
+ 'P(d, name, value)' roughly expands to:
+ d << (name) << "=\"" << value << "\"";
+
+ Useful (i.e. understood by the IDE) names include:
+
+ \list
+ \o "name" shows up in the first column in the Locals&Watchers view.
+ \o "value" shows up in the second column.
+ \o "valueencoded" should be set to "1" if the value is base64 encoded.
+ Always base64-encode values that might use unprintable or otherwise
+ "confuse" the protocol (like spaces and quotes). [A-Za-z0-9] is "safe".
+ A value of "3" is used for base64-encoded UCS4, "2" denotes
+ base64-encoded UTF16.
+ \o "numchild" return the number of children in the view. Effectively, only
+ 0 and != 0 will be used, so don't try too hard to get the number right.
+ \endlist
+
+ If the current item has children, it might be queried to produce information
+ about thes children. In this case the dumper should use something like
+
+ \c{
+ if (d.dumpChildren) {
+ d << ",children=[";
+ }
+
+ */
+
+#undef NS
+#ifdef QT_NAMESPACE
+# define STRINGIFY0(s) #s
+# define STRINGIFY1(s) STRINGIFY0(s)
+# define NS STRINGIFY1(QT_NAMESPACE) "::"
+# define NSX "'" STRINGIFY1(QT_NAMESPACE) "::"
+# define NSY "'"
+#else
+# define NS ""
+# define NSX ""
+# define NSY ""
+#endif
+
+
+#if PRIVATE_OBJECT_ALLOWED
+
+#if defined(QT_BEGIN_NAMESPACE)
+QT_BEGIN_NAMESPACE
+#endif
+
+class QVariant;
+class QThreadData;
+class QObjectConnectionListVector;
+
+class QObjectPrivate : public QObjectData
+{
+ Q_DECLARE_PUBLIC(QObject)
+
+public:
+ QObjectPrivate() {}
+ virtual ~QObjectPrivate() {}
+
+ // preserve binary compatibility with code compiled without Qt 3 support
+ QList<QObject *> pendingChildInsertedEvents; // unused
+
+ // id of the thread that owns the object
+ QThreadData *threadData;
+
+ struct Sender
+ {
+ QObject *sender;
+ int signal;
+ int ref;
+ };
+
+ Sender *currentSender; // object currently activating the object
+ QObject *currentChildBeingDeleted;
+
+ QList<QPointer<QObject> > eventFilters;
+
+ struct ExtraData;
+ ExtraData *extraData;
+ mutable quint32 connectedSignals;
+
+ QString objectName;
+
+ struct Connection
+ {
+ QObject *receiver;
+ int method;
+ uint connectionType : 3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking
+ QBasicAtomicPointer<int> argumentTypes;
+ };
+ typedef QList<Connection> ConnectionList;
+
+ QObjectConnectionListVector *connectionLists;
+ QList<Sender> senders;
+ int *deleteWatch;
+};
+
+#if defined(QT_BEGIN_NAMESPACE)
+QT_END_NAMESPACE
+#endif
+
+#endif // PRIVATE_OBJECT_ALLOWED
+
+
+// this can be mangled typenames of nested templates, each char-by-char
+// comma-separated integer list
+static char qDumpInBuffer[10000];
+static char qDumpOutBuffer[100000];
+//static char qDumpSize[20];
+
+namespace {
+
+static bool isPointerType(const QByteArray &type)
+{
+ return type.endsWith("*") || type.endsWith("* const");
+}
+
+static QByteArray stripPointerType(QByteArray type)
+{
+ if (type.endsWith("*"))
+ type.chop(1);
+ if (type.endsWith("* const"))
+ type.chop(7);
+ if (type.endsWith(' '))
+ type.chop(1);
+ return type;
+}
+
+// This is used to abort evaluation of custom data dumpers in a "coordinated"
+// way. Abortion will happen anyway when we try to access a non-initialized
+// non-trivial object, so there is no way to prevent this from occuring at all
+// conceptionally. Gdb will catch SIGSEGV and return to the calling frame.
+// This is just fine provided we only _read_ memory in the custom handlers
+// below.
+
+volatile int qProvokeSegFaultHelper;
+
+static const void *addOffset(const void *p, int offset)
+{
+ return offset + reinterpret_cast<const char *>(p);
+}
+
+static const void *skipvtable(const void *p)
+{
+ return sizeof(void*) + reinterpret_cast<const char *>(p);
+}
+
+static const void *deref(const void *p)
+{
+ return *reinterpret_cast<const char* const*>(p);
+}
+
+static const void *dfunc(const void *p)
+{
+ return deref(skipvtable(p));
+}
+
+static bool isEqual(const char *s, const char *t)
+{
+ return qstrcmp(s, t) == 0;
+}
+
+static bool startsWith(const char *s, const char *t)
+{
+ return qstrncmp(s, t, strlen(t)) == 0;
+}
+
+// provoke segfault when address is not readable
+#define qCheckAccess(d) do { qProvokeSegFaultHelper = *(char*)d; } while (0)
+#define qCheckPointer(d) do { if (d) qProvokeSegFaultHelper = *(char*)d; } while (0)
+// provoke segfault unconditionally
+#define qCheck(b) do { if (!(b)) qProvokeSegFaultHelper = *(char*)0; } while (0)
+
+const char *stripNamespace(const char *type)
+{
+ static const size_t nslen = strlen(NS);
+ return startsWith(type, NS) ? type + nslen : type;
+}
+
+static bool isSimpleType(const char *type)
+{
+ switch (type[0]) {
+ case 'c':
+ return isEqual(type, "char");
+ case 'd':
+ return isEqual(type, "double");
+ case 'f':
+ return isEqual(type, "float");
+ case 'i':
+ return isEqual(type, "int");
+ case 'l':
+ return isEqual(type, "long") || startsWith(type, "long ");
+ case 's':
+ return isEqual(type, "short") || isEqual(type, "signed")
+ || startsWith(type, "signed ");
+ case 'u':
+ return isEqual(type, "unsigned") || startsWith(type, "unsigned ");
+ }
+ return false;
+}
+
+#if 0
+static bool isStringType(const char *type)
+{
+ return isEqual(type, NS"QString")
+ || isEqual(type, NS"QByteArray")
+ || isEqual(type, "std::string")
+ || isEqual(type, "std::wstring")
+ || isEqual(type, "wstring");
+}
+#endif
+
+static bool isMovableType(const char *type)
+{
+ if (isPointerType(type))
+ return true;
+
+ if (isSimpleType(type))
+ return true;
+
+ type = stripNamespace(type);
+
+ switch (type[1]) {
+ case 'B':
+ return isEqual(type, "QBrush")
+ || isEqual(type, "QBitArray")
+ || isEqual(type, "QByteArray") ;
+ case 'C':
+ return isEqual(type, "QCustomTypeInfo");
+ case 'D':
+ return isEqual(type, "QDate")
+ || isEqual(type, "QDateTime");
+ case 'F':
+ return isEqual(type, "QFileInfo")
+ || isEqual(type, "QFixed")
+ || isEqual(type, "QFixedPoint")
+ || isEqual(type, "QFixedSize");
+ case 'H':
+ return isEqual(type, "QHashDummyValue");
+ case 'I':
+ return isEqual(type, "QIcon")
+ || isEqual(type, "QImage");
+ case 'L':
+ return isEqual(type, "QLine")
+ || isEqual(type, "QLineF")
+ || isEqual(type, "QLocal");
+ case 'M':
+ return isEqual(type, "QMatrix")
+ || isEqual(type, "QModelIndex");
+ case 'P':
+ return isEqual(type, "QPoint")
+ || isEqual(type, "QPointF")
+ || isEqual(type, "QPen")
+ || isEqual(type, "QPersistentModelIndex");
+ case 'R':
+ return isEqual(type, "QResourceRoot")
+ || isEqual(type, "QRect")
+ || isEqual(type, "QRectF")
+ || isEqual(type, "QRegExp");
+ case 'S':
+ return isEqual(type, "QSize")
+ || isEqual(type, "QSizeF")
+ || isEqual(type, "QString");
+ case 'T':
+ return isEqual(type, "QTime")
+ || isEqual(type, "QTextBlock");
+ case 'U':
+ return isEqual(type, "QUrl");
+ case 'V':
+ return isEqual(type, "QVariant");
+ case 'X':
+ return isEqual(type, "QXmlStreamAttribute")
+ || isEqual(type, "QXmlStreamNamespaceDeclaration")
+ || isEqual(type, "QXmlStreamNotationDeclaration")
+ || isEqual(type, "QXmlStreamEntityDeclaration");
+ }
+ return false;
+}
+
+struct QDumper
+{
+ explicit QDumper();
+ ~QDumper();
+ void checkFill();
+ QDumper &operator<<(long c);
+ QDumper &operator<<(int i);
+ QDumper &operator<<(double d);
+ QDumper &operator<<(float d);
+ QDumper &operator<<(unsigned long c);
+ QDumper &operator<<(unsigned int i);
+ QDumper &operator<<(const void *p);
+ QDumper &operator<<(qulonglong c);
+ QDumper &operator<<(const char *str);
+ QDumper &operator<<(const QByteArray &ba);
+ QDumper &operator<<(const QString &str);
+ void put(char c);
+ void addCommaIfNeeded();
+ void putBase64Encoded(const char *buf, int n);
+ void putEllipsis();
+ void disarm();
+
+ void beginHash(); // start of data hash output
+ void endHash(); // start of data hash output
+
+ // the dumper arguments
+ int protocolVersion; // dumper protocol version
+ int token; // some token to show on success
+ const char *outertype; // object type
+ const char *iname; // object name used for display
+ const char *exp; // object expression
+ const char *innertype; // 'inner type' for class templates
+ const void *data; // pointer to raw data
+ bool dumpChildren; // do we want to see children?
+
+ // handling of nested templates
+ void setupTemplateParameters();
+ enum { maxTemplateParameters = 10 };
+ const char *templateParameters[maxTemplateParameters + 1];
+ int templateParametersCount;
+
+ // internal state
+ bool success; // are we finished?
+ bool full;
+ int pos;
+
+ int extraInt[4];
+};
+
+
+QDumper::QDumper()
+{
+ success = false;
+ full = false;
+ qDumpOutBuffer[0] = 'f'; // marks output as 'wrong'
+ pos = 1;
+}
+
+QDumper::~QDumper()
+{
+ qDumpOutBuffer[pos++] = '\0';
+ if (success)
+ qDumpOutBuffer[0] = (full ? '+' : 't');
+}
+
+void QDumper::setupTemplateParameters()
+{
+ char *s = const_cast<char *>(innertype);
+
+ templateParametersCount = 1;
+ templateParameters[0] = s;
+ for (int i = 1; i != maxTemplateParameters + 1; ++i)
+ templateParameters[i] = 0;
+
+ while (*s) {
+ while (*s && *s != '@')
+ ++s;
+ if (*s) {
+ *s = '\0';
+ ++s;
+ templateParameters[templateParametersCount++] = s;
+ }
+ }
+}
+
+QDumper &QDumper::operator<<(unsigned long long c)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%llu", c);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(unsigned long c)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%lu", c);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(float d)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%f", d);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(double d)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%f", d);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(unsigned int i)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%u", i);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(long c)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%ld", c);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(int i)
+{
+ checkFill();
+ pos += sprintf(qDumpOutBuffer + pos, "%d", i);
+ return *this;
+}
+
+QDumper &QDumper::operator<<(const void *p)
+{
+ static char buf[100];
+ if (p) {
+ sprintf(buf, "%p", p);
+ // we get a '0x' prefix only on some implementations.
+ // if it isn't there, write it out manually.
+ if (buf[1] != 'x') {
+ put('0');
+ put('x');
+ }
+ *this << buf;
+ } else {
+ *this << "<null>";
+ }
+ return *this;
+}
+
+void QDumper::checkFill()
+{
+ if (pos >= int(sizeof(qDumpOutBuffer)) - 100)
+ full = true;
+}
+
+void QDumper::put(char c)
+{
+ checkFill();
+ if (!full)
+ qDumpOutBuffer[pos++] = c;
+}
+
+void QDumper::addCommaIfNeeded()
+{
+ if (pos == 0)
+ return;
+ char c = qDumpOutBuffer[pos - 1];
+ if (c == '}' || c == '"' || c == ']')
+ put(',');
+}
+
+void QDumper::putBase64Encoded(const char *buf, int n)
+{
+ const char alphabet[] = "ABCDEFGH" "IJKLMNOP" "QRSTUVWX" "YZabcdef"
+ "ghijklmn" "opqrstuv" "wxyz0123" "456789+/";
+ const char padchar = '=';
+ int padlen = 0;
+
+ //int tmpsize = ((n * 4) / 3) + 3;
+
+ int i = 0;
+ while (i < n) {
+ int chunk = 0;
+ chunk |= int(uchar(buf[i++])) << 16;
+ if (i == n) {
+ padlen = 2;
+ } else {
+ chunk |= int(uchar(buf[i++])) << 8;
+ if (i == n)
+ padlen = 1;
+ else
+ chunk |= int(uchar(buf[i++]));
+ }
+
+ int j = (chunk & 0x00fc0000) >> 18;
+ int k = (chunk & 0x0003f000) >> 12;
+ int l = (chunk & 0x00000fc0) >> 6;
+ int m = (chunk & 0x0000003f);
+ put(alphabet[j]);
+ put(alphabet[k]);
+ put(padlen > 1 ? padchar : alphabet[l]);
+ put(padlen > 0 ? padchar : alphabet[m]);
+ }
+}
+
+QDumper &QDumper::operator<<(const char *str)
+{
+ if (!str)
+ return *this << "<null>";
+ while (*str)
+ put(*(str++));
+ return *this;
+}
+
+QDumper &QDumper::operator<<(const QByteArray &ba)
+{
+ putBase64Encoded(ba.constData(), ba.size());
+ return *this;
+}
+
+QDumper &QDumper::operator<<(const QString &str)
+{
+ QByteArray ba = str.toUtf8();
+ putBase64Encoded(ba.constData(), ba.size());
+ return *this;
+}
+
+void QDumper::disarm()
+{
+ success = true;
+}
+
+void QDumper::beginHash()
+{
+ addCommaIfNeeded();
+ put('{');
+}
+
+void QDumper::endHash()
+{
+ put('}');
+}
+
+void QDumper::putEllipsis()
+{
+ addCommaIfNeeded();
+ *this << "{name=\"<incomplete>\",value=\"\",type=\"" << innertype << "\"}";
+}
+
+//
+// Some helpers to keep the dumper code short
+//
+
+// dump property=value pair
+#undef P
+#define P(dumper,name,value) \
+ do { \
+ dumper.addCommaIfNeeded(); \
+ dumper << (name) << "=\"" << value << "\""; \
+ } while (0)
+
+// simple string property
+#undef S
+#define S(dumper, name, value) \
+ dumper.beginHash(); \
+ P(dumper, "name", name); \
+ P(dumper, "value", value); \
+ P(dumper, "type", NS"QString"); \
+ P(dumper, "numchild", "0"); \
+ P(dumper, "valueencoded", "1"); \
+ dumper.endHash();
+
+// simple integer property
+#undef I
+#define I(dumper, name, value) \
+ dumper.beginHash(); \
+ P(dumper, "name", name); \
+ P(dumper, "value", value); \
+ P(dumper, "type", "int"); \
+ P(dumper, "numchild", "0"); \
+ dumper.endHash();
+
+// simple boolean property
+#undef BL
+#define BL(dumper, name, value) \
+ dumper.beginHash(); \
+ P(dumper, "name", name); \
+ P(dumper, "value", (value ? "true" : "false")); \
+ P(dumper, "type", "bool"); \
+ P(dumper, "numchild", "0"); \
+ dumper.endHash();
+
+
+// a single QChar
+#undef QC
+#define QC(dumper, name, value) \
+ dumper.beginHash(); \
+ P(dumper, "name", name); \
+ P(dumper, "value", QString(QLatin1String("'%1' (%2, 0x%3)")) \
+ .arg(value).arg(value.unicode()).arg(value.unicode(), 0, 16)); \
+ P(dumper, "valueencoded", "1"); \
+ P(dumper, "type", NS"QChar"); \
+ P(dumper, "numchild", "0"); \
+ dumper.endHash();
+
+#undef TT
+#define TT(type, value) \
+ "<tr><td>" << type << "</td><td> : </td><td>" << value << "</td></tr>"
+
+static void qDumpUnknown(QDumper &d)
+{
+ P(d, "iname", d.iname);
+ P(d, "addr", d.data);
+ P(d, "value", "<internal error>");
+ P(d, "type", d.outertype);
+ P(d, "numchild", "0");
+ d.disarm();
+}
+
+static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr,
+ const char *field = "value")
+{
+ type = stripNamespace(type);
+ switch (type[1]) {
+ case 'l':
+ if (isEqual(type, "float"))
+ P(d, field, *(float*)addr);
+ return;
+ case 'n':
+ if (isEqual(type, "int"))
+ P(d, field, *(int*)addr);
+ else if (isEqual(type, "unsigned"))
+ P(d, field, *(unsigned int*)addr);
+ else if (isEqual(type, "unsigned int"))
+ P(d, field, *(unsigned int*)addr);
+ else if (isEqual(type, "unsigned long"))
+ P(d, field, *(unsigned long*)addr);
+ else if (isEqual(type, "unsigned long long"))
+ P(d, field, *(qulonglong*)addr);
+ return;
+ case 'o':
+ if (isEqual(type, "bool"))
+ switch (*(bool*)addr) {
+ case 0: P(d, field, "false"); break;
+ case 1: P(d, field, "true"); break;
+ default: P(d, field, *(bool*)addr); break;
+ }
+ else if (isEqual(type, "double"))
+ P(d, field, *(double*)addr);
+ else if (isEqual(type, "long"))
+ P(d, field, *(long*)addr);
+ else if (isEqual(type, "long long"))
+ P(d, field, *(qulonglong*)addr);
+ return;
+ case 'B':
+ if (isEqual(type, "QByteArray")) {
+ d.addCommaIfNeeded();
+ d << field << "encoded=\"1\",";
+ P(d, field, *(QByteArray*)addr);
+ }
+ return;
+ case 'L':
+ if (startsWith(type, "QList<")) {
+ const QListData *ldata = reinterpret_cast<const QListData*>(addr);
+ P(d, "value", "<" << ldata->size() << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", ldata->size());
+ }
+ return;
+ case 'O':
+ if (isEqual(type, "QObject *")) {
+ if (addr) {
+ const QObject *ob = reinterpret_cast<const QObject *>(addr);
+ P(d, "addr", ob);
+ P(d, "value", ob->objectName());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QObject");
+ P(d, "displayedtype", ob->metaObject()->className());
+ } else {
+ P(d, "value", "0x0");
+ P(d, "type", NS"QObject *");
+ }
+ }
+ return;
+ case 'S':
+ if (isEqual(type, "QString")) {
+ d.addCommaIfNeeded();
+ d << field << "encoded=\"1\",";
+ P(d, field, *(QString*)addr);
+ }
+ return;
+ default:
+ return;
+ }
+}
+
+static void qDumpInnerValue(QDumper &d, const char *type, const void *addr)
+{
+ P(d, "addr", addr);
+ P(d, "type", type);
+
+ if (!type[0])
+ return;
+
+ qDumpInnerValueHelper(d, type, addr);
+}
+
+
+static void qDumpInnerValueOrPointer(QDumper &d,
+ const char *type, const char *strippedtype, const void *addr)
+{
+ if (strippedtype) {
+ if (deref(addr)) {
+ P(d, "addr", deref(addr));
+ P(d, "type", strippedtype);
+ qDumpInnerValueHelper(d, strippedtype, deref(addr));
+ } else {
+ P(d, "addr", addr);
+ P(d, "type", strippedtype);
+ P(d, "value", "<null>");
+ P(d, "numchild", "0");
+ }
+ } else {
+ P(d, "addr", addr);
+ P(d, "type", type);
+ qDumpInnerValueHelper(d, type, addr);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static void qDumpQByteArray(QDumper &d)
+{
+ const QByteArray &ba = *reinterpret_cast<const QByteArray *>(d.data);
+
+ if (!ba.isEmpty()) {
+ qCheckAccess(ba.constData());
+ qCheckAccess(ba.constData() + ba.size());
+ }
+
+ if (ba.size() <= 100)
+ P(d, "value", ba);
+ else
+ P(d, "value", ba.left(100) << " <size: " << ba.size() << ", cut...>");
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QByteArray");
+ P(d, "numchild", ba.size());
+ P(d, "childtype", "char");
+ P(d, "childnumchild", "0");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ char buf[20];
+ for (int i = 0; i != ba.size(); ++i) {
+ unsigned char c = ba.at(i);
+ unsigned char u = (isprint(c) && c != '\'' && c != '"') ? c : '?';
+ sprintf(buf, "%02x (%u '%c')", c, c, u);
+ d.beginHash();
+ P(d, "name", i);
+ P(d, "value", buf);
+ d.endHash();
+ }
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQDateTime(QDumper &d)
+{
+#ifdef QT_NO_DATESTRING
+ qDumpUnknown(d);
+#else
+ const QDateTime &date = *reinterpret_cast<const QDateTime *>(d.data);
+ if (date.isNull()) {
+ P(d, "value", "(null)");
+ } else {
+ P(d, "value", date.toString());
+ P(d, "valueencoded", "1");
+ }
+ P(d, "type", NS"QDateTime");
+ P(d, "numchild", "3");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ BL(d, "isNull", date.isNull());
+ I(d, "toTime_t", (long)date.toTime_t());
+ S(d, "toString", date.toString());
+ S(d, "toString_(ISO)", date.toString(Qt::ISODate));
+ S(d, "toString_(SystemLocale)", date.toString(Qt::SystemLocaleDate));
+ S(d, "toString_(Locale)", date.toString(Qt::LocaleDate));
+ S(d, "toString", date.toString());
+
+ #if 0
+ d.beginHash();
+ P(d, "name", "toUTC");
+ P(d, "exp", "(("NSX"QDateTime"NSY"*)" << d.data << ")"
+ "->toTimeSpec('"NS"Qt::UTC')");
+ P(d, "type", NS"QDateTime");
+ P(d, "numchild", "1");
+ d.endHash();
+ #endif
+
+ #if 0
+ d.beginHash();
+ P(d, "name", "toLocalTime");
+ P(d, "exp", "(("NSX"QDateTime"NSY"*)" << d.data << ")"
+ "->toTimeSpec('"NS"Qt::LocalTime')");
+ P(d, "type", NS"QDateTime");
+ P(d, "numchild", "1");
+ d.endHash();
+ #endif
+
+ d << "]";
+ }
+ d.disarm();
+#endif // ifdef QT_NO_DATESTRING
+}
+
+static void qDumpQDir(QDumper &d)
+{
+ const QDir &dir = *reinterpret_cast<const QDir *>(d.data);
+ P(d, "value", dir.path());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QDir");
+ P(d, "numchild", "3");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ S(d, "absolutePath", dir.absolutePath());
+ S(d, "canonicalPath", dir.canonicalPath());
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQFile(QDumper &d)
+{
+ const QFile &file = *reinterpret_cast<const QFile *>(d.data);
+ P(d, "value", file.fileName());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QFile");
+ P(d, "numchild", "2");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ S(d, "fileName", file.fileName());
+ BL(d, "exists", file.exists());
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQFileInfo(QDumper &d)
+{
+ const QFileInfo &info = *reinterpret_cast<const QFileInfo *>(d.data);
+ P(d, "value", info.filePath());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QFileInfo");
+ P(d, "numchild", "3");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ S(d, "absolutePath", info.absolutePath());
+ S(d, "absoluteFilePath", info.absoluteFilePath());
+ S(d, "canonicalPath", info.canonicalPath());
+ S(d, "canonicalFilePath", info.canonicalFilePath());
+ S(d, "completeBaseName", info.completeBaseName());
+ S(d, "completeSuffix", info.completeSuffix());
+ S(d, "baseName", info.baseName());
+#ifdef Q_OS_MACX
+ BL(d, "isBundle", info.isBundle());
+ S(d, "bundleName", info.bundleName());
+#endif
+ S(d, "completeSuffix", info.completeSuffix());
+ S(d, "fileName", info.fileName());
+ S(d, "filePath", info.filePath());
+ S(d, "group", info.group());
+ S(d, "owner", info.owner());
+ S(d, "path", info.path());
+
+ I(d, "groupid", (long)info.groupId());
+ I(d, "ownerid", (long)info.ownerId());
+ //QFile::Permissions permissions () const
+ I(d, "permissions", info.permissions());
+
+ //QDir absoluteDir () const
+ //QDir dir () const
+
+ BL(d, "caching", info.caching());
+ BL(d, "exists", info.exists());
+ BL(d, "isAbsolute", info.isAbsolute());
+ BL(d, "isDir", info.isDir());
+ BL(d, "isExecutable", info.isExecutable());
+ BL(d, "isFile", info.isFile());
+ BL(d, "isHidden", info.isHidden());
+ BL(d, "isReadable", info.isReadable());
+ BL(d, "isRelative", info.isRelative());
+ BL(d, "isRoot", info.isRoot());
+ BL(d, "isSymLink", info.isSymLink());
+ BL(d, "isWritable", info.isWritable());
+
+ d.beginHash();
+ P(d, "name", "created");
+ P(d, "value", info.created().toString());
+ P(d, "valueencoded", "1");
+ P(d, "exp", "(("NSX"QFileInfo"NSY"*)" << d.data << ")->created()");
+ P(d, "type", NS"QDateTime");
+ P(d, "numchild", "1");
+ d.endHash();
+
+ d.beginHash();
+ P(d, "name", "lastModified");
+ P(d, "value", info.lastModified().toString());
+ P(d, "valueencoded", "1");
+ P(d, "exp", "(("NSX"QFileInfo"NSY"*)" << d.data << ")->lastModified()");
+ P(d, "type", NS"QDateTime");
+ P(d, "numchild", "1");
+ d.endHash();
+
+ d.beginHash();
+ P(d, "name", "lastRead");
+ P(d, "value", info.lastRead().toString());
+ P(d, "valueencoded", "1");
+ P(d, "exp", "(("NSX"QFileInfo"NSY"*)" << d.data << ")->lastRead()");
+ P(d, "type", NS"QDateTime");
+ P(d, "numchild", "1");
+ d.endHash();
+
+ d << "]";
+ }
+ d.disarm();
+}
+
+bool isOptimizedIntKey(const char *keyType)
+{
+ return isEqual(keyType, "int")
+#if defined(Q_BYTE_ORDER) && Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+ || isEqual(keyType, "short")
+ || isEqual(keyType, "ushort")
+#endif
+ || isEqual(keyType, "uint");
+}
+
+int hashOffset(bool optimizedIntKey, bool forKey, unsigned keySize, unsigned valueSize)
+{
+ // int-key optimization, small value
+ struct NodeOS { void *next; uint k; uint v; } nodeOS;
+ // int-key optimiatzion, large value
+ struct NodeOL { void *next; uint k; void *v; } nodeOL;
+ // no optimization, small value
+ struct NodeNS { void *next; uint h; uint k; uint v; } nodeNS;
+ // no optimization, large value
+ struct NodeNL { void *next; uint h; uint k; void *v; } nodeNL;
+ // complex key
+ struct NodeL { void *next; uint h; void *k; void *v; } nodeL;
+
+ if (forKey) {
+ // offsetof(...,...) not yet in Standard C++
+ const ulong nodeOSk ( (char *)&nodeOS.k - (char *)&nodeOS );
+ const ulong nodeOLk ( (char *)&nodeOL.k - (char *)&nodeOL );
+ const ulong nodeNSk ( (char *)&nodeNS.k - (char *)&nodeNS );
+ const ulong nodeNLk ( (char *)&nodeNL.k - (char *)&nodeNL );
+ const ulong nodeLk ( (char *)&nodeL.k - (char *)&nodeL );
+ if (optimizedIntKey)
+ return valueSize > sizeof(int) ? nodeOLk : nodeOSk;
+ if (keySize > sizeof(int))
+ return nodeLk;
+ return valueSize > sizeof(int) ? nodeNLk : nodeNSk;
+ } else {
+ const ulong nodeOSv ( (char *)&nodeOS.v - (char *)&nodeOS );
+ const ulong nodeOLv ( (char *)&nodeOL.v - (char *)&nodeOL );
+ const ulong nodeNSv ( (char *)&nodeNS.v - (char *)&nodeNS );
+ const ulong nodeNLv ( (char *)&nodeNL.v - (char *)&nodeNL );
+ const ulong nodeLv ( (char *)&nodeL.v - (char *)&nodeL );
+ if (optimizedIntKey)
+ return valueSize > sizeof(int) ? nodeOLv : nodeOSv;
+ if (keySize > sizeof(int))
+ return nodeLv;
+ return valueSize > sizeof(int) ? nodeNLv : nodeNSv;
+ }
+}
+
+
+static void qDumpQHash(QDumper &d)
+{
+ QHashData *h = *reinterpret_cast<QHashData *const*>(d.data);
+ const char *keyType = d.templateParameters[0];
+ const char *valueType = d.templateParameters[1];
+
+ qCheckPointer(h->fakeNext);
+ qCheckPointer(h->buckets);
+
+ unsigned keySize = d.extraInt[0];
+ unsigned valueSize = d.extraInt[1];
+
+ int n = h->size;
+
+ if (n < 0)
+ qCheck(false);
+ if (n > 0) {
+ qCheckPointer(h->fakeNext);
+ qCheckPointer(*h->buckets);
+ }
+
+ P(d, "value", "<" << n << " items>");
+ P(d, "numchild", n);
+ if (d.dumpChildren) {
+ if (n > 1000)
+ n = 1000;
+ bool isSimpleKey = isSimpleType(keyType);
+ bool isSimpleValue = isSimpleType(valueType);
+ bool opt = isOptimizedIntKey(keyType);
+ int keyOffset = hashOffset(opt, true, keySize, valueSize);
+ int valueOffset = hashOffset(opt, false, keySize, valueSize);
+
+ P(d, "extra", "isSimpleKey: " << isSimpleKey
+ << " isSimpleValue: " << isSimpleValue
+ << " valueType: '" << isSimpleValue
+ << " keySize: " << keyOffset << " valueOffset: " << valueOffset
+ << " opt: " << opt);
+
+ QHashData::Node *node = h->firstNode();
+ QHashData::Node *end = reinterpret_cast<QHashData::Node *>(h);
+ int i = 0;
+
+ d << ",children=[";
+ while (node != end) {
+ d.beginHash();
+ P(d, "name", i);
+ qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
+ qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
+ if (isSimpleKey && isSimpleValue) {
+ P(d, "type", valueType);
+ P(d, "addr", addOffset(node, valueOffset));
+ } else {
+ P(d, "exp", "*('"NS"QHashNode<" << keyType << ","
+ << valueType << " >'*)" << node);
+ P(d, "type", "'"NS"QHashNode<" << keyType << ","
+ << valueType << " >'");
+ }
+ d.endHash();
+ ++i;
+ node = QHashData::nextNode(node);
+ }
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQHashNode(QDumper &d)
+{
+ const QHashData *h = reinterpret_cast<const QHashData *>(d.data);
+ const char *keyType = d.templateParameters[0];
+ const char *valueType = d.templateParameters[1];
+
+ unsigned keySize = d.extraInt[0];
+ unsigned valueSize = d.extraInt[1];
+ bool opt = isOptimizedIntKey(keyType);
+ int keyOffset = hashOffset(opt, true, keySize, valueSize);
+ int valueOffset = hashOffset(opt, false, keySize, valueSize);
+ if (isSimpleType(valueType))
+ qDumpInnerValueHelper(d, valueType, addOffset(h, valueOffset));
+ else
+ P(d, "value", "");
+
+ P(d, "numchild", 2);
+ if (d.dumpChildren) {
+ // there is a hash specialization in cast the key are integers or shorts
+ d << ",children=[";
+ d.beginHash();
+ P(d, "name", "key");
+ P(d, "type", keyType);
+ P(d, "addr", addOffset(h, keyOffset));
+ d.endHash();
+ d.beginHash();
+ P(d, "name", "value");
+ P(d, "type", valueType);
+ P(d, "addr", addOffset(h, valueOffset));
+ d.endHash();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQImage(QDumper &d)
+{
+#ifdef QT_GUI_LIB
+ const QImage &im = *reinterpret_cast<const QImage *>(d.data);
+ P(d, "value", "(" << im.width() << "x" << im.height() << ")");
+ P(d, "type", NS"QImage");
+ P(d, "numchild", "0");
+ d.disarm();
+#else
+ Q_UNUSED(d);
+#endif
+}
+
+static void qDumpQList(QDumper &d)
+{
+ // This uses the knowledge that QList<T> has only a single member
+ // of type union { QListData p; QListData::Data *d; };
+ const QListData &ldata = *reinterpret_cast<const QListData*>(d.data);
+ const QListData::Data *pdata =
+ *reinterpret_cast<const QListData::Data* const*>(d.data);
+ int nn = ldata.size();
+ if (nn < 0)
+ qCheck(false);
+ if (nn > 0) {
+ qCheckAccess(ldata.d->array);
+ //qCheckAccess(ldata.d->array[0]);
+ //qCheckAccess(ldata.d->array[nn - 1]);
+#if QT_VERSION >= 0x040400
+ if (ldata.d->ref._q_value <= 0)
+ qCheck(false);
+#endif
+ }
+
+ int n = nn;
+ P(d, "value", "<" << n << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", n);
+ P(d, "childtype", d.innertype);
+ if (d.dumpChildren) {
+ unsigned innerSize = d.extraInt[0];
+ bool innerTypeIsPointer = isPointerType(d.innertype);
+ QByteArray strippedInnerType = stripPointerType(d.innertype);
+
+ // The exact condition here is:
+ // QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic
+ // but this data is available neither in the compiled binary nor
+ // in the frontend.
+ // So as first approximation only do the 'isLarge' check:
+ bool isInternal = innerSize <= int(sizeof(void*))
+ && isMovableType(d.innertype);
+
+ P(d, "internal", (int)isInternal);
+ P(d, "childtype", d.innertype);
+ if (n > 1000)
+ n = 1000;
+ d << ",children=[";
+ for (int i = 0; i != n; ++i) {
+ d.beginHash();
+ P(d, "name", i);
+ if (innerTypeIsPointer) {
+ void *p = ldata.d->array + i + pdata->begin;
+ if (p) {
+ //P(d, "value","@" << p);
+ qDumpInnerValue(d, strippedInnerType.data(), deref(p));
+ } else {
+ P(d, "value", "<null>");
+ P(d, "numchild", "0");
+ }
+ } else {
+ void *p = ldata.d->array + i + pdata->begin;
+ if (isInternal) {
+ //qDumpInnerValue(d, d.innertype, p);
+ P(d, "addr", p);
+ qDumpInnerValueHelper(d, d.innertype, p);
+ } else {
+ //qDumpInnerValue(d, d.innertype, deref(p));
+ P(d, "addr", deref(p));
+ qDumpInnerValueHelper(d, d.innertype, deref(p));
+ }
+ }
+ d.endHash();
+ }
+ if (n < nn)
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQLinkedList(QDumper &d)
+{
+ // This uses the knowledge that QLinkedList<T> has only a single member
+ // of type union { QLinkedListData *d; QLinkedListNode<T> *e; };
+ const QLinkedListData *ldata =
+ reinterpret_cast<const QLinkedListData*>(deref(d.data));
+ int nn = ldata->size;
+ if (nn < 0)
+ qCheck(false);
+
+ int n = nn;
+ P(d, "value", "<" << n << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", n);
+ P(d, "childtype", d.innertype);
+ if (d.dumpChildren) {
+ //unsigned innerSize = d.extraInt[0];
+ //bool innerTypeIsPointer = isPointerType(d.innertype);
+ QByteArray strippedInnerType = stripPointerType(d.innertype);
+ const char *stripped =
+ isPointerType(d.innertype) ? strippedInnerType.data() : 0;
+
+ P(d, "childtype", d.innertype);
+ if (n > 1000)
+ n = 1000;
+ d << ",children=[";
+ const void *p = deref(ldata);
+ for (int i = 0; i != n; ++i) {
+ d.beginHash();
+ P(d, "name", i);
+ const void *addr = addOffset(p, 2 * sizeof(void*));
+ qDumpInnerValueOrPointer(d, d.innertype, stripped, addr);
+ p = deref(p);
+ d.endHash();
+ }
+ if (n < nn)
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQLocale(QDumper &d)
+{
+ const QLocale &locale = *reinterpret_cast<const QLocale *>(d.data);
+ P(d, "value", locale.name());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QLocale");
+ P(d, "numchild", "8");
+ if (d.dumpChildren) {
+ d << ",children=[";
+
+ d.beginHash();
+ P(d, "name", "country");
+ P(d, "exp", "(("NSX"QLocale"NSY"*)" << d.data << ")->country()");
+ d.endHash();
+
+ d.beginHash();
+ P(d, "name", "language");
+ P(d, "exp", "(("NSX"QLocale"NSY"*)" << d.data << ")->language()");
+ d.endHash();
+
+ d.beginHash();
+ P(d, "name", "measurementSystem");
+ P(d, "exp", "(("NSX"QLocale"NSY"*)" << d.data << ")->measurementSystem()");
+ d.endHash();
+
+ d.beginHash();
+ P(d, "name", "numberOptions");
+ P(d, "exp", "(("NSX"QLocale"NSY"*)" << d.data << ")->numberOptions()");
+ d.endHash();
+
+ S(d, "timeFormat_(short)", locale.timeFormat(QLocale::ShortFormat));
+ S(d, "timeFormat_(long)", locale.timeFormat(QLocale::LongFormat));
+
+ QC(d, "decimalPoint", locale.decimalPoint());
+ QC(d, "exponential", locale.exponential());
+ QC(d, "percent", locale.percent());
+ QC(d, "zeroDigit", locale.zeroDigit());
+ QC(d, "groupSeparator", locale.groupSeparator());
+ QC(d, "negativeSign", locale.negativeSign());
+
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQMapNode(QDumper &d)
+{
+ const QMapData *h = reinterpret_cast<const QMapData *>(d.data);
+ const char *keyType = d.templateParameters[0];
+ const char *valueType = d.templateParameters[1];
+
+ qCheckAccess(h->backward);
+ qCheckAccess(h->forward[0]);
+
+ P(d, "value", "");
+ P(d, "numchild", 2);
+ if (d.dumpChildren) {
+ //unsigned keySize = d.extraInt[0];
+ //unsigned valueSize = d.extraInt[1];
+ unsigned mapnodesize = d.extraInt[2];
+ unsigned valueOff = d.extraInt[3];
+
+ unsigned keyOffset = 2 * sizeof(void*) - mapnodesize;
+ unsigned valueOffset = 2 * sizeof(void*) - mapnodesize + valueOff;
+
+ d << ",children=[";
+ d.beginHash();
+ P(d, "name", "key");
+ qDumpInnerValue(d, keyType, addOffset(h, keyOffset));
+
+ d.endHash();
+ d.beginHash();
+ P(d, "name", "value");
+ qDumpInnerValue(d, valueType, addOffset(h, valueOffset));
+ d.endHash();
+ d << "]";
+ }
+
+ d.disarm();
+}
+
+static void qDumpQMap(QDumper &d)
+{
+ QMapData *h = *reinterpret_cast<QMapData *const*>(d.data);
+ const char *keyType = d.templateParameters[0];
+ const char *valueType = d.templateParameters[1];
+
+ int n = h->size;
+
+ if (n < 0)
+ qCheck(false);
+ if (n > 0) {
+ qCheckAccess(h->backward);
+ qCheckAccess(h->forward[0]);
+ qCheckPointer(h->backward->backward);
+ qCheckPointer(h->forward[0]->backward);
+ }
+
+ P(d, "value", "<" << n << " items>");
+ P(d, "numchild", n);
+ if (d.dumpChildren) {
+ if (n > 1000)
+ n = 1000;
+
+ //unsigned keySize = d.extraInt[0];
+ //unsigned valueSize = d.extraInt[1];
+ unsigned mapnodesize = d.extraInt[2];
+ unsigned valueOff = d.extraInt[3];
+
+ bool isSimpleKey = isSimpleType(keyType);
+ bool isSimpleValue = isSimpleType(valueType);
+ // both negative:
+ int keyOffset = 2 * sizeof(void*) - int(mapnodesize);
+ int valueOffset = 2 * sizeof(void*) - int(mapnodesize) + valueOff;
+
+ P(d, "extra", "simplekey: " << isSimpleKey << " isSimpleValue: " << isSimpleValue
+ << " keyOffset: " << keyOffset << " valueOffset: " << valueOffset
+ << " mapnodesize: " << mapnodesize);
+ d << ",children=[";
+
+ QMapData::Node *node = reinterpret_cast<QMapData::Node *>(h->forward[0]);
+ QMapData::Node *end = reinterpret_cast<QMapData::Node *>(h);
+ int i = 0;
+
+ while (node != end) {
+ d.beginHash();
+ P(d, "name", i);
+ qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
+ qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
+ if (isSimpleKey && isSimpleValue) {
+ P(d, "type", valueType);
+ P(d, "addr", addOffset(node, valueOffset));
+ } else {
+#if QT_VERSION >= 0x040500
+ // actually, any type (even 'char') will do...
+ P(d, "type", NS"QMapNode<"
+ << keyType << "," << valueType << " >");
+ P(d, "exp", "*('"NS"QMapNode<"
+ << keyType << "," << valueType << " >'*)" << node);
+
+ //P(d, "exp", "*('"NS"QMapData'*)" << (void*)node);
+ //P(d, "exp", "*(char*)" << (void*)node);
+ // P(d, "addr", node); does not work as gdb fails to parse
+#else
+ P(d, "type", NS"QMapData::Node<"
+ << keyType << "," << valueType << " >");
+ P(d, "exp", "*('"NS"QMapData::Node<"
+ << keyType << "," << valueType << " >'*)" << node);
+#endif
+ }
+ d.endHash();
+
+ ++i;
+ node = node->forward[0];
+ }
+ d << "]";
+ }
+
+ d.disarm();
+}
+
+static void qDumpQMultiMap(QDumper &d)
+{
+ qDumpQMap(d);
+}
+
+static void qDumpQModelIndex(QDumper &d)
+{
+ const QModelIndex *mi = reinterpret_cast<const QModelIndex *>(d.data);
+
+ P(d, "type", NS"QModelIndex");
+ if (mi->isValid()) {
+ P(d, "value", "(" << mi->row() << ", " << mi->column() << ")");
+ P(d, "numchild", 5);
+ if (d.dumpChildren) {
+ d << ",children=[";
+ I(d, "row", mi->row());
+ I(d, "column", mi->column());
+
+ d.beginHash();
+ P(d, "name", "parent");
+ const QModelIndex parent = mi->parent();
+ if (parent.isValid())
+ P(d, "value", "(" << mi->row() << ", " << mi->column() << ")");
+ else
+ P(d, "value", "<invalid>");
+ P(d, "exp", "(("NSX"QModelIndex"NSY"*)" << d.data << ")->parent()");
+ P(d, "type", NS"QModelIndex");
+ P(d, "numchild", "1");
+ d.endHash();
+
+ S(d, "internalId", QString::number(mi->internalId(), 10));
+
+ d.beginHash();
+ P(d, "name", "model");
+ P(d, "value", static_cast<const void *>(mi->model()));
+ P(d, "type", NS"QAbstractItemModel*");
+ P(d, "numchild", "1");
+ d.endHash();
+
+ d << "]";
+ }
+ } else {
+ P(d, "value", "<invalid>");
+ P(d, "numchild", 0);
+ }
+
+ d.disarm();
+}
+
+static void qDumpQObject(QDumper &d)
+{
+ const QObject *ob = reinterpret_cast<const QObject *>(d.data);
+ const QMetaObject *mo = ob->metaObject();
+ unsigned childrenOffset = d.extraInt[0];
+ P(d, "value", ob->objectName());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QObject");
+ P(d, "displayedtype", mo->className());
+ P(d, "numchild", 4);
+ if (d.dumpChildren) {
+ const QObjectList &children = ob->children();
+ int slotCount = 0;
+ int signalCount = 0;
+ for (int i = mo->methodCount(); --i >= 0; ) {
+ QMetaMethod::MethodType mt = mo->method(i).methodType();
+ signalCount += (mt == QMetaMethod::Signal);
+ slotCount += (mt == QMetaMethod::Slot);
+ }
+ d << ",children=[";
+ d.beginHash();
+ P(d, "name", "properties");
+ // FIXME: Note that when simply using '(QObject*)'
+ // in the cast below, Gdb/MI _sometimes_ misparses
+ // expressions further down in the tree.
+ P(d, "exp", "*(class '"NS"QObject'*)" << d.data);
+ P(d, "type", NS"QObjectPropertyList");
+ P(d, "value", "<" << mo->propertyCount() << " items>");
+ P(d, "numchild", mo->propertyCount());
+ d.endHash();
+#if 0
+ d.beginHash();
+ P(d, "name", "methods");
+ P(d, "exp", "*(class '"NS"QObject'*)" << d.data);
+ P(d, "value", "<" << mo->methodCount() << " items>");
+ P(d, "numchild", mo->methodCount());
+ d.endHash();
+#endif
+#if 0
+ d.beginHash();
+ P(d, "name", "senders");
+ P(d, "exp", "(*(class '"NS"QObjectPrivate'*)" << dfunc(ob) << ")->senders");
+ P(d, "type", NS"QList<"NS"QObjectPrivateSender>");
+ d.endHash();
+#endif
+#if PRIVATE_OBJECT_ALLOWED
+ d.beginHash();
+ P(d, "name", "signals");
+ P(d, "exp", "*(class '"NS"QObject'*)" << d.data);
+ P(d, "type", NS"QObjectSignalList");
+ P(d, "value", "<" << signalCount << " items>");
+ P(d, "numchild", signalCount);
+ d.endHash();
+ d.beginHash();
+ P(d, "name", "slots");
+ P(d, "exp", "*(class '"NS"QObject'*)" << d.data);
+ P(d, "type", NS"QObjectSlotList");
+ P(d, "value", "<" << slotCount << " items>");
+ P(d, "numchild", slotCount);
+ d.endHash();
+#endif
+ d.beginHash();
+ P(d, "name", "children");
+ // works always, but causes additional traffic on the list
+ //P(d, "exp", "((class '"NS"QObject'*)" << d.data << ")->children()");
+ //
+ //P(d, "addr", addOffset(dfunc(ob), childrenOffset));
+ //P(d, "type", NS"QList<QObject *>");
+ //P(d, "value", "<" << children.size() << " items>");
+ qDumpInnerValue(d, NS"QList<"NS"QObject *>",
+ addOffset(dfunc(ob), childrenOffset));
+ P(d, "numchild", children.size());
+ d.endHash();
+#if 0
+ // Unneeded (and not working): Connections are listes as childen
+ // of the signal or slot they are connected to.
+ // d.beginHash();
+ // P(d, "name", "connections");
+ // P(d, "exp", "*(*(class "NS"QObjectPrivate*)" << dfunc(ob) << ")->connectionLists");
+ // P(d, "type", NS"QVector<"NS"QList<"NS"QObjectPrivate::Connection> >");
+ // d.endHash();
+#endif
+#if 0
+ d.beginHash();
+ P(d, "name", "objectprivate");
+ P(d, "type", NS"QObjectPrivate");
+ P(d, "addr", dfunc(ob));
+ P(d, "value", "");
+ P(d, "numchild", "1");
+ d.endHash();
+#endif
+ d.beginHash();
+ P(d, "name", "parent");
+ qDumpInnerValueHelper(d, NS"QObject *", ob->parent());
+ d.endHash();
+#if 1
+ d.beginHash();
+ P(d, "name", "className");
+ P(d, "value",ob->metaObject()->className());
+ P(d, "type", "");
+ P(d, "numchild", "0");
+ d.endHash();
+#endif
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQObjectPropertyList(QDumper &d)
+{
+ const QObject *ob = (const QObject *)d.data;
+ const QMetaObject *mo = ob->metaObject();
+ P(d, "addr", "<synthetic>");
+ P(d, "type", NS"QObjectPropertyList");
+ P(d, "numchild", mo->propertyCount());
+ if (d.dumpChildren) {
+ d << ",children=[";
+ for (int i = mo->propertyCount(); --i >= 0; ) {
+ const QMetaProperty & prop = mo->property(i);
+ d.beginHash();
+ P(d, "name", prop.name());
+ P(d, "exp", "((" << mo->className() << "*)" << ob
+ << ")->" << prop.name() << "()");
+ if (isEqual(prop.typeName(), "QString")) {
+ P(d, "value", prop.read(ob).toString());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QString");
+ P(d, "numchild", "0");
+ } else if (isEqual(prop.typeName(), "bool")) {
+ P(d, "value", (prop.read(ob).toBool() ? "true" : "false"));
+ P(d, "numchild", "0");
+ } else if (isEqual(prop.typeName(), "int")) {
+ P(d, "value", prop.read(ob).toInt());
+ P(d, "numchild", "0");
+ }
+ P(d, "type", prop.typeName());
+ P(d, "numchild", "1");
+ d.endHash();
+ }
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQObjectMethodList(QDumper &d)
+{
+ const QObject *ob = (const QObject *)d.data;
+ const QMetaObject *mo = ob->metaObject();
+ P(d, "addr", "<synthetic>");
+ P(d, "type", NS"QObjectMethodList");
+ P(d, "numchild", mo->methodCount());
+ P(d, "childtype", "QMetaMethod::Method");
+ P(d, "childnumchild", "0");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ for (int i = 0; i != mo->methodCount(); ++i) {
+ const QMetaMethod & method = mo->method(i);
+ int mt = method.methodType();
+ d.beginHash();
+ P(d, "name", i << " " << mo->indexOfMethod(method.signature())
+ << " " << method.signature());
+ P(d, "value", (mt == QMetaMethod::Signal ? "<Signal>" : "<Slot>") << " (" << mt << ")");
+ d.endHash();
+ }
+ d << "]";
+ }
+ d.disarm();
+}
+
+#if PRIVATE_OBJECT_ALLOWED
+const char * qConnectionTypes[] ={
+ "auto",
+ "direct",
+ "queued",
+ "autocompat",
+ "blockingqueued"
+};
+
+#if QT_VERSION >= 0x040400
+static const QObjectPrivate::ConnectionList &qConnectionList(const QObject *ob, int signalNumber)
+{
+ static const QObjectPrivate::ConnectionList emptyList;
+ const QObjectPrivate *p = reinterpret_cast<const QObjectPrivate *>(dfunc(ob));
+ if (!p->connectionLists)
+ return emptyList;
+ typedef QVector<QObjectPrivate::ConnectionList> ConnLists;
+ const ConnLists *lists = reinterpret_cast<const ConnLists *>(p->connectionLists);
+ // there's an optimization making the lists only large enough to hold the
+ // last non-empty item
+ if (signalNumber >= lists->size())
+ return emptyList;
+ return lists->at(signalNumber);
+}
+#endif
+
+static void qDumpQObjectSignal(QDumper &d)
+{
+ unsigned signalNumber = d.extraInt[0];
+
+ P(d, "addr", "<synthetic>");
+ P(d, "numchild", "1");
+ P(d, "type", NS"QObjectSignal");
+
+#if QT_VERSION >= 0x040400
+ if (d.dumpChildren) {
+ const QObject *ob = reinterpret_cast<const QObject *>(d.data);
+ d << ",children=[";
+ const QObjectPrivate::ConnectionList &connList = qConnectionList(ob, signalNumber);
+ for (int i = 0; i != connList.size(); ++i) {
+ const QObjectPrivate::Connection &conn = connList.at(i);
+ d.beginHash();
+ P(d, "name", i << " receiver");
+ qDumpInnerValueHelper(d, NS"QObject *", conn.receiver);
+ d.endHash();
+ d.beginHash();
+ P(d, "name", i << " slot");
+ P(d, "type", "");
+ if (conn.receiver)
+ P(d, "value", conn.receiver->metaObject()->method(conn.method).signature());
+ else
+ P(d, "value", "<invalid receiver>");
+ P(d, "numchild", "0");
+ d.endHash();
+ d.beginHash();
+ P(d, "name", i << " type");
+ P(d, "type", "");
+ P(d, "value", "<" << qConnectionTypes[conn.method] << " connection>");
+ P(d, "numchild", "0");
+ d.endHash();
+ }
+ d << "]";
+ P(d, "numchild", connList.size());
+ }
+#endif
+ d.disarm();
+}
+
+static void qDumpQObjectSignalList(QDumper &d)
+{
+ const QObject *ob = reinterpret_cast<const QObject *>(d.data);
+ const QMetaObject *mo = ob->metaObject();
+ int count = 0;
+ for (int i = mo->methodCount(); --i >= 0; )
+ count += (mo->method(i).methodType() == QMetaMethod::Signal);
+ P(d, "addr", d.data);
+ P(d, "numchild", count);
+#if QT_VERSION >= 0x040400
+ if (d.dumpChildren) {
+ d << ",children=[";
+ for (int i = 0; i != mo->methodCount(); ++i) {
+ const QMetaMethod & method = mo->method(i);
+ if (method.methodType() == QMetaMethod::Signal) {
+ int k = mo->indexOfSignal(method.signature());
+ const QObjectPrivate::ConnectionList &connList = qConnectionList(ob, k);
+ d.beginHash();
+ P(d, "name", k);
+ P(d, "value", method.signature());
+ P(d, "numchild", connList.size());
+ //P(d, "numchild", "1");
+ P(d, "exp", "*(class '"NS"QObject'*)" << d.data);
+ P(d, "type", NS"QObjectSignal");
+ d.endHash();
+ }
+ }
+ d << "]";
+ }
+#endif
+ d.disarm();
+}
+
+static void qDumpQObjectSlot(QDumper &d)
+{
+ int slotNumber = d.extraInt[0];
+
+ P(d, "addr", d.data);
+ P(d, "numchild", "1");
+ P(d, "type", NS"QObjectSlot");
+
+#if QT_VERSION >= 0x040400
+ if (d.dumpChildren) {
+ d << ",children=[";
+ int numchild = 0;
+ const QObject *ob = reinterpret_cast<const QObject *>(d.data);
+ const QObjectPrivate *p = reinterpret_cast<const QObjectPrivate *>(dfunc(ob));
+ for (int s = 0; s != p->senders.size(); ++s) {
+ const QObjectPrivate::Sender &sender = p->senders.at(s);
+ const QObjectPrivate::ConnectionList &connList
+ = qConnectionList(sender.sender, sender.signal);
+ for (int i = 0; i != connList.size(); ++i) {
+ const QObjectPrivate::Connection &conn = connList.at(i);
+ if (conn.receiver == ob && conn.method == slotNumber) {
+ ++numchild;
+ const QMetaMethod & method =
+ sender.sender->metaObject()->method(sender.signal);
+ d.beginHash();
+ P(d, "name", s << " sender");
+ qDumpInnerValueHelper(d, NS"QObject *", sender.sender);
+ d.endHash();
+ d.beginHash();
+ P(d, "name", s << " signal");
+ P(d, "type", "");
+ P(d, "value", method.signature());
+ P(d, "numchild", "0");
+ d.endHash();
+ d.beginHash();
+ P(d, "name", s << " type");
+ P(d, "type", "");
+ P(d, "value", "<" << qConnectionTypes[conn.method] << " connection>");
+ P(d, "numchild", "0");
+ d.endHash();
+ }
+ }
+ }
+ d << "]";
+ P(d, "numchild", numchild);
+ }
+#endif
+ d.disarm();
+}
+
+static void qDumpQObjectSlotList(QDumper &d)
+{
+ const QObject *ob = reinterpret_cast<const QObject *>(d.data);
+#if QT_VERSION >= 0x040400
+ const QObjectPrivate *p = reinterpret_cast<const QObjectPrivate *>(dfunc(ob));
+#endif
+ const QMetaObject *mo = ob->metaObject();
+
+ int count = 0;
+ for (int i = mo->methodCount(); --i >= 0; )
+ count += (mo->method(i).methodType() == QMetaMethod::Slot);
+
+ P(d, "addr", d.data);
+ P(d, "numchild", count);
+#if QT_VERSION >= 0x040400
+ if (d.dumpChildren) {
+ d << ",children=[";
+ for (int i = 0; i != mo->methodCount(); ++i) {
+ const QMetaMethod & method = mo->method(i);
+ if (method.methodType() == QMetaMethod::Slot) {
+ d.beginHash();
+ int k = mo->indexOfSlot(method.signature());
+ P(d, "name", k);
+ P(d, "value", method.signature());
+
+ // count senders. expensive...
+ int numchild = 0;
+ for (int s = 0; s != p->senders.size(); ++s) {
+ const QObjectPrivate::Sender & sender = p->senders.at(s);
+ const QObjectPrivate::ConnectionList &connList
+ = qConnectionList(sender.sender, sender.signal);
+ for (int c = 0; c != connList.size(); ++c) {
+ const QObjectPrivate::Connection &conn = connList.at(c);
+ if (conn.receiver == ob && conn.method == k)
+ ++numchild;
+ }
+ }
+ P(d, "numchild", numchild);
+ P(d, "exp", "*(class '"NS"QObject'*)" << d.data);
+ P(d, "type", NS"QObjectSlot");
+ d.endHash();
+ }
+ }
+ d << "]";
+ }
+#endif
+ d.disarm();
+}
+#endif // PRIVATE_OBJECT_ALLOWED
+
+
+static void qDumpQPixmap(QDumper &d)
+{
+#ifdef QT_GUI_LIB
+ const QPixmap &im = *reinterpret_cast<const QPixmap *>(d.data);
+ P(d, "value", "(" << im.width() << "x" << im.height() << ")");
+ P(d, "type", NS"QPixmap");
+ P(d, "numchild", "0");
+ d.disarm();
+#else
+ Q_UNUSED(d);
+#endif
+}
+
+static void qDumpQSet(QDumper &d)
+{
+ // This uses the knowledge that QHash<T> has only a single member
+ // of union { QHashData *d; QHashNode<Key, T> *e; };
+ QHashData *hd = *(QHashData**)d.data;
+ QHashData::Node *node = hd->firstNode();
+
+ int n = hd->size;
+ if (n < 0)
+ qCheck(false);
+ if (n > 0) {
+ qCheckAccess(node);
+ qCheckPointer(node->next);
+ }
+
+ P(d, "value", "<" << n << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", 2 * n);
+ if (d.dumpChildren) {
+ if (n > 100)
+ n = 100;
+ d << ",children=[";
+ int i = 0;
+ for (int bucket = 0; bucket != hd->numBuckets && i <= 10000; ++bucket) {
+ for (node = hd->buckets[bucket]; node->next; node = node->next) {
+ d.beginHash();
+ P(d, "name", i);
+ P(d, "type", d.innertype);
+ P(d, "exp", "(('"NS"QHashNode<" << d.innertype
+ << ","NS"QHashDummyValue>'*)"
+ << static_cast<const void*>(node) << ")->key"
+ );
+ d.endHash();
+ ++i;
+ if (i > 10000) {
+ d.putEllipsis();
+ break;
+ }
+ }
+ }
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQString(QDumper &d)
+{
+ const QString &str = *reinterpret_cast<const QString *>(d.data);
+
+ if (!str.isEmpty()) {
+ qCheckAccess(str.unicode());
+ qCheckAccess(str.unicode() + str.size());
+ }
+
+ P(d, "value", str);
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QString");
+ //P(d, "editvalue", str); // handled generically below
+ P(d, "numchild", "0");
+
+ d.disarm();
+}
+
+static void qDumpQStringList(QDumper &d)
+{
+ const QStringList &list = *reinterpret_cast<const QStringList *>(d.data);
+ int n = list.size();
+ if (n < 0)
+ qCheck(false);
+ if (n > 0) {
+ qCheckAccess(&list.front());
+ qCheckAccess(&list.back());
+ }
+
+ P(d, "value", "<" << n << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", n);
+ P(d, "childtype", NS"QString");
+ P(d, "childnumchild", "0");
+ if (d.dumpChildren) {
+ if (n > 1000)
+ n = 1000;
+ d << ",children=[";
+ for (int i = 0; i != n; ++i) {
+ d.beginHash();
+ P(d, "name", i);
+ P(d, "value", list[i]);
+ P(d, "valueencoded", "1");
+ d.endHash();
+ }
+ if (n < list.size())
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQTextCodec(QDumper &d)
+{
+ const QTextCodec &codec = *reinterpret_cast<const QTextCodec *>(d.data);
+ P(d, "value", codec.name());
+ P(d, "valueencoded", "1");
+ P(d, "type", NS"QTextCodec");
+ P(d, "numchild", "2");
+ if (d.dumpChildren) {
+ d << ",children=[";
+ S(d, "name", codec.name());
+ I(d, "mibEnum", codec.mibEnum());
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQVariantHelper(const void *data, QString *value,
+ QString *exp, int *numchild)
+{
+ const QVariant &v = *reinterpret_cast<const QVariant *>(data);
+ switch (v.type()) {
+ case QVariant::Invalid:
+ *value = QLatin1String("<invalid>");
+ *numchild = 0;
+ break;
+ case QVariant::String:
+ *value = QLatin1Char('"') + v.toString() + QLatin1Char('"');
+ *numchild = 0;
+ break;
+ case QVariant::StringList:
+ *exp = QString(QLatin1String("((QVariant*)%1)->d.data.c"))
+ .arg((quintptr)data);
+ *numchild = v.toStringList().size();
+ break;
+ case QVariant::Int:
+ *value = QString::number(v.toInt());
+ *numchild= 0;
+ break;
+ case QVariant::Double:
+ *value = QString::number(v.toDouble());
+ *numchild = 0;
+ break;
+ default: {
+ char buf[1000];
+ const char *format = (v.typeName()[0] == 'Q')
+ ? "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)%p)"
+ : "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)%p)";
+ qsnprintf(buf, sizeof(buf) - 1, format, v.typeName(), v.typeName(), data);
+ *exp = QLatin1String(buf);
+ *numchild = 1;
+ break;
+ }
+ }
+}
+
+static void qDumpQVariant(QDumper &d)
+{
+ const QVariant &v = *reinterpret_cast<const QVariant *>(d.data);
+ QString value;
+ QString exp;
+ int numchild = 0;
+ qDumpQVariantHelper(d.data, &value, &exp, &numchild);
+ bool isInvalid = (v.typeName() == 0);
+ if (isInvalid) {
+ P(d, "value", "(invalid)");
+ } else if (value.isEmpty()) {
+ P(d, "value", "(" << v.typeName() << ") " << qPrintable(value));
+ } else {
+ QByteArray ba;
+ ba += '(';
+ ba += v.typeName();
+ ba += ") ";
+ ba += qPrintable(value);
+ P(d, "value", ba);
+ P(d, "valueencoded", "1");
+ }
+ P(d, "type", NS"QVariant");
+ P(d, "numchild", (isInvalid ? "0" : "1"));
+ if (d.dumpChildren) {
+ d << ",children=[";
+ d.beginHash();
+ P(d, "name", "value");
+ if (!exp.isEmpty())
+ P(d, "exp", qPrintable(exp));
+ if (!value.isEmpty()) {
+ P(d, "value", value);
+ P(d, "valueencoded", "1");
+ }
+ P(d, "type", v.typeName());
+ P(d, "numchild", numchild);
+ d.endHash();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpQVector(QDumper &d)
+{
+ QVectorData *v = *reinterpret_cast<QVectorData *const*>(d.data);
+
+ // Try to provoke segfaults early to prevent the frontend
+ // from asking for unavailable child details
+ int nn = v->size;
+ if (nn < 0)
+ qCheck(false);
+ if (nn > 0) {
+ //qCheckAccess(&vec.front());
+ //qCheckAccess(&vec.back());
+ }
+
+ unsigned innersize = d.extraInt[0];
+ unsigned typeddatasize = d.extraInt[1];
+
+ int n = nn;
+ P(d, "value", "<" << n << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", n);
+ if (d.dumpChildren) {
+ QByteArray strippedInnerType = stripPointerType(d.innertype);
+ const char *stripped =
+ isPointerType(d.innertype) ? strippedInnerType.data() : 0;
+ if (n > 1000)
+ n = 1000;
+ d << ",children=[";
+ for (int i = 0; i != n; ++i) {
+ d.beginHash();
+ P(d, "name", i);
+ qDumpInnerValueOrPointer(d, d.innertype, stripped,
+ addOffset(v, i * innersize + typeddatasize));
+ d.endHash();
+ }
+ if (n < nn)
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpStdList(QDumper &d)
+{
+ const std::list<int> &list = *reinterpret_cast<const std::list<int> *>(d.data);
+ const void *p = d.data;
+ qCheckAccess(p);
+ p = deref(p);
+ qCheckAccess(p);
+ p = deref(p);
+ qCheckAccess(p);
+ p = deref(addOffset(d.data, sizeof(void*)));
+ qCheckAccess(p);
+ p = deref(addOffset(p, sizeof(void*)));
+ qCheckAccess(p);
+ p = deref(addOffset(p, sizeof(void*)));
+ qCheckAccess(p);
+
+ int nn = 0;
+ std::list<int>::const_iterator it = list.begin();
+ for (; nn < 101 && it != list.end(); ++nn, ++it)
+ qCheckAccess(it.operator->());
+
+ if (nn > 100)
+ P(d, "value", "<more than 100 items>");
+ else
+ P(d, "value", "<" << nn << " items>");
+ P(d, "numchild", nn);
+
+ P(d, "valuedisabled", "true");
+ if (d.dumpChildren) {
+ QByteArray strippedInnerType = stripPointerType(d.innertype);
+ const char *stripped =
+ isPointerType(d.innertype) ? strippedInnerType.data() : 0;
+ d << ",children=[";
+ it = list.begin();
+ for (int i = 0; i < 1000 && it != list.end(); ++i, ++it) {
+ d.beginHash();
+ P(d, "name", i);
+ qDumpInnerValueOrPointer(d, d.innertype, stripped, it.operator->());
+ d.endHash();
+ }
+ if (it != list.end())
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpStdMap(QDumper &d)
+{
+ typedef std::map<int, int> DummyType;
+ const DummyType &map = *reinterpret_cast<const DummyType*>(d.data);
+ const char *keyType = d.templateParameters[0];
+ const char *valueType = d.templateParameters[1];
+ const void *p = d.data;
+ qCheckAccess(p);
+ p = deref(p);
+
+ int nn = map.size();
+ qCheck(nn >= 0);
+ DummyType::const_iterator it = map.begin();
+ for (int i = 0; i < nn && i < 10 && it != map.end(); ++i, ++it)
+ qCheckAccess(it.operator->());
+
+ QByteArray strippedInnerType = stripPointerType(d.innertype);
+ P(d, "numchild", nn);
+ P(d, "value", "<" << nn << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "valueoffset", d.extraInt[2]);
+
+ // HACK: we need a properly const qualified version of the
+ // std::pair used. We extract it from the allocator parameter
+ // (#4, "std::allocator<std::pair<key, value> >")
+ // as it is there, and, equally importantly, in an order that
+ // gdb accepts when fed with it.
+ char *pairType = (char *)(d.templateParameters[3]) + 15;
+ pairType[strlen(pairType) - 2] = 0;
+ P(d, "pairtype", pairType);
+
+ if (d.dumpChildren) {
+ bool isSimpleKey = isSimpleType(keyType);
+ bool isSimpleValue = isSimpleType(valueType);
+ int valueOffset = d.extraInt[2];
+
+ P(d, "extra", "isSimpleKey: " << isSimpleKey
+ << " isSimpleValue: " << isSimpleValue
+ << " valueType: '" << valueType
+ << " valueOffset: " << valueOffset);
+
+ d << ",children=[";
+ it = map.begin();
+ for (int i = 0; i < 1000 && it != map.end(); ++i, ++it) {
+ d.beginHash();
+ const void *node = it.operator->();
+ P(d, "name", i);
+ qDumpInnerValueHelper(d, keyType, node, "key");
+ qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
+ if (isSimpleKey && isSimpleValue) {
+ P(d, "type", valueType);
+ P(d, "addr", addOffset(node, valueOffset));
+ P(d, "numchild", 0);
+ } else {
+ P(d, "addr", node);
+ P(d, "type", pairType);
+ P(d, "numchild", 2);
+ }
+ d.endHash();
+ }
+ if (it != map.end())
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpStdString(QDumper &d)
+{
+ const std::string &str = *reinterpret_cast<const std::string *>(d.data);
+
+ if (!str.empty()) {
+ qCheckAccess(str.c_str());
+ qCheckAccess(str.c_str() + str.size() - 1);
+ }
+
+ d << ",value=\"";
+ d.putBase64Encoded(str.c_str(), str.size());
+ d << "\"";
+ P(d, "valueencoded", "1");
+ P(d, "type", "std::string");
+ P(d, "numchild", "0");
+
+ d.disarm();
+}
+
+static void qDumpStdWString(QDumper &d)
+{
+ const std::wstring &str = *reinterpret_cast<const std::wstring *>(d.data);
+
+ if (!str.empty()) {
+ qCheckAccess(str.c_str());
+ qCheckAccess(str.c_str() + str.size() - 1);
+ }
+
+ d << "value='";
+ d.putBase64Encoded((const char *)str.c_str(), str.size() * sizeof(wchar_t));
+ d << "'";
+ P(d, "valueencoded", (sizeof(wchar_t) == 2 ? "2" : "3"));
+ P(d, "type", "std::wstring");
+ P(d, "numchild", "0");
+
+ d.disarm();
+}
+
+static void qDumpStdVector(QDumper &d)
+{
+ // Correct type would be something like:
+ // std::_Vector_base<int,std::allocator<int, std::allocator<int> >>::_Vector_impl
+ struct VectorImpl {
+ char *start;
+ char *finish;
+ char *end_of_storage;
+ };
+ const VectorImpl *v = static_cast<const VectorImpl *>(d.data);
+
+ // Try to provoke segfaults early to prevent the frontend
+ // from asking for unavailable child details
+ int nn = (v->finish - v->start) / d.extraInt[0];
+ if (nn < 0)
+ qCheck(false);
+ if (nn > 0) {
+ qCheckAccess(v->start);
+ qCheckAccess(v->finish);
+ qCheckAccess(v->end_of_storage);
+ }
+
+ int n = nn;
+ P(d, "value", "<" << n << " items>");
+ P(d, "valuedisabled", "true");
+ P(d, "numchild", n);
+ if (d.dumpChildren) {
+ unsigned innersize = d.extraInt[0];
+ QByteArray strippedInnerType = stripPointerType(d.innertype);
+ const char *stripped =
+ isPointerType(d.innertype) ? strippedInnerType.data() : 0;
+ if (n > 1000)
+ n = 1000;
+ d << ",children=[";
+ for (int i = 0; i != n; ++i) {
+ d.beginHash();
+ P(d, "name", i);
+ qDumpInnerValueOrPointer(d, d.innertype, stripped,
+ addOffset(v->start, i * innersize));
+ d.endHash();
+ }
+ if (n < nn)
+ d.putEllipsis();
+ d << "]";
+ }
+ d.disarm();
+}
+
+static void qDumpStdVectorBool(QDumper &d)
+{
+ // FIXME
+ return qDumpStdVector(d);
+}
+
+static void handleProtocolVersion2and3(QDumper & d)
+{
+ if (!d.outertype[0]) {
+ qDumpUnknown(d);
+ return;
+ }
+
+ d.setupTemplateParameters();
+ P(d, "iname", d.iname);
+ P(d, "addr", d.data);
+
+#ifdef QT_NO_QDATASTREAM
+ if (d.protocolVersion == 3) {
+ QVariant::Type type = QVariant::nameToType(d.outertype);
+ if (type != QVariant::Invalid) {
+ QVariant v(type, d.data);
+ QByteArray ba;
+ QDataStream ds(&ba, QIODevice::WriteOnly);
+ ds << v;
+ P(d, "editvalue", ba);
+ }
+ }
+#endif
+
+ const char *type = stripNamespace(d.outertype);
+ // type[0] is usally 'Q', so don't use it
+ switch (type[1]) {
+ case 'B':
+ if (isEqual(type, "QByteArray"))
+ qDumpQByteArray(d);
+ break;
+ case 'D':
+ if (isEqual(type, "QDateTime"))
+ qDumpQDateTime(d);
+ else if (isEqual(type, "QDir"))
+ qDumpQDir(d);
+ break;
+ case 'F':
+ if (isEqual(type, "QFile"))
+ qDumpQFile(d);
+ else if (isEqual(type, "QFileInfo"))
+ qDumpQFileInfo(d);
+ break;
+ case 'H':
+ if (isEqual(type, "QHash"))
+ qDumpQHash(d);
+ else if (isEqual(type, "QHashNode"))
+ qDumpQHashNode(d);
+ break;
+ case 'I':
+ if (isEqual(type, "QImage"))
+ qDumpQImage(d);
+ break;
+ case 'L':
+ if (isEqual(type, "QList"))
+ qDumpQList(d);
+ else if (isEqual(type, "QLinkedList"))
+ qDumpQLinkedList(d);
+ else if (isEqual(type, "QLocale"))
+ qDumpQLocale(d);
+ break;
+ case 'M':
+ if (isEqual(type, "QMap"))
+ qDumpQMap(d);
+ else if (isEqual(type, "QMapNode"))
+ qDumpQMapNode(d);
+ else if (isEqual(type, "QModelIndex"))
+ qDumpQModelIndex(d);
+ else if (isEqual(type, "QMultiMap"))
+ qDumpQMultiMap(d);
+ break;
+ case 'O':
+ if (isEqual(type, "QObject"))
+ qDumpQObject(d);
+ else if (isEqual(type, "QObjectPropertyList"))
+ qDumpQObjectPropertyList(d);
+ else if (isEqual(type, "QObjectMethodList"))
+ qDumpQObjectMethodList(d);
+ #if PRIVATE_OBJECT_ALLOWED
+ else if (isEqual(type, "QObjectSignal"))
+ qDumpQObjectSignal(d);
+ else if (isEqual(type, "QObjectSignalList"))
+ qDumpQObjectSignalList(d);
+ else if (isEqual(type, "QObjectSlot"))
+ qDumpQObjectSlot(d);
+ else if (isEqual(type, "QObjectSlotList"))
+ qDumpQObjectSlotList(d);
+ #endif
+ break;
+ case 'P':
+ if (isEqual(type, "QPixmap"))
+ qDumpQPixmap(d);
+ break;
+ case 'S':
+ if (isEqual(type, "QSet"))
+ qDumpQSet(d);
+ else if (isEqual(type, "QString"))
+ qDumpQString(d);
+ else if (isEqual(type, "QStringList"))
+ qDumpQStringList(d);
+ break;
+ case 'T':
+ if (isEqual(type, "QTextCodec"))
+ qDumpQTextCodec(d);
+ break;
+ case 'V':
+ if (isEqual(type, "QVariant"))
+ qDumpQVariant(d);
+ else if (isEqual(type, "QVector"))
+ qDumpQVector(d);
+ break;
+ case 's':
+ if (isEqual(type, "wstring"))
+ qDumpStdWString(d);
+ break;
+ case 't':
+ if (isEqual(type, "std::vector"))
+ qDumpStdVector(d);
+ else if (isEqual(type, "std::vector::bool"))
+ qDumpStdVectorBool(d);
+ else if (isEqual(type, "std::list"))
+ qDumpStdList(d);
+ else if (isEqual(type, "std::map"))
+ qDumpStdMap(d);
+ else if (isEqual(type, "std::string") || isEqual(type, "string"))
+ qDumpStdString(d);
+ else if (isEqual(type, "std::wstring"))
+ qDumpStdWString(d);
+ break;
+ }
+
+ if (!d.success)
+ qDumpUnknown(d);
+}
+
+} // anonymous namespace
+
+
+extern "C" Q_DECL_EXPORT
+void qDumpObjectData440(
+ int protocolVersion,
+ int token,
+ void *data,
+ bool dumpChildren,
+ int extraInt0,
+ int extraInt1,
+ int extraInt2,
+ int extraInt3)
+{
+ //sleep(20);
+ if (protocolVersion == 1) {
+ QDumper d;
+ d.protocolVersion = protocolVersion;
+ d.token = token;
+
+ // This is a list of all available dumpers. Note that some templates
+ // currently require special hardcoded handling in the debugger plugin.
+ // They are mentioned here nevertheless. For types that not listed
+ // here, dumpers won't be used.
+ d << "dumpers=["
+ "\""NS"QByteArray\","
+ "\""NS"QDateTime\","
+ "\""NS"QDir\","
+ "\""NS"QFile\","
+ "\""NS"QFileInfo\","
+ "\""NS"QHash\","
+ "\""NS"QHashNode\","
+ "\""NS"QImage\","
+ "\""NS"QLinkedList\","
+ "\""NS"QList\","
+ "\""NS"QLocale\","
+ "\""NS"QMap\","
+ "\""NS"QMapNode\","
+ "\""NS"QModelIndex\","
+ #if QT_VERSION >= 0x040500
+ "\""NS"QMultiMap\","
+ #endif
+ "\""NS"QObject\","
+ "\""NS"QObjectMethodList\"," // hack to get nested properties display
+ "\""NS"QObjectPropertyList\","
+ #if PRIVATE_OBJECT_ALLOWED
+ "\""NS"QObjectSignal\","
+ "\""NS"QObjectSignalList\","
+ "\""NS"QObjectSlot\","
+ "\""NS"QObjectSlotList\","
+ #endif // PRIVATE_OBJECT_ALLOWED
+ // << "\""NS"QRegion\","
+ "\""NS"QSet\","
+ "\""NS"QString\","
+ "\""NS"QStringList\","
+ "\""NS"QTextCodec\","
+ "\""NS"QVariant\","
+ "\""NS"QVector\","
+ "\""NS"QWidget\","
+ "\"string\","
+ "\"wstring\","
+ "\"std::basic_string\","
+ "\"std::list\","
+ "\"std::map\","
+ "\"std::string\","
+ "\"std::vector\","
+ "\"std::wstring\","
+ "]";
+ d << ",qtversion=["
+ "\"" << ((QT_VERSION >> 16) & 255) << "\","
+ "\"" << ((QT_VERSION >> 8) & 255) << "\","
+ "\"" << ((QT_VERSION) & 255) << "\"]";
+ d << ",namespace=\""NS"\"";
+ d.disarm();
+ }
+
+ else if (protocolVersion == 2 || protocolVersion == 3) {
+ QDumper d;
+
+ d.protocolVersion = protocolVersion;
+ d.token = token;
+ d.data = data;
+ d.dumpChildren = dumpChildren;
+ d.extraInt[0] = extraInt0;
+ d.extraInt[1] = extraInt1;
+ d.extraInt[2] = extraInt2;
+ d.extraInt[3] = extraInt3;
+
+ const char *inbuffer = qDumpInBuffer;
+ d.outertype = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer;
+ d.iname = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer;
+ d.exp = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer;
+ d.innertype = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer;
+ d.iname = inbuffer; while (*inbuffer) ++inbuffer; ++inbuffer;
+
+ handleProtocolVersion2and3(d);
+ }
+
+ else {
+ qDebug() << "Unsupported protocol version" << protocolVersion;
+ }
+}
--- /dev/null
+TEMPLATE = lib
+CONFIG += shared
+SOURCES=gdbmacros.cpp
--- /dev/null
+libgdbmacros.1.0.0.dylib
\ No newline at end of file
--- /dev/null
+libgdbmacros.1.0.0.dylib
\ No newline at end of file
--- /dev/null
+libgdbmacros.1.0.0.dylib
\ No newline at end of file
--- /dev/null
+# -------------------------------------------------
+# Project created by QtCreator 2010-01-25T14:58:18
+# -------------------------------------------------
+QT += network \
+ dbus
+QT -= gui
+INCLUDEPATH += /usr/include/telepathy-1.0/ ../../tpsession
+LIBS += -ltelepathy-qt4 -L../../tpsession -ltpsession
+TARGET = smstest
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ testprog.cpp
+HEADERS += testprog.h
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-CommandLineArguments</variable>
+ <valuelist type="QVariantList" />
+ </data>
+ <data>
+ <variable>RunConfiguration0-ProFile</variable>
+ <value type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/smstest/smstest.pro</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString" >smstest</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetName</variable>
+ <value type="bool" >false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString" >Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int" >0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString" >Debug</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Debug</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="QtVersionId" type="int" >0</value>
+ <value key="addQDumper" type="" ></value>
+ <value key="buildDirectory" type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/smstest</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildConfiguration-Release</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="QtVersionId" type="int" >0</value>
+ <value key="addQDumper" type="" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <valuelist key="abstractProcess.Environment" type="QVariantList" >
+ <value type="QString" >Apple_PubSub_Socket_Render=/tmp/launch-SZ7gJm/Render</value>
+ <value type="QString" >COMMAND_MODE=legacy</value>
+ <value type="QString" >CrashReporterRelaunched=1</value>
+ <value type="QString" >DISPLAY=/tmp/launch-WAqOyv/:0</value>
+ <value type="QString" >HOME=/Users/kate</value>
+ <value type="QString" >LOGNAME=kate</value>
+ <value type="QString" >PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value>
+ <value type="QString" >QTDIR=/usr</value>
+ <value type="QString" >RelaunchedApplicationBundleID=com.nokia.qtcreator</value>
+ <value type="QString" >SHELL=/bin/bash</value>
+ <value type="QString" >SSH_AUTH_SOCK=/tmp/launch-2S4qM9/Listeners</value>
+ <value type="QString" >TMPDIR=/var/folders/m4/m4-87MXMGFaQCKn+y3s6SU+++TI/-Tmp-/</value>
+ <value type="QString" >USER=kate</value>
+ <value type="QString" >__CF_USER_TEXT_ENCODING=0x1F5:0:0</value>
+ <value type="QString" >__LAUNCHD_FD=28</value>
+ </valuelist>
+ <valuelist key="abstractProcess.arguments" type="QVariantList" >
+ <value type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/smstest/smstest.pro</value>
+ <value type="QString" >-spec</value>
+ <value type="QString" >macx-g++</value>
+ <value type="QString" >-r</value>
+ <value type="QString" >CONFIG+=debug_and_release</value>
+ </valuelist>
+ <value key="abstractProcess.command" type="QString" >/usr/bin/qmake</value>
+ <value key="abstractProcess.enabled" type="bool" >true</value>
+ <value key="abstractProcess.workingDirectory" type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/smstest</value>
+ <value key="buildConfiguration" type="int" >10</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <valuelist key="abstractProcess.Environment" type="QVariantList" >
+ <value type="QString" >Apple_PubSub_Socket_Render=/tmp/launch-SZ7gJm/Render</value>
+ <value type="QString" >COMMAND_MODE=legacy</value>
+ <value type="QString" >CrashReporterRelaunched=1</value>
+ <value type="QString" >DISPLAY=/tmp/launch-WAqOyv/:0</value>
+ <value type="QString" >HOME=/Users/kate</value>
+ <value type="QString" >LOGNAME=kate</value>
+ <value type="QString" >PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value>
+ <value type="QString" >QTDIR=/usr</value>
+ <value type="QString" >RelaunchedApplicationBundleID=com.nokia.qtcreator</value>
+ <value type="QString" >SHELL=/bin/bash</value>
+ <value type="QString" >SSH_AUTH_SOCK=/tmp/launch-2S4qM9/Listeners</value>
+ <value type="QString" >TMPDIR=/var/folders/m4/m4-87MXMGFaQCKn+y3s6SU+++TI/-Tmp-/</value>
+ <value type="QString" >USER=kate</value>
+ <value type="QString" >__CF_USER_TEXT_ENCODING=0x1F5:0:0</value>
+ <value type="QString" >__LAUNCHD_FD=28</value>
+ </valuelist>
+ <valuelist key="abstractProcess.arguments" type="QVariantList" >
+ <value type="QString" >debug</value>
+ <value type="QString" >-w</value>
+ </valuelist>
+ <value key="abstractProcess.command" type="QString" >/usr/bin/make</value>
+ <value key="abstractProcess.enabled" type="bool" >true</value>
+ <value key="abstractProcess.workingDirectory" type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tests/smstest</value>
+ <valuelist key="makeargs" type="QVariantList" >
+ <value type="QString" >debug</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="buildConfiguration" type="int" >8</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <valuelist key="makeargs" type="QVariantList" >
+ <value type="QString" >release</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >Debug</value>
+ <value type="QString" >Release</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="mkspec" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.gdbmaros</value>
+ <value type="QString" >trolltech.qt4projectmanager.qmake</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.gdbmaros</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray" >System</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap" />
+ </data>
+</qtcreator>
--- /dev/null
+#include "testprog.h"
+#include <TelepathyQt4/Message>
+
+TestProg::TestProg(QString addr,QString msg)
+{
+ qDebug() << __PRETTY_FUNCTION__ ;
+ message=msg;
+ address=addr;
+ tps =new TpSession("ring");
+ connect(tps,SIGNAL(accountReady(TpSessionAccount *)),SLOT(onAccountReady(TpSessionAccount *)));
+ connect(tps,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)),
+ SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)));
+}
+
+void TestProg::onAccountReady(TpSessionAccount *tpsa)
+{
+ qDebug() << __PRETTY_FUNCTION__ ;
+ tpsa->sendMessageToAddress(address,message);
+};
+
+void TestProg::onMessageReceived(const Tp::ReceivedMessage &msg,TpSessionAccount *acc)
+{
+ qDebug() << "TestProg::onMessageReceived " << msg.text() << "from " << msg.sender()->id();
+}
--- /dev/null
+#ifndef TESTPROG_H
+#define TESTPROG_H
+
+#include <QObject>
+#include <QDebug>
+#include "tpsession.h"
+#include "tpsessionaccount.h"
+
+
+class TestProg : public QObject
+{
+ Q_OBJECT
+public:
+ TestProg(QString addr,QString msg);
+public slots:
+ void onAccountReady(TpSessionAccount *);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+private:
+ QString address;
+ QString message;
+ TpSession* tps;
+};
+
+#endif // TESTPROG_H
--- /dev/null
+#############################################################################
+# Makefile for building: syncsms
+# Generated by qmake (2.01a) (Qt 4.6.1) on: Mon Feb 8 23:30:54 2010
+# Project: syncsms.pro
+# Template: app
+# Command: /opt/qt4-maemo5/bin/qmake -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile syncsms.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = cc
+CXX = g++
+DEFINES = -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include -I/usr/include/telepathy-1.0 -I../../tpsession -I.
+LINK = g++
+LFLAGS = -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/opt/qt4-maemo5/lib
+LIBS = $(SUBLIBS) -L/opt/qt4-maemo5/lib -ltelepathy-qt4 -L../../tpsession -ltpsession -L/opt/qt4-maemo5/lib -lQtNetwork -lgconf-2 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lQtDBus -lQtXml -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /opt/qt4-maemo5/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp moc_testprog.cpp
+OBJECTS = main.o \
+ testprog.o \
+ moc_testprog.o
+DIST = /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ syncsms.pro
+QMAKE_TARGET = syncsms
+DESTDIR =
+TARGET = syncsms
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: syncsms.pro /opt/qt4-maemo5/mkspecs/linux-g++-maemo5/qmake.conf /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ /opt/qt4-maemo5/lib/libQtDBus.prl \
+ /opt/qt4-maemo5/lib/libQtXml.prl \
+ /opt/qt4-maemo5/lib/libQtCore.prl \
+ /opt/qt4-maemo5/lib/libQtNetwork.prl
+ $(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile syncsms.pro
+/opt/qt4-maemo5/mkspecs/common/unix.conf:
+/opt/qt4-maemo5/mkspecs/common/linux.conf:
+/opt/qt4-maemo5/mkspecs/qconfig.pri:
+/opt/qt4-maemo5/mkspecs/features/qt_functions.prf:
+/opt/qt4-maemo5/mkspecs/features/qt_config.prf:
+/opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf:
+/opt/qt4-maemo5/mkspecs/features/default_pre.prf:
+/opt/qt4-maemo5/mkspecs/features/release.prf:
+/opt/qt4-maemo5/mkspecs/features/default_post.prf:
+/opt/qt4-maemo5/mkspecs/features/warn_on.prf:
+/opt/qt4-maemo5/mkspecs/features/qt.prf:
+/opt/qt4-maemo5/mkspecs/features/moc.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf:
+/opt/qt4-maemo5/mkspecs/features/unix/thread.prf:
+/opt/qt4-maemo5/mkspecs/features/resources.prf:
+/opt/qt4-maemo5/mkspecs/features/uic.prf:
+/opt/qt4-maemo5/mkspecs/features/yacc.prf:
+/opt/qt4-maemo5/mkspecs/features/lex.prf:
+/opt/qt4-maemo5/mkspecs/features/include_source_dir.prf:
+/opt/qt4-maemo5/lib/libQtDBus.prl:
+/opt/qt4-maemo5/lib/libQtXml.prl:
+/opt/qt4-maemo5/lib/libQtCore.prl:
+/opt/qt4-maemo5/lib/libQtNetwork.prl:
+qmake: FORCE
+ @$(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile syncsms.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/syncsms1.0.0 || $(MKDIR) .tmp/syncsms1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/syncsms1.0.0/ && $(COPY_FILE) --parents testprog.h .tmp/syncsms1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp .tmp/syncsms1.0.0/ && (cd `dirname .tmp/syncsms1.0.0` && $(TAR) syncsms1.0.0.tar syncsms1.0.0 && $(COMPRESS) syncsms1.0.0.tar) && $(MOVE) `dirname .tmp/syncsms1.0.0`/syncsms1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/syncsms1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_testprog.cpp
+moc_testprog.cpp: testprog.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) testprog.h -o moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+main.o: main.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o testprog.o testprog.cpp
+
+moc_testprog.o: moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_testprog.o moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#############################################################################
+# Makefile for building: smstest
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:55 2010
+# Project: smstest.pro
+# Template: app
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -gdwarf-2 -Wall -W $(DEFINES)
+CXXFLAGS = -pipe -g -gdwarf-2 -Wall -W $(DEFINES)
+INCPATH = -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtDBus.framework/Versions/4/Headers -I/usr/include/QtDBus -I/usr/include -I/usr/include/telepathy-1.0/ -I../../tpsession -Idebug -I. -F/Library/Frameworks
+LINK = g++
+LFLAGS = -headerpad_max_install_names
+LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -ltelepathy-qt4 -L../../tpsession -ltpsession -framework QtDBus -framework QtXml -framework QtNetwork -framework SystemConfiguration -framework QtCore -lz -lm -framework ApplicationServices
+AR = ar cq
+RANLIB = ranlib -s
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = $(COPY_FILE)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
+####### Output directory
+
+OBJECTS_DIR = debug/
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp debug/moc_testprog.cpp
+OBJECTS = debug/main.o \
+ debug/testprog.o \
+ debug/moc_testprog.o
+DIST = /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/dwarf2.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/build_pass.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusinterfaces.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusadaptors.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ smstest.pro
+QMAKE_TARGET = smstest
+DESTDIR =
+TARGET = smstest
+
+####### Custom Compiler Variables
+QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
+ -g \
+ -gdwarf-2 \
+ -Wall \
+ -W
+
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Debug $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+qmake: FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile.Debug smstest.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) debug/smstest1.0.0 || $(MKDIR) debug/smstest1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/smstest1.0.0/ && $(COPY_FILE) --parents testprog.h debug/smstest1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp debug/smstest1.0.0/ && (cd `dirname debug/smstest1.0.0` && $(TAR) smstest1.0.0.tar smstest1.0.0 && $(COMPRESS) smstest1.0.0.tar) && $(MOVE) `dirname debug/smstest1.0.0`/smstest1.0.0.tar.gz . && $(DEL_FILE) -r debug/smstest1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile.Debug
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_objective_c_make_all:
+compiler_objective_c_clean:
+compiler_moc_header_make_all: debug/moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) debug/moc_testprog.cpp
+debug/moc_testprog.cpp: testprog.h
+ /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ testprog.h -o debug/moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_rez_source_make_all:
+compiler_rez_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+debug/main.o: main.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/main.o main.cpp
+
+debug/testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/testprog.o testprog.cpp
+
+debug/moc_testprog.o: debug/moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_testprog.o debug/moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#############################################################################
+# Makefile for building: smstest
+# Generated by qmake (2.01a) (Qt 4.5.0) on: Mon Jan 25 15:05:55 2010
+# Project: smstest.pro
+# Template: app
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -Os -Wall -W $(DEFINES)
+CXXFLAGS = -pipe -Os -Wall -W $(DEFINES)
+INCPATH = -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtDBus.framework/Versions/4/Headers -I/usr/include/QtDBus -I/usr/include -I/usr/include/telepathy-1.0/ -I../../tpsession -Irelease -I. -F/Library/Frameworks
+LINK = g++
+LFLAGS = -headerpad_max_install_names
+LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -ltelepathy-qt4 -L../../tpsession -ltpsession -framework QtDBus -framework QtXml -framework QtNetwork -framework SystemConfiguration -framework QtCore -lz -lm -framework ApplicationServices
+AR = ar cq
+RANLIB = ranlib -s
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = cp -f
+COPY_DIR = cp -f -R
+INSTALL_FILE = $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = $(COPY_FILE)
+DEL_FILE = rm -f
+SYMLINK = ln -sf
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
+####### Output directory
+
+OBJECTS_DIR = release/
+
+####### Files
+
+SOURCES = main.cpp \
+ testprog.cpp release/moc_testprog.cpp
+OBJECTS = release/main.o \
+ release/testprog.o \
+ release/moc_testprog.o
+DIST = /usr/local/Qt4.5/mkspecs/common/unix.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac.conf \
+ /usr/local/Qt4.5/mkspecs/common/mac-g++.conf \
+ /usr/local/Qt4.5/mkspecs/qconfig.pri \
+ /usr/local/Qt4.5/mkspecs/features/qt_functions.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt_config.prf \
+ /usr/local/Qt4.5/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_pre.prf \
+ /usr/local/Qt4.5/mkspecs/features/release.prf \
+ /usr/local/Qt4.5/mkspecs/features/debug_and_release.prf \
+ /usr/local/Qt4.5/mkspecs/features/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/default_post.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/objective_c.prf \
+ /usr/local/Qt4.5/mkspecs/features/build_pass.prf \
+ /usr/local/Qt4.5/mkspecs/features/warn_on.prf \
+ /usr/local/Qt4.5/mkspecs/features/qt.prf \
+ /usr/local/Qt4.5/mkspecs/features/moc.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusinterfaces.prf \
+ /usr/local/Qt4.5/mkspecs/features/dbusadaptors.prf \
+ /usr/local/Qt4.5/mkspecs/features/unix/thread.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/rez.prf \
+ /usr/local/Qt4.5/mkspecs/features/mac/sdk.prf \
+ /usr/local/Qt4.5/mkspecs/features/resources.prf \
+ /usr/local/Qt4.5/mkspecs/features/uic.prf \
+ /usr/local/Qt4.5/mkspecs/features/yacc.prf \
+ /usr/local/Qt4.5/mkspecs/features/lex.prf \
+ smstest.pro
+QMAKE_TARGET = smstest
+DESTDIR =
+TARGET = smstest
+
+####### Custom Compiler Variables
+QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
+ -Os \
+ -Wall \
+ -W
+
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Release $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+qmake: FORCE
+ @$(QMAKE) -spec /usr/local/Qt4.5/mkspecs/macx-g++ -macx CONFIG+=debug_and_release -o Makefile.Release smstest.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) release/smstest1.0.0 || $(MKDIR) release/smstest1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) release/smstest1.0.0/ && $(COPY_FILE) --parents testprog.h release/smstest1.0.0/ && $(COPY_FILE) --parents main.cpp testprog.cpp release/smstest1.0.0/ && (cd `dirname release/smstest1.0.0` && $(TAR) smstest1.0.0.tar smstest1.0.0 && $(COMPRESS) smstest1.0.0.tar) && $(MOVE) `dirname release/smstest1.0.0`/smstest1.0.0.tar.gz . && $(DEL_FILE) -r release/smstest1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile.Release
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_objective_c_make_all:
+compiler_objective_c_clean:
+compiler_moc_header_make_all: release/moc_testprog.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) release/moc_testprog.cpp
+release/moc_testprog.cpp: testprog.h
+ /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ testprog.h -o release/moc_testprog.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_rez_source_make_all:
+compiler_rez_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+release/main.o: main.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/main.o main.cpp
+
+release/testprog.o: testprog.cpp testprog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/testprog.o testprog.cpp
+
+release/moc_testprog.o: release/moc_testprog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_testprog.o release/moc_testprog.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#include <QtCore/QCoreApplication>
+#include "testprog.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+ if(argc<2) {
+ qDebug() << "Usage smstest <telephone_number> <message>";
+ exit(0);
+ };
+
+ TestProg t(argv[1],argv[2]);
+
+ return a.exec();
+}
--- /dev/null
+# -------------------------------------------------
+# Project created by QtCreator 2010-01-25T14:58:18
+# -------------------------------------------------
+QT += network \
+ dbus
+QT -= gui
+INCLUDEPATH += /usr/include/telepathy-1.0/ ../../tpsession
+LIBS += -ltelepathy-qt4 -L../../tpsession -ltpsession
+TARGET = syncsms
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ testprog.cpp
+HEADERS += testprog.h
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-CommandLineArguments</variable>
+ <valuelist type="QVariantList" />
+ </data>
+ <data>
+ <variable>RunConfiguration0-ProFile</variable>
+ <value type="QString" >syncsms.pro</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString" >syncsms</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+ <value type="bool" >false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UseTerminal</variable>
+ <value type="bool" >false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+ <valuelist type="QVariantList" />
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetName</variable>
+ <value type="bool" >false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString" >Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int" >0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString" >Release</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Release</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="QtVersionId" type="int" >2</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="buildConfiguration" type="int" >0</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >Release</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="mkspec" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.qmake</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray" >UTF-8</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap" />
+ </data>
+</qtcreator>
--- /dev/null
+#include "testprog.h"
+#include <TelepathyQt4/Message>
+
+TestProg::TestProg(QString addr,QString msg)
+{
+ qDebug() << __PRETTY_FUNCTION__ ;
+ tps =new TpSession("ring",true);
+ tps->sendMessageToAddress("ring",addr,msg);
+ connect(tps,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)),
+ SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)));
+}
+
+void TestProg::onMessageReceived(const Tp::ReceivedMessage &msg,TpSessionAccount *acc)
+{
+ qDebug() << "TestProg::onMessageReceived " << msg.text() << "from " << msg.sender()->id();
+}
--- /dev/null
+#ifndef TESTPROG_H
+#define TESTPROG_H
+
+#include <QObject>
+#include <QDebug>
+#include "tpsession.h"
+#include "tpsessionaccount.h"
+
+
+class TestProg : public QObject
+{
+ Q_OBJECT
+public:
+ TestProg(QString addr,QString msg);
+public slots:
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+private:
+ TpSession* tps;
+};
+
+#endif // TESTPROG_H
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS += smstest
+SUBDIRS += syncsms
+SUBDIRS += showaccounts
+
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS += tpsession
+SUBDIRS += tests
--- /dev/null
+#############################################################################
+# Makefile for building: libtpsession.so.0.1.0
+# Generated by qmake (2.01a) (Qt 4.6.1) on: Mon Feb 8 23:30:46 2010
+# Project: tpsession.pro
+# Template: lib
+# Command: /opt/qt4-maemo5/bin/qmake -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tpsession.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = cc
+CXX = g++
+DEFINES = -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
+INCPATH = -I/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include -I/usr/include/telepathy-1.0 -I.
+LINK = g++
+LFLAGS = -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/opt/qt4-maemo5/lib -shared -Wl,-soname,libtpsession.so.0
+LIBS = $(SUBLIBS) -L/opt/qt4-maemo5/lib -L/opt/qt4-maemo5/lib -lQtNetwork -lgconf-2 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lQtDBus -lQtXml -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /opt/qt4-maemo5/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = echo
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = tpsession.cpp \
+ tpsessionaccount.cpp \
+ tpsessionchannel.cpp \
+ tpsessionobserver.cpp moc_tpsession.cpp \
+ moc_tpsessionaccount.cpp \
+ moc_tpsessionchannel.cpp \
+ moc_tpsessionobserver.cpp
+OBJECTS = tpsession.o \
+ tpsessionaccount.o \
+ tpsessionchannel.o \
+ tpsessionobserver.o \
+ moc_tpsession.o \
+ moc_tpsessionaccount.o \
+ moc_tpsessionchannel.o \
+ moc_tpsessionobserver.o
+DIST = /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ tpsession.pro
+QMAKE_TARGET = tpsession
+DESTDIR =
+TARGET = libtpsession.so.0.1.0
+TARGETA = libtpsession.a
+TARGETD = libtpsession.so.0.1.0
+TARGET0 = libtpsession.so
+TARGET1 = libtpsession.so.0
+TARGET2 = libtpsession.so.0.1
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
+ -ln -s $(TARGET) $(TARGET0)
+ -ln -s $(TARGET) $(TARGET1)
+ -ln -s $(TARGET) $(TARGET2)
+
+
+
+staticlib: $(TARGETA)
+
+$(TARGETA): $(OBJECTS) $(OBJCOMP)
+ -$(DEL_FILE) $(TARGETA)
+ $(AR) $(TARGETA) $(OBJECTS)
+
+Makefile: tpsession.pro /opt/qt4-maemo5/mkspecs/linux-g++-maemo5/qmake.conf /opt/qt4-maemo5/mkspecs/common/unix.conf \
+ /opt/qt4-maemo5/mkspecs/common/linux.conf \
+ /opt/qt4-maemo5/mkspecs/qconfig.pri \
+ /opt/qt4-maemo5/mkspecs/features/qt_functions.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt_config.prf \
+ /opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_pre.prf \
+ /opt/qt4-maemo5/mkspecs/features/release.prf \
+ /opt/qt4-maemo5/mkspecs/features/default_post.prf \
+ /opt/qt4-maemo5/mkspecs/features/warn_on.prf \
+ /opt/qt4-maemo5/mkspecs/features/qt.prf \
+ /opt/qt4-maemo5/mkspecs/features/moc.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf \
+ /opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf \
+ /opt/qt4-maemo5/mkspecs/features/unix/thread.prf \
+ /opt/qt4-maemo5/mkspecs/features/resources.prf \
+ /opt/qt4-maemo5/mkspecs/features/uic.prf \
+ /opt/qt4-maemo5/mkspecs/features/yacc.prf \
+ /opt/qt4-maemo5/mkspecs/features/lex.prf \
+ /opt/qt4-maemo5/mkspecs/features/include_source_dir.prf \
+ /opt/qt4-maemo5/lib/libQtDBus.prl \
+ /opt/qt4-maemo5/lib/libQtXml.prl \
+ /opt/qt4-maemo5/lib/libQtCore.prl \
+ /opt/qt4-maemo5/lib/libQtNetwork.prl
+ $(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tpsession.pro
+/opt/qt4-maemo5/mkspecs/common/unix.conf:
+/opt/qt4-maemo5/mkspecs/common/linux.conf:
+/opt/qt4-maemo5/mkspecs/qconfig.pri:
+/opt/qt4-maemo5/mkspecs/features/qt_functions.prf:
+/opt/qt4-maemo5/mkspecs/features/qt_config.prf:
+/opt/qt4-maemo5/mkspecs/features/exclusive_builds.prf:
+/opt/qt4-maemo5/mkspecs/features/default_pre.prf:
+/opt/qt4-maemo5/mkspecs/features/release.prf:
+/opt/qt4-maemo5/mkspecs/features/default_post.prf:
+/opt/qt4-maemo5/mkspecs/features/warn_on.prf:
+/opt/qt4-maemo5/mkspecs/features/qt.prf:
+/opt/qt4-maemo5/mkspecs/features/moc.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusinterfaces.prf:
+/opt/qt4-maemo5/mkspecs/features/dbusadaptors.prf:
+/opt/qt4-maemo5/mkspecs/features/unix/thread.prf:
+/opt/qt4-maemo5/mkspecs/features/resources.prf:
+/opt/qt4-maemo5/mkspecs/features/uic.prf:
+/opt/qt4-maemo5/mkspecs/features/yacc.prf:
+/opt/qt4-maemo5/mkspecs/features/lex.prf:
+/opt/qt4-maemo5/mkspecs/features/include_source_dir.prf:
+/opt/qt4-maemo5/lib/libQtDBus.prl:
+/opt/qt4-maemo5/lib/libQtXml.prl:
+/opt/qt4-maemo5/lib/libQtCore.prl:
+/opt/qt4-maemo5/lib/libQtNetwork.prl:
+qmake: FORCE
+ @$(QMAKE) -unix QMAKE_CC\ =\ cc QMAKE_CXX\ =\ g++ QMAKE_CFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 QMAKE_CXXFLAGS_RELEASE\ =\ \ -g\ -Wall\ -O2 -o Makefile tpsession.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/tpsession0.1 || $(MKDIR) .tmp/tpsession0.1
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/tpsession0.1/ && $(COPY_FILE) --parents tpsession.h tpsessionaccount.h tpsessionchannel.h tpsessionobserver.h .tmp/tpsession0.1/ && $(COPY_FILE) --parents tpsession.cpp tpsessionaccount.cpp tpsessionchannel.cpp tpsessionobserver.cpp .tmp/tpsession0.1/ && (cd `dirname .tmp/tpsession0.1` && $(TAR) tpsession0.1.tar tpsession0.1 && $(COMPRESS) tpsession0.1.tar) && $(MOVE) `dirname .tmp/tpsession0.1`/tpsession0.1.tar.gz . && $(DEL_FILE) -r .tmp/tpsession0.1
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA)
+ -$(DEL_FILE) Makefile
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: moc_tpsession.cpp moc_tpsessionaccount.cpp moc_tpsessionchannel.cpp moc_tpsessionobserver.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_tpsession.cpp moc_tpsessionaccount.cpp moc_tpsessionchannel.cpp moc_tpsessionobserver.cpp
+moc_tpsession.cpp: tpsessionaccount.h \
+ tpsessionchannel.h \
+ tpsessionobserver.h \
+ tpsession.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) tpsession.h -o moc_tpsession.cpp
+
+moc_tpsessionaccount.cpp: tpsessionchannel.h \
+ tpsessionaccount.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) tpsessionaccount.h -o moc_tpsessionaccount.cpp
+
+moc_tpsessionchannel.cpp: tpsessionchannel.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) tpsessionchannel.h -o moc_tpsessionchannel.cpp
+
+moc_tpsessionobserver.cpp: tpsessionobserver.h
+ /opt/qt4-maemo5/bin/moc $(DEFINES) $(INCPATH) tpsessionobserver.h -o moc_tpsessionobserver.cpp
+
+compiler_dbus_interface_source_make_all:
+compiler_dbus_interface_source_clean:
+compiler_dbus_adaptor_source_make_all:
+compiler_dbus_adaptor_source_clean:
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_dbus_interface_header_make_all:
+compiler_dbus_interface_header_clean:
+compiler_dbus_interface_moc_make_all:
+compiler_dbus_interface_moc_clean:
+compiler_dbus_adaptor_header_make_all:
+compiler_dbus_adaptor_header_clean:
+compiler_dbus_adaptor_moc_make_all:
+compiler_dbus_adaptor_moc_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+tpsession.o: tpsession.cpp tpsession.h \
+ tpsessionaccount.h \
+ tpsessionchannel.h \
+ tpsessionobserver.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tpsession.o tpsession.cpp
+
+tpsessionaccount.o: tpsessionaccount.cpp tpsessionaccount.h \
+ tpsessionchannel.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tpsessionaccount.o tpsessionaccount.cpp
+
+tpsessionchannel.o: tpsessionchannel.cpp tpsessionchannel.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tpsessionchannel.o tpsessionchannel.cpp
+
+tpsessionobserver.o: tpsessionobserver.cpp tpsessionobserver.h \
+ tpsession.h \
+ tpsessionaccount.h \
+ tpsessionchannel.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tpsessionobserver.o tpsessionobserver.cpp
+
+moc_tpsession.o: moc_tpsession.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tpsession.o moc_tpsession.cpp
+
+moc_tpsessionaccount.o: moc_tpsessionaccount.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tpsessionaccount.o moc_tpsessionaccount.cpp
+
+moc_tpsessionchannel.o: moc_tpsessionchannel.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tpsessionchannel.o moc_tpsessionchannel.cpp
+
+moc_tpsessionobserver.o: moc_tpsessionobserver.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tpsessionobserver.o moc_tpsessionobserver.cpp
+
+####### Install
+
+install_target: first FORCE
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/opt/qt4-maemo5/lib/ || $(MKDIR) $(INSTALL_ROOT)/opt/qt4-maemo5/lib/
+ -$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET)"
+ -$(STRIP) --strip-unneeded "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET)"
+ -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET0)"
+ -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET1)"
+ -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET2)"
+
+uninstall_target: FORCE
+ -$(DEL_FILE) "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET)"
+ -$(DEL_FILE) "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET0)"
+ -$(DEL_FILE) "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET1)"
+ -$(DEL_FILE) "$(INSTALL_ROOT)/opt/qt4-maemo5/lib/$(TARGET2)"
+ -$(DEL_DIR) $(INSTALL_ROOT)/opt/qt4-maemo5/lib/
+
+
+install_dev: first FORCE
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/ || $(MKDIR) $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/
+ -$(INSTALL_FILE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/tpsession.h $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/
+ -$(INSTALL_FILE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/tpsessionaccount.h $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/
+ -$(INSTALL_FILE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/tpsessionchannel.h $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/
+ -$(INSTALL_FILE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/tpsessionobserver.h $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/
+
+
+uninstall_dev: FORCE
+ -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/tpsession.h
+ -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/tpsessionaccount.h
+ -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/tpsessionchannel.h
+ -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/tpsessionobserver.h
+ -$(DEL_DIR) $(INSTALL_ROOT)/usr/include/telepathy-1.0/tpsession/
+
+
+install_pkg: first FORCE
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/pkgconfig/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/pkgconfig/
+ -$(INSTALL_FILE) /home/kathy/sb/fremantle/tpsession-0.1/tpsession/TpSession.pc $(INSTALL_ROOT)/usr/lib/pkgconfig/
+
+
+uninstall_pkg: FORCE
+ -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/pkgconfig/TpSession.pc
+ -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/pkgconfig/
+
+
+install: install_target install_dev install_pkg FORCE
+
+uninstall: uninstall_target uninstall_dev uninstall_pkg FORCE
+
+FORCE:
+
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: TpSesion
+Description: Qt4 Telepalhy-Qt4 easy to use adaptation library
+Version: 0.1
+Requires.private: QtCore >= 4.5, QtDBus >= 4.5
+Libs: -L${libdir} -ltpsession
+Cflags: -I${includedir}/telepathy-1.0/tpsession
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.0.1.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.1.0.0
\ No newline at end of file
--- /dev/null
+libtpsession.so.1.0.0
\ No newline at end of file
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include "tpsession.h"
+#include <QDebug>
+
+TpSession::TpSession(QString cmname,bool synchronous)
+{
+ Tp::registerTypes();
+ Tp::enableDebug(false);
+ Tp::enableWarnings(false);
+
+ mAM = Tp::AccountManager::create();
+ reqCm=cmname;
+ connect(mAM->becomeReady(),
+ SIGNAL(finished(Tp::PendingOperation *)),
+ SLOT(onAMReady(Tp::PendingOperation *)));
+ connect(mAM.data(),
+ SIGNAL(accountCreated(const QString &)),
+ SLOT(onAccountCreated(const QString &)));
+
+ // createObserver();
+ if(synchronous) loop.exec(); // Loop locally untill accounts are initialized
+ reqCm=cmname;
+
+}
+TpSession* TpSession::instancePtr=NULL;
+TpSession* TpSession::instance(bool synchronous)
+{
+ if(instancePtr==NULL) instancePtr=new TpSession("ring",synchronous);
+ return instancePtr;
+};
+
+void TpSession::onAMReady(Tp::PendingOperation *op)
+{
+ qDebug() << "TpSession::onAMReady";
+ TpSessionAccount *tpacc;
+
+ foreach (const QString &path, mAM->allAccountPaths()) {
+ accounts+=tpacc=new TpSessionAccount(mAM, path);
+ connect(tpacc,SIGNAL(accountReady(TpSessionAccount*)),
+ SLOT(onAccountReady(TpSessionAccount *)));
+ }
+
+}
+
+void TpSession::onReady(Tp::PendingOperation *)
+{
+};
+
+void TpSession::onAccountCreated(const QString &path)
+{
+
+ accounts+=new TpSessionAccount(mAM, path);
+}
+
+void TpSession::onAccountReady(TpSessionAccount *tpacc)
+{
+ qDebug() << "TpSession::onAccountReady:Account " << tpacc->acc->cmName() << "is Ready";
+ connect(tpacc,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)),
+ SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)));
+ if(!reqCm.isEmpty() && tpacc->acc->cmName()==reqCm) {
+ if(sync) {
+ sync=false;
+ loop.quit();
+ emit accountReady(tpacc);
+ if(!reqMsg.isEmpty()) tpacc->sendMessageToAddress(reqAddress,reqMsg);
+ }
+ }
+}
+
+void TpSession::onMessageReceived(const Tp::ReceivedMessage &msg,TpSessionAccount *acc)
+{
+ qDebug() << "TestProg::onMessageReceived " << msg.text() << "from " << msg.sender()->id();
+ emit messageReceived(msg,acc);
+}
+
+void TpSession::sendMessageToAddress(QString connectionMgr,QString address,QString message)
+{
+ TpSessionAccount *tpsa=getAccount(connectionMgr);
+ if(tpsa) tpsa->sendMessageToAddress(address,message);
+}
+
+TpSessionAccount* TpSession::getAccount(const QString cm,QString protocol)
+{
+ qDebug() << "TpSession::getAccount" << cm << " " << protocol;
+ foreach (TpSessionAccount *tpacc, accounts) {
+ if((!cm.isEmpty() && tpacc->acc->cmName()==cm) || (!protocol.isEmpty() && tpacc->acc->protocol()==protocol)) {
+ qDebug() << "TpSession::getAccount found" << tpacc->acc->cmName() << " " << tpacc->acc->protocol();
+ return tpacc;
+ }
+ }
+ return NULL;
+}
+
+void TpSession::createObserver()
+{
+
+ qDebug() << __PRETTY_FUNCTION__ ;
+
+ registrar = Tp::ClientRegistrar::create();
+
+ Tp::ChannelClassList channelFilters;
+ QMap<QString, QDBusVariant> textFilter, mediaFilter;
+ // Registering Text channel observer
+ textFilter.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType"),
+ QDBusVariant(TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT));
+ textFilter.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetHandleType"),
+ QDBusVariant(Tp::HandleTypeContact));
+ channelFilters.append(textFilter);
+
+ // Registering Media channel observer
+ mediaFilter.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType"),
+ QDBusVariant(TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAMED_MEDIA));
+ mediaFilter.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetHandleType"),
+ QDBusVariant(Tp::HandleTypeContact));
+ channelFilters.append(mediaFilter);
+
+ TpSessionObserver* observer = new TpSessionObserver( channelFilters, this );
+ bool registered = registrar->registerClient(
+ Tp::AbstractClientPtr::dynamicCast(Tp::SharedPtr<TpSessionObserver>(observer)),
+ "TpSessionChannelObserver");
+
+ qDebug() << "TpSession::createObserver" << (registered ? "started" : "failed");
+
+}
+
+
+void TpSession::createChannelListener(const QString &channelType,
+ const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ChannelPtr &channel)
+{
+ qDebug() << "TpSession::createChannelListener";
+
+ QString channelObjectPath = channel->objectPath();
+
+
+ if ( channels.contains( channelObjectPath ) &&
+ !channelType.isEmpty() &&
+ !channelObjectPath.isEmpty() ) {
+ qDebug() << "TELEPATHY_ERROR_INVALID_ARGUMENT";
+ return;
+ }
+ qDebug() << "creating listener for: " << channelObjectPath << " type " << channelType;
+#if 0
+ ChannelListener* listener = 0;
+ if( channelType == TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT ) {
+ listener = new TextChannelListener(account, channel, context);
+ } else if ( channelType == TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAMED_MEDIA ) {
+ listener = new StreamChannelListener(account, channel, context);
+ }
+
+ if(listener) {
+ connect(listener, SIGNAL(channelClosed(ChannelListener *)),
+ this, SLOT(channelClosed(ChannelListener *)));
+ Channels.append( channelObjectPath );
+ }
+#endif
+}
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSION_H
+#define TPSESSION_H
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Account>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/PendingChannelRequest>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/AccountManager>
+#include <TelepathyQt4/PendingOperation>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ClientRegistrar>
+#include <TelepathyQt4/Debug>
+
+#include <QString>
+#include <QVector>
+#include <QObject>
+
+#include "tpsessionaccount.h"
+#include "tpsessionobserver.h"
+
+class TpSession:public QObject
+{
+ Q_OBJECT
+public:
+ TpSession(QString cmname=QString(),bool synchronous=FALSE);
+
+
+ static TpSession* instance(bool synchronous=TRUE);
+ void sendMessageToAddress(QString connectionMgr,QString address,QString message);
+ TpSessionAccount* getAccount(const QString cm, const QString protocol=QString());
+ void createChannelListener(const QString &channelType,
+ const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ChannelPtr &channel);
+ void createObserver();
+
+signals:
+ void amReady(TpSession *);
+ void accountReady(TpSessionAccount *);
+ void channeReady(TpSessionAccount *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+private slots:
+ void onAMReady(Tp::PendingOperation *);
+ void onAccountCreated(const QString &);
+ void onReady(Tp::PendingOperation *);
+ void onAccountReady(TpSessionAccount *tpacc);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+public:
+ QVector<TpSessionAccount*> accounts;
+
+private:
+ static TpSession *instancePtr;
+ //TpSession *instancePtr;
+ QString reqCm;
+ QString reqAddress;
+ QString reqMsg;
+
+ bool sync; // Synchronous initialization
+ QEventLoop loop;
+ Tp::AccountManagerPtr mAM;
+ QStringList channels;
+ Tp::ClientRegistrarPtr registrar;
+};
+
+
+
+#endif // TPSESSION_H
--- /dev/null
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-02-03T18:41:42
+#
+#-------------------------------------------------
+
+QT += network dbus
+
+QT -= gui
+
+TARGET = tpsession
+CONGIG += -g
+QMAKE_STRIP=echo
+TEMPLATE = lib
+VERSION = 0.1
+#CONFIG += staticlib
+INCLUDEPATH += /usr/include/telepathy-1.0/
+
+SOURCES += tpsession.cpp tpsessionaccount.cpp tpsessionchannel.cpp tpsessionobserver.cpp
+
+HEADERS += tpsession.h tpsessionaccount.h tpsessionchannel.h tpsessionobserver.h
+
+dev.path = /usr/include/telepathy-1.0/tpsession
+dev.files = *.h
+pkg.path = /usr/lib/pkgconfig
+pkg.files = TpSession.pc
+target.path += $$[QT_INSTALL_LIBS]
+INSTALLS += target dev pkg
+
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-Arguments</variable>
+ <valuelist type="QVariantList" />
+ </data>
+ <data>
+ <variable>RunConfiguration0-Executable</variable>
+ <value type="QString" ></value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString" >Custom Executable</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-WorkingDirectory</variable>
+ <value type="QString" >$BUILDDIR</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString" >ProjectExplorer.CustomExecutableRunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int" >0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString" >Debug</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Debug</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="QtVersionId" type="int" >0</value>
+ <value key="addQDumper" type="" ></value>
+ <value key="buildDirectory" type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tpsession</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildConfiguration-Release</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="QtVersionId" type="int" >0</value>
+ <value key="addQDumper" type="" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="buildConfiguration" type="int" >10</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <valuelist key="makeargs" type="QVariantList" >
+ <value type="QString" >debug</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="buildConfiguration" type="int" >8</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <valuelist key="makeargs" type="QVariantList" >
+ <value type="QString" >release</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >Debug</value>
+ <value type="QString" >Release</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="mkspec" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.qmake</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray" >System</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap" />
+ </data>
+</qtcreator>
--- /dev/null
+#include "tpsession.h"
+
+
+Tpsession::Tpsession()
+{
+}
--- /dev/null
+#ifndef TPSESSION_H
+#define TPSESSION_H
+
+
+class Tpsession {
+public:
+ Tpsession();
+};
+
+#endif // TPSESSION_H
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-Arguments</variable>
+ <valuelist type="QVariantList" />
+ </data>
+ <data>
+ <variable>RunConfiguration0-Executable</variable>
+ <value type="QString" ></value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString" >Custom Executable</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-WorkingDirectory</variable>
+ <value type="QString" >$BUILDDIR</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString" >ProjectExplorer.CustomExecutableRunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int" >0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString" >Debug</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Debug</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="QtVersionId" type="int" >0</value>
+ <value key="buildDirectory" type="QString" >/Users/kate/scratchbox/fremantle/tpsession/tpsession/tpsession</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildConfiguration-Release</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="QtVersionId" type="int" >0</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <value key="buildConfiguration" type="int" >10</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <valuelist key="makeargs" type="QVariantList" >
+ <value type="QString" >debug</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <value key="buildConfiguration" type="int" >8</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <valuelist key="makeargs" type="QVariantList" >
+ <value type="QString" >release</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >Debug</value>
+ <value type="QString" >Release</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="mkspec" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep2</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.gdbmaros</value>
+ <value type="QString" >trolltech.qt4projectmanager.qmake</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleanstep1</variable>
+ <valuemap type="QVariantMap" >
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <value key="clean" type="bool" >true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList" >
+ <value type="QString" >trolltech.qt4projectmanager.gdbmaros</value>
+ <value type="QString" >trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray" >System</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap" />
+ </data>
+</qtcreator>
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include "tpsessionaccount.h"
+#include <TelepathyQt4/Message>
+
+TpSessionAccount::TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath):
+ mAcc(Tp::Account::create(am->dbusConnection(),am->busName(), objectPath))
+
+{
+ connect(mAcc->becomeReady(),SIGNAL(finished(Tp::PendingOperation *)),SLOT(onReady(Tp::PendingOperation *)));
+ ready=false;
+ qDebug() << "TpSessionAccount::TpSessionAccount objectPath=" << objectPath;
+};
+
+
+void TpSessionAccount::onReady(Tp::PendingOperation *op)
+{
+
+ acc = mAcc.data();
+ qDebug() << "TpSessionAccount::onReady cmName=" << acc->cmName() << "haveConnection=" <<
+ (acc->haveConnection()? ( acc->connection()->isReady() ? "Ready":"notReady"):"no");
+
+ if(acc->haveConnection()) {
+
+ connect(acc->connection()->becomeReady(Tp::Connection::FeatureRoster | Tp::Connection::FeatureSelfContact ),
+ SIGNAL(finished(Tp::PendingOperation *)),
+ SLOT(onContactsConnectionReady(Tp::PendingOperation *)));
+ if (acc->connection()->isReady() && acc->connection()->interfaces().contains(TELEPATHY_INTERFACE_CONNECTION_INTERFACE_REQUESTS)) {
+ qDebug() << "TpSessionAccount::onReady: connecting to Connection.Interface.NewChannels";
+ connect(acc->connection()->requestsInterface(),
+ SIGNAL(NewChannels(const Tp::ChannelDetailsList&)),
+ SLOT(onNewChannels(const Tp::ChannelDetailsList&)));
+ }
+ }
+ else { // If there is no connection, we are ready now, else we are ready when contacts connection is ready
+ ready=true;
+ emit accountReady(this);
+ }
+ }
+
+void TpSessionAccount::onContactsConnectionReady(Tp::PendingOperation *op)
+{
+ if (op->isError()) {
+ qWarning() << "Connection cannot become ready" << acc->cmName();
+ return;
+ }
+
+ if (acc->connection()->interfaces().contains(TELEPATHY_INTERFACE_CONNECTION_INTERFACE_REQUESTS)) {
+ qDebug() << "TpSessionAccount::onContactsConectionReady: connecting to Connection.Interface.NewChannels";
+ connect(acc->connection()->requestsInterface(),
+ SIGNAL(NewChannels(const Tp::ChannelDetailsList&)),
+ SLOT(onNewChannels(const Tp::ChannelDetailsList&)));
+ } else qDebug() << "TpSessionAccount::onContactsConnectionReady: does NO have CONNECTION_INTERFACE_REQUESTS";
+ Tp::PendingReady *pr = qobject_cast<Tp::PendingReady *>(op);
+ contactsConn = Tp::ConnectionPtr(qobject_cast<Tp::Connection *>(pr->object()));
+#if 0
+ connect(contactsConn->contactManager(),
+ SIGNAL(presencePublicationRequested(const Tp::Contacts &)),
+ SLOT(onPresencePublicationRequested(const Tp::Contacts &)));
+#endif
+ qDebug() << "TpSessionAccount::onContactsConnectionReady "<< acc->cmName() ;
+ // RosterItem *item;
+ bool exists;
+ myContacts=contactsConn->contactManager()->allKnownContacts();
+ foreach (const Tp::ContactPtr &contact, myContacts) {
+ qDebug() << "id=" <<contact->id() << " alias=" << contact->alias() << " presence=" << contact->presenceStatus() ;
+ if(contact->id()==reqContact) {
+ addOutgoingChannel(contact);
+ reqContact="";
+ }
+ };
+ if(!reqContact.isEmpty() ) makeContactFromAddress(reqContact);
+ ready=true;
+ emit accountReady(this);
+}
+
+Tp::ContactPtr TpSessionAccount::getContactFromAddress(QString id)
+{
+ Tp::ContactPtr p;
+ foreach (const Tp::ContactPtr &contact, myContacts) {
+ if(contact->id()==reqContact) return p=contact;
+ }
+ return p;
+}
+
+TpSessionChannel* TpSessionAccount::getChannelFromPeerAddress(QString id)
+{
+ TpSessionChannel* p=NULL;
+ foreach (TpSessionChannel* channel, myChannels) {
+ if(channel->peerId()==id) return p=channel;
+ }
+ return p;
+}
+
+void TpSessionAccount::makeContactFromAddress(QString address)
+{
+ reqContact=address; // When we get retrieved signal, we check if it is this one
+ Tp::PendingContacts *pc=contactsConn->contactManager()->contactsForIdentifiers(QStringList(address));
+ connect(pc,SIGNAL(finished(Tp::PendingOperation *)),SLOT(onNewContactRetrieved(Tp::PendingOperation *)));
+}
+
+void TpSessionAccount::onNewContactRetrieved(Tp::PendingOperation *op)
+{
+ Tp::PendingContacts *pcontacts = qobject_cast<Tp::PendingContacts *>(op);
+ QList<Tp::ContactPtr> contacts = pcontacts->contacts();
+ QString username = pcontacts->identifiers().first();
+ if (contacts.size() != 1 || !contacts.first()) {
+ qDebug() << "Unable to add contact " <<reqContact;
+ return;
+ }
+
+ Tp::ContactPtr contact = contacts.first();
+ qDebug() << "TpSessionAccount::onContactRetrieved" << reqContact;
+ if(!reqContact.isEmpty()) addOutgoingChannel(contacts.first());
+}
+
+void TpSessionAccount::sendMessageToAddress(QString address,QString message)
+{
+ Tp::ContactPtr p;
+ TpSessionChannel* channel=getChannelFromPeerAddress(address);
+ if(channel)
+ channel->sendMessage(message); // We have already channel
+ else {
+ reqMessage=message;
+ p=getContactFromAddress(address); // Do we have contact ready ?
+ if(p.isNull()) // If not, create it
+ makeContactFromAddress(address); // Create and after created, send
+ else
+ addOutgoingChannel(p); // Create channel and when ready, send
+ };
+}
+
+void TpSessionAccount::addOutgoingChannel(const Tp::ContactPtr &contact)
+{
+
+
+ qDebug() << "TpSessionAccount::addOutgoingChannel";
+
+ TpSessionChannel* newChannel=new TpSessionChannel(contact->manager()->connection(),contact);
+ connect(newChannel,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)),
+ SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)));
+ connect(newChannel,SIGNAL(channelReady(TpSessionChannel *)),
+ SLOT(onOutgoingChannelReady(TpSessionChannel*)));
+ myChannels+=newChannel;
+
+}
+
+void TpSessionAccount::onOutgoingChannelReady(TpSessionChannel *ch)
+{
+ qDebug() << "TpSessionAccoiunt::onOutgoingChannelReady";
+ emit channelReady(this);
+ if(!reqMessage.isEmpty()) ch->sendMessage(reqMessage);
+ reqMessage.clear();
+}
+
+
+void TpSessionAccount::onMessageSent(const Tp::Message &msg,Tp::MessageSendingFlags, const QString &flags)
+{
+ qDebug() << "TpSessionAccount::onMessageSent";
+};
+
+void TpSessionAccount::onMessageReceived(const Tp::ReceivedMessage &msg,TpSessionChannel *ch)
+{
+ qDebug() << "TpSessionAccount::onMessageReceived " << msg.text();
+ emit messageReceived(msg,this);
+};
+
+void TpSessionAccount::onNewChannels(const Tp::ChannelDetailsList &channels)
+{
+
+ Tp::TextChannelPtr myIngoingTextChannel;
+ qDebug() << "TpSessionAccount::onNewChannels";
+ foreach (const Tp::ChannelDetails &details, channels) {
+ QString channelType = details.properties.value(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType")).toString();
+ bool requested = details.properties.value(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".Requested")).toBool();
+ qDebug() << " channelType:" << channelType;
+ qDebug() << " requested :" << requested;
+
+ if (channelType == TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT && !requested) {
+
+ myIngoingTextChannel = Tp::TextChannel::create(acc->connection(),details.channel.path(),details.properties);
+ qDebug() << "TpSessionAccount::onNewChannels path=" <<"path " << myIngoingTextChannel->objectPath();
+
+ TpSessionChannel* newChannel=new TpSessionChannel( myIngoingTextChannel);
+ connect(newChannel,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)),
+ SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)));
+ myChannels+=newChannel;
+ }
+ }
+}
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSIONACCOUNT_H
+#define TPSESSIONACCOUNT_H
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Account>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/PendingChannelRequest>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/PendingContacts>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/AccountManager>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ContactManager>
+
+#include <QString>
+#include <QVector>
+
+#include "tpsessionchannel.h"
+
+class TpSessionAccount:public QObject
+{
+
+ Q_OBJECT
+public:
+ TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath);
+ void makeContactFromAddress(QString address);
+ void sendMessageToAddress(QString address,QString message);
+ Tp::ContactPtr getContactFromAddress(QString address);
+ void addOutgoingChannel(const Tp::ContactPtr &contact);
+ void addOutgoingChannel(QString address);
+ TpSessionChannel *getChannelFromPeerAddress(QString id);
+signals:
+ void accountReady(TpSessionAccount *);
+ void channelReady(TpSessionAccount *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+
+private slots:
+ void onReady(Tp::PendingOperation *op);
+ void onOutgoingChannelReady(TpSessionChannel *ch);
+ void onContactsConnectionReady(Tp::PendingOperation *op);
+ void onNewContactRetrieved(Tp::PendingOperation *op);
+ void onMessageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
+ void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
+ void onNewChannels(const Tp::ChannelDetailsList&);
+public:
+ bool ready;
+ QString reqContact;
+ QString reqMessage;
+ Tp::AccountPtr mAcc;
+ Tp::Account *acc;
+ Tp::ConnectionPtr contactsConn;
+ QSet<Tp::ContactPtr> myContacts;
+ QSet<TpSessionChannel *> myChannels;
+};
+
+#endif // TPSESSIONACCOUNT_H
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include "tpsessionchannel.h"
+
+TpSessionChannel::TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact)
+{
+ QVariantMap request;
+ qDebug() << "TpSessionChannel::TpSessionChannel" <<"contact.id() " << contact->id();
+ request.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType"),
+ TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT);
+ request.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetHandleType"),
+ (uint) Tp::HandleTypeContact);
+ request.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetHandle"),
+ contact->handle()[0]);
+
+ connect(conn->ensureChannel(request),
+ SIGNAL(finished(Tp::PendingOperation*)),
+ SLOT(onChannelCreated(Tp::PendingOperation*)));
+ peerContact=contact;
+}
+
+
+
+TpSessionChannel::TpSessionChannel(Tp::TextChannelPtr ch)
+{
+ qDebug() << "TpSessionChannel::TpSessionChannel" <<"path " << ch->objectPath();
+ channel=ch;
+ connect(channel->becomeReady(Tp::TextChannel::FeatureMessageQueue|Tp::TextChannel::FeatureMessageSentSignal),
+ SIGNAL(finished(Tp::PendingOperation *)),
+ SLOT(onChannelReady(Tp::PendingOperation *)));
+
+}
+
+void TpSessionChannel::onChannelCreated(Tp::PendingOperation *op)
+{
+ qDebug() << "TpSessionChannel::onOutgoingChannelCreated" ;
+ if (op->isError()) {
+ qWarning() << "Connection cannot become connected" ;
+ return;
+ }
+ Tp::PendingChannel *pc = qobject_cast<Tp::PendingChannel *>(op);
+
+ channel = Tp::TextChannel::create(pc->connection(),pc->objectPath(), pc->immutableProperties());
+
+ connect(channel->becomeReady(Tp::TextChannel::FeatureMessageQueue | Tp::TextChannel::FeatureMessageSentSignal),
+ SIGNAL(finished(Tp::PendingOperation*)),
+ SLOT(onChannelReady(Tp::PendingOperation*)));
+}
+
+void TpSessionChannel::onChannelReady(Tp::PendingOperation *op)
+{
+ qDebug() << "TpSessionChannel::onChannelReady type=" << channel->channelType() <<"path " << channel->objectPath() <<
+ "initiatorContact=" << (channel->initiatorContact() ? channel->initiatorContact()->id():"NULL") ;
+ ;
+ connect(channel.data(),
+ SIGNAL(messageReceived(const Tp::ReceivedMessage &)),
+ SLOT(onMessageReceived(const Tp::ReceivedMessage &)));
+ connect(channel.data(),
+ SIGNAL(messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &)),
+ SLOT(onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &)));
+ emit channelReady(this);
+ peerContact=channel->initiatorContact();
+ QList<Tp::ReceivedMessage> queuedMessages = channel->messageQueue();
+ foreach(Tp::ReceivedMessage message, queuedMessages) {
+ qDebug() << "received " << message.text();
+ emit messageReceived(message,this);
+ }
+}
+void TpSessionChannel::sendMessage(QString message)
+{
+ channel->send(message);
+}
+void TpSessionChannel::onMessageReceived(const Tp::ReceivedMessage &msg)
+{
+ qDebug() << "TpSessionChannel::onMessageReceived " << msg.text();
+ emit messageReceived(msg,this);
+};
+void TpSessionChannel::onMessageSent(const Tp::Message &msg,Tp::MessageSendingFlags sflags, const QString &flags)
+{
+ qDebug() << "TpSessionChannel::onMessageSent";
+ emit messageSent(msg,sflags,flags,this);
+};
+
+QString TpSessionChannel::peerId()
+{
+ return peerContact ? peerContact->id():"";
+}
--- /dev/null
+/*
+ * This file is part of TpSession
+ *
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Contact Kate Alhola kate.alholanokia.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef TPSESSIONCHANNEL_H
+#define TPSESSIONCHANNEL_H
+
+#include <QObject>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Message>
+#include <TelepathyQt4/PendingChannel>
+#include <TelepathyQt4/ChannelRequest>
+#include <TelepathyQt4/Channel>
+#include <TelepathyQt4/TextChannel>
+#include <TelepathyQt4/PendingReady>
+#include <TelepathyQt4/ContactManager>
+#include <TelepathyQt4/Connection>
+
+class TpSessionChannel : public QObject
+{
+ Q_OBJECT
+public:
+ TpSessionChannel(Tp::TextChannelPtr);
+ TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
+ void sendMessage(QString message);
+ QString peerId();
+signals:
+ void channelReady(TpSessionChannel *);
+ void messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
+ void messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
+public slots:
+ void onChannelCreated(Tp::PendingOperation *op);
+ void onChannelReady(Tp::PendingOperation *op);
+ void onMessageReceived(const Tp::ReceivedMessage &);
+ void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
+public:
+ Tp::ContactPtr peerContact;
+ Tp::TextChannelPtr channel;
+};
+
+#endif // TPSESSIONCHANNEL_H
--- /dev/null
+#include "tpsessionobserver.h"
+#include "tpsession.h"
+#include <TelepathyQt4/Channel>
+
+TpSessionObserver::TpSessionObserver(const Tp::ChannelClassList &channelFilter,TpSession *session):Tp::AbstractClientObserver(channelFilter)
+{
+ tpSession=session;
+ qDebug() << __PRETTY_FUNCTION__ ;
+}
+
+void TpSessionObserver::observeChannels(const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ConnectionPtr &connection,
+ const QList<Tp::ChannelPtr> &channels,
+ const Tp::ChannelDispatchOperationPtr &dispatchOperation,
+ const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
+ const QVariantMap &observerInfo)
+{
+ Q_UNUSED(dispatchOperation)
+ Q_UNUSED(requestsSatisfied)
+ Q_UNUSED(observerInfo)
+ Q_UNUSED(connection)
+
+ qDebug() << "TpSessionObserver::observeChannels";
+
+ foreach(Tp::ChannelPtr channel, channels) {
+ QVariantMap properties = channel->immutableProperties();
+ QString channelType = properties.value(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType")).toString();
+ if( !channelType.isNull() && !channelType.isEmpty()) {
+ qDebug() << "ChannelType=" << channelType;
+ tpSession->createChannelListener(channelType, context, account, channel);
+ }
+ }
+}
+
--- /dev/null
+#ifndef TPSESSIONOBSERVER_H
+#define TPSESSIONOBSERVER_H
+
+#include <QObject>
+#include <TelepathyQt4/AbstractClientObserver>
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Channel>
+
+class TpSession;
+
+class TpSessionObserver : public QObject , public Tp::AbstractClientObserver
+{
+ Q_OBJECT
+public:
+ TpSessionObserver(const Tp::ChannelClassList &channelfilter,TpSession *session);
+ TpSession *tpSession;
+
+
+ /*!
+ * \brief Realisation of Tp::AbstractClientObserver
+ */
+ virtual void observeChannels(const Tp::MethodInvocationContextPtr<> &context,
+ const Tp::AccountPtr &account,
+ const Tp::ConnectionPtr &connection,
+ const QList<Tp::ChannelPtr> &channels,
+ const Tp::ChannelDispatchOperationPtr &dispatchOperation,
+ const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
+ const QVariantMap &observerInfo);
+};
+
+#endif // TPSESSIONOBSERVER_H