-tlsa rr added to namestore
[oweals/gnunet.git] / src / include / gnunet_strings_lib.h
index 54d2e3034d8bffa08d0c9b8726aca8869ef57dc4..b4ae27c321bae248fc08ad887ead932198622d03 100644 (file)
@@ -75,6 +75,19 @@ GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_time,
                                        struct GNUNET_TIME_Relative *rtime);
 
 
+/**
+ * Convert a given fancy human-readable time to our internal
+ * representation.
+ *
+ * @param fancy_time human readable string (i.e. %Y-%m-%d %H:%M:%S)
+ * @param atime set to the absolute time
+ * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ */
+int
+GNUNET_STRINGS_fancy_time_to_absolute (const char *fancy_time,
+                                       struct GNUNET_TIME_Absolute *atime);
+
+
 /**
  * Convert a given filesize into a fancy human-readable format.
  *
@@ -201,8 +214,7 @@ GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
 
 
 /**
- * "man ctime_r", except for GNUnet time; also, unlike ctime, the
- * return value does not include the newline character.
+ * "asctime", except for GNUnet time.
  *
  * @param t the absolute time to convert
  * @return timestamp in human-readable form
@@ -390,6 +402,24 @@ GNUNET_STRINGS_to_address_ip (const char *addr,
                              struct sockaddr_storage *r_buf);
 
 
+/**
+ * Returns utf-8 encoded arguments.
+ * Does nothing (returns a copy of argc and argv) on any platform
+ * other than W32.
+ * Returned argv has u8argv[u8argc] == NULL.
+ * Returned argv is a single memory block, and can be freed with a single
+ *   GNUNET_free () call.
+ *
+ * @param argc argc (as given by main())
+ * @param argv argv (as given by main())
+ * @param u8argc a location to store new argc in (though it's th same as argc)
+ * @param u8argv a location to store new argv in
+ * @return GNUNET_OK on success, GNUNET_SYSERR on failure
+ */
+int
+GNUNET_STRINGS_get_utf8_args (int argc, char *const *argv, int *u8argc,
+                              char *const **u8argv);
+
 /* ifndef GNUNET_UTIL_STRING_H */
 #endif
 /* end of gnunet_util_string.h */