2012/09/20

Common Lisp から Skype を使う

なんだ。簡単だった。

dbus 経由。

リファレンス http://developer.skype.com/public-api-reference#Linux

(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :dbus))

(defpackage :try-dbus
(:use :cl :dbus))

(in-package :try-dbus)

(with-open-bus (bus (session-server-addresses))
(with-introspected-object (skype
bus
"/com/Skype"
"com.Skype.API")
(flet ((skype (command)
(skype "com.Skype.API" "Invoke" command)))
(print (skype "NAME FromCommonLisp"))
(print (skype "PROTOCOL 8"))
(print (skype "GET USERSTATUS"))
(print (skype "PING"))
;; #xxx... はチャットルームの ID
(skype "CHATMESSAGE #xxxxxxx/$yyyyyyy;9999aaaa9999 てすとです(f)"))))

0 件のコメント: