派生自 development/c++

xuxiuxi
2019-03-08 5bf0020b189b2bc8c64737c2af4ea77c3e8f5612
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
// **********************************************************************
//
// 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.
//
// **********************************************************************
//
// Ice version 3.7.0
//
// <auto-generated>
//
// Generated from file `RtspAnalysServer.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
 
#include <RtspAnalysServer.h>
#include <IceUtil/PushDisableWarnings.h>
#include <Ice/LocalException.h>
#include <Ice/ValueFactory.h>
#include <Ice/OutgoingAsync.h>
#include <Ice/InputStream.h>
#include <Ice/OutputStream.h>
#include <IceUtil/PopDisableWarnings.h>
 
#if defined(_MSC_VER)
#   pragma warning(disable:4458) // declaration of ... hides class member
#elif defined(__clang__)
#   pragma clang diagnostic ignored "-Wshadow"
#elif defined(__GNUC__)
#   pragma GCC diagnostic ignored "-Wshadow"
#endif
 
#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 307
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 0
#       error Ice patch level mismatch!
#   endif
#endif
 
#ifdef ICE_CPP11_MAPPING // C++11 mapping
 
namespace
{
 
const ::std::string iceC_RtspAnalys_RtspAnalysServer_ids[2] =
{
    "::Ice::Object",
    "::RtspAnalys::RtspAnalysServer"
};
const ::std::string iceC_RtspAnalys_RtspAnalysServer_ops[] =
{
    "ice_id",
    "ice_ids",
    "ice_isA",
    "ice_ping",
    "recordVideo"
};
const ::std::string iceC_RtspAnalys_RtspAnalysServer_recordVideo_name = "recordVideo";
 
}
 
bool
RtspAnalys::RtspAnalysServer::ice_isA(::std::string s, const ::Ice::Current&) const
{
    return ::std::binary_search(iceC_RtspAnalys_RtspAnalysServer_ids, iceC_RtspAnalys_RtspAnalysServer_ids + 2, s);
}
 
::std::vector<::std::string>
RtspAnalys::RtspAnalysServer::ice_ids(const ::Ice::Current&) const
{
    return ::std::vector<::std::string>(&iceC_RtspAnalys_RtspAnalysServer_ids[0], &iceC_RtspAnalys_RtspAnalysServer_ids[2]);
}
 
::std::string
RtspAnalys::RtspAnalysServer::ice_id(const ::Ice::Current&) const
{
    return ice_staticId();
}
 
const ::std::string&
RtspAnalys::RtspAnalysServer::ice_staticId()
{
    static const ::std::string typeId = "::RtspAnalys::RtspAnalysServer";
    return typeId;
}
 
bool
RtspAnalys::RtspAnalysServer::_iceD_recordVideo(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
    _iceCheckMode(::Ice::OperationMode::Normal, current.mode);
    auto istr = inS.startReadParams();
    ::std::string iceP_name;
    istr->readAll(iceP_name);
    inS.endReadParams();
    ::std::string ret = this->recordVideo(::std::move(iceP_name), current);
    auto ostr = inS.startWriteParams();
    ostr->writeAll(ret);
    inS.endWriteParams();
    return true;
}
 
bool
RtspAnalys::RtspAnalysServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
    ::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_RtspAnalys_RtspAnalysServer_ops, iceC_RtspAnalys_RtspAnalysServer_ops + 5, current.operation);
    if(r.first == r.second)
    {
        throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
    }
 
    switch(r.first - iceC_RtspAnalys_RtspAnalysServer_ops)
    {
        case 0:
        {
            return _iceD_ice_id(in, current);
        }
        case 1:
        {
            return _iceD_ice_ids(in, current);
        }
        case 2:
        {
            return _iceD_ice_isA(in, current);
        }
        case 3:
        {
            return _iceD_ice_ping(in, current);
        }
        case 4:
        {
            return _iceD_recordVideo(in, current);
        }
        default:
        {
            assert(false);
            throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
        }
    }
}
 
void
RtspAnalys::RtspAnalysServerPrx::_iceI_recordVideo(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>& outAsync, const ::std::string& iceP_name, const ::Ice::Context& context)
{
    _checkTwowayOnly(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name);
    outAsync->invoke(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
        [&](::Ice::OutputStream* ostr)
        {
            ostr->writeAll(iceP_name);
        },
        nullptr);
}
 
::std::shared_ptr<::Ice::ObjectPrx>
RtspAnalys::RtspAnalysServerPrx::_newInstance() const
{
    return ::IceInternal::createProxy<RtspAnalysServerPrx>();
}
 
const ::std::string&
RtspAnalys::RtspAnalysServerPrx::ice_staticId()
{
    return RtspAnalys::RtspAnalysServer::ice_staticId();
}
 
#else // C++98 mapping
 
namespace
{
 
const ::std::string iceC_RtspAnalys_RtspAnalysServer_recordVideo_name = "recordVideo";
 
}
::IceProxy::Ice::Object* ::IceProxy::RtspAnalys::upCast(::IceProxy::RtspAnalys::RtspAnalysServer* p) { return p; }
 
void
::IceProxy::RtspAnalys::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::RtspAnalys::RtspAnalysServer>& v)
{
    ::Ice::ObjectPrx proxy;
    istr->read(proxy);
    if(!proxy)
    {
        v = 0;
    }
    else
    {
        v = new ::IceProxy::RtspAnalys::RtspAnalysServer;
        v->_copyFrom(proxy);
    }
}
 
