pimprotocols/phonebooksync/inc/phbksyncsess.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Header file for Phonebook Synchroniser Session class.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef __PHBKSYNCSESS_H__
       
    24 #define __PHBKSYNCSESS_H__
       
    25 
       
    26 /**
       
    27  *  This is the Phonebook Sync Server side session class and is responsible
       
    28  *  for handling the client (RPhoneBookSession) requests, encoding/decoding
       
    29  *  the parameters and Contacts Item phonebook data across the API.
       
    30  *  Once the parameters are decoded the request is sent to the server where
       
    31  *  it will either be handled directly or forwarded to the Background Sync
       
    32  *  Engine. Once the request is completed, any return parameters are written
       
    33  *  back to the client if neccessary.
       
    34  */
       
    35 class CPhoneBookSession : public CSession2
       
    36 	{
       
    37 public:
       
    38 	void CreateL();
       
    39 	void CompleteRequest(const RMessage2& aMessage, TInt aResult) const;
       
    40 
       
    41 	inline CPhoneBookServer& Server();
       
    42 
       
    43 private:
       
    44 	~CPhoneBookSession();
       
    45 
       
    46 	void ServiceL(const RMessage2& aMessage);
       
    47 	void DoSynchronisationL(const RMessage2& aMessage);
       
    48 	void GetContactFormatL(const RMessage2& aMessage);
       
    49 	void GetSyncModeL(const RMessage2& aMessage);
       
    50 	void SetSyncModeL(const RMessage2& aMessage);
       
    51 	void DeleteCntFromICCL(const RMessage2& aMessage);
       
    52 	void WriteCntToICCL(const RMessage2& aMessage);
       
    53 	void ValidateContactL(const RMessage2& aMessage);
       
    54 	void UpdateLookupTableL(const RMessage2& aMessage);
       
    55 	void GetPhoneBookIdL(const RMessage2& aMessage);
       
    56 	void GetCacheStateL(const RMessage2& aMessage);
       
    57 	void DbgMarkHeapL(const RMessage2& aMessage);
       
    58 	void DbgCheckHeapL(const RMessage2& aMessage);
       
    59 	void DbgMarkEndL(const RMessage2& aMessage);
       
    60 	void DbgFailNextL(const RMessage2& aMessage);
       
    61 	void DoSynchronisationCancelL(const RMessage2& aMessage);
       
    62 	void DeleteCntFromICCCancelL(const RMessage2& aMessage);
       
    63 	void WriteCntToICCCancelL(const RMessage2& aMessage);
       
    64 	void NotifyCacheStateChangeL(const RMessage2& aMessage);
       
    65 	void NotifyCacheStateChangeCancelL(const RMessage2& aMessage);
       
    66 	void GetLastSyncErrorL(const RMessage2& aMessage);
       
    67 	void GetNumSlotsL(const RMessage2& aMessage);
       
    68 	void GetNumFreeSlotsL(const RMessage2& aMessage);
       
    69 	void GetFreeSlotsL(const RMessage2& aMessage);
       
    70 	void GetSlotIdL(const RMessage2& aMessage);
       
    71 	void ShutdownServerL(const RMessage2& aMessage);
       
    72 	};
       
    73 
       
    74 /**
       
    75  *  Returns a reference to the CPhoneBookServer class.
       
    76  */
       
    77 inline CPhoneBookServer& CPhoneBookSession::Server()
       
    78 	{
       
    79 	return *static_cast<CPhoneBookServer*>(const_cast<CServer2*>(CSession2::Server()));
       
    80 	} // CPhoneBookSession::Server
       
    81 
       
    82 
       
    83 #endif // __PHBKSYNCSESS_H__
       
    84