~tristan957/harvest-almanac

75a5ad844a3c22dcb9a1b39cea062cd9e2665ea5 — Tristan Partin 1 year, 8 months ago c097fbd
THE REORG
79 files changed, 427 insertions(+), 324 deletions(-)

M harvest-almanac/hal-application.c
M harvest-almanac/hal-context.c
M harvest-almanac/hal-preferences-window.c
M harvest-almanac/hal-profile.c
M harvest-almanac/hal-time-entry.c
M harvest-almanac/hal-time-tracker.c
M harvest-almanac/hal-window.c
M harvest-almanac/main.c
M harvest-almanac/meson.build
R harvest-glib/{harvest-client.c => client/harvest-client.c}
R harvest-glib/{harvest-client.h => client/harvest-client.h}
A harvest-glib/client/meson.build
R harvest-glib/{harvest-common.c => common/harvest-common.c}
R harvest-glib/{harvest-common.h => common/harvest-common.h}
R harvest-glib/{harvest-creator.c => common/harvest-creator.c}
R harvest-glib/{harvest-creator.h => common/harvest-creator.h}
A harvest-glib/common/meson.build
R harvest-glib/{harvest-company.c => company/harvest-company.c}
R harvest-glib/{harvest-company.h => company/harvest-company.h}
A harvest-glib/company/meson.build
R harvest-glib/{harvest-get-company-request.c => company/requests/harvest-get-company-request.c}
R harvest-glib/{harvest-get-company-request.h => company/requests/harvest-get-company-request.h}
R harvest-glib/{harvest-estimate-item-category.c => estimate/harvest-estimate-item-category.c}
R harvest-glib/{harvest-estimate-item-category.h => estimate/harvest-estimate-item-category.h}
R harvest-glib/{harvest-estimate-line-item.c => estimate/harvest-estimate-line-item.c}
R harvest-glib/{harvest-estimate-line-item.h => estimate/harvest-estimate-line-item.h}
R harvest-glib/{harvest-estimate.c => estimate/harvest-estimate.c}
R harvest-glib/{harvest-estimate.h => estimate/harvest-estimate.h}
A harvest-glib/estimate/meson.build
M harvest-glib/harvest.h
R harvest-glib/{harvest-api-client.c => http/api/harvest-api-client.c}
R harvest-glib/{harvest-api-client.h => http/api/harvest-api-client.h}
R harvest-glib/{harvest-http.h => http/harvest-http.h}
A harvest-glib/http/meson.build
R harvest-glib/{harvest-pageable.c => http/request/harvest-pageable.c}
R harvest-glib/{harvest-pageable.h => http/request/harvest-pageable.h}
R harvest-glib/{harvest-request.c => http/request/harvest-request.c}
R harvest-glib/{harvest-request.h => http/request/harvest-request.h}
R harvest-glib/{harvest-links.c => http/response/harvest-links.c}
R harvest-glib/{harvest-links.h => http/response/harvest-links.h}
R harvest-glib/{harvest-paged.c => http/response/harvest-paged.c}
R harvest-glib/{harvest-paged.h => http/response/harvest-paged.h}
R harvest-glib/{harvest-response-metadata.c => http/response/harvest-response-metadata.c}
R harvest-glib/{harvest-response-metadata.h => http/response/harvest-response-metadata.h}
R harvest-glib/{harvest-response.c => http/response/harvest-response.c}
R harvest-glib/{harvest-response.h => http/response/harvest-response.h}
R harvest-glib/{harvest-invoice-item-category.c => invoice/harvest-invoice-item-category.c}
R harvest-glib/{harvest-invoice-item-category.h => invoice/harvest-invoice-item-category.h}
R harvest-glib/{harvest-invoice-line-item.c => invoice/harvest-invoice-line-item.c}
R harvest-glib/{harvest-invoice-line-item.h => invoice/harvest-invoice-line-item.h}
R harvest-glib/{harvest-invoice.c => invoice/harvest-invoice.c}
R harvest-glib/{harvest-invoice.h => invoice/harvest-invoice.h}
A harvest-glib/invoice/meson.build
M harvest-glib/meson.build
R harvest-glib/{harvest-project.c => project/harvest-project.c}
R harvest-glib/{harvest-project.h => project/harvest-project.h}
R harvest-glib/{harvest-user-assignment.c => project/harvest-user-assignment.c}
R harvest-glib/{harvest-user-assignment.h => project/harvest-user-assignment.h}
A harvest-glib/project/meson.build
R harvest-glib/{harvest-task-assignment.c => task/harvest-task-assignment.c}
R harvest-glib/{harvest-task-assignment.h => task/harvest-task-assignment.h}
R harvest-glib/{harvest-task.c => task/harvest-task.c}
R harvest-glib/{harvest-task.h => task/harvest-task.h}
A harvest-glib/task/meson.build
M harvest-glib/tests/init.h
M harvest-glib/tests/meson.build
M harvest-glib/tests/user.c
R harvest-glib/{harvest-time-entry.c => time-entry/harvest-time-entry.c}
R harvest-glib/{harvest-time-entry.h => time-entry/harvest-time-entry.h}
A harvest-glib/time-entry/meson.build
R harvest-glib/{harvest-late-request.c => time-entry/requests/harvest-late-request.c}
R harvest-glib/{harvest-late-request.h => time-entry/requests/harvest-late-request.h}
R harvest-glib/{harvest-user.c => user/harvest-user.c}
R harvest-glib/{harvest-user.h => user/harvest-user.h}
A harvest-glib/user/meson.build
R harvest-glib/{harvest-users-me-request.c => user/requests/harvest-users-me-request.c}
R harvest-glib/{harvest-users-me-request.h => user/requests/harvest-users-me-request.h}
M meson.build
M meson_options.txt
M harvest-almanac/hal-application.c => harvest-almanac/hal-application.c +0 -2
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalApplication"

#include <string.h>

#include <glib-object.h>

M harvest-almanac/hal-context.c => harvest-almanac/hal-context.c +0 -2
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalContext"

#include <gio/gio.h>
#include <glib-object.h>
#include <glib/gi18n.h>

M harvest-almanac/hal-preferences-window.c => harvest-almanac/hal-preferences-window.c +0 -2
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalPreferencesWindow"

#include <string.h>

#include <glib-object.h>

M harvest-almanac/hal-profile.c => harvest-almanac/hal-profile.c +1 -3
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalProfile"

#include <glib-object.h>
#include <gtk/gtk.h>



