-
Notifications
You must be signed in to change notification settings - Fork 1
Data Input plugin
The data input part is for the end-user. If you want to pre-set datasources, you should look into the wiki about adding datasources. This extension possibility is for users who wants to add their own datasource through the GUI. At the moment there are already two plugins: Standard Text Input and a (QR) Barcode reader. Users have the choice to put datasource in the app by typing it or uses the Barcode reader. If you have more creative ideas to let the user get new datasources, you can create a plugin for the DataInput
. Use the StandardInput
class or BarcodeInput
class as an example or read below.
- Create your plugin class
- Import Mixare library
#import <Mixare/Mixare.h>
- In your
.h
file, use theDataInput
protocol.
@interface YourProcessorClass : NSObject <DataInput>
- (NSString*)getTitle;
You must return a string what your DataInput
plugin should be called.
- (void)runInput:(id<SetDataSourceDelegate>)classToSetYourData;
The object (with SetDataSourceDelegate protocol) from the parameter will be used to set your obtained input data. The obtained data should be set in a array
with two dictionaries
with the keys: title
and url
.
- (void)runInput:(id<SetDataSourceDelegate>)classToSetYourData {
//DO SOMETHING TO GET DATA
[classToSetYourData setNewData:@{@"title":obtainedTitle, @"url":obtainedUrl}];
}
Take a look in the extensions
folder of Mixare to find more examples.