LibreOffice Module extensions (master)
1
extensions
source
macosx
spotlight
SpotlightImporterTester
SpotlightImporterTester
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
9
#import "
GetMetadataForFile.h
"
10
11
int
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: */
GetMetadataForFile.h
GetMetadataForFile
Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile)
Definition:
GetMetadataForFile.m:34
main
int main(int argc, const char *argv[])
Definition:
SpotlightImporterTester/SpotlightImporterTester/main.m:11
NULL
return NULL
Definition:
main.m:208
Generated on Sun Jul 30 2023 04:39:39 for LibreOffice Module extensions (master) by
1.9.3