mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Implement local notification.
The default behavior is to only notify remote changes, but for some applications (e.g. GUI's) it's advantageous to know about local changes as well. This is (slightly) optimized in that local changes only result in additional resources being consumed if (any) local listeners have been created.
This commit is contained in:
@@ -888,7 +888,7 @@ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_networktables_NetworkTablesJNI
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_networktables_NetworkTablesJNI_addEntryListener
|
||||
(JNIEnv *envouter, jclass, jstring prefix, jobject listener,
|
||||
jboolean immediateNotify)
|
||||
jboolean immediateNotify, jboolean localNotify)
|
||||
{
|
||||
// the shared pointer to the weak global will keep it around until the
|
||||
// entry listener is destroyed
|
||||
@@ -935,7 +935,8 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_networktables_NetworkTablesJNI
|
||||
done:
|
||||
jvm->DetachCurrentThread();
|
||||
},
|
||||
immediateNotify != JNI_FALSE);
|
||||
immediateNotify != JNI_FALSE,
|
||||
localNotify != JNI_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user