This repository was archived by the owner on Dec 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauthchallenge_8cpp_source.html
129 lines (127 loc) · 14.7 KB
/
authchallenge_8cpp_source.html
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>swift: src/blackcore/fsd/authchallenge.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">swift
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_4bd6e9e49f4b1ea1ce646f85835c78ce.html">blackcore</a></li><li class="navelem"><a class="el" href="dir_439fecf8bf5ad6d72bdb9ab656729f37.html">fsd</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">authchallenge.cpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include "<a class="code" href="authchallenge_8h.html">blackcore/fsd/authchallenge.h</a>"</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>  </div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "<a class="code" href="logmessage_8h.html">blackmisc/logmessage.h</a>"</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>  </div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="keyword">namespace </span>BlackCore::Fsd</div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> {</div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  AuthChallenge::AuthChallenge() : MessageBase()</div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  {}</div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_black_core_1_1_fsd_1_1_auth_challenge.html#ac7890d515e26fc134e8053dd1ef2f6cd"> 13</a></span>  AuthChallenge::AuthChallenge(<span class="keyword">const</span> <a class="codeRef" href="http://doc.qt.io/qt-5/qstring.html">QString</a> &sender, <span class="keyword">const</span> <a class="codeRef" href="http://doc.qt.io/qt-5/qstring.html">QString</a> &target, <span class="keyword">const</span> <a class="codeRef" href="http://doc.qt.io/qt-5/qstring.html">QString</a> &challengeKey) : <a class="code" href="class_black_core_1_1_fsd_1_1_message_base.html">MessageBase</a>(sender, target),</div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  m_challengeKey(challengeKey)</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  {}</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_black_core_1_1_fsd_1_1_auth_challenge.html#ab1da9e2dfcd3c2ad955f340bbdab2816"> 17</a></span>  <a class="codeRef" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> <a class="code" href="class_black_core_1_1_fsd_1_1_auth_challenge.html#ab1da9e2dfcd3c2ad955f340bbdab2816">AuthChallenge::toTokens</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="keyword"> </span>{</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <span class="keyword">auto</span> tokens = <a class="codeRef" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> {};</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  tokens.<a class="codeRef" href="http://doc.qt.io/qt-5/qlist.html#push_back">push_back</a>(<a class="code" href="class_black_core_1_1_fsd_1_1_message_base.html#a921b18efcb1a052ba401e489402616b3">m_sender</a>);</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  tokens.push_back(<a class="code" href="class_black_core_1_1_fsd_1_1_message_base.html#a667bb96dccb18093ecb8e1be1173586f">m_receiver</a>);</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  tokens.push_back(<a class="code" href="class_black_core_1_1_fsd_1_1_auth_challenge.html#aa7eb1ba252200e3b544abd643bfa77aa">m_challengeKey</a>);</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="keywordflow">return</span> tokens;</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  }</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_black_core_1_1_fsd_1_1_auth_challenge.html#a532ec270855671d6764b2f0a27f13807"> 26</a></span>  <a class="code" href="class_black_core_1_1_fsd_1_1_auth_challenge.html">AuthChallenge</a> <a class="code" href="class_black_core_1_1_fsd_1_1_auth_challenge.html#a532ec270855671d6764b2f0a27f13807">AuthChallenge::fromTokens</a>(<span class="keyword">const</span> <a class="codeRef" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> &tokens)</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  {</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">if</span> (tokens.<a class="codeRef" href="http://doc.qt.io/qt-5/qlist.html#size">size</a>() < 3)</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  {</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="code" href="class_black_misc_1_1_c_log_message.html">BlackMisc::CLogMessage</a>(<span class="keyword">static_cast<</span><a class="code" href="class_black_core_1_1_fsd_1_1_auth_challenge.html">AuthChallenge</a> *<span class="keyword">></span>(<span class="keyword">nullptr</span>)).<a class="code" href="class_black_misc_1_1_c_message_base.html#a437c95e9cc2e8a62a1329556d73ea735">warning</a>(u<span class="stringliteral">"Wrong number of arguments."</span>);</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordflow">return</span> {};</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  }</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">return</span> <a class="code" href="class_black_core_1_1_fsd_1_1_auth_challenge.html">AuthChallenge</a>(tokens[0], tokens[1], tokens[2]);</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  }</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> }</div>
<div class="ttc" id="aauthchallenge_8h_html"><div class="ttname"><a href="authchallenge_8h.html">authchallenge.h</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_auth_challenge_html"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_auth_challenge.html">BlackCore::Fsd::AuthChallenge</a></div><div class="ttdoc">FSD Message: auth challenge.</div><div class="ttdef"><b>Definition:</b> <a href="authchallenge_8h_source.html#l00014">authchallenge.h:15</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_auth_challenge_html_a532ec270855671d6764b2f0a27f13807"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_auth_challenge.html#a532ec270855671d6764b2f0a27f13807">BlackCore::Fsd::AuthChallenge::fromTokens</a></div><div class="ttdeci">static AuthChallenge fromTokens(const QStringList &tokens)</div><div class="ttdoc">Construct from tokens.</div><div class="ttdef"><b>Definition:</b> <a href="authchallenge_8cpp_source.html#l00026">authchallenge.cpp:26</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_auth_challenge_html_aa7eb1ba252200e3b544abd643bfa77aa"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_auth_challenge.html#aa7eb1ba252200e3b544abd643bfa77aa">BlackCore::Fsd::AuthChallenge::m_challengeKey</a></div><div class="ttdeci">QString m_challengeKey</div><div class="ttdoc">key</div><div class="ttdef"><b>Definition:</b> <a href="authchallenge_8h_source.html#l00029">authchallenge.h:29</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_auth_challenge_html_ab1da9e2dfcd3c2ad955f340bbdab2816"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_auth_challenge.html#ab1da9e2dfcd3c2ad955f340bbdab2816">BlackCore::Fsd::AuthChallenge::toTokens</a></div><div class="ttdeci">QStringList toTokens() const</div><div class="ttdoc">Message converted to tokens.</div><div class="ttdef"><b>Definition:</b> <a href="authchallenge_8cpp_source.html#l00017">authchallenge.cpp:17</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_message_base_html"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_message_base.html">BlackCore::Fsd::MessageBase</a></div><div class="ttdoc">FSD message base class.</div><div class="ttdef"><b>Definition:</b> <a href="messagebase_8h_source.html#l00056">messagebase.h:57</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_message_base_html_a667bb96dccb18093ecb8e1be1173586f"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_message_base.html#a667bb96dccb18093ecb8e1be1173586f">BlackCore::Fsd::MessageBase::m_receiver</a></div><div class="ttdeci">QString m_receiver</div><div class="ttdoc">message receiver</div><div class="ttdef"><b>Definition:</b> <a href="messagebase_8h_source.html#l00088">messagebase.h:88</a></div></div>
<div class="ttc" id="aclass_black_core_1_1_fsd_1_1_message_base_html_a921b18efcb1a052ba401e489402616b3"><div class="ttname"><a href="class_black_core_1_1_fsd_1_1_message_base.html#a921b18efcb1a052ba401e489402616b3">BlackCore::Fsd::MessageBase::m_sender</a></div><div class="ttdeci">QString m_sender</div><div class="ttdoc">message sender</div><div class="ttdef"><b>Definition:</b> <a href="messagebase_8h_source.html#l00087">messagebase.h:87</a></div></div>
<div class="ttc" id="aclass_black_misc_1_1_c_log_message_html"><div class="ttname"><a href="class_black_misc_1_1_c_log_message.html">BlackMisc::CLogMessage</a></div><div class="ttdoc">Class for emitting a log message.</div><div class="ttdef"><b>Definition:</b> <a href="logmessage_8h_source.html#l00029">logmessage.h:30</a></div></div>
<div class="ttc" id="aclass_black_misc_1_1_c_message_base_html_a437c95e9cc2e8a62a1329556d73ea735"><div class="ttname"><a href="class_black_misc_1_1_c_message_base.html#a437c95e9cc2e8a62a1329556d73ea735">BlackMisc::CMessageBase::warning</a></div><div class="ttdeci">Derived & warning(const char16_t(&format)[N])</div><div class="ttdoc">Set the severity to warning, providing a format string.</div><div class="ttdef"><b>Definition:</b> <a href="statusmessage_8h_source.html#l00215">statusmessage.h:215</a></div></div>
<div class="ttc" id="alogmessage_8h_html"><div class="ttname"><a href="logmessage_8h.html">logmessage.h</a></div></div>
<div class="ttc" id="aqlist_html_push_back"><div class="ttname"><a href="http://doc.qt.io/qt-5/qlist.html#push_back">QList::push_back</a></div><div class="ttdeci">void push_back(const T &value)</div></div>
<div class="ttc" id="aqlist_html_size"><div class="ttname"><a href="http://doc.qt.io/qt-5/qlist.html#size">QList::size</a></div><div class="ttdeci">int size() const const</div></div>
<div class="ttc" id="aqstring_html"><div class="ttname"><a href="http://doc.qt.io/qt-5/qstring.html">QString</a></div></div>
<div class="ttc" id="aqstringlist_html"><div class="ttname"><a href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 3 2023 18:38:36 for swift by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>