author Patrick Cloke <>
Thu, 16 Oct 2014 18:05:41 -0400
changeset 20883 56fe4fac57d0916883a373cb7640681631ee0fe0
parent 17259 9eb3e41bab9bff569c7c6b939e593b390c67c287
child 21963 8e04fe92bd1f3c0c00cb83d41954bb297c1b4b08
permissions -rw-r--r--
Backout part of 2f79b0b939ed that's unrelated. a=Standard8

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef nsOEAddressIterator_h___
#define nsOEAddressIterator_h___

#include "mozilla/Attributes.h"
#include "WabObject.h"
#include "nsIAddrDatabase.h"
#include "mdb.h"
#include "nsStringGlue.h"
#include "nsInterfaceHashtable.h"

class nsOEAddressIterator : public CWabIterator {
  nsOEAddressIterator(CWAB *pWab, nsIAddrDatabase *database);
  virtual nsresult  EnumUser(const char16_t * pName, LPENTRYID pEid, ULONG cbEid) MOZ_OVERRIDE;
  virtual nsresult  EnumList(const char16_t * pName, LPENTRYID pEid, ULONG cbEid, LPMAPITABLE table) MOZ_OVERRIDE;
        void FindListRow(nsString &eMail, nsIMdbRow **cardRow);

  bool      BuildCard(const char16_t * pName, nsIMdbRow *card, LPMAILUSER pUser);
  void    SanitizeValue(nsString& val);
  void    SplitString(nsString& val1, nsString& val2);
  void    SetBirthDay(nsIMdbRow *card, PRTime& birthDay);

  CWAB *                m_pWab;
  nsCOMPtr<nsIAddrDatabase>     m_database;
  nsInterfaceHashtable <nsStringHashKey, nsIMdbRow> m_listRows;