1 <?xml version="1.0" encoding="iso-8859-1"?>
3 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <title>tpsession: tpsessionaccount.h Source File</title>
7 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <table border="0" cellpadding="0" cellspacing="0" width="100%">
12 <td width="1"> </td>
13 <td class="postheader" valign="center">
15 <font color="#004faf">Home</font></a> ·
16 <a href="classes.html">
17 <font color="#004faf">All Classes</font></a> ·
18 <a href="namespaces.html">
19 <font color="#004faf">All Namespaces</font></a> ·
20 <a href="modules.html">
21 <font color="#004faf">Modules</font></a> ·
22 <a href="functions.html">
23 <font color="#004faf">Functions</font></a> ·
25 <font color="#004faf">Files</font></a>
31 <!-- Generated by Doxygen 1.5.6 -->
32 <h1>tpsessionaccount.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
33 <a name="l00002"></a>00002 <span class="comment"> * This file is part of TpSession</span>
34 <a name="l00003"></a>00003 <span class="comment"> *</span>
35 <a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).</span>
36 <a name="l00005"></a>00005 <span class="comment"> * Contact Kate Alhola kate.alholanokia.com</span>
37 <a name="l00006"></a>00006 <span class="comment"> *</span>
38 <a name="l00007"></a>00007 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
39 <a name="l00008"></a>00008 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
40 <a name="l00009"></a>00009 <span class="comment"> * License as published by the Free Software Foundation; either</span>
41 <a name="l00010"></a>00010 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
42 <a name="l00011"></a>00011 <span class="comment"> *</span>
43 <a name="l00012"></a>00012 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
44 <a name="l00013"></a>00013 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
45 <a name="l00014"></a>00014 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
46 <a name="l00015"></a>00015 <span class="comment"> * Lesser General Public License for more details.</span>
47 <a name="l00016"></a>00016 <span class="comment"> *</span>
48 <a name="l00017"></a>00017 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
49 <a name="l00018"></a>00018 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
50 <a name="l00019"></a>00019 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</span>
51 <a name="l00020"></a>00020 <span class="comment"> */</span>
52 <a name="l00021"></a>00021 <span class="preprocessor">#ifndef TPSESSIONACCOUNT_H</span>
53 <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define TPSESSIONACCOUNT_H</span>
54 <a name="l00023"></a>00023 <span class="preprocessor"></span>
55 <a name="l00024"></a>00024 <span class="preprocessor">#include <TelepathyQt4/Types></span>
56 <a name="l00025"></a>00025 <span class="preprocessor">#include <TelepathyQt4/Account></span>
57 <a name="l00026"></a>00026 <span class="preprocessor">#include <TelepathyQt4/Types></span>
58 <a name="l00027"></a>00027 <span class="preprocessor">#include <TelepathyQt4/PendingChannelRequest></span>
59 <a name="l00028"></a>00028 <span class="preprocessor">#include <TelepathyQt4/ChannelRequest></span>
60 <a name="l00029"></a>00029 <span class="preprocessor">#include <TelepathyQt4/PendingChannel></span>
61 <a name="l00030"></a>00030 <span class="preprocessor">#include <TelepathyQt4/PendingContacts></span>
62 <a name="l00031"></a>00031 <span class="preprocessor">#include <TelepathyQt4/Channel></span>
63 <a name="l00032"></a>00032 <span class="preprocessor">#include <TelepathyQt4/TextChannel></span>
64 <a name="l00033"></a>00033 <span class="preprocessor">#include <TelepathyQt4/AccountManager></span>
65 <a name="l00034"></a>00034 <span class="preprocessor">#include <TelepathyQt4/PendingReady></span>
66 <a name="l00035"></a>00035 <span class="preprocessor">#include <TelepathyQt4/ContactManager></span>
67 <a name="l00036"></a>00036
68 <a name="l00037"></a>00037 <span class="preprocessor">#include <QString></span>
69 <a name="l00038"></a>00038 <span class="preprocessor">#include <QVector></span>
70 <a name="l00039"></a>00039
71 <a name="l00040"></a>00040 <span class="preprocessor">#include "tpsessionchannel.h"</span>
72 <a name="l00041"></a>00041
73 <a name="l00042"></a><a class="code" href="classTpSessionAccount.html">00042</a> <span class="keyword">class </span><a class="code" href="classTpSessionAccount.html">TpSessionAccount</a>:<span class="keyword">public</span> QObject
74 <a name="l00043"></a>00043 {
75 <a name="l00044"></a>00044
76 <a name="l00045"></a>00045 Q_OBJECT
77 <a name="l00046"></a>00046 <span class="keyword">public</span>:
78 <a name="l00047"></a>00047 <a class="code" href="classTpSessionAccount.html#b19c1fb21729ac16132e7296ab44f6c4">TpSessionAccount</a>(Tp::AccountManagerPtr am,<span class="keyword">const</span> QString &objectPath);
79 <a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#3af12bade7043015795033f502f62672">makeContactFromAddress</a>(QString address);
80 <a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#4e82d7e642624e26c95c7fd50cc6036e">sendMessageToAddress</a>(QString address,QString message);
81 <a name="l00050"></a>00050 Tp::ContactPtr <a class="code" href="classTpSessionAccount.html#3d3d2da73e5f67647f38ba852ab430bc">getContactFromAddress</a>(QString address);
82 <a name="l00051"></a>00051 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#eede7d73e03748efd32eadfefc39bffb">addOutgoingChannel</a>(<span class="keyword">const</span> Tp::ContactPtr &contact);
83 <a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#eede7d73e03748efd32eadfefc39bffb">addOutgoingChannel</a>(QString address);
84 <a name="l00053"></a>00053 <a class="code" href="classTpSessionChannel.html">TpSessionChannel</a> *<a class="code" href="classTpSessionAccount.html#58ca99067933c4638d77b98060ed61ce">getChannelFromPeerAddress</a>(QString <span class="keywordtype">id</span>);
85 <a name="l00054"></a>00054 signals:
86 <a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#73355b0eefdb9ddf9256cf5564a15384">accountReady</a>(<a class="code" href="classTpSessionAccount.html">TpSessionAccount</a> *);
87 <a name="l00056"></a>00056 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#a2b30459e5f7d162ca1e8ac6e6b6aca9">channelReady</a>(<a class="code" href="classTpSessionAccount.html">TpSessionAccount</a> *);
88 <a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#4140850eed688948df8e86b760ca3ffd">messageReceived</a>(<span class="keyword">const</span> Tp::ReceivedMessage &,<a class="code" href="classTpSessionAccount.html">TpSessionAccount</a> *);
89 <a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#b806c00178f61caa5f5c21737bee30b1">messageSent</a>(<span class="keyword">const</span> Tp::Message &,<a class="code" href="classTpSessionAccount.html">TpSessionAccount</a> *);
90 <a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="classTpSessionAccount.html#2de3915f66997c3a0c216e8000d91ed9">newChannel</a>(<a class="code" href="classTpSessionAccount.html">TpSessionAccount</a> *,QString,QString,<span class="keyword">const</span> Tp::ChannelDetails &);
91 <a name="l00060"></a>00060
92 <a name="l00061"></a>00061 <span class="keyword">private</span> slots:
93 <a name="l00062"></a>00062 <span class="keywordtype">void</span> onReady(Tp::PendingOperation *op);
94 <a name="l00063"></a>00063 <span class="keywordtype">void</span> onOutgoingChannelReady(<a class="code" href="classTpSessionChannel.html">TpSessionChannel</a> *ch);
95 <a name="l00064"></a>00064 <span class="keywordtype">void</span> onContactsConnectionReady(Tp::PendingOperation *op);
96 <a name="l00065"></a>00065 <span class="keywordtype">void</span> onNewContactRetrieved(Tp::PendingOperation *op);
97 <a name="l00066"></a>00066 <span class="keywordtype">void</span> onMessageReceived(<span class="keyword">const</span> Tp::ReceivedMessage &,<a class="code" href="classTpSessionChannel.html">TpSessionChannel</a> *);
98 <a name="l00067"></a>00067 <span class="keywordtype">void</span> onMessageSent(<span class="keyword">const</span> Tp::Message &,Tp::MessageSendingFlags, <span class="keyword">const</span> QString &);
99 <a name="l00068"></a>00068 <span class="keywordtype">void</span> onNewChannels(<span class="keyword">const</span> Tp::ChannelDetailsList&);
100 <a name="l00069"></a>00069 <span class="keyword">public</span>:
101 <a name="l00070"></a><a class="code" href="classTpSessionAccount.html#65cf7d7f8e531611b245355ab91fd749">00070</a> <span class="keywordtype">bool</span> <a class="code" href="classTpSessionAccount.html#65cf7d7f8e531611b245355ab91fd749">ready</a>;
102 <a name="l00071"></a><a class="code" href="classTpSessionAccount.html#812aa6daef507d1160d10caa0a2da2cb">00071</a> QString <a class="code" href="classTpSessionAccount.html#812aa6daef507d1160d10caa0a2da2cb">reqContact</a>;
103 <a name="l00072"></a><a class="code" href="classTpSessionAccount.html#87019bc570d44c486d81d25d2754e9d2">00072</a> QString <a class="code" href="classTpSessionAccount.html#87019bc570d44c486d81d25d2754e9d2">reqMessage</a>;
104 <a name="l00073"></a><a class="code" href="classTpSessionAccount.html#0168640dcc9b3c10d789f26c72748d67">00073</a> Tp::AccountPtr <a class="code" href="classTpSessionAccount.html#0168640dcc9b3c10d789f26c72748d67">mAcc</a>;
105 <a name="l00074"></a><a class="code" href="classTpSessionAccount.html#fe7075930a041895433afe50bc4d16ad">00074</a> Tp::Account *<a class="code" href="classTpSessionAccount.html#fe7075930a041895433afe50bc4d16ad">acc</a>;
106 <a name="l00075"></a><a class="code" href="classTpSessionAccount.html#ec5a7f40af13da8e5bded021424876ad">00075</a> Tp::ConnectionPtr <a class="code" href="classTpSessionAccount.html#ec5a7f40af13da8e5bded021424876ad">contactsConn</a>;
107 <a name="l00076"></a><a class="code" href="classTpSessionAccount.html#965cbc0d97a0dfc23ae5d841f4ddac39">00076</a> QSet<Tp::ContactPtr> <a class="code" href="classTpSessionAccount.html#965cbc0d97a0dfc23ae5d841f4ddac39">myContacts</a>;
108 <a name="l00077"></a><a class="code" href="classTpSessionAccount.html#d49a82e6533321973a37f495af68d0b3">00077</a> QSet<TpSessionChannel *> <a class="code" href="classTpSessionAccount.html#d49a82e6533321973a37f495af68d0b3">myChannels</a>;
109 <a name="l00078"></a>00078 };
110 <a name="l00079"></a>00079
111 <a name="l00080"></a>00080 <span class="preprocessor">#endif // TPSESSIONACCOUNT_H</span>
113 <p /><address><hr /><div align="center">
114 <table width="100%" cellspacing="0" border="0"><tr class="address">
115 <td width="30%">Copyright © 2010 Nokia Corporation</td>
116 <td width="30%" align="right"><div align="right">TpSession </div></td>
117 </tr></table></div></address>