jami
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ring] GSoC Houmin


From: Stepan Salenikovich
Subject: Re: [Ring] GSoC Houmin
Date: Wed, 28 Jun 2017 09:06:00 -0400

Hi Houmin,
I took a quick look at your work so far. I didn't have time to analyze
all of it, but
here are some overall comments.

First, this is probably my mistake because I gave you the dbus and rest clients
as examples, but your code should not have to be in the rind-daemon/bin dir to
work. It should be in its own dir/repository and only need the dring.h header,
not all of the daemon source to compile/run. Note, you can keep your main
loop in the same style, but maybe a better example would be the win32 client
or the osx client, which link to the daemon, but are not built in the
its /bin dir.

My second comment is that you should copy as little code / functionality as
possible. Not because we don't want you to copy, but because you should only
have the code which you absolutely need. More code = more bugs :)
Specially, I saw that you re-created the presence manager, config manager, etc
But for now your client only needs to be able to register an account and
send/receive text messages. So ideally you should only have handlers and
functions which take care of that. This is important for many reasons:
* you make sure that you understand all the code you're using
* its easier for you and us to review and find any bugs
* is easier to make small commits and everyone likes small commits
  (for pretty much the same reasons)
* more code = more bugs

As for autotools, its up to you. You're free to use a simple Makefile if thats
easier for you.

I would say that these 2 points should be what you concentrate on now.

As you're reducing your code and making it independent of the ring-daemon/bin
directory. Feel free to send patches for review to the ring-client-iot
gerrit if you
want some feedback; otherwise you can start pushing directly there for now.

-stepan


On Sat, Jun 24, 2017 at 12:28 PM, Houmin <address@hidden> wrote:
> ************ Report of Week3 **********************
> This week, I finished the skeleton code for *ring-client-iot*.
>
> I am doing my work under ring-daemon/bin directory now. Like dbus client and
> rest client, I create my own iot directoy for my iot client. To make it
> compile ok, I also modify the configure.ac under ring-daemon directory. At
> the same time, I modify the Makefile.am and main.cpp to compile my own iot
> client.
>
> After all this compile stuff setting done, with
> ./autogen.sh
> ./configure --with-iot
> make
> We can get our ring client iot under ring-daemon/bin/ directory now.
>
> Up to now, the iot client can register a Ring Account, it can also receive
> and send Ring text messages. Actually, we just do some wrapper of the dring
> API, like *configurationmanager*,
> *callmanager*,*presencemanager*,*videomanager*. This is what we do in
> dbus/rest client. Then I create a main loop for the iot client. In the loop,
> we will poll events, for which part I just handle the receiving a message by
> installed a incomingAccountMessage handler. We will also send our message to
> the destination, even though the message and destination are all hardcoded.
>
> My code is here: https://github.com/SimpCosm/ring-client-iot
>
> This just contains my work part, not all the ring daemon code. By the way,
> the ring daemon is based on Ring beta2.
>
> Plan for week4:
> - change Makefile to realize the compilation of ring client iot independent
> with the ring daemon. Since the ring daemon src code can provide us with a
> *libring.a* static library, maybe we just need the libring.a locally and
> write a Makefile. I am wondering if the automake tools are still needed.
>
> - reconsidering the account register process of Ring. I once tried to import
> Ring Account that we have created using gnome-ring using the
> .local/share/ring/b67a55fbac7b06a0/export.gz by the *importAccounts* API,
> but it failed. Then I use the *addAccount* API to create a new Ring Account.
> It worked, but the code is ugly, you can see it
> here(https://github.com/SimpCosm/ring-client-iot/blob/master/iot/iotclient.cpp).
> And everytime I start the iot client process, I have to create a new Ring
> Account. This can be bothering, and I have to deal with it. To do this, I
> need to have a deep understanding about the Ring account stuff.
>
>
>
> ———————————————————————————————————————
> Houmin Wei  ( 魏后民 )
> Undergraduate,School of Electronics Engineering and Computer Science
> Peking University, Beijing, 100871.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]