binding - How to bind NSObject<EAAccessoryDelegate, NSStreamDelegate> in Monotouch? -


i trying bind library , have following definitions on .h files

@interface fbfaccessorycontroller : nsobject <eaaccessorydelegate, nsstreamdelegate> {      id <fbfmobileonedelegate> _delegate;      bool    scannerstarted; }  @property (nonatomic, assign) id <fbfmobileonedelegate> delegate;  @property (readonly, nonatomic) bool version1b;  - (bool)mobileoneconnected;  @property (readonly, nonatomic) nsnumber *voltindex;  @property (readonly, nonatomic) bool scannerstarted;  - (void)startscanner;  - (void)stopscanner;  - (void)checkbattery;  @end 

for delegate

@class fbfaccessorycontroller;  @protocol fbfmobileonedelegate <nsobject>  @required  - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didchangeconnectionstatus:(bool)connected;  - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didreceivedata:(nsdata *)data;  @optional  - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didreceiveerror:(nserror *)error;  - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didreceivescannerstartstop:(bool)started;  - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didreceivedataspin:(bool)started;  @end 

i use objectivesharpie generate bind when try compile getting following error:

type monotouch.externalaccessory.eaaccessorydelegate' in interface list not interface typemonotouch.foundation.nsstreamdelegate' in interface list not interface

and code generated objectivesharpie is:

public partial interface fbfaccessorycontroller : eaaccessorydelegate, nsstreamdelegate {           [export ("delegate", argumentsemantic.assign)]         fbfmobileonedelegate delegate { get; set; }          [static, export ("sharedcontroller")]         fbfaccessorycontroller sharedcontroller { get; }          [export ("version1b")]         bool version1b { get; }          [export ("mobileoneconnected")]         bool mobileoneconnected { get; }          [export ("voltindex")]         nsnumber voltindex { get; }          [export ("scannerstarted")]         bool scannerstarted { get; }          [export ("startscanner")]         void startscanner ();          [export ("stopscanner")]         void stopscanner ();          [export ("checkbattery")]         void checkbattery ();     } 

the protocols should decorated [model] attribute, can implement them if interfaces.

so, without using objectivesharpie, should this:

[basetype (typeof(nsobject))] interface fbfaccessorycontroller : eaaccessorydelegate, nsstreamdelegate {      [export ("delegate", argumentsemantic.assign)]     fbfmobileonedelegate delegate { get; set; }      // ... // } 

provided delegates defined this:

[model] //look, no basetype interface eaaccessorydelegate {     // [export] need here }  [model] interface nsstreamdelegate {     // [export] need here } 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -