Linc Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# linc-types

## Name

linc-types -- the base linc types and utilities

## Synopsis

    enum        LINCConnectionOptions;
    struct      LincWatch;
    struct      LINCProtocolInfo;
    #define     LINC_MUTEX_LOCK                 (x)
    #define     LINC_MUTEX_UNLOCK               (x)
    GMutex*     linc_mutex_new                  (void);

## Description

## Details

### enum LINCConnectionOptions

    typedef enum {
    	LINC_CONNECTION_SSL          = 1 << 0,
    	LINC_CONNECTION_NONBLOCKING  = 1 << 1,
    	LINC_CONNECTION_BLOCK_SIGNAL = 1 << 2,
    	LINC_CONNECTION_LOCAL_ONLY   = 1 << 3
    } LINCConnectionOptions;

### struct LincWatch

    struct LincWatch;

### struct LINCProtocolInfo

    struct LINCProtocolInfo {
    	const char                 *name;
    	int                         family;
    	int                         addr_len;
    	int                         stream_proto_num;
    	LINCProtocolFlags           flags;

    	LINCProtocolSetupFunc       setup;
    	LINCProtocolDestroyFunc     destroy;
    	LINCProtocolGetSockAddrFunc get_sockaddr;
    	LINCProtocolGetSockInfoFunc get_sockinfo;
    	LINCProtocolIsLocal         is_local;
    	/* This structure is private and may be extended in future */
    	gpointer                    dummy[8];
    };

### LINC_MUTEX_LOCK()

    #define     LINC_MUTEX_LOCK(x)

Locks the mutex pointed to by `x` if the mutex is non NULL. A NULL condition signals that there is no need to do locking.

`x` : | a pointer to a GMutex.

### LINC_MUTEX_UNLOCK()

    #define     LINC_MUTEX_UNLOCK(x)

Unlocks the mutex pointed to by `x` if the mutex is non NULL. A NULL condition signals that there is no need to do locking.

`x` : | a pointer to a GMutex.

### linc_mutex_new ()

    GMutex*     linc_mutex_new                  (void);

Creates a mutes, iff threads are supported, initialized and linc_set_threaded has been called.

Returns : | a new GMutex, or NULL if one is not required.

<<< Previous Page | Home | Up | Next Page >>>
LINCServer | linc