1 //===-- CFCBundle.h ---------------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef CoreFoundationCPP_CFBundle_h_ 11 #define CoreFoundationCPP_CFBundle_h_ 12 13 #include "CFCReleaser.h" 14 15 class CFCBundle : public CFCReleaser<CFBundleRef> { 16 public: 17 //------------------------------------------------------------------ 18 // Constructors and Destructors 19 //------------------------------------------------------------------ 20 CFCBundle(const char *path = NULL); 21 CFCBundle(CFURLRef url); 22 23 virtual ~CFCBundle(); 24 25 CFURLRef CopyExecutableURL() const; 26 27 CFStringRef GetIdentifier() const; 28 29 CFTypeRef GetValueForInfoDictionaryKey(CFStringRef key) const; 30 31 bool GetPath(char *dst, size_t dst_len); 32 33 bool SetPath(const char *path); 34 35 private: 36 // Disallow copy and assignment constructors 37 CFCBundle(const CFCBundle &); 38 39 const CFCBundle &operator=(const CFCBundle &); 40 }; 41 42 #endif // #ifndef CoreFoundationCPP_CFBundle_h_ 43