/******************************************************************************/
/*                 Copyright C 1998-2004 Broadcom Corporation                 */
/*                                                                            */
/* This material is the confidential trade secret and proprietary information */
/* of Broadcom Corporation.  It may not be reproduced, used, sold or          */
/* transferred to any third party without the prior written consent of        */
/* Broadcom Corporation.   All rights reserved.                               */
/******************************************************************************/
/*   FileName        : bcm_processResult.h                                    */
/*   Purpose         : Header for bcm_processResult.c                         */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 27-Sep-2004                                            */
/*   History         : Compiled by CVS                                        */
/******************************************************************************/
/*   $Id: bcm_processResult.h,v 1.1 2004/09/27 15:33:11 hanssens Exp $  */
/******************************************************************************/
#ifndef BCM_PROCESS_RESULT_H
# define BCM_PROCESS_RESULT_H

# include "bcm_userdef.h"

# define PROCESS_RESULT(servRes, app, dev, name) \
         processResult(servRes, app, dev, name, __FILE__, __LINE__)

# define CALL_HMIQA_NPL(serv, dev, app) \
         PROCESS_RESULT(serv(dev->hmiDev, app), \
                        app, dev->devId, serv ## Layout.name)

# define CALL_HMIQA_REQ(serv, dev, app, msgReq)         \
         PROCESS_RESULT(serv(dev->hmiDev, app, msgReq), \
                        app, dev->devId, serv ## Layout.name)

# define CALL_HMIQA_REP(serv, dev, app, msgRep)         \
         PROCESS_RESULT(serv(dev->hmiDev, app, msgRep), \
                        app, dev->devId, serv ## Layout.name)

# define CALL_HMIQA_ALL(serv, dev, app, msgReq, msgRep)         \
         PROCESS_RESULT(serv(dev->hmiDev, app, msgReq, msgRep), \
                        app, dev->devId, serv ## Layout.name)

# define CALL_HMIQA_VAR(serv, dev, app, msgReq, msgRep, msgRepSize) \
         PROCESS_RESULT(serv(dev->hmiDev, app, msgReq, msgRep, msgRepSize), \
                        app, dev->devId, serv ## Layout.name)

int processResult(int serviceResult, 
                  uint16 appId,
                  uint16 devId,
                  char const *service,
                  char *fileName, 
                  int line);

#endif
