📄 capiwta.c
字号:
/*
* Copyright (C) Ericsson Mobile Communications AB, 2000.
* Licensed to AU-System AB.
* All rights reserved.
*
* This software is covered by the license agreement between
* the end user and AU-System AB, and may be used and copied
* only in accordance with the terms of the said agreement.
*
* Neither Ericsson Mobile Communications AB nor AU-System AB
* assumes any responsibility or liability for any errors or inaccuracies in
* this software, or any consequential, incidental or indirect damage arising
* out of the use of the Generic WAP Client software.
*/
#include "capiwta.h"
#include "cmmnrsrc.h"
#include "ml_typw.h"
#include "wap.ifc"
#ifdef LOG_EXTERNAL
#include "aapiwta.h"
#include "aapiclnt.h"
#endif
#ifdef CONFIG_WTA
#include "wta_ua.h"
#endif
/* Responses */
EXPORT_C VOID WTAIc_publicMakeCallResponse (UINT8 objectID, INT8 result)
{
XMK_SEND_TMP_VARS
yPDef_WTAResponse var;
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_publicMakeCallResponse\nUINT8 \t objectID \t %i\n, INT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
var.Param1 = objectID;
var.Param2 = result;
var.Param3 = NULL;
XMK_SEND_ENV( ENV,
WTAResponse,
xDefaultPrioSignal,
sizeof( yPDef_WTAResponse ),
&var,
GLOBALPID(XPTID_UA_ME,0));
}
EXPORT_C VOID WTAIc_publicSendDTMFResponse (UINT8 objectID, INT8 result)
{
XMK_SEND_TMP_VARS
yPDef_WTAResponse var;
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_publicSendDTMFResponse\nUINT8 \t objectID \t %i\n, INT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
var.Param1 = objectID;
var.Param2 = result;
var.Param3 = NULL;
XMK_SEND_ENV( ENV,
WTAResponse,
xDefaultPrioSignal,
sizeof( yPDef_WTAResponse ),
&var,
GLOBALPID(XPTID_UA_ME,0));
}
EXPORT_C VOID WTAIc_publicAddPBEntryResponse (UINT8 objectID, INT8 result)
{
XMK_SEND_TMP_VARS
yPDef_WTAResponse var;
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_publicAddPBEntryResponse\nUINT8 \t objectID \t %i\n, INT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
var.Param1 = objectID;
var.Param2 = result;
var.Param3 = NULL;
XMK_SEND_ENV( ENV,
WTAResponse,
xDefaultPrioSignal,
sizeof( yPDef_WTAResponse ),
&var,
GLOBALPID(XPTID_UA_ME,0));
}
#ifdef CONFIG_WTA
VOID help_func_int (UINT8 objectID, INT16 result)
{
XMK_SEND_TMP_VARS
yPDef_WTAResponse var;
var.Param1 = objectID;
var.Param2 = result;
var.Param3 = NULL;
XMK_SEND_ENV( ENV,
WTAResponse,
xDefaultPrioSignal,
sizeof( yPDef_WTAResponse ),
&var,
GLOBALPID(XPTID_UA_ME,0));
}
VOID help_func_int_wchar (UINT8 objectID, INT16 result, const WCHAR *fieldValue)
{
XMK_SEND_TMP_VARS
yPDef_WTAResponse var;
var.Param1 = objectID;
var.Param2 = result;
var.Param3 = (WCHAR*)fieldValue;
XMK_SEND_ENV( ENV,
WTAResponse,
xDefaultPrioSignal,
sizeof( yPDef_WTAResponse ),
&var,
GLOBALPID(XPTID_UA_ME,0));
}
EXPORT_C VOID WTAIc_voiceCallSetupResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_voiceCallSetupResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_voiceCallAcceptResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_voiceCallAcceptResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_voiceCallReleaseResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_voiceCallReleaseResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_voiceCallSendDTMFResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_voiceCallSendDTMFResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_voiceCallCallStatusResponse (UINT8 objectID, INT8 result, const WCHAR *fieldValue)
{
help_func_int_wchar(objectID, result, fieldValue);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_voiceCallCallStatusResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\nconst WCHAR * \t fieldvalue \t %s\n", (int)objectID, (int)result, fieldValue);
#endif
}
EXPORT_C VOID WTAIc_voiceCallListResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_voiceCallListResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_netTextSendResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_netTextSendResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_netTextListResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_netTextListResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_netTextRemoveResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_netTextRemoveResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_netTextGetFieldValueResponse (UINT8 objectID, INT8 result, const WCHAR *fieldValue)
{
help_func_int_wchar(objectID, result, fieldValue);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_netTextGetFieldValueResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\nconst WCHAR * \t fieldvalue \t %s\n", (int)objectID, (int)result, fieldValue);
#endif
}
EXPORT_C VOID WTAIc_netTextMarkAsReadResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_netTextMarkAsReadResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_phoneBookWriteResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_phoneBookWriteResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_phoneBookSearchResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_phoneBookSearchResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_phoneBookRemoveResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_phoneBookRemoveResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_phoneBookGetFieldValueResponse (UINT8 objectID, INT8 result, const WCHAR *fieldValue)
{
help_func_int_wchar(objectID, result, fieldValue);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_phoneBookGetFieldValueResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\nconst WCHAR * \t fieldvalue \t %s\n", (int)objectID, (int)result, fieldValue);
#endif
}
EXPORT_C VOID WTAIc_phoneBookChangeResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_phoneBookChangeResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_miscSetIndicatorResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_miscSetIndicatorResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_callLogDialledResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_callLogDialledResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_callLogMissedResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_callLogMissedResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_callLogReceivedResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_callLogReceivedResponse\nUINT8 \t objectID \t %i\nINT16 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_callLogGetFieldValueResponse (UINT8 objectID, INT8 result, const WCHAR *fieldValue)
{
help_func_int_wchar(objectID, result, fieldValue);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_callLogGetFieldValueResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\nconst WCHAR * \t fieldvalue \t %s\n", (int)objectID, (int)result, fieldValue);
#endif
}
EXPORT_C VOID WTAIc_GSMHoldResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMHoldResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMRetrieveResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMRetrieveResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMTransferResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMTransferResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMDeflectResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMDeflectResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMMultipartyResponse (UINT8 objectID, INT16 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMMultipartyResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMSeparateResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMSeparateResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMSendUSSDResponse (UINT8 objectID, INT8 result)
{
help_func_int(objectID, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMSendUSSDResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %i\n", (int)objectID, (int)result);
#endif
}
EXPORT_C VOID WTAIc_GSMNetinfoResponse (UINT8 objectID, const WCHAR *result)
{
help_func_int_wchar(objectID, 0, result);
#ifdef LOG_EXTERNAL
CLNTa_log(0, 0, "WTAIc_GSMNetinfoResponse\nUINT8 \t objectID \t %i\nINT8 \t result \t %s\n", (int)objectID, result);
#endif
}
/* Events */
EXPORT_C VOID WTAIc_incomingCall (INT16 callHandle, const CHAR *callerId)
{
XMK_SEND_TMP_VARS
yPDef_WTAEvent var;
#ifdef LOG_EXTERNAL
{
const char *_callerId = callerId;
if (!_callerId)
{
_callerId = cszNULL;
}
CLNTa_log(0, 0, "WTAIc_incomingCall\nINT16 \t callHandle \t %i\n, const CHAR * \t callerId \t %s\n", (int)callHandle, _callerId);
}
#endif
var.Param2 = wtaiEventIncomingCall(callHandle, (const unsigned char *)callerId);
var.Param1 = wip_byte2wchar("wtaev-cc/ic");
XMK_SEND_ENV( ENV,
WTAEvent,
xDefaultPrioSignal,
sizeof( yPDef_WTAEvent ),
&var,
GLOBALPID(XPTID_WTA_IF,0));
}
EXPORT_C VOID WTAIc_callCleared (INT16 callHandle, INT8 result)
{
XMK_SEND_TMP_VARS
yPDef_WTAEvent var;
#ifdef LOG_EXTERNAL
{
CLNTa_log(0, 0, "WTAIc_callCleared\nINT16 \t callHandle \t %i\n, INT8 \t result \t %i\n", (int)callHandle, (int)result);
}
#endif
var.Param2 = wtaiEventCallCleared(callHandle, result);
var.Param1 = wip_byte2wchar("wtaev-cc/cl");
XMK_SEND_ENV( ENV,
WTAEvent,
xDefaultPrioSignal,
sizeof( yPDef_WTAEvent ),
&var,
GLOBALPID(XPTID_WTA_IF,0));
}
EXPORT_C VOID WTAIc_callConnected (INT16 callHandle, const CHAR *callerId)
{
XMK_SEND_TMP_VARS
yPDef_WTAEvent var;
#ifdef LOG_EXTERNAL
{
const char *_callerId = callerId;
if (!_callerId)
{
_callerId = cszNULL;
}
CLNTa_log(0, 0, "WTAIc_callConnected\nINT16 \t callHandle \t %i\n, const CHAR * \t callerId \t %s\n", (int)callHandle, _callerId);
}
#endif
var.Param2 = wtaiEventCallConnected(callHandle, (const unsigned char *)callerId);
var.Param1 = wip_byte2wchar("wtaev-cc/co");
XMK_SEND_ENV( ENV,
WTAEvent,
xDefaultPrioSignal,
sizeof( yPDef_WTAEvent ),
&var,
GLOBALPID(XPTID_WTA_IF,0));
}
EXPORT_C VOID WTAIc_outgoingCall (INT16 callHandle, const CHAR *number)
{
XMK_SEND_TMP_VARS
yPDef_WTAEvent var;
#ifdef LOG_EXTERNAL
{
const char *_number = number;
if (!_number)
{
_number = cszNULL;
}
CLNTa_log(0, 0, "WTAIc_outgoingCall\nINT16 \t callHandle \t %i\n, const CHAR * \t number \t %s", (int)callHandle, _number);
}
#endif
var.Param2 = wtaiEventOutgoingCall (callHandle, (const unsigned char *)number);
var.Param1 = wip_byte2wchar("wtaev-cc/oc");
XMK_SEND_ENV( ENV,
WTAEvent,
xDefaultPrioSignal,
sizeof( yPDef_WTAEvent ),
&var,
GLOBALPID(XPTID_WTA_IF,0));
}
EXPORT_C VOID WTAIc_callAlerting (INT16 callHandle)
{
XMK_SEND_TMP_VARS
yPDef_WTAEvent var;
#ifdef LOG_EXTERNAL
{
CLNTa_log(0, 0, "WTAIc_callAlerting\nINT16 \t callHandle \t %i", (int)callHandle);
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -