locationsystemui/locationsysui/privacyverifiernotifierui/locprivacyserver/src/locprivacyserversession.cpp
changeset 40 16118e24b93b
parent 32 b12ea03c50a3
equal deleted inserted replaced
33:834e27cad510 40:16118e24b93b
    14 * Description:  Server session class implementation.
    14 * Description:  Server session class implementation.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // INCLUDE FILES
    18 // INCLUDE FILES
       
    19 
    19 #include <s32mem.h>
    20 #include <s32mem.h>
    20 #include <lbs/EPos_RPosRequestorStack.h>
    21 #include <lbs/EPos_RPosRequestorStack.h>
       
    22 
    21 #include "locprivacyinternal.h" 
    23 #include "locprivacyinternal.h" 
    22 #include "locprivacyserver.h"
    24 #include "locprivacyserver.h"
    23 #include "locprivacyserversession.h"
    25 #include "locprivacyserversession.h"
    24 #include "locprivacyserverdebugpanic.h"
    26 #include "locprivacyserverdebugpanic.h"
    25 #include "locrequestorutilsresolver.h"
    27 #include "locrequestorutilsresolver.h"
       
    28 #include "locutilsdebug.h"
       
    29 
       
    30 
       
    31 
       
    32 
    26 // CONSTANTS
    33 // CONSTANTS
    27 
    34 
    28 // ================= MEMBER FUNCTIONS =======================
    35 // ================= MEMBER FUNCTIONS =======================
    29 
    36 
    30 // Two-phased constructor
    37 // Two-phased constructor
    58     }
    65     }
    59 
    66 
    60 // EPOC default constructor
    67 // EPOC default constructor
    61 void CLocPrivacyServerSession::ConstructL(CLocPrivacyServer& aServer)
    68 void CLocPrivacyServerSession::ConstructL(CLocPrivacyServer& aServer)
    62     {
    69     {
       
    70     LOCUTILSDEBUG( "+CLocPrivacyServerSession::ConstructL" )
    63     aServer.IncrementSessions();
    71     aServer.IncrementSessions();
    64     iBufFlat = CBufFlat::NewL(KPosBufFlatExpandSize);
    72     iBufFlat = CBufFlat::NewL(KPosBufFlatExpandSize);
       
    73     LOCUTILSDEBUG( "-CLocPrivacyServerSession::ConstructL" )
    65     }
    74     }
    66 
    75 
    67 // ---------------------------------------------------------
    76 // ---------------------------------------------------------
    68 // CLocPrivacyServerSession::ServiceL
    77 // CLocPrivacyServerSession::ServiceL
    69 //
    78 //
    70 // (other items were commented in a header).
    79 // (other items were commented in a header).
    71 // ---------------------------------------------------------
    80 // ---------------------------------------------------------
    72 //
    81 //
    73 void CLocPrivacyServerSession::ServiceL(const RMessage2& aMessage)
    82 void CLocPrivacyServerSession::ServiceL(const RMessage2& aMessage)
    74     {
    83     {
       
    84     LOCUTILSDEBUG( "+CLocPrivacyServerSession::ServiceL" ) 
    75     TRAPD(err, DispatchL(aMessage));
    85     TRAPD(err, DispatchL(aMessage));
    76 
    86 
    77     aMessage.Complete(err);
    87     aMessage.Complete(err);
       
    88     LOCUTILSDEBUG( "-CLocPrivacyServerSession::ServiceL" )
    78 
    89 
    79     }
    90     }
    80 
    91 
    81 // ---------------------------------------------------------
    92 // ---------------------------------------------------------
    82 // CLocPrivacyServerSession::CloseSession
    93 // CLocPrivacyServerSession::CloseSession
    84 // (other items were commented in a header).
    95 // (other items were commented in a header).
    85 // ---------------------------------------------------------
    96 // ---------------------------------------------------------
    86 //
    97 //
    87 void CLocPrivacyServerSession::CloseSession()
    98 void CLocPrivacyServerSession::CloseSession()
    88     {
    99     {
       
   100     LOCUTILSDEBUG( "+CLocPrivacyServerSession::CloseSession" ) 
    89     CLocPrivacyServer
   101     CLocPrivacyServer
    90             * server =
   102             * server =
    91                     static_cast<CLocPrivacyServer*> (const_cast<CServer2*> (Server()));
   103                     static_cast<CLocPrivacyServer*> (const_cast<CServer2*> (Server()));
    92     server->DecrementSessions(this);
   104     server->DecrementSessions(this);
       
   105     LOCUTILSDEBUG( "-CLocPrivacyServerSession::CloseSession" ) 
    93     }
   106     }
    94 
   107 
    95 // ---------------------------------------------------------
   108 // ---------------------------------------------------------
    96 // CLocPrivacyServerSession::DispatchL
   109 // CLocPrivacyServerSession::DispatchL
    97 //
   110 //
    98 // (other items were commented in a header).
   111 // (other items were commented in a header).
    99 // ---------------------------------------------------------
   112 // ---------------------------------------------------------
   100 //
   113 //
   101 void CLocPrivacyServerSession::DispatchL(const RMessage2& aMessage)
   114 void CLocPrivacyServerSession::DispatchL(const RMessage2& aMessage)
   102     {
   115     {
       
   116     LOCUTILSDEBUG( "+CLocPrivacyServerSession::DispatchL" ) 
   103     switch ( aMessage.Function() )
   117     switch ( aMessage.Function() )
   104         {
   118         {
   105         case ELocPrivacyGetSize:
   119         case ELocPrivacyGetSize:
   106             
   120             
   107            {
   121            {
   169         default:
   183         default:
   170             aMessage.Panic(KLocPrivSrvDebugPanicCategory,
   184             aMessage.Panic(KLocPrivSrvDebugPanicCategory,
   171                     ELocPrivSrvPanicUnknownActivity);
   185                     ELocPrivSrvPanicUnknownActivity);
   172             break;
   186             break;
   173         }
   187         }
       
   188     LOCUTILSDEBUG( "-CLocPrivacyServerSession::DispatchL" )
   174     }
   189     }
   175 
   190 
   176 //  End of File
   191 //  End of File