diff --git a/data.h b/data.h new file mode 100644 index 0000000..6c68863 --- /dev/null +++ b/data.h @@ -0,0 +1,47 @@ + +/* + * PROGRAM: + * Command-line pastebin + * + * AUTHOR: + * Théophile BASTIAN (a.k.a. Tobast) + * + * CONTACT & WEBSITE: + * http://tobast.fr/ (contact feature included) + * error-report@tobast.fr (error reporting only) + * + * SHORT DESCRIPTION: + * See first license line. + * + * LICENSE: + * "Command-line pastebin" is a software designed to submit a "paste" on http://pastebin.com/ using a command-line tool + * Copyright (C) 2011 Théophile BASTIAN + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/gpl.txt. +*/ + +#ifndef DEF_DATA +#define DEF_DATA + +#include "data_devcode.h" // TODO before compile, check this file + +#define DEFAULT_PRIVATE "0" +#define DEFAULT_NAME "" +#define DEFAULT_EXPIRE "N" +#define DEFAULT_FORMAT "" +#define DEFAULT_USERKEY "" +#define DEFAULT_OPTION "paste" + +#endif//DEF_DATA + diff --git a/data_default.h b/data_devcode_default.h similarity index 83% rename from data_default.h rename to data_devcode_default.h index 9830049..fc0500a 100644 --- a/data_default.h +++ b/data_devcode_default.h @@ -37,24 +37,16 @@ ======== To keep my Pastebin Developper Key for my own, I removed it from the shared source code. - To compile the project, RENAME THIS FILE TO "data.h" : - $ mv data_default.h data.h + To compile the project, RENAME THIS FILE TO "data_devcode.h" : + $ mv data_devcode_default.h data_devcode.h Then enter your Developper key on the #define DEVELOPPER_CODE line. To obtain one, just create an account on http://pastebin.com/ and then go to http://pastebin.com/api. */ -#ifndef DEF_DATA -#define DEF_DATA - +#ifndef DEF_DATADEVCODE +#define DEF_DATADEVCODE #define DEVELOPPER_CODE "" // TODO: Enter your Pastebin Developper Key here -#define DEFAULT_PRIVATE "0" -#define DEFAULT_NAME "" -#define DEFAULT_EXPIRE "N" -#define DEFAULT_FORMAT "" -#define DEFAULT_USERKEY "" -#define DEFAULT_OPTION "paste" - -#endif//DEF_DATA +#endif//DEF_DATADEVCODE diff --git a/func.cpp b/func.cpp new file mode 100644 index 0000000..c1e7563 --- /dev/null +++ b/func.cpp @@ -0,0 +1,56 @@ + +/* + * PROGRAM: + * Command-line pastebin + * + * AUTHOR: + * Théophile BASTIAN (a.k.a. Tobast) + * + * CONTACT & WEBSITE: + * http://tobast.fr/ (contact feature included) + * error-report@tobast.fr (error reporting only) + * + * SHORT DESCRIPTION: + * See first license line. + * + * LICENSE: + * "Command-line pastebin" is a software designed to submit a "paste" on http://pastebin.com/ using a command-line tool + * Copyright (C) 2011 Théophile BASTIAN + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/gpl.txt. +*/ + +#include "func.h" + +void initParameterRead(ParameterRead& pr) +{ + pr.addValueParam("n"); + pr.addValueParam("name"); + pr.addValueParam("s"); + pr.addValueParam("syntax"); + pr.addValueParam("e"); + pr.addValueParam("expire"); + + pr.execute(); + + if(!checkParameterRead(pr)) + return false; + return true; +} + +bool checkParameterRead(ParameterRead& pr) +{ + if( +} + diff --git a/func.h b/func.h new file mode 100644 index 0000000..2294e35 --- /dev/null +++ b/func.h @@ -0,0 +1,42 @@ + +/* + * PROGRAM: + * Command-line pastebin + * + * AUTHOR: + * Théophile BASTIAN (a.k.a. Tobast) + * + * CONTACT & WEBSITE: + * http://tobast.fr/ (contact feature included) + * error-report@tobast.fr (error reporting only) + * + * SHORT DESCRIPTION: + * See first license line. + * + * LICENSE: + * "Command-line pastebin" is a software designed to submit a "paste" on http://pastebin.com/ using a command-line tool + * Copyright (C) 2011 Théophile BASTIAN + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/gpl.txt. +*/ + +#ifndef DEF_FUNCTION +#define DEF_FUNCTION + +#include + +bool initParameterRead(ParameterRead& pr); + +#endif//DEF_FUNCTION + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..14e80f6 --- /dev/null +++ b/main.cpp @@ -0,0 +1,41 @@ + +/* + * PROGRAM: + * Command-line pastebin + * + * AUTHOR: + * Théophile BASTIAN (a.k.a. Tobast) + * + * CONTACT & WEBSITE: + * http://tobast.fr/ (contact feature included) + * error-report@tobast.fr (error reporting only) + * + * SHORT DESCRIPTION: + * See first license line. + * + * LICENSE: + * "Command-line pastebin" is a software designed to submit a "paste" on http://pastebin.com/ using a command-line tool + * Copyright (C) 2011 Théophile BASTIAN + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/gpl.txt. +*/ + +#include "CurlPost.h" + +int main(int argc, char** argv) +{ + CurlPost::init(); + +} +