Skip to content

Commit b8747bd

Browse files
committed
Merge remote branch 'origin/master'
2 parents 2d2894e + 67071e9 commit b8747bd

17 files changed

+202
-65
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 10.00
3-
# Visual Studio 2008
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestFilesClient", "RestFilesClient\RestFilesClient.csproj", "{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}"
5-
EndProject
6-
Global
7-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8-
Debug|iPhoneSimulator = Debug|iPhoneSimulator
9-
Release|iPhoneSimulator = Release|iPhoneSimulator
10-
Debug|iPhone = Debug|iPhone
11-
Release|iPhone = Release|iPhone
12-
EndGlobalSection
13-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhone.ActiveCfg = Debug|iPhone
15-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhone.Build.0 = Debug|iPhone
16-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
17-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
18-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhone.ActiveCfg = Release|iPhone
19-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhone.Build.0 = Release|iPhone
20-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
21-
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
22-
EndGlobalSection
23-
GlobalSection(MonoDevelopProperties) = preSolution
24-
StartupItem = RestFilesClient\RestFilesClient.csproj
25-
EndGlobalSection
26-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestFilesClient", "RestFilesClient\RestFilesClient.csproj", "{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|iPhoneSimulator = Debug|iPhoneSimulator
9+
Release|iPhoneSimulator = Release|iPhoneSimulator
10+
Debug|iPhone = Debug|iPhone
11+
Release|iPhone = Release|iPhone
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhone.ActiveCfg = Debug|iPhone
15+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhone.Build.0 = Debug|iPhone
16+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
17+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
18+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhone.ActiveCfg = Release|iPhone
19+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhone.Build.0 = Release|iPhone
20+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
21+
{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
22+
EndGlobalSection
23+
GlobalSection(MonoDevelopProperties) = preSolution
24+
StartupItem = RestFilesClient\RestFilesClient.csproj
25+
EndGlobalSection
26+
EndGlobal

src/MonoTouch/RestFilesClient/RestFilesClient/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>MinimumOSVersion</key>
6+
<string>3.0</string>
7+
<key>NSMainNibFile</key>
8+
<string>MainWindow</string>
59
<key>UISupportedInterfaceOrientations</key>
610
<array>
711
<string>UIInterfaceOrientationPortrait</string>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System.ComponentModel;
2+
using System.Runtime.Serialization;
3+
using RestFiles.ServiceModel.Types;
4+
using ServiceStack.ServiceHost;
5+
using ServiceStack.ServiceInterface.ServiceModel;
6+
7+
namespace RestFiles.ServiceModel.Operations
8+
{
9+
[Description("GET the File or Directory info at {Path}\n"
10+
+ "POST multipart/formdata to upload a new file to any {Path} in the /ReadWrite folder\n"
11+
+ "PUT {TextContents} to replace the contents of a text file in the /ReadWrite folder\n")]
12+
[RestService("/files")]
13+
[RestService("/files/{Path*}")]
14+
[DataContract]
15+
public class Files
16+
{
17+
[DataMember]
18+
public string Path { get; set; }
19+
20+
[DataMember]
21+
public string TextContents { get; set; }
22+
23+
[DataMember]
24+
public bool ForDownload { get; set; }
25+
}
26+
27+
[DataContract]
28+
public class FilesResponse : IHasResponseStatus
29+
{
30+
[DataMember]
31+
public FolderResult Directory { get; set; }
32+
33+
[DataMember]
34+
public FileResult File { get; set; }
35+
36+
//Auto inject and serialize web service exceptions
37+
[DataMember] public ResponseStatus ResponseStatus { get; set; }
38+
}
39+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.Runtime.Serialization;
2+
using ServiceStack.ServiceHost;
3+
using ServiceStack.ServiceInterface.ServiceModel;
4+
5+
namespace RestFiles.ServiceModel.Operations
6+
{
7+
[RestService("revertfiles")]
8+
[DataContract]
9+
public class RevertFiles { }
10+
11+
[DataContract]
12+
public class RevertFilesResponse : IHasResponseStatus
13+
{
14+
public RevertFilesResponse()
15+
{
16+
this.ResponseStatus = new ResponseStatus();
17+
}
18+
19+
[DataMember]
20+
public ResponseStatus ResponseStatus { get; set; }
21+
}
22+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
4+
namespace RestFiles.ServiceModel.Types
5+
{
6+
[DataContract]
7+
public class File
8+
{
9+
[DataMember]
10+
public string Name { get; set; }
11+
12+
[DataMember]
13+
public string Extension { get; set; }
14+
15+
[DataMember]
16+
public long FileSizeBytes { get; set; }
17+
18+
[DataMember]
19+
public DateTime ModifiedDate { get; set; }
20+
21+
[DataMember]
22+
public bool IsTextFile { get; set; }
23+
}
24+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
4+
namespace RestFiles.ServiceModel.Types
5+
{
6+
[DataContract]
7+
public class FileResult
8+
{
9+
[DataMember]
10+
public string Name { get; set; }
11+
12+
[DataMember]
13+
public string Extension { get; set; }
14+
15+
[DataMember]
16+
public long FileSizeBytes { get; set; }
17+
18+
[DataMember]
19+
public DateTime ModifiedDate { get; set; }
20+
21+
[DataMember]
22+
public bool IsTextFile { get; set; }
23+
24+
[DataMember]
25+
public string Contents { get; set; }
26+
}
27+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
4+
namespace RestFiles.ServiceModel.Types
5+
{
6+
[DataContract]
7+
public class Folder
8+
{
9+
[DataMember]
10+
public string Name { get; set; }
11+
12+
[DataMember]
13+
public DateTime ModifiedDate { get; set; }
14+
15+
[DataMember]
16+
public int FileCount { get; set; }
17+
}
18+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Runtime.Serialization;
3+
4+
namespace RestFiles.ServiceModel.Types
5+
{
6+
[DataContract]
7+
public class FolderResult
8+
{
9+
public FolderResult()
10+
{
11+
Folders = new List<Folder>();
12+
Files = new List<File>();
13+
}
14+
15+
[DataMember]
16+
public List<Folder> Folders { get; set; }
17+
18+
[DataMember]
19+
public List<File> Files { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
66
<ProductVersion>9.0.21022</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
88
<ProjectGuid>{B8A976FA-7EFE-4096-ABA9-61AFC9CCD525}</ProjectGuid>
9-
<ProjectTypeGuids>{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
9+
<ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1010
<OutputType>Exe</OutputType>
1111
<RootNamespace>RestFilesClient</RootNamespace>
12-
<MainNibFile>MainWindow.xib</MainNibFile>
1312
<AssemblyName>RestFilesClient</AssemblyName>
14-
<MtouchMinimumOS>3.0</MtouchMinimumOS>
15-
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
1613
</PropertyGroup>
1714
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
1815
<DebugSymbols>true</DebugSymbols>
@@ -23,12 +20,8 @@
2320
<ErrorReport>prompt</ErrorReport>
2421
<WarningLevel>4</WarningLevel>
2522
<MtouchLink>None</MtouchLink>
26-
<MtouchDebug>True</MtouchDebug>
27-
<MtouchUseLlvm>false</MtouchUseLlvm>
23+
<MtouchDebug>true</MtouchDebug>
2824
<ConsolePause>false</ConsolePause>
29-
<MtouchUseSGen>false</MtouchUseSGen>
30-
<MtouchUseThumb>false</MtouchUseThumb>
31-
<MtouchArch>ARMv6</MtouchArch>
3225
</PropertyGroup>
3326
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
3427
<DebugType>none</DebugType>
@@ -37,12 +30,7 @@
3730
<ErrorReport>prompt</ErrorReport>
3831
<WarningLevel>4</WarningLevel>
3932
<MtouchLink>None</MtouchLink>
40-
<MtouchDebug>False</MtouchDebug>
41-
<MtouchUseSGen>false</MtouchUseSGen>
4233
<ConsolePause>false</ConsolePause>
43-
<MtouchUseLlvm>false</MtouchUseLlvm>
44-
<MtouchUseThumb>false</MtouchUseThumb>
45-
<MtouchArch>ARMv6</MtouchArch>
4634
</PropertyGroup>
4735
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
4836
<DebugSymbols>true</DebugSymbols>
@@ -52,48 +40,33 @@
5240
<DefineConstants>DEBUG</DefineConstants>
5341
<ErrorReport>prompt</ErrorReport>
5442
<WarningLevel>4</WarningLevel>
55-
<MtouchUseSGen>false</MtouchUseSGen>
56-
<MtouchDebug>True</MtouchDebug>
43+
<MtouchDebug>true</MtouchDebug>
5744
<CodesignKey>iPhone Developer</CodesignKey>
5845
<ConsolePause>false</ConsolePause>
59-
<MtouchUseThumb>false</MtouchUseThumb>
60-
<MtouchArch>ARMv6</MtouchArch>
61-
<MtouchUseLlvm>false</MtouchUseLlvm>
6246
</PropertyGroup>
6347
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
6448
<DebugType>none</DebugType>
6549
<Optimize>false</Optimize>
6650
<OutputPath>bin\iPhone\Release</OutputPath>
6751
<ErrorReport>prompt</ErrorReport>
6852
<WarningLevel>4</WarningLevel>
69-
<MtouchUseSGen>false</MtouchUseSGen>
70-
<MtouchDebug>False</MtouchDebug>
71-
<MtouchUseThumb>false</MtouchUseThumb>
7253
<ConsolePause>false</ConsolePause>
7354
<CodesignKey>iPhone Developer</CodesignKey>
74-
<MtouchArch>ARMv6</MtouchArch>
75-
<MtouchUseLlvm>false</MtouchUseLlvm>
7655
</PropertyGroup>
7756
<ItemGroup>
7857
<Reference Include="System" />
7958
<Reference Include="System.Core" />
8059
<Reference Include="monotouch" />
81-
<Reference Include="RestFiles.ServiceModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
82-
<SpecificVersion>False</SpecificVersion>
83-
<HintPath>..\Lib\RestFiles.ServiceModel.dll</HintPath>
60+
<Reference Include="ServiceStack.Common.MonoTouch">
61+
<HintPath>..\Lib\ServiceStack.Common.MonoTouch.dll</HintPath>
8462
</Reference>
85-
<Reference Include="ServiceStack.Common, Version=1.0.4144.40978, Culture=neutral, PublicKeyToken=null">
86-
<SpecificVersion>False</SpecificVersion>
87-
<HintPath>..\Lib\ServiceStack.Common.dll</HintPath>
63+
<Reference Include="ServiceStack.Interfaces.MonoTouch">
64+
<HintPath>..\Lib\ServiceStack.Interfaces.MonoTouch.dll</HintPath>
8865
</Reference>
89-
<Reference Include="ServiceStack.Interfaces, Version=1.0.4139.10634, Culture=neutral, PublicKeyToken=null">
90-
<SpecificVersion>False</SpecificVersion>
91-
<HintPath>..\Lib\ServiceStack.Interfaces.dll</HintPath>
92-
</Reference>
93-
<Reference Include="ServiceStack.Text, Version=2.0.9.3883, Culture=neutral, PublicKeyToken=null">
94-
<SpecificVersion>False</SpecificVersion>
95-
<HintPath>..\Lib\ServiceStack.Text.dll</HintPath>
66+
<Reference Include="ServiceStack.Text.MonoTouch">
67+
<HintPath>..\Lib\ServiceStack.Text.MonoTouch.dll</HintPath>
9668
</Reference>
69+
<Reference Include="System.Runtime.Serialization" />
9770
</ItemGroup>
9871
<ItemGroup>
9972
<None Include="Info.plist" />
@@ -103,9 +76,18 @@
10376
<DependentUpon>MainWindow.xib</DependentUpon>
10477
</Compile>
10578
<Compile Include="Main.cs" />
79+
<Compile Include="RestFiles.ServiceModel\Operations\Files.cs" />
80+
<Compile Include="RestFiles.ServiceModel\Operations\RevertFiles.cs" />
81+
<Compile Include="RestFiles.ServiceModel\Types\File.cs" />
82+
<Compile Include="RestFiles.ServiceModel\Types\FileResult.cs" />
83+
<Compile Include="RestFiles.ServiceModel\Types\Folder.cs" />
84+
<Compile Include="RestFiles.ServiceModel\Types\FolderResult.cs" />
10685
</ItemGroup>
10786
<ItemGroup>
108-
<Page Include="MainWindow.xib" />
87+
<InterfaceDefinition Include="MainWindow.xib" xmlns="" />
10988
</ItemGroup>
11089
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
90+
<ItemGroup>
91+
<Folder Include="RestFiles.ServiceModel\" />
92+
</ItemGroup>
11193
</Project>

0 commit comments

Comments
 (0)