Need minor help backporting from libsoup-2.4 to libsoup-2.2



Hi,

i am using libsoup-2.4 in the map download part of my osm2go
openstreetmap editor for maemo OS of the Nokia Internet tablets.

Now i'd like to port that part to the old maemo versions (chinnook
and diablo). Unfortunately these only support soup-2.2 which isn't
trivial to use today since there isn't much soup 2.2 documentation 
out there anymore. I got most things adjusted to work with 2.2 also, 
but i am stuck at two points:

1) How do i backport setting a proxy? The current 2.4 code looks
 like this:

  GValue val = {0};
  SoupURI* uri = soup_uri_new(proxy_uri);
  g_value_init(&val, SOUP_TYPE_URI);
  g_value_take_boxed(&val, uri);
  g_object_set_property(G_OBJECT(session),SOUP_SESSION_PROXY_URI,&val);

But SOUP_TYPE_URI didn't exist in soup 2.2. How do i accomplish the
same in soup 2.2?

2) How do i set the user agent in soup 2.2? In 2.4 i just call 
    session = soup_session_async_new_with_options(
                                                            SOUP_SESSION_USER_AGENT, "my agent string",
                                                            NULL);

How do i do the same in soup 2.2?

Regards,
  Till


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