Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New methods #1

Open
frsela opened this issue Dec 14, 2012 · 7 comments
Open

New methods #1

frsela opened this issue Dec 14, 2012 · 7 comments

Comments

@frsela
Copy link

frsela commented Dec 14, 2012

I suggest these methods for mozPush API:

The difference with unregisterUA is that unregister will purge all info on server database while disconnect only inform the server about innaccesible device.

If you are in WS is redundant (the WS onclose is enough) but this new method should be used on UDP connections and when the handset is closed in an ordered way (onreset, onpoweroff, ...)

  • getRegisteredApps()

Returns an array of registered apps

  • unregisterURL()

Unregister the URL to no receive more notifications. This also shall inform the server to avoid sending more notifications to this app

  • unregister() - Only on development to allow start from scratch avoiding reflash again :)
@frsela
Copy link
Author

frsela commented Dec 14, 2012

And what about a status attribute or event? -> Which informs about the connected or disconnected state. if it's using wakeup, ...

@willyaranda
Copy link

  • Agree o differenciate disconnect vs unregister
  • I'm not sure about getRegisteredApps, because this is done on registerUA. The other use case is to have a Gaia app that shows current registered apps, so this will be an API for gecko, right?
  • unregisterURL is revokeURL, right?

@frsela
Copy link
Author

frsela commented Dec 14, 2012

Yeap, is to be used in the config. app ;) - https://github.com/frsela/notification_server/tree/push_setup_tool

@acperez
Copy link
Owner

acperez commented Dec 14, 2012

The only benefit I see with disconect is to avoid to send some udp notifications to the notification server, am I right?

Regarding to the unregister, maybe is better to call it clean(), and it should delete tokens and ua token. What do you think?

@frsela
Copy link
Author

frsela commented Dec 14, 2012

Yes, the disconnect method is to avoid resources consuming at server side for nothing.

Also, this could be useful to update presence information at server side (a chat between willy and me to offer extra information to AS about their users)

Regarding the clean method is OK for me, but you should unregister it on the server to clean resources ;)

@acperez
Copy link
Owner

acperez commented Dec 14, 2012

It would be great to have an UnregisterUA in the server side to avoid the client of sending a request for app. I can send the unregisterUA token and when I receive a 200 response I clean tokens db and ua

@frsela
Copy link
Author

frsela commented Dec 14, 2012

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@willyaranda @acperez @frsela and others