UINT RimeWithWeaselHandler::AddSession(LPWSTR buffer) { if (m_disabled) { DLOG(INFO) << "Trying to resume service."; EndMaintenance(); if (m_disabled) return 0; } UINT session_id = RimeCreateSession(); DLOG(INFO) << "Add session: created session_id = " << session_id; _ReadClientInfo(session_id, buffer); // show session's welcome message :-) if any _UpdateUI(session_id); m_active_session = session_id; return session_id; }
// session management static jint create_session(JNIEnv *env, jobject thiz) { RimeSessionId session_id = RimeCreateSession(); RimeSetOption(session_id, "soft_cursor", True); return session_id; }