Permalink
Browse files

Started Adding Urban Airship

Most of the common portion of urban airship is completed
  • Loading branch information...
Clancey committed Jan 18, 2012
1 parent efc9d6a commit 20a8a735838b142575412c9856f36b7afe11a7c3
View
@@ -5,5 +5,6 @@
[Bb]in
[Dd]ebug*/
obj/
+tmp/
GoogleAnalytics/binding/Google Analytics SDK/
View
@@ -1,4 +1,4 @@
using System;
using MonoTouch.ObjCRuntime;
-[assembly: LinkWith ("Parse.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7,Frameworks = "MobileCoreServices CoreGraphics SystemConfiguration AudioToolbox Security", ForceLoad = true)]
+[assembly: LinkWith ("libRscMgrUniv.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7,Frameworks = "ExternalAccessory", ForceLoad = true)]
View
@@ -1,9 +1,9 @@
BTOUCH=/Developer/MonoTouch/usr/bin/btouch
-all: Parse.dll
+all: Redpark.dll
-Parse.dll: Makefile AssemblyInfo.cs Parse.cs Parse.a
- $(BTOUCH) -unsafe Parse.cs AssemblyInfo.cs --out=$@ --link-with=Parse.a,Parse.a
+Redpark.dll: Makefile AssemblyInfo.cs RedParkSerial.cs enums.cs libRscMgrUniv.a
+ $(BTOUCH) RedParkSerial.cs AssemblyInfo.cs enums.cs --out=$@ --link-with=libRscMgrUniv.a,libRscMgrUniv.a
clean:
-rm -f *.a *.dll
View
@@ -1,9 +1,23 @@
+using System;
+using MonoTouch.Foundation;
+using System.Drawing;
+using MonoTouch.UIKit;
+using MonoTouch.ObjCRuntime;
namespace Redpark {
- [BaseType (typeof (NSObject))]
+ //[BaseType (typeof (NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof (RscMgrDelegate)})]
+ [BaseType(typeof(NSObject))]
interface RscMgr {
- [Export ("setDelegate:delegate")]
- void SetDelegatee (RscMgrDelegate theDelegate );
+
+
+ //[Export ("setDelegate:delegate"), NullAllowed]
+ //NSObject WeakDelegate {set; }
+
+ //[Wrap ("WeakDelegate")]
+ //RscMgrDelegate Delegate { get; set; }
+
+ [Export ("setDelegate:")]
+ void SetDelegate (RscMgrDelegate theDelegate );
[Export ("init")]
NSObject Init ();
@@ -24,10 +38,10 @@ interface RscMgr {
void SetStopBits (StopBitsType stopBits);
[Export ("write:Length:")]
- int Write (UInt8 data, UInt32 length);
+ int Write (short data, UInt32 length);
[Export ("read:Length:")]
- int Read (UInt8 data, UInt32 length);
+ int Read (short data, UInt32 length);
[Export ("getReadBytesAvailable")]
int GetReadBytesAvailable ();
@@ -60,7 +74,7 @@ interface RscMgr {
void GetPortStatusport (serialPortStatus portStatus);
*/
[Export ("writeRscMessage:Length:MsgData:")]
- int WriteRsc (int cmd, int len, UInt8 msgData);
+ int WriteRsc (int cmd, int len, uint msgData);
}
@@ -72,7 +86,7 @@ interface RscMgrDelegate {
void CableConnected (string protocol);
[Abstract]
- [Export ("cableDisconnected")]
+ [Export ("cableDisconnected:")]
void CableDisconnected ();
[Abstract]
View
@@ -1,3 +1,9 @@
+using System;
+using MonoTouch.Foundation;
+using System.Drawing;
+using MonoTouch.UIKit;
+using MonoTouch.ObjCRuntime;
+using System.Runtime.InteropServices;
namespace Redpark
{
public enum DataSizeType
@@ -0,0 +1,85 @@
+
+ [BaseType (typeof (NSObject))]
+ [Model]
+ interface UARegistrationObserver {
+ [Export ("registerDeviceTokenSucceeded")]
+ void RegisterDeviceTokenSucceeded ();
+
+ [Export ("registerDeviceTokenFailed:")]
+ void RegisterDeviceTokenFailed (UA_ASIHTTPRequest request);
+
+ [Export ("unRegisterDeviceTokenSucceeded")]
+ void UnRegisterDeviceTokenSucceeded ();
+
+ [Export ("unRegisterDeviceTokenFailed:")]
+ void UnRegisterDeviceTokenFailed (UA_ASIHTTPRequest request);
+
+ [Export ("addTagToDeviceSucceeded")]
+ void AddTagToDeviceSucceeded ();
+
+ [Export ("addTagToDeviceFailed:")]
+ void AddTagToDeviceFailed (UA_ASIHTTPRequest request);
+
+ [Export ("removeTagFromDeviceSucceeded")]
+ void RemoveTagFromDeviceSucceeded ();
+
+ [Export ("removeTagFromDeviceFailed:")]
+ void RemoveTagFromDeviceFailed (UA_ASIHTTPRequest request);
+
+ }
+
+ [BaseType (typeof (UAObservable))]
+ interface UAirship {
+ [Export ("deviceToken")]
+ string DeviceToken { get; set; }
+
+ [Export ("analytics")]
+ UAAnalytics Analytics { get; set; }
+
+ [Export ("server")]
+ string Server { get; set; }
+
+ [Export ("appId")]
+ string AppId { get; set; }
+
+ [Export ("appSecret")]
+ string AppSecret { get; set; }
+
+ [Export ("deviceTokenHasChanged")]
+ bool DeviceTokenHasChanged { get; set; }
+
+ [Export ("ready")]
+ bool Ready { get; set; }
+
+ [Static]
+ [Export ("setLogging:")]
+ void SetLogging (bool enabled);
+
+ [Static]
+ [Export ("takeOff:")]
+ void TakeOff (NSDictionary options);
+
+ [Static]
+ [Export ("land")]
+ void Land ();
+
+ [Static]
+ [Export ("shared")]
+ UAirship Shared ();
+
+ [Export ("registerDeviceToken:")]
+ void RegisterDeviceToken (NSData token);
+
+ [Export ("registerDeviceTokenWithExtraInfo:")]
+ void RegisterDeviceToken (NSDictionary info);
+
+ [Export ("registerDeviceToken:withAlias:")]
+ void RegisterDeviceToken (NSData token, string alias);
+
+ [Export ("registerDeviceToken:withExtraInfo:")]
+ void RegisterDeviceToken (NSData token, NSDictionary info);
+
+ [Export ("unRegisterDeviceToken")]
+ void UnRegisterDeviceToken ();
+
+ }
@@ -0,0 +1,4 @@
+using System;
+using MonoTouch.ObjCRuntime;
+
+[assembly: LinkWith ("libUAirship-1.1.3.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7, ForceLoad = true)]
View
@@ -0,0 +1,9 @@
+BTOUCH=/Developer/MonoTouch/usr/bin/btouch
+
+all: UrbanAirship.dll
+
+UrbanAirship.dll: Makefile AssemblyInfo.cs common.cs enums.cs libUAirship-1.1.3.a
+ $(BTOUCH) common.cs AssemblyInfo.cs enums.cs --out=$@ --link-with=libUAirship-1.1.3.a,libUAirship-1.1.3.a
+
+clean:
+ -rm -f *.a *.dll
Binary file not shown.
Oops, something went wrong.

0 comments on commit 20a8a73

Please sign in to comment.