FME Server C++ API 3.0
|
00001 #ifndef _IFMESERVERSESSION_H_ 00002 #define _IFMESERVERSESSION_H_ 00003 00062 #include <fmeservertypes.h> 00063 #include <ifmeservervector.h> 00064 00065 class IFMEServerSession; 00066 class IFMEServerConnectionInfo; 00067 class IFMEServerBaseTransformationManager; 00068 class IFMEServerTransformationManager; 00069 class IFMEServerString; 00070 class IFMEServerStringArray; 00071 class IFMEServerTransformationRequest; 00072 class IFMEServerTransformationResult; 00073 class IFMEServerRepositoryManager; 00074 class IFMEServerService; 00075 class IFMEServerWorkspace; 00076 class IFMEServerWorkspaceSummary; 00077 class IFMEServerWorkspaceService; 00078 class IFMEServerStatus; 00079 class IFMEServerRepository; 00080 class IFMEServerCustomFormat; 00081 class IFMEServerCustomTransformer; 00082 class IFMEServerResource; 00083 class IFMEServerPropertyAccessor; 00084 class IFMEServerLogFileInfo; 00085 class IFMEServerTemplate; 00086 class IFMEServerIdentity; 00087 class IFMEServerSecurityManager; 00088 class IFMEServerMountPointManager; 00089 00090 // Now we define the exports. 00091 #ifdef _WIN32 00092 00093 #ifdef FMESERVERAPI_DLL 00094 #define FMESERVER_API __declspec(dllexport) 00095 #else 00096 #define FMESERVER_API __declspec(dllimport) 00097 #endif 00098 00099 #else 00100 00101 #define FMESERVER_API 00102 00103 #endif 00104 00105 00106 //---------------------------------------------------------------------- 00107 // Make these entry points "extern C" so that they could easily be 00108 // dynamically loaded 00109 00110 extern "C" { 00111 00112 //---------------------------------------------------------------------- 00113 // This functions returns a pointer to an FME Server session object. 00114 // The caller can then access all the member functions provided by 00115 // the IFMEServerSession class to interact with the FME Server. The 00116 // returned IFMESession object should only be freed by calling 00117 // the FME_destroyServerSession method. These entry points are NOT to be 00118 // mixed or confused with with the FME C-API entry points 00119 // "FME_SessionCreate" and "FME_SessionDestroy". 00120 00121 FMESERVER_API void FME_createServerSession(IFMEServerSession*& fmeServerSession); 00122 00123 //---------------------------------------------------------------------- 00124 // This function is used to destroy an FME session created by the 00125 // FME_createSessionObject call. 00126 00127 FMESERVER_API void FME_destroyServerSession(IFMEServerSession*& fmeServerSession); 00128 00129 } 00130 00131 00132 00133 //=========================================================================== 00134 // Abstract Interface Class -- all methods are virtual and it has no data 00135 class IFMEServerSession 00136 { 00137 00138 public: 00139 00140 // ----------------------------------------------------------------------- 00146 virtual IFMEServerStatus* init(const IFMEServerConnectionInfo& connectionInfo, 00147 const IFMEServerStringArray* directives) = 0; 00148 00149 // ----------------------------------------------------------------------- 00159 virtual IFMEServerConnectionInfo* createServerConnectionInfo(const IFMEServerString& host, 00160 FME_UInt16 port, 00161 const IFMEServerString& userID, 00162 const IFMEServerString& password) = 0; 00163 00164 // ----------------------------------------------------------------------- 00177 virtual IFMEServerConnectionInfo* createServerConnectionInfo(const IFMEServerString& host, 00178 FME_UInt16 port, 00179 const IFMEServerStringArray& directives) = 0; 00180 00181 // ----------------------------------------------------------------------- 00183 virtual void destroyServerConnectionInfo(IFMEServerConnectionInfo*& pServerConnectionInfo) = 0; 00184 00185 // ----------------------------------------------------------------------- 00190 virtual IFMEServerStatus* disconnect() = 0; 00191 00192 // ----------------------------------------------------------------------- 00196 virtual IFMEServerTransformationManager* getTransformationManager() = 0; 00197 00198 // ----------------------------------------------------------------------- 00202 virtual IFMEServerRepositoryManager* getRepositoryManager() = 0; 00203 00204 // ----------------------------------------------------------------------- 00207 virtual IFMEServerString* createServerString() = 0; 00208 00209 // ----------------------------------------------------------------------- 00211 virtual void destroyServerString(IFMEServerString*& serverString) = 0; 00212 00213 // ----------------------------------------------------------------------- 00216 virtual IFMEServerStringArray* createServerStringArray() = 0; 00217 00218 // ----------------------------------------------------------------------- 00220 virtual void destroyServerStringArray(IFMEServerStringArray*& serverStringArray) = 0; 00221 00222 // ----------------------------------------------------------------------- 00237 virtual IFMEServerTransformationRequest* createTransformationRequest(const IFMEServerString& subsectionName, 00238 const IFMEServerString& path) = 0; 00239 00240 // ----------------------------------------------------------------------- 00256 virtual IFMEServerTransformationRequest* createTransformationRequest(const IFMEServerString& subsectionName, 00257 const IFMEServerString& repositoryName, 00258 const IFMEServerString& workspaceName) = 0; 00259 00260 // ----------------------------------------------------------------------- 00273 // 00274 // \return a new IFMEServerTransformationRequest instance */ 00275 virtual IFMEServerTransformationRequest* createTransformationRequest(const IFMEServerString& subsectionName, 00276 const IFMEServerString& repositoryName, 00277 const IFMEServerWorkspace& workspace) = 0; 00278 00279 // ----------------------------------------------------------------------- 00281 virtual void destroyTransformationRequest(IFMEServerTransformationRequest*& transformationRequest) = 0; 00282 00283 // ----------------------------------------------------------------------- 00286 virtual IFMEServerTransformationResult* createTransformationResult() = 0; 00287 00288 // ----------------------------------------------------------------------- 00294 virtual IFMEServerTransformationResult* createTransformationResult(const IFMEServerString& fmeServerResponse) = 0; 00295 00296 // ----------------------------------------------------------------------- 00298 virtual void destroyTransformationResult(IFMEServerTransformationResult*& transformationResult) = 0; 00299 00300 // ----------------------------------------------------------------------- 00304 virtual IFMEServerService* createService() = 0; 00305 00306 // ----------------------------------------------------------------------- 00315 virtual IFMEServerService* createService(const IFMEServerString& name, 00316 const IFMEServerString& displayName, 00317 const IFMEServerString& description, 00318 const IFMEServerString& urlPattern) = 0; 00319 00320 // ----------------------------------------------------------------------- 00322 virtual void destroyService(IFMEServerService*& service) = 0; 00323 00324 // ----------------------------------------------------------------------- 00327 virtual IFMEServerServiceVector* createServiceVector() = 0; 00328 00329 // ----------------------------------------------------------------------- 00331 virtual void destroyServiceVector(IFMEServerServiceVector*& serviceVector) = 0; 00332 00333 // ----------------------------------------------------------------------- 00336 virtual IFMEServerWorkspace* createWorkspace() = 0; 00337 00338 // ----------------------------------------------------------------------- 00340 virtual void destroyWorkspace(IFMEServerWorkspace*& workspace) = 0; 00341 00342 // ----------------------------------------------------------------------- 00345 virtual IFMEServerWorkspaceVector* createWorkspaceVector() = 0; 00346 00347 // ----------------------------------------------------------------------- 00349 virtual void destroyWorkspaceVector(IFMEServerWorkspaceVector*& workspaceVector) = 0; 00350 00351 // ----------------------------------------------------------------------- 00354 virtual IFMEServerRepository* createRepository() = 0; 00355 00356 // ----------------------------------------------------------------------- 00358 virtual void destroyRepository(IFMEServerRepository*& repository) = 0; 00359 00360 // ----------------------------------------------------------------------- 00363 virtual IFMEServerRepositoryVector* createRepositoryVector() = 0; 00364 00365 // ----------------------------------------------------------------------- 00367 virtual void destroyRepositoryVector(IFMEServerRepositoryVector*& repositoryVector) = 0; 00368 00369 // ----------------------------------------------------------------------- 00372 virtual IFMEServerWorkspaceSummary* createWorkspaceSummary() = 0; 00373 00374 // ----------------------------------------------------------------------- 00376 virtual void destroyWorkspaceSummary(IFMEServerWorkspaceSummary*& workspaceSummary) = 0; 00377 00378 // ----------------------------------------------------------------------- 00381 virtual IFMEServerWorkspaceSummaryVector* createWorkspaceSummaryVector() = 0; 00382 00383 // ----------------------------------------------------------------------- 00385 virtual void destroyWorkspaceSummaryVector(IFMEServerWorkspaceSummaryVector*& workspaceSummaryVector) = 0; 00386 00387 // ----------------------------------------------------------------------- 00390 virtual IFMEServerWorkspaceService* createWorkspaceService() = 0; 00391 00392 // ----------------------------------------------------------------------- 00394 virtual void destroyWorkspaceService(IFMEServerWorkspaceService*& workspaceService) = 0; 00395 00396 // ----------------------------------------------------------------------- 00399 virtual IFMEServerWorkspaceServiceVector* createWorkspaceServiceVector() = 0; 00400 00401 // ----------------------------------------------------------------------- 00403 virtual void destroyWorkspaceServiceVector(IFMEServerWorkspaceServiceVector*& workspaceServiceVector) = 0; 00404 00405 // ----------------------------------------------------------------------- 00407 virtual void destroyServerStatus(IFMEServerStatus*& serverStatus) = 0; 00408 00409 // ----------------------------------------------------------------------- 00412 virtual IFMEServerCustomFormat* createCustomFormat() = 0; 00413 00414 // ----------------------------------------------------------------------- 00416 virtual void destroyCustomFormat(IFMEServerCustomFormat*& customFormat) = 0; 00417 00418 // ----------------------------------------------------------------------- 00421 virtual IFMEServerCustomFormatVector* createCustomFormatVector() = 0; 00422 00423 // ----------------------------------------------------------------------- 00425 virtual void destroyCustomFormatVector(IFMEServerCustomFormatVector*& customFormatVector) = 0; 00426 00427 // ----------------------------------------------------------------------- 00430 virtual IFMEServerCustomTransformer* createCustomTransformer() = 0; 00431 00432 // ----------------------------------------------------------------------- 00434 virtual void destroyCustomTransformer(IFMEServerCustomTransformer*& customTransformer) = 0; 00435 00436 // ----------------------------------------------------------------------- 00439 virtual IFMEServerCustomTransformerVector* createCustomTransformerVector() = 0; 00440 00441 // ----------------------------------------------------------------------- 00443 virtual void destroyCustomTransformerVector(IFMEServerCustomTransformerVector*& customTransformerVector) = 0; 00444 00445 // ----------------------------------------------------------------------- 00448 virtual IFMEServerResource* createResource() = 0; 00449 00450 // ----------------------------------------------------------------------- 00452 virtual void destroyResource(IFMEServerResource*& resource) = 0; 00453 00454 // ----------------------------------------------------------------------- 00457 virtual IFMEServerResourceVector* createResourceVector() = 0; 00458 00459 // ----------------------------------------------------------------------- 00461 virtual void destroyResourceVector(IFMEServerResourceVector*& resourceVector) = 0; 00462 00463 // ----------------------------------------------------------------------- 00466 virtual IFMEServerPropertyAccessor* createPropertyAccessor() = 0; 00467 00468 // ----------------------------------------------------------------------- 00470 virtual void destroyPropertyAccessor(IFMEServerPropertyAccessor*& propertyAccessor) = 0; 00471 00472 // ----------------------------------------------------------------------- 00481 virtual IFMEServerConnectionInfo* createServerConnectionInfo(const IFMEServerString& url, 00482 const IFMEServerString& userID, 00483 const IFMEServerString& password) = 0; 00484 00485 // ----------------------------------------------------------------------- 00497 virtual IFMEServerConnectionInfo* createServerConnectionInfo(const IFMEServerString& url, 00498 const IFMEServerStringArray& directives) = 0; 00499 00500 // ----------------------------------------------------------------------- 00503 virtual IFMEServerPropertyVector* createPropertyVector() = 0; 00504 00505 // ----------------------------------------------------------------------- 00507 virtual void destroyPropertyVector(IFMEServerPropertyVector*& propertyVector) = 0; 00508 00509 // ----------------------------------------------------------------------- 00512 virtual IFMEServerLogFileInfo* createLogFileInfo() = 0; 00513 00514 // ----------------------------------------------------------------------- 00516 virtual void destroyLogFileInfo(IFMEServerLogFileInfo*& logFileInfo) = 0; 00517 00518 // ----------------------------------------------------------------------- 00538 virtual IFMEServerStatus* getProperty(const IFMEServerString& propName, 00539 IFMEServerString& propValue) = 0; 00540 00541 // ----------------------------------------------------------------------- 00544 virtual IFMEServerTemplate* createTemplate() = 0; 00545 00546 // ----------------------------------------------------------------------- 00548 virtual void destroyTemplate(IFMEServerTemplate*& serverTemplate) = 0; 00549 00550 // ----------------------------------------------------------------------- 00553 virtual IFMEServerTemplateVector* createTemplateVector() = 0; 00554 00555 // ----------------------------------------------------------------------- 00557 virtual void destroyTemplateVector(IFMEServerTemplateVector*& templateVector) = 0; 00558 00559 // ----------------------------------------------------------------------- 00562 virtual IFMEServerItemVector* createItemVector() = 0 ; 00563 00564 // ----------------------------------------------------------------------- 00566 virtual void destroyItemVector( IFMEServerItemVector*& itemVector ) = 0 ; 00567 00568 // ----------------------------------------------------------------------- 00577 virtual IFMEServerIdentity* getIdentity() = 0; 00578 00579 // ----------------------------------------------------------------------- 00583 virtual IFMEServerSecurityManager* getSecurityManager() = 0; 00584 00585 // ----------------------------------------------------------------------- 00593 virtual IFMEServerMountPointManager* getMountPointManager() = 0; 00594 00595 // ----------------------------------------------------------------------- 00602 virtual IFMEServerMountPoint* createMountPoint() = 0; 00603 00604 // ----------------------------------------------------------------------- 00610 virtual void destroyMountPoint(IFMEServerMountPoint*& mountPoint) = 0; 00611 00612 // ----------------------------------------------------------------------- 00619 virtual IFMEServerMountPointVector* createMountPointVector() = 0; 00620 00621 // ----------------------------------------------------------------------- 00627 virtual void destroyMountPointVector(IFMEServerMountPointVector*& mountPoints) = 0; 00628 00629 // ----------------------------------------------------------------------- 00636 virtual IFMEServerFileInfo* createFileInfo() = 0; 00637 00638 // ----------------------------------------------------------------------- 00644 virtual void destroyFileInfo(IFMEServerFileInfo*& fileInfo) = 0; 00645 00646 // ----------------------------------------------------------------------- 00653 virtual IFMEServerFileInfoVector* createFileInfoVector() = 0; 00654 00655 // ----------------------------------------------------------------------- 00661 virtual void destroyFileInfoVector(IFMEServerFileInfoVector*& fileInfos) = 0; 00662 00663 protected: 00664 00665 // ----------------------------------------------------------------------- 00666 // No one should be creating an instance of this directly, so we 00667 // make the constructor protected. 00668 IFMEServerSession() {} 00669 00670 // ----------------------------------------------------------------------- 00671 // No one should be destroying an instance of this directly, so we 00672 // make the destructor protected. 00673 virtual ~IFMEServerSession() {} 00674 00675 private: 00676 00677 // ----------------------------------------------------------------------- 00678 // The copy constructor is not implemented. 00679 IFMEServerSession(const IFMEServerSession &other); 00680 00681 //--------------------------------------------------------------- 00682 // The assignment operator is not implemented. 00683 IFMEServerSession &operator=(const IFMEServerSession &other); 00684 }; 00685 00686 #endif