Gjsify LogoGjsify Logo

A notification to be read through the #GIOChannel which is returned by gda_thread_wrapper_get_io_channel(), for example: <![CDATA[ gboolean wrapper_ioc_cb (GIOChannel *source, GIOCondition condition, gpointer data) { GIOStatus status; gsize nread; GdaThreadNotification notif; if (condition & G_IO_IN) { status = g_io_channel_read_chars (source, (gchar*) &notif, sizeof (notif), &nread, NULL); if ((status != G_IO_STATUS_NORMAL) || (nread != sizeof (notif))) goto onerror; switch (notif.type) { case GDA_THREAD_NOTIFICATION_JOB: check_for_wrapper_result (bcnc); break; case GDA_THREAD_NOTIFICATION_SIGNAL: gda_thread_wrapper_iterate (bcnc->priv->wrapper, FALSE); break; default: goto onerror; break; } } if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) goto onerror; return TRUE; // keep callback

onerror: g_io_channel_shutdown (bcnc->priv->ioc, FALSE, NULL); return FALSE; // removed callback }

{ [...] GIOChannel *ioc; ioc = gda_thread_wrapper_get_io_channel (wrapper); if (!ioc) [handle error] else { guint watch_id; watch_id = g_io_add_watch (ioc, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL, (GIOFunc) wrapper_ioc_cb, NULL); } } ]]>

record

Hierarchy

  • ThreadNotification

Index

Constructors

Properties

Constructors

Properties

jobId: number

the job ID, if type is a #GDA_THREAD_NOTIFICATION_JOB

field

the notification type

field
name: string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method