FETPAPI 0.3.0.0
This project provides C++ classes which facilitate the developement of ETP1.2 clients and servers.
Loading...
Searching...
No Matches
EtpHelpers.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
21#include "../nsDefinitions.h"
22#include "EtpMessages.h"
23
24#if defined(_WIN32) && !defined(FETPAPI_STATIC)
25 #ifndef FETPAPI_DLL_IMPORT_OR_EXPORT
26 #if defined(Fetpapi_EXPORTS)
27 #define FETPAPI_DLL_IMPORT_OR_EXPORT __declspec(dllexport)
28 #else
29 #define FETPAPI_DLL_IMPORT_OR_EXPORT __declspec(dllimport)
30 #endif
31 #endif
32#else
33 #define FETPAPI_DLL_IMPORT_OR_EXPORT
34#endif
35
36namespace COMMON_NS
37{
38 class AbstractObject;
39}
40
41namespace ETP_NS
42{
43 class AbstractSession;
44
45 namespace EtpHelpers {
46
53 FETPAPI_DLL_IMPORT_OR_EXPORT std::string getDataObjectType(const std::string& uri);
54
61 FETPAPI_DLL_IMPORT_OR_EXPORT std::string getDataspaceUri(const std::string& uri);
62
66 FETPAPI_DLL_IMPORT_OR_EXPORT Energistics::Etp::v12::Datatypes::ErrorInfo validateUri(const std::string & uri, AbstractSession* session = nullptr);
67
71 FETPAPI_DLL_IMPORT_OR_EXPORT Energistics::Etp::v12::Datatypes::ErrorInfo validateDataObjectUri(const std::string & uri, AbstractSession* session = nullptr);
72
76 FETPAPI_DLL_IMPORT_OR_EXPORT Energistics::Etp::v12::Protocol::Core::ProtocolException buildSingleMessageProtocolException(int32_t m_code, const std::string & m_message);
77
81 FETPAPI_DLL_IMPORT_OR_EXPORT std::pair<std::string, std::string> getUuidAndVersionFromUri(const std::string & uri);
82 }
83}
Definition EtpMessages.h:1817