Skip to content

Commit b0bae6c

Browse files
committed
tidying up legacy headers
1 parent 7925cd7 commit b0bae6c

File tree

5 files changed

+173
-222
lines changed

5 files changed

+173
-222
lines changed

source/client/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ set( SRC_FILES
4848
udaPutAPI.cpp
4949
udaClient.cpp
5050
udaClientHostList.cpp
51-
legacy_accAPI.cpp
52-
legacy_client.cpp
5351
)
5452

5553
set( HEADER_FILES

source/client/legacy_accAPI.cpp

Lines changed: 0 additions & 169 deletions
This file was deleted.

source/client/legacy_accAPI.h

Lines changed: 162 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef LEGACY_ACCAPI_H
2-
#define LEGACY_ACCAPI_H
1+
#ifndef UDA_LEGACY_ACCAPI_H
2+
#define UDA_LEGACY_ACCAPI_H
33

44
#include <clientserver/export.h>
55
#include "udaClient.h"
@@ -12,40 +12,167 @@ extern "C" {
1212
#ifdef UDA_CLIENT_FLAGS_API
1313
// #warning "Using legacy API names with redundant \"client_flags\" arguments, these will be deprecated in future"
1414

15-
LIBRARY_API DATA_BLOCK* acc_getCurrentDataBlock(CLIENT_FLAGS* client_flags);
16-
LIBRARY_API int acc_getCurrentDataBlockIndex(CLIENT_FLAGS* client_flags);
17-
LIBRARY_API int acc_growIdamDataBlocks(CLIENT_FLAGS* client_flags);
18-
LIBRARY_API int acc_getIdamNewDataHandle(CLIENT_FLAGS* client_flags);
19-
LIBRARY_API void setIdamClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag);
20-
LIBRARY_API void resetIdamClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag);
21-
LIBRARY_API void setIdamProperty(const char* property, CLIENT_FLAGS* client_flags);
22-
LIBRARY_API int getIdamProperty(const char* property, const CLIENT_FLAGS* client_flags);
23-
LIBRARY_API void resetIdamProperty(const char* property, CLIENT_FLAGS* client_flags);
24-
LIBRARY_API void resetIdamProperties(CLIENT_FLAGS* client_flags);
25-
LIBRARY_API CLIENT_BLOCK saveIdamProperties(const CLIENT_FLAGS* client_flags);
26-
LIBRARY_API void restoreIdamProperties(CLIENT_BLOCK cb, CLIENT_FLAGS* client_flags);
27-
LIBRARY_API int getIdamLastHandle(CLIENT_FLAGS* client_flags);
28-
LIBRARY_API void lockIdamThread(CLIENT_FLAGS* client_flags);
29-
LIBRARY_API void unlockUdaThread(CLIENT_FLAGS* client_flags);
30-
LIBRARY_API void freeIdamThread(CLIENT_FLAGS* client_flags);
15+
LIBRARY_API inline DATA_BLOCK* acc_getCurrentDataBlock(CLIENT_FLAGS* client_flags)
16+
{
17+
return udaGetCurrentDataBlock();
18+
}
19+
20+
LIBRARY_API inline int acc_getCurrentDataBlockIndex(CLIENT_FLAGS* client_flags)
21+
{
22+
return udaGetCurrentDataBlockIndex();
23+
}
24+
25+
LIBRARY_API inline int acc_growIdamDataBlocks(CLIENT_FLAGS* client_flags)
26+
{
27+
return udaGrowDataBlocks();
28+
}
29+
30+
LIBRARY_API inline int acc_getIdamNewDataHandle(CLIENT_FLAGS* client_flags)
31+
{
32+
return udaGetNewDataHandle();
33+
}
34+
35+
LIBRARY_API inline void setIdamClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag)
36+
{
37+
udaSetClientFlag(flag);
38+
}
39+
40+
LIBRARY_API inline void resetIdamClientFlag(CLIENT_FLAGS* client_flags, unsigned int flag)
41+
{
42+
udaResetClientFlag(flag);
43+
}
44+
45+
LIBRARY_API inline void setIdamProperty(const char* property, CLIENT_FLAGS* client_flags)
46+
{
47+
udaSetProperty(property);
48+
}
49+
50+
LIBRARY_API inline int getIdamProperty(const char* property, const CLIENT_FLAGS* client_flags)
51+
{
52+
return udaGetProperty(property);
53+
}
54+
55+
LIBRARY_API inline void resetIdamProperty(const char* property, CLIENT_FLAGS* client_flags)
56+
{
57+
udaResetProperty(property);
58+
}
59+
60+
LIBRARY_API inline void resetIdamProperties(CLIENT_FLAGS* client_flags)
61+
{
62+
udaResetProperties();
63+
}
64+
65+
CLIENT_BLOCK saveIdamProperties(const CLIENT_FLAGS* client_flags)
66+
{
67+
return udaSaveProperties();
68+
}
69+
70+
LIBRARY_API inline void restoreIdamProperties(CLIENT_BLOCK cb, CLIENT_FLAGS* client_flags)
71+
{
72+
udaRestoreProperties(cb);
73+
}
74+
75+
LIBRARY_API inline int getIdamLastHandle(CLIENT_FLAGS* client_flags)
76+
{
77+
return udaGetLastHandle();
78+
}
79+
80+
LIBRARY_API inline void lockIdamThread(CLIENT_FLAGS* client_flags)
81+
{
82+
udaLockThread();
83+
}
84+
85+
LIBRARY_API inline void unlockUdaThread(CLIENT_FLAGS* client_flags)
86+
{
87+
udaUnlockThread();
88+
}
89+
90+
LIBRARY_API inline void freeIdamThread(CLIENT_FLAGS* client_flags)
91+
{
92+
udaFreeThread();
93+
}
94+
3195
#else
3296

