SkypeKit is a proprietary Skype SDK. In principle, the only tool for creating alternative Skype clients today. The product is interesting, but it has a sufficient number of problems that can cause disappointment in an inspired developer.

The fact that Skype has opened its SDK already written on Habré. Therefore, the topic will be directly about the practical sense of using SkypeKit and its pitfalls.
1. Registration
I also registered when SkypeKit was in beta, and this could only be obtained by an invite and when they were not given keys for distribution for free in principle.
However, now anyone can enter, just go to
developer.skype.com , fill in a simple form and pay $ 10 in blood money (debited from the Skype account).
Great advice: read the license agreements carefully, they are quite severe. About licenses there will be a separate conversation later. It can be summarized as follows: “Skype tried to get up to meet the developers, but could not part with the proprietary brain.” In relative legal security, only developers are a piece of hardware.
Then you will have the opportunity to invite other users to your organization, but still they will be asked to pay 10 bucks from everyone, although in fact they can not be paid, just let the new users have everything they need to develop junk, they can log in (
information has not been updated for a long time) I can be wrong ). More than 100 people in the organization can not be.
2. Getting the SDK and Runtime
The fun starts from this moment. By accessing
developer.skype.com/skypekit/sdks you will find an offer to download SkypeKit Multi-OS SDK, but there really is little reason for joy. In this package, in addition to the header files for C ++, Java and Python, and a few examples in these languages ​​you will not find almost anything. Where is the promised skype you ask? But the figs will just give you a runtime, pay 10 bucks and only after that at the bottom of the page will appear “Request a runtime”. The list of available platforms is quite extensive: Windows, Linux, Mac with code in x86, ARM (v5, v6, v7) and MIPS (both little and big-endian). But you will be surprised: video calls are supported only by the version for Linux (and on all types of CPUs). Aww, Microsoft, where are you looking?
ATTENTION! Each runtime is collected specifically for you and contains a wired identifier that allows you
to take anal slavery to calculate. The resulting runtime is identified with your registered organization. And during development it is possible to login only those accounts that are in your organization.
3. Getting the key
First you need to register the application on
developer.skype.com/applications . But there are funny moments:
- Up to 50 applications can be created for a single organization;
- To be able to distribute most applications, you need to pass a certification test, which costs $ 4000 and in case of failure, the next test will cost the same
- But from the previous rule there are 3 exceptions: the usual programs for Windows and Mac (without Linux), mobile applications and web applications. In this case, “Distribution keypair” can be obtained without passing the tests and spending money, but you will have to accept a very strange license agreement
- Development keypair is available for all applications, but it is valid only for 60 days. Moreover, when adding new users to the organization, they will not be able to use the previously obtained key.
- So that you can get a normal key later, just specify: only x86, only Windows and Standard Win / Mac application (the latter will not be changed afterwards)
4. Unpack the received goodAnd so we have the SDK, Runtime and Development keypair. We unpack the SDK in a convenient place, we put the runtime in the right place in% SDK% / bin, we also create a place for the key.
Surely you will want to run the examples, but this is not so simple. For starters, they need to know where the key lies. To do this, edit the keypair.h, token.py and AppKeyPairMgr.java and enter the desired path. I really do not advise the soul to
get a grasp of any code - there is the
most terrible bydlokod! (
I will give a couple of examples later )
If you have runtime with VoicePCM / VoiceRTP or VideoRTP support, then you will have to collect stubs for RTP / PCM (they are included), and then put the assemblies in one directory with runtime. For voice in SAL mode (Skype audio library) and without a video, nothing is needed. The runskypekit.py script is used to run the runtime, you can edit it a bit and get a convenient runtime launch tool along with voice and video handlers (without them, the runtime stupidly falls).
Now you can collect examples (in the case of Python, just run it before running runtime). VisualStudio examples are collected without any problems. You can have fun.
')
5. SDK Features
There are some features:
- You cannot run multiple runtimes on the same machine.
- For communication with runtime SDK uses sockets
- You can use multiple accounts through one runtime.
- Python code is written as if it was written by a Hindu who knows only C ++.
- The SDK code is only compatible with runtimes of the same version.
You can study the SDK yourself, you can also download it from me:
goo.gl/3egQi (there is no runtime or something personalized there).
6. Examples of bydlocoda
if(input_started) { unsigned int samples_returned = output_buf.size() /( 2 * numOfOutputChannels ); if(input_buf[(input_p % INPUT_BUF_ARRAY_SIZE)].size() != samples_returned * 2) input_buf[(input_p % INPUT_BUF_ARRAY_SIZE)].resize(samples_returned * 2); if(input_muted) { memset((char*)input_buf[(input_p % INPUT_BUF_ARRAY_SIZE)].data(), 0, input_buf[(input_p % INPUT_BUF_ARRAY_SIZE)].size()); } else if(numOfOutputChannels > 1) { short* ob = (short*) output_buf.data(); short* ib = (short*) input_buf[(input_p % INPUT_BUF_ARRAY_SIZE)].data(); for(unsigned int i = 0 ; i < samples_returned; i ++) { ib[i] = ob[i * numOfOutputChannels]; } } else { input_buf[(input_p % INPUT_BUF_ARRAY_SIZE)] = output_buf; } int input_samples_returned = input_buf[(input_p + 1) % INPUT_BUF_ARRAY_SIZE].size() / 2; m_transport->InputDeviceReady(input_samples_returned,input_sampleRate,1, input_buf[(input_p + 1) % INPUT_BUF_ARRAY_SIZE]); } }
Yes, several long lines were transferred here, but this didn’t spoil the code much. I do not know what to tear off for the simultaneous use of tabs and spaces in the indents.
And this is generally an example of "with love from India"
switch (propid) { case 4: return &skylibFields[689]; case 5: return &skylibFields[690]; case 7: return &skylibFields[691]; case 8: return &skylibFields[692]; case 9: return &skylibFields[693]; case 10: return &skylibFields[694]; case 11: return &skylibFields[695]; case 12: return &skylibFields[696]; case 13: return &skylibFields[697]; case 14: return &skylibFields[698]; case 15: return &skylibFields[699]; case 16: return &skylibFields[700]; case 17: return &skylibFields[701]; case 18: return &skylibFields[702]; case 19: return &skylibFields[703]; case 26: return &skylibFields[704]; case 27: return &skylibFields[705]; case 28: return &skylibFields[706]; case 34: return &skylibFields[707]; case 37: return &skylibFields[708]; case 70: return &skylibFields[709]; case 71: return &skylibFields[710]; case 72: return &skylibFields[711]; case 73: return &skylibFields[712]; case 74: return &skylibFields[713]; case 75: return &skylibFields[714]; case 76: return &skylibFields[715]; case 77: return &skylibFields[716]; case 78: return &skylibFields[717]; case 79: return &skylibFields[718]; case 160: return &skylibFields[719]; case 161: return &skylibFields[720]; case 162: return &skylibFields[721]; case 163: return &skylibFields[722]; case 164: return &skylibFields[723]; case 165: return &skylibFields[724]; case 166: return &skylibFields[725]; case 168: return &skylibFields[726]; case 169: return &skylibFields[727]; case 182: return &skylibFields[728]; case 183: return &skylibFields[729]; case 205: return &skylibFields[730]; case 773: return &skylibFields[731]; case 800: return &skylibFields[732]; case 801: return &skylibFields[733]; case 802: return &skylibFields[734]; case 804: return &skylibFields[735]; default: break; }
Well, you can also say that it is not necessary to put a semicolon in the python after the end of the line. And then the line, the line syk. I don't know if they even have any Code Style Conventions.
7. License agreements
This text will greet you with runtime:
SkypeRuntime Copyright (C) 2003-2011 Skype Technologies SA
SkypeRuntime Version: 3.4.1/windows-x86-skypekit-novideo_3.4.1.339_%_%
Proprietary and confidential, do not share this application.
And as a matter of fact: the agreement of
times and the agreement
twoParticularly pleased quote:
4.3. You are expressly prohibited from:
4.3.1. It is available on End Users ;
4.3.2. licensing, selling , marketing distributing or otherwise making available:
4.3.2.1. Any Hardware Product Directly (or indirectly through value channels) to small, medium or large businesses or enterprises;
4.3.2.2. Development of the License Agreement.That is, they say that it is impossible to sell pieces of iron to legal entities, even if they are retail chains. Well gentlemen, I'm sorry, but this is some impossible condition. I wonder how Samsung built Skype into their TVs?
8. In the end
I will give a small example of code on python:
import sys, time, SkyLib accountName = sys.argv[1] accountPsw = sys.argv[2] keyFileName = sys.argv[3] def AccountOnChange (self, property_name): if property_name == 'status': if self.status == 'LOGGED_IN': print 'Login complete.' SkyLib.Account.OnPropertyChange = AccountOnChange def OnMessage(self, message, changesInboxTimestamp, supersedesHistoryMessage, conversation): if message.author != accountName: print(message.author_displayname + ': ' + message.body_xml) conversation.PostText('Automated reply.', False) SkyLib.SkyLib.OnMessage = OnMessage skype = SkyLib.GetSkyLib(keyFileName) account = skype.GetAccount(accountName) print 'Logging in with ' + accountName account.LoginWithPassword(accountPsw, False, False) while account.status != 'LOGGED_IN': time.sleep(1) print 'Now accepting incoming chat messages.' print 'Press ENTER to quit.' raw_input('') skype.stop()
Despite the simplicity, this program receives messages in Skype and automatically responds to them. Although the event excitation method strongly smacks of C ++, where a class is inherited for this purpose. But in python it looks a little rough. But you can easily write a class - an event handler and write more beautifully. But it already tastes programmer.
In principle, SkypeKit turned out to be quite an interesting product, but it would be worthwhile to revise the licensing policy and remove the bydlock from the SDK. Personally, I absolutely do not care what the code was when writing Skype (it was compiled and all), but to look at the code in the SDK I, honestly, disgusted. Well, you could hire smart programmers to write a backend for runtime, because there’s not that much code. In general, the API is normally documented and after some tinkering comes an understanding of how it all works. The product is raw, although it is not the first year.
My plans include writing a Skype <-> XMPP transport, so I’ll eat into the libjingle device. so you can call. But I am not sure that after writing I will be able to distribute it in such licensing conditions.
Good luck! Make your skype with blackjack and whatever you want.
You decide whether you need it or not. But in my opinion you should not spare 10 dollars at least for the sake of interest. But building grand plans is also very difficult.