Changeset 14493
- Timestamp:
- Apr 11, 2015, 2:54:01 PM (6 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/file-posix.c
r14472 r14493 43 43 44 44 #include "transmission.h" 45 #include "error.h" 45 46 #include "file.h" 46 47 #include "log.h" -
trunk/libtransmission/file-win32.c
r14481 r14493 16 16 #include "transmission.h" 17 17 #include "crypto-utils.h" /* tr_rand_int () */ 18 #include "error.h" 18 19 #include "file.h" 19 20 #include "utils.h" -
trunk/libtransmission/file.c
r14369 r14493 12 12 13 13 #include "transmission.h" 14 #include "error.h" 14 15 #include "file.h" 15 16 #include "utils.h" -
trunk/libtransmission/file.h
r14369 r14493 18 18 #endif 19 19 20 #include "error.h"21 22 20 #ifdef __cplusplus 23 21 extern "C" { 24 22 #endif 23 24 struct tr_error; 25 25 26 26 /** … … 141 141 int flags, 142 142 tr_sys_path_info * info, 143 tr_error** error);143 struct tr_error ** error); 144 144 145 145 /** … … 155 155 */ 156 156 bool tr_sys_path_exists (const char * path, 157 tr_error** error);157 struct tr_error ** error); 158 158 159 159 /** … … 172 172 bool tr_sys_path_is_same (const char * path1, 173 173 const char * path2, 174 tr_error** error);174 struct tr_error ** error); 175 175 176 176 /** … … 187 187 */ 188 188 char * tr_sys_path_resolve (const char * path, 189 tr_error** error);189 struct tr_error ** error); 190 190 191 191 /** … … 202 202 */ 203 203 char * tr_sys_path_basename (const char * path, 204 tr_error** error);204 struct tr_error ** error); 205 205 206 206 /** … … 217 217 */ 218 218 char * tr_sys_path_dirname (const char * path, 219 tr_error** error);219 struct tr_error ** error); 220 220 221 221 /** … … 233 233 bool tr_sys_path_rename (const char * src_path, 234 234 const char * dst_path, 235 tr_error** error);235 struct tr_error ** error); 236 236 237 237 /** … … 247 247 */ 248 248 bool tr_sys_path_remove (const char * path, 249 tr_error** error);249 struct tr_error ** error); 250 250 251 251 /* File-related wrappers */ … … 263 263 */ 264 264 tr_sys_file_t tr_sys_file_get_std (tr_std_sys_file_t std_file, 265 tr_error** error);265 struct tr_error ** error); 266 266 267 267 /** … … 281 281 int flags, 282 282 int permissions, 283 tr_error** error);283 struct tr_error ** error); 284 284 285 285 /** … … 298 298 */ 299 299 tr_sys_file_t tr_sys_file_open_temp (char * path_template, 300 tr_error** error);300 struct tr_error ** error); 301 301 302 302 /** … … 310 310 */ 311 311 bool tr_sys_file_close (tr_sys_file_t handle, 312 tr_error** error);312 struct tr_error ** error); 313 313 314 314 /** … … 324 324 bool tr_sys_file_get_info (tr_sys_file_t handle, 325 325 tr_sys_path_info * info, 326 tr_error** error);326 struct tr_error ** error); 327 327 328 328 /** … … 343 343 tr_seek_origin_t origin, 344 344 uint64_t * new_offset, 345 tr_error** error);345 struct tr_error ** error); 346 346 347 347 /** … … 362 362 uint64_t size, 363 363 uint64_t * bytes_read, 364 tr_error** error);364 struct tr_error ** error); 365 365 366 366 /** … … 384 384 uint64_t offset, 385 385 uint64_t * bytes_read, 386 tr_error** error);386 struct tr_error ** error); 387 387 388 388 /** … … 403 403 uint64_t size, 404 404 uint64_t * bytes_written, 405 tr_error** error);405 struct tr_error ** error); 406 406 407 407 /** … … 425 425 uint64_t offset, 426 426 uint64_t * bytes_written, 427 tr_error** error);427 struct tr_error ** error); 428 428 429 429 /** … … 437 437 */ 438 438 bool tr_sys_file_flush (tr_sys_file_t handle, 439 tr_error** error);439 struct tr_error ** error); 440 440 441 441 /** … … 451 451 bool tr_sys_file_truncate (tr_sys_file_t handle, 452 452 uint64_t size, 453 tr_error** error);453 struct tr_error ** error); 454 454 455 455 /** … … 467 467 uint64_t offset, 468 468 uint64_t size, 469 tr_error** error);469 struct tr_error ** error); 470 470 471 471 /** … … 483 483 uint64_t size, 484 484 int flags, 485 tr_error** error);485 struct tr_error ** error); 486 486 487 487 /** … … 500 500 uint64_t offset, 501 501 uint64_t size, 502 tr_error** error);502 struct tr_error ** error); 503 503 504 504 /** … … 514 514 bool tr_sys_file_unmap (const void * address, 515 515 uint64_t size, 516 tr_error** error);516 struct tr_error ** error); 517 517 518 518 /* File-related wrappers (utility) */ … … 542 542 char * buffer, 543 543 size_t buffer_size, 544 tr_error** error);544 struct tr_error ** error); 545 545 546 546 /** … … 562 562 bool tr_sys_file_write_line (tr_sys_file_t handle, 563 563 const char * buffer, 564 tr_error** error);564 struct tr_error ** error); 565 565 566 566 /** … … 583 583 bool tr_sys_file_write_fmt (tr_sys_file_t handle, 584 584 const char * format, 585 tr_error** error,585 struct tr_error ** error, 586 586 ...); 587 587 … … 598 598 * success, `NULL` otherwise (with `error` set accordingly). 599 599 */ 600 char * tr_sys_dir_get_current ( tr_error** error);600 char * tr_sys_dir_get_current (struct tr_error ** error); 601 601 602 602 /** … … 615 615 int flags, 616 616 int permissions, 617 tr_error** error);617 struct tr_error ** error); 618 618 619 619 /** … … 631 631 */ 632 632 bool tr_sys_dir_create_temp (char * path_template, 633 tr_error** error);633 struct tr_error ** error); 634 634 635 635 /** … … 644 644 */ 645 645 tr_sys_dir_t tr_sys_dir_open (const char * path, 646 tr_error** error);646 struct tr_error ** error); 647 647 648 648 /** … … 660 660 */ 661 661 const char * tr_sys_dir_read_name (tr_sys_dir_t handle, 662 tr_error** error);662 struct tr_error ** error); 663 663 664 664 /** … … 672 672 */ 673 673 bool tr_sys_dir_close (tr_sys_dir_t handle, 674 tr_error** error);674 struct tr_error ** error); 675 675 676 676 /** @} */ -
trunk/libtransmission/rpc-server.c
r14491 r14493 22 22 #include "crypto.h" /* tr_ssha1_matches () */ 23 23 #include "crypto-utils.h" /* tr_rand_buffer () */ 24 #include "error.h" 24 25 #include "fdlimit.h" 25 26 #include "list.h" -
trunk/libtransmission/utils.h
r14491 r14493 16 16 #include <time.h> /* time_t */ 17 17 18 #include "error.h"19 20 18 #ifdef __cplusplus 21 19 extern "C" { … … 25 23 **** 26 24 ***/ 25 26 struct evbuffer; 27 struct event; 28 struct timeval; 29 30 struct tr_error; 27 31 28 32 /** … … 133 137 * On failure, NULL is returned and errno is set. 134 138 */ 135 uint8_t * tr_loadFile (const char * filename,136 size_t * size,137 tr_error** error) TR_GNUC_MALLOC TR_GNUC_NONNULL (1);139 uint8_t * tr_loadFile (const char * filename, 140 size_t * size, 141 struct tr_error ** error) TR_GNUC_MALLOC TR_GNUC_NONNULL (1); 138 142 139 143 … … 148 152 */ 149 153 int64_t tr_getDirFreeSpace (const char * path); 150 151 152 struct event;153 154 154 155 /** … … 263 264 int tr_strcmp0 (const char * str1, const char * str2); 264 265 265 266 267 struct evbuffer;268 269 266 char* evbuffer_free_to_str (struct evbuffer * buf); 270 267 … … 391 388 struct tm * tr_localtime_r (const time_t *_clock, struct tm *_result); 392 389 393 struct timeval;394 395 390 /** @brief Portability wrapper for gettimeofday (), with tz argument dropped */ 396 391 int tr_gettimeofday (struct timeval * tv); … … 401 396 * @return `True` on success, `false` otherwise (with `error` set accordingly). 402 397 */ 403 bool tr_moveFile (const char * oldpath, const char * newpath, 404 tr_error ** error) TR_GNUC_NONNULL (1,2); 398 bool tr_moveFile (const char * oldpath, 399 const char * newpath, 400 struct tr_error ** error) TR_GNUC_NONNULL (1,2); 405 401 406 402 /** @brief convenience function to remove an item from an array */
Note: See TracChangeset
for help on using the changeset viewer.