Sha256: 1143e0f77adcab85f0fd15926a15d092092034e2dfee1c0f96d478fc461a67b0

Contents?: true

Size: 859 Bytes

Versions: 17

Compression:

Stored size: 859 Bytes

Contents

#import "CameraFactory.h"
#import "Camera.h"
#import "CameraSingleton.h"

extern int get_camera_max_width(const char* camera_type);
extern int get_camera_max_height (const char* camera_type);



@implementation CameraFactory


-(id<ICamera>)createCameraByID:(NSString*)ID {
    Camera* obj = [[Camera alloc] init];
    [obj setProperty:@"ID" propertyValue:ID methodResult:nil];
    
    // set type
    [obj setProperty:@"cameraType" propertyValue:ID methodResult:nil];
    
    // set maxResolution
    [obj setProperty:@"maxWidth" propertyValue:[NSString stringWithFormat:@"%@", [NSNumber numberWithInt:get_camera_max_width([ID UTF8String])]] methodResult:nil];
    [obj setProperty:@"maxHeight" propertyValue:[NSString stringWithFormat:@"%@", [NSNumber numberWithInt:get_camera_max_height([ID UTF8String])]] methodResult:nil];
    
    return obj;
}

@end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rhodes-7.6.0 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-7.5.1 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-7.4.1 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-7.1.17 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-6.2.0 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-6.0.11 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.18 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.17 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.15 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.0.22 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.2 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.0.7 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.0.3 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
rhodes-5.5.0 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
tauplatform-1.0.3 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
tauplatform-1.0.2 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m
tauplatform-1.0.1 lib/commonAPI/mediacapture/ext/platform/iphone/impl/CameraFactory.m