mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-20 03:01:50 +00:00
add basic cpp wrapper (c'mon and add to it c++ lovers...)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5101 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
#ifndef SWITCH_CPP_H
|
||||
#define SWITCH_CPP_H
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
#include <switch.h>
|
||||
|
||||
void console_log(char *level_str, char *msg);
|
||||
void console_clean_log(char *msg);
|
||||
char *api_execute(char *cmd, char *arg);
|
||||
void api_reply_delete(char *reply);
|
||||
|
||||
class CoreSession {
|
||||
private:
|
||||
char *uuid;
|
||||
char *tts_name;
|
||||
char *voice_name;
|
||||
switch_input_args_t args;
|
||||
switch_input_args_t *ap;
|
||||
public:
|
||||
CoreSession(char *uuid);
|
||||
CoreSession(switch_core_session_t *session);
|
||||
~CoreSession();
|
||||
switch_core_session_t *session;
|
||||
switch_channel_t *channel;
|
||||
int answer();
|
||||
int preAnswer();
|
||||
void hangup(char *cause);
|
||||
void setVariable(char *var, char *val);
|
||||
void getVariable(char *var, char *val);
|
||||
int playFile(char *file, char *timer_name);
|
||||
void setDTMFCallback(switch_input_callback_function_t cb, void *buf, uint32_t buflen);
|
||||
int speakText(char *text);
|
||||
void set_tts_parms(char *tts_name, char *voice_name);
|
||||
int getDigits(char *dtmf_buf, int len, char *terminators, char *terminator, int timeout);
|
||||
int transfer(char *extensions, char *dialplan, char *context);
|
||||
int playAndgetDigits(int min_digits, int max_digits, int max_tries, int timeout, char *terminators,
|
||||
char *audio_files, char *bad_input_audio_files, char *dtmf_buf, char *digits_regex);
|
||||
void execute(char *app, char *data);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user