[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libquran, a release?



 Salam,
  Please check:
   http://bugs.arabeyes.org/cgi-bin/bugzilla/show_bug.cgi?id=32
 This patch implements all the things that were in the previous
 post which includes:
  + Each language is dealt with as a complete package with
     its data separated from other languages.
  + Support for virtually unlimited number of translations/audio
     packages/interpretations for each specific language.
  + Support for a simple XML configuration file for each language
     package.
  + Removed all data from libquran (including the arabic xml file).
  + libquran now looks for ./quran, ~/.quranrc or /etc/quran
     respectively to get the path for the languages packages
     which is a one-line file containing for example:
        /mnt/cdrom
  + Some other things I forgot.

  I also made some changes for the public API (little changes)
  and added 2 new functions which are:
   quran_open_index(int, int);
   quran_audio_open_index(int, int, int, int)
 for accessing data using machine-friendly arguments.
 And modified the _libquran structure and added a new structure
 for language packages (langauge structure)

typedef struct {
	char *code; /*!< language code */
	char *name; /*!< language name */
        char **avail_audio_packages; /*!< vector of chars of available audio 
packages */
	int  num_audio_packages; /*!< number of available audio packages */
	char **avail_texts; /*!< vector of chars of available texts (Original Texts 
or translations) */
	int  num_texts; /*!< number of available texts */
	char **avail_tafsir; /*!< vector of chars of available tafsir texts 
(interpretaions) */
	int  num_tafsir; /*!< number of available tafsir texts (interpretaions) */
} language;


/**
 * libquran data structure used to remember libquran properties.
 * It also can be returned by quran_get_libquran()
 * \sa quran_get_libquran()
 **/
typedef struct {
	char *data_directory; /*!< directory name where data files reside*/
	language *avail_langs; /*!< dynamic array of available language packages */
	int  num_langs; /*!< number of available language packages */
	int current_lang;
} _libquran;


 Please review it, and comment on it so we can decide whether to
 incorporate it or not.

 Thanks,,
-- 
Mohammed Yousif
"Ich liebe ihr, weil ohne sie kann ich nicht bin!"
We _will_ restore OUR Jerusalem.