libpurple/request.h

changeset 33935
e740bbb8350c
parent 33237
2574432da068
child 34193
95e4bd9d5b9c
--- a/libpurple/request.h	Sat May 11 18:04:43 2013 -0400
+++ b/libpurple/request.h	Sun May 12 12:45:52 2013 +0200
@@ -739,12 +739,13 @@
  * @param id            The field ID.
  * @param text          The text label of the field.
  * @param default_value The default value.
+ * @param lower_bound   The lower bound.
+ * @param upper_bound   The upper bound.
  *
  * @return The new field.
  */
 PurpleRequestField *purple_request_field_int_new(const char *id,
-											 const char *text,
-											 int default_value);
+	const char *text, int default_value, int lower_bound, int upper_bound);
 
 /**
  * Sets the default value in an integer field.
@@ -756,6 +757,22 @@
 											  int default_value);
 
 /**
+ * Sets the lower bound in an integer field.
+ *
+ * @param field       The field.
+ * @param lower_bound The lower bound.
+ */
+void purple_request_field_int_set_lower_bound(PurpleRequestField *field, int lower_bound);
+
+/**
+ * Sets the upper bound in an integer field.
+ *
+ * @param field       The field.
+ * @param upper_bound The upper bound.
+ */
+void purple_request_field_int_set_upper_bound(PurpleRequestField *field, int lower_bound);
+
+/**
  * Sets the value in an integer field.
  *
  * @param field The field.
@@ -773,6 +790,24 @@
 int purple_request_field_int_get_default_value(const PurpleRequestField *field);
 
 /**
+ * Returns the lower bound in an integer field.
+ *
+ * @param field The field.
+ *
+ * @return The lower bound.
+ */
+int purple_request_field_int_get_lower_bound(const PurpleRequestField *field);
+
+/**
+ * Returns the upper bound in an integer field.
+ *
+ * @param field The field.
+ *
+ * @return The upper bound.
+ */
+int purple_request_field_int_get_upper_bound(const PurpleRequestField *field);
+
+/**
  * Returns the user-entered value in an integer field.
  *
  * @param field The field.
@@ -1301,21 +1336,6 @@
 gboolean purple_request_field_alphanumeric_validator(PurpleRequestField *field,
 	gchar **errmsg, void *allowed_characters);
 
-/**
- * Validates a field which should contain numeric content, within (optional)
- * range.
- *
- * @see purple_request_field_set_validator
- *
- * @param field The field.
- * @param errmsg (Optional) destination for error message.
- * @param user_data (Optional) an int[2] array containing specified range.
- *
- * @return TRUE, if field contains only alphanumeric characters.
- */
-gboolean purple_request_field_numeric_validator(PurpleRequestField *field,
-	gchar **errmsg, void *range);
-
 /*@}*/
 
 /**************************************************************************/

mercurial