xref: /openbsd-src/gnu/llvm/lldb/source/Host/macosx/cfcpp/CFCBundle.h (revision f6aab3d83b51b91c24247ad2c2573574de475a82)
1061da546Spatrick //===-- CFCBundle.h ---------------------------------------------*- C++ -*-===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick 
9dda28197Spatrick #ifndef LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCBUNDLE_H
10dda28197Spatrick #define LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCBUNDLE_H
11061da546Spatrick 
12061da546Spatrick #include "CFCReleaser.h"
13061da546Spatrick 
14061da546Spatrick class CFCBundle : public CFCReleaser<CFBundleRef> {
15061da546Spatrick public:
16061da546Spatrick   // Constructors and Destructors
17061da546Spatrick   CFCBundle(const char *path = NULL);
18061da546Spatrick   CFCBundle(CFURLRef url);
19061da546Spatrick 
20*f6aab3d8Srobert   ~CFCBundle() override;
21061da546Spatrick 
22061da546Spatrick   CFURLRef CopyExecutableURL() const;
23061da546Spatrick 
24061da546Spatrick   CFStringRef GetIdentifier() const;
25061da546Spatrick 
26061da546Spatrick   CFTypeRef GetValueForInfoDictionaryKey(CFStringRef key) const;
27061da546Spatrick 
28061da546Spatrick   bool GetPath(char *dst, size_t dst_len);
29061da546Spatrick 
30061da546Spatrick   bool SetPath(const char *path);
31061da546Spatrick 
32061da546Spatrick private:
33061da546Spatrick   // Disallow copy and assignment constructors
34061da546Spatrick   CFCBundle(const CFCBundle &) = delete;
35061da546Spatrick 
36061da546Spatrick   const CFCBundle &operator=(const CFCBundle &) = delete;
37061da546Spatrick };
38061da546Spatrick 
39dda28197Spatrick #endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCBUNDLE_H
40