there are basically two threads. one is for grpc, and another one is for atspi.
and they call atspi api at the same time, which can cause a problem.
this patch adopt a wrapper class to lock that api set.
Change-Id: I84d55ae67af56cf5be9ff8c9e00b8801a853afa5
--- /dev/null
+#pragma once
+#include <atspi/atspi.h>
+#include <mutex>
+
+class AtspiWrapper {
+public:
+ static GArray* Atspi_state_set_get_states(AtspiStateSet *set);
+ static GArray* Atspi_accessible_get_interfaces(AtspiAccessible *node);
+ static gchar* Atspi_accessible_get_name(AtspiAccessible *node, GError **error);
+ static AtspiAccessible* Atspi_get_desktop(int n);
+ static int Atspi_accessible_get_child_count(AtspiAccessible *node, GError **error);
+ static AtspiAccessible* Atspi_accessible_get_child_at_index(AtspiAccessible *node, int index, GError **error);
+ static AtspiAccessible* Atspi_accessible_get_parent(AtspiAccessible *node, GError **error);
+ static AtspiStateSet* Atspi_accessible_get_state_set(AtspiAccessible *node);
+ static gboolean Atspi_state_set_contains(AtspiStateSet *set , AtspiStateType state);
+ static gchar* Atspi_accessible_get_role_name(AtspiAccessible *node, GError **error);
+ static gchar* Atspi_accessible_get_unique_id(AtspiAccessible *node, GError **error);
+ static GHashTable* Atspi_accessible_get_attributes(AtspiAccessible *node, GError **error);
+ static AtspiComponent* Atspi_accessible_get_component_iface(AtspiAccessible *node);
+ static AtspiRect* Atspi_component_get_extents(AtspiComponent *obj, AtspiCoordType ctype, GError **error);
+ static AtspiAction* Atspi_accessible_get_action_iface(AtspiAccessible *node);
+ static int Atspi_action_get_n_actions(AtspiAction* action, GError **error);
+ static gchar* Atspi_action_get_action_name(AtspiAction* action, int index, GError **error);
+ static gboolean Atspi_action_do_action(AtspiAction *action, int index, GError **error);
+ static AtspiEditableText* Atspi_accessible_get_editable_text(AtspiAccessible *node);
+ static gboolean Atspi_editable_text_delete_text(AtspiEditableText*, int start, int end, GError **error);
+ static gboolean Atspi_editable_text_insert_text(AtspiEditableText*, int pos, const gchar *text, int len, GError **error);
+ static AtspiAccessible* Atspi_accessible_get_application (AtspiAccessible *node, GError **error);
+
+ static void lock();
+ static void unlock();
+private:
+ static std::recursive_mutex mMutex;
+ //static std::unique_lock<std::mutex> mLock;
+};
\ No newline at end of file
static void _print_stateset_debug( AtspiStateSet *stateSet)
{
if (!stateSet) return;
- GArray *states = atspi_state_set_get_states(stateSet);
+ GArray *states = AtspiWrapper::Atspi_state_set_get_states(stateSet);
if (!states) return;
char *state_name = NULL;
#include "AtspiAccessibleApplication.h"
#include "AtspiAccessibleWindow.h"
+#include "AtspiWrapper.h"
+
#include <algorithm>
#include <vector>
#include "AtspiAccessibleNode.h"
#include "AccessibleWatcher.h"
+#include "AtspiWrapper.h"
#include <gio/gio.h>
watcher->attach(shared_from_this());
if (mNode) {
- GArray *ifaces = atspi_accessible_get_interfaces(mNode);
+ /*
+ GArray *ifaces = AtspiWrapper::Atspi_accessible_get_interfaces(mNode);
if (ifaces) {
for (unsigned int i = 0; i < ifaces->len; i++) {
char *iface = g_array_index(ifaces, char *, i);
g_free(iface);
}
g_array_free(ifaces, FALSE);
- }
+ }*/
+
this->refresh();
} else {
LOG_F(INFO, "AtspiAccessibleNode Ctor : mNode is null");
int AtspiAccessibleNode::getChildCount() const
{
- if (!isValid()) return 0;
- int count = atspi_accessible_get_child_count(mNode, NULL);
+ AtspiWrapper::lock();
+ if (!isValid()) {
+ AtspiWrapper::unlock();
+ return 0;
+ }
+ int count = AtspiWrapper::Atspi_accessible_get_child_count(mNode, NULL);
+ AtspiWrapper::unlock();
if (count <= 0) return 0;
return count;
}
std::shared_ptr<AccessibleNode> AtspiAccessibleNode::getChildAt(int index) const
{
- if (!isValid()) return std::make_shared<AtspiAccessibleNode>(nullptr);
+ AtspiWrapper::lock();
+ if (!isValid()) {
+ AtspiWrapper::unlock();
+ return std::make_shared<AtspiAccessibleNode>(nullptr);
+ }
LOG_SCOPE_F(INFO, "getChild @ %d from node(%p)", index, mNode);
- AtspiAccessible *rawChild = atspi_accessible_get_child_at_index(mNode, index, NULL);
+ AtspiAccessible *rawChild = AtspiWrapper::Atspi_accessible_get_child_at_index(mNode, index, NULL);
+ AtspiWrapper::unlock();
return std::make_shared<AtspiAccessibleNode>(rawChild);
}
std::shared_ptr<AccessibleNode> AtspiAccessibleNode::getParent() const
{
- if (!isValid()) std::make_shared<AtspiAccessibleNode>(nullptr);
- AtspiAccessible *rawParent = atspi_accessible_get_parent(mNode, NULL);
+ AtspiWrapper::lock();
+ if (!isValid()) {
+ AtspiWrapper::unlock();
+ return std::make_shared<AtspiAccessibleNode>(nullptr);
+ }
+ AtspiAccessible *rawParent = AtspiWrapper::Atspi_accessible_get_parent(mNode, NULL);
+ AtspiWrapper::unlock();
return std::make_shared<AtspiAccessibleNode>(rawParent);
/* auto node = AccessibleNode::get(parent);
if (parent) g_object_unref(parent);
{
if(!AccessibleNode::isValid()) return false;
- AtspiStateSet *st = atspi_accessible_get_state_set(mNode);
+ AtspiStateSet *st = AtspiWrapper::Atspi_accessible_get_state_set(mNode);
if (!st) return false;
- if (atspi_state_set_contains(st, ATSPI_STATE_INVALID) ||
- atspi_state_set_contains(st, ATSPI_STATE_DEFUNCT)) {
+ if (AtspiWrapper::Atspi_state_set_contains(st, ATSPI_STATE_INVALID) ||
+ AtspiWrapper::Atspi_state_set_contains(st, ATSPI_STATE_DEFUNCT)) {
g_object_unref(st);
return false;
}
void AtspiAccessibleNode::refresh()
{
+ AtspiWrapper::lock();
if (isValid()) {
- gchar *rolename = atspi_accessible_get_role_name(mNode, NULL);
+ gchar *rolename = AtspiWrapper::Atspi_accessible_get_role_name(mNode, NULL);
if (rolename) {
mRole = rolename;
g_free(rolename);
}
#ifdef TIZEN
- gchar *uID = atspi_accessible_get_unique_id(mNode, NULL);
+ gchar *uID = AtspiWrapper::Atspi_accessible_get_unique_id(mNode, NULL);
if (uID) {
mId = uID;
g_free(uID);
mId = std::string{"N/A"};
#endif
- gchar *name = atspi_accessible_get_name(mNode, NULL);
+ gchar *name = AtspiWrapper::Atspi_accessible_get_name(mNode, NULL);
mText = name;
mPkg = name;
g_free(name);
- GHashTable *attributes = atspi_accessible_get_attributes(mNode, NULL);
+ GHashTable *attributes = AtspiWrapper::Atspi_accessible_get_attributes(mNode, NULL);
if (attributes) {
char *t = (char*)g_hash_table_lookup(attributes, "type");
char *s = (char*)g_hash_table_lookup(attributes, "style");
free(s);
free(a);
+ LOG_F(INFO, "table unref %p", attributes);
g_hash_table_unref(attributes);
}
- AtspiStateSet *st = atspi_accessible_get_state_set(mNode);
+ AtspiStateSet *st = AtspiWrapper::Atspi_accessible_get_state_set(mNode);
if (st) {
- GArray *states = atspi_state_set_get_states(st);
+ GArray *states = AtspiWrapper::Atspi_state_set_get_states(st);
if (states) {
AtspiStateType stat;
for (unsigned int i = 0; states && (i < states->len); ++i) {
stat = g_array_index(states, AtspiStateType, i);
setFeatureProperty(stat);
}
- g_array_free(states, 0);
+ g_array_free(states, 1);
}
g_object_unref(st);
}
- AtspiComponent *component = atspi_accessible_get_component_iface(mNode);
+ AtspiComponent *component = AtspiWrapper::Atspi_accessible_get_component_iface(mNode);
if (component) {
- AtspiRect *extent = atspi_component_get_extents(
+ AtspiRect *extent = AtspiWrapper::Atspi_component_get_extents(
component, ATSPI_COORD_TYPE_SCREEN, NULL);
if (extent) {
mBoundingBox =
} else {
setFeatureProperty(ATSPI_STATE_INVALID);
}
+ AtspiWrapper::unlock();
}
std::vector<std::string> AtspiAccessibleNode::getActions() const
{
+ AtspiWrapper::lock();
+
std::vector<std::string> result{};
AtspiAction *action;
- if (!isValid()) return result;
+ if (!isValid()) {
+ AtspiWrapper::unlock();
+ return result;
+ }
- action = atspi_accessible_get_action_iface(mNode);
+ action = AtspiWrapper::Atspi_accessible_get_action_iface(mNode);
if (action) {
int a;
- int n_actions = atspi_action_get_n_actions(action, NULL);
+ int n_actions = AtspiWrapper::Atspi_action_get_n_actions(action, NULL);
for (a = 0; a < n_actions; a++) {
- char *action_name = atspi_action_get_action_name(action, a, NULL);
+ char *action_name = AtspiWrapper::Atspi_action_get_action_name(action, a, NULL);
if (!action_name) continue;
result.push_back(std::string{action_name});
g_free(action_name);
}
g_object_unref(action);
}
+
+ AtspiWrapper::unlock();
+
return result;
}
bool AtspiAccessibleNode::doAction(std::string actionName)
{
+ AtspiWrapper::lock();
AtspiAction *action;
- if (!isValid()) return false;
- action = atspi_accessible_get_action_iface(mNode);
+
+ if (!isValid()) {
+ AtspiWrapper::unlock();
+ return false;
+ }
+
+ action = AtspiWrapper::Atspi_accessible_get_action_iface(mNode);
if (action) {
int a;
- int n_actions = atspi_action_get_n_actions(action, NULL);
+ int n_actions = AtspiWrapper::Atspi_action_get_n_actions(action, NULL);
for (a = 0; a < n_actions; a++) {
- char *action_name = atspi_action_get_action_name(action, a, NULL);
- if (!action_name) return false;
+ char *action_name = AtspiWrapper::Atspi_action_get_action_name(action, a, NULL);
+ if (!action_name) {
+ AtspiWrapper::unlock();
+ return false;
+ }
if (!strcmp(actionName.c_str(), action_name)) {
- atspi_action_do_action(action, a, NULL);
+ AtspiWrapper::Atspi_action_do_action(action, a, NULL);
g_free(action_name);
g_object_unref(action);
+ AtspiWrapper::unlock();
return true;
}
g_free(action_name);
}
g_object_unref(action);
}
+ AtspiWrapper::unlock();
return false;
}
void AtspiAccessibleNode::setValue(std::string text)
{
- if (!isValid()) return;
+ AtspiWrapper::lock();
+ if (!isValid()){
+ AtspiWrapper::unlock();
+ return;
+ }
- AtspiEditableText *iface = atspi_accessible_get_editable_text(mNode);
+ AtspiEditableText *iface = AtspiWrapper::Atspi_accessible_get_editable_text(mNode);
LOG_F(INFO,"set Value iface:%p obj:%p text:%s", iface, mNode, text.c_str() );
if (iface) {
int len = getText().length();
- atspi_editable_text_delete_text(iface, 0, len, NULL);
- atspi_editable_text_insert_text(iface, 0, text.c_str(), text.length(),
+ AtspiWrapper::Atspi_editable_text_delete_text(iface, 0, len, NULL);
+ AtspiWrapper::Atspi_editable_text_insert_text(iface, 0, text.c_str(), text.length(),
NULL);
}
+ AtspiWrapper::unlock();
}
void AtspiAccessibleNode::setFeatureProperty(AtspiStateType type)
#include "AtspiAccessibleApplication.h"
#include "AtspiAccessibleWindow.h"
#include "AtspiAccessibleNode.h"
-
+#include "AtspiWrapper.h"
#include <algorithm>
#include <loguru.hpp>
static bool iShowingNode(AtspiAccessible *node)
{
char *name = NULL;
- if (node) name = atspi_accessible_get_name(node, NULL);
+ if (node) name = AtspiWrapper::Atspi_accessible_get_name(node, NULL);
else return false;
LOG_SCOPE_F(INFO, "isShowing %s", name);
- auto stateSet = atspi_accessible_get_state_set(node);
+ auto stateSet = AtspiWrapper::Atspi_accessible_get_state_set(node);
- if (atspi_state_set_contains(stateSet, ATSPI_STATE_ACTIVE)
- && atspi_state_set_contains(stateSet, ATSPI_STATE_SHOWING)) {
+ if (AtspiWrapper::Atspi_state_set_contains(stateSet, ATSPI_STATE_ACTIVE)
+ && AtspiWrapper::Atspi_state_set_contains(stateSet, ATSPI_STATE_SHOWING)) {
LOG_F(INFO, "active and showing %p %s", node, name);
free(name);
g_object_unref(stateSet);
if (iShowingNode(node)) {
g_object_ref(node);
- char *name = atspi_accessible_get_name(node, NULL);
+ char *name = AtspiWrapper::Atspi_accessible_get_name(node, NULL);
if (name) {
LOG_SCOPE_F(INFO, "%s", name);
free(name);
if (depth >= max_depth) return ret;
- int nchild = atspi_accessible_get_child_count(node, NULL);
+ int nchild = AtspiWrapper::Atspi_accessible_get_child_count(node, NULL);
if (nchild <= 0) return ret;
LOG_F(INFO, "findActiveNode node %p has %d children", node, nchild);
for (int i = 0; i < nchild; i++) {
- AtspiAccessible* child = atspi_accessible_get_child_at_index(node, i, NULL);
+ AtspiAccessible* child = AtspiWrapper::Atspi_accessible_get_child_at_index(node, i, NULL);
LOG_F(INFO, "a child found @ %d : %p", i, child);
std::vector<AtspiAccessible *> childRet = findActiveNode(child, depth + 1, max_depth);
ret.insert(ret.end(), childRet.begin(), childRet.end());
void AtspiAccessibleWatcher::onAtspiEvents(AtspiEvent *event, void *user_data)
{
+ AtspiWrapper::lock();
char *name = NULL, *pname = NULL;
AtspiAccessibleWatcher *instance = (AtspiAccessibleWatcher *)user_data;
return;
}
- name = atspi_accessible_get_name(event->source, NULL);
- AtspiAccessible *parent = atspi_accessible_get_parent(event->source, NULL);
+ name = AtspiWrapper::Atspi_accessible_get_name(event->source, NULL);
+ AtspiAccessible *parent = AtspiWrapper::Atspi_accessible_get_parent(event->source, NULL);
if (parent) {
- pname = atspi_accessible_get_name(parent, NULL);
+ pname = AtspiWrapper::Atspi_accessible_get_name(parent, NULL);
g_object_unref(parent);
}
}
if (name) free(name);
if (pname) free(pname);
-
-// instance->print_debug();
+ AtspiWrapper::unlock();
}
void AtspiAccessibleWatcher::print_debug()
int AtspiAccessibleWatcher::getApplicationCount(void) const
{
- AtspiAccessible *root = atspi_get_desktop(0);
- int nchild = atspi_accessible_get_child_count(root, NULL);
+ AtspiWrapper::lock();
+
+ AtspiAccessible *root = AtspiWrapper::Atspi_get_desktop(0);
+ int nchild = AtspiWrapper::Atspi_accessible_get_child_count(root, NULL);
g_object_unref(root);
+
+ AtspiWrapper::unlock();
+
if (nchild <= 0) return 0;
return nchild;
}
std::shared_ptr<AccessibleApplication> AtspiAccessibleWatcher::getApplicationAt(int index) const
{
- AtspiAccessible *root = atspi_get_desktop(0);
- AtspiAccessible* child = atspi_accessible_get_child_at_index(root, index, NULL);
+ AtspiWrapper::lock();
+ AtspiAccessible *root = AtspiWrapper::Atspi_get_desktop(0);
+ AtspiAccessible* child = AtspiWrapper::Atspi_accessible_get_child_at_index(root, index, NULL);
g_object_unref(root);
+ AtspiWrapper::unlock();
return std::make_shared<AtspiAccessibleApplication>(std::make_shared<AtspiAccessibleNode>(child));
}
std::vector<std::shared_ptr<AccessibleApplication>> AtspiAccessibleWatcher::getApplications(void) const
{
+ AtspiWrapper::lock();
LOG_SCOPE_F(INFO, "getApplications for this(%p)", this);
std::vector<std::shared_ptr<AccessibleApplication>> ret{};
- AtspiAccessible *root = atspi_get_desktop(0);
- int nchild = atspi_accessible_get_child_count(root, NULL);
+ AtspiAccessible *root = AtspiWrapper::Atspi_get_desktop(0);
+ int nchild = AtspiWrapper::Atspi_accessible_get_child_count(root, NULL);
if (nchild <= 0) {
g_object_unref(root);
+ AtspiWrapper::unlock();
return ret;
}
for (int i = 0; i < nchild; i++){
- AtspiAccessible* child = atspi_accessible_get_child_at_index(root, i, NULL);
+ AtspiAccessible* child = AtspiWrapper::Atspi_accessible_get_child_at_index(root, i, NULL);
if (child) {
ret.push_back(std::make_shared<AtspiAccessibleApplication>(std::make_shared<AtspiAccessibleNode>(child)));
}
}
g_object_unref(root);
+ AtspiWrapper::unlock();
return ret;
}
LOG_SCOPE_F(INFO,"remove from activelist node %p", node);
mActivatedWindowList.remove_if([&](auto &n) { return n == node; });
- AtspiAccessible *app = atspi_accessible_get_application(node, NULL);
+ AtspiAccessible *app = AtspiWrapper::Atspi_accessible_get_application(node, NULL);
LOG_F(INFO, "node:%p, app:%p", node, app);
if (app) {
mActivatedApplicationList.remove_if([&](auto &n) { return n == app; });
auto iter = mWindowSet.find(node);
if ( iter == mWindowSet.end()) mWindowSet.insert(node);
- AtspiAccessible *app = atspi_accessible_get_application(node, NULL);
+ AtspiAccessible *app = AtspiWrapper::Atspi_accessible_get_application(node, NULL);
LOG_F(INFO, "node:%p, app:%p", node, app);
if (app) {
mActivatedApplicationList.remove_if([&](auto &n) { if(n == app) { g_object_unref(app); return true;} else return false; });
#include "AtspiAccessibleWindow.h"
-
+#include "AtspiWrapper.h"
AtspiAccessibleWindow::AtspiAccessibleWindow(std::shared_ptr<AccessibleApplication> app, std::shared_ptr<AccessibleNode> node)
: AccessibleWindow(app, node)
--- /dev/null
+#include "AtspiWrapper.h"
+
+std::recursive_mutex AtspiWrapper::mMutex = std::recursive_mutex{};
+//std::unique_lock<std::mutex> AtspiWrapper::mLock = std::unique_lock<std::mutex>(mMutex, std::defer_lock);
+
+GArray* AtspiWrapper::Atspi_state_set_get_states(AtspiStateSet *set)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_state_set_get_states(set);
+}
+
+GArray* AtspiWrapper::Atspi_accessible_get_interfaces(AtspiAccessible *node)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_interfaces(node);
+}
+
+gchar* AtspiWrapper::Atspi_accessible_get_name(AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_name(node, error);
+}
+
+AtspiAccessible* AtspiWrapper::Atspi_get_desktop(int n)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_get_desktop(n);
+}
+
+int AtspiWrapper::Atspi_accessible_get_child_count(AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_child_count(node, error);
+}
+
+AtspiAccessible* AtspiWrapper::Atspi_accessible_get_child_at_index(AtspiAccessible *node, int index, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_child_at_index(node, index, error);
+}
+
+AtspiAccessible* AtspiWrapper::Atspi_accessible_get_parent(AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_parent(node, error);
+}
+
+AtspiStateSet* AtspiWrapper::Atspi_accessible_get_state_set(AtspiAccessible *node)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_state_set(node);
+}
+
+gboolean AtspiWrapper::Atspi_state_set_contains(AtspiStateSet *set , AtspiStateType state)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_state_set_contains(set , state);
+}
+
+gchar* AtspiWrapper::Atspi_accessible_get_role_name(AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_role_name(node, error);
+}
+
+gchar* AtspiWrapper::Atspi_accessible_get_unique_id(AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_unique_id(node, error);
+}
+
+GHashTable* AtspiWrapper::Atspi_accessible_get_attributes(AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_attributes(node, error);
+}
+
+AtspiComponent* AtspiWrapper::Atspi_accessible_get_component_iface(AtspiAccessible *node)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_component_iface(node);
+}
+
+AtspiRect* AtspiWrapper::Atspi_component_get_extents(AtspiComponent *obj, AtspiCoordType ctype, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_component_get_extents(obj, ctype, error);
+}
+
+AtspiAction* AtspiWrapper::Atspi_accessible_get_action_iface(AtspiAccessible *node)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_action_iface(node);
+}
+
+int AtspiWrapper::Atspi_action_get_n_actions(AtspiAction* action, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_action_get_n_actions(action, error);
+}
+
+gchar* AtspiWrapper::Atspi_action_get_action_name(AtspiAction* action, int index, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_action_get_action_name(action, index, error);
+}
+
+gboolean AtspiWrapper::Atspi_action_do_action(AtspiAction *action, int index, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_action_do_action(action, index, error);
+}
+
+AtspiEditableText* AtspiWrapper::Atspi_accessible_get_editable_text(AtspiAccessible *node)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_editable_text(node);
+}
+
+gboolean AtspiWrapper::Atspi_editable_text_delete_text(AtspiEditableText* iface, int start, int end, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_editable_text_delete_text(iface, start, end, error);
+}
+
+gboolean AtspiWrapper::Atspi_editable_text_insert_text(AtspiEditableText* iface, int pos, const gchar *text, int len, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_editable_text_insert_text(iface, pos, text, len, error);
+}
+
+AtspiAccessible* AtspiWrapper::Atspi_accessible_get_application (AtspiAccessible *node, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_application(node, error);
+}
+
+void AtspiWrapper::lock()
+{
+ mMutex.lock();
+}
+
+void AtspiWrapper::unlock()
+{
+ mMutex.unlock();
+}
files('AtspiAccessibleWindow.cc'),
files('AtspiAccessibleNode.cc'),
files('AtspiAccessibleWatcher.cc'),
+ files('AtspiWrapper.cc'),
]
libaurum_src += [