You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

124 lines
4.6 KiB

  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright (C) 2006-2007 Red Hat, Inc.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General
  16. * Public License along with this library; if not, write to the
  17. * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  18. * Boston, MA 02111-1307, USA.
  19. *
  20. * Author: Alexander Larsson <alexl@redhat.com>
  21. */
  22. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  23. #error "Only <gio/gio.h> can be included directly."
  24. #endif
  25. #ifndef __G_MOUNT_OPERATION_H__
  26. #define __G_MOUNT_OPERATION_H__
  27. #include <gio/giotypes.h>
  28. G_BEGIN_DECLS
  29. #define G_TYPE_MOUNT_OPERATION (g_mount_operation_get_type ())
  30. #define G_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MOUNT_OPERATION, GMountOperation))
  31. #define G_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MOUNT_OPERATION, GMountOperationClass))
  32. #define G_IS_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MOUNT_OPERATION))
  33. #define G_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MOUNT_OPERATION))
  34. #define G_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MOUNT_OPERATION, GMountOperationClass))
  35. /**
  36. * GMountOperation:
  37. *
  38. * Class for providing authentication methods for mounting operations,
  39. * such as mounting a file locally, or authenticating with a server.
  40. **/
  41. typedef struct _GMountOperationClass GMountOperationClass;
  42. typedef struct _GMountOperationPrivate GMountOperationPrivate;
  43. struct _GMountOperation
  44. {
  45. GObject parent_instance;
  46. GMountOperationPrivate *priv;
  47. };
  48. struct _GMountOperationClass
  49. {
  50. GObjectClass parent_class;
  51. /* signals: */
  52. void (* ask_password) (GMountOperation *op,
  53. const char *message,
  54. const char *default_user,
  55. const char *default_domain,
  56. GAskPasswordFlags flags);
  57. void (* ask_question) (GMountOperation *op,
  58. const char *message,
  59. const char *choices[]);
  60. void (* reply) (GMountOperation *op,
  61. GMountOperationResult result);
  62. void (* aborted) (GMountOperation *op);
  63. void (* show_processes) (GMountOperation *op,
  64. const gchar *message,
  65. GArray *processes,
  66. const gchar *choices[]);
  67. /*< private >*/
  68. /* Padding for future expansion */
  69. void (*_g_reserved1) (void);
  70. void (*_g_reserved2) (void);
  71. void (*_g_reserved3) (void);
  72. void (*_g_reserved4) (void);
  73. void (*_g_reserved5) (void);
  74. void (*_g_reserved6) (void);
  75. void (*_g_reserved7) (void);
  76. void (*_g_reserved8) (void);
  77. void (*_g_reserved9) (void);
  78. void (*_g_reserved10) (void);
  79. };
  80. GType g_mount_operation_get_type (void) G_GNUC_CONST;
  81. GMountOperation * g_mount_operation_new (void);
  82. const char * g_mount_operation_get_username (GMountOperation *op);
  83. void g_mount_operation_set_username (GMountOperation *op,
  84. const char *username);
  85. const char * g_mount_operation_get_password (GMountOperation *op);
  86. void g_mount_operation_set_password (GMountOperation *op,
  87. const char *password);
  88. gboolean g_mount_operation_get_anonymous (GMountOperation *op);
  89. void g_mount_operation_set_anonymous (GMountOperation *op,
  90. gboolean anonymous);
  91. const char * g_mount_operation_get_domain (GMountOperation *op);
  92. void g_mount_operation_set_domain (GMountOperation *op,
  93. const char *domain);
  94. GPasswordSave g_mount_operation_get_password_save (GMountOperation *op);
  95. void g_mount_operation_set_password_save (GMountOperation *op,
  96. GPasswordSave save);
  97. int g_mount_operation_get_choice (GMountOperation *op);
  98. void g_mount_operation_set_choice (GMountOperation *op,
  99. int choice);
  100. void g_mount_operation_reply (GMountOperation *op,
  101. GMountOperationResult result);
  102. G_END_DECLS
  103. #endif /* __G_MOUNT_OPERATION_H__ */