Skip to content

Commit

Permalink
Merge pull request #58 from fhubi/main
Browse files Browse the repository at this point in the history
Initial AppDirectory POCOs.
  • Loading branch information
fhubi authored Sep 15, 2023
2 parents 6d47915 + 6b270f8 commit 8d709bb
Show file tree
Hide file tree
Showing 23 changed files with 1,082 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
run:
dotnet pack src/Fdc3.NewtonsoftJson/MorganStanley.Fdc3.NewtonsoftJson.csproj --no-build --configuration Release --output packages

- name: Pack Fdc3.AppDirectory
run:
dotnet pack src/Fdc3.AppDirectory/MorganStanley.Fdc3.AppDirectory.csproj --no-build --configuration Release --output packages

- name: Upload
uses: actions/upload-artifact@v3
with:
Expand Down
57 changes: 57 additions & 0 deletions src/Fdc3.AppDirectory/AppChannel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Morgan Stanley makes this available to you under the Apache License,
* Version 2.0 (the "License"). You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Unless required by applicable law or agreed
* to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/

using System;
using System.Collections.Generic;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Describes the application's use of App Channels.
/// This metadata is not currently used by the desktop agent, but is provided
/// to help find apps that will interoperate with this app and to document API
/// interactions for use by other app developers.
/// </summary>
public class AppChannel
{
/// <summary>
/// Initializes a new instance of the <see cref="AppChannel"/> class.
/// </summary>
/// <param name="name">The name</param>
/// <exception cref="ArgumentNullException">Exception if name is null</exception>
public AppChannel(string name)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
}
/// <summary>
/// The name of the App Channel.
/// </summary>
public string Name { get; set; }

/// <summary>
/// A description of how the channel is used.
/// </summary>
public string? Description { get; set; }

/// <summary>
/// Context type names that are broadcast by the application on the channel.
/// </summary>
public IEnumerable<string>? Broadcasts { get; set; }

/// <summary>
/// Context type names that the application listens for on the channel.
/// </summary>
public IEnumerable<string>? ListensFor { get; set; }
}
}
46 changes: 46 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Morgan Stanley makes this available to you under the Apache License,
* Version 2.0 (the "License"). You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Unless required by applicable law or agreed
* to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// App virtualized via Citrix.
/// </summary>
public class CitrixAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="CitrixAppDetails"/> class.
/// </summary>
/// <param name="alias">The alias</param>
/// <param name="arguments">The arguments</param>
/// <exception cref="ArgumentNullException">Exception if the alias is null</exception>
public CitrixAppDetails(string alias, string? arguments)
{
Alias = alias ?? throw new ArgumentNullException(nameof(alias));
Arguments = arguments;
}

/// <summary>
/// The Citrix alias / name of the virtual app (passed to the Citrix SelfService qlaunch parameter).
/// </summary>
public string Alias { get; set; }

/// <summary>
/// Arguments that must be passed on the command line to launch the app in the expected configuration.
/// </summary>
public string? Arguments { get; set; }
}
}
45 changes: 45 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Morgan Stanley makes this available to you under the Apache License,
* Version 2.0 (the "License"). You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Unless required by applicable law or agreed
* to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Native application pre-installed on a device and launch via a filesystem path.
/// </summary>
public class NativeAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="NativeAppDetails"/> class.
/// </summary>
/// <param name="path">The path</param>
/// <param name="arguments">The arguments</param>
/// <exception cref="ArgumentNullException">Exception if the path is null</exception>
public NativeAppDetails(string path, string? arguments)
{
Path = path ?? throw new ArgumentNullException(nameof(path));
Arguments = arguments;
}
/// <summary>
/// The path on disk from which the application is launched.
/// </summary>
public string Path { get; set; }

/// <summary>
/// Arguments that must be passed on the command line to launch the app in the expected configuration.
/// </summary>
public string? Arguments { get; set; }
}
}
38 changes: 38 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Morgan Stanley makes this available to you under the Apache License,
* Version 2.0 (the "License"). You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Unless required by applicable law or agreed
* to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Native app that have an online launcher, e.g. online ClickOnce app deployments.
/// </summary>
public class OnlineNativeAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="OnlineNativeAppDetails"/> class.
/// </summary>
/// <param name="url">The url</param>
/// <exception cref="ArgumentNullException">Exception if the url is null</exception>
public OnlineNativeAppDetails(string url)
{
Url = url ?? throw new ArgumentNullException(nameof(url));
}
/// <summary>
/// Application URL.
/// </summary>
public string Url { get; set; }
}
}
40 changes: 40 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/WebAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Morgan Stanley makes this available to you under the Apache License,
* Version 2.0 (the "License"). You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Unless required by applicable law or agreed
* to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Web application launched via a URL.
/// </summary>
public class WebAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="WebAppDetails"/> class.
/// </summary>
/// <param name="url">The url</param>
/// <exception cref="ArgumentNullException">Exception if the url is null</exception>
public WebAppDetails(string url)
{
Url = url ?? throw new ArgumentNullException(nameof(url));
}

/// <summary>
/// <summary>
/// Application start URL.
/// </summary>
public string Url { get; set; }
}
}
28 changes: 28 additions & 0 deletions src/Fdc3.AppDirectory/AppType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Morgan Stanley makes this available to you under the Apache License,
* Version 2.0 (the "License"). You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Unless required by applicable law or agreed
* to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// FDC3 application types
/// </summary>
public enum AppType
{
Other,
Web,
Native,
Citrix,
OnlineNative
}
}
Loading

0 comments on commit 8d709bb

Please sign in to comment.