Skip to content

Commit

Permalink
feat: PhoneCallHistory common structs
Browse files Browse the repository at this point in the history
  • Loading branch information
pkar70 committed Sep 26, 2020
1 parent d3c572b commit d482bbb
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 23 deletions.
28 changes: 28 additions & 0 deletions src/Uno.UWP/ApplicationModel/Calls/PhoneCallHistoryEntry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;

namespace Windows.ApplicationModel.Calls
{
// without this fields/methods PhoneCallHistoryEntry has no sense :)

public partial class PhoneCallHistoryEntry
{
public bool IsMissed { get; set; }

public bool IsIncoming { get; set; }

public TimeSpan? Duration { get; set; }

public DateTimeOffset StartTime { get; set; }

public PhoneCallHistoryEntryAddress Address { get; set; }

public bool IsVoicemail { get; set; }

public PhoneCallHistoryEntry()
{
// constructor defined in UWP: https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.Calls.PhoneCallHistoryEntry
// nothing to do, but will be required in future to set SourceIdKind
}

}
}
23 changes: 23 additions & 0 deletions src/Uno.UWP/ApplicationModel/Calls/PhoneCallHistoryEntryAddress.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Windows.ApplicationModel.Calls
{
public partial class PhoneCallHistoryEntryAddress
{
// without this fields/methods PhoneCallHistoryEntryAddress has no sense :)

public PhoneCallHistoryEntryRawAddressKind RawAddressKind { get; set; }

public string RawAddress { get; set; }
public string DisplayName { get; set; }

public PhoneCallHistoryEntryAddress(string rawAddress, PhoneCallHistoryEntryRawAddressKind rawAddressKind)
{
RawAddressKind = rawAddressKind;
RawAddress = rawAddress;
}
public PhoneCallHistoryEntryAddress()
{
RawAddressKind = PhoneCallHistoryEntryRawAddressKind.Custom;
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Windows.ApplicationModel.Calls
{
public enum PhoneCallHistoryEntryRawAddressKind
{
PhoneNumber,
Custom,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Windows.ApplicationModel.Calls
{
public enum PhoneCallHistoryStoreAccessType
{
// option without support - limited to app
[global::Uno.NotImplemented]
AppEntriesReadWrite,

AllEntriesLimitedReadWrite = 1,
AllEntriesReadWrite = 2
}
}
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.Calls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class PhoneCallHistoryEntry
Expand All @@ -21,7 +21,7 @@ public partial class PhoneCallHistoryEntry
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool IsMissed
{
Expand All @@ -35,7 +35,7 @@ public bool IsMissed
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool IsIncoming
{
Expand Down Expand Up @@ -77,7 +77,7 @@ public bool IsSeen
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::System.TimeSpan? Duration
{
Expand Down Expand Up @@ -119,7 +119,7 @@ public bool IsSuppressed
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::System.DateTimeOffset StartTime
{
Expand Down Expand Up @@ -147,7 +147,7 @@ public bool IsSuppressed
}
}
#endif
#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.Calls.PhoneCallHistoryEntryAddress Address
{
Expand Down Expand Up @@ -217,7 +217,7 @@ public bool IsRinging
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool IsVoicemail
{
Expand Down Expand Up @@ -251,7 +251,7 @@ public string SourceDisplayName
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public PhoneCallHistoryEntry()
{
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.Calls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class PhoneCallHistoryEntryAddress
{
#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.Calls.PhoneCallHistoryEntryRawAddressKind RawAddressKind
{
Expand All @@ -21,7 +21,7 @@ public partial class PhoneCallHistoryEntryAddress
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string RawAddress
{
Expand All @@ -35,7 +35,7 @@ public string RawAddress
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string DisplayName
{
Expand Down Expand Up @@ -63,15 +63,15 @@ public string ContactId
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public PhoneCallHistoryEntryAddress( string rawAddress, global::Windows.ApplicationModel.Calls.PhoneCallHistoryEntryRawAddressKind rawAddressKind)
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.ApplicationModel.Calls.PhoneCallHistoryEntryAddress", "PhoneCallHistoryEntryAddress.PhoneCallHistoryEntryAddress(string rawAddress, PhoneCallHistoryEntryRawAddressKind rawAddressKind)");
}
#endif
// Forced skipping of method Windows.ApplicationModel.Calls.PhoneCallHistoryEntryAddress.PhoneCallHistoryEntryAddress(string, Windows.ApplicationModel.Calls.PhoneCallHistoryEntryRawAddressKind)
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public PhoneCallHistoryEntryAddress()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Calls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
#if false
[global::Uno.NotImplemented]
#endif
public enum PhoneCallHistoryEntryRawAddressKind
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
PhoneNumber,
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Custom,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.ApplicationModel.Calls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
#if false
[global::Uno.NotImplemented]
#endif
public enum PhoneCallHistoryStoreAccessType
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
AppEntriesReadWrite,
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
AllEntriesLimitedReadWrite,
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
AllEntriesReadWrite,
#endif
}
Expand Down

0 comments on commit d482bbb

Please sign in to comment.