mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
This commit is contained in:
parent
23e0d82436
commit
e400f4130a
1564 changed files with 510348 additions and 0 deletions
64
mailnews/import/oexpress/WabObject.h
Normal file
64
mailnews/import/oexpress/WabObject.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* -*- 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 http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef WabObject_h___
|
||||
#define WabObject_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsIFile.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <wab.h>
|
||||
|
||||
|
||||
class CWabIterator {
|
||||
public:
|
||||
virtual nsresult EnumUser(const char16_t *pName, LPENTRYID pEid, ULONG cbEid) = 0;
|
||||
virtual nsresult EnumList(const char16_t *pName, LPENTRYID pEid, ULONG cbEid, LPMAPITABLE lpTable) = 0;
|
||||
};
|
||||
|
||||
|
||||
class CWAB
|
||||
{
|
||||
public:
|
||||
CWAB(nsIFile *fileName);
|
||||
~CWAB();
|
||||
|
||||
bool Loaded(void) { return m_bInitialized;}
|
||||
|
||||
HRESULT IterateWABContents(CWabIterator *pIter, int *pDone);
|
||||
|
||||
// Methods for User entries
|
||||
LPDISTLIST GetDistList(ULONG cbEid, LPENTRYID pEid);
|
||||
void ReleaseDistList(LPDISTLIST pList) { if (pList) pList->Release();}
|
||||
LPMAILUSER GetUser(ULONG cbEid, LPENTRYID pEid);
|
||||
void ReleaseUser(LPMAILUSER pUser) { if (pUser) pUser->Release();}
|
||||
LPSPropValue GetUserProperty(LPMAILUSER pUser, ULONG tag);
|
||||
LPSPropValue GetListProperty(LPDISTLIST pList, ULONG tag);
|
||||
void FreeProperty(LPSPropValue pVal) { if (pVal) m_lpWABObject->FreeBuffer(pVal);}
|
||||
void GetValueString(LPSPropValue pVal, nsString& val);
|
||||
void GetValueTime(LPSPropValue pVal, PRTime& val);
|
||||
|
||||
void CStrToUnicode(const char *pStr, nsString& result);
|
||||
|
||||
// Utility stuff used by iterate
|
||||
void FreeProws(LPSRowSet prows);
|
||||
|
||||
bool IsAvailable();
|
||||
|
||||
private:
|
||||
char16_t * m_pUniBuff;
|
||||
int m_uniBuffLen;
|
||||
bool m_bInitialized;
|
||||
HINSTANCE m_hinstWAB;
|
||||
LPWABOPEN m_lpfnWABOpen;
|
||||
LPADRBOOK m_lpAdrBook;
|
||||
LPWABOBJECT m_lpWABObject;
|
||||
};
|
||||
|
||||
#endif // WABOBJECT_INCLUDED
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue