-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from smartdevicelink/feature/SDL_0075_OEM_spe…
…cific_HID_support Implement SDL 0075 OEM Specific Human Interface Device
- Loading branch information
Showing
28 changed files
with
755 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// SDLHapticRect.h | ||
// SmartDeviceLink-iOS | ||
// | ||
// Created by Nicole on 8/2/17. | ||
// Copyright © 2017 smartdevicelink. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import "SDLRPCStruct.h" | ||
|
||
@class SDLRectangle; | ||
|
||
/** | ||
* Defines spatial for each user control object for video streaming application | ||
*/ | ||
@interface SDLHapticRect : SDLRPCStruct | ||
|
||
/** | ||
* @abstract Constructs a newly allocated SDLHapticRect object | ||
*/ | ||
- (instancetype)init; | ||
|
||
/** | ||
* @abstract Constructs a newly allocated SDLHapticRect object indicated by the dictionary parameter | ||
* @param dict The dictionary to use | ||
*/ | ||
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; | ||
|
||
/** | ||
Create a SpatialStruct | ||
@param id The id of the rectangle | ||
@param rect The SDLRectangle to use as the bounding rectangle | ||
@return An new SDLHapticRect object | ||
*/ | ||
- (instancetype)initWithId:(NSNumber *)id rect:(SDLRectangle *)rect; | ||
|
||
/** | ||
* A user control spatial identifier | ||
* Required, Integer, 0 - 2,000,000,000 | ||
*/ | ||
@property (strong, nonatomic) NSNumber *id; | ||
|
||
/** | ||
The position of the haptic rectangle to be highlighted. The center of this rectangle will be "touched" when a press occurs. | ||
Required | ||
*/ | ||
@property (strong, nonatomic) SDLRectangle *rect; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// SDLHapticRect.m | ||
// SmartDeviceLink-iOS | ||
// | ||
// Created by Nicole on 8/2/17. | ||
// Copyright © 2017 smartdevicelink. All rights reserved. | ||
// | ||
|
||
#import "SDLHapticRect.h" | ||
|
||
#import "SDLNames.h" | ||
#import "SDLRectangle.h" | ||
|
||
@implementation SDLHapticRect | ||
|
||
- (instancetype)init { | ||
if (self = [super init]) { | ||
} | ||
return self; | ||
} | ||
|
||
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict { | ||
if (self = [super initWithDictionary:dict]) { | ||
} | ||
return self; | ||
} | ||
|
||
- (instancetype)initWithId:(NSNumber *)id rect:(SDLRectangle *)rect { | ||
self = [self init]; | ||
if (!self) { | ||
return nil; | ||
} | ||
|
||
self.id = id; | ||
self.rect = rect; | ||
|
||
return self; | ||
} | ||
|
||
- (void)setId:(NSNumber *)id { | ||
if (id != nil) { | ||
[store setObject:id forKey:NAMES_id]; | ||
} else { | ||
[store removeObjectForKey:NAMES_id]; | ||
} | ||
} | ||
|
||
- (NSNumber *)id { | ||
return [store objectForKey:NAMES_id]; | ||
} | ||
|
||
- (void)setRect:(SDLRectangle *)rect { | ||
if (rect != nil) { | ||
[store setObject:rect forKey:NAMES_rect]; | ||
} else { | ||
[store removeObjectForKey:NAMES_rect]; | ||
} | ||
} | ||
|
||
- (SDLRectangle *)rect { | ||
NSObject *obj = store[NAMES_rect]; | ||
if (obj == nil || [obj isKindOfClass:SDLRectangle.class]) { | ||
return (SDLRectangle *)obj; | ||
} else { | ||
return [[SDLRectangle alloc] initWithDictionary:(NSMutableDictionary *)obj]; | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// | ||
// SDLRectangle.h | ||
// SmartDeviceLink-iOS | ||
// | ||
// Created by Joel Fischer on 8/23/17. | ||
// Copyright © 2017 smartdevicelink. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import "SDLRPCStruct.h" | ||
|
||
@interface SDLRectangle : SDLRPCStruct | ||
|
||
/** | ||
* @abstract Constructs a newly allocated SDLRectangle object | ||
*/ | ||
- (instancetype)init; | ||
|
||
/** | ||
* @abstract Constructs a newly allocated SDLRectangle object indicated by the dictionary parameter | ||
* @param dict The dictionary to use | ||
*/ | ||
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; | ||
|
||
/** | ||
Create a Rectangle | ||
@param x The top-left x value | ||
@param y The top-left y value | ||
@param width The width | ||
@param height The height | ||
@return An new SDLRectangle object | ||
*/ | ||
- (instancetype)initWithX:(NSNumber *)x y:(NSNumber *)y width:(NSNumber *)width height:(NSNumber *)height; | ||
|
||
/** | ||
Create a Rectangle from a CGRect | ||
@param rect The rectangle to use | ||
@return An new SDLRectangle object | ||
*/ | ||
- (instancetype)initWithCGRect:(CGRect)rect; | ||
|
||
/** | ||
* The upper left X-coordinate of the rectangle | ||
* Required, Float | ||
*/ | ||
@property (strong, nonatomic) NSNumber *x; | ||
|
||
/** | ||
* The upper left Y-coordinate of the rectangle | ||
* Required, Float | ||
*/ | ||
@property (strong, nonatomic) NSNumber *y; | ||
|
||
/** | ||
* The width of the rectangle | ||
* Required, Float | ||
*/ | ||
@property (strong, nonatomic) NSNumber *width; | ||
|
||
/** | ||
* The height of the rectangle | ||
* Required, Float | ||
*/ | ||
@property (strong, nonatomic) NSNumber *height; | ||
|
||
|
||
@end |
Oops, something went wrong.