blob: 8dc63f2cce48ce40730a14de8e72773bd57b1b68 (
plain)
1 /**
2 * Copyright (C) 2014 Aaron Ball <nullspoon@iohq.net>
3 *
4 * Noteless is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Noteless is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with noteless. If not, see <http://www.gnu.org/licenses/>.
16 */
17 using namespace std;
18 #include <stdlib.h>
19 #include <iostream>
20 #include <fstream>
21 #include <time.h>
22 #include <string>
23 #include <vector>
24 #include "path.h"
25 #ifndef LIB_NOTE_H
26 #define LIB_NOTE_H
27 class note {
28 private:
29 // Methods
30 const char itoc( int );
31 string get_extension();
32 bool line_matches( string, string );
33 path _path;
34
35 public:
36 // Variables
37 string extension;
38 string name;
39 vector<string> body;
40
41 // Methods
42 note( path );
43 note( string );
44 note( string, string );
45 int create( string );
46 int edit( string );
47 int rm();
48 void read();
49 string itos( int );
50 string get_current_date_time();
51 string friendly_name();
52 string get_fqp();
53 vector<string> find( bool, string );
54 };
55 #endif
|