testexecmgmt/ucc/GenericService/inc/CService.h
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CSERVICE_H__
       
    21 #define __CSERVICE_H__
       
    22 
       
    23 #include "CCall.h"
       
    24 
       
    25 class CService
       
    26 	{
       
    27 	public:
       
    28 		CService() {}
       
    29 		virtual ~CService() {}
       
    30 
       
    31 		// Virtual function can be implemented in the derived class
       
    32 		//  if any setup is required for the service.
       
    33 		virtual bool Setup() { return true; }
       
    34 
       
    35 		// Pure virtual function needs to be implemented
       
    36 		// Handle the parsing/running of particular commands
       
    37 		virtual int RunCommand( const CCall& aCall ) = 0;
       
    38 	};
       
    39 
       
    40 // This also need to be implemented to return an instance
       
    41 // of your derived CService class
       
    42 extern CService* Service();
       
    43 
       
    44 #endif // __CSERVICE_H__