Skip to content

Commit

Permalink
Bind 2 high visibility PrintCore APIs (#4933)
Browse files Browse the repository at this point in the history
  • Loading branch information
chamons committed Nov 12, 2018
1 parent 8334773 commit 1ff51b8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 20 additions & 0 deletions src/PrintCore/PrintCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

[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);
}
}
}

public class PMServer : PMPrintCoreBase {
Expand Down
2 changes: 0 additions & 2 deletions tests/xtro-sharpie/macOS-PrintCore.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@
!missing-pinvoke! PMPresetCreatePrintSettings is not bound
!missing-pinvoke! PMPresetGetAttributes is not bound
!missing-pinvoke! PMPrinterCopyDescriptionURL is not bound
!missing-pinvoke! PMPrinterCopyHostName is not bound
!missing-pinvoke! PMPrinterCopyPresets is not bound
!missing-pinvoke! PMPrinterCopyState is not bound
!missing-pinvoke! PMPrinterGetCommInfo is not bound
!missing-pinvoke! PMPrinterGetDriverCreator is not bound
!missing-pinvoke! PMPrinterGetDriverReleaseInfo is not bound
!missing-pinvoke! PMPrinterGetID is not bound
!missing-pinvoke! PMPrinterGetIndexedPrinterResolution is not bound
!missing-pinvoke! PMPrinterGetLanguageInfo is not bound
!missing-pinvoke! PMPrinterGetLocation is not bound
Expand Down

3 comments on commit 1ff51b8

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Running XM tests on '10.7'' 🔥 : hudson.AbortException: Xamarin.Mac tests on macOS 10.7 failed (introspection)

Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)
🔥 Xamarin.Mac tests on macOS 10.7 failed (introspection) 🔥
🔥 Test run failed 🔥

Test results

1 tests failed, 0 tests skipped, 224 tests passed.

Failed tests

  • System.Net.Http/iOS Unified 32-bits - simulator/Debug: Failed

@rolfbjarne
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failure is unrelated:

@rolfbjarne
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting state to success where context is continuous-integration/jenkins/branch.

No blocking issues found

Please sign in to comment.