· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Asterisk Config

main/config.c 1.4.21

struct ast_config {
        struct ast_category *root;
        struct ast_category *last;
        struct ast_category *current;
        struct ast_category *last_browse;               /*!< used to cache the last category supplied via category_browse */
        int include_level;
        int max_include_level;
};

* struct ast_config *ast_config_load(const char *filename)
  • cfg = ast_config_new(); memory allocation
  • result = ast_config_internal_load(filename, cfg, 0);
  • return result;

static struct ast_config_engine text_file_engine = {
        .name = "text",
        .load_func = config_text_file_load,
};
* struct ast_config *ast_config_internal_load(const char *filename, struct ast_config *cfg, int withcomments)
  • struct ast_config_engine *loader = &text_file_engine;
  • result = loader->load_func(db, table, filename, cfg, withcomments);
  • return result;

* static struct ast_config *config_text_file_load(const char *database, const char *table, const char *filename, struct ast_config *cfg, int withcomments)
  • return cfg;
  • ast_config structure ÀÎ cfg ¿¡ ast_categoty structure µéÀ» linked list ·Î ³Ö´Â´Ù.
  • °¢ category À̸§Àº ¹®ÀÚ¿Í ¹®ÀÚ »çÀÌÀÇ ¹®ÀÚ¿­ÀÌ´Ù.
  • °¢ ast_category structure ¾È¿¡´Â ast_variable structure ¸¦ linked list ·Î ³Ö´Â´Ù.

* char *ast_category_browse(struct ast_config *config, const char *prev)
  • µÎ¹ø° Àμö°¡ null À̸é, linked list ÀÇ ¸Ç ¾ÕÀÇ category structure ¸¦ °¡Á®¿Â´Ù.
  • µÎ¹ø° Àμö°¡ category structure ÀÇ pointer À̸é, ÀÌ ´ÙÀ½ÀÇ category structure ¸¦ °¡Á®¿Â´Ù.

conf file


ID
Password
Join
When the wind is great, bow before it; when the wind is heavy, yield to it.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-07-06 10:55:21
Processing time 0.0034 sec