Пример #1
0
/*
* Specify timeout value for LDAP operation (in seconds).
*/
void syldap_set_timeout( SyldapServer* ldapServer, const gint value ) {
	addrcache_refresh( ldapServer->addressCache );
	if( value > 0 ) {
		ldapServer->timeOut = value;
	}
	else {
		ldapServer->timeOut = SYLDAP_DFL_TIMEOUT;
	}
}
Пример #2
0
/*
* Specify port to be used.
*/
void syldap_set_port( SyldapServer* ldapServer, const gint value ) {
	addrcache_refresh( ldapServer->addressCache );
	if( value > 0 ) {
		ldapServer->port = value;
	}
	else {
		ldapServer->port = SYLDAP_DFL_PORT;
	}
}
Пример #3
0
/*
* Specify maximum number of entries to retrieve.
*/
void syldap_set_max_entries( SyldapServer* ldapServer, const gint value ) {
	addrcache_refresh( ldapServer->addressCache );
	if( value > 0 ) {
		ldapServer->maxEntries = value;
	}
	else {
		ldapServer->maxEntries = SYLDAP_MAX_ENTRIES;
	}
}
Пример #4
0
/*
* Append a custom label, representing an E-Mail address field to the
* custom label list.
*/
void jpilot_add_custom_label( JPilotFile *pilotFile, const gchar *labelName ) {
	g_return_if_fail( pilotFile != NULL );

	if( labelName ) {
		gchar *labelCopy = g_strdup( labelName );
		g_strstrip( labelCopy );
		if( *labelCopy == '\0' ) {
			g_free( labelCopy );
		}
		else {
			pilotFile->customLabels = g_list_append( pilotFile->customLabels, labelCopy );
			/* Force a fresh read */
			addrcache_refresh( pilotFile->addressCache );
		}
	}
}
Пример #5
0
/*
* Free up custom label list.
*/
void jpilot_clear_custom_labels( JPilotFile *pilotFile ) {
	GList *node;

	g_return_if_fail( pilotFile != NULL );

	/* Release custom labels */
	mgu_free_dlist( pilotFile->customLabels );
	pilotFile->customLabels = NULL;

	/* Release indexes */
	node = pilotFile->labelInd;
	while( node ) {
		node->data = NULL;
		node = g_list_next( node );
	}
	g_list_free( pilotFile->labelInd );
	pilotFile->labelInd = NULL;

	/* Force a fresh read */
	addrcache_refresh( pilotFile->addressCache );
}
Пример #6
0
/*
* Clear the address cache.
*/
void addrcache_clear( AddressCache *cache ) {
	cm_return_if_fail( cache != NULL );

	/* g_print( "...addrcache_clear :%s:\n", cache->name ); */
	/* Free up folders and hash table */
	addrcache_free_all_folders( cache->rootFolder );
	addrcache_free_item_hash( cache->itemHash );
	g_hash_table_destroy( cache->itemHash );
	cache->itemHash = NULL;
	ADDRITEM_PARENT(cache->rootFolder) = NULL;
	addritem_free_item_folder( cache->rootFolder );
	cache->rootFolder = NULL;
	if( cache->tempList ) g_list_free( cache->tempList );
	cache->tempList = NULL;

	/* Reset to initial state */
	cache->itemHash = g_hash_table_new( g_str_hash, g_str_equal );
	cache->rootFolder = addritem_create_item_folder();
	cache->rootFolder->isRoot = TRUE;
	ADDRITEM_PARENT(cache->rootFolder) = NULL;

	addrcache_refresh( cache );
}
Пример #7
0
/*
* Refresh internal variables to force a file read.
*/
void jpilot_force_refresh( JPilotFile *pilotFile ) {
	addrcache_refresh( pilotFile->addressCache );
}
Пример #8
0
void jpilot_set_file( JPilotFile* pilotFile, const gchar *value ) {
	g_return_if_fail( pilotFile != NULL );
	addrcache_refresh( pilotFile->addressCache );
	pilotFile->readMetadata = FALSE;
	pilotFile->path = mgu_replace_string( pilotFile->path, value );
}
Пример #9
0
/*
* Specify hostname to be used.
*/
void syldap_set_host( SyldapServer* ldapServer, const gchar *value ) {
	addrcache_refresh( ldapServer->addressCache );
	ldapServer->hostName = mgu_replace_string( ldapServer->hostName, value );
	g_strstrip( ldapServer->hostName );
}
Пример #10
0
/*
* Refresh internal variables to force a file read.
*/
void syldap_force_refresh( SyldapServer *ldapServer ) {
	addrcache_refresh( ldapServer->addressCache );
	ldapServer->newSearch = TRUE;
}
Пример #11
0
/*
* Specify search value to be searched for.
*/
void syldap_set_search_value( SyldapServer* ldapServer, const gchar *value ) {
	addrcache_refresh( ldapServer->addressCache );
	ldapServer->searchValue = mgu_replace_string( ldapServer->searchValue, value );
	g_strstrip( ldapServer->searchValue );
	ldapServer->newSearch = TRUE;
}
Пример #12
0
/*
* Specify bind password to be used.
*/
void syldap_set_bind_password( SyldapServer* ldapServer, const gchar *value ) {
	addrcache_refresh( ldapServer->addressCache );
	ldapServer->bindPass = mgu_replace_string( ldapServer->bindPass, value );
	g_strstrip( ldapServer->bindPass );
}
Пример #13
0
/*
* Specify bind DN to be used.
*/
void syldap_set_bind_dn( SyldapServer* ldapServer, const gchar *value ) {
	addrcache_refresh( ldapServer->addressCache );
	ldapServer->bindDN = mgu_replace_string( ldapServer->bindDN, value );
	g_strstrip( ldapServer->bindDN );
}
Пример #14
0
void vcard_set_file( VCardFile* cardFile, const gchar *value ) {
	g_return_if_fail( cardFile != NULL );
	addrcache_refresh( cardFile->addressCache );
	cardFile->path = mgu_replace_string( cardFile->path, value );
	g_strstrip( cardFile->path );
}
Пример #15
0
/*
* Refresh internal variables to force a file read.
*/
void vcard_force_refresh( VCardFile *cardFile ) {
	addrcache_refresh( cardFile->addressCache );
}