Changeset 576
- Timestamp:
- 08/29/08 18:44:03 (3 months ago)
- Files:
-
- trunk/src/glib/BookmarkFile.d (modified) (2 diffs)
- trunk/src/glib/IOChannel.d (modified) (3 diffs)
- trunk/src/glib/KeyFile.d (modified) (2 diffs)
- trunk/src/glib/RandG.d (modified) (2 diffs)
- trunk/wrap/APILookupGLib.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/glib/BookmarkFile.d
r575 r576 41 41 * omit prefixes: 42 42 * omit code: 43 * - g_bookmark_file_set_groups 43 44 * omit signals: 44 45 * imports: … … 822 823 823 824 /** 824 * Sets a list of group names for the item with URI uri. Each previously825 * set group name list is removed.826 * If uri cannot be found then an item for it is created.827 * Since 2.12828 * Params:829 * uri = an item's URI830 * groups = an array of group names, or NULL to remove all groups831 * length = number of group name values in groups832 */833 public void setGroups(string uri, char** groups, uint length)834 {835 // void g_bookmark_file_set_groups (GBookmarkFile *bookmark, const gchar *uri, const gchar **groups, gsize length);836 g_bookmark_file_set_groups(gBookmarkFile, Str.toStringz(uri), groups, length);837 }838 839 /**840 825 * Sets the last time the bookmark for uri was last modified. 841 826 * If no bookmark for uri is found then it is created. trunk/src/glib/IOChannel.d
r575 r576 41 41 * omit prefixes: 42 42 * omit code: 43 * - g_io_channel_read_line 44 * - g_io_channel_read_to_end 43 45 * omit signals: 44 46 * imports: … … 425 427 426 428 /** 427 * Reads a line, including the terminating character(s),428 * from a GIOChannel into a newly-allocated string.429 * str_return will contain allocated memory if the return430 * is G_IO_STATUS_NORMAL.431 * Params:432 * strReturn = The line read from the GIOChannel, including the433 * line terminator. This data should be freed with g_free()434 * when no longer needed. This is a nul-terminated string.435 * If a length of zero is returned, this will be NULL instead.436 * length = location to store length of the read data, or NULL437 * terminatorPos = location to store position of line terminator, or NULL438 * Returns: the status of the operation.439 * Throws: GException on failure.440 */441 public GIOStatus readLine(char** strReturn, uint* length, uint* terminatorPos)442 {443 // GIOStatus g_io_channel_read_line (GIOChannel *channel, gchar **str_return, gsize *length, gsize *terminator_pos, GError **error);444 GError* err = null;445 446 auto p = g_io_channel_read_line(gIOChannel, strReturn, length, terminatorPos, &err);447 448 if (err !is null)449 {450 throw new GException( new ErrorG(err) );451 }452 453 return p;454 }455 456 /**457 429 * Reads a line from a GIOChannel, using a GString as a buffer. 458 430 * Params: … … 470 442 471 443 auto p = g_io_channel_read_line_string(gIOChannel, (buffer is null) ? null : buffer.getStringGStruct(), &terminatorPos, &err); 472 473 if (err !is null)474 {475 throw new GException( new ErrorG(err) );476 }477 478 return p;479 }480 481 /**482 * Reads all the remaining data from the file.483 * Params:484 * strReturn = Location to store a pointer to a string holding485 * the remaining data in the GIOChannel. This data should486 * be freed with g_free() when no longer needed. This487 * data is terminated by an extra nul character, but there488 * may be other nuls in the intervening data.489 * length = location to store length of the data490 * Returns: G_IO_STATUS_NORMAL on success. This function never returns G_IO_STATUS_EOF.491 * Throws: GException on failure.492 */493 public GIOStatus readToEnd(char** strReturn, uint* length)494 {495 // GIOStatus g_io_channel_read_to_end (GIOChannel *channel, gchar **str_return, gsize *length, GError **error);496 GError* err = null;497 498 auto p = g_io_channel_read_to_end(gIOChannel, strReturn, length, &err);499 444 500 445 if (err !is null) trunk/src/glib/KeyFile.d
r575 r576 41 41 * omit prefixes: 42 42 * omit code: 43 * - g_key_file_load_from_dirs 43 44 * omit signals: 44 45 * imports: … … 322 323 323 324 /** 324 * This function looks for a key file named file in the paths325 * specified in search_dirs, loads the file into key_file and326 * returns the file's full path in full_path. If the file could not327 * be loaded then an error is set to either a GFileError or328 * GKeyFileError.329 * Since 2.14330 * Params:331 * file = a relative path to a filename to open and parse332 * searchDirs = NULL-terminated array of directories to search333 * fullPath = return location for a string containing the full path334 * of the file, or NULL335 * flags = flags from GKeyFileFlags336 * Returns: TRUE if a key file could be loaded, FALSE otherwise337 * Throws: GException on failure.338 */339 public int loadFromDirs(string file, char** searchDirs, char** fullPath, GKeyFileFlags flags)340 {341 // gboolean g_key_file_load_from_dirs (GKeyFile *key_file, const gchar *file, const gchar **search_dirs, gchar **full_path, GKeyFileFlags flags, GError **error);342 GError* err = null;343 344 auto p = g_key_file_load_from_dirs(gKeyFile, Str.toStringz(file), searchDirs, fullPath, flags, &err);345 346 if (err !is null)347 {348 throw new GException( new ErrorG(err) );349 }350 351 return p;352 }353 354 /**355 325 * This function outputs key_file as a string. 356 326 * Since 2.6 trunk/src/glib/RandG.d
r575 r576 43 43 * omit code: 44 44 * - g_rand_new_with_seed_array 45 * - g_rand_set_seed_array 45 46 * omit signals: 46 47 * imports: … … 241 242 242 243 /** 243 * Initializes the random number generator by an array of244 * longs. Array can be of arbitrary size, though only the245 * first 624 values are taken. This function is useful246 * if you have many low entropy seeds, or if you require more then247 * 32bits of actual entropy for your application.248 * Since 2.4249 * Params:250 * seed = array to initialize with251 * seedLength = length of array252 */253 public void setSeedArray(uint* seed, uint seedLength)254 {255 // void g_rand_set_seed_array (GRand *rand_, const guint32 *seed, guint seed_length);256 g_rand_set_seed_array(gRand, seed, seedLength);257 }258 259 /**260 244 * Returns the next random guint32 from rand_ equally distributed over 261 245 * the range [0..2^32-1]. trunk/wrap/APILookupGLib.txt
r575 r576 577 577 out: g_io_channel_write bytes_written 578 578 579 nocode: g_io_channel_read_line 580 nocode: g_io_channel_read_to_end 581 579 582 code: start 580 583 /** … … 1106 1109 1107 1110 nocode: g_rand_new_with_seed_array 1111 nocode: g_rand_set_seed_array 1108 1112 1109 1113 code: start … … 1840 1844 out: g_key_file_get_double_list length 1841 1845 1846 nocode: g_key_file_load_from_dirs 1847 1842 1848 code: start 1843 1849 /** … … 1894 1900 out: g_bookmark_file_get_app_info count 1895 1901 out: g_bookmark_file_get_app_info stamp 1902 1903 nocode: g_bookmark_file_set_groups 1896 1904 1897 1905 code: start
