Aspera Developer Documentation
FaspManagerTypes.h
Go to the documentation of this file.
1 
7 #ifndef __FASP_MANAGER_TYPES_H__
8 #define __FASP_MANAGER_TYPES_H__
9 
10 #include "FaspManagerCommon.h"
11 #include <list>
12 
13 #ifndef _AS_PLATFORM_H_
14 #ifdef WIN32
15 #ifdef VSTUDIO
16  typedef char int8_t;
17  typedef short int16_t;
18  typedef long int32_t;
19  typedef __int64 int64_t;
20  typedef unsigned char u_int8_t;
21  typedef unsigned short u_int16_t;
22  typedef unsigned long u_int32_t;
23  typedef unsigned __int64 u_int64_t;
24 #else
25 #ifndef _STDINT_H // Ming stdint.h defines the int bitdepth types
26  typedef char int8_t;
27  typedef short int16_t;
28  typedef long int32_t;
29  typedef long long int64_t;
30 #endif
31  typedef unsigned char u_int8_t;
32  typedef unsigned short u_int16_t;
33  typedef unsigned long u_int32_t;
34  typedef unsigned long long u_int64_t;
35 #endif
36 #endif
37 
38 #ifdef WIN32
39 #define strtoll(str, end, base) _strtoi64(str, end, base)
40 #define strtoull(str, end, base) _strtoui64(str, end, base)
41 #endif
42 
43 #ifdef WIN32
44 # define LLD "%I64d"
45 # define LLU "%I64u"
46 # define LLX "%I64x"
47 # define NLLD(n) "%" #n "I64d"
48 # define NLLU(n) "%" #n "I64u"
49 #else
50 # if __WORDSIZE == 64
51 # define LLD "%ld"
52 # define LLU "%lu"
53 # define LLX "%lx"
54 # define NLLD(n) "%" #n "ld"
55 # define NLLU(n) "%" #n "lu"
56 # else
57 # define LLD "%lld"
58 # define LLU "%llu"
59 # define LLX "%llx"
60 # define NLLD(n) "%" #n "lld"
61 # define NLLU(n) "%" #n "llu"
62 # endif
63 #endif
64 #endif
65 
66 namespace Aspera
67 {
68 namespace FaspManager
69 {
70 /* Forward declaration */
71 class Job;
72 class Location;
73 class Functor;
74 class Queue;
75 struct XferParams;
76 struct FileStats;
77 
79 typedef enum job_state_e
80 {
81  J_STATE_IDLE = 0x00,
82  J_STATE_CONNECTING = 0x01,
83  J_STATE_AUTHENTICATING = 0x02,
84  J_STATE_STARTING = 0x03,
85  J_STATE_TRANSFERRING = 0x04,
86  J_STATE_FAILED = 0x05,
87  J_STATE_FINISHED = 0x06,
88 
89  J_STATE_MAX
90 } job_state_e;
91 
93 typedef enum file_state_e
94 {
95  F_STATE_IDLE = 0x00,
96  F_STATE_TRANSFERRING = 0x01,
97  F_STATE_FAILED = 0x02,
98  F_STATE_FINISHED = 0x03,
99 
100  F_STATE_MAX
101 } file_state_e;
102 
105 typedef enum content_protect_e
106 {
113 
115 
117 typedef enum encryption_type_e
118 {
119  ENCRYPT_NONE = 0x00,
120  ENCRYPT_AES128 = 0x01
121 
123 
125 typedef enum resume_type_e
126 {
128  RESUME_NONE = 0x00,
135 
136 } resume_type_e;
137 
140 typedef enum policy_e
141 {
143  POLICY_FIXED = 0x00,
146  POLICY_HIGH = 0x01,
148  POLICY_FAIR = 0x02,
150  POLICY_LOW = 0x03
151 
152 } policy_e;
153 
155 typedef enum fasp_version_e
156 {
161 
163 
165 typedef enum xfer_direction_e
166 {
171 
173 
175 typedef enum symlink_policy_e
176 {
183  // Skip symlinks
184  SYMLINK_P_SKIP = 4
186 
188 typedef enum manifest_e
189 {
191  TEXT = 1,
193  NONE = 2
194 } manifest_e;
195 
197 typedef enum overwrite_e
198 {
200  NEVER = 1,
202  ALWAYS = 2,
204  DIFF = 3,
206  OLDER = 4,
209 } overwrite_e;
210 
212 typedef enum callback_event_e
213 {
214 /* File Transfer Events */
215  F_EVENT_BANDWIDTH_MEASUREMENT = 0x00,
216  F_EVENT_CONNECTING = 0x01,
217  F_EVENT_FILE_ERROR = 0x02,
218  F_EVENT_FILE_START = 0x03,
219  F_EVENT_FILE_STOP = 0x04,
220  F_EVENT_PROGRESS = 0x05,
221  F_EVENT_RATE_MODIFICATION = 0x06,
222  F_EVENT_SESSION_ERROR = 0x07,
223  F_EVENT_SESSION_START = 0x08,
224  F_EVENT_SESSION_STOP = 0x09,
225 
226  FS_EVENT_MAX
227 
229 
231 struct JobOrder
232 {
239 };
240 
242 typedef struct XferParams
243 {
245  unsigned short tcp_port;
247  unsigned short udp_port;
249  u_int64_t target_rate;
251  u_int64_t min_rate;
267  char const * token;
269  char const * cookie;
279  char const * license;
281  char const * fasp_log_path;
283  char const * fasp_remote_log_path;
285  unsigned long dgram_size;
287  unsigned long rexmsg_size;
289  unsigned long write_blk_size;
291  unsigned long read_blk_size;
297  bool persist;
315  unsigned long retry_timeout_s;
319  std::list<char const *> exclude_patterns;
325  char const * source_base;
327  char const * destination_root;
329  XferParams();
330 
332  XferParams(const XferParams &xp);
333 
334 } XferParams;
335 
338 {
340  u_int64_t target_rate;
342  u_int64_t min_rate;
345 };
346 
348 struct JobStats
349 {
351  char* job_id;
359  unsigned short udp_port;
361  u_int64_t target_rate;
363  u_int64_t min_rate;
365  char* encryption;
367  char* policy;
373  u_int64_t files_complete;
375  u_int64_t files_failed;
377  unsigned long err_code;
383  char* cookie;
387  char* host;
389  u_int64_t start_time_ms;
391  char* token;
397  u_int64_t total_lost_bytes;
401  char* user;
403  bool remote;
407  u_int32_t delay;
408 
411 
415  u_int64_t transfers_failed;
417  u_int64_t transfers_passed;
419  u_int64_t transfers_skipped;
423  u_int64_t pathscans_failed;
430 };
431 
433 struct FileStats
434 {
436  char* filename;
440  u_int64_t file_size;
442  u_int64_t bytes_written;
444  u_int64_t bytes_cont;
446  u_int64_t start_byte;
448  u_int64_t end_byte;
450  u_int64_t rate_cap;
452  unsigned long err_code;
455 };
456 
457 } /* namespace FaspManager */
458 } /* namespace Aspera */
459 
460 #endif /* __FASP_MANAGER_TYPES_H__ */

Copyright © 2005 - 2008 Aspera, Inc. | asperasoft.com