-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macos10.13-beta1] FinderSync and MediaLibrary bindings #2219
Conversation
src/findersync.cs
Outdated
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("lastUsedDateForItemWithURL:")] | ||
[return: NullAllowed] | ||
NSDate GetLastUsedDateForItem (NSUrl itemURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this should be GetLastUsedDate
(to match SetLastUsedDate
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also managed code uses Url
, not URL
src/findersync.cs
Outdated
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("tagDataForItemWithURL:")] | ||
[return: NullAllowed] | ||
NSData GetTagDataForItem (NSUrl itemURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: GetTagData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: itemUrl
instead of itemURL
.
src/findersync.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("setLastUsedDate:forItemWithURL:completion:")] | ||
void SetLastUsedDate (NSDate lastUsedDate, NSUrl itemURL, Action<NSError> completion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: itemUrl
.
src/findersync.cs
Outdated
@@ -54,6 +72,21 @@ interface FIFinderSyncProtocol | |||
|
|||
[Export ("toolbarItemToolTip")] | |||
string ToolbarItemToolTip { get; } | |||
|
|||
[Export ("supportedMessageInterfaceNamesForItemWithURL:")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has space indentation instead of tab indentation.
src/findersync.cs
Outdated
@@ -54,6 +72,21 @@ interface FIFinderSyncProtocol | |||
|
|||
[Export ("toolbarItemToolTip")] | |||
string ToolbarItemToolTip { get; } | |||
|
|||
[Export ("supportedMessageInterfaceNamesForItemWithURL:")] | |||
string[] GetSupportedMessageInterfaceNamesForItem (NSUrl itemURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: itemUrl
Also I think GetSupportedMessageInterfaceNames
would be simpler and still won't lose information.
src/findersync.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("exportedObjectForMessageInterface:itemURL:error:")] | ||
NSObject GetExportedObject (NSFileProviderMessageInterface messageInterface, NSUrl itemURL, [NullAllowed] out NSError error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: itemUrl
.
src/findersync.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("valuesForAttributes:forItemWithURL:completion:")] | ||
void ValuesForAttributes (string[] attributes, NSUrl itemURL, Action<NSDictionary<NSString, NSObject>, NSError> completion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just GetValues
would be simpler.
Also: itemUrl
.
src/medialibrary.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Field ("MLPhotosAnimatedGroupTypeIdentifier")] | ||
NSString MLPhotosAnimatedGroupTypeIdentifier { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ML
prefix for all three constants.
Build failure |
Build failure |
1 similar comment
Build failure |
src/findersync.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("setLastUsedDate:forItemWithURL:completion:")] | ||
void SetLastUsedDate (NSDate lastUsedDate, NSUrl itemUrl, Action<NSError> completion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async ?
src/findersync.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("setTagData:forItemWithURL:completion:")] | ||
void SetTagData ([NullAllowed] NSData tagData, NSUrl itemUrl, Action<NSError> completion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A sync ?
src/findersync.cs
Outdated
@@ -54,6 +72,21 @@ interface FIFinderSyncProtocol | |||
|
|||
[Export ("toolbarItemToolTip")] | |||
string ToolbarItemToolTip { get; } | |||
|
|||
[Export ("supportedMessageInterfaceNamesForItemWithURL:")] | |||
string[] GetSupportedMessageInterfaceNames (NSUrl itemURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Url, not URL
src/findersync.cs
Outdated
|
||
[Mac (10,13, onlyOn64 : true)] | ||
[Export ("valuesForAttributes:forItemWithURL:completion:")] | ||
void GetValues (string[] attributes, NSUrl itemUrl, Action<NSDictionary<NSString, NSObject>, NSError> completion); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action too complex - we can guess the usage
Better use a custom delegate type in such case, it's self documenting
Build failure |
Build success |
Build failure |
Build failure |
Build failure |
src/findersync.cs
Outdated
@@ -83,11 +83,12 @@ interface FIFinderSyncProtocol | |||
[Export ("supportedServiceNamesForItemWithURL:")] | |||
string[] SupportedServiceNames (NSUrl itemUrl); | |||
|
|||
#if FALSE // TODO: Activate after 10.13 foundation APIs have been merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you file a bug about this so that we don't forget?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. I did file a bug, meant to add it to the comment. I'll update it with the bug #
Build failure |
Known failure https://bugzilla.xamarin.com/show_bug.cgi?id=57762 |
No description provided.