| 1 |
//===-- CFCBundle.h ---------------------------------------------*- C++ -*-===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#ifndef LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCBUNDLE_H |
| 10 |
#define LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCBUNDLE_H |
| 11 |
|
| 12 |
#include "CFCReleaser.h" |
| 13 |
|
| 14 |
class CFCBundle : public CFCReleaser<CFBundleRef> { |
| 15 |
public: |
| 16 |
// Constructors and Destructors |
| 17 |
CFCBundle(const char *path = NULL); |
| 18 |
CFCBundle(CFURLRef url); |
| 19 |
|
| 20 |
~CFCBundle() override; |
| 21 |
|
| 22 |
CFURLRef CopyExecutableURL() const; |
| 23 |
|
| 24 |
CFStringRef GetIdentifier() const; |
| 25 |
|
| 26 |
CFTypeRef GetValueForInfoDictionaryKey(CFStringRef key) const; |
| 27 |
|
| 28 |
bool GetPath(char *dst, size_t dst_len); |
| 29 |
|
| 30 |
bool SetPath(const char *path); |
| 31 |
|
| 32 |
private: |
| 33 |
// Disallow copy and assignment constructors |
| 34 |
CFCBundle(const CFCBundle &) = delete; |
| 35 |
|
| 36 |
const CFCBundle &operator=(const CFCBundle &) = delete; |
| 37 |
}; |
| 38 |
|
| 39 |
#endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCBUNDLE_H |