sftp-file-type.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* sftp-file-type.h -- SFTP file type description. */
  2. /* Copyright (C) 2015 Artyom V. Poptsov <poptsov.artyom@gmail.com>
  3. *
  4. * This file is part of Guile-SSH.
  5. *
  6. * Guile-SSH is free software: you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * Guile-SSH is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Guile-SSH. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef __SFTP_FILE_TYPE_H__
  20. #define __SFTP_FILE_TYPE_H__
  21. #include <libguile.h>
  22. #include <libssh/sftp.h>
  23. /* Smob data. */
  24. struct sftp_file_data {
  25. /* Reference to the parent SFTP session. */
  26. SCM sftp_session;
  27. sftp_file file;
  28. };
  29. extern SCM gssh_sftp_open (SCM sftp_session, SCM path, SCM access_type,
  30. SCM mode);
  31. extern SCM gssh_sftp_file_p (SCM x);
  32. extern void init_sftp_file_type (void);
  33. extern struct sftp_file_data * _scm_to_sftp_file_data (SCM x);
  34. extern SCM _scm_from_sftp_file (const sftp_file file,
  35. const SCM name,
  36. SCM sftp_session);
  37. #endif /* ifndef __SFTP_FILE_TYPE_H__ */
  38. /* sftp-file-type.h ends here. */