Skype Development Techniques and Tools

10,136 views

Published on

Peter Kalmstrom. Skype is offering a range of different tools and techniques for developers. Controlling the Skype client via the API, showing presence on the web or building a Skype extra. All will be covered!

Published in: Economy & Finance, Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
10,136
On SlideShare
0
From Embeds
0
Number of Embeds
74
Actions
Shares
0
Downloads
303
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Skype Development Techniques and Tools

  1. 1. Skype Development Techniques and Tools An Overview eBay Developers Program 2007 Peter Kalmström PM Skype Toolbars
  2. 2. Share, Reuse, and Remix This Talk These slides are available under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. You can blog, photograph, and share this information with others. Don’t forget to tag it ebaydevcon and ebaydevcon07. © 2007 eBay Inc. Some rights reserved. eBay and the eBay logo are among the registered trademarks of eBay Inc., PayPal and the PayPal logo are registered trademarks of PayPal, Inc., Skype and the Skype logo are trademarks of Skype Limited Corp., Shopping.com and the Shopping.com logo are trademarks of Shopping.com Ltd. Other trademarks and brands are the property of their respective owners.
  3. 3. Overview Components JavaScript over COM Web presence
  4. 4. Techniques Manipulating the Skype client • Cross-platform API – COM-wrapper – Java wrapper – URIs – Phone number manipulation—PNR – Web • Web presence—SkypeWeb 1.1 – Skype COM via javascript – The URIs – Building a Skype Extra •
  5. 5. Communicating via the Skype Client
  6. 6. Manipulating the Skype client II Control dialogs • Focus • Silent mode • Add items to the • Do-more menu
  7. 7. Expression Help users express • themselves by controlling: Mood messages – Avatars – Online status –
  8. 8. Cross-Platform API Works by operating system messaging • Register for messages – Listen for messages – Send messages – Text-based •
  9. 9. Make the First Call—API Example -> CALL test <- CALL 1540 STATUS ROUTING <- CALL 1540 SUBJECT <- CALL 1540 STATUS ROUTING <- CALL 1540 STATUS RINGING <- CALL 1540 STATUS INPROGRESS
  10. 10. Set First Call on Hold ... -> SET CALL 1540 STATUS ONHOLD <- CALL 1540 STATUS INPROGRESS <- CALL 1540 STATUS ONHOLD .. and make another call! • -> CALL echo123 <- CALL 1545 STATUS ROUTING <- CALL 1545 SUBJECT <- CALL 1545 STATUS ROUTING <- CALL 1545 STATUS RINGING <- CALL 1545 STATUS INPROGRESS
  11. 11. Join Second Call (1545) into Conference with First Call (1540) -> SET CALL 1545 JOIN_CONFERENCE 1540 <- CALL 1545 CONF_ID 17930 <- CALL 1545 CONF_ID 17930 <- CALL 1540 CONF_ID 17930
  12. 12. First Call Is Automatically Resumed and Joined to Conference <- CALL 1540 STATUS INPROGRESS <- CALL 1540 DURATION 53 <- CALL 1540 STATUS FINISHED <- CALL 1545 DURATION 23 <- CALL 1545 STATUS FINISHED
  13. 13. COM-Wrapper Reduces the • complexity of Skype- based development – Object-oriented programming – Collections (users, chats, calls, and much more) – Objects – Properties – Events
  14. 14. C# COM Example SKYPE4COMLib.Skype objSkype; SKYPE4COMLib.Call objCallOne, objCallTwo; objSkype = new SKYPE4COMLib.Skype(); objSkype.Attach(7,true); objCallOne = objSkype.PlaceCall(quot;testquot;,quot;quot;,quot;quot;,quot;quot;); while (objCallOne.Status != SKYPE4COMLib.TCallStatus.clsInProgress){ } objCallOne.Hold(); objCallTwo = objSkype.PlaceCall(quot;echo123quot;, quot;quot;, quot;quot;, quot;quot;); while (objCallTwo.Status != SKYPE4COMLib.TCallStatus.clsInProgress){} objCallTwo.Join(objCallOne.Id);
  15. 15. Coding with the COM API— A Few Practical Tips Timeout property • • Client object • Application object • Skype object
  16. 16. Java Wrapper Java power • • Entire wrapper is open source • Write once, run on Windows/Mac/Linux
  17. 17. Java Example package com.skype.sample; • import com.skype.ChatMessage; • import com.skype.ChatMessageAdapter; • import com.skype.Skype; • import com.skype.SkypeException; • public class AutoAnswering { • public static void main(String[]args)throws Exception { • Skype.setDeamon(false); // to prevent exiting from this program • Skype.addChatMessageListener(new ChatMessageAdapter() { • public void chatMessageReceived(ChatMessage received)throws SkypeException { • if (received.getType().equals(ChatMessage.Type.SAID)) { • received.getSender().send(quot;I'm working. Please, wait a moment.quot;); • } • } • }); • } • } •
  18. 18. URIs Since Skype 1.4 skype: links have been • supported • Can be used on any Web page or in any application that supports hyperlinks • No authorization required • Skype MS Office toolbar + Skype Web plug-ins only use URIs
  19. 19. Skype URI Examples skype: skype:[targets] skype:[targets]?call skype:[skypenames]?chat skype:[skypename]?voicemail skype:[skypename]?add skype:[skypenames]?sendfile skype:[skypename]?userinfo skype:[PSTN]?sms
  20. 20. Phone Number Manipulation—PNR Advanced text parsing algorithm • • Phone numbers Find – Validate – Analyze – ActiveX • • Country selectors, flags and dropdowns
  21. 21. Web • See online status for any Skype user • Presence information drives communication
  22. 22. Web Presence—SkypeWeb 1.1 mystatus.skype.com/SkypeUserName • Localized in ten languages • Five image formats • skypeName.mystatus.skype.com DNS query option •
  23. 23. Skype COM via Javascript Windows-based ActiveX-component • Internet Explorer only • Skype client needs to be installed • <html> <body> <object id=Skype name=Skype height=0 width=0 classid=clsid:830690FC-BF2F-47A6-AC2D-330BCB402664 codebase=quot;http://www.yoursite.com/Skype4COM.dllquot; > <span style=quot;color: redquot;>Failed to load control.</span> </object> </body> </html>
  24. 24. Building a Skype Extra Skype Extras SDK • • Software distribution and DRM-system • Distribute many types of applications Exe – DLL – DHTML – Java – SDK embeds your application • into Skype-distribution package
  25. 25. Skype Extra SDK & Publishing Studio
  26. 26. Other Tools SkypeTracer • • Skype icons • Skype strings • SkypeCasts javascript
  27. 27. Q&A Contact information: Peter Kalmström Skype:peter.kalmstrom.nu
  28. 28. Thank you! Please give your completed session evaluation to the room monitor as you exit. Your feedback is extremely valuable to us! developer.skype.com Sharing is good Localization is vital Certification paths Questions? To learn more, visit pages.ebay.com/devcon/

×