pidgin: dnssrv.h File Reference

pidgin 2.14.4

Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
dnssrv.h File Reference
`#include <glib.h>`

Go to the source code of this file.

## Data Structures
struct | _PurpleSrvResponse
struct | _PurpleTxtResponse
struct | PurpleSrvTxtQueryUiOps
| SRV Request UI operations; UIs should implement this if they want to do SRV lookups themselves, rather than relying on the core. More...

## Typedefs
typedef struct _PurpleSrvTxtQueryData | PurpleSrvTxtQueryData
typedef struct _PurpleSrvResponse | PurpleSrvResponse
typedef struct _PurpleTxtResponse | PurpleTxtResponse
typedef struct _PurpleSrvTxtQueryData | PurpleSrvQueryData
typedef void(* | PurpleSrvTxtQueryResolvedCallback) (PurpleSrvTxtQueryData *query_data, GList *records)
typedef void(* | PurpleSrvTxtQueryFailedCallback) (PurpleSrvTxtQueryData *query_data, const gchar *error_message)
typedef void(* | PurpleSrvCallback) (PurpleSrvResponse *resp, int results, gpointer data)
typedef void(* | PurpleTxtCallback) (GList *responses, gpointer data)
| Callback that returns the data retrieved from a DNS TXT lookup.

## Enumerations
enum | PurpleDnsType { PurpleDnsTypeTxt = 16 , PurpleDnsTypeSrv = 33 }

## Functions
PurpleSrvTxtQueryData * | purple_srv_resolve_account (PurpleAccount *account, const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata)
| Queries an SRV record.
PurpleSrvTxtQueryData * | purple_srv_resolve (const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata)
| Queries an SRV record.
void | purple_srv_cancel (PurpleSrvTxtQueryData *query_data)
| Cancel an SRV or DNS query.
PurpleSrvTxtQueryData * | purple_txt_resolve_account (PurpleAccount *account, const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata)
| Queries an TXT record.
PurpleSrvTxtQueryData * | purple_txt_resolve (const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata)
| Queries an TXT record.
void | purple_txt_cancel (PurpleSrvTxtQueryData *query_data)
| Cancel an TXT DNS query.
const gchar * | purple_txt_response_get_content (PurpleTxtResponse *response)
| Get the value of the current TXT record.
void | purple_txt_response_destroy (PurpleTxtResponse *response)
| Destroy a TXT DNS response object.
void | purple_srv_txt_query_destroy (PurpleSrvTxtQueryData *query_data)
| Cancel a SRV/TXT query and destroy the associated data structure.
void | purple_srv_txt_query_set_ui_ops (PurpleSrvTxtQueryUiOps *ops)
| Sets the UI operations structure to be used when doing a SRV/TXT resolve.
PurpleSrvTxtQueryUiOps * | purple_srv_txt_query_get_ui_ops (void)
| Returns the UI operations structure to be used when doing a SRV/TXT resolve.
char * | purple_srv_txt_query_get_query (PurpleSrvTxtQueryData *query_data)
| Get the query from a PurpleDnsQueryData.
int | purple_srv_txt_query_get_type (PurpleSrvTxtQueryData *query_data)
| Get the type from a PurpleDnsQueryData (TXT or SRV)

## Typedef Documentation

## ◆ PurpleSrvCallback

typedef void(* PurpleSrvCallback) (PurpleSrvResponse *resp, int results, gpointer data)

Parameters

  resp | An array of PurpleSrvResponse of size results. The array is sorted based on the order described in the DNS SRV RFC. Users of this API should try each record in resp in order, starting at the beginning.

Definition at line 93 of file dnssrv.h.

## ◆ PurpleSrvQueryData

typedef struct _PurpleSrvTxtQueryData PurpleSrvQueryData

Definition at line 37 of file dnssrv.h.

## ◆ PurpleSrvResponse

typedef struct _PurpleSrvResponse PurpleSrvResponse

Definition at line 32 of file dnssrv.h.

## ◆ PurpleSrvTxtQueryData

typedef struct _PurpleSrvTxtQueryData PurpleSrvTxtQueryData

Definition at line 31 of file dnssrv.h.

## ◆ PurpleSrvTxtQueryFailedCallback

typedef void(* PurpleSrvTxtQueryFailedCallback) (PurpleSrvTxtQueryData *query_data, const gchar *error_message)

Definition at line 58 of file dnssrv.h.

## ◆ PurpleSrvTxtQueryResolvedCallback

typedef void(* PurpleSrvTxtQueryResolvedCallback) (PurpleSrvTxtQueryData *query_data, GList *records)

Definition at line 57 of file dnssrv.h.

## ◆ PurpleTxtCallback

typedef void(* PurpleTxtCallback) (GList *responses, gpointer data)

Callback that returns the data retrieved from a DNS TXT lookup.

Parameters

  responses | A GList of PurpleTxtResponse objects.
  data | The extra data passed to purple_txt_resolve.

Definition at line 101 of file dnssrv.h.

## ◆ PurpleTxtResponse

typedef struct _PurpleTxtResponse PurpleTxtResponse

Definition at line 33 of file dnssrv.h.

## Enumeration Type Documentation

## ◆ PurpleDnsType

enum PurpleDnsType

Definition at line 41 of file dnssrv.h.

