|
@@ -957,11 +957,50 @@ UA_Server_deleteReference(UA_Server *server, const UA_NodeId sourceNodeId,
|
|
|
/* Add a new namespace to the server. Returns the index of the new namespace */
|
|
|
UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
|
|
|
|
|
|
+/**
|
|
|
+ * Deprecated Server API
|
|
|
+ * ---------------------
|
|
|
+ * This file contains outdated API definitions that are kept for backwards
|
|
|
+ * compatibility. Please switch to the new API, as the following definitions
|
|
|
+ * will be removed eventually.
|
|
|
+ *
|
|
|
+ * UA_Job API
|
|
|
+ * ^^^^^^^^^^
|
|
|
+ * UA_Job was replaced since it unneccessarily exposed server internals to the
|
|
|
+ * end-user. Please use plain UA_ServerCallbacks instead. The following UA_Job
|
|
|
+ * definition contains just the fraction of the original struct that was useful
|
|
|
+ * to end-users. */
|
|
|
+
|
|
|
+typedef enum {
|
|
|
+ UA_JOBTYPE_METHODCALL
|
|
|
+} UA_JobType;
|
|
|
+
|
|
|
+typedef struct {
|
|
|
+ UA_JobType type;
|
|
|
+ union {
|
|
|
+ struct {
|
|
|
+ void *data;
|
|
|
+ UA_ServerCallback method;
|
|
|
+ } methodCall;
|
|
|
+ } job;
|
|
|
+} UA_Job;
|
|
|
+
|
|
|
+UA_DEPRECATED static UA_INLINE UA_StatusCode
|
|
|
+UA_Server_addRepeatedJob(UA_Server *server, UA_Job job,
|
|
|
+ UA_UInt32 interval, UA_Guid *jobId) {
|
|
|
+ return UA_Server_addRepeatedCallback(server, job.job.methodCall.method,
|
|
|
+ job.job.methodCall.data, interval,
|
|
|
+ (UA_UInt64*)(uintptr_t)jobId);
|
|
|
+}
|
|
|
+
|
|
|
+UA_DEPRECATED static UA_INLINE UA_StatusCode
|
|
|
+UA_Server_removeRepeatedJob(UA_Server *server, UA_Guid jobId) {
|
|
|
+ return UA_Server_removeRepeatedCallback(server,
|
|
|
+ *(UA_UInt64*)(uintptr_t)&jobId);
|
|
|
+}
|
|
|
+
|
|
|
#ifdef __cplusplus
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-/* Old interfaces kept for API compatibility */
|
|
|
-#include "ua_server_deprecated.h"
|
|
|
-
|
|
|
#endif /* UA_SERVER_H_ */
|