testexecmgmt/ucc/Source/include/standard_service_manager.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 * standard_service_manager
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __STANDARD_SERVICE_MANAGER_H__
       
    23 #define __STANDARD_SERVICE_MANAGER_H__
       
    24 
       
    25 
       
    26 /****************************************************************************************
       
    27  * 
       
    28  * Macro Functions
       
    29  * 
       
    30  ***************************************************************************************/
       
    31 #define SET_ERROR_CODE(type_name,member_name,ptr_to_result)    { \
       
    32                                                                  (ptr_to_result) = (type_name*)aArgs;                    \
       
    33                                                                  memset( ptr_to_result, 0, sizeof(type_name) );        \
       
    34                                                                  (ptr_to_result)->member_name = aError;                  \
       
    35                                                                }
       
    36 
       
    37 #define SET_LIST_ERROR_CODE(type_name,ptr_to_result)           { \
       
    38                                                                  assert( aError != ERR_NONE );                         \
       
    39                                                                  ptr_to_result = (type_name*)aArgs;                    \
       
    40                                                                  if( ptr_to_result->type_name##_len != 0 ) {           \
       
    41                                                                    free( ptr_to_result->type_name##_val );             \
       
    42                                                                    ptr_to_result->type_name##_val = NULL;              \
       
    43                                                                    ptr_to_result->type_name##_len = 0;                 \
       
    44                                                                  }                                                     \
       
    45 							       }			
       
    46 
       
    47 /****************************************************************************************
       
    48  * 
       
    49  * Done
       
    50  * 
       
    51  ***************************************************************************************/
       
    52 #endif