33-
LIBRARY_API DATA_BLOCK* acc_getCurrentDataBlock();
34-
LIBRARY_API int acc_getCurrentDataBlockIndex();
35-
LIBRARY_API int acc_growIdamDataBlocks();
36-
LIBRARY_API int acc_getIdamNewDataHandle();
37-
LIBRARY_API void setIdamClientFlag(unsigned int flag);
38-
LIBRARY_API void resetIdamClientFlag(unsigned int flag);
39-
LIBRARY_API void setIdamProperty(const char* property);
40-
LIBRARY_API int getIdamProperty(const char* property);
41-
LIBRARY_API void resetIdamProperty(const char* property);
42-
LIBRARY_API void resetIdamProperties();
43-
LIBRARY_API CLIENT_BLOCK saveIdamProperties();
44-
LIBRARY_API void restoreIdamProperties(CLIENT_BLOCK cb);
45-
LIBRARY_API int getIdamLastHandle();
46-
LIBRARY_API void lockIdamThread();
47-
LIBRARY_API void unlockUdaThread();
48-
LIBRARY_API void freeIdamThread();
97+
LIBRARY_API inline DATA_BLOCK* acc_getCurrentDataBlock()
98+
{
99+
return udaGetCurrentDataBlock();
100+
}
101+
102+
LIBRARY_API inline int acc_getCurrentDataBlockIndex()
103+
{
104+
return udaGetCurrentDataBlockIndex();
105+
}
106+
107+
LIBRARY_API inline int acc_growIdamDataBlocks()
108+
{
109+
return udaGrowDataBlocks();
110+
}
111+
112+
LIBRARY_API inline int acc_getIdamNewDataHandle()
113+
{
114+
return udaGetNewDataHandle();
115+
}
116+
117+
LIBRARY_API inline void setIdamClientFlag(unsigned int flag)
118+
{
119+
udaSetClientFlag(flag);
120+
}
121+
122+
LIBRARY_API inline void resetIdamClientFlag(unsigned int flag)
123+
{
124+
udaResetClientFlag(flag);
125+
}
126+
127+
LIBRARY_API inline void setIdamProperty(const char* property)
128+
{
129+
udaSetProperty(property);
130+
}
131+
132+
LIBRARY_API inline int getIdamProperty(const char* property)
133+
{
134+
return udaGetProperty(property);
135+
}
136+
137+
LIBRARY_API inline void resetIdamProperty(const char* property)
138+
{
139+
udaResetProperty(property);
140+
}
141+
142+
LIBRARY_API inline void resetIdamProperties()
143+
{
144+
udaResetProperties();
145+
}
146+
147+
LIBRARY_API inline CLIENT_BLOCK saveIdamProperties()
148+
{
149+
return udaSaveProperties();
150+
}
151+
152+
LIBRARY_API inline void restoreIdamProperties(CLIENT_BLOCK cb)
153+
{
154+
udaRestoreProperties(cb);
155+
}
156+
157+
LIBRARY_API inline int getIdamLastHandle()
158+
{
159+
return udaGetLastHandle();
160+
}
161+
162+
LIBRARY_API inline void lockIdamThread()
163+
{
164+
udaLockThread();
165+
}
166+
167+
LIBRARY_API inline void unlockUdaThread()
168+
{
169+
udaUnlockThread();
170+
}
171+
172+
LIBRARY_API inline void freeIdamThread()
173+
{
174+
udaFreeThread();
175+
}
49176

50177
#endif
51178

@@ -55,4 +182,4 @@ extern "C" {
55182
#endif
56183

57184

58-
#endif // LEGACY_ACCAPI_H
185+
#endif // UDA_LEGACY_ACCAPI_H

0 commit comments

Comments
 (0)