summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/DeprecatedStringConverter.h
blob: 141e7705dc6eae42f33cbc2fc70c9c3b2e8e99a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#ifndef ICE_DEPRECATED_STRING_CONVERTER_H
#define ICE_DEPRECATED_STRING_CONVERTER_H

#include <Ice/Config.h>
#include <Ice/CommunicatorF.h>
#include <IceUtil/StringConverter.h>
#include <Ice/Plugin.h>

namespace Ice
{

typedef IceUtil::StringConverterPtr StringConverterPtr;
typedef IceUtil::WstringConverterPtr WstringConverterPtr;

//
// A plug-in that sets the process string converter and wide string in its constructor.
// Both initialize and destroy are no-op.
// It's deprecated because if you want to install your own string converters with a
// plugin, you should simply implement your own Plugin class, derived directly from
// Ice::Plugin.
//
class ICE_API StringConverterPlugin : public Plugin
{
public:

    ICE_DEPRECATED_API("StringConverterPlugin is deprecated, use Ice::Plugin instead")
    StringConverterPlugin(const CommunicatorPtr&, 
                          const StringConverterPtr&, const WstringConverterPtr& = 0);
    
    virtual void initialize();
    
    virtual void destroy();
};

ICE_DEPRECATED_API("is deprecated, use IceUtil::nativeToUTF8(const std::string&, const StringConverterPtr&) instead") 
ICE_API std::string 
nativeToUTF8(const StringConverterPtr&, const std::string&);

ICE_DEPRECATED_API("is deprecated, use IceUtil::nativeToUTF8(const std::string&, const StringConverterPtr&) instead") 
ICE_API std::string 
nativeToUTF8(const CommunicatorPtr&, const std::string&);

ICE_DEPRECATED_API("is deprecated, use IceUtil::UTF8ToNative(const std::string&, const StringConverterPtr&) instead") 
ICE_API std::string
UTF8toNative(const StringConverterPtr&, const std::string&);

ICE_DEPRECATED_API("is deprecated, use IceUtil::UTF8ToNative(const std::string&, const StringConverterPtr&) instead") 
ICE_API std::string
UTF8ToNative(const CommunicatorPtr&, const std::string&);

}

#endif