Date post: | 18-Dec-2014 |
Category: |
Economy & Finance |
Upload: | phil-wolff |
View: | 9,318 times |
Download: | 2 times |
Skype Development Techniques and ToolsAn Overview
eBay Developers Program 2007
Peter KalmströmPM Skype Toolbars
Share, Reuse, and Remix This Talk
© 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.
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.
Overview Components
JavaScriptover COM
Webpresence
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
Communicating via the Skype Client
Manipulating the Skype client II
• Control dialogs• Focus• Silent mode
• Add items to the Do-more menu
Expression
• Help users express themselves by controlling:
– Mood messages– Avatars – Online status
Cross-Platform API
• Works by operating system messaging– Register for messages– Listen for messages– Send messages
• Text-based
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
Set First Call on Hold ...
-> SET CALL 1540 STATUS ONHOLD <- CALL 1540 STATUS INPROGRESS <- CALL 1540 STATUS ONHOLD
-> CALL echo123 <- CALL 1545 STATUS ROUTING <- CALL 1545 SUBJECT <- CALL 1545 STATUS ROUTING <- CALL 1545 STATUS RINGING <- CALL 1545 STATUS INPROGRESS
• .. and make another call!
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
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
COM-Wrapper
• Reduces the complexity of Skype-based development– Object-oriented
programming – Collections
(users, chats, calls, and much more)
– Objects– Properties– Events
C# COM Example
SKYPE4COMLib.Skype objSkype;SKYPE4COMLib.Call objCallOne, objCallTwo;
objSkype = new SKYPE4COMLib.Skype(); objSkype.Attach(7,true);
objCallOne = objSkype.PlaceCall("test","","","");while (objCallOne.Status != SKYPE4COMLib.TCallStatus.clsInProgress){ }objCallOne.Hold();
objCallTwo = objSkype.PlaceCall("echo123", "", "", "");while (objCallTwo.Status != SKYPE4COMLib.TCallStatus.clsInProgress){}
objCallTwo.Join(objCallOne.Id);
Coding with the COM API—A Few Practical Tips
• Timeout property• Client object• Application object• Skype object
Java Wrapper
• Java power• Entire wrapper
is open source• Write once, run on
Windows/Mac/Linux
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("I'm working. Please, wait a moment.");• }• }• });• }• }
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
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
Phone Number Manipulation—PNR
• Advanced text parsing algorithm• Phone numbers
– Find– Validate– Analyze
• ActiveX• Country selectors,
flags and dropdowns
Web
• See online status for any Skype user
• Presence information drives communication
Web Presence—SkypeWeb 1.1
• mystatus.skype.com/SkypeUserName• Localized in ten languages• Five image formats• skypeName.mystatus.skype.com DNS query option
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-330BCB402664codebase="http://www.yoursite.com/Skype4COM.dll" >
<span style="color: red">Failed to load control.</span> </object> </body> </html>
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
Skype Extra SDK & Publishing Studio
Other Tools
• SkypeTracer• Skype icons• Skype strings• SkypeCasts javascript
Q&AContact information:
Peter KalmströmSkype:peter.kalmstrom.nu
developer.skype.comSharing is goodLocalization is vitalCertification paths
Questions?To learn more, visitpages.ebay.com/devcon/
Thank you!Please give your completed session evaluation to the room monitor as you exit. Your feedback is extremely valuable to us!