## Function Documentation

## ◆ purple_srv_cancel()

void purple_srv_cancel | ( | PurpleSrvTxtQueryData * | query_data | ) |

Cancel an SRV or DNS query.

Parameters

  query_data | The request to cancel.

Deprecated:
  Use purple_srv_txt_query_destroy instead

## ◆ purple_srv_resolve()

PurpleSrvTxtQueryData * purple_srv_resolve | ( | const char * | protocol,
|  | const char * | transport,
|  | const char * | domain,
|  | PurpleSrvCallback | cb,
|  | gpointer | extradata
| ) |  |

Queries an SRV record.

Parameters

  protocol | Name of the protocol (e.g. "sip")
  transport | Name of the transport ("tcp" or "udp")
  domain | Domain name to query (e.g. "blubb.com")
  cb | A callback which will be called with the results
  extradata | Extra data to be passed to the callback

Deprecated:
  Use purple_srv_resolve_account instead

## ◆ purple_srv_resolve_account()

PurpleSrvTxtQueryData * purple_srv_resolve_account | ( | PurpleAccount * | account,
|  | const char * | protocol,
|  | const char * | transport,
|  | const char * | domain,
|  | PurpleSrvCallback | cb,
|  | gpointer | extradata
| ) |  |

Queries an SRV record.

Parameters

  account | the account that the query is being done for (or NULL)
  protocol | Name of the protocol (e.g. "sip")
  transport | Name of the transport ("tcp" or "udp")
  domain | Domain name to query (e.g. "blubb.com")
  cb | A callback which will be called with the results
  extradata | Extra data to be passed to the callback

Since
  2.8.0

## ◆ purple_srv_txt_query_destroy()

void purple_srv_txt_query_destroy | ( | PurpleSrvTxtQueryData * | query_data | ) |

Cancel a SRV/TXT query and destroy the associated data structure.

Parameters

  query_data | The SRV/TXT query to cancel. This data structure is freed by this function.

## ◆ purple_srv_txt_query_get_query()

char * purple_srv_txt_query_get_query | ( | PurpleSrvTxtQueryData * | query_data | ) |

Get the query from a PurpleDnsQueryData.

Parameters

  query_data | The SRV/TXT query

Returns
  The query.

## ◆ purple_srv_txt_query_get_type()

int purple_srv_txt_query_get_type | ( | PurpleSrvTxtQueryData * | query_data | ) |

Get the type from a PurpleDnsQueryData (TXT or SRV)

Parameters

  query_data | The query

Returns
  The query.

## ◆ purple_srv_txt_query_get_ui_ops()

PurpleSrvTxtQueryUiOps * purple_srv_txt_query_get_ui_ops | ( | void |  | ) |

Returns the UI operations structure to be used when doing a SRV/TXT resolve.

Returns
  The UI operations structure.

## ◆ purple_srv_txt_query_set_ui_ops()

void purple_srv_txt_query_set_ui_ops | ( | PurpleSrvTxtQueryUiOps * | ops | ) |

Sets the UI operations structure to be used when doing a SRV/TXT resolve.

The UI operations need only be set if the UI wants to handle the resolve itself; otherwise, leave it as NULL.

Parameters

  ops | The UI operations structure.

## ◆ purple_txt_cancel()

void purple_txt_cancel | ( | PurpleSrvTxtQueryData * | query_data | ) |

Cancel an TXT DNS query.

Parameters

  query_data | The request to cancel.

Since
  2.6.0

Deprecated:
  Use purple_srv_txt_query_destroy instead

## ◆ purple_txt_resolve()

PurpleSrvTxtQueryData * purple_txt_resolve | ( | const char * | owner,
|  | const char * | domain,
|  | PurpleTxtCallback | cb,
|  | gpointer | extradata
| ) |  |

Queries an TXT record.

Parameters

  owner | Name of the protocol (e.g. "_xmppconnect")
  domain | Domain name to query (e.g. "blubb.com")
  cb | A callback which will be called with the results
  extradata | Extra data to be passed to the callback

Deprecated:
  Use purple_txt_resolve_account instead

Since
  2.6.0

## ◆ purple_txt_resolve_account()

PurpleSrvTxtQueryData * purple_txt_resolve_account | ( | PurpleAccount * | account,
|  | const char * | owner,
|  | const char * | domain,
|  | PurpleTxtCallback | cb,
|  | gpointer | extradata
| ) |  |

Queries an TXT record.

Parameters

  account | the account that the query is being done for (or NULL)
  owner | Name of the protocol (e.g. "_xmppconnect")
  domain | Domain name to query (e.g. "blubb.com")
  cb | A callback which will be called with the results
  extradata | Extra data to be passed to the callback

Since
  2.8.0

## ◆ purple_txt_response_destroy()

void purple_txt_response_destroy | ( | PurpleTxtResponse * | response | ) |

Destroy a TXT DNS response object.

Parameters

  response | The PurpleTxtResponse to destroy.

Since
  2.6.0

## ◆ purple_txt_response_get_content()

const gchar * purple_txt_response_get_content | ( | PurpleTxtResponse * | response | ) |

Get the value of the current TXT record.

Parameters

  response | The TXT response record

Returns
  The value of the current TXT record.

Since
  2.6.0