Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > contrib-updates > by-pkgid > a65e18d6cd6ada0b594b5264b3e30c20 > files > 40

qoauth-devel-1.0.1-2.1mdv2010.1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QOAuth: src/interface.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<h1>src/interface.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> *   Copyright (C) 2009-2010 by Dominik Kapusta       &lt;d@ayoy.net&gt;         *</span>
<a name="l00003"></a>00003 <span class="comment"> *                                                                         *</span>
<a name="l00004"></a>00004 <span class="comment"> *   This library is free software; you can redistribute it and/or modify  *</span>
<a name="l00005"></a>00005 <span class="comment"> *   it under the terms of the GNU Lesser General Public License as        *</span>
<a name="l00006"></a>00006 <span class="comment"> *   published by the Free Software Foundation; either version 2.1 of      *</span>
<a name="l00007"></a>00007 <span class="comment"> *   the License, or (at your option) any later version.                   *</span>
<a name="l00008"></a>00008 <span class="comment"> *                                                                         *</span>
<a name="l00009"></a>00009 <span class="comment"> *   This library is distributed in the hope that it will be useful,       *</span>
<a name="l00010"></a>00010 <span class="comment"> *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *</span>
<a name="l00011"></a>00011 <span class="comment"> *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *</span>
<a name="l00012"></a>00012 <span class="comment"> *   Lesser General Public License for more details.                       *</span>
<a name="l00013"></a>00013 <span class="comment"> *                                                                         *</span>
<a name="l00014"></a>00014 <span class="comment"> *   You should have received a copy of the GNU Lesser General Public      *</span>
<a name="l00015"></a>00015 <span class="comment"> *   License along with this library; if not, write to                     *</span>
<a name="l00016"></a>00016 <span class="comment"> *   the Free Software Foundation, Inc.,                                   *</span>
<a name="l00017"></a>00017 <span class="comment"> *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *</span>
<a name="l00018"></a>00018 <span class="comment"> ***************************************************************************/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef INTERFACE_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define INTERFACE_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;QObject&gt;</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;QtCrypto&gt;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="qoauth__global_8h.html">qoauth_global.h</a>&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="qoauth__namespace_8h.html">qoauth_namespace.h</a>&quot;</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="keyword">class </span>QNetworkAccessManager;
<a name="l00039"></a>00039 <span class="keyword">class </span>QNetworkReply;
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="namespace_q_o_auth.html">00041</a> <span class="keyword">namespace </span>QOAuth {
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">class </span>InterfacePrivate;
<a name="l00044"></a>00044 
<a name="l00045"></a><a class="code" href="class_q_o_auth_1_1_interface.html">00045</a> <span class="keyword">class </span>QOAUTH_EXPORT <a class="code" href="class_q_o_auth_1_1_interface.html" title="This class provides means for interaction with network services supporting OAuth...">Interface</a> : <span class="keyword">public</span> QObject
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047     Q_OBJECT
<a name="l00048"></a>00048 
<a name="l00049"></a><a class="code" href="class_q_o_auth_1_1_interface.html#ad808121c86dfd7901140b5031a28f417">00049</a>     Q_PROPERTY( QByteArray consumerKey READ consumerKey WRITE setConsumerKey )
<a name="l00050"></a><a class="code" href="class_q_o_auth_1_1_interface.html#aff55c5d184a11d34b0ce2e992bda3982">00050</a>     Q_PROPERTY( QByteArray consumerSecret READ consumerSecret WRITE setConsumerSecret )
<a name="l00051"></a><a class="code" href="class_q_o_auth_1_1_interface.html#a03241bf78e933ed564c9b4914357f000">00051</a>     Q_PROPERTY( uint requestTimeout READ requestTimeout WRITE setRequestTimeout )
<a name="l00052"></a><a class="code" href="class_q_o_auth_1_1_interface.html#a7b161f077467574766ca9f48ef167642">00052</a>     Q_PROPERTY( <span class="keywordtype">bool</span> ignoreSslErrors READ ignoreSslErrors WRITE setIgnoreSslErrors )
<a name="l00053"></a><a class="code" href="class_q_o_auth_1_1_interface.html#a99c6f33258eccdb3d6ea28e4944f94e9">00053</a>     Q_PROPERTY( <span class="keywordtype">int</span> error READ error )
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 public:
<a name="l00056"></a>00056     <a class="code" href="class_q_o_auth_1_1_interface.html" title="This class provides means for interaction with network services supporting OAuth...">Interface</a>( QObject *parent = 0 );
<a name="l00057"></a>00057     <a class="code" href="class_q_o_auth_1_1_interface.html" title="This class provides means for interaction with network services supporting OAuth...">Interface</a>( QNetworkAccessManager *manager, QObject *parent = 0 );
<a name="l00058"></a>00058     virtual ~<a class="code" href="class_q_o_auth_1_1_interface.html" title="This class provides means for interaction with network services supporting OAuth...">Interface</a>();
<a name="l00059"></a>00059 
<a name="l00060"></a>00060     QNetworkAccessManager* networkAccessManager() const;
<a name="l00061"></a>00061     <span class="keywordtype">void</span> setNetworkAccessManager(QNetworkAccessManager *manager);
<a name="l00062"></a>00062 
<a name="l00063"></a>00063     <span class="keywordtype">bool</span> ignoreSslErrors() const;
<a name="l00064"></a>00064     <span class="keywordtype">void</span> setIgnoreSslErrors(<span class="keywordtype">bool</span> enabled);
<a name="l00065"></a>00065 
<a name="l00066"></a>00066     QByteArray consumerKey() const;
<a name="l00067"></a>00067     <span class="keywordtype">void</span> setConsumerKey( const QByteArray &amp;consumerKey );
<a name="l00068"></a>00068 
<a name="l00069"></a>00069     QByteArray consumerSecret() const;
<a name="l00070"></a>00070     <span class="keywordtype">void</span> setConsumerSecret( const QByteArray &amp;consumerSecret );
<a name="l00071"></a>00071 
<a name="l00072"></a>00072     uint requestTimeout() const;
<a name="l00073"></a>00073     <span class="keywordtype">void</span> setRequestTimeout( uint msec );
<a name="l00074"></a>00074 
<a name="l00075"></a>00075     <span class="keywordtype">int</span> error() const;
<a name="l00076"></a>00076 
<a name="l00077"></a>00077     <span class="keywordtype">bool</span> setRSAPrivateKey( const QString &amp;key,
<a name="l00078"></a>00078                            const QCA::SecureArray &amp;passphrase = QCA::SecureArray() );
<a name="l00079"></a>00079     <span class="keywordtype">bool</span> setRSAPrivateKeyFromFile( const QString &amp;filename,
<a name="l00080"></a>00080                                    const QCA::SecureArray &amp;passphrase = QCA::SecureArray() );
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 
<a name="l00083"></a>00083     <a class="code" href="namespace_q_o_auth.html#a4a001535b7fdb06cc9d34cad1af27d2f" title="A typedef for the data structure for storing request parameters.">ParamMap</a> requestToken( const QString &amp;requestUrl, <a class="code" href="namespace_q_o_auth.html#aa0e0bd4d8c1802873d3b3d2deb099319" title="This enum type specifies the HTTP method used for creating a Signature Base String...">HttpMethod</a> httpMethod,
<a name="l00084"></a>00084                            <a class="code" href="namespace_q_o_auth.html#a4cc48c641aa9025d289d7d7e013f766f" title="This enum type describes the signature method used by the request.">SignatureMethod</a> signatureMethod = <a class="code" href="namespace_q_o_auth.html#a4cc48c641aa9025d289d7d7e013f766fa74bc0d418aa61ebf3efc38282d6d22b0" title="Sets the signature method to HMAC-SHA1.">HMAC_SHA1</a>, const <a class="code" href="namespace_q_o_auth.html#a4a001535b7fdb06cc9d34cad1af27d2f" title="A typedef for the data structure for storing request parameters.">ParamMap</a> &amp;params = <a class="code" href="namespace_q_o_auth.html#a4a001535b7fdb06cc9d34cad1af27d2f" title="A typedef for the data structure for storing request parameters.">ParamMap</a>() );
<a name="l00085"></a>00085 
<a name="l00086"></a>00086     ParamMap accessToken( const QString &amp;requestUrl, <a class="code" href="namespace_q_o_auth.html#aa0e0bd4d8c1802873d3b3d2deb099319" title="This enum type specifies the HTTP method used for creating a Signature Base String...">HttpMethod</a> httpMethod, const QByteArray &amp;token,
<a name="l00087"></a>00087                           const QByteArray &amp;tokenSecret, <a class="code" href="namespace_q_o_auth.html#a4cc48c641aa9025d289d7d7e013f766f" title="This enum type describes the signature method used by the request.">SignatureMethod</a> signatureMethod = HMAC_SHA1,
<a name="l00088"></a>00088                           const ParamMap &amp;params = ParamMap() );
<a name="l00089"></a>00089 
<a name="l00090"></a>00090     QByteArray createParametersString( const QString &amp;requestUrl, <a class="code" href="namespace_q_o_auth.html#aa0e0bd4d8c1802873d3b3d2deb099319" title="This enum type specifies the HTTP method used for creating a Signature Base String...">HttpMethod</a> httpMethod,
<a name="l00091"></a>00091                                        const QByteArray &amp;token, const QByteArray &amp;tokenSecret,
<a name="l00092"></a>00092                                        <a class="code" href="namespace_q_o_auth.html#a4cc48c641aa9025d289d7d7e013f766f" title="This enum type describes the signature method used by the request.">SignatureMethod</a> signatureMethod, const ParamMap &amp;params, <a class="code" href="namespace_q_o_auth.html#a442456118c9a45ac446554f17620def4" title="This enum type specifies the method of parsing parameters into a parameter string...">ParsingMode</a> mode );
<a name="l00093"></a>00093 
<a name="l00094"></a>00094     QByteArray inlineParameters( const ParamMap &amp;params, <a class="code" href="namespace_q_o_auth.html#a442456118c9a45ac446554f17620def4" title="This enum type specifies the method of parsing parameters into a parameter string...">ParsingMode</a> mode = <a class="code" href="namespace_q_o_auth.html#a442456118c9a45ac446554f17620def4ad28f70298ea8c4c1bec8c9c27b0aeaf5" title="Inline query format (foo=bar&amp;amp;bar=baz&amp;amp;baz=foo ...), suitable for POST requests...">ParseForRequestContent</a> );
<a name="l00095"></a>00095 
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 protected:
<a name="l00098"></a>00098     InterfacePrivate * const d_ptr;
<a name="l00099"></a>00099 
<a name="l00100"></a>00100 private:
<a name="l00101"></a>00101     Q_DISABLE_COPY(Interface)
<a name="l00102"></a>00102     Q_DECLARE_PRIVATE(Interface)
<a name="l00103"></a>00103     Q_PRIVATE_SLOT(d_func(), <span class="keywordtype">void</span> _q_parseReply(QNetworkReply *reply))
<a name="l00104"></a>00104     Q_PRIVATE_SLOT(d_func(), <span class="keywordtype">void</span> _q_setPassphrase(<span class="keywordtype">int</span> <span class="keywordtype">id</span>, const QCA::Event &amp;event))
<a name="l00105"></a>00105     Q_PRIVATE_SLOT(d_func(), <span class="keywordtype">void</span> _q_handleSslErrors( QNetworkReply *reply,
<a name="l00106"></a>00106                                                       const QList&lt;QSslError&gt; &amp;errors ))
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="preprocessor">#ifdef UNIT_TEST</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>    <span class="keyword">friend</span> <span class="keyword">class </span>Ut_Interface;
<a name="l00110"></a>00110     <span class="keyword">friend</span> <span class="keyword">class </span>Ft_Interface;
<a name="l00111"></a>00111 <span class="preprocessor">#endif</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>};
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 } <span class="comment">// namespace QOAuth</span>
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="preprocessor">#endif // INTERFACE_H</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Sep 2 20:58:20 2010 for QOAuth by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>