aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/xml_things_handle.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-11 22:31:10 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-12 17:09:47 +0000
commit0507e963d7ed9300fd561fd9c24fe870bfac61a2 (patch)
treefc57eea1fa6ef7f5ca1eb5236c0c3c08b60627a2 /paludis/repositories/e/xml_things_handle.hh
parent634aa07ea0e8fa854308f81db2f72af1fca907bd (diff)
downloadpaludis-0507e963d7ed9300fd561fd9c24fe870bfac61a2.tar.gz
paludis-0507e963d7ed9300fd561fd9c24fe870bfac61a2.tar.xz
Add metadata.xml support.
Diffstat (limited to 'paludis/repositories/e/xml_things_handle.hh')
-rw-r--r--paludis/repositories/e/xml_things_handle.hh57
1 files changed, 57 insertions, 0 deletions
diff --git a/paludis/repositories/e/xml_things_handle.hh b/paludis/repositories/e/xml_things_handle.hh
new file mode 100644
index 000000000..35ab7aac4
--- /dev/null
+++ b/paludis/repositories/e/xml_things_handle.hh
@@ -0,0 +1,57 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2008 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_XML_THINGS_HANDLE_HH
+#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_XML_THINGS_HANDLE_HH 1
+
+#include <paludis/repositories/e/glsa.hh>
+#include <paludis/repositories/e/metadata_xml.hh>
+#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/instantiation_policy.hh>
+#include <paludis/util/fs_entry-fwd.hh>
+
+namespace paludis
+{
+ namespace erepository
+ {
+ class PALUDIS_VISIBLE XMLThingsHandle :
+ private PrivateImplementationPattern<XMLThingsHandle>,
+ public InstantiationPolicy<XMLThingsHandle, instantiation_method::SingletonTag>
+ {
+ friend class InstantiationPolicy<XMLThingsHandle, instantiation_method::SingletonTag>;
+
+ private:
+ XMLThingsHandle();
+ ~XMLThingsHandle();
+
+ public:
+ bool available() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ std::tr1::shared_ptr<GLSA> (* create_glsa_from_xml_file() const) (const std::string &);
+ std::tr1::shared_ptr<MetadataXML> (* create_metadata_xml_from_xml_file() const) (const FSEntry &);
+ };
+ }
+
+#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
+ extern template class PrivateImplementationPattern<erepository::XMLThingsHandle>;
+ extern template class InstantiationPolicy<erepository::XMLThingsHandle, instantiation_method::SingletonTag>;
+#endif
+}
+
+#endif