Overte C++ Documentation
FileTypeProfile.h
1 //
2 // FileTypeProfile.h
3 // interface/src/networking
4 //
5 // Created by Kunal Gosar on 2017-03-10.
6 // Copyright 2017 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #pragma once
13 
14 #ifndef hifi_FileTypeProfile_h
15 #define hifi_FileTypeProfile_h
16 
17 #include <QtCore/QtGlobal>
18 
19 #if !defined(Q_OS_ANDROID)
20 #include "ContextAwareProfile.h"
21 
22 class FileTypeProfile : public ContextAwareProfile {
23  using Parent = ContextAwareProfile;
24 
25 public:
26  static void registerWithContext(QQmlContext* parent);
27 
28  static void clearCache();
29 
30 protected:
31  FileTypeProfile(QQmlContext* parent);
32  virtual ~FileTypeProfile();
33 
34  class RequestInterceptor : public Parent::RequestInterceptor {
35  public:
36  RequestInterceptor(ContextAwareProfile* parent) : Parent::RequestInterceptor(parent) {}
37  void interceptRequest(QWebEngineUrlRequestInfo& info) override;
38  };
39 };
40 
41 #endif
42 
43 #endif // hifi_FileTypeProfile_h