Adapt migration for files
[pidgin-git.git] / libpurple / plugins / caesarcipher.h
blob475c6218a176da500dd06a7a7e65f58fc5834477
1 /*
2 * An example plugin that demonstrates exporting of a cipher object
3 * type to be used in another plugin.
5 * Copyright (C) 2013, Ankit Vani <a@nevitus.org>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02111-1301, USA.
23 #ifndef _CAESAR_CIPHER_H_
24 #define _CAESAR_CIPHER_H_
26 #include "cipher.h"
28 #define CAESAR_TYPE_CIPHER (caesar_cipher_get_type())
29 #define CAESAR_CIPHER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAESAR_TYPE_CIPHER, CaesarCipher))
30 #define CAESAR_CIPHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CAESAR_TYPE_CIPHER, CaesarCipherClass))
31 #define CAESAR_IS_CIPHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CAESAR_TYPE_CIPHER))
32 #define CAESAR_IS_CIPHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CAESAR_TYPE_CIPHER))
33 #define CAESAR_CIPHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), CAESAR_TYPE_CIPHER, CaesarCipherClass))
35 typedef struct _CaesarCipher CaesarCipher;
36 typedef struct _CaesarCipherClass CaesarCipherClass;
39 * A caesar cipher object.
41 * The Caesar cipher is one of the simplest and most widely known encryption
42 * techniques. It is a type of substitution cipher in which each letter in the
43 * plaintext is replaced by a letter some fixed number of positions down the
44 * alphabet.
46 struct _CaesarCipher
48 PurpleCipher gparent;
51 /* The base class for all CaesarCipher's. */
52 struct _CaesarCipherClass
54 PurpleCipherClass gparent;
58 * Returns the GType for the CaesarCipher object.
60 G_MODULE_EXPORT GType caesar_cipher_get_type(void);
63 * Creates a new CaesarCipher instance and returns it.
65 G_MODULE_EXPORT PurpleCipher *caesar_cipher_new(void);
67 #endif /* _CAESAR_CIPHER_H_ */