#include "asterisk.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/stringfields.h"
Include dependency graph for func_language.c:
Go to the source code of this file.
Functions | |
AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"Channel language dialplan function") | |
static int | language_read (struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) |
static int | language_write (struct ast_channel *chan, char *cmd, char *data, const char *value) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static int | depwarning = 0 |
static struct ast_custom_function | language_function |
Definition in file func_language.c.
AST_MODULE_INFO_STANDARD | ( | ASTERISK_GPL_KEY | , | |
"Channel language dialplan function" | ||||
) |
static int language_read | ( | struct ast_channel * | chan, | |
char * | cmd, | |||
char * | data, | |||
char * | buf, | |||
size_t | len | |||
) | [static] |
Definition at line 42 of file func_language.c.
References ast_log(), and LOG_WARNING.
00044 { 00045 if (!depwarning) { 00046 depwarning = 1; 00047 ast_log(LOG_WARNING, 00048 "LANGUAGE() is deprecated; use CHANNEL(language) instead.\n"); 00049 } 00050 00051 ast_copy_string(buf, chan ? chan->language : "", len); 00052 00053 return 0; 00054 }
static int language_write | ( | struct ast_channel * | chan, | |
char * | cmd, | |||
char * | data, | |||
const char * | value | |||
) | [static] |
Definition at line 56 of file func_language.c.
References ast_log(), ast_string_field_set, language, and LOG_WARNING.
00058 { 00059 if (!depwarning) { 00060 depwarning = 1; 00061 ast_log(LOG_WARNING, 00062 "LANGUAGE() is deprecated; use CHANNEL(language) instead.\n"); 00063 } 00064 00065 if (chan && value) 00066 ast_string_field_set(chan, language, value); 00067 00068 return 0; 00069 }
static int load_module | ( | void | ) | [static] |
Definition at line 85 of file func_language.c.
References ast_custom_function_register(), and language_function.
00086 { 00087 return ast_custom_function_register(&language_function); 00088 }
static int unload_module | ( | void | ) | [static] |
Definition at line 80 of file func_language.c.
References ast_custom_function_unregister(), and language_function.
00081 { 00082 return ast_custom_function_unregister(&language_function); 00083 }
int depwarning = 0 [static] |
struct ast_custom_function language_function [static] |