- added TmpPath
authorArvin Schnell <aschnell@suse.de>
Mon, 30 Jul 2007 09:07:59 +0000 (09:07 +0000)
committerArvin Schnell <aschnell@suse.de>
Mon, 30 Jul 2007 09:07:59 +0000 (09:07 +0000)
swig/Pathname.i
swig/TmpPath.i [new file with mode: 0644]
swig/zypp.i

index 6b1e51f..ca62ace 100644 (file)
@@ -8,7 +8,7 @@
 }
 
 %typemap(freearg) const Pathname & {
- delete $1;
 delete $1;
 }
 
 %typemap(out) Pathname {
diff --git a/swig/TmpPath.i b/swig/TmpPath.i
new file mode 100644 (file)
index 0000000..bed2349
--- /dev/null
@@ -0,0 +1,45 @@
+
+class TmpPath
+{
+public:
+
+    TmpPath();
+
+    explicit TmpPath( const Pathname & tmpPath_r );
+
+    virtual ~TmpPath();
+
+    Pathname path() const;
+
+    static const Pathname & defaultLocation();
+
+};
+
+
+class TmpFile : public TmpPath
+{
+public:
+
+    explicit TmpFile( const Pathname & inParentDir_r = defaultLocation(),
+                     const std::string & prefix_r = defaultPrefix() );
+
+    static TmpFile makeSibling( const Pathname & sibling_r );
+
+    static const std::string & defaultPrefix();
+
+};
+
+
+class TmpDir : public TmpPath
+{
+public:
+
+    explicit TmpDir( const Pathname & inParentDir_r = defaultLocation(),
+                    const std::string & prefix_r = defaultPrefix() );
+
+    static TmpDir makeSibling( const Pathname & sibling_r );
+
+    static const std::string & defaultPrefix();
+
+};
+
index 5694b0d..ee69252 100644 (file)
  #include "zypp/RepoManager.h"
  #include "zypp/repo/RepoType.h"
 #include "zypp/MediaSetAccess.h"
+#include "zypp/TmpPath.h"
 
  using namespace boost;
  using namespace zypp;
  using namespace zypp::repo;
  using namespace zypp::resfilter;
+ using namespace zypp::filesystem;
 
  typedef std::set<Url> UrlSet;
  %}
@@ -106,6 +108,7 @@ class intrusive_ptr {
 %include "ZYppCommitPolicy.i"
 %include "ZYppCommitResult.i"
 %include "MediaSetAccess.i"
+%include "TmpPath.i"
 
 
 #ifdef SWIGRUBY