LibreOffice Module extensions (master) 1
SpotlightImporterTester/SpotlightImporterTester/main.m
Go to the documentation of this file.
1/* -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3#import <stdio.h>
4
5#import <CoreFoundation/CoreFoundation.h>
6#import <CoreServices/CoreServices.h>
7#import <Foundation/Foundation.h>
8
10
11int main(int argc, const char* argv[])
12{
13 @autoreleasepool
14 {
15 if (argc != 3)
16 {
17 fprintf(stderr, "Usage: %s UTI path\n", argv[0]);
18 return 1;
19 }
20 NSMutableDictionary* attributes = [NSMutableDictionary dictionaryWithCapacity:10];
21 NSString* contentTypeUTI = [NSString stringWithUTF8String:argv[1]];
22 NSString* pathToFile = [NSString stringWithUTF8String:argv[2]];
23
24 GetMetadataForFile(NULL, (__bridge CFMutableDictionaryRef)attributes,
25 (__bridge CFStringRef)contentTypeUTI, (__bridge CFStringRef)pathToFile);
26 }
27 return 0;
28}
29
30/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile)
int main(int argc, const char *argv[])
return NULL
Definition: main.m:208