12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /*##############################################################################
- HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ############################################################################## */
- #ifndef ECL_CLIENT_API
- #define ECL_CLIENT_API __declspec(dllimport)
- #endif
- SCMenum InstantEclState
- {
- ECL_OK,
- ECL_CONNECTION_ERROR,
- ECL_NORMAL_ERROR
- };
- // IClientInstantEclResp is used to access the result set of the query
- //
- SCMInterface IClientInstantEclResp(IInterface)
- {
- virtual unsigned long getRequestId() = 0;
- virtual unsigned long getClientValue() = 0;
-
- virtual InstantEclState getState() = 0;
- virtual const char *getResultsXML() = 0;
- };
- // IClientInstantEclRequest is used to set up a simple ECL query
- //
- SCMInterface IClientInstantEclRequest(IInterface)
- {
- virtual void setUser(const char* user) = 0;
- virtual void setUserToken(const char* user, const char* password) = 0;
- virtual void setEclServer(const char* eclserver) = 0;
- virtual void setCluster(const char* cluster) = 0;
- virtual void setClientValue(unsigned long cv) = 0;
-
- virtual void setEclText(const char *text) = 0;
- };
- SCMinterface IClientInstantEclEvents(IInterface)
- {
- virtual int onComplete(IClientInstantEclResp &resp) = 0;
- virtual int onError(IClientInstantEclResp &resp) = 0;
- //virtual int onProgress(IClientInstantEclResp &resp) = 0;
- //virtual int onCancelled(IClientInstantEclResp &resp) = 0;
- };
- SCMInterface IClientInstantEcl(IInterface)
- {
- virtual void addServiceUrl(const char * url) = 0;
- virtual void removeServiceUrl(const char *url) = 0;
- virtual IClientInstantEclRequest* createRequest() = 0;
- virtual IClientInstantEclResp* runEcl(IClientInstantEclRequest* request) = 0;
- virtual void runEclAsync(IClientInstantEclRequest* request, IClientInstantEclEvents &events) = 0;
- };
- extern "C" ECL_CLIENT_API IClientInstantEcl * createInstantEclClient();
- SCMclarion
- map
- module('instant ecl client')
- createInstantEclClient procedure, *cppClientInstantEcl, pascal, raw, name('_createInstantEclClient@0')
- end
- end
- SCMend
|