/FlurryAnalytics/flurryWithLocation.cs

https://github.com/playdough/monotouch-libs · C# · 161 lines · 82 code · 38 blank · 41 comment · 0 complexity · a892df36a21370d36cf45da38642c756 MD5 · raw file

  1. //
  2. // Flurry iPhone Analytics Agent
  3. // use with libFlurryWithLocation.a
  4. //
  5. // MIT X11 licensed
  6. //
  7. // Copyright 2010 Kevin McMahon (http://twitter.com/klmcmahon)
  8. //
  9. using System;
  10. using System.Drawing;
  11. using MonoTouch.Foundation;
  12. using MonoTouch.ObjCRuntime;
  13. using MonoTouch.UIKit;
  14. using MonoTouch.CoreLocation;
  15. namespace FlurryWithLocation
  16. {
  17. [BaseType (typeof (NSObject))]
  18. interface FlurryAPI {
  19. //+ (void)setAppVersion:(NSString *)version;
  20. [Static, Export ("setAppVersion:")]
  21. void SetAppVersion (string version);
  22. //+ (NSString *)getFlurryAgentVersion;
  23. [Static, Export ("getFlurryAgentVersion")]
  24. string GetFlurryAgentVersion { get; }
  25. //+ (void)setAppCircleEnabled:(BOOL)value;
  26. [Static, Export ("setAppCircleEnabled:")]
  27. void SetAppCircleEnabled (bool value);
  28. //+ (void)setShowErrorInLogEnabled:(BOOL)value;
  29. [Static, Export ("setShowErrorInLogEnabled:")]
  30. void SetShowErrorInLogEnabled (bool value);
  31. //+ (void)unlockDebugMode:(NSString*)debugModeKey apiKey:(NSString *)apiKey;
  32. [Static, Export ("unlockDebugMode:apiKey:")]
  33. void UnlockDebugMode (string debugModeKey, string apiKey);
  34. //+ (void)setPauseSecondsBeforeStartingNewSession:(int)seconds;
  35. [Static, Export ("setPauseSecondsBeforeStartingNewSession:")]
  36. void SetPauseSecondsBeforeStartingNewSession (int seconds);
  37. //+ (void)startSession:(NSString *)apiKey;
  38. [Static, Export ("startSession:")]
  39. void StartSession (string apiKey);
  40. //+ (void)logEvent:(NSString *)eventName;
  41. [Static, Export ("logEvent:")]
  42. void LogEvent (string eventName);
  43. //+ (void)logEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters;
  44. [Static, Export ("logEvent:withParameters:")]
  45. void LogEvent (string eventName, NSDictionary parameters);
  46. //+ (void)logError:(NSString *)errorID message:(NSString *)message exception:(NSException *)exception;
  47. [Static, Export ("logError:message:exception:")]
  48. void LogError (string errorID, string message, NSException exception);
  49. //+ (void)logError:(NSString *)errorID message:(NSString *)message error:(NSError *)error;
  50. [Static, Export ("logError:message:error:")]
  51. void LogError (string errorID, string message, NSError error);
  52. //+ (void)logEvent:(NSString *)eventName timed:(BOOL)timed;
  53. [Static, Export ("logEvent:timed:")]
  54. void LogEvent (string eventName, bool timed);
  55. //+ (void)logEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters timed:(BOOL)timed;
  56. [Static, Export ("logEvent:withParameters:timed:")]
  57. void LogEvent (string eventName, NSDictionary parameters, bool timed);
  58. //+ (void)endTimedEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters;
  59. [Static, Export ("endTimedEvent:withParameters:")]
  60. void EndTimedEvent (string eventName, NSDictionary parameters);
  61. //+ (void)countPageViews:(id)target;
  62. [Static, Export ("countPageViews:")]
  63. void CountPageViews (NSObject target);
  64. //+ (void)countPageView;
  65. [Static, Export ("countPageView")]
  66. void CountPageView ();
  67. //+ (void)setUserID:(NSString *)userID;
  68. [Static, Export ("setUserID:")]
  69. void SetUserID (string userID);
  70. //+ (void)setAge:(int)age;
  71. [Static, Export ("setAge:")]
  72. void SetAge (int age);
  73. //+ (void)setSessionReportsOnCloseEnabled:(BOOL)sendSessionReportsOnClose;
  74. [Static, Export ("setSessionReportsOnCloseEnabled:")]
  75. void SetSessionReportsOnCloseEnabled (bool sendSessionReportsOnClose);
  76. //+ (void)setSessionReportsOnPauseEnabled:(BOOL)setSessionReportsOnPauseEnabled;
  77. [Static, Export ("setSessionReportsOnPauseEnabled:")]
  78. void SetSessionReportsOnPauseEnabled (bool setSessionReportsOnPauseEnabled);
  79. //+ (void)setEventLoggingEnabled:(BOOL)value;
  80. [Static, Export ("setEventLoggingEnabled:")]
  81. void SetEventLoggingEnabled (bool value);
  82. //+ (UIView *)getHook:(NSString *)hook xLoc:(int)x yLoc:(int)y view:(UIView *)view;
  83. [Static, Export ("getHook:xLoc:yLoc:view:")]
  84. UIView GetHook (string hook, int x, int y, UIView view);
  85. //+ (UIView *)getHook:(NSString *)hook xLoc:(int)x yLoc:(int)y view:(UIView *)view attachToView:(BOOL)attachToView orientation:(NSString *)orientation canvasOrientation:(NSString *)canvasOrientation autoRefresh:(BOOL)refresh canvasAnimated:(BOOL)canvasAnimated;
  86. [Static, Export ("getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:canvasAnimated:")]
  87. UIView GetHook (string hook, int x, int y, UIView view, bool attachToView, string orientation, string canvasOrientation, bool refresh, bool canvasAnimated);
  88. //+ (void)updateHook:(UIView *)banner;
  89. [Static, Export ("updateHook:")]
  90. void UpdateHook (UIView banner);
  91. //+ (void)removeHook:(UIView *)banner;
  92. [Static, Export ("removeHook:")]
  93. void RemoveHook (UIView banner);
  94. //+ (void)openCatalog:(NSString *)hook canvasOrientation:(NSString *)canvasOrientation canvasAnimated:(BOOL)canvasAnimated;
  95. [Static, Export ("openCatalog:canvasOrientation:canvasAnimated:")]
  96. void OpenCatalog (string hook, string canvasOrientation, bool canvasAnimated);
  97. //+ (void)setAppCircleDelegate:(id)delegate;
  98. [Static, Export ("setAppCircleDelegate:")]
  99. void SetAppCircleDelegate (IntPtr appCircleDelegate);
  100. //+ (CLLocationManager *)startSessionWithLocationServices:(NSString *)apiKey;
  101. [Static, Export ("startSessionWithLocationServices:")]
  102. CLLocationManager StartSessionWithLocationServices (string apiKey);
  103. //+ (void)setLocation:(CLLocation *)location;
  104. [Static, Export ("setLocation:")]
  105. void SetLocation (CLLocation location);
  106. }
  107. [Model]
  108. [BaseType (typeof (NSObject))]
  109. interface FlurryAdDelegate {
  110. //@optional- (void)dataAvailable;
  111. [Abstract, Export ("dataAvailable")]
  112. void DataAvailable ();
  113. //- (void)dataUnavailable;
  114. [Abstract, Export ("dataUnavailable")]
  115. void DataUnavailable ();
  116. //- (void)canvasWillDisplay:(NSString *)hook;
  117. [Abstract, Export ("canvasWillDisplay:")]
  118. void CanvasWillDisplay (string hook);
  119. //- (void)canvasWillClose;
  120. [Abstract, Export ("canvasWillClose")]
  121. void CanvasWillClose ();
  122. }
  123. }