暫無描述

APPEmailComposerImpl.h 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. Copyright 2013-2016 appPlant UG
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. */
  18. #import <MessageUI/MFMailComposeViewController.h>
  19. @interface APPEmailComposerImpl : NSObject
  20. /**
  21. * Checks if the mail composer is able to send mails and if an app is available
  22. * to handle the specified scheme.
  23. *
  24. * @param scheme
  25. * An URL scheme, that defaults to 'mailto:
  26. */
  27. - (NSArray*) canSendMail:(NSString*)scheme;
  28. /**
  29. * Instantiates an email composer view.
  30. *
  31. * @param properties
  32. * The email properties like subject, body, attachments
  33. * @param delegateTo
  34. * The mail composition view controller’s delegate.
  35. * @return
  36. * The configured email composer view
  37. */
  38. - (MFMailComposeViewController*) mailComposerFromProperties:(NSDictionary*)props
  39. delegateTo:(id)receiver;
  40. /**
  41. * Creates an mailto-url-sheme.
  42. *
  43. * @param properties
  44. * The email properties like subject, body, attachments
  45. * @return
  46. * The configured mailto-sheme
  47. */
  48. - (NSURL*) urlFromProperties:(NSDictionary*)props;
  49. @end