VConnection8.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // VIPS connection wrapper
  2. /*
  3. This file is part of VIPS.
  4. VIPS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301 USA
  16. */
  17. /*
  18. These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  19. */
  20. #ifndef VIPS_VCONNECTION_H
  21. #define VIPS_VCONNECTION_H
  22. #include <vips/vips.h>
  23. VIPS_NAMESPACE_START
  24. class VSource : VObject
  25. {
  26. public:
  27. VSource( VipsSource *input, VSteal steal = STEAL ) :
  28. VObject( (VipsObject *) input, steal )
  29. {
  30. }
  31. static
  32. VSource new_from_descriptor( int descriptor );
  33. static
  34. VSource new_from_file( const char *filename );
  35. static
  36. VSource new_from_blob( VipsBlob *blob );
  37. static
  38. VSource new_from_memory( const void *data,
  39. size_t size );
  40. static
  41. VSource new_from_options( const char *options );
  42. VipsSource *
  43. get_source() const
  44. {
  45. return( (VipsSource *) VObject::get_object() );
  46. }
  47. };
  48. class VTarget : VObject
  49. {
  50. public:
  51. VTarget( VipsTarget *output, VSteal steal = STEAL ) :
  52. VObject( (VipsObject *) output, steal )
  53. {
  54. }
  55. static
  56. VTarget new_to_descriptor( int descriptor );
  57. static
  58. VTarget new_to_file( const char *filename );
  59. static
  60. VTarget new_to_memory();
  61. VipsTarget *
  62. get_target() const
  63. {
  64. return( (VipsTarget *) VObject::get_object() );
  65. }
  66. };
  67. VIPS_NAMESPACE_END
  68. #endif /*VIPS_VCONNECTION_H*/