libpurple/request.h

branch
soc.2013.gobjectification.plugins
changeset 36930
c1b0e75051e3
parent 36928
ae920fa34143
parent 35047
cf8ca70094ff
child 36939
6587e5c7d9e3
--- a/libpurple/request.h	Thu Oct 24 23:56:44 2013 +0530
+++ b/libpurple/request.h	Fri Oct 25 00:35:00 2013 +0530
@@ -180,6 +180,8 @@
 typedef gboolean (*PurpleRequestFieldValidator)(PurpleRequestField *field,
 	gchar **errmsg, gpointer user_data);
 
+typedef gboolean (*PurpleRequestFieldSensitivityCb)(PurpleRequestField *field);
+
 /** The type of callbacks passed to purple_request_action().  The first
  *  argument is the @a user_data parameter; the second is the index in the list
  *  of actions of the one chosen.
@@ -517,6 +519,16 @@
 	const PurpleRequestFields *fields);
 
 /**
+ * Returns a list of all fields with sensitivity callback added.
+ *
+ * @param fields The fields list.
+ *
+ * @constreturn The list of fields with automatic sensitivity callback.
+ */
+const GList *
+purple_request_fields_get_autosensitive(const PurpleRequestFields *fields);
+
+/**
  * Returns whether or not a field with the specified ID is required.
  *
  * @param fields The fields list.
@@ -887,6 +899,33 @@
 gboolean purple_request_field_is_valid(PurpleRequestField *field, gchar **errmsg);
 
 /**
+ * Sets field editable.
+ *
+ * @param field     The field.
+ * @param sensitive TRUE if the field should be sensitive for user input.
+ */
+void purple_request_field_set_sensitive(PurpleRequestField *field,
+	gboolean sensitive);
+
+/**
+ * Checks, if field is editable.
+ *
+ * @param field The field.
+ *
+ * @return TRUE, if the field is sensitive for user input.
+ */
+gboolean purple_request_field_is_sensitive(PurpleRequestField *field);
+
+/**
+ * Sets the callback, used to determine if the field should be editable.
+ *
+ * @param field The field.
+ * @param cb    The callback.
+ */
+void purple_request_field_set_sensitivity_cb(PurpleRequestField *field,
+	PurpleRequestFieldSensitivityCb cb);
+
+/**
  * Returns the ui_data for a field.
  *
  * @param field The field.
@@ -957,15 +996,6 @@
 										  gboolean masked);
 
 /**
- * Sets whether or not a string field is editable.
- *
- * @param field    The field.
- * @param editable The editable value.
- */
-void purple_request_field_string_set_editable(PurpleRequestField *field,
-											gboolean editable);
-
-/**
  * Returns the default value in a string field.
  *
  * @param field The field.
@@ -1002,15 +1032,6 @@
  */
 gboolean purple_request_field_string_is_masked(const PurpleRequestField *field);
 
-/**
- * Returns whether or not a string field is editable.
- *
- * @param field The field.
- *
- * @return @c TRUE if the field is editable, or @c FALSE otherwise.
- */
-gboolean purple_request_field_string_is_editable(const PurpleRequestField *field);
-
 /*@}*/
 
 /**************************************************************************/

mercurial