|  |  |  | Evolution Connector for Microsoft Exchange Programmer’s Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
| E2kGlobalCatalogE2kGlobalCatalog — Connection to the local Active Directory Global Catalog replica server | 
struct E2kGlobalCatalog; E2kGlobalCatalog * e2k_global_catalog_new (const gchar *server,gint response_limit,const gchar *user,const gchar *domain,const gchar *password,E2kAutoconfigGalAuthPref use_auth); LDAP * e2k_global_catalog_get_ldap (E2kGlobalCatalog *gc,E2kOperation *op,gint *ldap_error); enum E2kGlobalCatalogStatus; enum E2kGlobalCatalogLookupType; enum E2kGlobalCatalogLookupFlags; E2kGlobalCatalogEntry; E2kGlobalCatalogStatus e2k_global_catalog_lookup (E2kGlobalCatalog *gc,E2kOperation *op,E2kGlobalCatalogLookupType type,const gchar *key,E2kGlobalCatalogLookupFlags flags,E2kGlobalCatalogEntry **entry_p); #define e2k_global_catalog_entry_free (gc, entry) void (*E2kGlobalCatalogCallback) (E2kGlobalCatalog *gc,E2kGlobalCatalogStatus status,E2kGlobalCatalogEntry *entry,gpointer user_data); void e2k_global_catalog_async_lookup (E2kGlobalCatalog *gc,E2kOperation *op,E2kGlobalCatalogLookupType type,const gchar *key,E2kGlobalCatalogLookupFlags flags,E2kGlobalCatalogCallback callback,gpointer user_data); E2kGlobalCatalogStatus e2k_global_catalog_add_delegate (E2kGlobalCatalog *gc,E2kOperation *op,const gchar *self_dn,const gchar *delegate_dn); E2kGlobalCatalogStatus e2k_global_catalog_remove_delegate (E2kGlobalCatalog *gc,E2kOperation *op,const gchar *self_dn,const gchar *delegate_dn);
E2kGlobalCatalog represents a connection to the local Active Directory Global Catalog replica. The Global Catalog is replicated at each site in a Windows domain, and contains a subset of Active Directory information for every object in the entire Active Directory tree. (As opposed to the regular Active Directory servers, which contain complete information about only the local portion of the tree.)
Connector uses the global catalog for two major purposes:
To populate the Global Address List
To look up information about other users, such as what Exchange server their mail is on, or what their SID is.
E2kGlobalCatalog * e2k_global_catalog_new (const gchar *server,gint response_limit,const gchar *user,const gchar *domain,const gchar *password,E2kAutoconfigGalAuthPref use_auth);
Create an object for communicating with the Windows Global Catalog via LDAP.
| 
 | the GC server name | 
| 
 | the maximum number of responses to return from a search | 
| 
 | username to authenticate with | 
| 
 | NT domain of user, orNULLto autodetect. | 
| 
 | password to authenticate with | 
| 
 | |
| Returns : | the new E2kGlobalCatalog. (This call will always succeed. If the passed-in data is bad, it will fail on a later call.) | 
LDAP * e2k_global_catalog_get_ldap (E2kGlobalCatalog *gc,E2kOperation *op,gint *ldap_error);
Returns a new LDAP handle. The caller must ldap_unbind() it when it
is done.
| 
 | the global catalog | 
| 
 | pointer to an initialized E2kOperation to use for cancellation | 
| 
 | set the value returned from get_ldap_connection if not NULL | 
