## CamelService

CamelService

## Synopsis

    struct              CamelService;
    #define             CAMEL_SERVICE_USERNAME
    #define             CAMEL_SERVICE_AUTH
    #define             CAMEL_SERVICE_HOSTNAME
    #define             CAMEL_SERVICE_PORT
    #define             CAMEL_SERVICE_PATH
    enum                CamelServiceConnectionStatus;
                        CamelServiceAuthType;
    void                camel_service_construct             (CamelService *service,
                                                             CamelSession *session,
                                                             CamelProvider *provider,
                                                             CamelURL *url,
                                                             CamelException *ex);
    gboolean            camel_service_connect               (CamelService *service,
                                                             CamelException *ex);
    gboolean            camel_service_disconnect            (CamelService *service,
                                                             gboolean clean,
                                                             CamelException *ex);
    void                camel_service_cancel_connect        (CamelService *service);
    char*               camel_service_get_url               (CamelService *service);
    char*               camel_service_get_name              (CamelService *service,
                                                             gboolean brief);
    char*               camel_service_get_path              (CamelService *service);
    CamelSession*       camel_service_get_session           (CamelService *service);
    CamelProvider*      camel_service_get_provider          (CamelService *service);
    GList*              camel_service_query_auth_types      (CamelService *service,
                                                             CamelException *ex);

## Description

## Details

### struct CamelService

    struct CamelService {
    	CamelObject parent_object;
    	struct _CamelServicePrivate *priv;

    	CamelSession *session;
    	CamelProvider *provider;
    	CamelServiceConnectionStatus status;
    	CamelOperation *connect_op;
    	CamelURL *url;
    };

### CAMEL_SERVICE_USERNAME

    #define CAMEL_SERVICE_USERNAME     (CAMEL_SERVICE_ARG_USERNAME | CAMEL_ARG_STR)

### CAMEL_SERVICE_AUTH

    #define CAMEL_SERVICE_AUTH         (CAMEL_SERVICE_ARG_AUTH | CAMEL_ARG_STR)

### CAMEL_SERVICE_HOSTNAME

    #define CAMEL_SERVICE_HOSTNAME     (CAMEL_SERVICE_ARG_HOSTNAME | CAMEL_ARG_STR)

### CAMEL_SERVICE_PORT

    #define CAMEL_SERVICE_PORT         (CAMEL_SERVICE_ARG_PORT | CAMEL_ARG_INT)

### CAMEL_SERVICE_PATH

    #define CAMEL_SERVICE_PATH         (CAMEL_SERVICE_ARG_PATH | CAMEL_ARG_STR)

### enum CamelServiceConnectionStatus

    typedef enum {
    	CAMEL_SERVICE_DISCONNECTED,
    	CAMEL_SERVICE_CONNECTING,
    	CAMEL_SERVICE_CONNECTED,
    	CAMEL_SERVICE_DISCONNECTING
    } CamelServiceConnectionStatus;

### CamelServiceAuthType

    typedef struct {
    	char *name;               /* user-friendly name */
    	char *description;
    	char *authproto;

    	gboolean need_password;   /* needs a password to authenticate */
    } CamelServiceAuthType;

### camel_service_construct ()

    void                camel_service_construct             (CamelService *service,
                                                             CamelSession *session,
                                                             CamelProvider *provider,
                                                             CamelURL *url,
                                                             CamelException *ex);

`service` : |
`session` : |
`provider` : |
`url` : |
`ex` : |

### camel_service_connect ()

    gboolean            camel_service_connect               (CamelService *service,
                                                             CamelException *ex);

`service` : |
`ex` : |
Returns : |

### camel_service_disconnect ()

    gboolean            camel_service_disconnect            (CamelService *service,
                                                             gboolean clean,
                                                             CamelException *ex);

`service` : |
`clean` : |
`ex` : |
Returns : |

### camel_service_cancel_connect ()

    void                camel_service_cancel_connect        (CamelService *service);

`service` : |

### camel_service_get_url ()

    char*               camel_service_get_url               (CamelService *service);

`service` : |
Returns : |

### camel_service_get_name ()

    char*               camel_service_get_name              (CamelService *service,
                                                             gboolean brief);

`service` : |
`brief` : |
Returns : |

### camel_service_get_path ()

    char*               camel_service_get_path              (CamelService *service);

`service` : |
Returns : |

### camel_service_get_session ()

    CamelSession*       camel_service_get_session           (CamelService *service);

`service` : |
Returns : |

### camel_service_get_provider ()

    CamelProvider*      camel_service_get_provider          (CamelService *service);

`service` : |
Returns : |

### camel_service_query_auth_types ()

    GList*              camel_service_query_auth_types      (CamelService *service,
                                                             CamelException *ex);

`service` : |
`ex` : |
Returns : |