diff options
author | Peng Wu <alexepico@gmail.com> | 2010-09-17 16:17:25 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-09-17 16:19:03 +0800 |
commit | ed7962be8ea097dc632a6a2fd7636a0c01d6bd24 (patch) | |
tree | 02ced7a6e900f0a26b85303ed1d64b51e11d9f8c | |
parent | 0713adcf7919b32eb5af0b3a81c3384f209c84e2 (diff) | |
download | libpinyin-ed7962be8ea097dc632a6a2fd7636a0c01d6bd24.tar.gz libpinyin-ed7962be8ea097dc632a6a2fd7636a0c01d6bd24.tar.xz libpinyin-ed7962be8ea097dc632a6a2fd7636a0c01d6bd24.zip |
add taglib interface
-rw-r--r-- | utils/storage/tag_utility.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/utils/storage/tag_utility.h b/utils/storage/tag_utility.h new file mode 100644 index 0000000..ac97dd4 --- /dev/null +++ b/utils/storage/tag_utility.h @@ -0,0 +1,42 @@ +/* + * libpinyin + * Library to deal with pinyin. + * + * Copyright (C) 2010 Peng Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TAG_UTILITY_H +#define TAG_UTILITY_H + +bool taglib_init(); + +/* Note: most string array (const char *) are null pointer terminated. */ +bool taglib_add_tag(int line_type, const char * line_tag, int num_of_values, const char * required_tags[], const char * optional_tags[], const char * ignored_tags[]); + +/* most parameters are Array of string (const char *). + * required tags are listed in the beginning of the array. + */ +bool taglib_read(const char * input_line, int & line_type, GPtrArray * values, GPtrArray * tagnames, GPtrArray * tagvalues); + +/* Note: taglib_write is omited, as printf is more suitable for this. */ + +bool taglib_report_status(int line_type); + +/* clear up the tag of type line_type. */ +bool taglib_fini(int line_type); + +#endif |