| Returns : | an LDAP handle, or NULLif it can't connect | 
typedef enum {
	E2K_GLOBAL_CATALOG_OK,
	E2K_GLOBAL_CATALOG_NO_SUCH_USER,
	E2K_GLOBAL_CATALOG_NO_DATA,
	E2K_GLOBAL_CATALOG_BAD_DATA,
	E2K_GLOBAL_CATALOG_EXISTS,
	E2K_GLOBAL_CATALOG_AUTH_FAILED,
	E2K_GLOBAL_CATALOG_CANCELLED,
	E2K_GLOBAL_CATALOG_ERROR
} E2kGlobalCatalogStatus;
typedef enum {
	E2K_GLOBAL_CATALOG_LOOKUP_BY_EMAIL,
	E2K_GLOBAL_CATALOG_LOOKUP_BY_DN,
	E2K_GLOBAL_CATALOG_LOOKUP_BY_LEGACY_EXCHANGE_DN
} E2kGlobalCatalogLookupType;
typedef enum {
	E2K_GLOBAL_CATALOG_LOOKUP_SID                = (1 << 0),
	E2K_GLOBAL_CATALOG_LOOKUP_EMAIL              = (1 << 1),
	E2K_GLOBAL_CATALOG_LOOKUP_MAILBOX            = (1 << 2),
	E2K_GLOBAL_CATALOG_LOOKUP_LEGACY_EXCHANGE_DN = (1 << 3),
	E2K_GLOBAL_CATALOG_LOOKUP_DELEGATES          = (1 << 4),
	E2K_GLOBAL_CATALOG_LOOKUP_DELEGATORS         = (1 << 5),
	E2K_GLOBAL_CATALOG_LOOKUP_QUOTA		     = (1 << 6),
	E2K_GLOBAL_CATALOG_LOOKUP_ACCOUNT_CONTROL    = (1 << 7)
} E2kGlobalCatalogLookupFlags;
typedef struct {
	gchar *dn, *display_name;
	E2kSid *sid;
	gchar *email, *exchange_server, *mailbox, *legacy_exchange_dn;
	GPtrArray *delegates, *delegators;
	gint quota_warn, quota_nosend, quota_norecv;
	gint user_account_control;
	E2kGlobalCatalogLookupFlags mask;
} E2kGlobalCatalogEntry;
E2kGlobalCatalogStatus e2k_global_catalog_lookup (E2kGlobalCatalog *gc,E2kOperation *op,E2kGlobalCatalogLookupType type,const gchar *key,E2kGlobalCatalogLookupFlags flags,E2kGlobalCatalogEntry **entry_p);
Look up the indicated user in the global catalog and
return their information in *entry_p.
| 
 | the global catalog | 
| 
 | pointer to an E2kOperation to use for cancellation | 
| 
 | the type of information in key | 
| 
 | email address or DN to look up | 
| 
 | the information to look up | 
| 
 | pointer to a variable to return the entry in. | 
| Returns : | the status of the lookup | 
void (*E2kGlobalCatalogCallback) (E2kGlobalCatalog *gc,E2kGlobalCatalogStatus status,E2kGlobalCatalogEntry *entry,gpointer user_data);
| 
 | |
| 
 | |
| 
 | |
| 
 | 
void e2k_global_catalog_async_lookup (E2kGlobalCatalog *gc,E2kOperation *op,E2kGlobalCatalogLookupType type,const gchar *key,E2kGlobalCatalogLookupFlags flags,E2kGlobalCatalogCallback callback,gpointer user_data);
Asynchronously look up the indicated user in the global catalog and return the requested information to the callback.
| 
 | the global catalog | 
| 
 | pointer to an E2kOperation to use for cancellation | 
| 
 | the type of information in key | 
| 
 | email address or DN to look up | 
| 
 | the information to look up | 
| 
 | the callback to invoke after finding the user | 
| 
 | data to pass to callback | 
E2kGlobalCatalogStatus e2k_global_catalog_add_delegate (E2kGlobalCatalog *gc,E2kOperation *op,const gchar *self_dn,const gchar *delegate_dn);
Attempts to make delegate_dn a delegate of self_dn.
| 
 | the global catalog | 
| 
 | pointer to an E2kOperation to use for cancellation | 
| 
 | Active Directory DN of the user to add a delegate to | 
| 
 | Active Directory DN of the new delegate | 
| Returns : | E2K_GLOBAL_CATALOG_OKon success,E2K_GLOBAL_CATALOG_NO_SUCH_USERifself_dnis invalid,E2K_GLOBAL_CATALOG_BAD_DATAifdelegate_dnis invalid,E2K_GLOBAL_CATALOG_EXISTSifdelegate_dnis already a delegate,E2K_GLOBAL_CATALOG_ERRORon other errors. | 
E2kGlobalCatalogStatus e2k_global_catalog_remove_delegate (E2kGlobalCatalog *gc,E2kOperation *op,const gchar *self_dn,const gchar *delegate_dn);
Attempts to remove delegate_dn as a delegate of self_dn.
| 
 | the global catalog | 
| 
 | pointer to an E2kOperation to use for cancellation | 
| 
 | Active Directory DN of the user to remove a delegate from | 
| 
 | Active Directory DN of the delegate to remove | 
| Returns : | E2K_GLOBAL_CATALOG_OKon success,E2K_GLOBAL_CATALOG_NO_SUCH_USERifself_dnis invalid,E2K_GLOBAL_CATALOG_NO_DATAifdelegate_dnis not a delegate ofself_dn,E2K_GLOBAL_CATALOG_ERRORon other errors. |