1*a325aa03SAugustin Cavalier /* ----------------------------------------------------------------------- 2*a325aa03SAugustin Cavalier * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de 3*a325aa03SAugustin Cavalier * 4*a325aa03SAugustin Cavalier * Permission is hereby granted, free of charge, to any person obtaining a 5*a325aa03SAugustin Cavalier * copy of this software and associated documentation files (the "Software"), 6*a325aa03SAugustin Cavalier * to deal in the Software without restriction, including without limitation 7*a325aa03SAugustin Cavalier * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*a325aa03SAugustin Cavalier * and/or sell copies of the Software, and to permit persons to whom the 9*a325aa03SAugustin Cavalier * Software is furnished to do so, subject to the following conditions: 10*a325aa03SAugustin Cavalier * 11*a325aa03SAugustin Cavalier * The above copyright notice and this permission notice shall be included in 12*a325aa03SAugustin Cavalier * all copies or substantial portions of the Software. 13*a325aa03SAugustin Cavalier * 14*a325aa03SAugustin Cavalier * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*a325aa03SAugustin Cavalier * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*a325aa03SAugustin Cavalier * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17*a325aa03SAugustin Cavalier * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18*a325aa03SAugustin Cavalier * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19*a325aa03SAugustin Cavalier * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20*a325aa03SAugustin Cavalier * DEALINGS IN THE SOFTWARE. 21*a325aa03SAugustin Cavalier * ----------------------------------------------------------------------- */ 22*a325aa03SAugustin Cavalier 23*a325aa03SAugustin Cavalier #ifndef _MESSAGE_DRIVER_SETTINGS_UTILS__H 24*a325aa03SAugustin Cavalier #define _MESSAGE_DRIVER_SETTINGS_UTILS__H 25*a325aa03SAugustin Cavalier 26*a325aa03SAugustin Cavalier #include <SupportDefs.h> 27*a325aa03SAugustin Cavalier 28*a325aa03SAugustin Cavalier struct driver_settings; 29*a325aa03SAugustin Cavalier class BMessage; 30*a325aa03SAugustin Cavalier class BFile; 31*a325aa03SAugustin Cavalier 32*a325aa03SAugustin Cavalier #define MDSU_NAME "Name" 33*a325aa03SAugustin Cavalier #define MDSU_VALUES "Values" 34*a325aa03SAugustin Cavalier #define MDSU_PARAMETERS "Parameters" 35*a325aa03SAugustin Cavalier #define MDSU_VALID "Valid" 36*a325aa03SAugustin Cavalier 37*a325aa03SAugustin Cavalier 38*a325aa03SAugustin Cavalier extern bool FindMessageParameter(const char *name, const BMessage& message, 39*a325aa03SAugustin Cavalier BMessage *save, int32 *startIndex = NULL); 40*a325aa03SAugustin Cavalier 41*a325aa03SAugustin Cavalier extern driver_settings *MessageToDriverSettings(const BMessage& message); 42*a325aa03SAugustin Cavalier 43*a325aa03SAugustin Cavalier extern bool ReadMessageDriverSettings(const char *name, BMessage *message); 44*a325aa03SAugustin Cavalier extern bool WriteMessageDriverSettings(BFile& file, const BMessage& message); 45*a325aa03SAugustin Cavalier 46*a325aa03SAugustin Cavalier 47*a325aa03SAugustin Cavalier #endif 48