sftp-session-type.h 1.5 KB

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