Skip to content

Commit

Permalink
Merge pull request #3946 from pkar70/AppModel-Background-struct
Browse files Browse the repository at this point in the history
feat: AppModel-Background-struct
  • Loading branch information
davidjohnoliver authored Sep 4, 2020
2 parents e3e963e + 87f2cc8 commit df53cf8
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 7 deletions.
20 changes: 20 additions & 0 deletions src/Uno.UWP/ApplicationModel/Background/BackgroundAccessStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Windows.ApplicationModel.Background
{
public enum BackgroundAccessStatus
{
Unspecified,
AllowedWithAlwaysOnRealTimeConnectivity,
AllowedMayUseActiveRealTimeConnectivity,
Denied,
AlwaysAllowed,
AllowedSubjectToSystemPolicy,
DeniedBySystemPolicy,
DeniedByUser,
}
}
12 changes: 12 additions & 0 deletions src/Uno.UWP/ApplicationModel/Background/IBackgroundCondition.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Windows.ApplicationModel.Background
{
public partial interface IBackgroundCondition
{
}
}
17 changes: 17 additions & 0 deletions src/Uno.UWP/ApplicationModel/Background/SystemCondition.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Windows.ApplicationModel.Background
{
public partial class SystemCondition : IBackgroundCondition
{
public SystemConditionType ConditionType { get; }
public SystemCondition(SystemConditionType conditionType)
{
ConditionType = conditionType;
}
}
}
23 changes: 23 additions & 0 deletions src/Uno.UWP/ApplicationModel/Background/SystemConditionType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Windows.ApplicationModel.Background
{
public enum SystemConditionType
{
Invalid,
UserPresent,
UserNotPresent,
InternetAvailable,
InternetNotAvailable,
SessionConnected,
SessionDisconnected,
FreeNetworkAvailable,
BackgroundWorkCostNotHigh,
}

}
28 changes: 28 additions & 0 deletions src/Uno.UWP/ApplicationModel/Background/SystemTriggerType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Windows.ApplicationModel.Background
{
public enum SystemTriggerType
{
Invalid,
SmsReceived,
UserPresent,
UserAway,
NetworkStateChange,
ControlChannelReset,
InternetAvailable,
SessionConnected,
ServicingComplete,
LockScreenApplicationAdded,
LockScreenApplicationRemoved,
TimeZoneChange,
OnlineIdConnectedStateChange,
BackgroundWorkCostChange,
PowerStateChange,
DefaultSignInAccountChange,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Background
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false

#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Background
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial interface IBackgroundCondition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Background
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class SystemCondition : global::Windows.ApplicationModel.Background.IBackgroundCondition
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.ApplicationModel.Background.SystemConditionType ConditionType
{
Expand All @@ -17,7 +17,7 @@ public partial class SystemCondition : global::Windows.ApplicationModel.Backgro
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public SystemCondition( global::Windows.ApplicationModel.Background.SystemConditionType conditionType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Background
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false

#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Background
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false

#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
#endif
Expand Down

0 comments on commit df53cf8

Please sign in to comment.