Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Added part of shark it, Added couchbase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clancey committed Apr 3, 2012
1 parent e3cc152 commit 9acbaf3
Show file tree
Hide file tree
Showing 26 changed files with 999 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ obj/
tmp/

GoogleAnalytics/binding/Google Analytics SDK/

ATMHud/sample/sample.pidb
4 changes: 4 additions & 0 deletions Couchbase/binding/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using System;
using MonoTouch.ObjCRuntime;

[assembly: LinkWith ("Couchbase", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7, ForceLoad = true,IsCxx = true)]
9 changes: 9 additions & 0 deletions Couchbase/binding/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BTOUCH=/Developer/MonoTouch/usr/bin/btouch

all: Couchbase.dll

Couchbase.dll: Makefile AssemblyInfo.cs couchbase.cs Couchbase
$(BTOUCH) couchbase.cs AssemblyInfo.cs --out=$@ --link-with=Couchbase,Couchbase

clean:
-rm -f *.a *.dll
48 changes: 48 additions & 0 deletions Couchbase/binding/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
facebook
========

These are bindings to the native Facebook SDK for iOS.

Using
=====

Copy the Facebook.dll project in the binding directory to your
project, and add it as a reference in your project.

Building
========

Run `make' in the binding directory to build Facebook.dll.

Sample
======

The sample program in sample/ is a partial port of Facebook's Sample
program, it covers about half of the features in it.

License
=======

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


Authors
=======

Miguel de Icaza
79 changes: 79 additions & 0 deletions Couchbase/binding/couchbase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
using System;
using System.Drawing;

using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.ObjCRuntime;

namespace CouchbaseBinding
{
[BaseType (typeof(NSObject))]
[Model]
interface CouchbaseDelegate
{
[Abstract]
[Export ("couchbaseMobile:didStart:"), EventArgs ("CouchBaseStarted")]
void Started (CouchbaseMobile couchbase, NSUrl serverURL);

[Abstract]
[Export ("couchbaseMobile:failedToStart:"), EventArgs ("CouchBaseError")]
void FailedToStart (CouchbaseMobile couchbase, NSError error);

}

[BaseType (typeof(NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(CouchbaseDelegate)})]
interface CouchbaseMobile
{

[Export ("serverURL")]
NSUrl ServerUrl { get; }

[Export ("error")]
NSError Error { get; }

[Export ("autoRestart")]
bool AutoRestart { get; set; }

[Export ("rootDirectory")]
string RootDirectory { get; set; }

[Export ("logDirectory")]
string LogDirectory { get; }

[Export ("databaseDirectory")]
string DatabaseDirectory { get; }

[Export ("iniFilePath")]
string IniFilePath { get; set; }

[Export ("localIniFilePath")]
string LocalIniFilePath { get; }

[Export ("startCouchbase:")]
CouchbaseMobile Start (CouchbaseDelegate theDelegate);

[Export ("init")]
NSObject Init ();

[Export ("start")]
bool Start ();

[Export ("restart")]
void Restart ();

[Export ("initWithBundlePath:")]
IntPtr Constructor (string bundlePath);

[Export ("installDefaultDatabase:")]
bool InstallDefaultDatabase (string databasePath);

[Export ("delegate"), NullAllowed]
NSObject WeakDelegate { get; set; }

[Wrap ("WeakDelegate")]
CouchbaseDelegate Delegate { get; set; }

}

}

3 changes: 3 additions & 0 deletions GoogleAnalytics/binding/list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ios/ObjCRuntime/Messaging.g.cs
ios/GoogleAnalytics/GANTracker.g.cs
ios/GoogleAnalytics/GANTrackerDelegate.g.cs
2 changes: 2 additions & 0 deletions PaypalMEC/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ASSEMBLY=PayPalMECL.dll
include ../Rules.make
3 changes: 3 additions & 0 deletions PaypalMEC/binding/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libPayPalMPL.a
PayPal.dll
*.zip
4 changes: 4 additions & 0 deletions PaypalMEC/binding/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using System;
using MonoTouch.ObjCRuntime;

[assembly: LinkWith ("libPayPalEC.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7, "-lxml2 -lz", ForceLoad = true)]
18 changes: 18 additions & 0 deletions PaypalMEC/binding/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
BTOUCH=/Developer/MonoTouch/usr/bin/btouch
UVERSION=1-0-3-070
VERSION=1.0.3

all: PayPalMECL.dll

PayPalMECL_$(UVERSION)-iPhone_DevelopersPackage.zip:
curl https://www.x.com/sites/default/files/PayPalMECL_$(UVERSION)-iPhone_DevelopersPackage.zip > $@

libPayPalEC.a: PayPalMECL_$(UVERSION)-iPhone_DevelopersPackage.zip
unzip -p $< 'PayPalMECL_$(UVERSION)-iPhone_DevelopersPackage/MECL Library/libPayPalEC.a' > $@
PayPalMECL_1-0-3-070-iPhone_DevelopersPackage.zip

PayPalMECL.dll: Makefile AssemblyInfo.cs paypal.cs enums.cs libPayPalEC.a
$(BTOUCH) --out=$@ -e paypal.cs enums.cs AssemblyInfo.cs --link-with=libPayPalEC.a,libPayPalEC.a

clean:
-rm -rf *.a *.dll
17 changes: 17 additions & 0 deletions PaypalMEC/binding/enums.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace MonoTouch.PayPal {

public enum PayPalEnvironment {
LIVE,
SANDBOX,
NONE,
}

public enum PayPalButtonType {
BUTTON_118x24,
BUTTON_152x33,
BUTTON_194x37,
BUTTON_278x43,
BUTTON_294x43,
BUTTON_TYPE_COUNT,
}
}
67 changes: 67 additions & 0 deletions PaypalMEC/binding/paypal.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* paypal.cs: API definitions
*
* Author:
* Miguel de Icaza (miguel@xamarin.com)
*
* Copyright 2011 Xamarin, Inc.
*/

using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.ObjCRuntime;

namespace MonoTouch.PayPal {


[BaseType (typeof (NSObject))]
[Model]
interface DeviceReferenceTokenDelegate {
[Abstract]
[Export ("receivedDeviceReferenceToken:")]
void ReceivedDeviceReferenceToken (string token);

[Abstract]
[Export ("couldNotFetchDeviceReferenceToken")]
void CouldNotFetchDeviceReferenceToken ();

}

[BaseType (typeof (NSObject))]
interface PayPal {
[Export ("lang")]
string Language { get; set; }

[Export ("errorMessage")]
string ErrorMessage { get; set; }

[Export ("payButtons")]
UIButton[] PayButtons { get; set; }

[Export ("appID")]
string AppID { get; }

[Export ("initialized")]
bool Initialized { get; }

[Export ("paymentsEnabled")]
bool PaymentsEnabled { get; }

[Export ("environment")]
PayPalEnvironment Environment { get; }

[Static]
[Export ("getPayPalInst")]
PayPal GetPayPalInst ();

[Export ("fetchDeviceReferenceTokenWithAppID:forEnvironment:withDelegate:")]
void FetchDeviceReferenceToken (string inAppID, PayPalEnvironment env, DeviceReferenceTokenDelegate del);

[Export ("fetchDeviceReferenceTokenWithAppID:withDelegate:")]
void FetchDeviceReferenceToken (string inAppID, DeviceReferenceTokenDelegate del);

[Export ("getPayButtonWithTarget:andAction:andButtonType:")]
UIButton GetPayButton (DeviceReferenceTokenDelegate target, Selector action, PayPalButtonType inButtonType);

}
}
121 changes: 121 additions & 0 deletions PaypalMEC/docs/MonoTouch.PayPal/DeviceReferenceTokenDelegate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<Type Name="DeviceReferenceTokenDelegate" FullName="MonoTouch.PayPal.DeviceReferenceTokenDelegate">
<TypeSignature Language="C#" Value="public abstract class DeviceReferenceTokenDelegate : MonoTouch.Foundation.NSObject" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit DeviceReferenceTokenDelegate extends MonoTouch.Foundation.NSObject" />
<AssemblyInfo>
<AssemblyName>PayPalMECL</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>MonoTouch.Foundation.NSObject</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>MonoTouch.Foundation.Model</AttributeName>
</Attribute>
<Attribute>
<AttributeName>MonoTouch.Foundation.Register("DeviceReferenceTokenDelegate", true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DeviceReferenceTokenDelegate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>MonoTouch.Foundation.Export("init")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DeviceReferenceTokenDelegate (MonoTouch.Foundation.NSObjectFlag t);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class MonoTouch.Foundation.NSObjectFlag t) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="t" Type="MonoTouch.Foundation.NSObjectFlag" />
</Parameters>
<Docs>
<param name="t">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DeviceReferenceTokenDelegate (IntPtr handle);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int handle) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="handle" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="handle">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CouldNotFetchDeviceReferenceToken">
<MemberSignature Language="C#" Value="public abstract void CouldNotFetchDeviceReferenceToken ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CouldNotFetchDeviceReferenceToken() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>MonoTouch.Foundation.Export("couldNotFetchDeviceReferenceToken")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ReceivedDeviceReferenceToken">
<MemberSignature Language="C#" Value="public abstract void ReceivedDeviceReferenceToken (string token);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ReceivedDeviceReferenceToken(string token) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>MonoTouch.Foundation.Export("receivedDeviceReferenceToken:")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="token" Type="System.String" />
</Parameters>
<Docs>
<param name="token">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
Loading

0 comments on commit 9acbaf3

Please sign in to comment.