-
Notifications
You must be signed in to change notification settings - Fork 517
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
[messages] Update for Xcode 9 beta 1 & 3 #2332
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,8 @@ namespace XamCore.Messages { | |
public enum MSMessagesAppPresentationStyle : nuint | ||
{ | ||
Compact, | ||
Expanded | ||
Expanded, | ||
Transcript, | ||
} | ||
|
||
[iOS (10,0)] | ||
|
@@ -38,6 +39,7 @@ public enum MSStickerSize : nint | |
[ErrorDomain ("MSMessagesErrorDomain")] | ||
public enum MSMessageErrorCode : nint | ||
{ | ||
Unknown = -1, | ||
FileNotFound = 1, | ||
FileUnreadable, | ||
ImproperFileType, | ||
|
@@ -46,11 +48,23 @@ public enum MSMessageErrorCode : nint | |
StickerFileImproperFileSize, | ||
StickerFileImproperFileFormat, | ||
UrlExceedsMaxSize, | ||
SendWithoutRecentInteraction, | ||
SendWhileNotVisible, | ||
} | ||
|
||
[iOS (11,0)] | ||
[Protocol] | ||
interface MSMessagesAppTranscriptPresentation | ||
{ | ||
[iOS (11,0)] | ||
[Abstract] | ||
[Export ("contentSizeThatFits:")] | ||
CGSize ContentSizeThatFits (CGSize size); | ||
} | ||
|
||
[iOS (10,0)] | ||
[BaseType (typeof(UIViewController))] | ||
interface MSMessagesAppViewController | ||
interface MSMessagesAppViewController : MSMessagesAppTranscriptPresentation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deriving from the protocol will inline all the protocol members, which IMO is not what you want to do here. Derive from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ignore this comment, I got confused with something else. This is 👍 |
||
{ | ||
// inlined ctor | ||
[Export ("initWithNibName:bundle:")] | ||
|
@@ -130,6 +144,26 @@ interface MSConversation | |
[Export ("insertAttachment:withAlternateFilename:completionHandler:")] | ||
[Async] | ||
void InsertAttachment (NSUrl url, [NullAllowed] string filename, [NullAllowed] Action<NSError> completionHandler); | ||
|
||
[iOS (11,0)] | ||
[Export ("sendMessage:completionHandler:")] | ||
[Async] | ||
void SendMessage (MSMessage message, [NullAllowed] Action<NSError> completionHandler); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just name it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This match the existing That's also a case that could bite back, e.g. |
||
|
||
[iOS (11,0)] | ||
[Export ("sendSticker:completionHandler:")] | ||
[Async] | ||
void SendSticker (MSSticker sticker, [NullAllowed] Action<NSError> completionHandler); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just name it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fine |
||
|
||
[iOS (11,0)] | ||
[Export ("sendText:completionHandler:")] | ||
[Async] | ||
void SendText (string text, [NullAllowed] Action<NSError> completionHandler); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just name it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fine |
||
|
||
[iOS (11,0)] | ||
[Export ("sendAttachment:withAlternateFilename:completionHandler:")] | ||
[Async] | ||
void SendAttachment (NSUrl url, [NullAllowed] string filename, [NullAllowed] Action<NSError> completionHandler); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just name it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fine |
||
} | ||
|
||
[iOS (10,0)] | ||
|
@@ -144,6 +178,10 @@ interface MSMessage : NSCopying, NSSecureCoding | |
[NullAllowed, Export ("session")] | ||
MSSession Session { get; } | ||
|
||
[iOS (11,0)] | ||
[Export ("pending")] | ||
bool Pending { [Bind ("isPending")] get; } | ||
|
||
[Export ("senderParticipantIdentifier")] | ||
NSUuid SenderParticipantIdentifier { get; } | ||
|
||
|
@@ -309,5 +347,18 @@ interface MSStickerBrowserViewController : MSStickerBrowserViewDataSource | |
[Export ("stickerSize")] | ||
MSStickerSize StickerSize { get; } | ||
} | ||
|
||
[iOS (11,0)] | ||
[BaseType (typeof(MSMessageLayout))] | ||
[DisableDefaultCtor] | ||
interface MSMessageLiveLayout | ||
{ | ||
[Export ("initWithAlternateLayout:")] | ||
[DesignatedInitializer] | ||
IntPtr Constructor (MSMessageTemplateLayout alternateLayout); | ||
|
||
[Export ("alternateLayout")] | ||
MSMessageTemplateLayout AlternateLayout { get; } | ||
} | ||
} | ||
#endif // !MONOMAC |
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.
You need a verb to begin the method name so maybe
GetContentSizeThatFits