org.rococoa.cocoa.metadata
Interface MetadataLibrary

All Superinterfaces:
Library

public interface MetadataLibrary
extends Library

JNA Wrapper for library Metadata
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static class MetadataLibrary.__MDItem
           
static class MetadataLibrary.__MDQuery
          Conversion Error : CFStringRef
SKIPPED:
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDSchema.h:89
kMDAttributeMultiValued
static interface MetadataLibrary.MDQueryCreateResultFunction
           
static interface MetadataLibrary.MDQueryCreateValueFunction
           
static interface MetadataLibrary.MDQueryOptionFlags
          native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h
enum values
 
Nested classes/interfaces inherited from interface com.sun.jna.Library
Library.Handler
 
Field Summary
static MetadataLibrary INSTANCE
           
static String JNA_LIBRARY_NAME
           
static NativeLibrary JNA_NATIVE_LIB
           
 
Fields inherited from interface com.sun.jna.Library
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER
 
Method Summary
 HIServicesLibrary.__CFDictionary MDItemCopyAttributeList(MetadataLibrary.__MDItem item, Object... varargs)
           
 HIServicesLibrary.__CFArray MDItemCopyAttributeNames(MetadataLibrary.__MDItem item)
           
 HIServicesLibrary.__CFDictionary MDItemCopyAttributes(MetadataLibrary.__MDItem item, HIServicesLibrary.__CFArray names)
           
 NativeLong MDItemGetTypeID()
           
 HIServicesLibrary.__CFArray MDQueryCopySortingAttributes(MetadataLibrary.__MDQuery query)
           
 HIServicesLibrary.__CFArray MDQueryCopyValueListAttributes(MetadataLibrary.__MDQuery query)
           
 void MDQueryDisableUpdates(MetadataLibrary.__MDQuery query)
           
 void MDQueryEnableUpdates(MetadataLibrary.__MDQuery query)
           
 boolean MDQueryExecute(MetadataLibrary.__MDQuery query, NativeLong optionFlags)
           
 MDQueryBatchingParams.ByValue MDQueryGetBatchingParameters(MetadataLibrary.__MDQuery query)
           
 NativeLong MDQueryGetIndexOfResult(MetadataLibrary.__MDQuery query, Pointer result)
           
 Pointer MDQueryGetResultAtIndex(MetadataLibrary.__MDQuery query, NativeLong idx)
           
 NativeLong MDQueryGetResultCount(MetadataLibrary.__MDQuery query)
           
 NativeLong MDQueryGetTypeID()
           
 boolean MDQueryIsGatheringComplete(MetadataLibrary.__MDQuery query)
           
 void MDQuerySetBatchingParameters(MetadataLibrary.__MDQuery query, MDQueryBatchingParams.ByValue params)
           
 void MDQuerySetCreateResultFunction(MetadataLibrary.__MDQuery query, MetadataLibrary.MDQueryCreateResultFunction func, Pointer context, CFArrayCallBacks cb)
           
 void MDQuerySetCreateValueFunction(MetadataLibrary.__MDQuery query, MetadataLibrary.MDQueryCreateValueFunction func, Pointer context, CFArrayCallBacks cb)
           
 void MDQuerySetMaxCount(MetadataLibrary.__MDQuery query, NativeLong size)
           
 void MDQuerySetSearchScope(MetadataLibrary.__MDQuery query, HIServicesLibrary.__CFArray scopeDirectories, int scopeOptions)
          Original signature : void MDQuerySetSearchScope(MDQueryRef, CFArrayRef, OptionBits)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:912
 void MDQueryStop(MetadataLibrary.__MDQuery query)
           
 HIServicesLibrary.__CFArray MDSchemaCopyAllAttributes()
           
 

Field Detail

JNA_LIBRARY_NAME

static final String JNA_LIBRARY_NAME

JNA_NATIVE_LIB

static final NativeLibrary JNA_NATIVE_LIB

INSTANCE

static final MetadataLibrary INSTANCE
Method Detail

MDItemGetTypeID

NativeLong MDItemGetTypeID()

MDItemCopyAttributes

HIServicesLibrary.__CFDictionary MDItemCopyAttributes(MetadataLibrary.__MDItem item,
                                                      HIServicesLibrary.__CFArray names)
Parameters:
item - The item to be interrogated.
names - A CFArray of the names of the desired attributes.

MDItemCopyAttributeList

HIServicesLibrary.__CFDictionary MDItemCopyAttributeList(MetadataLibrary.__MDItem item,
                                                         Object... varargs)
Parameters:
item - The item to be interrogated.
... - A comma-separated varargs list of the string
attribute names.
item - CFStringRef names
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDItem.h:139

