1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ScriptURI.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FRAMEWORK_STORAGE_SCRIPTURI_HXX_
32 #define __FRAMEWORK_STORAGE_SCRIPTURI_HXX_
34 #include <osl/mutex.hxx>
35 #include <rtl/ustring>
37 #include <com/sun/star/lang/IllegalArgumentException.hpp>
39 namespace scripting_impl
{
41 #define css ::com::sun::star
42 #define dcsssf ::drafts::com::sun::star::script::framework
47 ::rtl::OUString location
;
48 ::rtl::OUString language
;
49 ::rtl::OUString functionName
;
50 ::rtl::OUString logicalName
;
53 * Helper class for dealing with script URIs.
58 ScriptURI( const ::rtl::OUString
& scriptURI
)
59 throw ( css::lang::IllegalArgumentException
);
60 virtual ~ScriptURI() SAL_THROW ( () );
63 * This function returns the location of the script
66 virtual ::rtl::OUString
getLocation();
69 * This function returns the language of the script, eg. java,
73 virtual ::rtl::OUString
getLanguage();
76 * This function returns the language dependent function name of
79 virtual ::rtl::OUString
getFunctionName();
82 * This function returns the language independent logical name of
85 virtual ::rtl::OUString
getLogicalName();
88 * This function returns the full URI
91 virtual ::rtl::OUString
getURI();
100 /** the string representation of the this objects URI */
101 ::rtl::OUString m_uri
;
102 /** the location of the script referred to by this URI */
103 ::rtl::OUString m_location
;
104 /** the language of the script referred to by this URI */
105 ::rtl::OUString m_language
;
106 /** the language dependent function name of the script referred to by this URI */
107 ::rtl::OUString m_functionName
;
108 /** the language independent logical name of the script referred to by this URI */
109 ::rtl::OUString m_logicalName
;
111 //attempt to parse the URI provided
116 void set_values( Uri
);
121 } //namespace script_uri
123 #endif // define __FRAMEWORK_STORAGE_SCRIPTURI_HXX_