::Ice::AsyncResultPtr
IceProxy::RtspAnalys::RtspAnalysServer::_iceI_begin_recordVideo(const ::std::string& iceP_name, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
    _checkTwowayOnly(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, sync);
    ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, del, cookie, sync);
    try
    {
        result->prepare(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, ::Ice::Normal, context);
        ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
        ostr->write(iceP_name);
        result->endWriteParams();
        result->invoke(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name);
    }
    catch(const ::Ice::Exception& ex)
    {
        result->abort(ex);
    }
    return result;
}
 
::std::string
IceProxy::RtspAnalys::RtspAnalysServer::end_recordVideo(const ::Ice::AsyncResultPtr& result)
{
    ::Ice::AsyncResult::_check(result, this, iceC_RtspAnalys_RtspAnalysServer_recordVideo_name);
    ::std::string ret;
    if(!result->_waitForResponse())
    {
        try
        {
            result->_throwUserException();
        }
        catch(const ::Ice::UserException& ex)
        {
            throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());
        }
    }
    ::Ice::InputStream* istr = result->_startReadParams();
    istr->read(ret);
    result->_endReadParams();
    return ret;
}
 
::IceProxy::Ice::Object*
IceProxy::RtspAnalys::RtspAnalysServer::_newInstance() const
{
    return new RtspAnalysServer;
}
 
const ::std::string&
IceProxy::RtspAnalys::RtspAnalysServer::ice_staticId()
{
    return ::RtspAnalys::RtspAnalysServer::ice_staticId();
}
 
RtspAnalys::RtspAnalysServer::~RtspAnalysServer()
{
}
 
::Ice::Object* RtspAnalys::upCast(::RtspAnalys::RtspAnalysServer* p) { return p; }
 
 
namespace
{
const ::std::string iceC_RtspAnalys_RtspAnalysServer_ids[2] =
{
    "::Ice::Object",
    "::RtspAnalys::RtspAnalysServer"
};
 
}
 
bool
RtspAnalys::RtspAnalysServer::ice_isA(const ::std::string& s, const ::Ice::Current&) const
{
    return ::std::binary_search(iceC_RtspAnalys_RtspAnalysServer_ids, iceC_RtspAnalys_RtspAnalysServer_ids + 2, s);
}
 
::std::vector< ::std::string>
RtspAnalys::RtspAnalysServer::ice_ids(const ::Ice::Current&) const
{
    return ::std::vector< ::std::string>(&iceC_RtspAnalys_RtspAnalysServer_ids[0], &iceC_RtspAnalys_RtspAnalysServer_ids[2]);
}
 
const ::std::string&
RtspAnalys::RtspAnalysServer::ice_id(const ::Ice::Current&) const
{
    return ice_staticId();
}
 
const ::std::string&
RtspAnalys::RtspAnalysServer::ice_staticId()
{
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
    static const ::std::string typeId = "::RtspAnalys::RtspAnalysServer";
    return typeId;
#else
    return iceC_RtspAnalys_RtspAnalysServer_ids[1];
#endif
}
 
bool
RtspAnalys::RtspAnalysServer::_iceD_recordVideo(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
    _iceCheckMode(::Ice::Normal, current.mode);
    ::Ice::InputStream* istr = inS.startReadParams();
    ::std::string iceP_name;
    istr->read(iceP_name);
    inS.endReadParams();
    ::std::string ret = this->recordVideo(iceP_name, current);
    ::Ice::OutputStream* ostr = inS.startWriteParams();
    ostr->write(ret);
    inS.endWriteParams();
    return true;
}
 
namespace
{
const ::std::string iceC_RtspAnalys_RtspAnalysServer_all[] =
{
    "ice_id",
    "ice_ids",
    "ice_isA",
    "ice_ping",
    "recordVideo"
};
 
}
 
bool
RtspAnalys::RtspAnalysServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
    ::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_RtspAnalys_RtspAnalysServer_all, iceC_RtspAnalys_RtspAnalysServer_all + 5, current.operation);
    if(r.first == r.second)
    {
        throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
    }
 
    switch(r.first - iceC_RtspAnalys_RtspAnalysServer_all)
    {
        case 0:
        {
            return _iceD_ice_id(in, current);
        }
        case 1:
        {
            return _iceD_ice_ids(in, current);
        }
        case 2:
        {
            return _iceD_ice_isA(in, current);
        }
        case 3:
        {
            return _iceD_ice_ping(in, current);
        }
        case 4:
        {
            return _iceD_recordVideo(in, current);
        }
        default:
        {
            assert(false);
            throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
        }
    }
}
 
void
RtspAnalys::RtspAnalysServer::_iceWriteImpl(::Ice::OutputStream* ostr) const
{
    ostr->startSlice(ice_staticId(), -1, true);
    Ice::StreamWriter< ::RtspAnalys::RtspAnalysServer, ::Ice::OutputStream>::write(ostr, *this);
    ostr->endSlice();
}
 
void
RtspAnalys::RtspAnalysServer::_iceReadImpl(::Ice::InputStream* istr)
{
    istr->startSlice();
    Ice::StreamReader< ::RtspAnalys::RtspAnalysServer, ::Ice::InputStream>::read(istr, *this);
    istr->endSlice();
}
 
void
RtspAnalys::_icePatchObjectPtr(RtspAnalysServerPtr& handle, const ::Ice::ObjectPtr& v)
{
    handle = ::RtspAnalys::RtspAnalysServerPtr::dynamicCast(v);
    if(v && !handle)
    {
        IceInternal::Ex::throwUOE(::RtspAnalys::RtspAnalysServer::ice_staticId(), v);
    }
}
 
namespace Ice
{
}
 
#endif