Mac-Spotlight
view release on metacpan or search on metacpan
MDQuery/MDQuery.xs view on Meta::CPAN
#include "ppport.h"
#include </System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Headers/MDQuery.h>
MODULE = Mac::Spotlight::MDQuery PACKAGE = Mac::Spotlight::MDQuery
CFStringRef
kMDQueryScopeHome()
=item Would it be more efficient to do a PPCODE that pushes the object
pointer? Do we care?
=cut
CODE:
RETVAL = kMDQueryScopeHome;
OUTPUT:
RETVAL
CFStringRef
kMDQueryScopeComputer()
MDQuery/MDQuery.xs view on Meta::CPAN
void
_stop(query)
MDQueryRef query
CODE:
MDQueryStop(query);
void
_getResults(query)
MDQueryRef query
PPCODE:
CFIndex x;
SV* tmpHash;
SV* tmpScalar;
int i = MDQueryGetResultCount(query);
for (x = 0; x < i; x++) {
tmpHash = sv_2mortal((SV*)newHV());
tmpScalar = newSVsv(&PL_sv_undef);
sv_setref_pv(tmpScalar, "MDItemRef", (void*)MDQueryGetResultAtIndex(query, x));
hv_store((HV*)tmpHash, "mdiObj", 6, tmpScalar, 0);
XPUSHs(sv_bless(sv_2mortal(newRV(tmpHash)), gv_stashpv("Mac::Spotlight::MDItem", FALSE)));
( run in 0.757 second using v1.01-cache-2.11-cpan-5511b514fd6 )