1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) Sébastien Granjoux 2009 <seb.sfo@free.fr>
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _ANJUTA_TOKEN_FILE_H_
21 #define _ANJUTA_TOKEN_FILE_H_
26 #include <libanjuta/anjuta-token.h>
30 #define ANJUTA_TOKEN_FILE_TYPE (anjuta_token_file_get_type ())
31 #define ANJUTA_TOKEN_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TOKEN_FILE_TYPE, AnjutaTokenFile))
32 #define ANJUTA_TOKEN_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TOKEN_FILE_TYPE, AnjutaTokenFileClass))
33 #define IS_ANJUTA_TOKEN_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TOKEN_FILE_TYPE))
34 #define IS_ANJUTA_TOKEN_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TOKEN_FILE_TYPE))
35 #define GET_ANJUTA_TOKEN_FILE_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TOKEN_FILE_TYPE, AnjutaTokenFileClass))
37 typedef struct _AnjutaTokenFile AnjutaTokenFile
;
38 typedef struct _AnjutaTokenFileClass AnjutaTokenFileClass
;
45 } AnjutaTokenFileLocation
;
47 GType
anjuta_token_file_get_type (void);
49 AnjutaTokenFile
*anjuta_token_file_new (GFile
*file
);
50 void anjuta_token_file_free (AnjutaTokenFile
*file
);
52 AnjutaToken
* anjuta_token_file_load (AnjutaTokenFile
*file
, GError
**error
);
53 gboolean
anjuta_token_file_unload (AnjutaTokenFile
*file
);
54 gboolean
anjuta_token_file_save (AnjutaTokenFile
*file
, GError
**error
);
55 void anjuta_token_file_move (AnjutaTokenFile
*file
, GFile
*new_file
);
57 gboolean
anjuta_token_file_update (AnjutaTokenFile
*file
, AnjutaToken
*token
);
59 gboolean
anjuta_token_file_get_token_location (AnjutaTokenFile
*file
, AnjutaTokenFileLocation
*location
, AnjutaToken
*token
);
60 GFile
*anjuta_token_file_get_file (AnjutaTokenFile
*file
);
61 AnjutaToken
*anjuta_token_file_get_content (AnjutaTokenFile
*file
);