1/* 2 3MessagePrinter.h 4 5Copyright (c) 2001 OpenBeOS. 6 7Authors: 8 Philippe Houdoin 9 Simon Gauvin 10 Michael Pfeiffer 11 12Permission is hereby granted, free of charge, to any person obtaining a copy of 13this software and associated documentation files (the "Software"), to deal in 14the Software without restriction, including without limitation the rights to 15use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 16of the Software, and to permit persons to whom the Software is furnished to do 17so, subject to the following conditions: 18 19The above copyright notice and this permission notice shall be included in all 20copies or substantial portions of the Software. 21 22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28THE SOFTWARE. 29 30*/ 31 32#ifndef MSG_PRINTER_H 33#define MSG_PRINTER_H 34 35#include <StorageKit.h> 36#include <SupportKit.h> 37#include <string.h> 38 39const char FILE_NAME[] = "MessageFile"; 40 41/** 42 * Class 43 */ 44class MessagePrinter 45{ 46private: 47 BNode node; 48 status_t _err; 49 char msgFileName[B_FILE_NAME_LENGTH]; 50 51public: 52 MessagePrinter() { strcpy(msgFileName, FILE_NAME); } 53 MessagePrinter(const char *fileName) { strcpy(msgFileName, fileName); } 54 ~MessagePrinter() { } 55 56 status_t Print(BMessage *msg); 57}; 58 59#endif 60