libarchive-ruby-gvalmon 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/ext/main.hpp ADDED
@@ -0,0 +1,79 @@
1
+ /****************************************************************************
2
+ This file is part of libarchive-ruby.
3
+
4
+ libarchive-ruby is a Ruby binding for the C library libarchive.
5
+
6
+ Copyright (C) 2011 Hans Mackowiak
7
+
8
+ libarchive-ruby is free software; you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation; either version 2 of the License, or
11
+ (at your option) any later version.
12
+
13
+ libarchive-ruby is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License along
19
+ with libarchive-ruby; if not, write to the Free Software Foundation, Inc.,
20
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
+ ****************************************************************************/
22
+
23
+ #ifndef __RubyAchiveMain_H__
24
+ #define __RubyAchiveMain_H__
25
+ #include <ruby.h>
26
+ #if HAVE_RUBY_ENCODING_H
27
+ #include <ruby/encoding.h>
28
+ #endif
29
+ #include <archive.h>
30
+ #include <archive_entry.h>
31
+ #include <fcntl.h>
32
+ #include <string>
33
+ extern VALUE rb_cArchive,rb_cArchiveEntry;
34
+
35
+ void Init_archive_entry(VALUE m);
36
+
37
+ template <typename T>
38
+ VALUE wrap(T *arg){ return Qnil;};
39
+ template <typename T>
40
+ T wrap(const VALUE &arg){};
41
+
42
+ enum archive_type {archive_path,archive_fd,archive_buffer,archive_ruby};
43
+
44
+ struct rarchive{
45
+ //union drumrum?
46
+ std::string path;
47
+ VALUE ruby;
48
+ std::string buffer;
49
+ int fd;
50
+ archive_type type;
51
+ int format;
52
+ int filter;
53
+ };
54
+
55
+ struct rarchive_entry{
56
+ archive_entry *entry;
57
+ };
58
+
59
+ template <>
60
+ VALUE wrap< rarchive >(rarchive *file );
61
+
62
+
63
+ template <>
64
+ rarchive* wrap< rarchive* >(const VALUE &vfile);
65
+
66
+ template <>
67
+ VALUE wrap< archive_entry >(struct archive_entry *entry );
68
+
69
+ template <>
70
+ archive_entry* wrap< archive_entry* >(const VALUE &vfile);
71
+
72
+ template <>
73
+ VALUE wrap< const char >(const char *str );
74
+
75
+ template <>
76
+ const char* wrap< const char* >(const VALUE &vfile);
77
+
78
+ #endif /* __RubyAchiveMain_H__ */
79
+
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: libarchive-ruby-gvalmon
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Hanmac
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-24 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: ! 'libarchive-ruby provides Ruby bindings for the libarchive library
14
+ that
15
+
16
+ allows you to alter arbitrary archives.
17
+
18
+ '
19
+ email: hanmac@gmx.de
20
+ executables: []
21
+ extensions:
22
+ - ext/extconf.rb
23
+ extra_rdoc_files:
24
+ - README.rdoc
25
+ files:
26
+ - README.rdoc
27
+ - COPYING.txt
28
+ - ext/archive.cpp
29
+ - ext/entry.cpp
30
+ - ext/main.cpp
31
+ - ext/main.hpp
32
+ - ext/extconf.rb
33
+ homepage:
34
+ licenses: []
35
+ metadata: {}
36
+ post_install_message:
37
+ rdoc_options:
38
+ - -t
39
+ - libarchive-ruby RDocs
40
+ - -m
41
+ - README.rdoc
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: 1.8.7
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements:
55
+ - A C++ compiler
56
+ - libarchive library
57
+ rubyforge_project:
58
+ rubygems_version: 2.0.5
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Ruby bindings for libarchive
62
+ test_files: []