mirror of
https://github.com/QuasarApp/macdependency.git
synced 2025-04-28 13:24:32 +00:00
- Applied all recommended XCode (8) settings. - Removed boost and replaced that code by standard functions. - Implemented name mangling via abi::__cxa_demangle instead of running an external process to use c++filt. - Enabled C++11. Min deployment target is now OSX 10.7. - Some code clean up (e.g. formatting, std namespace).
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
#ifndef MACHO_H
|
|
#define MACHO_H
|
|
|
|
#include "macho_global.h"
|
|
#include <CoreFoundation/CoreFoundation.h>
|
|
|
|
class MachOFile;
|
|
class MachOArchitecture;
|
|
class DynamicLoader;
|
|
|
|
class EXPORT MachO {
|
|
private:
|
|
typedef std::list<MachOArchitecture*> MachOArchitectures;
|
|
public:
|
|
MachO(const std::string& fileName, const MachO* parent = 0);
|
|
~MachO();
|
|
|
|
std::string getFileName() const;
|
|
|
|
typedef MachOArchitectures::iterator MachOArchitecturesIterator;
|
|
typedef MachOArchitectures::const_iterator MachOArchitecturesConstIterator;
|
|
MachOArchitecturesIterator getArchitecturesBegin();
|
|
MachOArchitecturesIterator getArchitecturesEnd();
|
|
MachOArchitecture* getCompatibleArchitecture(MachOArchitecture* destArchitecture) const;
|
|
MachOArchitecture* getHostCompatibleArchitecture() const;
|
|
unsigned long long getSize() const;
|
|
time_t getLastModificationTime() const;
|
|
std::string getVersion() const;
|
|
std::string getName() const;
|
|
//sQIcon getIcon() const;*/
|
|
const MachO* getParent() { return parent;}
|
|
std::string getPath() const;
|
|
static DynamicLoader* dynamicLoader;
|
|
static int referenceCounter;
|
|
private:
|
|
const MachO* parent;
|
|
MachOFile* file;
|
|
MachOArchitectures architectures;
|
|
CFBundleRef bundle;
|
|
|
|
std::string getApplicationInBundle(const std::string& bundlePath);
|
|
static std::string extractStringFromCFStringRef(CFStringRef cfStringRef);
|
|
void init(const std::string& fileName, const MachO* parent);
|
|
|
|
};
|
|
|
|
#endif // MACHO_H
|