#############################################################################
# Makefile for building: tpsession
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 10 14:27:46 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed May 26 19:59:19 2010
# Project: tpsession.pro
# Template: subdirs
# Command: /usr/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
Priority: extra
Architecture: armel
Depends: tpsession
-Installed-Size: 894
+Installed-Size: 900
Maintainer: Kate Alhola <kate.alhola@nokia.com>
Source: tpsession
Description: Easy to use API to Telepathy-Qt4 debug symbols
-abf7dc098c9ab93af0b7cf66c8a57927 usr/lib/debug/usr/lib/libtpsession.so.0.1.0
-76fabb1b886f434c90b04f1229c84b75 usr/share/doc/libtpsession-dbg/changelog.Debian.gz
+279d55edf2dbbaa8a9ef9e80e6afa950 usr/lib/debug/usr/lib/libtpsession.so.0.1.0
+7db70a8516956741d44ddbd4ab9e664a usr/share/doc/libtpsession-dbg/changelog.Debian.gz
707f20563222a064607acf41d3e5c7b2 usr/share/doc/libtpsession-dbg/copyright
f5dc0a769f2e6fb59be9c66b55b738ad usr/include/telepathy-1.0/tpsession/tpsession.h
-500e045bff6fe974334a1e6ede7df235 usr/include/telepathy-1.0/tpsession/tpsessionaccount.h
-c71b18e6d08b33ab9bfdd9fd98816704 usr/include/telepathy-1.0/tpsession/tpsessionchannel.h
+91a79511e7fde9bf828b69f2479a8c10 usr/include/telepathy-1.0/tpsession/tpsessionaccount.h
+1db2a0ee688a22591395915a69840c00 usr/include/telepathy-1.0/tpsession/tpsessionchannel.h
da668240e6a6465d26576272ecb52b48 usr/include/telepathy-1.0/tpsession/tpsessionobserver.h
4987dc18c04e1e486b0c518dcd0ef913 usr/lib/pkgconfig/TpSession.pc
-76fabb1b886f434c90b04f1229c84b75 usr/share/doc/libtpsession-dev/changelog.Debian.gz
+7db70a8516956741d44ddbd4ab9e664a usr/share/doc/libtpsession-dev/changelog.Debian.gz
707f20563222a064607acf41d3e5c7b2 usr/share/doc/libtpsession-dev/copyright
Q_OBJECT
public:
TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath);
- void makeContactFromAddress(QString address);
+ bool makeContactFromAddress(QString address);
void sendMessageToAddress(QString address,QString message);
Tp::ContactPtr getContactFromAddress(QString address);
void addOutgoingChannel(const Tp::ContactPtr &contact);
signals:
void accountReady(TpSessionAccount *);
void channelReady(TpSessionAccount *);
+ void messageQueued(TpSessionAccount *,bool);
void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
void messageSent(const Tp::Message &,TpSessionAccount *);
void newChannel(TpSessionAccount *,QString,QString,const Tp::ChannelDetails &);
+ void contactRetrieved(Tp::ContactPtr,bool,bool);
private slots:
void onReady(Tp::PendingOperation *op);
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 onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
void onNewChannels(const Tp::ChannelDetailsList&);
public:
bool ready;
TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
void sendMessage(QString message);
QString peerId();
+ QString objectPath();
+ QString type();
signals:
void channelReady(TpSessionChannel *);
void channelDestroyed(TpSessionChannel *);
Priority: extra
Architecture: armel
Depends: libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-core (>= 4.6.2~git20100310), libqt4-dbus (>= 4.6.2~git20100310), libqt4-network (>= 4.6.2~git20100310), libqt4-xml (>= 4.6.2~git20100310), libstdc++6 (>= 4.2.1)
-Installed-Size: 62
+Installed-Size: 64
Maintainer: Kate Alhola <kate.alhola@nokia.com>
Source: tpsession
Description: Easy to use API to Telepathy-Qt4
-771a90e449537f4fd4f9ccacc0ea2492 usr/lib/libtpsession.so.0.1.0
-76fabb1b886f434c90b04f1229c84b75 usr/share/doc/libtpsession/changelog.Debian.gz
+3550dafd99a7f78a42d7822e2bf13c6c usr/lib/libtpsession.so.0.1.0
+7db70a8516956741d44ddbd4ab9e664a usr/share/doc/libtpsession/changelog.Debian.gz
707f20563222a064607acf41d3e5c7b2 usr/share/doc/libtpsession/copyright
566711be92c93313ec96c77fe9477c68 usr/share/doc/libtpsession/README.Debian
Q_OBJECT
public:
TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath);
- void makeContactFromAddress(QString address);
+ bool makeContactFromAddress(QString address);
void sendMessageToAddress(QString address,QString message);
Tp::ContactPtr getContactFromAddress(QString address);
void addOutgoingChannel(const Tp::ContactPtr &contact);
signals:
void accountReady(TpSessionAccount *);
void channelReady(TpSessionAccount *);
+ void messageQueued(TpSessionAccount *,bool);
void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
void messageSent(const Tp::Message &,TpSessionAccount *);
void newChannel(TpSessionAccount *,QString,QString,const Tp::ChannelDetails &);
+ void contactRetrieved(Tp::ContactPtr,bool,bool);
private slots:
void onReady(Tp::PendingOperation *op);
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 onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
void onNewChannels(const Tp::ChannelDetailsList&);
public:
bool ready;
TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
void sendMessage(QString message);
QString peerId();
+ QString objectPath();
+ QString type();
signals:
void channelReady(TpSessionChannel *);
void channelDestroyed(TpSessionChannel *);
#############################################################################
# Makefile for building: tests
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 10 14:28:10 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed May 26 19:59:25 2010
# Project: tests.pro
# Template: subdirs
# Command: /usr/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
#############################################################################
# Makefile for building: showaccounts
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 10 14:28:31 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed May 26 19:59:46 2010
# Project: showaccounts.pro
# Template: app
# Command: /usr/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
#############################################################################
# Makefile for building: smstest
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 10 14:28:10 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed May 26 19:59:25 2010
# Project: smstest.pro
# Template: app
# Command: /usr/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
<!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" />
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">0</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">debug</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/Users/kate/scratchbox/fremantle/tpsession/tests/smstest</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">release</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/mnt/hgfs/scratchbox/fremantle/tpsession/tpsession-0.1/tests/smstest-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">smstest</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">../../../../../../../../Users/kate/scratchbox/fremantle/tpsession/tests/smstest/smstest.pro</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="int">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">4</value>
</data>
</qtcreator>
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__ ;
+ connect(tpsa,SIGNAL(messageQueued(TpSessionAccount *,bool)),SLOT(onMessageQueued(TpSessionAccount *,bool)));
tpsa->sendMessageToAddress(address,message);
};
{
qDebug() << "TestProg::onMessageReceived " << msg.text() << "from " << msg.sender()->id();
}
+void TestProg::onMessageQueued(TpSessionAccount *acc,bool status)
+{
+ qDebug() << "TestProg::onMessageQueued " << status;
+}
public slots:
void onAccountReady(TpSessionAccount *);
void onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
+ void onMessageQueued(TpSessionAccount *acc,bool status);
private:
QString address;
QString message;
#############################################################################
# Makefile for building: syncsms
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 10 14:28:20 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed May 26 19:59:36 2010
# Project: syncsms.pro
# Template: app
# Command: /usr/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
#############################################################################
# Makefile for building: libtpsession.so.0.1.0
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 10 14:27:47 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed May 26 19:59:20 2010
# Project: tpsession.pro
# Template: lib
# Command: /usr/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
void TpSession::onAMReady(Tp::PendingOperation *op)
{
+ Q_UNUSED(op);
// qDebug() << "TpSession::onAMReady";
TpSessionAccount *tpacc;
void TpSession::onAccountReady(TpSessionAccount *tpacc)
{
- qDebug() << "TpSession::onAccountReady:Account " << tpacc->acc->cmName() << "is Ready sync=" << sync << "waiting:" << reqCm;
+ //qDebug() << "TpSession::onAccountReady:Account " << tpacc->acc->cmName() << "is Ready sync=" << sync << "waiting:" << reqCm;
connect(tpacc,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)),
SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionAccount *)));
if(!reqCm.isEmpty() && tpacc->acc->cmName()==reqCm) {
bool registered = registrar->registerClient(
Tp::AbstractClientPtr::dynamicCast(Tp::SharedPtr<TpSessionObserver>(observer)),
"TpSessionChannelObserver");
-
- // qDebug() << "TpSession::createObserver" << (registered ? "started" : "failed");
+ qDebug() << "TpSession::createObserver" << (registered ? "started" : "failed");
}
const Tp::AccountPtr &account,
const Tp::ChannelPtr &channel)
{
- qDebug() << "TpSession::createChannelListener";
+ Q_UNUSED(context);
+ Q_UNUSED(account);
+ qDebug() << "TpSession::createChannelListener";
QString channelObjectPath = channel->objectPath();
<!DOCTYPE QtCreatorProject>
<qtcreator>
<data>
- <variable>RunConfiguration0-Arguments</variable>
- <valuelist type="QVariantList" />
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">0</value>
</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-0.1/tpsession</value>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value key="EditorConfiguration.Codec" type="QByteArray">System</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>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">debug</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/Users/kate/scratchbox/fremantle/tpsession/tpsession-0.1/tpsession</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">release</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/mnt/hgfs/scratchbox/fremantle/tpsession/tpsession-0.1/tpsession-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments" type="QVariantList"/>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.Executable" type="QString"></value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.UserName" type="QString"></value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.UserSetName" type="bool">false</value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory" type="QString">$BUILDDIR</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Custom Executable</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</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>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="int">1</value>
</data>
<data>
- <variable>project</variable>
- <valuemap type="QVariantMap" />
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">4</value>
</data>
</qtcreator>
void TpSessionAccount::onReady(Tp::PendingOperation *op)
{
-
+ Q_UNUSED(op);
acc = mAcc.data();
// qDebug() << "TpSessionAccount::onReady cmName=" << acc->cmName() << "haveConnection=" <<
// (acc->haveConnection()? ( acc->connection()->isReady() ? "Ready":"notReady"):"no");
#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() ;
Tp::ContactPtr TpSessionAccount::getContactFromAddress(QString id)
{
+ Q_UNUSED(id);
Tp::ContactPtr p;
foreach (const Tp::ContactPtr &contact, myContacts) {
- if(contact->id()==reqContact) return p=contact;
+ if(contact->id()==id) return p=contact;
}
return p;
}
{
TpSessionChannel* p=NULL;
foreach (TpSessionChannel* channel, myChannels) {
- if(channel->peerId()==id) return p=channel;
+ if(channel->peerId()==id) p=channel;
}
return p;
}
* Creates new contact with given address. This function is Acynchronous, it sends request to contact manager for contact creation,
*
* \param address Contact address/id, as example email address, telephone number etc.
- */
+ * \return true in success
+ *
+ * \return emits contactRetrieved(Tp:.contactPtr,bool success,bool requested)
+*/
-void TpSessionAccount::makeContactFromAddress(QString address)
+bool TpSessionAccount::makeContactFromAddress(QString address)
{
+ if(!contactsConn) return false; // No contacts connection, return fail
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 *)));
+ return true;
}
void TpSessionAccount::onNewContactRetrieved(Tp::PendingOperation *op)
{
+ Tp::ContactPtr contact;
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;
+ emit contactRetrieved(contact,false,false);
+ if(!reqMessage.isEmpty()) { // If there is requesting messsage, can't queue if contact failed
+ emit messageQueued(this,false);
+ reqMessage.clear();
+ };
+
return;
}
- Tp::ContactPtr contact = contacts.first();
+ contact = contacts.first();
// qDebug() << "TpSessionAccount::onContactRetrieved" << reqContact;
- if(!reqContact.isEmpty()) addOutgoingChannel(contacts.first());
+ if(!reqContact.isEmpty()) {
+ addOutgoingChannel(contacts.first());
+ emit contactRetrieved(contact,true,true);
+ }
+ else
+ emit contactRetrieved(contact,true,false);
}
/**
* Send message to given address. This function is compled Acynchronous function that may produce multiple state transitions beforecomletion.
Tp::ContactPtr p;
TpSessionChannel* channel=getChannelFromPeerAddress(address);
if(channel) {
+ // qDebug() << "TpSessionAccount::sendMessageToAddress peer:" << channel->peerId() << "queuing:" << message;
channel->sendMessage(message); // We have already channel
- emit messageQueued(this);
+ emit messageQueued(this,true);
}
else {
reqMessage=message;
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(messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *)),
+ SLOT(onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *)));
connect(newChannel,SIGNAL(channelReady(TpSessionChannel *)),
SLOT(onOutgoingChannelReady(TpSessionChannel*)));
myChannels+=newChannel;
void TpSessionAccount::onOutgoingChannelReady(TpSessionChannel *ch)
{
- // qDebug() << "TpSessionAccoiunt::onOutgoingChannelReady";
+ // qDebug() << "TpSessionAccount::onOutgoingChannelReady";
emit channelReady(this);
if(!reqMessage.isEmpty()) {
+ // qDebug() << "TpSessionAccount::onOutgoingChannelReady peer:" << ch->peerId() << "queuing:" << reqMessage;
ch->sendMessage(reqMessage);
- emit messageQueued(this);
+ emit messageQueued(this,true);
};
reqMessage.clear();
}
-void TpSessionAccount::onMessageSent(const Tp::Message &msg,Tp::MessageSendingFlags, const QString &flags)
+void TpSessionAccount::onMessageSent(const Tp::Message &msg,Tp::MessageSendingFlags, const QString &flags,TpSessionChannel *ch)
{
- // qDebug() << "TpSessionAccount::onMessageSent";
+ Q_UNUSED(flags);
+ // qDebug() << "TpSessionAccount::onMessageSent peer:" << ch->peerId() <<"txt:" << msg.text();
emit messageSent(msg,this);
};
void TpSessionAccount::onMessageReceived(const Tp::ReceivedMessage &msg,TpSessionChannel *ch)
{
+ Q_UNUSED(ch);
// qDebug() << "TpSessionAccount::onMessageReceived " << msg.text();
- emit messageReceived(msg,this);
+ emit messageReceived(msg,this);
};
void TpSessionAccount::onNewChannels(const Tp::ChannelDetailsList &channels)
TpSessionChannel* newChannel=new TpSessionChannel( myIngoingTextChannel);
connect(newChannel,SIGNAL(messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)),
SLOT(onMessageReceived(const Tp::ReceivedMessage &,TpSessionChannel *)));
+ connect(newChannel,SIGNAL(messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *)),
+ SLOT(onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *)));
myChannels+=newChannel;
}
if (channelType == TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAMED_MEDIA && !requested) {
Q_OBJECT
public:
TpSessionAccount(Tp::AccountManagerPtr am,const QString &objectPath);
- void makeContactFromAddress(QString address);
+ bool makeContactFromAddress(QString address);
void sendMessageToAddress(QString address,QString message);
Tp::ContactPtr getContactFromAddress(QString address);
void addOutgoingChannel(const Tp::ContactPtr &contact);
signals:
void accountReady(TpSessionAccount *);
void channelReady(TpSessionAccount *);
- void messageQueued(TpSessionAccount *);
+ void messageQueued(TpSessionAccount *,bool);
void messageReceived(const Tp::ReceivedMessage &,TpSessionAccount *);
void messageSent(const Tp::Message &,TpSessionAccount *);
void newChannel(TpSessionAccount *,QString,QString,const Tp::ChannelDetails &);
+ void contactRetrieved(Tp::ContactPtr,bool,bool);
private slots:
void onReady(Tp::PendingOperation *op);
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 onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
void onNewChannels(const Tp::ChannelDetailsList&);
public:
bool ready;
TpSessionChannel::TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact)
{
QVariantMap request;
- // qDebug() << "TpSessionChannel::TpSessionChannel" <<"contact.id() " << contact->id();
+ // qDebug() << "TpSessionChannel::TpSessionChannel" <<"contact.id() " << contact->id() << contact->id().toLocal8Bit().toHex();
request.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType"),
TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT);
request.insert(QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetHandleType"),
SLOT(onChannelReady(Tp::PendingOperation*)));
}
+QString TpSessionChannel::objectPath()
+{
+ return channel->objectPath();
+}
+QString TpSessionChannel::type()
+{
+ return channel->channelType();
+}
void TpSessionChannel::onChannelReady(Tp::PendingOperation *op)
{
- // qDebug() << "TpSessionChannel::onChannelReady type=" << channel->channelType() <<"path " << channel->objectPath() <<
- // "initiatorContact=" << (channel->initiatorContact() ? channel->initiatorContact()->id():"NULL") ;
+ Q_UNUSED(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 &)),
SIGNAL(messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &)),
SLOT(onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &)));
connect(channel.data(),SIGNAL(destroyed(QObject *)),SLOT(onChannelDestroyed(QObject *)));
+ if(peerId().isEmpty()) peerContact=channel->initiatorContact(); // If this is incoming channel
emit channelReady(this);
- peerContact=channel->initiatorContact();
QList<Tp::ReceivedMessage> queuedMessages = channel->messageQueue();
foreach(Tp::ReceivedMessage message, queuedMessages) {
// qDebug() << "received " << message.text();
};
void TpSessionChannel::onMessageSent(const Tp::Message &msg,Tp::MessageSendingFlags sflags, const QString &flags)
{
- // qDebug() << "TpSessionChannel::onMessageSent";
+ // qDebug() << "TpSessionChannel::onMessageSen" << peerId() <<"txt:" << msg.text();;
emit messageSent(msg,sflags,flags,this);
};
/**
*/
QString TpSessionChannel::peerId()
{
- return peerContact ? peerContact->id():"";
+ return peerContact ? peerContact->id():QString();
}
void TpSessionChannel::onChannelDestroyed(QObject *obj)
{
- // qDebug() << "TpSessionChannel::onChannelDestroyed";
+ Q_UNUSED(obj);
+ qDebug() << "TpSessionChannel::onChannelDestroyed";
//TpSessionChannel *call = (TpSessionChannel *) obj;
emit channelDestroyed(this);
}
TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
void sendMessage(QString message);
QString peerId();
+ QString objectPath();
+ QString type();
signals:
void channelReady(TpSessionChannel *);
void channelDestroyed(TpSessionChannel *);