author | Graeme Price <GRAEME.PRICE@NOKIA.COM> |
Fri, 15 Oct 2010 14:32:18 +0100 | |
changeset 15 | 307f4279f433 |
parent 6 | 43e37759235e |
permissions | -rw-r--r-- |
6
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
3 |
<head> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
5 |
<title>TB9.2 Example Applications: examples/ForumNokia/ThreadAndActiveObjectsEx/inc/threadaoengine.h Source File</title> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
6 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
7 |
<link href="doxygen.css" rel="stylesheet" type="text/css"/> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
8 |
</head> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
9 |
<body> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
10 |
<!-- Generated by Doxygen 1.6.2 --> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
11 |
<h1>examples/ForumNokia/ThreadAndActiveObjectsEx/inc/threadaoengine.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
12 |
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2008 Nokia Corporation.</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
13 |
<a name="l00003"></a>00003 <span class="comment"> */</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
14 |
<a name="l00004"></a>00004 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
15 |
<a name="l00005"></a>00005 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
16 |
<a name="l00006"></a>00006 <span class="preprocessor">#ifndef __THREAD_AO_ENGINE_H__</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
17 |
<a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor">#define __THREAD_AO_ENGINE_H__</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
18 |
<a name="l00008"></a>00008 <span class="preprocessor"></span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
19 |
<a name="l00009"></a>00009 <span class="comment">// INCLUDES</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
20 |
<a name="l00010"></a>00010 <span class="preprocessor">#include "e32base.h"</span> <span class="comment">//CTimer</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
21 |
<a name="l00011"></a>00011 <span class="preprocessor">#include "badesca.h"</span> <span class="comment">// CDesCaRrayFlat</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
22 |
<a name="l00012"></a>00012 <span class="preprocessor">#include "SharedIntermediator.h"</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
23 |
<a name="l00013"></a>00013 <span class="preprocessor">#include "ThreadListener.h"</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
24 |
<a name="l00014"></a>00014 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
25 |
<a name="l00015"></a>00015 <span class="comment">// FORWARD DECLARATIONS</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
26 |
<a name="l00016"></a>00016 <span class="keyword">class </span>SharedIntermediator; |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
27 |
<a name="l00017"></a>00017 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
28 |
<a name="l00018"></a>00018 <span class="comment">// CLASS DECLARATION</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
29 |
<a name="l00019"></a>00019 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
30 |
<a name="l00023"></a><a class="code" href="class_c_thread_a_o_engine.html">00023</a> <span class="keyword">class </span><a class="code" href="class_c_thread_a_o_engine.html">CThreadAOEngine</a> : <span class="keyword">public</span> CBase |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
31 |
<a name="l00024"></a>00024 { |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
32 |
<a name="l00025"></a>00025 <span class="keyword">public</span>: |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
33 |
<a name="l00026"></a>00026 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
34 |
<a name="l00035"></a>00035 <span class="keyword">static</span> <a class="code" href="class_c_thread_a_o_engine.html">CThreadAOEngine</a>* <a class="code" href="class_c_thread_a_o_engine.html#ae47fec51f868c97d25af41502cedb93c">NewL</a>(<a class="code" href="class_c_shared_intermediator.html">CSharedIntermediator</a>* aSMediator); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
35 |
<a name="l00036"></a>00036 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
36 |
<a name="l00041"></a>00041 <span class="keyword">static</span> <a class="code" href="class_c_thread_a_o_engine.html">CThreadAOEngine</a>* <a class="code" href="class_c_thread_a_o_engine.html#af60ccf499b44adb966152a3b970309a1">NewLC</a>(<a class="code" href="class_c_shared_intermediator.html">CSharedIntermediator</a>* aSMediator); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
37 |
<a name="l00042"></a>00042 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
38 |
<a name="l00047"></a>00047 <a class="code" href="class_c_thread_a_o_engine.html#a74d5ebd45dff44ee13467a48ab9ad46c">~CThreadAOEngine</a>(); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
39 |
<a name="l00048"></a>00048 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
40 |
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="class_c_thread_a_o_engine.html#ac6e884d9c4dec96288fa725385924382">StartL</a>(); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
41 |
<a name="l00056"></a>00056 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
42 |
<a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="class_c_thread_a_o_engine.html#a5fce7387851b38d1e5ae0b295511909f">Stop</a>(); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
43 |
<a name="l00063"></a>00063 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
44 |
<a name="l00071"></a>00071 <span class="keyword">static</span> TInt <a class="code" href="class_c_thread_a_o_engine.html#a466c0b37441e2a42ad7d4d237f543f37">ExecuteThreadOne</a>(TAny *aPtr); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
45 |
<a name="l00072"></a>00072 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
46 |
<a name="l00081"></a>00081 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_thread_a_o_engine.html#aa3a782d96f8123de748ed4a95d652db8">CreateActiveSchedulerL</a>(<a class="code" href="class_c_shared_intermediator.html">CSharedIntermediator</a>* aSMediator); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
47 |
<a name="l00082"></a>00082 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
48 |
<a name="l00083"></a>00083 <span class="keyword">private</span>: <span class="comment">//functions</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
49 |
<a name="l00084"></a>00084 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
50 |
<a name="l00090"></a>00090 <span class="keywordtype">void</span> CreateThreadsL(); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
51 |
<a name="l00091"></a>00091 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
52 |
<a name="l00092"></a>00092 <span class="keyword">private</span>: <span class="comment">// Basic two-phase Symbian OS constructors</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
53 |
<a name="l00093"></a>00093 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
54 |
<a name="l00098"></a>00098 <span class="keywordtype">void</span> ConstructL(); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
55 |
<a name="l00099"></a>00099 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
56 |
<a name="l00106"></a>00106 <a class="code" href="class_c_thread_a_o_engine.html">CThreadAOEngine</a>(<a class="code" href="class_c_shared_intermediator.html">CSharedIntermediator</a>* aSMediator); |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
57 |
<a name="l00107"></a>00107 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
58 |
<a name="l00108"></a>00108 <span class="keyword">private</span>: <span class="comment">// data members </span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
59 |
<a name="l00109"></a>00109 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
60 |
<a name="l00110"></a>00110 <span class="comment">// a handle for thread1</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
61 |
<a name="l00111"></a>00111 RThread iThreadOne; |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
62 |
<a name="l00112"></a>00112 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
63 |
<a name="l00113"></a>00113 <span class="comment">// Create a new thread only once. True means that the thread has been created, </span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
64 |
<a name="l00114"></a>00114 <span class="comment">// false otherwise.</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
65 |
<a name="l00115"></a>00115 TBool iCreatedThreads; |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
66 |
<a name="l00116"></a>00116 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
67 |
<a name="l00117"></a>00117 <span class="comment">// Shared intermediator. Transmits data between thread1 and the mainthread</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
68 |
<a name="l00118"></a>00118 <a class="code" href="class_c_shared_intermediator.html">CSharedIntermediator</a>* iSMediator; |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
69 |
<a name="l00119"></a>00119 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
70 |
<a name="l00120"></a>00120 <span class="comment">// Thread1 state listener. </span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
71 |
<a name="l00121"></a>00121 <a class="code" href="class_c_thread_listener.html">CThreadListener</a>* iListener; |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
72 |
<a name="l00122"></a>00122 }; |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
73 |
<a name="l00123"></a>00123 |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
74 |
<a name="l00124"></a>00124 <span class="preprocessor">#endif // __THREAD_AO_ENGINE_H__</span> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
75 |
</pre></div></div> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
76 |
<hr size="1"/><address style="text-align: right;"><small>Generated by |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
77 |
<a href="http://www.doxygen.org/index.html"> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
78 |
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
79 |
</body> |
43e37759235e
Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
80 |
</html> |