[Pidgin] #12519: Patch for "pounce when my status is..."

Pidgin trac at pidgin.im
Fri Aug 27 01:45:10 EDT 2010


#12519: Patch for "pounce when my status is..."
--------------------------------------------+-------------------------------
 Reporter:  grigoryj                        |        Owner:  darkrain42
     Type:  patch                           |       Status:  new       
Milestone:  Patches Needing Improvement     |    Component:  libpurple 
  Version:  2.7.3                           |   Resolution:            
 Keywords:  pidgin libpurple pounce status  |  
--------------------------------------------+-------------------------------

Comment(by darkrain42):

 Replying to [comment:8 grigoryj]:
 >  * I fixed the typo immediately - don't have a slightest idea how that
 backtick got there :)
 >  * Well, the next patch I'm going to write is "expirable buddy pounces"
 - so that you can set a date/time on which the pounce would expire. That
 would make use of generic fields as well. Like so:
 >  {{{
 >   <fields>
 >    <field name = "status" value = "away"/>
 >    <field name = "expires" value = "20/08/2010 14:00"/>

 Before I go any further, let me just say that date format is absolutely
 horrid.  Either use something exactly like the format in
 [http://xmpp.org/extensions/xep-0082.html XEP-0082: XMPP Date and Time
 Profiles] or a UTC unix timestamp :)

 >   <fields>
 >  }}}
 >  As for having multiple statuses, we can still use this xml format for
 them. Just add a new `status' field for each of the desired statuses and
 push them to a list as we parse the xml:
 >  {{{
 >   <fields>
 >    <field name = "status" value = "away"/>
 >    <field name = "status" value = "extended away"/>
 >   <fields>
 >  }}}
 >  I just don't like the idea of adding new constructions for each field
 type - that overcomplexifies the structure of the xml document and the
 parsing becomes more cumbersome.

 The parsing there is already overly cumbersome -- it needs to be rewritten
 to use the xmlnode parser like all the other subsystems do.  I'm still not
 entirely sure I understand what the current pounces parser is doing (or
 that your changes so far are correct!).  So keep that in mind when
 designing a schema.  In any event "fields" doesn't really describe
 something about what it's going to contain (in this case you seem to be
 aiming toward including filters/selectors on the event).  Statuses should
 be all grouped together (look at accounts.xml), but not with things that
 aren't semantically similar.

 I'm not sure what I'd do for the expiration time, but something like
 <validity start='YYYYMMDDThh:mm:ssTZD' end='YYYYMMDDThh:mm:ssTZD'/> or
 similar

-- 
Ticket URL: <http://developer.pidgin.im/ticket/12519#comment:9>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list