diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-07-05 18:13:35 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-07-05 18:13:35 +0200 |
commit | 86e503b64019d97ac0d33a0e70716fc20467b76b (patch) | |
tree | bfa152efd04a9308e5682c88b05cbc4918dd5315 | |
parent | 94fbbc0a7fc89cc6ddbf45c366464ae0cb1ae7fa (diff) | |
download | weechat-86e503b64019d97ac0d33a0e70716fc20467b76b.zip |
Add function hashtable_add_to_infolist in plugin API reference
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 41 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.txt | 41 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 41 |
3 files changed, 123 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index bd7362405..f04671d5e 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -2770,6 +2770,47 @@ C example: int items_count = weechat_hashtable_get_integer (hashtable, "items_count"); ---------------------------------------- +weechat_hashtable_add_to_infolist +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add hashtable items to an infolist item. + +Prototype: + +[source,C] +---------------------------------------- +int weechat_hashtable_add_to_infolist (struct t_hashtable *hashtable, + struct t_infolist_item *infolist_item, + const char *prefix); +---------------------------------------- + +Arguments: + +* 'hashtable': hashtable pointer +* 'infolist_item': infolist item pointer +* 'prefix': string used as prefix for names in infolist + +Return value: + +* 1 if ok, 0 if error + +C example: + +[source,C] +---------------------------------------- +weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); + +/* if hashtable contains: + "key1" => "value 1" + "key2" => "value 2" + then following variables will be added to infolist item: + "testhash_name_00001" = "key1" + "testhash_value_00001" = "value 1" + "testhash_name_00002" = "key2" + "testhash_value_00002" = "value 2" +*/ +---------------------------------------- + weechat_hashtable_remove ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index e2cdcb185..648ad7337 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -2799,6 +2799,47 @@ Exemple en C : int items_count = weechat_hashtable_get_integer (hashtable, "items_count"); ---------------------------------------- +weechat_hashtable_add_to_infolist +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Ajoute les éléments d'une hashtable dans un objet infolist. + +Prototype : + +[source,C] +---------------------------------------- +int weechat_hashtable_add_to_infolist (struct t_hashtable *hashtable, + struct t_infolist_item *infolist_item, + const char *prefix); +---------------------------------------- + +Paramètres : + +* 'hashtable' : pointeur vers la hashtable +* 'infolist_item' : pointeur vers l'objet de l'infolist +* 'prefix' : chaîne utilisée comme préfixe pour les noms dans l'infolist + +Valeur en retour : + +* 1 si ok, 0 en cas d'erreur + +Exemple en C : + +[source,C] +---------------------------------------- +weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); + +/* si la hashtable contient : + "cle1" => "valeur 1" + "cle2" => "valeur 2" + alors les variables suivantes seront ajoutées dans l'objet de l'infolist : + "testhash_name_00001" = "cle1" + "testhash_value_00001" = "valeur 1" + "testhash_name_00002" = "cle2" + "testhash_value_00002" = "valeur 2" +*/ +---------------------------------------- + weechat_hashtable_remove ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index dfe399b54..0c71657be 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -2808,6 +2808,47 @@ C example: int items_count = weechat_hashtable_get_integer (hashtable, "items_count"); ---------------------------------------- +weechat_hashtable_add_to_infolist +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add hashtable items to an infolist item. + +Prototype: + +[source,C] +---------------------------------------- +int weechat_hashtable_add_to_infolist (struct t_hashtable *hashtable, + struct t_infolist_item *infolist_item, + const char *prefix); +---------------------------------------- + +Arguments: + +* 'hashtable': hashtable pointer +* 'infolist_item': infolist item pointer +* 'prefix': string used as prefix for names in infolist + +Return value: + +* 1 if ok, 0 if error + +C example: + +[source,C] +---------------------------------------- +weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); + +/* if hashtable contains: + "key1" => "value 1" + "key2" => "value 2" + then following variables will be added to infolist item: + "testhash_name_00001" = "key1" + "testhash_value_00001" = "value 1" + "testhash_name_00002" = "key2" + "testhash_value_00002" = "value 2" +*/ +---------------------------------------- + weechat_hashtable_remove ^^^^^^^^^^^^^^^^^^^^^^^^ |