linphone-LinphoneCallLogImpl文件对应的JNI层文件分析
说明
本篇所有的功能全部围绕着LinphoneCallLog 展开。
疑惑
这里只是取得里面的值, 但是什么时候设置的值就不得而知了。 估计是接电话的时候创建的值吧。
native函数
private native long getFrom(long nativePtr);private native long getTo(long nativePtr);private native boolean isIncoming(long nativePtr);private native int getStatus(long nativePtr);private native String getStartDate(long nativePtr);private native int getCallDuration(long nativePtr);private native String getCallId(long nativePtr);private native long getTimestamp(long nativePtr);private native boolean wasConference(long nativePtr);
getFrom
//CallLog
extern "C" jlong Java_org_linphone_core_LinphoneCallLogImpl_getFrom(JNIEnv* env,jobject thiz,jlong ptr) {return (jlong)((LinphoneCallLog*)ptr)->from;
}
LinphoneCallLog
submodules/linphone/coreapi/private.h:struct _LinphoneCallLog{
struct _LinphoneCallLog{belle_sip_object_t base;void *user_data;struct _LinphoneCore *lc;LinphoneCallDir dir; /**< The direction of the call*/LinphoneCallStatus status; /**< The status of the call*/LinphoneAddress *from; /**<Originator of the call as a LinphoneAddress object*/LinphoneAddress *to; /**<Destination of the call as a LinphoneAddress object*/char start_date[128]; /**<Human readable string containing the start date*/int duration; /**<Duration of the call starting in connected state in seconds*/char *refkey;rtp_stats_t local_stats;rtp_stats_t remote_stats;float quality;time_t start_date_time; /**Start date of the call in seconds as expressed in a time_t */time_t connected_date_time; /**Connecting date of the call in seconds as expressed in a time_t */char* call_id; /**unique id of a call*/struct _LinphoneQualityReporting reporting;bool_t video_enabled;bool_t was_conference; /**<That call was a call with a conference server */unsigned int storage_id;
};
LinphoneCallStatus
submodules/linphone/coreapi/call_log.h:typedef enum _LinphoneCallStatus {
/*** Enum representing the status of a call
**/
typedef enum _LinphoneCallStatus {LinphoneCallSuccess, /**< The call was sucessful */LinphoneCallAborted, /**< The call was aborted */LinphoneCallMissed, /**< The call was missed (unanswered) */LinphoneCallDeclined /**< The call was declined, either locally or by remote end */
} LinphoneCallStatus;
LinphoneCallDir
submodules/linphone/coreapi/call_log.h:enum _LinphoneCallDir {
/*** Enum representing the direction of a call.
**/
enum _LinphoneCallDir {LinphoneCallOutgoing, /**< outgoing calls*/LinphoneCallIncoming /**< incoming calls*/
};
_LinphoneCore
struct _LinphoneCore
{MSFactory* factory;MSList* vtable_refs;Sal *sal;LinphoneGlobalState state;struct _LpConfig *config;MSList *default_audio_codecs;MSList *default_video_codecs;MSList *default_text_codecs;net_config_t net_conf;sip_config_t sip_conf;rtp_config_t rtp_conf;sound_config_t sound_conf;video_config_t video_conf;text_config_t text_conf;codecs_config_t codecs_conf;ui_config_t ui_conf;autoreplier_config_t autoreplier_conf;LinphoneProxyConfig *default_proxy;MSList *friends_lists;MSList *auth_info;struct _RingStream *ringstream;time_t dmfs_playing_start_time;LCCallbackObj preview_finished_cb;LinphoneCall *current_call; /* the current call */MSList *calls; /* all the processed calls */MSList *queued_calls; /* used by the autoreplier */MSList *call_logs;MSList *chatrooms;int max_call_logs;int missed_calls;VideoPreview *previewstream;struct _MSEventQueue *msevq;LinphoneRtpTransportFactories *rtptf;MSList *bl_reqs;MSList *subscribers; /* unknown subscribers */int minutes_away;LinphonePresenceModel *presence_model;void *data;char *play_file;char *rec_file;uint64_t prevtime_ms;int audio_bw; /*IP bw consumed by audio codec, set as soon as used codec is known, its purpose is to know the remaining bw for video*/LinphoneCoreWaitingCallback wait_cb;void *wait_ctx;void *video_window_id;void *preview_window_id;time_t netup_time; /*time when network went reachable */struct _EcCalibrator *ecc;LinphoneTaskList hooks; /*tasks periodically executed in linphone_core_iterate()*/LinphoneConference *conf_ctx;char* zrtp_secrets_cache;char* user_certificates_path;LinphoneVideoPolicy video_policy;time_t network_last_check;bool_t use_files;bool_t apply_nat_settings;bool_t initial_subscribes_sent;bool_t bl_refresh;bool_t preview_finished;bool_t auto_net_state_mon;bool_t sip_network_reachable;bool_t media_network_reachable;bool_t network_reachable_to_be_notified; /*set to true when state must be notified in next iterate*/bool_t use_preview_window;bool_t network_last_status;bool_t ringstream_autorelease;bool_t vtables_running;bool_t send_call_stats_periodical_updates;bool_t forced_ice_relay;bool_t pad;char localip[LINPHONE_IPADDR_SIZE];int device_rotation;int max_calls;LinphoneTunnel *tunnel;char* device_id;MSList *last_recv_msg_ids;char *chat_db_file;
#ifdef MSG_STORAGE_ENABLEDsqlite3 *db;bool_t debug_storage;
#endifchar *logs_db_file;
#ifdef CALL_LOGS_STORAGE_ENABLEDsqlite3 *logs_db;
#endifchar *friends_db_file;
#ifdef FRIENDS_SQL_STORAGE_ENABLEDsqlite3 *friends_db;
#endif
#ifdef BUILD_UPNPUpnpContext *upnp;
#endif //BUILD_UPNPbelle_http_provider_t *http_provider;belle_tls_verify_policy_t *http_verify_policy;belle_http_request_listener_t *provisioning_http_listener;MSList *tones;LinphoneReason chat_deny_code;char *file_transfer_server;const char **supported_formats;LinphoneContent *log_collection_upload_information;LinphoneCoreVTable *current_vtable; // the latest vtable to call a callback, see linphone_core_get_current_vtableLinphoneRingtonePlayer *ringtoneplayer;
#ifdef ANDROIDjobject wifi_lock;jclass wifi_lock_class;jmethodID wifi_lock_acquire_id;jmethodID wifi_lock_release_id;jobject multicast_lock;jclass multicast_lock_class;jmethodID multicast_lock_acquire_id;jmethodID multicast_lock_release_id;
#endif
};
这个_LinphoneCore真的是很长啊,真后悔找到它。不过, 这个也是最核心的部分了。 所以早晚得看它, 到底现在看不看呢。 还是随便的看一看就好了。
getTo
extern "C" jlong Java_org_linphone_core_LinphoneCallLogImpl_getTo(JNIEnv* env,jobject thiz,jlong ptr) {return (jlong)((LinphoneCallLog*)ptr)->to;
}
isIncoming
extern "C" jboolean Java_org_linphone_core_LinphoneCallLogImpl_isIncoming(JNIEnv* env,jobject thiz,jlong ptr) {return ((LinphoneCallLog*)ptr)->dir==LinphoneCallIncoming?JNI_TRUE:JNI_FALSE;
}
getStatus
extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getStatus(JNIEnv* env,jobject thiz,jlong ptr) {return (jint)((LinphoneCallLog*)ptr)->status;
}
getStartDate
extern "C" jstring Java_org_linphone_core_LinphoneCallLogImpl_getStartDate(JNIEnv* env,jobject thiz,jlong ptr) {jstring jvalue =env->NewStringUTF(((LinphoneCallLog*)ptr)->start_date);return jvalue;
}
getCallDuration
extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEnv* env,jobject thiz,jlong ptr) {return (jint)((LinphoneCallLog*)ptr)->duration;
}
getCallId
/** Class: org_linphone_core_LinphoneCallLogImpl* Method: getCallId* Signature: (J)I*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneCallLogImpl_getCallId(JNIEnv *env, jobject jobj, jlong pcl){const char *str = linphone_call_log_get_call_id((LinphoneCallLog*)pcl);return str ? env->NewStringUTF(str) : NULL;
}
linphone_call_log_get_call_id
submodules/linphone/coreapi/call_log.c:const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl){
submodules/linphone/coreapi/call_log.h:LINPHONE_PUBLIC const char * linphone_call_log_get_call_id(const LinphoneCallLog *cl);
const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl){return cl->call_id;
}
getTimestamp
extern "C" jlong Java_org_linphone_core_LinphoneCallLogImpl_getTimestamp(JNIEnv* env,jobject thiz,jlong ptr) {return static_cast<long> (((LinphoneCallLog*)ptr)->start_date_time);
}
wasConference
extern "C" jboolean Java_org_linphone_core_LinphoneCallLogImpl_wasConference(JNIEnv *env, jobject thiz, jlong ptr) {return linphone_call_log_was_conference((LinphoneCallLog *)ptr);
}
linphone_call_log_was_conference
bool_t linphone_call_log_was_conference(LinphoneCallLog *cl) {return cl->was_conference;
}
linphone-LinphoneCallLogImpl文件对应的JNI层文件分析相关推荐
- linphone-LinphoneAddressImpl文件对应的JNI层文件分析
说明 本篇是java及对应的c语言的分析的第一篇,旨在通过每一个文件对jni层部分的主要逻辑进行分析. UML类图 newLinphoneAddressImpl函数分析 /** *@params ur ...
- linphone-LinphoneChatRoomImpl文件对应的JNI层文件分析
说明 这是个聊天内容的类, 这里还对sqlite3数据库进行了操作,已经文件的传输也在这里. native函数 private native long createLinphoneChatMessag ...
- javah生成JNI头文件
Administrator@ibm /cygdrive/z/workspace/com.example.hellojni.hellojni/src <---- 从此文件夹执行 javah *** ...
- java jni调用dll文件_Java通过jni调用动态链接库
(1)JNI简介 JNI是Java Native Interface的缩写,它提供了若干的API实现了Java和其他语言的通信(主要是C&C++).从Java1.1开始,JNI标准成为java ...
- 【Android NDK 开发】Visual Studio 2019 使用 CMake 开发 JNI 动态库 ( 动态库编译配置 | JNI 头文件导入 | JNI 方法命名规范 )
文章目录 I . JNI 与 NDK 区别 II . Visual Studio 编译动态库 III. 配置 导入 jni.h 头文件 IV . IntelliJ IDEA Community Edi ...
- 文件签名魔塔50层android反编译破解
发一下牢骚和主题无关: 缘由:该游戏作者有点可爱,原来就是拿别人的游戏,还在游戏中参加积分的轨制,打到20层后,需要积分.看不惯,就把它破解了,打到20层后,直接跳过要积分进程. 本文不提供破解后的安 ...
- AndroidStudio快速生成JNI头文件
依次打开Settings-->Tools-->External Tools-->点击加号创建一个快速生成jni头文件的工具 Program: javah Parameters: -v ...
- ida导入jni头文件_IDA导入Jni.h
IDA 分析Android so 文件时,因为缺少JNIEnv结构定义,反编译后看起来很不友好,如下图(后面注释是我自己手工对照加的 = =).为避免以后无穷无尽的手动加注,接下来我们就来导入 JNI ...
- ida导入jni头文件_IDA动态调试无法导入JNI文件的解决办法
前言:学习过程中遇到了,特此记录一下. 样本app链接在这里: https://pan.baidu.com/s/1pVLBBuBKRzDzHlBClrBA2A 提取码: 9tz8 它是 2015年阿里 ...
最新文章
- 图论500题 ---- (枚举+并查集)求图上路径权值差值最小 HDU find the most comfortable road
- CentOS 6.7 配置 yum 安装 nginx
- Jmeter性能测试入门(一)
- 生成和合入patch的两种方式
- 2021重庆黔江中学高考成绩查询,2020年重庆黔江三所高中排名公告
- Java 原子类的操作 AtomicInteger
- 九度OJ 1547 动态规划
- apache2.2.15与PHP5.3.3安装设置完成后,apache启动失败
- 天地图专题六:复杂操作,天地图上标注点的连线以及模拟点击事件
- [20180626]函数与标量子查询14.txt
- S5PV210 芯片降价
- STM32cubeide代码自动补全教程
- 商务办公软件应用与实践【6】
- QT中自定义控件和插件大致方法
- 郭盛华一生特别自律,这两样东西从不沾,网友:不愧是教父级人物
- 中国计算机学会(CCF)推荐中文科技期刊目录(2019年)
- 无人驾驶技术的突破与挑战
- [学习记录]浅谈Android硬件加速
- Vscode 文件中 查找替换局部查找替换快捷键
- 前端技能树,面试复习第 1 天—— 建立前端知识框架 | HTML 知识考察点