@@ -100,7 +100,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
100100 // ------------------------------------------------------------------------------
101101 // Start with ignorance about which plugin to use
102102
103- request->request = REQUEST_READ_UNKNOWN ;
103+ request->request = ( int )Request::ReadUnknown ;
104104
105105 // ------------------------------------------------------------------------------
106106 // Check there is something to work with!
@@ -142,7 +142,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
142142 bool is_proxy = config.get (" server.is_proxy" ).as_or_default (false );
143143
144144 if (is_proxy) {
145- request->request = REQUEST_READ_IDAM ;
145+ request->request = ( int )Request::ReadUDA ;
146146 }
147147
148148 // ==============================================================================
@@ -304,7 +304,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
304304 left_trim_string (work2);
305305 trim_string (work2);
306306
307- request->request = REQUEST_READ_SERVERSIDE ;
307+ request->request = ( int )Request::ReadServerside ;
308308 extract_function_name (work, request);
309309
310310 UDA_LOG (UDA_LOG_DEBUG, " **** Server Side Function ??? ****" )
@@ -379,11 +379,11 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
379379 // configuration file. The request must be a generic lookup of how to access data remotely for the specified
380380 // device. The external server providing access to the foreign device's data will interpret the arguments
381381
382- if (request->request == REQUEST_READ_UNKNOWN ) {
382+ if (request->request == ( int )Request::ReadUnknown ) {
383383 UDA_LOG (UDA_LOG_DEBUG, " No plugin was identified for the format: {}" , work2)
384384 is_foreign = true ;
385385 strcpy (request->device_name , work2); // Copy the DEVICE prefix
386- request->request = REQUEST_READ_GENERIC ; // The database will identify the target
386+ request->request = ( int )Request::ReadGeneric ; // The database will identify the target
387387
388388 break ;
389389 }
@@ -499,7 +499,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
499499 // server) the Plugin Name is synonymous with the Archive Name and takes priority (The archive name is discarded as
500500 // unimportant)
501501
502- if (request->request == REQUEST_READ_IDAM ) {
502+ if (request->request == ( int )Request::ReadUDA ) {
503503 reduce_signal = false ;
504504 err = extract_archive (config, request, reduce_signal);
505505 } else {
@@ -566,7 +566,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
566566 if (!is_function) { // Must be a default server-side function
567567 for (const auto & plugin : pluginList) {
568568 if (plugin.entry_func_name == " ServerSide" && plugin.library_name .empty ()) {
569- request->request = REQUEST_READ_SERVERSIDE ; // Found
569+ request->request = ( int )Request::ReadServerside ; // Found
570570 copy_string (plugin.name , request->format , STRING_LENGTH);
571571 is_function = true ;
572572 break ;
@@ -581,7 +581,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
581581
582582 } else {
583583 // Select the Generic plugin: No source => no format or protocol or library was specified.
584- request->request = REQUEST_READ_GENERIC ;
584+ request->request = ( int )Request::ReadGeneric ;
585585 UDA_LOG (UDA_LOG_DEBUG, " C request: {}" , request->request )
586586 }
587587
@@ -595,7 +595,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
595595 if (id >= 0
596596 && pluginList[id].type == UDA_PLUGIN_CLASS_FUNCTION
597597 && pluginList[id].entry_func_name != " serverside" ) {
598- if (request->request == REQUEST_READ_GENERIC || request->request == REQUEST_READ_UNKNOWN ) {
598+ if (request->request == ( int )Request::ReadGeneric || request->request == ( int )Request::ReadUnknown ) {
599599 request->request = id; // Found
600600 copy_string (pluginList[id].name , request->format , STRING_LENGTH);
601601 UDA_LOG (UDA_LOG_DEBUG, " D request: {}" , request->request );
@@ -622,7 +622,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
622622 // MDS+::server
623623 // MDS+::
624624
625- if (request->request == REQUEST_READ_MDS && !is_proxy) {
625+ if (request->request == ( int )Request::ReadMDS && !is_proxy) {
626626
627627 reverse_string (test + ldelim, work); // Drop the delimiters and Reverse the Source String
628628
@@ -668,7 +668,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
668668 // ---------------------------------------------------------------------------------------------------------------------
669669 // UDA and WEB Servers ... parse source modelled as: server:port/source
670670
671- if (request->request == REQUEST_READ_IDAM || request->request == REQUEST_READ_WEB ) {
671+ if (request->request == ( int )Request::ReadUDA || request->request == ( int )Request::ReadWeb ) {
672672 strcpy (work, test + ldelim); // Drop the delimiters
673673
674674 // Isolate the Server from the source UDA::server:port/source or SSL://server:port/source
@@ -699,7 +699,7 @@ int uda::client_server::make_request_data(const config::Config& config, RequestD
699699 // ---------------------------------------------------------------------------------------------------------------------
700700 // SQL Servers ...
701701
702- if (request->request == REQUEST_READ_SQL ) {
702+ if (request->request == ( int )Request::ReadSQL ) {
703703 strcpy (request->server , request->path );
704704 if ((test = strchr (request->server , ' /' )) != nullptr ) {
705705 test[0 ] = ' \0 ' ;
@@ -779,7 +779,7 @@ int source_file_format_test(const uda::config::Config& config, const char* sourc
779779
780780 request->format [0 ] = ' \0 ' ;
781781 request->file [0 ] = ' \0 ' ;
782- request->request = REQUEST_READ_UNKNOWN ;
782+ request->request = ( int )Request::ReadUnknown ;
783783
784784 if (source[0 ] == ' \0 ' ) {
785785 return rc;
@@ -983,7 +983,7 @@ int source_file_format_test(const uda::config::Config& config, const char* sourc
983983 auto format = config.get (" server.default_format" ).as_or_default (" " s);
984984 if (source[0 ] == ' /' && source[1 ] != ' \0 ' && isdigit (source[1 ])) { // Default File Format?
985985 if (generic_request_test (&source[1 ], request)) { // Matches 99999/999
986- request->request = REQUEST_READ_UNKNOWN ;
986+ request->request = ( int )Request::ReadUnknown ;
987987 strcpy (request->format , format.c_str ()); // the default Server File Format
988988 break ;
989989 }
@@ -1035,7 +1035,7 @@ int generic_request_test(const char* source, RequestData* request)
10351035
10361036 request->format [0 ] = ' \0 ' ;
10371037 request->file [0 ] = ' \0 ' ;
1038- request->request = REQUEST_READ_UNKNOWN ;
1038+ request->request = ( int )Request::ReadUnknown ;
10391039
10401040 if (source[0 ] == ' \0 ' ) {
10411041 return rc;
@@ -1052,7 +1052,7 @@ int generic_request_test(const char* source, RequestData* request)
10521052
10531053 if (is_number ((char *)source)) { // Is the source an integer number?
10541054 rc = 1 ;
1055- request->request = REQUEST_READ_GENERIC ;
1055+ request->request = ( int )Request::ReadGeneric ;
10561056 strcpy (request->path , " " ); // Clean the path
10571057 request->exp_number = (int )strtol (source, nullptr , 10 ); // Plasma Shot Number
10581058 UDA_LOG (UDA_LOG_DEBUG, " exp number identified, selecting GENERIC plugin." );
@@ -1061,7 +1061,7 @@ int generic_request_test(const char* source, RequestData* request)
10611061 if ((token = strtok (work, " /" )) != nullptr ) { // Tokenise the remaining string
10621062 if (is_number (token)) { // Is the First token an integer number?
10631063 rc = 1 ;
1064- request->request = REQUEST_READ_GENERIC ;
1064+ request->request = ( int )Request::ReadGeneric ;
10651065 strcpy (request->path , " " ); // Clean the path
10661066 request->exp_number = (int )strtol (token, nullptr , 10 );
10671067 if ((token = strtok (nullptr , " /" )) != nullptr ) { // Next Token
0 commit comments