summaryrefslogtreecommitdiff
path: root/objective-c/test/Ice/proxy/TestI.m
blob: b7eee6797b7424b9b3eb060364064830260e8051 (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
// **********************************************************************
//
// Copyright (c) 2003-2015 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.
//
// **********************************************************************

#import <objc/Ice.h>
#import <proxy/TestI.h>
#import <TestCommon.h>

@implementation TestProxyMyDerivedClassI
#if defined(__clang__) && !__has_feature(objc_arc)
-(void) dealloc
{
    [_ctx release];
    [super dealloc];
}
#endif

-(id<ICEObjectPrx>) echo:(id<ICEObjectPrx>)obj current:(ICECurrent*)current
{
    return obj;
}

-(void) shutdown:(ICECurrent*)c
{
    [[[c adapter] getCommunicator] shutdown];
}

-(ICEContext*) getContext:(ICECurrent*)c
{
    return ICE_AUTORELEASE(ICE_RETAIN(_ctx));
}

-(BOOL) ice_isA:(NSString*)s current:(ICECurrent*)current
{
    ICE_RELEASE(_ctx);
    _ctx = ICE_RETAIN([current ctx]);
    return [super ice_isA:s current:current];
}

@end