<commit_before>/*
 * Mojito - social data store
 * Copyright (C) 2008 - 2009 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 */


#ifndef _MOJITO_SERVICE
#define _MOJITO_SERVICE

#include <glib-object.h>
#include <mojito/mojito-types.h>
#include <mojito/mojito-item.h>
#include <mojito/mojito-set.h>

G_BEGIN_DECLS

#define MOJITO_TYPE_SERVICE mojito_service_get_type()

#define MOJITO_SERVICE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOJITO_TYPE_SERVICE, MojitoService))

#define MOJITO_SERVICE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), MOJITO_TYPE_SERVICE, MojitoServiceClass))

#define MOJITO_IS_SERVICE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOJITO_TYPE_SERVICE))

#define MOJITO_IS_SERVICE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), MOJITO_TYPE_SERVICE))

#define MOJITO_SERVICE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), MOJITO_TYPE_SERVICE, MojitoServiceClass))

struct _MojitoService {
  GObject parent;
};

typedef struct _MojitoServiceClass MojitoServiceClass;
struct _MojitoServiceClass {
  GObjectClass parent_class;
  /* signals */
  void (*avatar_retrieved)(MojitoService *service, const gchar *path);
  /* vfuncs */
  const char *(*get_name) (MojitoService *service);
  void (*start) (MojitoService *service);
  /* fires ::refreshed (MojitoSet *set) signal */
  void (*refresh) (MojitoService *service);
  MojitoItem *(*get_last_item) (MojitoService *service);
  gchar *(*get_persona_icon) (MojitoService *service);
  gboolean (*update_status) (MojitoService *service, const gchar *status_message);
  guint32 (*get_capabilities) (MojitoService *service);
  /* ::caps-changed signal emitted when this changes */
  void (*request_avatar) (MojitoService *service);
};

typedef enum
{
  SERVICE_CAN_GET_PERSONA_ICON = 1,
  SERVICE_CAN_UPDATE_STATUS = 1 << 1
} MojitoServiceCapabilityFlags;

GType mojito_service_get_type (void);

const char *mojito_service_get_name (MojitoService *service);

void mojito_service_start (MojitoService *service);

void mojito_service_refresh (MojitoService *service);

void mojito_service_emit_refreshed (MojitoService *service, MojitoSet *set);

void mojito_service_emit_capabilities_changed (MojitoService *service, guint32 caps);

void mojito_service_emit_avatar_retrieved (MojitoService *service,
                                           const gchar   *path);

G_END_DECLS<commit_msg>Add SERVICE_CAN_REQUEST_AVATAR capability to list of types<commit_after>/*
 * Mojito - social data store
 * Copyright (C) 2008 - 2009 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 */


#ifndef _MOJITO_SERVICE
#define _MOJITO_SERVICE

#include <glib-object.h>
#include <mojito/mojito-types.h>
#include <mojito/mojito-item.h>
#include <mojito/mojito-set.h>

G_BEGIN_DECLS

#define MOJITO_TYPE_SERVICE mojito_service_get_type()

#define MOJITO_SERVICE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOJITO_TYPE_SERVICE, MojitoService))

#define MOJITO_SERVICE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), MOJITO_TYPE_SERVICE, MojitoServiceClass))

#define MOJITO_IS_SERVICE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOJITO_TYPE_SERVICE))

#define MOJITO_IS_SERVICE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), MOJITO_TYPE_SERVICE))

#define MOJITO_SERVICE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), MOJITO_TYPE_SERVICE, MojitoServiceClass))

struct _MojitoService {
  GObject parent;
};

typedef struct _MojitoServiceClass MojitoServiceClass;
struct _MojitoServiceClass {
  GObjectClass parent_class;
  /* signals */
  void (*avatar_retrieved)(MojitoService *service, const gchar *path);
  /* vfuncs */
  const char *(*get_name) (MojitoService *service);
  void (*start) (MojitoService *service);
  /* fires ::refreshed (MojitoSet *set) signal */
  void (*refresh) (MojitoService *service);
  MojitoItem *(*get_last_item) (MojitoService *service);
  gchar *(*get_persona_icon) (MojitoService *service);
  gboolean (*update_status) (MojitoService *service, const gchar *status_message);
  guint32 (*get_capabilities) (MojitoService *service);
  /* ::caps-changed signal emitted when this changes */
  void (*request_avatar) (MojitoService *service);
};

typedef enum
{
  SERVICE_CAN_GET_PERSONA_ICON = 1,
  SERVICE_CAN_UPDATE_STATUS = 1 << 1,
  SERVICE_CAN_REQUEST_AVATAR = 1 << 2
} MojitoServiceCapabilityFlags;

GType mojito_service_get_type (void);

const char *mojito_service_get_name (MojitoService *service);

void mojito_service_start (MojitoService *service);

void mojito_service_refresh (MojitoService *service);

void mojito_service_emit_refreshed (MojitoService *service, MojitoSet *set);

void mojito_service_emit_capabilities_changed (MojitoService *service, guint32 caps);

void mojito_service_emit_avatar_retrieved (MojitoService *service,
                                           const gchar   *path);

G_END_DECLS
{'fraction_non_alphanumeric': 0.0907612231620039, 'fraction_numerical': 0.009433962264150943, 'mean_word_length': 5.3391752577319584, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2723745', 'n_tokens_mistral': 2111, 'n_tokens_neox': 2084, 'n_words': 552}