-
Notifications
You must be signed in to change notification settings - Fork 520
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
Bind 2 high visibility PrintCore APIs #4933
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 |
---|---|---|
|
@@ -753,6 +753,26 @@ public bool IsRemote { | |
} | ||
} | ||
|
||
[DllImport (Constants.PrintCoreLibrary)] | ||
extern static IntPtr PMPrinterGetID (IntPtr printer); | ||
|
||
public string ID { | ||
get { | ||
return CFString.FetchString (PMPrinterGetID (handle)); | ||
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. Not
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. if you need to comment your own PR, before reviews, then it's a good sign those should be comment in the code ;-) |
||
} | ||
} | ||
|
||
[DllImport (Constants.PrintCoreLibrary)] | ||
extern static PMStatusCode PMPrinterCopyHostName (IntPtr printer, out IntPtr hostName); | ||
|
||
public string HostName { | ||
get { | ||
PMStatusCode code = PMPrinterCopyHostName (handle, out IntPtr hostName); | ||
if (code != PMStatusCode.Ok) | ||
return null; | ||
return CFString.FetchString (hostName, true); | ||
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. Releases as https://developer.apple.com/documentation/applicationservices/1462076-pmprintercopyhostname says:
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. same |
||
} | ||
} | ||
} | ||
|
||
public class PMServer : PMPrintCoreBase { | ||
|
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.
Id
-> it's not an acronym