00001 /***************************************************************************** 00002 * Copyright (c) 1997-2007, Intel Corporation. 00003 * All rights reserved. This program and the accompanying materials 00004 * are made available under the terms of the Eclipse Public License v1.0 00005 * which accompanies this distribution, and is available at 00006 * http://www.eclipse.org/legal/epl-v10.html 00007 * 00008 * Contributors: 00009 * Intel Corporation - Initial API and implementation 00010 * 00011 * $Id$ 00012 *****************************************************************************/ 00013 00014 #ifndef __MARTINI_EXTERNAL_CONTROL_H__ 00015 #define __MARTINI_EXTERNAL_CONTROL_H__ 00016 00017 #include "MRTEResults.h" 00018 00115 namespace Martini { 00116 00122 namespace ExternalControl 00123 { 00124 00130 enum ECommand 00131 { 00132 CMD_CONFIGURE, 00133 00134 CMD_START, 00135 CMD_STOP, 00136 CMD_ATTACH, 00137 CMD_DETACH, 00138 CMD_RELOAD_OPTIONS, 00139 CMD_CUSTOM, 00140 CMD_LAST 00141 }; 00142 00151 typedef void (*TConfigureCallback)(char*); 00152 00160 typedef void (*TStartCallback)(void); 00161 00169 typedef void (*TStopCallback)(void); 00170 00178 typedef void (*TAttachCallback)(void); 00179 00187 typedef void (*TDetachCallback)(void); 00188 00200 typedef void (*TCustomCommandCallback)(unsigned int, void*); 00201 00205 union UCallback 00206 { 00207 TConfigureCallback pfnConfigure; 00208 00209 TStartCallback pfnStart ; 00210 TStopCallback pfnStop; 00211 TAttachCallback pfnAttach; 00212 TDetachCallback pfnDetach; 00213 TCustomCommandCallback pfnCustomCommand; 00214 00215 }; 00216 00222 enum ESeverityLevel 00223 { 00224 SL_NOT_ERROR, 00225 SL_WARNING, 00226 SL_FATAL, 00227 }; 00228 00235 typedef int (*TRegisterMartiniCallback)(ECommand command, UCallback callback); 00236 00243 typedef void (*TMartiniMessage)(char* szMsg, ESeverityLevel level); 00244 00251 typedef void (*TMartiniProcessShutdown)(); 00252 00258 typedef TResult (*TECInit)(char **szWorkingDir, const char *szOptions); 00259 00260 }} 00261 00262 #ifdef linux 00263 #define EC_EXPORT 00264 #else // linux 00265 #ifdef ECWRAPPER_EXPORTS 00266 #define EC_EXPORT __declspec(dllexport) 00267 #else // ECWRAPPER_EXPORTS 00268 #define EC_EXPORT __declspec(dllimport) 00269 #endif // ECWRAPPER_EXPORTS 00270 #endif // linux 00271 00287 extern "C" EC_EXPORT 00288 int RegisterMartiniCallback(Martini::ExternalControl::ECommand command, 00289 Martini::ExternalControl::UCallback callback); 00290 00302 extern "C" EC_EXPORT 00303 void MartiniMessage(char* szMsg, 00304 Martini::ExternalControl::ESeverityLevel level); 00305 00312 extern "C" EC_EXPORT 00313 void MartiniProcessShutdown(); 00314 00334 extern "C" EC_EXPORT 00335 TResult EC_Init(char **szWorkingDir, const char *szOptions); 00336 00337 #endif //__MARTINI_EXTERNAL_CONTROL_H__
(C) Copyright Intel Corporation 2007-2008. All Rights Reserved.
Generated on Thu Mar 6 15:07:54 2008 for Martini by