pixrad-rs.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Copyright (c) 2006-2017 THALES. All Rights Reserved.
  2. // All the information contained in this file remain the sole and exclusive
  3. // property of THALES and shall not be disclosed by the recipient to a third
  4. // party without the prior consent of THALES.
  5. /*! \file pixrad_remote_storage.h
  6. Abstract:
  7. This module defines the PixRad Remote Storage API.
  8. It includes :
  9. - the prototypes of the functions that manages remote storage on the detector.
  10. */
  11. #ifndef PIXRAD_REMOTE_STORAGE_H
  12. #define PIXRAD_REMOTE_STORAGE_H
  13. #include "pixrad-rs-types.h"
  14. #if defined(WIN32)
  15. #if defined(PIXRAD_EXPORTS)
  16. #define PIXRAD_REMOTE_STORAGE_API __declspec(dllexport)
  17. #else
  18. #define PIXRAD_REMOTE_STORAGE_API __declspec(dllimport)
  19. #endif
  20. #else
  21. #define PIXRAD_REMOTE_STORAGE_API __attribute__((visibility("default")))
  22. #endif
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /*
  27. Prototypes of PixRad Remote Storage exported fonctions
  28. */
  29. //! List files in a given directory.
  30. /*!
  31. \param sessionId : [in] active session id
  32. \param remotePath : [in] remote path of the directory to list
  33. \param list : [out] file list structure
  34. \return ERR_SUCCESS if successfull else error code
  35. */
  36. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageListDirectory( const unsigned int& sessionId, const char* remotePath, PxFileList& list );
  37. //! Upload a file to the remote storage.
  38. /*!
  39. \param sessionId : [in] active session id
  40. \param localPath : [in] local storage path of the file to upload
  41. \param remotePath : [in] destination path on the remote storage
  42. \param progressCallbackProc : [in] callback for transfer progression notifications
  43. \param customData : [in] arbitrary parameter passed when the callback is called
  44. \return ERR_SUCCESS if successfull else error code
  45. */
  46. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageUploadFile( const unsigned int& sessionId, const char* localPath, const char* remotePath, progressCallback_t progressCallbackProc = 0,
  47. void* customData = 0 );
  48. //! Download a file from the remote storage.
  49. /*!
  50. \param sessionId : [in] active session id
  51. \param remotePath : [in] remote path of the file to download
  52. \param localPath : [in] destination path on the local storage
  53. \param progressCallbackProc : [in] callback for transfer progression notifications
  54. \param customData : [in] arbitrary parameter passed when the callback is called
  55. \return ERR_SUCCESS if successfull else error code
  56. */
  57. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageDownloadFile( const unsigned int& sessionId, const char* remotePath, const char* localPath,
  58. progressCallback_t progressCallbackProc = 0, void* customData = 0 );
  59. //! Delete a file from the remote storage.
  60. /*!
  61. \param sessionId : [in] active session id
  62. \param remotePath : [in] remote path of the file to delete
  63. \return ERR_SUCCESS if successfull else error code
  64. */
  65. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageRemoveFile( const unsigned int& sessionId, const char* remotePath );
  66. //! Rename a file on the remote storage.
  67. /*!
  68. \param sessionId : [in] active session id
  69. \param currentRemotePath : [in] current remote path of the file to rename
  70. \param newRemotePath : [in] new remote path of the file to rename
  71. \return ERR_SUCCESS if successfull else error code
  72. */
  73. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageRenameFile( const unsigned int& sessionId, const char* currentRemotePath, const char* newRemotePath );
  74. //! Create a directory on the remote storage.
  75. /*!
  76. \param sessionId : [in] active session id
  77. \param dirPath : [in] remote path of the directory to create
  78. \return ERR_SUCCESS if successfull else error code
  79. */
  80. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageCreateDirectory( const unsigned int& sessionId, const char* dirPath );
  81. //! Delete a directory from the remote storage.
  82. /*!
  83. \param sessionId : [in] active session id
  84. \param dirPath : [in] remote path of the directory to delete
  85. \return ERR_SUCCESS if successfull else error code
  86. */
  87. PIXRAD_REMOTE_STORAGE_API rs_error_status TED_PixRad_RemoteStorageRemoveDirectory( const unsigned int& sessionId, const char* dirPath );
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. #endif //PIXRAD_REMOTE_STORAGE_H