1. 30 Dec, 2012 2 commits
    • Philip Withnall's avatar
      telepathy: Call continuations in idle callbacks rather than directly · 7088fbaf
      Philip Withnall authored
      The continuations will proceed to a g_simple_async_result_complete() call,
      rather than a g_simple_async_result_complete_in_idle() call as I expected
      (and didn’t check). This could result in the first continuation executing
      a lot of code and starving the other continuations (and the original
      prepare() call). By delaying the continuations to the idle queue, the
      original prepare() call is guaranteed to finish first. Then the
      continuations can only starve each other.
      
      See: https://bugzilla.gnome.org/show_bug.cgi?id=677633
      7088fbaf
    • Philip Withnall's avatar
      documentation: Document which yielding methods are safe to call concurrently · e21932e8
      Philip Withnall authored
      This is a follow-up commit to ce55fa2b.
      I went through all methods in folks which yield to another async method,
      and tried to work out whether the caller was safe to run multiple times
      concurrently (e.g. begin a second asynchronous call to it between a previous
      async call beginning and finishing).
      
      I’ve marked all such methods as safe (or not safe) as appropriate. I
      haven’t made any attempt to make the unsafe methods safe, except in one
      case in backend-store.vala.
      e21932e8
  2. 28 Dec, 2012 3 commits
  3. 23 Oct, 2012 1 commit
  4. 10 Oct, 2012 2 commits
  5. 27 Sep, 2012 1 commit
  6. 24 Sep, 2012 1 commit
    • Philip Withnall's avatar
      telepathy: Always notify of persona changes when disconnecting · 0f078082
      Philip Withnall authored
      This reverts commit af500a4b and applies
      a different fix. The problem was that persona changes could get away without
      being notified when disconnecting due to an account being disabled. This
      is because, after storing the cache, an additional check is performed for
      whether the account was enabled. If it is, the cache is loaded (and persona
      changes notified). If not, the cache is not loaded, *and persona changes
      were not notified*.
      
      This situation could occur when a Telepathy account is disabled:
       1. _notify_connection_cb() is called, but the TpAccount::enabled property
          is still true.
       2. While in store_cache(), the TpAccount::enabled property goes false.
       3. The check before load_cache() would fail, so load_cache() would never
          be called.
      
      Similarly, it could occur when a Telepathy account is removed, with
      TpAccountManager:account-removed being emitted while in store_cache().
      
      Closes: https://bugzilla.gnome.org/show_bug.cgi?id=683390
      0f078082
  7. 11 Sep, 2012 2 commits
  8. 10 Sep, 2012 2 commits
  9. 07 Sep, 2012 1 commit
  10. 06 Sep, 2012 1 commit
  11. 05 Sep, 2012 4 commits
  12. 28 Aug, 2012 1 commit
  13. 16 Aug, 2012 1 commit
  14. 14 Aug, 2012 2 commits
  15. 09 Aug, 2012 2 commits
    • Philip Withnall's avatar
      docs: Various small fixes and expansions of documentation · e7b96a7b
      Philip Withnall authored
       • Various links fixed to point to class documentation rather than its
         constructor documentation (this is a quirk of Valadoc; if using
         “{@link ClassName}” inside a method of ClassName, the link will point to
         ClassName’s constructor because symbols are resolved relatively and the
         class’ constructor is called “ClassName”).
       • Various bits of documentation expanded (mostly trivially) to shut gtk-doc
         up about missing long descriptions.
       • Some Vala code attributes moved around so the documentation comments are
         correctly associated with the code. (This shouldn’t change the behaviour
         of the attributes themselves.)
       • Some trivial constructors added to classes in order to give them
         documentation.
       • Constructor for Utils added and deprecated immediately. Utils should
         become a nested namespace on the next API break, since it will only ever
         contain static methods, and thus doesn’t need to be instantiable (which
         folks will make it at the moment).
      e7b96a7b
    • Erick Pérez Castellanos's avatar
      telepathy backend fixed to match last vala release. · 887aab26
      Erick Pérez Castellanos authored
      Vala change:
      1. Warn when accessing static members with an instance reference.
      2. Deprecate implicit .begin for async methods.
      
      Bug: https://bugzilla.gnome.org/show_bug.cgi?id=681420
      887aab26
  16. 30 Jul, 2012 1 commit
  17. 24 Jul, 2012 2 commits
  18. 23 Jul, 2012 4 commits
  19. 19 Jul, 2012 3 commits
    • Philip Withnall's avatar
      core: Fix documentation on GroupDetails.groups · 62f0cce5
      Philip Withnall authored
      It was out of date and didn’t match the data type of GroupDetails.groups
      any more.
      
      See: https://bugzilla.gnome.org/show_bug.cgi?id=679743
      62f0cce5
    • Philip Withnall's avatar
      telepathy: Preserve Tpf.Persona avatars from the cache for online contacts · c2338c65
      Philip Withnall authored
      This is a fairly hacky way of fixing the problem in bug #660128: maintaining
      a map of IIDs to avatar files for all personas in the Telepathy backend, and
      referring to it in case Telepathy doesn’t know the current avatar for a
      TpContact. This can happen if that contact is currently offline while we’re
      online, for example. This allows use of the avatars cached from last time
      contacts were online, even though those contacts are now offline.
      
      A more comprehensive fix, which I would have implemented if I hadn’t just got
      my degree classification and weren’t just heading out to celebrate, would
      involve rearchitecting the caching of the Telepathy backend so that the
      Tpf.Personas weren’t destroyed and re-created whenever the backend went
      offline/online; instead, they would have their properties updated from the
      cache/online contact list. This would eliminate spurious personas-changed
      signals, unify the code implementing the different properties (currently it’s
      split between the properties and separate implementations in
      Tpf.Persona.from_cache()), and allow property values to persist from offline
      to online without the need for hacks like this.
      
      Closes: https://bugzilla.gnome.org/show_bug.cgi?id=660128
      c2338c65
    • Philip Withnall's avatar
      telepathy: Allow for updated Tpf.Personas properties to update the cache · 36ecd01a
      Philip Withnall authored
      Currently, the cache is only written when going offline, which means that any
      properties of Tpf.Personas which are updated at runtime aren’t written to the
      cache unless the client explicitly goes offline before being closed. This
      doesn’t often happen, meaning the property updates are lost and the cache
      becomes stale.
      
      This commit keeps track of the clean/dirty state of the cache and writes it
      out when PersonaStore.flush() is called. It also adds a new method,
      IndividualAggregator.unprepare(), which ensures all the persona stores handled
      by the aggregator are flushed. Clients should call this method before closing
      their main loop.
      
      (Calling flush() in the finalise function of the PersonaStore doesn’t work
      because Tpf.PersonaStores are often never finalised due to the implementation
      of Tpf.PersonaStore.dup_for_account(). Furthermore, calling flush() in the
      finalise function of the IndividualAggregator doesn’t work because the client
      will typically quit the main loop immediately afterwards, which will cancel
      the asynchronous flush call.)
      
      New API:
       • IndividualAggregator.unprepare()
      
      Helps: https://bugzilla.gnome.org/show_bug.cgi?id=660128
      36ecd01a
  20. 18 Jul, 2012 1 commit
  21. 13 Jul, 2012 2 commits
  22. 11 Jul, 2012 1 commit