1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TelepathyQt4: call/main.cpp</title>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1"> </td>
<td class="postheader" valign="center">
<a href="index.html">
<font color="#004faf">Home</font></a> ·
<a href="classes.html">
<font color="#004faf">All Classes</font></a> ·
<a href="namespaces.html">
<font color="#004faf">All Namespaces</font></a> ·
<a href="modules.html">
<font color="#004faf">Modules</font></a> ·
<a href="functions.html">
<font color="#004faf">Functions</font></a> ·
<a href="files.html">
<font color="#004faf">Files</font></a>
</td>
</tr>
</table>
</body>
</html>
<!-- Generated by Doxygen 1.6.3 -->
<div class="contents">
<h1><a class="anchor" id="call_example_main">call/main.cpp </a></h1><div class="fragment"><pre class="fragment"><span class="preprocessor">#include <glib-object.h></span>
<span class="preprocessor">#include <gst/gst.h></span>
<span class="preprocessor">#include <TelepathyQt4/Debug></span>
<span class="preprocessor">#include <TelepathyQt4/Constants></span>
<span class="preprocessor">#include <TelepathyQt4/Types></span>
<span class="preprocessor">#include <QDebug></span>
<span class="preprocessor">#include <QtGui></span>
<span class="preprocessor">#include "call-window.h"</span>
<span class="preprocessor">#include "farsight-channel.h"</span>
<span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
{
g_type_init();
gst_init(&argc, &argv);
QApplication app(argc, argv);
<span class="keywordflow">if</span> (argc < 3) {
qDebug() << <span class="stringliteral">"usage: call username password"</span>;
<span class="keywordflow">return</span> 1;
}
app.setAttribute(Qt::AA_NativeWindows);
<a class="code" href="namespaceTp.html#ab8312af992258c4c971d5dfe745f6ba9">Tp::registerTypes</a>();
<a class="code" href="group__debug.html#ga52cbf229d908f8ea516b53f074e44241">Tp::enableDebug</a>(<span class="keyword">true</span>);
<a class="code" href="group__debug.html#ga7cc429d87fa4d829de26cd835cc005d3">Tp::enableWarnings</a>(<span class="keyword">true</span>);
qRegisterMetaType<Tp::FarsightChannel::Status>();
QString username = QLatin1String(argv[1]);
QString password = QLatin1String(argv[2]);
CallWindow w(username, password);
w.show();
<span class="keywordflow">return</span> app.exec();
}
</pre></div> </div>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation</td>
<td width="30%" align="right"><div align="right">Telepathy-Qt4 0.3.6</div></td>
</tr></table></div></address>
</body>
</html>
|