You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project contains a C library for using the Spectra S3 Deep Storage REST interface.
5
7
6
8
Contact Us
7
9
==========
@@ -12,7 +14,7 @@ Windows
12
14
=======
13
15
14
16
For Windows we release a binary version of the SDK for your convenience. See
15
-
[win32/README.dm](win32/README.md) for more information about building from
17
+
[win32/README.md](win32/README.md) for more information about building from
16
18
source in Windows.
17
19
18
20
Release Zip
@@ -41,17 +43,50 @@ Unix/Linux
41
43
==========
42
44
43
45
For Unix/Linux we distribute the SDK as source code. The release tarballs
44
-
contain a simple build script that should work on most Unix/Linux systems.
46
+
contain a simple build script that should work on most Unix/Linux systems. The
47
+
build system is currently autotools.
48
+
49
+
To install autotools on Ubuntu use apt-get and install the following:
50
+
51
+
$ sudo apt-get install build-essential
52
+
$ sudo apt-get install autoconf
53
+
$ sudo apt-get install libtool
54
+
55
+
To install autotools on CentOS use yum and install the following:
56
+
$ sudo yum install autoconf
57
+
$ sudo yum install libtool
45
58
46
59
The SDK depends upon several open source libraries, so you'll need to ensure
47
60
that you've installed the development header packages for each of them. For
48
-
example, Linux systems often provide lib\*-dev or lib\*-devel packages. The DS3
61
+
example, Linux systems often provide lib\*-dev or lib\*-devel packages. The Spectra S3
49
62
dependencies are:
50
63
51
64
* libxml2
52
65
* libcurl
53
66
* libglib-2.0
54
67
68
+
On Ubuntu you can install them with apt-get:
69
+
70
+
$ sudo apt-get install libxml2-dev
71
+
$ sudo apt-get install libcurl4-openssl-dev
72
+
$ sudo apt-get install libglib2.0-dev
73
+
74
+
On CentOS you can install them with yum:
75
+
76
+
$ sudo yum install libxml2-devel
77
+
$ sudo yum install libcurl-devel
78
+
$ sudo yum install glib2-devel
79
+
80
+
For testing you will need the boost unit test library as well.
81
+
82
+
On Ubuntu this can be installed with:
83
+
84
+
$ sudo apt-get install libboost-test-dev
85
+
86
+
On CentOS this can be installed with:
87
+
88
+
$ sudo yum install boost-test
89
+
55
90
Release Tarball
56
91
---------------
57
92
@@ -61,6 +96,7 @@ terminal window.
61
96
$ cd directory/containing/release/tarball
62
97
$ tar zxf ds3_c_sdk-{version}.tgz
63
98
$ cd ds3_c_sdk-{version}
99
+
$ autoreconf --install
64
100
$ ./configure
65
101
$ make
66
102
$ su
@@ -113,122 +149,102 @@ To build the sample, use the following commands:
113
149
$ cd sample
114
150
$ make deps # Builds the SDK and installs it into directory/containing/source/tree**/install**
115
151
$ make
152
+
153
+
To run it, first ensure that DS3_ACCESS_KEY, DS3_SECRET_KEY, DS3_ENDPOINT (and optionally http:proxy) are set in environment variables to match the target device. For the simulator, see [Installation Instructions] (https://developer.spectralogic.com/sim-install/)
116
154
117
-
To run it, just use `make run`.
155
+
$ make run-put-bulk # create "books" bucket and put files into it
156
+
$ make run-get-service # list all buckets
157
+
$ make run-get-bucket # list contents of "books" bucket
158
+
$ make run-get-object # get first book and write to temp file
159
+
160
+
Documentation
161
+
-------------
162
+
For the list of API calls in the C SDK please see the documentation [here](http://spectralogic.github.io/ds3_c_sdk/index.html)
118
163
119
164
Code Samples
120
165
------------
121
166
122
-
The following section contains several examples of using the DS3 C SDK. The first example shows how to get a list of all the buckets back from DS3:
167
+
The following section contains several examples of using the DS3 C SDK. The first example shows how to get a list of all the buckets back from Spectra S3:
123
168
124
169
```c
125
-
126
170
#include<stdlib.h>
127
-
#include<string.h>
128
-
#include<stdint.h>
129
171
#include<stdio.h>
130
-
#include<sys/types.h>
131
-
#include<sys/stat.h>
132
172
// "ds3.h" is the only header that needs to be included to use the DS3 API.
133
173
#include"ds3.h"
134
174
135
-
intmain (int args, char * argv[]) {
136
-
// Allocate space for the response pointer.
137
-
// The DS3 client library will end up consuming this.
0 commit comments