phonebookui/Phonebook2/ServerApplication/inc/CPbk2AssignService.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Phonebook 2 application server assign service.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2ASSIGNSERVICE_H
       
    20 #define CPBK2ASSIGNSERVICE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "MPbk2AppService.h"
       
    25 #include "MPbk2UiServiceObserver.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbk2UiService;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Phonebook 2 application server assign service.
       
    34  * Responsible for driving the assign service. Selecting proper assign
       
    35  * type and gathering assign results afterwards.
       
    36  */
       
    37 class CPbk2AssignService : public CBase,
       
    38                            public MPbk2AppService,
       
    39                            public MPbk2UiServiceObserver
       
    40     {
       
    41     public: // Construction and destruction
       
    42 
       
    43         /**
       
    44          * Creates a new instance of this class.
       
    45          *
       
    46          * @param aExitMsg      Exit message.
       
    47          * @return  A new instance of this class.
       
    48          */
       
    49         static CPbk2AssignService* NewL(
       
    50                 const RMessage2& aExitMsg );
       
    51 
       
    52         /**
       
    53          * Destructor.
       
    54          */
       
    55         ~CPbk2AssignService();
       
    56 
       
    57         void DoExitServiceL( TInt aExitId );
       
    58 
       
    59     public: // From MPbk2AppService
       
    60         void LaunchServiceL(
       
    61                 const RMessage2& aMessage );
       
    62         void CancelService(
       
    63                 const RMessage2& aMessage );
       
    64         void GetResultsL(
       
    65                 const RMessage2& aMessage );
       
    66         void GetResultSizeL(
       
    67                 const RMessage2& aMessage );
       
    68         void TryExitServiceL(
       
    69                 const RMessage2& aMessage );
       
    70         void TryAcceptServiceL(
       
    71                 const RMessage2& aMessage );
       
    72 
       
    73     public: // From MPbk2UiServiceObserver
       
    74         void ServiceComplete();
       
    75         void ServiceCanceled();
       
    76         void ServiceAborted();
       
    77         void ServiceError(
       
    78                 TInt aErrorCode );
       
    79         void CompleteExitMessage(
       
    80                 TInt aExitCommandId );
       
    81         void CompleteAcceptMsg(
       
    82                 const TDesC8& aMarkedEntries,
       
    83                 const TDesC8& aLinkData );
       
    84 
       
    85     private: // Implementation
       
    86         CPbk2AssignService(
       
    87                 const RMessage2& aExitMsg );
       
    88         void ExitApplicationL();
       
    89 
       
    90     private: // Data
       
    91         /// Own: Assign complete message
       
    92         RMessage2 iAssignCompleteMsg;
       
    93         /// Ref: Exit message
       
    94         const RMessage2& iExitMsg;
       
    95         /// Own: Ui service that performs the assign
       
    96         MPbk2UiService* iUiService;
       
    97     };
       
    98 
       
    99 #endif // CPBK2ASSIGNSERVICE_H
       
   100 
       
   101 // End of File