[Openmcl-devel] Interface to Mac OS X InstantMessage framework?
Joseph Oswald
josephoswald at gmail.com
Sun Aug 6 10:47:31 PDT 2006
I'm using OpenMCL 1.0 under OS X 10.4.7.
I'm not yet able to comprehend cl-xmpp enough to get it working, and
my second choice is to try to use Apple's own instant messaging
support to send AIM/Jabber messages from Lisp.
I've tried using FFIGEN (the one in
ffigen-bin-darwinppc-gcc-4.0.0-2005-05-17-11-45-56.tar) to generate
IMService.ffi, which seems to work, but when I try
(require "PARSE-FFI")
(ccl::parse-standard-ffi-files :instantmessage)
Get an error message around Line 120 of IMService.ffi
(type ("/usr/include/ppc/_types.h" 31)
"__int8_t"
(signed-char ()))
to the effect of
#P"/Applications/OpenMCL/ccl_1.0/darwin-headers/instantmessage/C/System/Library/Frameworks/InstantMessage.framework/Headers/IMService.ffi"
...
> Error in process listener(1): value #<Unbound> is not of the expected type (COMMON-LISP:OR COMMON-LISP:STRING COMMON-LISP:SYMBOL COMMON-LISP:CHARACTER).
> While executing: COMMON-LISP:STRING
> Type :POP to abort.
Type :? for other options.
1 > :b
(F0135AF0) : 0 "COMMON-LISP:STRING" 200
(F0135B00) : 1 "CCL::STRING-START-END" 48
(F0135B10) : 2 COMMON-LISP:NIL NIL
(F0135B20) : 3 "COMMON-LISP:STRING=" 260
(F0135B30) : 4 "CCL::%HASH-PROBE" 2212
(F0135B40) : 5 "COMMON-LISP:GETHASH" 452
(F0135B50) : 6 "CCL::FIND-OR-CREATE-FFI-TYPEDEF" 44
(F0135B60) : 7 "CCL::PROCESS-FFI-TYPEDEF" 80
(F0135B70) : 8 "CCL::PARSE-FFI" 976
(F0135B90) : 9 "CCL::PARSE-STANDARD-FFI-FILES" 812
...
1 > (:f 5)
(F0135B40) : 5 "COMMON-LISP:GETHASH" 452
0 CCL::KEY: "__int8_t" ("required")
1 CCL::DEFAULT: COMMON-LISP:NIL ("required")
2 : "__int8_t" ("saved SAVE0")
3 : (:TYPE ("/usr/include/ppc/_types.h" 31) "__int8_t" (:SIGNED-CHAR
COMMON-LISP:NIL)) ("saved SAVE1")
4 : #<FFI-MACRO NIL #x84947B6> ("saved SAVE2")
5 : COMMON-LISP:NIL ("saved SAVE3")
6 : #<HASH-TABLE :TEST COMMON-LISP:EQUAL size 12/60 #x849D2D6> ("saved SAVE4")
7 : COMMON-LISP:MAKE-HASH-TABLE ("saved SAVE5")
8 CCL::INTERRUPT-LEVEL: 0
9 : #<Compiled-function CCL::GENERAL-HASH-FIND #x80167E6>
1 > (:f 4)
(F0135B30) : 4 "CCL::%HASH-PROBE" 2212
0 CCL::HASH: #<HASH-TABLE :TEST COMMON-LISP:STRING= size 0/60
#x849DE96> ("required")
1 CCL::UPDATE-HASH-FLAGS: COMMON-LISP:NIL ("required")
2 : #<HASH-TABLE-VECTOR #x849DF06> ("saved SAVE0")
3 : #<HASH-TABLE :TEST COMMON-LISP:STRING= size 0/60 #x849DE96>
("saved SAVE1")
4 : COMMON-LISP:NIL ("saved SAVE2")
5 : COMMON-LISP:NIL ("saved SAVE3")
6 : #<HASH-TABLE :TEST COMMON-LISP:EQUAL size 12/60 #x849D2D6> ("saved SAVE4")
7 : COMMON-LISP:MAKE-HASH-TABLE ("saved SAVE5")
8 : #<FILE-CHARACTER-INPUT-STREAM
("/Applications/OpenMCL/ccl_1.0/darwin-headers/instantmessage/C/System/Library/Frameworks/InstantMessage.framework/Headers/IMService.ffi"/11)
#x849CEBE> ("saved SAVE6")
9 : CCL:STRUCTURE-TYPEP ("saved SAVE7")
10 CCL::HASH-CODE: 277107718
11 : 43
12 : 71
13 CCL::COMPAREF: COMMON-LISP:STRING=
1 > (:f 3)
(F0135B20) : 3 "COMMON-LISP:STRING=" 260
0 : "__int8_t" ("required")
1 : #<Unbound> ("required")
2 : COMMON-LISP:NIL ("keyword")
3 : COMMON-LISP:NIL ("key-supplied-p")
4 : COMMON-LISP:NIL ("keyword")
5 : COMMON-LISP:NIL ("key-supplied-p")
6 : COMMON-LISP:NIL ("keyword")
7 : COMMON-LISP:NIL ("key-supplied-p")
8 : COMMON-LISP:NIL ("keyword")
9 : COMMON-LISP:NIL ("key-supplied-p")
10 : 43 ("saved SAVE0")
11 : 96 ("saved SAVE1")
12 : COMMON-LISP:NIL ("saved SAVE2")
13 : #<Unbound> ("saved SAVE3")
14 : "__int8_t" ("saved SAVE4")
15 : 71 ("saved SAVE5")
1 >
Questions
1) Is it actually necessary to have FFI definitions to use the
InstantMessage framework from OpenMCL?
2) Is this a bug in parse-ffi?
3) To workaround it, can I just comment out enough of the .ffi file to
get parse-ffi to work?
4) Has anyone else been able to use the InstantMessage framework, and
have some example code?
Thanks for any help.
--Joe Oswald
More information about the Openmcl-devel
mailing list