|  |  |  | libsocialweb Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
enum SwServiceError; #define SW_SERVICE_ERROR GQuark sw_service_error_quark (void); SwService; struct SwServiceClass; #define IS_CONFIGURED #define CAN_VERIFY_CREDENTIALS #define CREDENTIALS_VALID #define CREDENTIALS_INVALID #define CAN_UPDATE_STATUS #define CAN_REQUEST_AVATAR #define CAN_GEOTAG #define CAN_UPDATE_STATUS_WITH_GEOTAG #define HAS_AVATAR_IFACE #define HAS_BANISHABLE_IFACE #define HAS_PHOTO_UPLOAD_IFACE #define HAS_QUERY_IFACE #define HAS_UPDATE_STATUS_IFACE const char * sw_service_get_name (SwService *service); void sw_service_emit_capabilities_changed (SwService *service,const char **caps); void sw_service_emit_user_changed (SwService *service); gboolean sw_service_is_uid_banned (SwService *service,const gchar *uid); gboolean sw_service_has_cap (const char **caps,const char *cap); void (*SwServiceSetParamFunc) (gpointer object,const gchar *param_name,const gchar *param_value); void sw_service_map_params (const ParameterNameMapping *mapping,GHashTable *parameters,SwServiceSetParamFunc set_param_func,gpointer remote_call_object);
typedef enum {
  SW_SERVICE_ERROR_NO_KEYS, /*< nick=NoKeys >*/
  SW_SERVICE_ERROR_INVALID_QUERY, /*< nick=InvalidQuery >*/
  SW_SERVICE_ERROR_NOT_SUPPORTED, /*< nick=NotSupported >*/
  SW_SERVICE_ERROR_REMOTE_ERROR, /*< nick=RemoteError >*/
  SW_SERVICE_ERROR_INCOMPLETE_KEY_FILE /*< nick=IncompleteKeyFile >*/
} SwServiceError;
struct SwServiceClass {
  GObjectClass parent_class;
  /* vfuncs */
  const char *(*get_name) (SwService *service);
  const gchar ** (*get_static_caps) (SwService *service);
  const gchar ** (*get_dynamic_caps) (SwService *service);
  void (*credentials_updated) (SwService *service);
};
void sw_service_emit_capabilities_changed (SwService *service,const char **caps);
gboolean sw_service_is_uid_banned (SwService *service,const gchar *uid);
void (*SwServiceSetParamFunc) (gpointer object,const gchar *param_name,const gchar *param_value);
This type signature reflects a function that sets a name/value association on a given object. Functions such as g_hash_table_insert and rest_proxy_call_add_param are good examples.
| 
 | A remote call or hash object that can store key/value pairs. | 
| 
 | The parameter name. | 
| 
 | The parameter value. | 
void sw_service_map_params (const ParameterNameMapping *mapping,GHashTable *parameters,SwServiceSetParamFunc set_param_func,gpointer remote_call_object);
Re-map a group of parameters with alternative parameter names. Used for converting lsw parameter names to service-specific ones.
| 
 | An array of ParameterNameMapping pairs. | 
| 
 | The GHashtable of given parameters. | 
| 
 | A SwServiceSetParamFunc that sets a name/value association on the given object. | 
| 
 | The remote call or hash table object that set_param_functakes as a first parameter. |