/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* File: octvc1_cursor_swap.h Copyright (c) 2018 Octasic Inc. All rights reserved. Description: This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Release: OCTSDR Software Development Kit OCTSDR_GSM-02.11.00-B1927 (2018/04/27) \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ #ifndef __OCTVC1_CURSOR_SWAP_H__ #define __OCTVC1_CURSOR_SWAP_H__ #ifdef __cplusplus extern "C" { #endif /***************************** INCLUDE FILES *******************************/ #include "octvc1_swap_hdrs.h" #include "octvc1_cursor.h" /********************************* MACROS **********************************/ #if defined( _OCT_ENDIAN_TYPE_LE_ ) #define mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( pType ){ \ *((tOCT_UINT32 *)pType) = mOCT_SWAP32_IF_LE( *((tOCT_UINT32 *)pType) ); } #else #define mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( pType ) #endif /* _OCT_ENDIAN_TYPE_LE_ */ #if defined( _OCT_ENDIAN_TYPE_LE_ ) #define mOCTVC1_CURSOR_HANDLE_OBJECT_GET_SWAP( _f_pParms ){ tOCTVC1_CURSOR_HANDLE_OBJECT_GET * pOCTVC1_CURSOR_HANDLE_OBJECT_GET = (_f_pParms); SWAP_UNUSED(pOCTVC1_CURSOR_HANDLE_OBJECT_GET)\ ((tOCTVC1_CURSOR_HANDLE_OBJECT_GET *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET)->hObject = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_HANDLE_OBJECT_GET *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET)->hObject); \ { mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( &((tOCTVC1_CURSOR_HANDLE_OBJECT_GET *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET)->ulGetMode ); } \ } #else #define mOCTVC1_CURSOR_HANDLE_OBJECT_GET_SWAP( pOCTVC1_CURSOR_HANDLE_OBJECT_GET ) #endif /* _OCT_ENDIAN_TYPE_LE_ */ #if defined( _OCT_ENDIAN_TYPE_LE_ ) #define mOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT_SWAP( _f_pParms ){ tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT * pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT = (_f_pParms); SWAP_UNUSED(pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)\ ((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)->hObject = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)->hObject); \ { mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( &((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)->ulGetMode ); } \ ((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)->hHandleObjectGet = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)->hHandleObjectGet); \ } #else #define mOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT_SWAP( pOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT ) #endif /* _OCT_ENDIAN_TYPE_LE_ */ #if defined( _OCT_ENDIAN_TYPE_LE_ ) #define mOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID_SWAP( _f_pParms ){ tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID * pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID = (_f_pParms); SWAP_UNUSED(pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)\ ((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)->hObject = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)->hObject); \ { mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( &((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)->ulGetMode ); } \ ((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)->ulSubObjectId = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID *)pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)->ulSubObjectId); \ } #else #define mOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID_SWAP( pOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID ) #endif /* _OCT_ENDIAN_TYPE_LE_ */ #if defined( _OCT_ENDIAN_TYPE_LE_ ) #define mOCTVC1_CURSOR_INDEX_GET_SWAP( _f_pParms ){ tOCTVC1_CURSOR_INDEX_GET * pOCTVC1_CURSOR_INDEX_GET = (_f_pParms); SWAP_UNUSED(pOCTVC1_CURSOR_INDEX_GET)\ ((tOCTVC1_CURSOR_INDEX_GET *)pOCTVC1_CURSOR_INDEX_GET)->ulIndex = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_INDEX_GET *)pOCTVC1_CURSOR_INDEX_GET)->ulIndex); \ { mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( &((tOCTVC1_CURSOR_INDEX_GET *)pOCTVC1_CURSOR_INDEX_GET)->ulGetMode ); } \ } #else #define mOCTVC1_CURSOR_INDEX_GET_SWAP( pOCTVC1_CURSOR_INDEX_GET ) #endif /* _OCT_ENDIAN_TYPE_LE_ */ #if defined( _OCT_ENDIAN_TYPE_LE_ ) #define mOCTVC1_CURSOR_INDEX_GET_SUB_INDEX_SWAP( _f_pParms ){ tOCTVC1_CURSOR_INDEX_GET_SUB_INDEX * pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX = (_f_pParms); SWAP_UNUSED(pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX)\ ((tOCTVC1_CURSOR_INDEX_GET_SUB_INDEX *)pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX)->ulParentIndex = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_INDEX_GET_SUB_INDEX *)pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX)->ulParentIndex); \ { mOCTVC1_OBJECT_CURSOR_ENUM_SWAP( &((tOCTVC1_CURSOR_INDEX_GET_SUB_INDEX *)pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX)->ulGetMode ); } \ ((tOCTVC1_CURSOR_INDEX_GET_SUB_INDEX *)pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX)->ulSubIndex = \ mOCT_SWAP32_IF_LE(((tOCTVC1_CURSOR_INDEX_GET_SUB_INDEX *)pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX)->ulSubIndex); \ } #else #define mOCTVC1_CURSOR_INDEX_GET_SUB_INDEX_SWAP( pOCTVC1_CURSOR_INDEX_GET_SUB_INDEX ) #endif /* _OCT_ENDIAN_TYPE_LE_ */ #ifdef __cplusplus } #endif #endif /* __OCTVC1_CURSOR_SWAP_H__ */