MDItemCopyAttributeNames

HIServicesLibrary.__CFArray MDItemCopyAttributeNames(MetadataLibrary.__MDItem item)
Parameters:
item - The item to be interrogated.

MDQueryGetTypeID

NativeLong MDQueryGetTypeID()

MDQueryCopyValueListAttributes

HIServicesLibrary.__CFArray MDQueryCopyValueListAttributes(MetadataLibrary.__MDQuery query)
Parameters:
query - The query to be interrogated.

MDQueryCopySortingAttributes

HIServicesLibrary.__CFArray MDQueryCopySortingAttributes(MetadataLibrary.__MDQuery query)
Parameters:
query - The query to be interrogated.

MDQueryGetBatchingParameters

MDQueryBatchingParams.ByValue MDQueryGetBatchingParameters(MetadataLibrary.__MDQuery query)
Parameters:
query - The query to be interrogated.

MDQuerySetBatchingParameters

void MDQuerySetBatchingParameters(MetadataLibrary.__MDQuery query,
                                  MDQueryBatchingParams.ByValue params)
Parameters:
query - The query whose batching parameters are to be set.
params - An MDQueryBatchingParams structure with the batching
parameters to set.
Original signature : void MDQuerySetBatchingParameters(MDQueryRef, MDQueryBatchingParams)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:289

MDQuerySetCreateResultFunction

void MDQuerySetCreateResultFunction(MetadataLibrary.__MDQuery query,
                                    MetadataLibrary.MDQueryCreateResultFunction func,
                                    Pointer context,
                                    CFArrayCallBacks cb)
Parameters:
query - The query to whose result create function is to be set.
func - The callback function the MDQuery will use to
create its results, such as those returned from
MDQueryGetResultAtIndex(). This parameter
may be NULL, in which case any previous result creation
settings are cancelled, and the MDQuery will subsequently
produce MDItemRefs. If the function (when the parameter is
not NULL) is not of type MDQueryCreateResultFunction or
does not behave as a MDQueryCreateResultFunction must,
the behavior is undefined.
context - A pointer-sized user-defined value, which is
passed as the third parameter to the create function,
but is otherwise unused by MDQuery. The MDQuery does
not retain the context in any way, so it must remain
valid for at least the lifetime of the query. If the
context is not what is expected by the create function,
the behavior is undefined.
cb - A pointer to a CFArrayCallBacks structure
initialized with the callbacks for the query to use to
manage the created result objects. A copy of the
contents of the callbacks structure is made, so that a
pointer to a structure on the stack can be passed in, or
can be reused for multiple query creations. Only version
0 of the CFArrayCallBacks is supported. The retain field
may be NULL, in which case the MDQuery will do nothing to
add a retain to the created results for the query. The
release field may be NULL, in which case the MDQuery will
do nothing to remove the query's retain (such as the one
it gets from the create function) on the result objects
when the query is destroyed. If the copyDescription field
is NULL, the query will create a simple description for
the result objects. If the equal field is NULL, the query
will use pointer equality to test for equality of results.
This callbacks parameter itself may be NULL, which is
treated as if a valid structure of version 0 with all
fields NULL had been passed in. Otherwise, if any of the
fields are not valid pointers to functions of the correct
type, or this parameter is not a valid pointer to a
CFArrayCallBacks callbacks structure, the behavior is
undefined. If any of the value values returned from the
create function is not one understood by one or more of
the callback functions, the behavior when those callback
functions are used is undefined. For example, if the create
function can return NULL, then NULL must be understood by
the callback functions as a possible parameter. The retain
and release callbacks must be a matched set -- do not
assume that the retain function will be unused or that
additional reference counts will not be taken on the
created results.
Original signature : void MDQuerySetCreateResultFunction(MDQueryRef, MDQueryCreateResultFunction, void*, const CFArrayCallBacks*)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:387

MDQuerySetCreateValueFunction

void MDQuerySetCreateValueFunction(MetadataLibrary.__MDQuery query,
                                   MetadataLibrary.MDQueryCreateValueFunction func,
                                   Pointer context,
                                   CFArrayCallBacks cb)
