Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/secureclientandserver_8h-source.html
week 10 bug fix submission: Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>TB10.1 Example Applications: examples/Base/IPC/secureserver/secureclientandserver.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<h1>examples/Base/IPC/secureserver/secureclientandserver.h</h1><a href="secureclientandserver_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).</span>
<a name="l00002"></a>00002 <span class="comment">// All rights reserved.</span>
<a name="l00003"></a>00003 <span class="comment">// This component and the accompanying materials are made available</span>
<a name="l00004"></a>00004 <span class="comment">// under the terms of "Eclipse Public License v1.0"</span>
<a name="l00005"></a>00005 <span class="comment">// which accompanies this distribution, and is available</span>
<a name="l00006"></a>00006 <span class="comment">// at the URL "http://www.eclipse.org/legal/epl-v10.html".</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008 <span class="comment">// Initial Contributors:</span>
<a name="l00009"></a>00009 <span class="comment">// Nokia Corporation - initial contribution.</span>
<a name="l00010"></a>00010 <span class="comment">//</span>
<a name="l00011"></a>00011 <span class="comment">// Contributors:</span>
<a name="l00012"></a>00012 <span class="comment">//</span>
<a name="l00013"></a>00013 <span class="comment">// Description:</span>
<a name="l00014"></a>00014 <span class="comment">// Defines enums and constants that are common to the client and the server.</span>
<a name="l00015"></a>00015 <span class="comment">// The most important items are:</span>
<a name="l00016"></a>00016 <span class="comment">// - the enum TSecureServerRequest that defines requests. These request numbers are also known as ‘op codes’.</span>
<a name="l00017"></a>00017 <span class="comment">// - the numbers that define the version of the server and the version of the server that the client requires.</span>
<a name="l00018"></a>00018 <span class="comment">//</span>
<a name="l00019"></a>00019
<a name="l00020"></a>00020
<a name="l00021"></a>00021
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef __SECURECLIENTANDSERVER_H__</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __SECURECLIENTANDSERVER_H__</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include <e32base.h></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include <e32cons.h></span>
<a name="l00032"></a>00032
<a name="l00036"></a>00036 _LIT(KSecureServerName,<span class="stringliteral">"SecureServer"</span>);
<a name="l00037"></a>00037
<a name="l00038"></a><a class="code" href="secureclientandserver_8h.html#6c2390f8a2966c6633b3291aafb96bac">00038</a> <span class="keyword">const</span> TUint <a class="code" href="secureclientandserver_8h.html#6c2390f8a2966c6633b3291aafb96bac">KDefaultMessageSlots</a>=4;
<a name="l00039"></a>00039
<a name="l00043"></a><a class="code" href="secureclientandserver_8h.html#2c7a31de3ef992e8aa4c26453c32fc5f">00043</a> <span class="keyword">const</span> TUint <a class="code" href="secureclientandserver_8h.html#2c7a31de3ef992e8aa4c26453c32fc5f">KSecureServMajorVersionNumber</a> = 0;
<a name="l00044"></a><a class="code" href="secureclientandserver_8h.html#278c356b18a5bf229401b22dc41f4a93">00044</a> <span class="keyword">const</span> TUint <a class="code" href="secureclientandserver_8h.html#278c356b18a5bf229401b22dc41f4a93">KSecureServMinorVersionNumber</a> = 1;
<a name="l00045"></a><a class="code" href="secureclientandserver_8h.html#d2f7af8cbb138c526da5559f77f5764d">00045</a> <span class="keyword">const</span> TUint <a class="code" href="secureclientandserver_8h.html#d2f7af8cbb138c526da5559f77f5764d">KSecureServBuildVersionNumber</a> = 1;
<a name="l00046"></a>00046
<a name="l00047"></a>00047 IMPORT_C TInt StartThread(RThread& aServerThread);
<a name="l00048"></a>00048
<a name="l00052"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2">00052</a> <span class="keyword">enum</span> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2">TSecureServerRequest</a>
<a name="l00053"></a>00053 {
<a name="l00057"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2eeea637ffeed72685729b2eb5c0a1d06">00057</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2eeea637ffeed72685729b2eb5c0a1d06">ESecureServerCreateSubSession</a>,
<a name="l00061"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2019d5723fe668d1d7092919022bb7cd8">00061</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2019d5723fe668d1d7092919022bb7cd8">ESecureServerCloseSubSession</a>,
<a name="l00065"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2340b8bb36e8a83dedc23b33ad454cc41">00065</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2340b8bb36e8a83dedc23b33ad454cc41">ESecureServerInitSubSession</a>,
<a name="l00069"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c28e272085a7b510b91c0e210e46eb687e">00069</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c28e272085a7b510b91c0e210e46eb687e">ESecureServerCloseSession</a>,
<a name="l00073"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2ac8031c2e6141daa00372a90dbea0686">00073</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2ac8031c2e6141daa00372a90dbea0686">ESecureServerValue</a>,
<a name="l00077"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c27fc92e555feb4e8e8cacd2ea4508b4ed">00077</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c27fc92e555feb4e8e8cacd2ea4508b4ed">ESecureServerResourceCount</a>,
<a name="l00081"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c21b3935c0f5f79f45a27de1fa32654e17">00081</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c21b3935c0f5f79f45a27de1fa32654e17">ESecureServerIncrease</a>,
<a name="l00085"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c29c27793f5b6b3beb6aad11d0bf953144">00085</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c29c27793f5b6b3beb6aad11d0bf953144">ESecureServerIncreaseBy</a>,
<a name="l00089"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c242948fe36fdaab2a2d9a4328ea3eedec">00089</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c242948fe36fdaab2a2d9a4328ea3eedec">ESecureServerDecrease</a>,
<a name="l00093"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c20bcce01e7f822786412221374e7a8b76">00093</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c20bcce01e7f822786412221374e7a8b76">ESecureServerDecreaseBy</a>,
<a name="l00097"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2a9d1e980d9ed0a23782b98761d7e57d7">00097</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2a9d1e980d9ed0a23782b98761d7e57d7">ESecureServerReset</a>,
<a name="l00101"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c21c7338d8bb93ce1b82088d1282516d3d">00101</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c21c7338d8bb93ce1b82088d1282516d3d">ESecureServerSaveCounter</a>,
<a name="l00105"></a><a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2f1d352024cd4a379c9dd9406152b9592">00105</a> <a class="code" href="secureclientandserver_8h.html#19a3f57ac2d7b8518f6682573ac637c2f1d352024cd4a379c9dd9406152b9592">ESecureServerSetCounterFromFile</a>
<a name="l00106"></a>00106 };
<a name="l00107"></a>00107
<a name="l00111"></a><a class="code" href="secureclientandserver_8h.html#c31a03d737c6ab16ba55ceab73d57b71">00111</a> <span class="keyword">enum</span> <a class="code" href="secureclientandserver_8h.html#c31a03d737c6ab16ba55ceab73d57b71">TSecureServerLeave</a>
<a name="l00112"></a>00112 {
<a name="l00118"></a><a class="code" href="secureclientandserver_8h.html#c31a03d737c6ab16ba55ceab73d57b71e3a6b8e17c25d02a3ae9ca7362ba4d0c">00118</a> <a class="code" href="secureclientandserver_8h.html#c31a03d737c6ab16ba55ceab73d57b71e3a6b8e17c25d02a3ae9ca7362ba4d0c">ENonNumericString</a> = 99
<a name="l00119"></a>00119 };
<a name="l00120"></a>00120
<a name="l00121"></a>00121 _LIT(KTextConsoleTitle, <span class="stringliteral">"Secure Server Console"</span>);
<a name="l00122"></a>00122 _LIT(KTextFailed, <span class="stringliteral">" failed, leave code = %d"</span>);
<a name="l00123"></a>00123 _LIT(KTextPressAnyKey, <span class="stringliteral">" [press any key]\n"</span>);
<a name="l00124"></a>00124
<a name="l00125"></a>00125 _LIT(KTxtTestingCountServer,<span class="stringliteral">"Testing the count server test with 2 client sub sessions; these represent independent counters \n\n"</span>);
<a name="l00126"></a>00126 _LIT(KTxtInitCounterAWith,<span class="stringliteral">"\nInitialize counter A with : "</span>);
<a name="l00127"></a>00127 _LIT(KTxtInitCounterBWith,<span class="stringliteral">"\nInitialize counter B with : "</span>);
<a name="l00128"></a>00128 _LIT(KTxtInitCounterFailed,<span class="stringliteral">"\nSetting the counter from string failed: non-numeric character detected\n"</span>);
<a name="l00129"></a>00129 _LIT(KTxtInitCounterSucceeded,<span class="stringliteral">"\nSetting the counter from string succeeded\n"</span>);
<a name="l00130"></a>00130 _LIT(KTxtGetCounterAValue,<span class="stringliteral">"Getting counterA value from server: %d \n"</span>);
<a name="l00131"></a>00131 _LIT(KTxtGetCounterBValue,<span class="stringliteral">"Getting counterB value from server: %d \n"</span>);
<a name="l00132"></a>00132 _LIT(KTxtTransactionId,<span class="stringliteral">"***\nTransaction ID of the session : %d\n***\n"</span>);
<a name="l00133"></a>00133 _LIT(KMsgPressAnyKey,<span class="stringliteral">" (press any key to continue)\n"</span>);
<a name="l00134"></a>00134 _LIT(KTxtOption,<span class="stringliteral">"\nEnter 1 to initialise from file\n"</span>);
<a name="l00135"></a>00135 _LIT(KTxtInitFromFile,<span class="stringliteral">"\nInitialising from file, value = %d\n"</span>);
<a name="l00136"></a>00136 _LIT(KTxtTransactionID,<span class="stringliteral">"\nEnter the Transaction ID for the session\n"</span>);
<a name="l00137"></a>00137 _LIT(KTxtSaveToFile,<span class="stringliteral">"\nTo save the value of counter A press 'a' and for counter B press 'b'..\n"</span>);
<a name="l00138"></a>00138 _LIT(KTxtSelectCounter,<span class="stringliteral">"\nYou selected counter %c\n"</span>);
<a name="l00139"></a>00139 _LIT(KTxtSaveCounter,<span class="stringliteral">"\nSaving Counter Value..\n"</span>);
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 21 10:32:57 2010 for TB10.1 Example Applications by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>