def ParseAccountInformation(
      self, parser_mediator, query, row, **unused_kwargs):
    """Parses account information.

    Args:
      parser_mediator (ParserMediator): mediates interactions between parsers
          and other components, such as storage and dfvfs.
      query (str): query that created the row.
      row (sqlite3.Row): row with account information.
    """
    query_hash = hash(query)

    display_name = self._GetRowValue(query_hash, row, 'given_displayname')
    fullname = self._GetRowValue(query_hash, row, 'fullname')

    # TODO: Move this to the formatter, and ensure username is rendered
    # properly when fullname and/or display_name is None.
    username = '{0!s} <{1!s}>'.format(fullname, display_name)

    event_data = SkypeAccountEventData()
    event_data.country = self._GetRowValue(query_hash, row, 'country')
    event_data.display_name = display_name
    event_data.email = self._GetRowValue(query_hash, row, 'emails')
    event_data.offset = self._GetRowValue(query_hash, row, 'id')
    event_data.query = query
    event_data.username = username

    timestamp = self._GetRowValue(query_hash, row, 'profile_timestamp')
    if timestamp:
      date_time = dfdatetime_posix_time.PosixTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(date_time, 'Profile Changed')
      parser_mediator.ProduceEventWithEventData(event, event_data)

    timestamp = self._GetRowValue(query_hash, row, 'authreq_timestamp')
    if timestamp:
      date_time = dfdatetime_posix_time.PosixTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(
          date_time, 'Authenticate Request')
      parser_mediator.ProduceEventWithEventData(event, event_data)

    timestamp = self._GetRowValue(query_hash, row, 'lastonline_timestamp')
    if timestamp:
      date_time = dfdatetime_posix_time.PosixTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(date_time, 'Last Online')
      parser_mediator.ProduceEventWithEventData(event, event_data)

    timestamp = self._GetRowValue(query_hash, row, 'mood_timestamp')
    if timestamp:
      date_time = dfdatetime_posix_time.PosixTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(date_time, 'Mood Event')
      parser_mediator.ProduceEventWithEventData(event, event_data)

    timestamp = self._GetRowValue(query_hash, row, 'sent_authrequest_time')
    if timestamp:
      date_time = dfdatetime_posix_time.PosixTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(date_time, 'Auth Request Sent')
      parser_mediator.ProduceEventWithEventData(event, event_data)

    timestamp = self._GetRowValue(query_hash, row, 'lastused_timestamp')
    if timestamp:
      date_time = dfdatetime_posix_time.PosixTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(date_time, 'Last Used')
      parser_mediator.ProduceEventWithEventData(event, event_data)
def ParseAccountInformation ( self , parser_mediator , query , row , ** unused_kwargs ) : query_hash = hash ( query ) display_name = self . _GetRowValue ( query_hash , row , 'given_displayname' ) fullname = self . _GetRowValue ( query_hash , row , 'fullname' ) username = '{0!s} <{1!s}>' . format ( fullname , display_name ) event_data = SkypeAccountEventData ( ) event_data . country = self . _GetRowValue ( query_hash , row , 'country' ) event_data . display_name = display_name event_data . email = self . _GetRowValue ( query_hash , row , 'emails' ) event_data . offset = self . _GetRowValue ( query_hash , row , 'id' ) event_data . query = query event_data . username = username timestamp = self . _GetRowValue ( query_hash , row , 'profile_timestamp' ) if timestamp : date_time = dfdatetime_posix_time . PosixTime ( timestamp = timestamp ) event = time_events . DateTimeValuesEvent ( date_time , 'Profile Changed' ) parser_mediator . ProduceEventWithEventData ( event , event_data ) timestamp = self . _GetRowValue ( query_hash , row , 'authreq_timestamp' ) if timestamp : date_time = dfdatetime_posix_time . PosixTime ( timestamp = timestamp ) event = time_events . DateTimeValuesEvent ( date_time , 'Authenticate Request' ) parser_mediator . ProduceEventWithEventData ( event , event_data ) timestamp = self . _GetRowValue ( query_hash , row , 'lastonline_timestamp' ) if timestamp : date_time = dfdatetime_posix_time . PosixTime ( timestamp = timestamp ) event = time_events . DateTimeValuesEvent ( date_time , 'Last Online' ) parser_mediator . ProduceEventWithEventData ( event , event_data ) timestamp = self . _GetRowValue ( query_hash , row , 'mood_timestamp' ) if timestamp : date_time = dfdatetime_posix_time . PosixTime ( timestamp = timestamp ) event = time_events . DateTimeValuesEvent ( date_time , 'Mood Event' ) parser_mediator . ProduceEventWithEventData ( event , event_data ) timestamp = self . _GetRowValue ( query_hash , row , 'sent_authrequest_time' ) if timestamp : date_time = dfdatetime_posix_time . PosixTime ( timestamp = timestamp ) event = time_events . DateTimeValuesEvent ( date_time , 'Auth Request Sent' ) parser_mediator . ProduceEventWithEventData ( event , event_data ) timestamp = self . _GetRowValue ( query_hash , row , 'lastused_timestamp' ) if timestamp : date_time = dfdatetime_posix_time . PosixTime ( timestamp = timestamp ) event = time_events . DateTimeValuesEvent ( date_time , 'Last Used' ) parser_mediator . ProduceEventWithEventData ( event , event_data )
Parses account information.

    Args:
      parser_mediator (ParserMediator): mediates interactions between parsers
          and other components, such as storage and dfvfs.
      query (str): query that created the row.
      row (sqlite3.Row): row with account information.