|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 <head> |
|
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
|
5 <title>TB9.2 Example Applications: examples/Base/IPC/secureserver/secureclientandserver.h Source File</title> |
|
6 <link href="tabs.css" rel="stylesheet" type="text/css"/> |
|
7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
|
8 </head> |
|
9 <body> |
|
10 <!-- Generated by Doxygen 1.6.2 --> |
|
11 <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> |
|
12 <a name="l00002"></a>00002 <span class="comment">// All rights reserved.</span> |
|
13 <a name="l00003"></a>00003 <span class="comment">// This component and the accompanying materials are made available</span> |
|
14 <a name="l00004"></a>00004 <span class="comment">// under the terms of "Eclipse Public License v1.0"</span> |
|
15 <a name="l00005"></a>00005 <span class="comment">// which accompanies this distribution, and is available</span> |
|
16 <a name="l00006"></a>00006 <span class="comment">// at the URL "http://www.eclipse.org/legal/epl-v10.html".</span> |
|
17 <a name="l00007"></a>00007 <span class="comment">//</span> |
|
18 <a name="l00008"></a>00008 <span class="comment">// Initial Contributors:</span> |
|
19 <a name="l00009"></a>00009 <span class="comment">// Nokia Corporation - initial contribution.</span> |
|
20 <a name="l00010"></a>00010 <span class="comment">//</span> |
|
21 <a name="l00011"></a>00011 <span class="comment">// Contributors:</span> |
|
22 <a name="l00012"></a>00012 <span class="comment">//</span> |
|
23 <a name="l00013"></a>00013 <span class="comment">// Description:</span> |
|
24 <a name="l00014"></a>00014 <span class="comment">// Defines enums and constants that are common to the client and the server.</span> |
|
25 <a name="l00015"></a>00015 <span class="comment">// The most important items are:</span> |
|
26 <a name="l00016"></a>00016 <span class="comment">// - the enum TSecureServerRequest that defines requests. These request numbers are also known as ‘op codes’.</span> |
|
27 <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> |
|
28 <a name="l00018"></a>00018 <span class="comment">//</span> |
|
29 <a name="l00019"></a>00019 |
|
30 <a name="l00020"></a>00020 |
|
31 <a name="l00021"></a>00021 |
|
32 <a name="l00027"></a>00027 <span class="preprocessor">#ifndef __SECURECLIENTANDSERVER_H__</span> |
|
33 <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __SECURECLIENTANDSERVER_H__</span> |
|
34 <a name="l00029"></a>00029 <span class="preprocessor"></span> |
|
35 <a name="l00030"></a>00030 <span class="preprocessor">#include <e32base.h></span> |
|
36 <a name="l00031"></a>00031 <span class="preprocessor">#include <e32cons.h></span> |
|
37 <a name="l00032"></a>00032 |
|
38 <a name="l00036"></a>00036 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KSecureServerName,<span class="stringliteral">"SecureServer"</span>); |
|
39 <a name="l00037"></a>00037 |
|
40 <a name="l00038"></a>00038 <span class="keyword">const</span> TUint KDefaultMessageSlots=4; |
|
41 <a name="l00039"></a>00039 |
|
42 <a name="l00043"></a><a class="code" href="secureclientandserver_8h.html#a2c7a31de3ef992e8aa4c26453c32fc5f">00043</a> <span class="keyword">const</span> TUint <a class="code" href="secureclientandserver_8h.html#a2c7a31de3ef992e8aa4c26453c32fc5f">KSecureServMajorVersionNumber</a> = 0; |
|
43 <a name="l00044"></a>00044 <span class="keyword">const</span> TUint KSecureServMinorVersionNumber = 1; |
|
44 <a name="l00045"></a>00045 <span class="keyword">const</span> TUint KSecureServBuildVersionNumber = 1; |
|
45 <a name="l00046"></a>00046 |
|
46 <a name="l00047"></a>00047 IMPORT_C TInt StartThread(RThread& aServerThread); |
|
47 <a name="l00048"></a>00048 |
|
48 <a name="l00052"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2">00052</a> <span class="keyword">enum</span> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2">TSecureServerRequest</a> |
|
49 <a name="l00053"></a>00053 { |
|
50 <a name="l00057"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aeeea637ffeed72685729b2eb5c0a1d06">00057</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aeeea637ffeed72685729b2eb5c0a1d06">ESecureServerCreateSubSession</a>, |
|
51 <a name="l00061"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a019d5723fe668d1d7092919022bb7cd8">00061</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a019d5723fe668d1d7092919022bb7cd8">ESecureServerCloseSubSession</a>, |
|
52 <a name="l00065"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a340b8bb36e8a83dedc23b33ad454cc41">00065</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a340b8bb36e8a83dedc23b33ad454cc41">ESecureServerInitSubSession</a>, |
|
53 <a name="l00069"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a8e272085a7b510b91c0e210e46eb687e">00069</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a8e272085a7b510b91c0e210e46eb687e">ESecureServerCloseSession</a>, |
|
54 <a name="l00073"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aac8031c2e6141daa00372a90dbea0686">00073</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aac8031c2e6141daa00372a90dbea0686">ESecureServerValue</a>, |
|
55 <a name="l00077"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a7fc92e555feb4e8e8cacd2ea4508b4ed">00077</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a7fc92e555feb4e8e8cacd2ea4508b4ed">ESecureServerResourceCount</a>, |
|
56 <a name="l00081"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a1b3935c0f5f79f45a27de1fa32654e17">00081</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a1b3935c0f5f79f45a27de1fa32654e17">ESecureServerIncrease</a>, |
|
57 <a name="l00085"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a9c27793f5b6b3beb6aad11d0bf953144">00085</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a9c27793f5b6b3beb6aad11d0bf953144">ESecureServerIncreaseBy</a>, |
|
58 <a name="l00089"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a42948fe36fdaab2a2d9a4328ea3eedec">00089</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a42948fe36fdaab2a2d9a4328ea3eedec">ESecureServerDecrease</a>, |
|
59 <a name="l00093"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a0bcce01e7f822786412221374e7a8b76">00093</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a0bcce01e7f822786412221374e7a8b76">ESecureServerDecreaseBy</a>, |
|
60 <a name="l00097"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aa9d1e980d9ed0a23782b98761d7e57d7">00097</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2aa9d1e980d9ed0a23782b98761d7e57d7">ESecureServerReset</a>, |
|
61 <a name="l00101"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a1c7338d8bb93ce1b82088d1282516d3d">00101</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2a1c7338d8bb93ce1b82088d1282516d3d">ESecureServerSaveCounter</a>, |
|
62 <a name="l00105"></a><a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2af1d352024cd4a379c9dd9406152b9592">00105</a> <a class="code" href="secureclientandserver_8h.html#a19a3f57ac2d7b8518f6682573ac637c2af1d352024cd4a379c9dd9406152b9592">ESecureServerSetCounterFromFile</a> |
|
63 <a name="l00106"></a>00106 }; |
|
64 <a name="l00107"></a>00107 |
|
65 <a name="l00111"></a><a class="code" href="secureclientandserver_8h.html#ac31a03d737c6ab16ba55ceab73d57b71">00111</a> <span class="keyword">enum</span> <a class="code" href="secureclientandserver_8h.html#ac31a03d737c6ab16ba55ceab73d57b71">TSecureServerLeave</a> |
|
66 <a name="l00112"></a>00112 { |
|
67 <a name="l00118"></a><a class="code" href="secureclientandserver_8h.html#ac31a03d737c6ab16ba55ceab73d57b71ae3a6b8e17c25d02a3ae9ca7362ba4d0c">00118</a> <a class="code" href="secureclientandserver_8h.html#ac31a03d737c6ab16ba55ceab73d57b71ae3a6b8e17c25d02a3ae9ca7362ba4d0c">ENonNumericString</a> = 99 |
|
68 <a name="l00119"></a>00119 }; |
|
69 <a name="l00120"></a>00120 |
|
70 <a name="l00121"></a>00121 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTextConsoleTitle, <span class="stringliteral">"Secure Server Console"</span>); |
|
71 <a name="l00122"></a>00122 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTextFailed, <span class="stringliteral">" failed, leave code = %d"</span>); |
|
72 <a name="l00123"></a>00123 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTextPressAnyKey, <span class="stringliteral">" [press any key]\n"</span>); |
|
73 <a name="l00124"></a>00124 |
|
74 <a name="l00125"></a>00125 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtTestingCountServer,<span class="stringliteral">"Testing the count server test with 2 client sub sessions; these represent independent counters \n\n"</span>); |
|
75 <a name="l00126"></a>00126 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtInitCounterAWith,<span class="stringliteral">"\nInitialize counter A with : "</span>); |
|
76 <a name="l00127"></a>00127 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtInitCounterBWith,<span class="stringliteral">"\nInitialize counter B with : "</span>); |
|
77 <a name="l00128"></a>00128 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtInitCounterFailed,<span class="stringliteral">"\nSetting the counter from string failed: non-numeric character detected\n"</span>); |
|
78 <a name="l00129"></a>00129 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtInitCounterSucceeded,<span class="stringliteral">"\nSetting the counter from string succeeded\n"</span>); |
|
79 <a name="l00130"></a>00130 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtGetCounterAValue,<span class="stringliteral">"Getting counterA value from server: %d \n"</span>); |
|
80 <a name="l00131"></a>00131 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtGetCounterBValue,<span class="stringliteral">"Getting counterB value from server: %d \n"</span>); |
|
81 <a name="l00132"></a>00132 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtTransactionId,<span class="stringliteral">"***\nTransaction ID of the session : %d\n***\n"</span>); |
|
82 <a name="l00133"></a>00133 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KMsgPressAnyKey,<span class="stringliteral">" (press any key to continue)\n"</span>); |
|
83 <a name="l00134"></a>00134 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtOption,<span class="stringliteral">"\nEnter 1 to initialise from file\n"</span>); |
|
84 <a name="l00135"></a>00135 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtInitFromFile,<span class="stringliteral">"\nInitialising from file, value = %d\n"</span>); |
|
85 <a name="l00136"></a>00136 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtTransactionID,<span class="stringliteral">"\nEnter the Transaction ID for the session\n"</span>); |
|
86 <a name="l00137"></a>00137 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtSaveToFile,<span class="stringliteral">"\nTo save the value of counter A press 'a' and for counter B press 'b'..\n"</span>); |
|
87 <a name="l00138"></a>00138 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtSelectCounter,<span class="stringliteral">"\nYou selected counter %c\n"</span>); |
|
88 <a name="l00139"></a>00139 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KTxtSaveCounter,<span class="stringliteral">"\nSaving Counter Value..\n"</span>); |
|
89 <a name="l00140"></a>00140 |
|
90 <a name="l00141"></a>00141 <span class="preprocessor">#endif</span> |
|
91 </pre></div></div> |
|
92 <hr size="1"/><address style="text-align: right;"><small>Generated by |
|
93 <a href="http://www.doxygen.org/index.html"> |
|
94 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> |
|
95 </body> |
|
96 </html> |