locationsystemui/locationsysui/privacyverifiernotifierui/locprivacyserver/src/locprivacyserver.cpp
equal
deleted
inserted
replaced
19 |
19 |
20 #include "locprivacyserver.h" |
20 #include "locprivacyserver.h" |
21 #include "locprivacycommon.h" |
21 #include "locprivacycommon.h" |
22 #include "locprivacyserversession.h" |
22 #include "locprivacyserversession.h" |
23 #include "locprivacyserverdebugpanic.h" |
23 #include "locprivacyserverdebugpanic.h" |
|
24 #include "locutilsdebug.h" |
24 |
25 |
25 |
26 |
26 // CONSTANTS |
27 // CONSTANTS |
27 |
28 |
28 // ================= MEMBER FUNCTIONS ======================= |
29 // ================= MEMBER FUNCTIONS ======================= |
39 } |
40 } |
40 |
41 |
41 // EPOC default constructor can leave. |
42 // EPOC default constructor can leave. |
42 void CLocPrivacyServer::ConstructL() |
43 void CLocPrivacyServer::ConstructL() |
43 { |
44 { |
|
45 LOCUTILSDEBUG( "+CLocPrivacyServer::ConstructL" ) |
44 User::LeaveIfError(Start(KLocPrivacyServerName)); |
46 User::LeaveIfError(Start(KLocPrivacyServerName)); |
|
47 LOCUTILSDEBUG( "-CLocPrivacyServer::ConstructL" ) |
45 } |
48 } |
46 |
49 |
47 // Two-phased constructor |
50 // Two-phased constructor |
48 CLocPrivacyServer* CLocPrivacyServer::NewL() |
51 CLocPrivacyServer* CLocPrivacyServer::NewL() |
49 { |
52 { |
65 // (other items were commented in a header). |
68 // (other items were commented in a header). |
66 // --------------------------------------------------------- |
69 // --------------------------------------------------------- |
67 // |
70 // |
68 void CLocPrivacyServer::IncrementSessions() |
71 void CLocPrivacyServer::IncrementSessions() |
69 { |
72 { |
|
73 LOCUTILSDEBUG( "+CLocPrivacyServer::IncrementSessions" ) |
70 iNumSessions++; |
74 iNumSessions++; |
|
75 LOCUTILSDEBUG( "-CLocPrivacyServer::IncrementSessions" ) |
71 } |
76 } |
72 |
77 |
73 // --------------------------------------------------------- |
78 // --------------------------------------------------------- |
74 // CLocPrivacyServer::DecrementSessions |
79 // CLocPrivacyServer::DecrementSessions |
75 // |
80 // |
77 // --------------------------------------------------------- |
82 // --------------------------------------------------------- |
78 // |
83 // |
79 void CLocPrivacyServer::DecrementSessions( |
84 void CLocPrivacyServer::DecrementSessions( |
80 CLocPrivacyServerSession* /*aSession*/) |
85 CLocPrivacyServerSession* /*aSession*/) |
81 { |
86 { |
|
87 LOCUTILSDEBUG( "+CLocPrivacyServer::DecrementSessions" ) |
82 iNumSessions--; |
88 iNumSessions--; |
83 if (iNumSessions == 0) |
89 if (iNumSessions == 0) |
84 { |
90 { |
85 // Shutdown the server by shutting down the active scheduler. |
91 // Shutdown the server by shutting down the active scheduler. |
86 CActiveScheduler::Stop(); |
92 CActiveScheduler::Stop(); |
87 } |
93 } |
|
94 LOCUTILSDEBUG( "-CLocPrivacyServer::DecrementSessions" ) |
88 } |
95 } |
89 |
96 |
90 // --------------------------------------------------------- |
97 // --------------------------------------------------------- |
91 // CLocPrivacyServer::NewSessionL |
98 // CLocPrivacyServer::NewSessionL |
92 // |
99 // |
95 // |
102 // |
96 CSession2* CLocPrivacyServer::NewSessionL( |
103 CSession2* CLocPrivacyServer::NewSessionL( |
97 const TVersion& /*aVersion*/, |
104 const TVersion& /*aVersion*/, |
98 const RMessage2& /*aMessage*/) const |
105 const RMessage2& /*aMessage*/) const |
99 { |
106 { |
100 |
107 LOCUTILSDEBUG( "+CLocPrivacyServer::NewSessionL" ) |
101 // Make new session |
108 // Make new session |
102 CLocPrivacyServerSession* newSession = CLocPrivacyServerSession::NewL( |
109 CLocPrivacyServerSession* newSession = CLocPrivacyServerSession::NewL( |
103 const_cast<CLocPrivacyServer&>(*this)); |
110 const_cast<CLocPrivacyServer&>(*this)); |
104 |
111 |
|
112 LOCUTILSDEBUG( "-CLocPrivacyServer::NewSessionL" ) |
105 return newSession; |
113 return newSession; |
106 } |
114 } |
107 |
115 |
108 // --------------------------------------------------------- |
116 // --------------------------------------------------------- |
109 // CLocPrivacyServer::RunError |
117 // CLocPrivacyServer::RunError |
112 // (other items were commented in a header). |
120 // (other items were commented in a header). |
113 // --------------------------------------------------------- |
121 // --------------------------------------------------------- |
114 // |
122 // |
115 TInt CLocPrivacyServer::RunError(TInt aError) |
123 TInt CLocPrivacyServer::RunError(TInt aError) |
116 { |
124 { |
|
125 LOCUTILSDEBUG( "-CLocPrivacyServer::RunError" ) |
117 Message().Complete(aError); |
126 Message().Complete(aError); |
118 ReStart(); |
127 ReStart(); |
|
128 LOCUTILSDEBUG( "-CLocPrivacyServer::RunError" ) |
119 return KErrNone; |
129 return KErrNone; |
120 } |
130 } |
121 |
131 |
122 |
132 |
123 // End of File |
133 // End of File |