LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / jvmfwk / inc / fwkutil.hxx
blobe76a92769fc1ac3615cbc4737e24558f4b33bd59
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_JVMFWK_SOURCE_FWKUTIL_HXX
20 #define INCLUDED_JVMFWK_SOURCE_FWKUTIL_HXX
22 #include <config_folders.h>
24 #include <sal/config.h>
25 #include <sal/log.hxx>
26 #include <rtl/bootstrap.hxx>
27 #include <rtl/byteseq.hxx>
28 #include <osl/mutex.hxx>
30 namespace osl { class Mutex; }
32 namespace jfw
35 /** Returns the file URL of the directory where the framework library
36 (this library) resides.
38 OUString getLibraryLocation();
40 /** provides a bootstrap class which already knows the values from the
41 jvmfkwrc file.
43 const rtl::Bootstrap * Bootstrap();
45 osl::Mutex& FwkMutex();
47 rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
48 rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);
50 OUString getDirFromFile(const OUString& usFilePath);
52 enum FileStatus
54 FILE_OK,
55 FILE_DOES_NOT_EXIST,
56 FILE_INVALID
59 /** checks if the URL is a file.
61 If it is a link to a file than
62 it is resolved. Assuming that the argument
63 represents a relative URL then FILE_INVALID
64 is returned.
67 @return
68 one of the values of FileStatus.
70 @exception
71 Errors occurred during determining if the file exists
73 FileStatus checkFileURL(const OUString & path);
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */