r_pin_message.h

Go to the documentation of this file.
00001 ///
00002 /// \file       r_pin_message.h
00003 ///             Blackberry database record parser class for pin message records.
00004 ///
00005 
00006 /*
00007     Copyright (C) 2005-2011, Net Direct Inc. (http://www.netdirect.ca/)
00008     Copyright (C) 2007, Brian Edginton (edge@edginton.net)
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 
00019     See the GNU General Public License in the COPYING file at the
00020     root directory of this project for more details.
00021 */
00022 
00023 #ifndef __BARRY_RECORD_PIN_MESSAGE_H__
00024 #define __BARRY_RECORD_PIN_MESSAGE_H__
00025 
00026 #include "dll.h"
00027 #include "r_message_base.h"
00028 
00029 namespace Barry {
00030 
00031 //
00032 // NOTE:  All classes here must be container-safe!  Perhaps add sorting
00033 //        operators in the future.
00034 //
00035 
00036 /// \addtogroup RecordParserClasses
00037 /// @{
00038 
00039 class BXEXPORT PINMessage : public MessageBase
00040 {
00041 public:
00042         void Clear()
00043         {
00044                 MessageBase::Clear();
00045 
00046                 RecType = GetDefaultRecType();
00047                 RecordId = 0;
00048         }
00049 
00050         // database name
00051         static const char * GetDBName() { return "PIN Messages"; }
00052         static uint8_t GetDefaultRecType() { return 0; }
00053 };
00054 
00055 BXEXPORT inline std::ostream& operator<<(std::ostream &os, const PINMessage &msg) {
00056         msg.Dump(os);
00057         return os;
00058 }
00059 
00060 /// @}
00061 
00062 } // namespace Barry
00063 
00064 #endif // __BARRY_RECORD_PIN_MESSAGE_H__
00065 
00066