1*adae1a12SAugustin Cavalier /* 2*adae1a12SAugustin Cavalier * Copyright 2003-2004 Waldemar Kornewald. All rights reserved. 3*adae1a12SAugustin Cavalier * Copyright 2017 Haiku, Inc. All rights reserved. 4*adae1a12SAugustin Cavalier * Distributed under the terms of the MIT License. 5*adae1a12SAugustin Cavalier */ 6a325aa03SAugustin Cavalier #ifndef _MESSAGE_DRIVER_SETTINGS_UTILS__H 7a325aa03SAugustin Cavalier #define _MESSAGE_DRIVER_SETTINGS_UTILS__H 8a325aa03SAugustin Cavalier 9a325aa03SAugustin Cavalier #include <SupportDefs.h> 10a325aa03SAugustin Cavalier 11a325aa03SAugustin Cavalier struct driver_settings; 12a325aa03SAugustin Cavalier class BMessage; 13a325aa03SAugustin Cavalier class BFile; 14a325aa03SAugustin Cavalier 15a325aa03SAugustin Cavalier #define MDSU_NAME "Name" 16a325aa03SAugustin Cavalier #define MDSU_VALUES "Values" 17a325aa03SAugustin Cavalier #define MDSU_PARAMETERS "Parameters" 18a325aa03SAugustin Cavalier #define MDSU_VALID "Valid" 19a325aa03SAugustin Cavalier 20a325aa03SAugustin Cavalier 21a325aa03SAugustin Cavalier extern bool FindMessageParameter(const char *name, const BMessage& message, 22a325aa03SAugustin Cavalier BMessage *save, int32 *startIndex = NULL); 23a325aa03SAugustin Cavalier 24a325aa03SAugustin Cavalier extern driver_settings *MessageToDriverSettings(const BMessage& message); 25a325aa03SAugustin Cavalier 26a325aa03SAugustin Cavalier extern bool ReadMessageDriverSettings(const char *name, BMessage *message); 27a325aa03SAugustin Cavalier extern bool WriteMessageDriverSettings(BFile& file, const BMessage& message); 28a325aa03SAugustin Cavalier 29a325aa03SAugustin Cavalier 30a325aa03SAugustin Cavalier #endif 31