00001 /* 00002 * ==================================================================== 00003 * Copyright (c) 2002-2006 The RapidSvn Group. All rights reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library (in the file LGPL.txt); if not, 00017 * write to the Free Software Foundation, Inc., 51 Franklin St, 00018 * Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 * This software consists of voluntary contributions made by many 00021 * individuals. For exact contribution history, see the revision 00022 * history and logs, available at http://rapidsvn.tigris.org/. 00023 * ==================================================================== 00024 */ 00025 00026 #ifndef _SVNCPP_PROPERTY_H_ 00027 #define _SVNCPP_PROPERTY_H_ 00028 00029 00030 // Ignore MSVC 6 compiler warning: debug symbol truncated 00031 #if defined (_MSC_VER) && _MSC_VER <= 1200 00032 #pragma warning (disable: 4786) 00033 #endif 00034 00035 // Ignore MSVC 7 compiler warning: C++ exception specification 00036 #if defined (_MSC_VER) && _MSCVER > 1200 && _MSCVER <= 1310 00037 #pragma warning (disable: 4290) 00038 #endif 00039 00040 00041 // stl 00042 #include <vector> 00043 #include <string> 00044 00045 // svncpp 00046 #include "svncpp/context.hpp" 00047 #include "svncpp/path.hpp" 00048 00049 namespace svn 00050 { 00051 struct PropertyEntry 00052 { 00053 std::string name; 00054 std::string value; 00055 00056 PropertyEntry (const char * name, const char * value); 00057 }; 00058 00059 // forward declarations 00060 class Path; 00061 00065 class Property 00066 { 00067 public: 00068 Property (Context * context = 0, 00069 const Path & path = ""); 00070 00071 virtual ~Property (); 00072 00077 const std::vector<PropertyEntry> & 00078 entries () const 00079 { 00080 return m_entries; 00081 } 00082 00089 void set (const char * name, const char * value); 00090 00095 void remove (const char * name); 00096 00097 private: 00098 Context * m_context; 00099 Path m_path; 00100 std::vector<PropertyEntry> m_entries; 00101 00102 std::string getValue (const char * name); 00103 void list (); 00104 }; 00105 } 00106 00107 #endif 00108 /* ----------------------------------------------------------------- 00109 * local variables: 00110 * eval: (load-file "../../rapidsvn-dev.el") 00111 * end: 00112 */