@@ 64,7 62,7 @@ hal_profile_set_property(
static void
hal_profile_class_init(HalProfileClass *klass)
{
	GObjectClass *obj_class   = G_OBJECT_CLASS(klass);
	GObjectClass *obj_class	  = G_OBJECT_CLASS(klass);
	GtkWidgetClass *wid_class = GTK_WIDGET_CLASS(klass);

	obj_class->finalize		= hal_profile_finalize;

M harvest-almanac/hal-time-entry.c => harvest-almanac/hal-time-entry.c +0 -2
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalTimeEntry"

#include <glib-object.h>
#include <gtk/gtk.h>


M harvest-almanac/hal-time-tracker.c => harvest-almanac/hal-time-tracker.c +1 -3
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalTimeTracker"

#include <glib-object.h>
#include <gtk/gtk.h>



@@ 137,7 135,7 @@ hal_time_tracker_set_property(
static void
hal_time_tracker_class_init(HalTimeTrackerClass *klass)
{
	GObjectClass *obj_class   = G_OBJECT_CLASS(klass);
	GObjectClass *obj_class	  = G_OBJECT_CLASS(klass);
	GtkWidgetClass *wid_class = GTK_WIDGET_CLASS(klass);

	obj_class->finalize		= hal_time_tracker_finalize;

M harvest-almanac/hal-window.c => harvest-almanac/hal-window.c +0 -2
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HalWindow"

#include <glib-object.h>
#include <gtk/gtk.h>
#include <handy.h>

M harvest-almanac/main.c => harvest-almanac/main.c +0 -2
@@ 1,7 1,5 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestAlmanac"

#include <locale.h>

#include <glib-object.h>

M harvest-almanac/meson.build => harvest-almanac/meson.build +7 -0
@@ 30,8 30,15 @@ harvest_almanac_sources = [

harvest_almanac_c_args = [
    '-DHANDY_USE_UNSTABLE_API',
    '-DG_LOG_DOMAIN="harvest-almanac"',
]

if not get_option('use-system-harvest-glib')
    harvest_almanac_c_args += [
        '-I' + join_paths(meson.current_source_dir(), '..', 'harvest-glib'),
    ]
endif

if get_option('buildtype') == 'release'
    harvest_almanac_c_args += [
        '-DG_DISABLE_ASSERT',

R harvest-glib/harvest-client.c => harvest-glib/client/harvest-client.c +3 -4
@@ 1,5 1,4 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestClient"
#include "harvest-glib/config.h"

#include <limits.h>



@@ 7,7 6,7 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-client.h"
#include "harvest-glib/client/harvest-client.h"

struct _HarvestClient
{


@@ 180,7 179,7 @@ harvest_client_class_init(HarvestClientClass *klass)
	obj_properties[PROP_ADDRESS]
		= g_param_spec_string("address", _("Address"), _("The physical address for the client."),
			NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_CURRENCY]   = g_param_spec_string("currency", _("Currency"),
	obj_properties[PROP_CURRENCY]	= g_param_spec_string("currency", _("Currency"),
		  _("The currency code associated with this client."), NULL,
		  G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_CREATED_AT] = g_param_spec_boxed("created_at", _("Created At"),

R harvest-glib/harvest-client.h => harvest-glib/client/harvest-client.h +0 -0
A harvest-glib/client/meson.build => harvest-glib/client/meson.build +7 -0
@@ 0,0 1,7 @@
component_public_headers = [
	'harvest-client.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'client')

install_headers(component_public_headers, subdir: component_header_subdir)

R harvest-glib/harvest-common.c => harvest-glib/common/harvest-common.c +2 -4
@@ 1,10 1,8 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestCommon"
#include "harvest-glib/config.h"

#include <glib-object.h>

#include "harvest-common.h"
#include "harvest-glib/common/harvest-common.h"

// Never gets unrefed
static const GRegex *regex;

R harvest-glib/harvest-common.h => harvest-glib/common/harvest-common.h +0 -0
R harvest-glib/harvest-creator.c => harvest-glib/common/harvest-creator.c +2 -3
@@ 1,12 1,11 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestCreator"
#include "harvest-glib/config.h"

#include <limits.h>

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-creator.h"
#include "harvest-glib/common/harvest-creator.h"

struct _HarvestCreator
{

R harvest-glib/harvest-creator.h => harvest-glib/common/harvest-creator.h +0 -0
A harvest-glib/common/meson.build => harvest-glib/common/meson.build +8 -0
@@ 0,0 1,8 @@
component_public_headers = [
	'harvest-common.h',
	'harvest-creator.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'common')

install_headers(component_public_headers, subdir: component_header_subdir)

R harvest-glib/harvest-company.c => harvest-glib/company/harvest-company.c +4 -6
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestCompany"
#include "harvest-glib/config.h"

#include <limits.h>



@@ 8,9 6,9 @@
#include <glib/gi18n.h>
#include <json-glib/json-glib.h>

#include "harvest-company.h"
#include "harvest-enum-types.h"
#include "harvest-get-company-request.h"
#include "harvest-glib/company/harvest-company-enum-types.h"
#include "harvest-glib/company/harvest-company.h"
#include "harvest-glib/company/requests/harvest-get-company-request.h"

struct _HarvestCompany
{

R harvest-glib/harvest-company.h => harvest-glib/company/harvest-company.h +2 -2
@@ 6,8 6,8 @@

#include <glib-object.h>

#include "harvest-api-client.h"
#include "harvest-response.h"
#include "harvest-glib/http/api/harvest-api-client.h"
#include "harvest-glib/http/response/harvest-response.h"

G_BEGIN_DECLS


A harvest-glib/company/meson.build => harvest-glib/company/meson.build +28 -0
@@ 0,0 1,28 @@
component_public_headers = [
	'harvest-company.h',
]

request_public_headers = [
	'requests/harvest-get-company-request.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'company')
requests_header_subdir = join_paths(component_header_subdir, 'requests')

company_enums = gnome.mkenums_simple(
    'harvest-company-enum-types',
    sources: [
        'harvest-company.h',
    ],
    install_header: true,
    install_dir: join_paths(get_option('prefix'), get_option('includedir'), component_header_subdir),
    header_prefix:
'''
#if !defined(__HARVEST_HEADER_INTERNAL__) && !defined(__HARVEST_COMPILATION__)
#	error "Only <harvest-glib/harvest.h> can be included directly."
#endif
''',
)

install_headers(component_public_headers, subdir: component_header_subdir)
install_headers(request_public_headers, subdir: requests_header_subdir)

R harvest-glib/harvest-get-company-request.c => harvest-glib/company/requests/harvest-get-company-request.c +6 -8
@@ 1,14 1,12 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestGetComapnyRequest"
#include "harvest-glib/config.h"

#include <glib-object.h>

#include "harvest-company.h"
#include "harvest-get-company-request.h"
#include "harvest-http.h"
#include "harvest-request.h"
#include "harvest-response-metadata.h"
#include "harvest-glib/company/harvest-company.h"
#include "harvest-glib/company/requests/harvest-get-company-request.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"

struct _HarvestGetCompanyRequest
{

R harvest-glib/harvest-get-company-request.h => harvest-glib/company/requests/harvest-get-company-request.h +1 -1
@@ 6,7 6,7 @@

#include <glib-object.h>

#include "harvest-request.h"
#include "harvest-glib/http/request/harvest-request.h"

G_BEGIN_DECLS


R harvest-glib/harvest-estimate-item-category.c => harvest-glib/estimate/harvest-estimate-item-category.c +2 -3
@@ 1,5 1,4 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestEstimateItemCategory"
#include "harvest-glib/config.h"

#include <limits.h>



@@ 7,7 6,7 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-estimate-item-category.h"
#include "harvest-glib/estimate/harvest-estimate-item-category.h"

struct _HarvestEstimateItemCategory
{

R harvest-glib/harvest-estimate-item-category.h => harvest-glib/estimate/harvest-estimate-item-category.h +0 -0
R harvest-glib/harvest-estimate-line-item.c => harvest-glib/estimate/harvest-estimate-line-item.c +3 -4
@@ 1,5 1,4 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestEstimateLineItem"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 7,7 6,7 @@
#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-estimate-line-item.h"
#include "harvest-glib/estimate/harvest-estimate-line-item.h"

struct _HarvestEstimateLineItem
{


@@ 151,7 150,7 @@ harvest_estimate_line_item_class_init(HarvestEstimateLineItemClass *klass)
	obj_properties[PROP_AMOUNT] = g_param_spec_double("amount", _("Amount"),
		_("The line item subtotal (quantity * unit_price)."), 0, DBL_MAX, 0,
		G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TAXED]  = g_param_spec_boolean("taxed", _("Taxed"),
	obj_properties[PROP_TAXED]	= g_param_spec_boolean("taxed", _("Taxed"),
		 _("Whether the estimate’s tax percentage applies to this line item."), FALSE,
		 G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TAXED2] = g_param_spec_boolean("taxed2", _("Taxed2"),

R harvest-glib/harvest-estimate-line-item.h => harvest-glib/estimate/harvest-estimate-line-item.h +0 -0
R harvest-glib/harvest-estimate.c => harvest-glib/estimate/harvest-estimate.c +7 -8
@@ 1,5 1,4 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestEstimate"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 8,12 7,12 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-client.h"
#include "harvest-common.h"
#include "harvest-creator.h"
#include "harvest-enum-types.h"
#include "harvest-estimate-line-item.h"
#include "harvest-estimate.h"
#include "harvest-glib/client/harvest-client.h"
#include "harvest-glib/common/harvest-common.h"
#include "harvest-glib/common/harvest-creator.h"
#include "harvest-glib/estimate/harvest-estimate-enum-types.h"
#include "harvest-glib/estimate/harvest-estimate-line-item.h"
#include "harvest-glib/estimate/harvest-estimate.h"

struct _HarvestEstimate
{

R harvest-glib/harvest-estimate.h => harvest-glib/estimate/harvest-estimate.h +0 -0
A harvest-glib/estimate/meson.build => harvest-glib/estimate/meson.build +24 -0
@@ 0,0 1,24 @@
component_public_headers = [
	'harvest-estimate.h',
	'harvest-estimate-item-category.h',
	'harvest-estimate-line-item.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'estimate')

install_headers(component_public_headers, subdir: component_header_subdir)

estimate_enums = gnome.mkenums_simple(
    'harvest-estimate-enum-types',
    sources: [
        'harvest-estimate.h',
    ],
    install_header: true,
    install_dir: join_paths(get_option('prefix'), get_option('includedir'), component_header_subdir),
    header_prefix:
'''
#if !defined(__HARVEST_HEADER_INTERNAL__) && !defined(__HARVEST_COMPILATION__)
#	error "Only <harvest-glib/harvest.h> can be included directly."
#endif
''',
)

M harvest-glib/harvest.h => harvest-glib/harvest.h +31 -28
@@ 2,33 2,36 @@

#define __HARVEST_HEADER_INTERNAL__

#include "harvest-api-client.h"
#include "harvest-client.h"
#include "harvest-common.h"
#include "harvest-company.h"
#include "harvest-creator.h"
#include "harvest-enum-types.h"
#include "harvest-estimate-item-category.h"
#include "harvest-estimate-line-item.h"
#include "harvest-estimate.h"
#include "harvest-get-company-request.h"
#include "harvest-http.h"
#include "harvest-invoice-item-category.h"
#include "harvest-invoice-line-item.h"
#include "harvest-invoice.h"
#include "harvest-late-request.h"
#include "harvest-links.h"
#include "harvest-pageable.h"
#include "harvest-paged.h"
#include "harvest-project.h"
#include "harvest-request.h"
#include "harvest-response-metadata.h"
#include "harvest-response.h"
#include "harvest-task-assignment.h"
#include "harvest-task.h"
#include "harvest-time-entry.h"
#include "harvest-user-assignment.h"
#include "harvest-user.h"
#include "harvest-users-me-request.h"
#include "harvest-glib/client/harvest-client.h"
#include "harvest-glib/common/harvest-common.h"
#include "harvest-glib/common/harvest-creator.h"
#include "harvest-glib/company/harvest-company-enum-types.h"
#include "harvest-glib/company/harvest-company.h"
#include "harvest-glib/company/requests/harvest-get-company-request.h"
#include "harvest-glib/estimate/harvest-estimate-enum-types.h"
#include "harvest-glib/estimate/harvest-estimate-item-category.h"
#include "harvest-glib/estimate/harvest-estimate-line-item.h"
#include "harvest-glib/estimate/harvest-estimate.h"
#include "harvest-glib/http/api/harvest-api-client.h"
#include "harvest-glib/http/harvest-http-enum-types.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/request/harvest-pageable.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-links.h"
#include "harvest-glib/http/response/harvest-paged.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"
#include "harvest-glib/http/response/harvest-response.h"
#include "harvest-glib/invoice/harvest-invoice-enum-types.h"
#include "harvest-glib/invoice/harvest-invoice-item-category.h"
#include "harvest-glib/invoice/harvest-invoice-line-item.h"
#include "harvest-glib/invoice/harvest-invoice.h"
#include "harvest-glib/project/harvest-project.h"
#include "harvest-glib/project/harvest-user-assignment.h"
#include "harvest-glib/task/harvest-task-assignment.h"
#include "harvest-glib/task/harvest-task.h"
#include "harvest-glib/time-entry/harvest-time-entry.h"
#include "harvest-glib/time-entry/requests/harvest-late-request.h"
#include "harvest-glib/user/harvest-user.h"
#include "harvest-glib/user/requests/harvest-users-me-request.h"

#undef __HARVEST_HEADER_INTERNAL__

R harvest-glib/harvest-api-client.c => harvest-glib/http/api/harvest-api-client.c +7 -9
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestApiClient"
#include "harvest-glib/config.h"

#include <limits.h>



@@ 9,12 7,12 @@
#include <json-glib/json-glib.h>
#include <libsoup/soup.h>

#include "harvest-api-client.h"
#include "harvest-common.h"
#include "harvest-http.h"
#include "harvest-request.h"
#include "harvest-response-metadata.h"
#include "harvest-response.h"
#include "harvest-glib/common/harvest-common.h"
#include "harvest-glib/http/api/harvest-api-client.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"
#include "harvest-glib/http/response/harvest-response.h"

#define HARVEST_API_URL "https://api.harvestapp.com/v2"


R harvest-glib/harvest-api-client.h => harvest-glib/http/api/harvest-api-client.h +2 -2
@@ 7,8 7,8 @@
#include <glib-object.h>
#include <libsoup/soup.h>

#include "harvest-request.h"
#include "harvest-response.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-response.h"

G_BEGIN_DECLS


R harvest-glib/harvest-http.h => harvest-glib/http/harvest-http.h +0 -0
A harvest-glib/http/meson.build => harvest-glib/http/meson.build +44 -0
@@ 0,0 1,44 @@
component_public_headers = [
	'harvest-http.h',
]

api_public_headers = [
	'api/harvest-api-client.h',
]

request_public_headers = [
	'request/harvest-pageable.h',
	'request/harvest-request.h',
]

response_public_headers = [
	'response/harvest-links.h',
	'response/harvest-paged.h',
	'response/harvest-response-metadata.h',
	'response/harvest-response.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'http')
api_header_subdir = join_paths(component_header_subdir, 'api')
request_header_subdir = join_paths(component_header_subdir, 'request')
response_header_subdir = join_paths(component_header_subdir, 'response')

install_headers(component_public_headers, subdir: component_header_subdir)
install_headers(api_public_headers, subdir: api_header_subdir)
install_headers(request_public_headers, subdir: request_header_subdir)
install_headers(response_public_headers, subdir: response_header_subdir)

http_enums = gnome.mkenums_simple(
    'harvest-http-enum-types',
    sources: [
        'harvest-http.h',
    ],
    install_header: true,
    install_dir: join_paths(get_option('prefix'), get_option('includedir'), component_header_subdir),
    header_prefix:
'''
#if !defined(__HARVEST_HEADER_INTERNAL__) && !defined(__HARVEST_COMPILATION__)
#	error "Only <harvest-glib/harvest.h> can be included directly."
#endif
''',
)

R harvest-glib/harvest-pageable.c => harvest-glib/http/request/harvest-pageable.c +2 -4
@@ 1,11 1,9 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestPageable"
#include "harvest-glib/config.h"

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-pageable.h"
#include "harvest-glib/http/request/harvest-pageable.h"

G_DEFINE_INTERFACE(HarvestPageable, harvest_pageable, G_TYPE_OBJECT)


R harvest-glib/harvest-pageable.h => harvest-glib/http/request/harvest-pageable.h +0 -0
R harvest-glib/harvest-request.c => harvest-glib/http/request/harvest-request.c +6 -8
@@ 1,16 1,14 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestRequest"
#include "harvest-glib/config.h"

#include <glib-object.h>
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-enum-types.h"
#include "harvest-http.h"
#include "harvest-request.h"
#include "harvest-response-metadata.h"
#include "harvest-response.h"
#include "harvest-glib/http/harvest-http-enum-types.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"
#include "harvest-glib/http/response/harvest-response.h"

typedef struct _HarvestRequestPrivate
{

R harvest-glib/harvest-request.h => harvest-glib/http/request/harvest-request.h +3 -3
@@ 6,9 6,9 @@

#include <glib-object.h>

#include "harvest-http.h"
#include "harvest-response-metadata.h"
#include "harvest-response.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"
#include "harvest-glib/http/response/harvest-response.h"

G_BEGIN_DECLS


R harvest-glib/harvest-links.c => harvest-glib/http/response/harvest-links.c +4 -3
@@ 1,13 1,14 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestLinks"
#include "harvest-glib/config.h"

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-links.h"
#include "harvest-glib/http/response/harvest-links.h"

struct _HarvestLinks
{
	GObject parent_instance;

	char *first;
	char *next;
	char *previous;

R harvest-glib/harvest-links.h => harvest-glib/http/response/harvest-links.h +0 -0
R harvest-glib/harvest-paged.c => harvest-glib/http/response/harvest-paged.c +3 -5
@@ 1,12 1,10 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestPaged"
#include "harvest-glib/config.h"

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-links.h"
#include "harvest-paged.h"
#include "harvest-glib/http/response/harvest-links.h"
#include "harvest-glib/http/response/harvest-paged.h"

typedef struct _HarvestPagedPrivate
{

R harvest-glib/harvest-paged.h => harvest-glib/http/response/harvest-paged.h +0 -0
R harvest-glib/harvest-response-metadata.c => harvest-glib/http/response/harvest-response-metadata.c +4 -6
@@ 1,13 1,11 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestResponseMetadata"
#include "harvest-glib/config.h"

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-enum-types.h"
#include "harvest-http.h"
#include "harvest-response-metadata.h"
#include "harvest-glib/http/harvest-http-enum-types.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"

struct _HarvestResponseMetadata
{

R harvest-glib/harvest-response-metadata.h => harvest-glib/http/response/harvest-response-metadata.h +1 -1
@@ 6,7 6,7 @@

#include <glib-object.h>

#include "harvest-http.h"
#include "harvest-glib/http/harvest-http.h"

G_BEGIN_DECLS


R harvest-glib/harvest-response.c => harvest-glib/http/response/harvest-response.c +4 -6
@@ 1,13 1,11 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestResponse"
#include "harvest-glib/config.h"

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-enum-types.h"
#include "harvest-http.h"
#include "harvest-response.h"
#include "harvest-glib/http/harvest-http-enum-types.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/response/harvest-response.h"

G_DEFINE_TYPE(HarvestResponse, harvest_response, G_TYPE_OBJECT)


R harvest-glib/harvest-response.h => harvest-glib/http/response/harvest-response.h +1 -1
@@ 6,7 6,7 @@

#include <glib-object.h>

#include "harvest-http.h"
#include "harvest-glib/http/harvest-http.h"

G_BEGIN_DECLS


R harvest-glib/harvest-invoice-item-category.c => harvest-glib/invoice/harvest-invoice-item-category.c +2 -3
@@ 1,5 1,4 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestInvoiceItemCategory"
#include "harvest-glib/config.h"

#include <limits.h>



@@ 7,7 6,7 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-invoice-item-category.h"
#include "harvest-glib/invoice/harvest-invoice-item-category.h"

struct _HarvestInvoiceItemCategory
{

R harvest-glib/harvest-invoice-item-category.h => harvest-glib/invoice/harvest-invoice-item-category.h +0 -0
R harvest-glib/harvest-invoice-line-item.c => harvest-glib/invoice/harvest-invoice-line-item.c +4 -5
@@ 1,5 1,4 @@
#include "config.h"
#define G_LOG_DOMAIN "HarvestInvoiceLineItem"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 8,8 7,8 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-invoice-line-item.h"
#include "harvest-project.h"
#include "harvest-glib/invoice/harvest-invoice-line-item.h"
#include "harvest-glib/project/harvest-project.h"

struct _HarvestInvoiceLineItem
{


@@ 190,7 189,7 @@ harvest_invoice_line_item_class_init(HarvestInvoiceLineItemClass *klass)
	obj_properties[PROP_AMOUNT] = g_param_spec_double("amount", _("Amount"),
		_("The line item subtotal (quantity * unit_price)."), 0, DBL_MAX, 0,
		G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TAXED]  = g_param_spec_boolean("taxed", _("Taxed"),
	obj_properties[PROP_TAXED]	= g_param_spec_boolean("taxed", _("Taxed"),
		 _("Whether the invoice’s tax percentage applies to this line item."), FALSE,
		 G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TAXED2] = g_param_spec_boolean("taxed2", _("Taxed2"),

R harvest-glib/harvest-invoice-line-item.h => harvest-glib/invoice/harvest-invoice-line-item.h +0 -0
R harvest-glib/harvest-invoice.c => harvest-glib/invoice/harvest-invoice.c +9 -11
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestInvoice"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,14 7,14 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-client.h"
#include "harvest-common.h"
#include "harvest-creator.h"
#include "harvest-enum-types.h"
#include "harvest-estimate-line-item.h"
#include "harvest-estimate.h"
#include "harvest-invoice-line-item.h"
#include "harvest-invoice.h"
#include "harvest-glib/client/harvest-client.h"
#include "harvest-glib/common/harvest-common.h"
#include "harvest-glib/common/harvest-creator.h"
#include "harvest-glib/estimate/harvest-estimate-line-item.h"
#include "harvest-glib/estimate/harvest-estimate.h"
#include "harvest-glib/invoice/harvest-invoice-enum-types.h"
#include "harvest-glib/invoice/harvest-invoice-line-item.h"
#include "harvest-glib/invoice/harvest-invoice.h"

struct _HarvestInvoice
{

R harvest-glib/harvest-invoice.h => harvest-glib/invoice/harvest-invoice.h +0 -0
A harvest-glib/invoice/meson.build => harvest-glib/invoice/meson.build +24 -0
@@ 0,0 1,24 @@
component_public_headers = [
	'harvest-invoice-item-category.h',
	'harvest-invoice-line-item.h',
	'harvest-invoice.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'invoice')

install_headers(component_public_headers, subdir: component_header_subdir)

invoice_enums = gnome.mkenums_simple(
    'harvest-invoice-enum-types',
    sources: [
        'harvest-invoice.h',
    ],
    install_header: true,
    install_dir: join_paths(get_option('prefix'), get_option('includedir'), component_header_subdir),
    header_prefix:
'''
#if !defined(__HARVEST_HEADER_INTERNAL__) && !defined(__HARVEST_COMPILATION__)
#	error "Only <harvest-glib/harvest.h> can be included directly."
#endif
''',
)

M harvest-glib/meson.build => harvest-glib/meson.build +59 -76
@@ 1,5 1,7 @@
harvest_glib_version = '1.0.0'

harvest_glib_header_subdir = 'harvest-glib'

harvest_glib_config_h = configuration_data({
    'gettext_package': 'harvest-glib',
})


@@ 11,86 13,43 @@ configure_file(
)

harvest_glib_sources = [
    'harvest-api-client.c',
    'harvest-client.c',
    'harvest-common.c',
    'harvest-company.c',
    'harvest-creator.c',
    'harvest-estimate.c',
    'harvest-estimate-item-category.c',
    'harvest-estimate-line-item.c',
    'harvest-get-company-request.c',
    'harvest-invoice.c',
    'harvest-invoice-item-category.c',
    'harvest-invoice-line-item.c',
    'harvest-late-request.c',
    'harvest-links.c',
    'harvest-pageable.c',
    'harvest-paged.c',
    'harvest-project.c',
    'harvest-request.c',
    'harvest-response.c',
    'harvest-response-metadata.c',
    'harvest-task.c',
    'harvest-task-assignment.c',
    'harvest-time-entry.c',
    'harvest-user.c',
    'harvest-user-assignment.c',
    'harvest-users-me-request.c'
    'client/harvest-client.c',
    'common/harvest-common.c',
    'common/harvest-creator.c',
    'company/harvest-company.c',
    'company/requests/harvest-get-company-request.c',
    'estimate/harvest-estimate-item-category.c',
    'estimate/harvest-estimate-line-item.c',
    'estimate/harvest-estimate.c',
    'http/api/harvest-api-client.c',
    'http/response/harvest-links.c',
    'http/request/harvest-pageable.c',
    'http/response/harvest-paged.c',
    'http/request/harvest-request.c',
    'http/response/harvest-response.c',
    'http/response/harvest-response-metadata.c',
    'invoice/harvest-invoice-item-category.c',
    'invoice/harvest-invoice-line-item.c',
    'invoice/harvest-invoice.c',
    'project/harvest-project.c',
    'project/harvest-user-assignment.c',
    'task/harvest-task-assignment.c',
    'task/harvest-task.c',
    'time-entry/harvest-time-entry.c',
    'time-entry/requests/harvest-late-request.c',
    'user/harvest-user.c',
    'user/requests/harvest-users-me-request.c'
]

enums = gnome.mkenums_simple(
    'harvest-enum-types',
    sources: [
        'harvest-company.h',
        'harvest-estimate.h',
        'harvest-http.h',
        'harvest-invoice.h',
    ],
    install_header: true,
    header_prefix:
'''
#if !defined(__HARVEST_HEADER_INTERNAL__) && !defined(__HARVEST_COMPILATION__)
#	error "Only <harvest-glib/harvest.h> can be included directly."
#endif
''',
)

harvest_glib_public_headers = [
    'harvest.h',
    'harvest-api-client.h',
    'harvest-client.h',
    'harvest-common.h',
    'harvest-company.h',
    'harvest-creator.h',
    'harvest-estimate.h',
    'harvest-estimate-item-category.h',
    'harvest-estimate-line-item.h',
    'harvest-get-company-request.h',
    'harvest-http.h',
    'harvest-invoice.h',
    'harvest-invoice-item-category.h',
    'harvest-invoice-line-item.h',
    'harvest-late-request.h',
    'harvest-links.h',
    'harvest-pageable.h',
    'harvest-paged.h',
    'harvest-project.h',
    'harvest-request.h',
    'harvest-response.h',
    'harvest-response-metadata.h',
    'harvest-task.h',
    'harvest-task-assignment.h',
    'harvest-time-entry.h',
    'harvest-user.h',
    'harvest-user-assignment.h',
    'harvest-users-me-request.h',
]

install_headers(harvest_glib_public_headers, subdir: 'harvest-glib')

harvest_glib_c_args = [
    '-D__HARVEST_COMPILATION__',
    '-DG_LOG_DOMAIN="harvest-glib"',
]

if get_option('buildtype') == 'release'


@@ 111,23 70,48 @@ harvest_glib_dependencies = [
    libsoup_dep,
]

subdir('client')
subdir('common')
subdir('company')
subdir('estimate')
subdir('http')
subdir('invoice')
subdir('project')
subdir('task')
subdir('time-entry')
subdir('user')

harvest_glib = library(
    'harvest-glib',
    harvest_glib_sources,
    enums,
    company_enums,
    estimate_enums,
    http_enums,
    invoice_enums,
    version: harvest_glib_version,
    c_args: harvest_glib_c_args,
    dependencies: harvest_glib_dependencies,
    # Dealing with gnome.mkenums_simple()...
    include_directories: include_directories(
        '..',
        'company',
        'estimate',
        'http',
        'invoice',
    ),
    install: true,
)

harvest_glib_dep = declare_dependency(
    include_directories: include_directories('..'),
    compile_args: [
        '-Iharvest-glib',
    ],
    link_with: harvest_glib,
    version: harvest_glib_version,
    include_directories: include_directories('..'),
)

if get_option('tests')
if get_option('with-tests')
    subdir('tests')
endif



@@ 137,9 121,8 @@ pkg.generate(
	filebase: 'harvest-glib-1.0',
	name: 'harvest-glib',
	version: harvest_glib_version,
    requires_private: [
        libgio_dep,
        json_glib_dep,
    requires: [
        libsoup_dep,
    ],
	url: 'https://git.sr.ht/~tristan957/harvest-almanac',
)

R harvest-glib/harvest-project.c => harvest-glib/project/harvest-project.c +5 -7
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestProject"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,9 7,9 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-client.h"
#include "harvest-common.h"
#include "harvest-project.h"
#include "harvest-glib/client/harvest-client.h"
#include "harvest-glib/common/harvest-common.h"
#include "harvest-glib/project/harvest-project.h"

struct _HarvestProject
{


@@ 348,7 346,7 @@ harvest_project_class_init(HarvestProjectClass *klass)
	obj_properties[PROP_IS_BILLABLE]	   = g_param_spec_boolean("is_billable", _("Is Billable"),
		  _("Whether the project is billable or not."), FALSE,
		  G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_FIXED_FEE]	  = g_param_spec_boolean("is_fixed_fee", _("Is Fixed Fee"),
	obj_properties[PROP_IS_FIXED_FEE]	   = g_param_spec_boolean("is_fixed_fee", _("Is Fixed Fee"),
		 _("Whether the project is a fixed-fee project or not."), FALSE,
		 G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_BILL_BY]		   = g_param_spec_string("bill_by", _("Bill By"),

R harvest-glib/harvest-project.h => harvest-glib/project/harvest-project.h +0 -0
R harvest-glib/harvest-user-assignment.c => harvest-glib/project/harvest-user-assignment.c +5 -7
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestUserAssignment"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,9 7,9 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-project.h"
#include "harvest-user-assignment.h"
#include "harvest-user.h"
#include "harvest-glib/project/harvest-project.h"
#include "harvest-glib/project/harvest-user-assignment.h"
#include "harvest-glib/user/harvest-user.h"

struct _HarvestUserAssignment
{


@@ 206,7 204,7 @@ harvest_user_assignment_class_init(HarvestUserAssignmentClass *klass)
	obj_properties[PROP_PROJECT]   = g_param_spec_object("project", _("Project"),
		  _("An object containing the id, name, and code of the associated project."),
		  HARVEST_TYPE_PROJECT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_USER]	  = g_param_spec_object("user", _("User"),
	obj_properties[PROP_USER]	   = g_param_spec_object("user", _("User"),
		 _("An object containing the id and name of the associated user."), HARVEST_TYPE_USER,
		 G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_ACTIVE] = g_param_spec_boolean("is_active", _("Is Active"),

R harvest-glib/harvest-user-assignment.h => harvest-glib/project/harvest-user-assignment.h +0 -0
A harvest-glib/project/meson.build => harvest-glib/project/meson.build +8 -0
@@ 0,0 1,8 @@
component_public_headers = [
	'harvest-project.h',
	'harvest-user-assignment.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'project')

install_headers(component_public_headers, subdir: component_header_subdir)

R harvest-glib/harvest-task-assignment.c => harvest-glib/task/harvest-task-assignment.c +8 -10
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestTaskAssignment"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,9 7,9 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-project.h"
#include "harvest-task-assignment.h"
#include "harvest-task.h"
#include "harvest-glib/project/harvest-project.h"
#include "harvest-glib/task/harvest-task-assignment.h"
#include "harvest-glib/task/harvest-task.h"

struct _HarvestTaskAssignment
{


@@ 201,10 199,10 @@ harvest_task_assignment_class_init(HarvestTaskAssignmentClass *klass)
	obj_properties[PROP_TASK]		 = g_param_spec_object("task", _("Task"),
		   _("An object containing the id and name of the associated task."), HARVEST_TYPE_TASK,
		   G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_ACTIVE]   = g_param_spec_boolean("is_active", _("Is Active"),
	obj_properties[PROP_IS_ACTIVE]	 = g_param_spec_boolean("is_active", _("Is Active"),
		  _("Whether the task assignment is active or archived."), FALSE,
		  G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_BILLABLE]	= g_param_spec_boolean("billable", _("Billable"),
	obj_properties[PROP_BILLABLE]	 = g_param_spec_boolean("billable", _("Billable"),
		   _("Whether the task assignment is billable or not. For example: if set to true, all time "
			 "tracked on this project for the associated task will be marked as billable."),
		   FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);


@@ 214,10 212,10 @@ harvest_task_assignment_class_init(HarvestTaskAssignmentClass *klass)
	obj_properties[PROP_BUDGET]		 = g_param_spec_double("budget", _("Budget"),
		 _("Budget used when the project’s budget_by is task or task_fees."), 0, DBL_MAX, 0,
		 G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_CREATED_AT]  = g_param_spec_boxed("created_at", _("Created At"),
	obj_properties[PROP_CREATED_AT]	 = g_param_spec_boxed("created_at", _("Created At"),
		 _("Date and time the task assignment was created."), G_TYPE_DATE_TIME,
		 G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_UPDATED_AT]  = g_param_spec_boxed("updated_at", _("Updated At"),
	obj_properties[PROP_UPDATED_AT]	 = g_param_spec_boxed("updated_at", _("Updated At"),
		 _("Date and time the task assignment was last updated."), G_TYPE_DATE_TIME,
		 G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);


R harvest-glib/harvest-task-assignment.h => harvest-glib/task/harvest-task-assignment.h +0 -0
R harvest-glib/harvest-task.c => harvest-glib/task/harvest-task.c +4 -6
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestTask"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,7 7,7 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-task.h"
#include "harvest-glib/task/harvest-task.h"

struct _HarvestTask
{


@@ 165,7 163,7 @@ harvest_task_class_init(HarvestTaskClass *klass)
	obj_class->get_property = harvest_task_get_property;
	obj_class->set_property = harvest_task_set_property;

	obj_properties[PROP_ID]   = g_param_spec_int("id", _("ID"), _("Unique ID for the task."), 0,
	obj_properties[PROP_ID]	  = g_param_spec_int("id", _("ID"), _("Unique ID for the task."), 0,
		  INT_MAX, 0, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_NAME] = g_param_spec_string("name", _("Name"), _("The name of the task."),
		NULL, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);


@@ 181,7 179,7 @@ harvest_task_class_init(HarvestTaskClass *klass)
	obj_properties[PROP_IS_DEFAULT] = g_param_spec_boolean("is_default", _("Is Default"),
		_("Whether this task should be automatically added to future projects."), FALSE,
		G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_ACTIVE]  = g_param_spec_boolean("is_active", _("Is Active"),
	obj_properties[PROP_IS_ACTIVE]	= g_param_spec_boolean("is_active", _("Is Active"),
		 _("Whether this task is active or archived."), FALSE,
		 G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_CREATED_AT] = g_param_spec_boxed("created_at", _("Created At"),

R harvest-glib/harvest-task.h => harvest-glib/task/harvest-task.h +0 -0
A harvest-glib/task/meson.build => harvest-glib/task/meson.build +8 -0
@@ 0,0 1,8 @@
component_public_headers = [
	'harvest-task-assignment.h',
	'harvest-task.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'task')

install_headers(component_public_headers, subdir: component_header_subdir)

M harvest-glib/tests/init.h => harvest-glib/tests/init.h +1 -1
@@ 5,7 5,7 @@
#include <json-glib/json-glib.h>
#include <libsoup/soup.h>

#include "harvest.h"
#include "harvest-glib/harvest.h"

HarvestApiClient *
initialize_environment(void)

M harvest-glib/tests/meson.build => harvest-glib/tests/meson.build +2 -2
@@ 14,14 14,14 @@ test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())

c_args = [
	'-D__HARVEST_COMPILATION__'
	'-D__HARVEST_COMPILATION__',
	'-DG_LOG_DOMAIN="harvest-glib-testing"',
]

foreach test_name, value : harvest_tests
	exe = executable(
		test_name,
		test_name + '.c',
		enums,
		dependencies: dependencies,
		include_directories: include_directories('..'),
		c_args: c_args,

M harvest-glib/tests/user.c => harvest-glib/tests/user.c +1 -1
@@ 1,7 1,7 @@
#include <glib.h>
#include <libsoup/soup.h>

#include "harvest.h"
#include "harvest-glib/harvest.h"
#include "init.h"

static HarvestApiClient *CLIENT;

R harvest-glib/harvest-time-entry.c => harvest-glib/time-entry/harvest-time-entry.c +20 -22
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestTimeEntry"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,15 7,15 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-client.h"
#include "harvest-common.h"
#include "harvest-invoice.h"
#include "harvest-project.h"
#include "harvest-task-assignment.h"
#include "harvest-task.h"
#include "harvest-time-entry.h"
#include "harvest-user-assignment.h"
#include "harvest-user.h"
#include "harvest-glib/client/harvest-client.h"
#include "harvest-glib/common/harvest-common.h"
#include "harvest-glib/invoice/harvest-invoice.h"
#include "harvest-glib/project/harvest-project.h"
#include "harvest-glib/project/harvest-user-assignment.h"
#include "harvest-glib/task/harvest-task-assignment.h"
#include "harvest-glib/task/harvest-task.h"
#include "harvest-glib/time-entry/harvest-time-entry.h"
#include "harvest-glib/user/harvest-user.h"

struct _HarvestTimeEntry
{


@@ 412,13 410,13 @@ harvest_time_entry_class_init(HarvestTimeEntryClass *klass)
		= g_param_spec_object("user_assignment", _("User Assignment"),
			_("A user assignment object of the associated user."), HARVEST_TYPE_USER_ASSIGNMENT,
			G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_CLIENT]  = g_param_spec_object("client", _("Client"),
	obj_properties[PROP_CLIENT]	 = g_param_spec_object("client", _("Client"),
		 _("An object containing the id and name of the associated client."), HARVEST_TYPE_CLIENT,
		 G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_PROJECT] = g_param_spec_object("project", _("Project"),
		_("An object containing the id and name of the associated project."), HARVEST_TYPE_PROJECT,
		G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TASK]	= g_param_spec_object("task", _("Task"),
	obj_properties[PROP_TASK]	 = g_param_spec_object("task", _("Task"),
		   _("An object containing the id and name of the associated task."), HARVEST_TYPE_TASK,
		   G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TASK_ASSIGNMEMT]


@@ 429,22 427,22 @@ harvest_time_entry_class_init(HarvestTimeEntryClass *klass)
		_("Once the time entry has been invoiced, this field will include the associated invoice’s "
		  "id and number."),
		HARVEST_TYPE_INVOICE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_HOURS]   = g_param_spec_double("hours", _("Hours"),
	obj_properties[PROP_HOURS]	 = g_param_spec_double("hours", _("Hours"),
		  _("Number of (decimal time) hours tracked in this time entry."), 0, DBL_MAX, 0,
		  G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_NOTES]
		= g_param_spec_string("notes", _("Notes"), _("Notes attached to the time entry."), NULL,
			G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_LOCKED]	 = g_param_spec_boolean("is_locked", _("Is Locked"),
	obj_properties[PROP_IS_LOCKED]	   = g_param_spec_boolean("is_locked", _("Is Locked"),
		_("Whether or not the time entry has been locked."), FALSE,
		G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_LOCKED_REASON] = g_param_spec_string("locked_reason", _("Locked Reason"),
		_("Why the time entry has been locked."), NULL,
		G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_CLOSED]	 = g_param_spec_boolean("is_closed", _("Is Closed"),
	obj_properties[PROP_IS_CLOSED]	   = g_param_spec_boolean("is_closed", _("Is Closed"),
		_("Whether or not the time entry has been approved via Timesheet Approval."), FALSE,
		G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_BILLED]	 = g_param_spec_boolean("is_billed", _("Is Billed"),
	obj_properties[PROP_IS_BILLED]	   = g_param_spec_boolean("is_billed", _("Is Billed"),
		_("Whether or not the time entry has been marked as invoiced."), FALSE,
		G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_TIMER_STARTED_AT]


@@ 455,16 453,16 @@ harvest_time_entry_class_init(HarvestTimeEntryClass *klass)
	obj_properties[PROP_STARTED_TIME]  = g_param_spec_boxed("started_time", _("Started Time"),
		 _("Time the time entry was started (if tracking by start/end times)."), G_TYPE_DATE_TIME,
		 G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_ENDED_TIME]	= g_param_spec_boxed("ended_time", _("Ended Time"),
	obj_properties[PROP_ENDED_TIME]	   = g_param_spec_boxed("ended_time", _("Ended Time"),
		   _("Time the time entry was ended (if tracking by start/end times)."), G_TYPE_DATE_TIME,
		   G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_IS_RUNNING]	= g_param_spec_boolean("is_running", _("Is Running"),
	obj_properties[PROP_IS_RUNNING]	   = g_param_spec_boolean("is_running", _("Is Running"),
		   _("Whether or not the time entry is currently running."), FALSE,
		   G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_BILLABLE]	  = g_param_spec_boolean("billable", _("Billable"),
	obj_properties[PROP_BILLABLE]	   = g_param_spec_boolean("billable", _("Billable"),
		 _("Whether or not the time entry is billable."), FALSE,
		 G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_BUDGETED]	  = g_param_spec_boolean("budgeted", _("Budgeted"),
	obj_properties[PROP_BUDGETED]	   = g_param_spec_boolean("budgeted", _("Budgeted"),
		 _("Whether or not the time entry counts towards the project budget."), FALSE,
		 G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	obj_properties[PROP_BILLABLE_RATE] = g_param_spec_double("billable_rate", _("Billable Rate"),

R harvest-glib/harvest-time-entry.h => harvest-glib/time-entry/harvest-time-entry.h +0 -0
A harvest-glib/time-entry/meson.build => harvest-glib/time-entry/meson.build +13 -0
@@ 0,0 1,13 @@
component_public_headers = [
	'harvest-time-entry.h',
]

request_public_headers = [
	'requests/harvest-late-request.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'time-entry')
requests_header_subdir = join_paths(component_header_subdir, 'requests')

install_headers(component_public_headers, subdir: component_header_subdir)
install_headers(request_public_headers, subdir: requests_header_subdir)

R harvest-glib/harvest-late-request.c => harvest-glib/time-entry/requests/harvest-late-request.c +4 -6
@@ 1,15 1,13 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestLATERequest"
#include "harvest-glib/config.h"

#include <limits.h>

#include <glib-object.h>
#include <glib/gi18n-lib.h>

#include "harvest-http.h"
#include "harvest-late-request.h"
#include "harvest-response-metadata.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"
#include "harvest-glib/time-entry/requests/harvest-late-request.h"

struct _HarvestLATERequest
{

R harvest-glib/harvest-late-request.h => harvest-glib/time-entry/requests/harvest-late-request.h +1 -1
@@ 6,7 6,7 @@

#include <glib-object.h>

#include "harvest-request.h"
#include "harvest-glib/http/request/harvest-request.h"

G_BEGIN_DECLS


R harvest-glib/harvest-user.c => harvest-glib/user/harvest-user.c +5 -7
@@ 1,6 1,4 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestUser"
#include "harvest-glib/config.h"

#include <float.h>
#include <limits.h>


@@ 9,10 7,10 @@
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#include "harvest-api-client.h"
#include "harvest-response.h"
#include "harvest-user.h"
#include "harvest-users-me-request.h"
#include "harvest-glib/http/api/harvest-api-client.h"
#include "harvest-glib/http/response/harvest-response.h"
#include "harvest-glib/user/harvest-user.h"
#include "harvest-glib/user/requests/harvest-users-me-request.h"

struct _HarvestUser
{

R harvest-glib/harvest-user.h => harvest-glib/user/harvest-user.h +3 -3
@@ 6,9 6,9 @@

#include <glib-object.h>

#include "harvest-api-client.h"
#include "harvest-request.h"
#include "harvest-response.h"
#include "harvest-glib/http/api/harvest-api-client.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-response.h"

G_BEGIN_DECLS


A harvest-glib/user/meson.build => harvest-glib/user/meson.build +13 -0
@@ 0,0 1,13 @@
component_public_headers = [
	'harvest-user.h',
]

request_public_headers = [
	'requests/harvest-users-me-request.h',
]

component_header_subdir = join_paths(harvest_glib_header_subdir, 'user')
requests_header_subdir = join_paths(component_header_subdir, 'requests')

install_headers(component_public_headers, subdir: component_header_subdir)
install_headers(request_public_headers, subdir: requests_header_subdir)

R harvest-glib/harvest-users-me-request.c => harvest-glib/user/requests/harvest-users-me-request.c +6 -8
@@ 1,14 1,12 @@
#include "config.h"

#define G_LOG_DOMAIN "HarvestUsersMeRequest"
#include "harvest-glib/config.h"

#include <glib-object.h>

#include "harvest-http.h"
#include "harvest-request.h"
#include "harvest-response-metadata.h"
#include "harvest-user.h"
#include "harvest-users-me-request.h"
#include "harvest-glib/http/harvest-http.h"
#include "harvest-glib/http/request/harvest-request.h"
#include "harvest-glib/http/response/harvest-response-metadata.h"
#include "harvest-glib/user/harvest-user.h"
#include "harvest-glib/user/requests/harvest-users-me-request.h"

struct _HarvestUsersMeRequest
{

R harvest-glib/harvest-users-me-request.h => harvest-glib/user/requests/harvest-users-me-request.h +0 -0
M meson.build => meson.build +1 -10
@@ 11,17 11,8 @@ project(
    ],
)

c_args = [
    # Required to pick up hal-resources.h, config.h in some IDEs
    '-I' + join_paths(meson.build_root(), 'data'),
    '-I' + join_paths(meson.build_root(), 'harvest-almanac'),
    '-I' + join_paths(meson.build_root(), 'harvest-glib'),
]

cc = meson.get_compiler('c')

add_project_arguments(c_args, language: 'c')

gnome = import('gnome')
i18n = import('i18n')
pkg = import('pkgconfig')


@@ 34,7 25,7 @@ libsoup_dep = dependency('libsoup-2.4', version: '>= 2.68.1', required: true, fa
libsecret_dep = dependency('libsecret-1', version: '>= 0.19.1', required: true, fallback: ['libsecret', 'libsecret_dep'])

if get_option('use-system-harvest-glib')
    harvest_glib_dep = dependency('harvest-glib-1.0', version: '>= 1.0.0', required: false)
    harvest_glib_dep = dependency('harvest-glib-1.0', version: '>= 1.0.0', required: true)
else
    subdir('harvest-glib')
endif

M meson_options.txt => meson_options.txt +1 -1
@@ 2,5 2,5 @@ option('lib-only', type: 'boolean', value: false,
	description: 'Only build harvest-glib, omitting the frontend')
option('use-system-harvest-glib', type: 'boolean', value: false,
	description: 'Use the system provided harvest-glib instead of the local copy')
option('tests', type: 'boolean', value: true,
option('with-tests', type: 'boolean', value: true,
	description: 'Build the test suite.')