1/************************************************************** 2 * 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 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_uri_XVndSunStarScriptUrl_idl__ 25#define __com_sun_star_uri_XVndSunStarScriptUrl_idl__ 26 27#include <com/sun/star/lang/IllegalArgumentException.idl> 28#include <com/sun/star/uno/XInterface.idl> 29 30module com { module sun { module star { module uri { 31 32/** 33 represents absolute “vnd.sun.star.script” URLs. 34 35 <p>These URLs are of the form<br/> 36  <var>vnd-sun-star-script-url</var> = 37 <code>"VND.SUN.STAR.SCRIPT:"</code> <var>name</var> [<code>"?"</code> 38 <var>parameter</var> *(<code>"&"</code> <var>parameter</var>)]<br/> 39  <var>name</var> = 1*<var>schar</var><br/> 40  <var>parameter</var> = <var>key</var> <code>"="</code> 41 <var>value</var><br/> 42  <var>key</var> = 1*<var>schar</var><br/> 43  <var>value</var> = *<var>schar</var><br/> 44  <var>schar</var> = <var>unreserved</var> / <var>escaped</var> / 45 <code>"$"</code> / <code>"+"</code> / <code>","</code> / <code>":"</code> / 46 <code>";"</code> / <code>"@"</code> / <code>"["</code> / 47 <code>"]"</code><br/> 48 See <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>, 49 <a href="http://www.ietf.org/rfc/rfc2732.txt">RFC 2732</a>, and 50 <a href="http://www.ietf.org/rfc/rfc2234.txt">RFC 2234</a> for 51 details.</p> 52 53 <p>The names, keys, and values are arbitrary Unicode strings (non-empty 54 Unicode strings in the case of names and keys), encoded as UTF-8 byte 55 sequences. It is an error if any of them does not represent a valid UTF-8 56 byte sequence. Keys are compared for equality character-by-character, 57 without considering case folding or normalization. There may be multiple 58 parameters with equal keys.</p> 59 60 @since OpenOffice 2.0 61 */ 62published interface XVndSunStarScriptUrl: com::sun::star::uno::XInterface { 63 /** 64 returns the name part of this URL. 65 66 @returns 67 the non-escaped value of the name part. 68 */ 69 string getName(); 70 71 /** 72 sets the name part of this URL. 73 74 @param name 75 specifies the non-escaped new name part of the URL. 76 77 @throws ::com::sun::star::lang::IllegalArgumentException 78 if <arg>name</arg> is empty 79 80 @since OpenOffice 3.0 81 */ 82 void setName([in] string name) 83 raises ( ::com::sun::star::lang::IllegalArgumentException ); 84 85 /** 86 returns whether this URL has a parameter with a given key. 87 88 @param key 89 a non-escaped key. 90 91 @returns 92 <TRUE/> if this URL has at least one parameter with the given key. In 93 particular, if <code>key</code> is an empty <atom>string</atom>, <FALSE/> 94 is returned. 95 */ 96 boolean hasParameter([in] string key); 97 98 /** 99 returns the value of a parameter with a given key. 100 101 @param key 102 a non-escaped key. 103 104 @returns 105 the non-escaped value of the first parameter with the given key. If 106 there is no parameter with the given key, or if <code>key</code> is an 107 empty <atom>string</atom>, an empty <atom>string</atom> is returned. 108 */ 109 string getParameter([in] string key); 110 111 /** 112 sets the value of a parameter with a given key. 113 114 @param key 115 a non-escaped key 116 117 @param value 118 the non-escaped value to be set for the parameter. If there already is a 119 parameter with this key, the value of its first appearance will be replaced. 120 Otherwise, a parameter with the given key/value will be appended. 121 122 @throws ::com::sun::star::lang::IllegalArgumentException 123 if <arg>key</arg> is empty 124 125 @since OpenOffice 3.0 126 */ 127 void setParameter( [in] string key, [in] string value ) 128 raises ( ::com::sun::star::lang::IllegalArgumentException ); 129}; 130 131}; }; }; }; 132 133#endif 134