File: call__example__main.html

package info (click to toggle)
telepathy-qt4 0.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 14,260 kB
  • ctags: 12,185
  • sloc: cpp: 29,241; xml: 23,692; ansic: 16,079; sh: 10,327; python: 3,080; makefile: 1,553
file content (81 lines) | stat: -rw-r--r-- 3,221 bytes parent folder | download
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">&nbsp;&nbsp;</td>
<td class="postheader" valign="center">
<a href="index.html">
<font color="#004faf">Home</font></a>&nbsp;&middot;
<a href="classes.html">
<font color="#004faf">All Classes</font></a>&nbsp;&middot;
<a href="namespaces.html">
<font color="#004faf">All Namespaces</font></a>&nbsp;&middot;
<a href="modules.html">
<font color="#004faf">Modules</font></a>&nbsp;&middot;
<a href="functions.html">
<font color="#004faf">Functions</font></a>&nbsp;&middot;
<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 &lt;glib-object.h&gt;</span>
<span class="preprocessor">#include &lt;gst/gst.h&gt;</span>

<span class="preprocessor">#include &lt;TelepathyQt4/Debug&gt;</span>
<span class="preprocessor">#include &lt;TelepathyQt4/Constants&gt;</span>
<span class="preprocessor">#include &lt;TelepathyQt4/Types&gt;</span>

<span class="preprocessor">#include &lt;QDebug&gt;</span>
<span class="preprocessor">#include &lt;QtGui&gt;</span>

<span class="preprocessor">#include &quot;call-window.h&quot;</span>
<span class="preprocessor">#include &quot;farsight-channel.h&quot;</span>

<span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
{
    g_type_init();
    gst_init(&amp;argc, &amp;argv);

    QApplication app(argc, argv);

    <span class="keywordflow">if</span> (argc &lt; 3) {
        qDebug() &lt;&lt; <span class="stringliteral">&quot;usage: call username password&quot;</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&lt;Tp::FarsightChannel::Status&gt;();

    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 &copy; 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>