fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svl / inethist.hxx
blob4ee592faad1644735447eea22b5516a0c77aa2a4
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 _INETHIST_HXX
20 #define _INETHIST_HXX
22 #include "svl/svldllapi.h"
23 #include <tools/solar.h>
24 #include <tools/string.hxx>
25 #include <tools/urlobj.hxx>
26 #include <svl/brdcst.hxx>
27 #include <svl/hint.hxx>
29 /*========================================================================
31 * INetURLHistory interface.
33 *=======================================================================*/
34 class INetURLHistory_Impl;
35 class INetURLHistory : public SfxBroadcaster
37 struct StaticInstance
39 INetURLHistory * operator()();
41 friend INetURLHistory * StaticInstance::operator()();
43 /** Representation.
45 INetURLHistory_Impl *m_pImpl;
47 /** Construction/Destruction.
49 INetURLHistory (void);
50 virtual ~INetURLHistory (void);
52 /** Implementation.
54 static void NormalizeUrl_Impl (INetURLObject &rUrl);
56 SVL_DLLPUBLIC void PutUrl_Impl (const INetURLObject &rUrl);
57 SVL_DLLPUBLIC sal_Bool QueryUrl_Impl (const INetURLObject &rUrl);
59 /** Not implemented.
61 INetURLHistory (const INetURLHistory&);
62 INetURLHistory& operator= (const INetURLHistory&);
64 public:
65 /** GetOrCreate.
67 SVL_DLLPUBLIC static INetURLHistory* GetOrCreate (void);
69 /** QueryProtocol.
71 sal_Bool QueryProtocol (INetProtocol eProto) const
73 return ((eProto == INET_PROT_FILE ) ||
74 (eProto == INET_PROT_FTP ) ||
75 (eProto == INET_PROT_HTTP ) ||
76 (eProto == INET_PROT_HTTPS) );
79 /** QueryUrl.
81 sal_Bool QueryUrl (const INetURLObject &rUrl)
83 if (QueryProtocol (rUrl.GetProtocol()))
84 return QueryUrl_Impl (rUrl);
85 else
86 return sal_False;
89 sal_Bool QueryUrl (const String &rUrl)
91 INetProtocol eProto =
92 INetURLObject::CompareProtocolScheme (rUrl);
93 if (QueryProtocol (eProto))
94 return QueryUrl_Impl (INetURLObject (rUrl));
95 else
96 return sal_False;
99 /** PutUrl.
101 void PutUrl (const INetURLObject &rUrl)
103 if (QueryProtocol (rUrl.GetProtocol()))
104 PutUrl_Impl (rUrl);
107 void PutUrl (const String &rUrl)
109 INetProtocol eProto =
110 INetURLObject::CompareProtocolScheme (rUrl);
111 if (QueryProtocol (eProto))
112 PutUrl_Impl (INetURLObject (rUrl));
116 /*========================================================================
118 * INetURLHistoryHint (broadcasted from PutUrl()).
120 *=======================================================================*/
121 DECL_PTRHINT (SVL_DLLPUBLIC, INetURLHistoryHint, const INetURLObject);
123 #endif /* _INETHIST_HXX */
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */