Home
URL SCHEME: x-sadun-services
COMMANDS:
- x-sadun-services:command?param1=p1¶m2=p2¶m3=p3¶m4=p4¶m5=p5
- command: paste | copy | clear | type
- params: scheme | data | clipboard | password | expire | type
LEGAL PARAMETER NAMES
- Clipboard and Password lengths must be between 4 and 32 characters.
- Legal characters include
@"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" - You cannot use “name”, “clipboard” or “password” as a parameter.
RETURN VALUES
- bytes = %d
- data = the-requested-data, which remains exactly the same string including any URI encoding
- type = any stored mimetype
- status = Success | Unknown | InvalidClipboardName | InvalidPassword | WrongPassword | InvalidExpiry | ClipboardEmpty | TypeMismatch | NoTypeFound
SAMPLES (NOT EXHAUSTIVE)
- x-sadun-services:paste?scheme=iping&data=hello+world
- x-sadun-services:paste?scheme=iping&data=hello+world&clipboard=name&expire=nseconds&password=pass&type=text%2Fxml
- x-sadun-services:copy?scheme=iping
- x-sadun-services:copy?scheme=iping&clipboard=name&password=pass
- x-sadun-services:clear?scheme=iping
- x-sadun-services:clear?scheme=iping&clipboard=name
NOTES
- When a clipboard’s name is provided, the data is written to name.txt rather than clipboard.txt.
- When an expiration is given for a clipboard paste, the expiration date is written to name.expiration as a key/value pair. When a password is provided for a clipboard paste, the password is stored in name.password. When a mimetype is provided, it’s stored in name.mimetype or clipboard.mimetype. You can type the standard clipboard.
- Passwords cannot be added to a no-pw, existing clipboard
- Passwords are ignored for copy and clear if there is no password associated with a clipboard.
- After expiration, the data, expiration, and password are removed and 0 bytes are returned.
- You cannot set a password on the main clipboard or add an expiration time.
- During paste, mimetypes are added if they are supplied with type=mimetype and any existing item is removed otherwise.
- Copy requests with a type parameter will match the lowercase version of the sent item against the stored mimetype. If NSNotFound, will generate a failure.
- URI-encode your mimetypes and your data. Samples are given in iPing.app
- Use the scheme parameter to return control to an application.
- A typical paste or copy request takes between 4.5 and 5 seconds to complete round trip and return to your application.
- See the iPing sample to get a sense of how the client side works.
ACTION ITEMS
- Extend to web apps?
- Provide samples on how to test if the server side is available when opening a URL request.
THANKS
- August Joki, Emanuele Vulcano
REFERENCES
- http://cocoadev.com/index.pl?ChooseYourOwniPhoneURLScheme
