libmsn 4.2.1
|
00001 #ifndef __msn_msnobj_h__ 00002 #define __msn_msnobj_h__ 00003 00004 /* 00005 * msnobject.h 00006 * libmsn 00007 * 00008 * Created by Tiago Salem Herrmann on Mon Ago 22 2007. 00009 * Copyright (c) 2007 Tiago Salem Herrmann. All rights reserved 00010 * 00011 * This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 */ 00025 00026 #include <string> 00027 #include <list> 00028 00029 #include "libmsn_export.h" 00030 00031 namespace MSN 00032 { 00033 class LIBMSN_EXPORT MSNObject 00034 { 00035 private: 00036 unsigned int current_id; 00037 std::string Creator; 00038 typedef struct 00039 { 00040 std::string Creator; 00041 unsigned long long Size; 00042 int Type; 00043 std::string Location; 00044 std::string realLocation; 00045 std::string Friendly; 00046 std::string SHA1D; 00047 std::string SHA1C; 00048 std::string XMLString; 00049 } MSNObjectUnit; 00050 00051 std::list<MSNObjectUnit> msnObjects; 00052 public: 00053 MSNObject() : current_id(0) {}; 00054 ~MSNObject() {}; 00055 void setCreator(std::string creator); 00056 void addMSNObject(std::string filename, int Type); 00057 bool getMSNObjectXML(std::string filename, int Type, std::string & msnobj); 00058 bool getMSNObject(std::string filename, int Type, MSNObjectUnit & msnobj); 00059 bool delMSNObjectByType(int Type); 00060 bool getMSNObjectXMLByType(int Type, std::string & xml); 00061 bool getMSNObjectRealPath(std::string xml, std::string & realpath); 00062 }; 00063 } 00064 #endif