Sha256: 6ba1b31433c290a08c1f0a7e114c256697be9d9e363e1fa8ecf0598a3e71835b

Contents?: true

Size: 1.93 KB

Versions: 14

Compression:

Stored size: 1.93 KB

Contents

//
//  RhoConnectObjectNotify.m
//  SyncClient
//
//  Created by evgeny vovchenko on 4/22/11.
//  Copyright 2011 RhoMobile. All rights reserved.
//  Copyright 2011-2016 Symbol Technologies. All rights reserved.
//

#import "RhoConnectObjectNotify.h"


@implementation RhoConnectObjectNotify

@synthesize  deleted_objects;
@synthesize  updated_objects;
@synthesize  created_objects;

@synthesize  deleted_source_ids;
@synthesize  updated_source_ids;
@synthesize  created_source_ids;


- (id)init:(RHO_CONNECT_OBJECT_NOTIFY *)data
{
	self = [super init];

	if (data->deleted_count)
	{
		deleted_objects = [[NSMutableArray alloc] initWithCapacity:data->deleted_count];
		deleted_source_ids = [[NSMutableArray alloc] initWithCapacity:data->deleted_count];

		for (int i = 0; i < data->deleted_count; i++)
		{
			[deleted_objects addObject:[NSString stringWithUTF8String:data->deleted_objects[i]]];
			[deleted_source_ids addObject:[NSNumber numberWithInt:data->deleted_source_ids[i]]];
		}
	}

	if (data->updated_count)
	{
		updated_objects = [[NSMutableArray alloc] initWithCapacity:data->updated_count];
		updated_source_ids = [[NSMutableArray alloc] initWithCapacity:data->updated_count];

		for (int i = 0; i < data->updated_count; i++)
		{
			[updated_objects addObject:[NSString stringWithUTF8String:data->updated_objects[i]]];
			[updated_source_ids addObject:[NSNumber numberWithInt:data->updated_source_ids[i]]];
		}
	}

	if (data->created_count)
	{
		created_objects = [[NSMutableArray alloc] initWithCapacity:data->created_count];
		created_source_ids = [[NSMutableArray alloc] initWithCapacity:data->created_count];

		for (int i = 0; i < data->created_count; i++)
		{
			[created_objects addObject:[NSString stringWithUTF8String:data->created_objects[i]]];
			[created_source_ids addObject:[NSNumber numberWithInt:data->created_source_ids[i]]];
		}
	}

	rho_connectclient_free_sync_objectnotify(data);
	return self;
}

- (void)dealloc
{
	[super dealloc];
}

@end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rhoconnect-client-7.6.0 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-7.5.1 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-7.4.1 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-7.1.17 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-6.2.0 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-6.0.11 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.18 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.17 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.15 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.0.22 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.2 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.0.7 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.0.3 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m
rhoconnect-client-5.5.0 ./rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m