Parameters:
query - The query to whose value create function is to be set.
func - The callback function the MDQuery will use to
create the value list values, such as those returned from
MDQueryCopyValuesOfAttribute(). This parameter
may be NULL, in which case any previous value creation
settings are cancelled, and the MDQuery will subsequently
produce the default CFTypeRefs. If the function (when the
parameter is not NULL) is not of type
MDQueryCreateValueFunction or does not behave as a
MDQueryCreateValueFunction must, the behavior is undefined.
context - A pointer-sized user-defined value, which is
passed as the fourth parameter to the create function,
but is otherwise unused by MDQuery. The MDQuery does
not retain the context in any way, so it must remain
valid for at least the lifetime of the query. If the
context is not what is expected by the create function,
the behavior is undefined.
cb - A pointer to a CFArrayCallBacks structure
initialized with the callbacks for the query to use to
manage the created value objects. A copy of the
contents of the callbacks structure is made, so that a
pointer to a structure on the stack can be passed in, or
can be reused for multiple query creations. Only version
0 of the CFArrayCallBacks is supported. The retain field
may be NULL, in which case the MDQuery will do nothing to
add a retain to the created values for the query. The
release field may be NULL, in which case the MDQuery will
do nothing to remove the query's retain (such as the one
it gets from the create function) on the value objects
when the query is destroyed. If the copyDescription field
is NULL, the query will create a simple description for
the value objects. If the equal field is NULL, the query
will use pointer equality to test for equality of values.
This callbacks parameter itself may be NULL, which is
treated as if a valid structure of version 0 with all
fields NULL had been passed in. Otherwise, if any of the
fields are not valid pointers to functions of the correct
type, or this parameter is not a valid pointer to a
CFArrayCallBacks callbacks structure, the behavior is
undefined. If any of the value values returned from the
create function is not one understood by one or more of
the callback functions, the behavior when those callback
functions are used is undefined. For example, if the
create function can return NULL, then NULL must be
understood by the callback functions as a possible
parameter. The retain and release callbacks must be a
matched set -- do not assume that the retain function will
be unused or that additional reference counts will not be
taken on the created values.
Original signature : void MDQuerySetCreateValueFunction(MDQueryRef, MDQueryCreateValueFunction, void*, const CFArrayCallBacks*)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:476

MDQueryExecute

boolean MDQueryExecute(MetadataLibrary.__MDQuery query,
                       NativeLong optionFlags)
Parameters:
query - The query to execute.
optionFlags - Bitwise or of MDQueryOptionFlags

MDQueryStop

void MDQueryStop(MetadataLibrary.__MDQuery query)
Parameters:
query - The query to stop.
Original signature : void MDQueryStop(MDQueryRef)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:550

MDQueryDisableUpdates

void MDQueryDisableUpdates(MetadataLibrary.__MDQuery query)
Parameters:
query - The query for which updates are to be disabled.
Original signature : void MDQueryDisableUpdates(MDQueryRef)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:561

MDQueryEnableUpdates

void MDQueryEnableUpdates(MetadataLibrary.__MDQuery query)
Parameters:
query - The query for which updates are to be enabled.
Original signature : void MDQueryEnableUpdates(MDQueryRef)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:572

MDQueryIsGatheringComplete

boolean MDQueryIsGatheringComplete(MetadataLibrary.__MDQuery query)
Parameters:
query - The query to be interrogated.

MDQueryGetResultCount

NativeLong MDQueryGetResultCount(MetadataLibrary.__MDQuery query)
Parameters:
query - The query to be interrogated.

MDQueryGetResultAtIndex

Pointer MDQueryGetResultAtIndex(MetadataLibrary.__MDQuery query,
                                NativeLong idx)
Parameters:
query - The query to be interrogated.
idx - The index into the query's result list. If the index is
negative, or is equal to or larger than the current
number of results in the query, the behavior is undefined.

MDQueryGetIndexOfResult

NativeLong MDQueryGetIndexOfResult(MetadataLibrary.__MDQuery query,
                                   Pointer result)
Parameters:
query - The query to be interrogated.
result - The candidate result object for which to search.
If a custom create-result function has been set, and this
parameter is not a valid result object that the provided
callbacks can handle, the behavior is undefined. If a custom
create-result function has not been set, this parameter
must be a valid MDItemRef.

MDQuerySetSearchScope

void MDQuerySetSearchScope(MetadataLibrary.__MDQuery query,
                           HIServicesLibrary.__CFArray scopeDirectories,
                           int scopeOptions)
Original signature : void MDQuerySetSearchScope(MDQueryRef, CFArrayRef, OptionBits)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:912


MDQuerySetMaxCount

void MDQuerySetMaxCount(MetadataLibrary.__MDQuery query,
                        NativeLong size)
Parameters:
query - The query object to modify.
size - The maximum number of results desired.
Original signature : void MDQuerySetMaxCount(MDQueryRef, CFIndex)
native declaration : /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/Metadata.framework/Headers/MDQuery.h:967

MDSchemaCopyAllAttributes

HIServicesLibrary.__CFArray MDSchemaCopyAllAttributes()


Copyright © 2009. All Rights Reserved.