blob: 2df87cdc7ccf14533dcd6d8f06600b77912923a9 [file] [log] [blame]
#ifndef LYNQ_CALL_H
#define LYNQ_CALL_H 1
#ifdef __cplusplus
extern "C" {
#endif
#define LYNQ_PHONE_NUMBER_MAX 32
#define INDEX_IS_NUMBER( alpha_char ) \
( ( (alpha_char >= '0') && (alpha_char <= '9') ) ? 1 : 0 )
#define LYNQ_CALL_MAX 10
#define LYNQ_CALL_FAIL_VENDOR_CAUSE 64
typedef enum {
CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
CALL_FAIL_NORMAL = 16,
CALL_FAIL_BUSY = 17,
CALL_FAIL_CONGESTION = 34,
CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
CALL_FAIL_CALL_BARRED = 240,
CALL_FAIL_FDN_BLOCKED = 241,
CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
CALL_FAIL_CDMA_DROP = 1001,
CALL_FAIL_CDMA_INTERCEPT = 1002,
CALL_FAIL_CDMA_REORDER = 1003,
CALL_FAIL_CDMA_SO_REJECT = 1004,
CALL_FAIL_CDMA_RETRY_ORDER = 1005,
CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
CALL_FAIL_CDMA_PREEMPTED = 1007,
CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
during emergency callback mode */
CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
} lynq_last_call_fail_cause_t;
typedef struct
{
lynq_last_call_fail_cause_t cause_code;
char vendor_cause[LYNQ_CALL_FAIL_VENDOR_CAUSE];
}lynqLastCallFailCause;
int lynq_init_call(int uToken);
int lynq_deinit_call();
int lynq_call(int *handle,char addr[]);
int lynq_call_answer();
int lynq_call_hungup(int*handle);
int lynq_call_hungup_all();
int lynq_wait_incoming_call(int *handle);
int lynq_set_auto_answercall(const int mode);
int lynq_get_mute_mic(int *status);
int lynq_set_mute_mic(const int enable);
int lynq_get_speech_volume(int *status);
int lynq_set_speech_volume(int value);
int lynq_incall_record_start(char* file_path);
int lynq_incall_record_stop();
int lynq_set_DTMF(const char callnum);
int lynq_set_DTMF_volume(const int volume);
int lynq_get_current_call_state(int *handle, int *call_state,int *toa,int *direction,char addr[]);
#ifdef __cplusplus
}
#endif
#endif