[sip-comm-dev] Some questions


#1

Hello everybody,

My project is to implement proxy support in sip communicator. I have some
doubt while development although some of these questions may seem stupid.

1. I have implemented global proxy setting as a configuration form which
appears in settings menu as a separate tab but I need to store the global
proxy information. Where to store the info. I solution that I can thought is
to create a new class in utils to store this info. Is this method a good one
or configuration form gives some generic handler to store the info as
registration wizard gives MAP at the time of implementation containing all
the data regarding user account.

2. My second question is about implementing proxy support in the protocols
that still don't have it. I was browsing and saw that several projects are
not active for a long duration about 1 yr or so. I will quote the example
for smack library. It was very active till june 2007 (
http://www.igniterealtime.org/issues/browse/SMACK). Even when i searched for
proxy support in smack, i found somebody has submitted a patch (
http://www.igniterealtime.org/issues/browse/SMACK-226) about a year ago but
has not still implemented. How should I consider these cases?
The solution that I can think of is to prepare a patch and submit it to the
library and wait them to incorporate it in future releases. Also, in the
mean time we should be apply the patch to over libs.
Any better suggestions or ideas....

Atul Aggarwal


#2

I have implemented global proxy setting as a configuration form which
appears in settings menu as a separate tab but I need to store the global
proxy information. Where to store the info.

I think that you're looking for the
FileAccessService<http://dev.sip-communicator.org/api/net/java/sip/communicator/service/fileaccess/FileAccessService.html>.
This allows persistence of the user's configurations (for Linux this is in *
~/.sip-communicator/*). An example of its usage can be found in:
*net.java.sip.communicator.impl.contactlist.MclStorageManager*

In short all you need to reference a persistent file is something like:
    private static final Logger logger = Logger.getLogger(YourClass.class);

    synchronized void start(BundleContext bc)
    {
            String customPath = "fileYouWant";
            File customFile;
            try
            {
                // Gets file access service to reference persistent storage
of the user
                ServiceReference faServiceReference =
bc.getServiceReference(FileAccessService.class.getName());
                FileAccessService faService = (FileAccessService)
bc.getService(faServiceReference);
                customFile = faService.getPrivatePersistentFile(customPath);
            }
            catch (Exception exc)
            {
                String msg = "unable to secure resource";
                logger.error(msg, exc);
            }

        // ... do what you want and eat pie
    }

Hope I didn't misunderstand what you're trying to do... cheers! -Galen

···

On Fri, Jun 6, 2008 at 1:26 PM, Atul Aggarwal <searchatul@gmail.com> wrote:

Hello everybody,

My project is to implement proxy support in sip communicator. I have some
doubt while development although some of these questions may seem stupid.

1. I have implemented global proxy setting as a configuration form which
appears in settings menu as a separate tab but I need to store the global
proxy information. Where to store the info. I solution that I can thought is
to create a new class in utils to store this info. Is this method a good one
or configuration form gives some generic handler to store the info as
registration wizard gives MAP at the time of implementation containing all
the data regarding user account.

2. My second question is about implementing proxy support in the protocols
that still don't have it. I was browsing and saw that several projects are
not active for a long duration about 1 yr or so. I will quote the example
for smack library. It was very active till june 2007 (
http://www.igniterealtime.org/issues/browse/SMACK). Even when i searched
for proxy support in smack, i found somebody has submitted a patch (
http://www.igniterealtime.org/issues/browse/SMACK-226) about a year ago
but has not still implemented. How should I consider these cases?
The solution that I can think of is to prepare a patch and submit it to the
library and wait them to incorporate it in future releases. Also, in the
mean time we should be apply the patch to over libs.
Any better suggestions or ideas....

Atul Aggarwal


#3

Thanks again for your help. You have understood the problem correctly.

Atul Aggarwal

···

On Sat, Jun 7, 2008 at 4:59 AM, Damian Johnson <atagar1@gmail.com> wrote:

I have implemented global proxy setting as a configuration form which

appears in settings menu as a separate tab but I need to store the global
proxy information. Where to store the info.

I think that you're looking for the FileAccessService<http://dev.sip-communicator.org/api/net/java/sip/communicator/service/fileaccess/FileAccessService.html>.
This allows persistence of the user's configurations (for Linux this is in
*~/.sip-communicator/*). An example of its usage can be found in:
*net.java.sip.communicator.impl.contactlist.MclStorageManager*

In short all you need to reference a persistent file is something like:
    private static final Logger logger = Logger.getLogger(YourClass.class);

    synchronized void start(BundleContext bc)
    {
            String customPath = "fileYouWant";
            File customFile;
            try
            {
                // Gets file access service to reference persistent storage
of the user
                ServiceReference faServiceReference =
bc.getServiceReference(FileAccessService.class.getName());
                FileAccessService faService = (FileAccessService)
bc.getService(faServiceReference);
                customFile =
faService.getPrivatePersistentFile(customPath);
            }
            catch (Exception exc)
            {
                String msg = "unable to secure resource";
                logger.error(msg, exc);
            }

        // ... do what you want and eat pie
    }

Hope I didn't misunderstand what you're trying to do... cheers! -Galen

On Fri, Jun 6, 2008 at 1:26 PM, Atul Aggarwal <searchatul@gmail.com> > wrote:

Hello everybody,

My project is to implement proxy support in sip communicator. I have some
doubt while development although some of these questions may seem stupid.

1. I have implemented global proxy setting as a configuration form which
appears in settings menu as a separate tab but I need to store the global
proxy information. Where to store the info. I solution that I can thought is
to create a new class in utils to store this info. Is this method a good one
or configuration form gives some generic handler to store the info as
registration wizard gives MAP at the time of implementation containing all
the data regarding user account.

2. My second question is about implementing proxy support in the protocols
that still don't have it. I was browsing and saw that several projects are
not active for a long duration about 1 yr or so. I will quote the example
for smack library. It was very active till june 2007 (
http://www.igniterealtime.org/issues/browse/SMACK). Even when i searched
for proxy support in smack, i found somebody has submitted a patch (
http://www.igniterealtime.org/issues/browse/SMACK-226) about a year ago
but has not still implemented. How should I consider these cases?
The solution that I can think of is to prepare a patch and submit it to
the library and wait them to incorporate it in future releases. Also, in the
mean time we should be apply the patch to over libs.
Any better suggestions or ideas....

Atul Aggarwal

--
Alanis Morissette - "We'll love you just the way you are if you're
perfect."


#4

Hey Atul,

Atul Aggarwal написа:

Hello everybody,

My project is to implement proxy support in sip communicator. I have
some doubt while development although some of these questions may seem
stupid.

1. I have implemented global proxy setting as a configuration form
which appears in settings menu as a separate tab but I need to store the
global proxy information.

Hey cool! I'd be interested to see a screenshot. You mind sending one here?

Where to store the info. I solution that I can
thought is to create a new class in utils to store this info. Is this
method a good one or configuration form gives some generic handler to
store the info as registration wizard gives MAP at the time of
implementation containing all the data regarding user account.

Damian has properly pointed you to the FileAccessService as one
alternative. However, when storing configuration properties it is best
that you used the ConfigurationService which stores all properties used
throughout SIP Communicator.

2. My second question is about implementing proxy support in the
protocols that still don't have it. I was browsing and saw that several
projects are not active for a long duration about 1 yr or so. I will
quote the example for smack library. It was very active till june 2007
(http://www.igniterealtime.org/issues/browse/SMACK). Even when i
searched for proxy support in smack, i found somebody has submitted a
patch (http://www.igniterealtime.org/issues/browse/SMACK-226) about a
year ago but has not still implemented. How should I consider these cases?
The solution that I can think of is to prepare a patch and submit it to
the library and wait them to incorporate it in future releases. Also, in
the mean time we should be apply the patch to over libs.
Any better suggestions or ideas....

The best way to go here would be to simply apply the patch yourself and
use a modified version of the library. How does this sound?

Emil

···

Atul Aggarwal

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hey cool! I'd be interested to see a screenshot. You mind sending one here?

I have included the screenshot with the email. I just wanted to ask, I have
used gui builder tool of netbeans for the form. Is this ok?

Damian has properly pointed you to the FileAccessService as one
alternative. However, when storing configuration properties it is best
that you used the ConfigurationService which stores all properties used
throughout SIP Communicator.

Yes, I have used ConfigurationService to store proxy properties to
sip-communicator.xml. Actually, I was thinking off the track and Damian
helped me to move on the track. :slight_smile:

The best way to go here would be to simply apply the patch yourself and
use a modified version of the library. How does this sound?

Yes, this is an option. Also I am talking to some of the development teams.
Hope to have some positive response.

Atul Aggarwal


#6

I have used gui builder tool of netbeans for the form. Is this ok?

Admittedly I haven't had much experience with gui builders, but I was under
the impression that they provide pretty ugly code. If you'd like I wouldn't
mind helping with the form. It'd be easy to code the screenshot's UI by
hand. -Damian

···

On Sat, Jun 14, 2008 at 10:03 AM, Atul Aggarwal <searchatul@gmail.com> wrote:

Hey cool! I'd be interested to see a screenshot. You mind sending one here?

I have included the screenshot with the email. I just wanted to ask, I have
used gui builder tool of netbeans for the form. Is this ok?

Damian has properly pointed you to the FileAccessService as one
alternative. However, when storing configuration properties it is best
that you used the ConfigurationService which stores all properties used
throughout SIP Communicator.

Yes, I have used ConfigurationService to store proxy properties to
sip-communicator.xml. Actually, I was thinking off the track and Damian
helped me to move on the track. :slight_smile:

The best way to go here would be to simply apply the patch yourself and
use a modified version of the library. How does this sound?

Yes, this is an option. Also I am talking to some of the development teams.
Hope to have some positive response.

Atul Aggarwal

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#7

Heeey Atul, this looks really good!

I don't know whether you know this but the ICQ lib we are using (i.e.
joscar) supports proxies as it is so in case you want to do some testing
then you might want to first try with it. You can always come back to
the others afterwards.

Good job once again!

Emil

Atul Aggarwal написа:

···

    Hey cool! I'd be interested to see a screenshot. You mind sending
    one here?

I have included the screenshot with the email. I just wanted to ask, I
have used gui builder tool of netbeans for the form. Is this ok?

    Damian has properly pointed you to the FileAccessService as one
    alternative. However, when storing configuration properties it is best
    that you used the ConfigurationService which stores all properties used
    throughout SIP Communicator.

Yes, I have used ConfigurationService to store proxy properties to
sip-communicator.xml. Actually, I was thinking off the track and Damian
helped me to move on the track. :slight_smile:

    The best way to go here would be to simply apply the patch yourself and
    use a modified version of the library. How does this sound?

Yes, this is an option. Also I am talking to some of the development
teams. Hope to have some positive response.

Atul Aggarwal

------------------------------------------------------------------------

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#8

Hey Emil,

I know that and also yahoo library (jymsg) also support proxy and I have
also created local proxy setting form for yahoo (but with old snapshot of
sip communicator) and it works fine. I will add that to the branch today
night and will try on ICQ and AIM afterwards.

Thanks for appreciating.

Atul

···

2008/6/14 Emil Ivov <emcho@sip-communicator.org>:

Heeey Atul, this looks really good!

I don't know whether you know this but the ICQ lib we are using (i.e.
joscar) supports proxies as it is so in case you want to do some testing
then you might want to first try with it. You can always come back to
the others afterwards.

Good job once again!

Emil

Atul Aggarwal написа:
> Hey cool! I'd be interested to see a screenshot. You mind sending
> one here?
>
>
> I have included the screenshot with the email. I just wanted to ask, I
> have used gui builder tool of netbeans for the form. Is this ok?
>
>
> Damian has properly pointed you to the FileAccessService as one
> alternative. However, when storing configuration properties it is
best
> that you used the ConfigurationService which stores all properties
used
> throughout SIP Communicator.
>
>
> Yes, I have used ConfigurationService to store proxy properties to
> sip-communicator.xml. Actually, I was thinking off the track and Damian
> helped me to move on the track. :slight_smile:
>
>
> The best way to go here would be to simply apply the patch yourself
and
> use a modified version of the library. How does this sound?
>
>
> Yes, this is an option. Also I am talking to some of the development
> teams. Hope to have some positive response.
>
>
> Atul Aggarwal
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Bill Watterson - "There is not enough time to do all the nothing we want to
do."


#9

Admittedly I haven't had much experience with gui builders, but I was under
the impression that they provide pretty ugly code. If you'd like I wouldn't
mind helping with the form. It'd be easy to code the screenshot's UI by
hand. -Damian

Yes, I completely agree. The code generated (for component placement) by
gui builder is quite complex. I am trying to build the form by hand and will
contact you in case of any difficulty.

Atul


#10

OK, got it. Looking forward to checking it out then :wink:

Cheers
Emil

Atul Aggarwal написа:

···

Hey Emil,

I know that and also yahoo library (jymsg) also support proxy and I have
also created local proxy setting form for yahoo (but with old snapshot
of sip communicator) and it works fine. I will add that to the branch
today night and will try on ICQ and AIM afterwards.

Thanks for appreciating.

Atul

2008/6/14 Emil Ivov <emcho@sip-communicator.org
<mailto:emcho@sip-communicator.org>>:

    Heeey Atul, this looks really good!

    I don't know whether you know this but the ICQ lib we are using (i.e.
    joscar) supports proxies as it is so in case you want to do some testing
    then you might want to first try with it. You can always come back to
    the others afterwards.

    Good job once again!

    Emil

    Atul Aggarwal написа:
    > Hey cool! I'd be interested to see a screenshot. You mind sending
    > one here?
    >
    >
    > I have included the screenshot with the email. I just wanted to ask, I
    > have used gui builder tool of netbeans for the form. Is this ok?
    >
    >
    > Damian has properly pointed you to the FileAccessService as one
    > alternative. However, when storing configuration properties it
    is best
    > that you used the ConfigurationService which stores all
    properties used
    > throughout SIP Communicator.
    >
    >
    > Yes, I have used ConfigurationService to store proxy properties to
    > sip-communicator.xml. Actually, I was thinking off the track and
    Damian
    > helped me to move on the track. :slight_smile:
    >
    >
    > The best way to go here would be to simply apply the patch
    yourself and
    > use a modified version of the library. How does this sound?
    >
    >
    > Yes, this is an option. Also I am talking to some of the development
    > teams. Hope to have some positive response.
    >
    >
    > Atul Aggarwal
    >
    >
    ------------------------------------------------------------------------
    >
    >
    >
    ------------------------------------------------------------------------
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail:
    dev-unsubscribe@sip-communicator.dev.java.net
    <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
    > For additional commands, e-mail:
    dev-help@sip-communicator.dev.java.net
    <mailto:dev-help@sip-communicator.dev.java.net>

    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    dev-unsubscribe@sip-communicator.dev.java.net
    <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
    For additional commands, e-mail:
    dev-help@sip-communicator.dev.java.net
    <mailto:dev-help@sip-communicator.dev.java.net>

--
Bill Watterson - "There is not enough time to do all the nothing we
want to do."

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net