libafs: pointopoint not supported in ukernel
[openafs.git] / src / platform / DARWIN / growlagent / CFGrowlAdditions.h
1 //
2 //  CFGrowlAdditions.h
3 //  Growl
4 //
5 //  Created by Mac-arena the Bored Zo on Wed Jun 18 2004.
6 //  Copyright 2005-2006 The Growl Project.
7 //
8 // This file is under the BSD License, refer to License.txt for details
9
10 #ifndef HAVE_CFGROWLADDITIONS_H
11 #define HAVE_CFGROWLADDITIONS_H
12
13 #include "CFGrowlDefines.h"
14
15 //see GrowlApplicationBridge-Carbon.c for rationale of using NSLog.
16 extern void NSLog(STRING_TYPE format, ...);
17
18 char *createFileSystemRepresentationOfString(STRING_TYPE str);
19 STRING_TYPE createStringWithDate(DATE_TYPE date);
20
21 STRING_TYPE createStringWithContentsOfFile(STRING_TYPE filename, CFStringEncoding encoding);
22
23 //you can leave out any of these three components. to leave out the character, pass 0xffff.
24 STRING_TYPE createStringWithStringAndCharacterAndString(STRING_TYPE str0, UniChar ch, STRING_TYPE str1);
25
26 char *copyCString(STRING_TYPE str, CFStringEncoding encoding);
27
28 STRING_TYPE copyCurrentProcessName(void);
29 URL_TYPE    copyCurrentProcessURL(void);
30 STRING_TYPE copyCurrentProcessPath(void);
31
32 URL_TYPE    copyTemporaryFolderURL(void);
33 STRING_TYPE copyTemporaryFolderPath(void);
34
35 STRING_TYPE createStringWithAddressData(DATA_TYPE aAddressData);
36 STRING_TYPE createHostNameForAddressData(DATA_TYPE aAddressData);
37
38 DATA_TYPE readFile(const char *filename);
39 URL_TYPE  copyURLForApplication(STRING_TYPE appName);
40
41 /*      @function       copyIconDataForPath
42  *      @param  path    The POSIX path to the file or folder whose icon you want.
43  *      @result The icon data, in IconFamily format (same as used in the 'icns' resource and in .icns files). You are responsible for releasing this object.
44  */
45 DATA_TYPE copyIconDataForPath(STRING_TYPE path);
46 /*      @function       copyIconDataForURL
47  *      @param  URL     The URL to the file or folder whose icon you want.
48  *      @result The icon data, in IconFamily format (same as used in the 'icns' resource and in .icns files). You are responsible for releasing this object.
49  */
50 DATA_TYPE copyIconDataForURL(URL_TYPE URL);
51
52 /*      @function       createURLByMakingDirectoryAtURLWithName
53  *      @abstract       Create a directory.
54  *      @discussion     This function has a useful side effect: if you pass
55  *       <code>NULL</code> for both parameters, this function will act basically as
56  *       CFURL version of <code>getcwd</code>(3).
57  *
58  *       Also, for CF clients: the allocator used to create the returned URL will
59  *       be the allocator for the parent URL, the allocator for the name string, or
60  *       the default allocator, in that order of preference.
61  *      @param  parent  The directory in which to create the new directory. If this is <code>NULL</code>, the current working directory (as returned by <code>getcwd</code>(3)) will be used.
62  *      @param  name    The name of the directory you want to create. If this is <code>NULL</code>, the directory specified by the URL will be created.
63  *      @result The URL for the directory if it was successfully created (in which case, you are responsible for releasing this object); else, <code>NULL</code>.
64  */
65 URL_TYPE createURLByMakingDirectoryAtURLWithName(URL_TYPE parent, STRING_TYPE name);
66
67 /*      @function       createURLByCopyingFileFromURLToDirectoryURL
68  *      @param  file    The file to copy.
69  *      @param  dest    The folder to copy it to.
70  *      @result The copy. You are responsible for releasing this object.
71  */
72 URL_TYPE createURLByCopyingFileFromURLToDirectoryURL(URL_TYPE file, URL_TYPE dest);
73
74 /*      @function       createPropertyListFromURL
75  *      @abstract       Reads a property list from the contents of an URL.
76  *      @discussion     Creates a property list from the data at an URL (for example, a
77  *       file URL), and returns it.
78  *      @param  file    The file to read.
79  *      @param  mutability      A mutability-option constant indicating whether the property list (and possibly its contents) should be mutable.
80  *      @param  outFormat       If the property list is read successfully, this will point to the format of the property list. You may pass NULL if you are not interested in this information. If the property list is not read successfully, the value at this pointer will be left unchanged.
81  *      @param  outErrorString  If an error occurs, this will point to a string (which you are responsible for releasing) describing the error. You may pass NULL if you are not interested in this information. If no error occurs, the value at this pointer will be left unchanged.
82  *      @result The property list. You are responsible for releasing this object.
83  */
84 PLIST_TYPE createPropertyListFromURL(URL_TYPE file, u_int32_t mutability, CFPropertyListFormat *outFormat, STRING_TYPE *outErrorString);
85
86 #endif