diff options
Diffstat (limited to 'libs/appleutility/CAComponent.h')
-rw-r--r-- | libs/appleutility/CAComponent.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libs/appleutility/CAComponent.h b/libs/appleutility/CAComponent.h index 2e721d8df9..4009bc42fe 100644 --- a/libs/appleutility/CAComponent.h +++ b/libs/appleutility/CAComponent.h @@ -57,59 +57,59 @@ class CAComponent public: CAComponent () : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) {} - + // if next is specifed that is used to find the next component after that one CAComponent (const ComponentDescription& inDesc, CAComponent* next = 0); - + CAComponent (const CAComponent& y) : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) { *this = y; } CAComponent (const Component& comp); - + CAComponent (const ComponentInstance& compInst); CAComponent (OSType inType, OSType inSubtype = 0, OSType inManu = 0); - + ~CAComponent (); - + CAComponent& operator= (const CAComponent& y); - + // returns true if this object references a valid component bool IsValid () const { return Comp() != 0; } - + bool HasAUStrings() const { SetCompNames (); return mManuName != 0; } // CFStringRef should be retained by caller if needed beyond lifetime of this object - + // Can return NULL if component doesn't follow AU naming conventions CFStringRef GetAUManu () const { SetCompNames (); return mManuName; } CFStringRef GetAUName () const { SetCompNames (); return mAUName ? mAUName : mCompName; } - + // Return value of NULL indicates a problem getting that information from the component CFStringRef GetCompName () const { SetCompNames(); return mCompName; } CFStringRef GetCompInfo () const { SetCompInfo(); return mCompInfo; } - + const CAComponentDescription& Desc () const { return mDesc; } - + OSStatus Open (ComponentInstance& outInst) const { return OpenAComponent (Comp(), &outInst); } OSStatus GetResourceVersion (UInt32 &outVersion) const; - + const Component& Comp() const { return mComp; } - + void Print(FILE* file = stdout) const; OSStatus Save (CFPropertyListRef *outData) const; - + OSStatus Restore (CFPropertyListRef &inData); - + private: Component mComp; CAComponentDescription mDesc; - + CFStringRef mManuName, mAUName, mCompName, mCompInfo; void SetCompNames () const; |