m_sqlutils.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef INSPIRCD_SQLUTILS
00015 #define INSPIRCD_SQLUTILS
00016
00017 #include "modules.h"
00018
00019 #define SQLUTILAU "SQLutil AssociateUser"
00020 #define SQLUTILAC "SQLutil AssociateChan"
00021 #define SQLUTILUA "SQLutil UnAssociate"
00022 #define SQLUTILGU "SQLutil GetAssocUser"
00023 #define SQLUTILGC "SQLutil GetAssocChan"
00024 #define SQLUTILSUCCESS "You shouldn't be reading this (success)"
00025
00028 class AssociateUser : public Request
00029 {
00030 public:
00033 unsigned long id;
00036 User* user;
00037
00038 AssociateUser(Module* s, Module* d, unsigned long i, User* u)
00039 : Request(s, d, SQLUTILAU), id(i), user(u)
00040 {
00041 }
00042
00043 AssociateUser& S()
00044 {
00045 Send();
00046 return *this;
00047 }
00048 };
00049
00052 class AssociateChan : public Request
00053 {
00054 public:
00057 unsigned long id;
00060 Channel* chan;
00061
00062 AssociateChan(Module* s, Module* d, unsigned long i, Channel* u)
00063 : Request(s, d, SQLUTILAC), id(i), chan(u)
00064 {
00065 }
00066
00067 AssociateChan& S()
00068 {
00069 Send();
00070 return *this;
00071 }
00072 };
00073
00076 class UnAssociate : public Request
00077 {
00078 public:
00081 unsigned long id;
00082
00083 UnAssociate(Module* s, Module* d, unsigned long i)
00084 : Request(s, d, SQLUTILUA), id(i)
00085 {
00086 }
00087
00088 UnAssociate& S()
00089 {
00090 Send();
00091 return *this;
00092 }
00093 };
00094
00097 class GetAssocUser : public Request
00098 {
00099 public:
00102 unsigned long id;
00105 User* user;
00106
00107 GetAssocUser(Module* s, Module* d, unsigned long i)
00108 : Request(s, d, SQLUTILGU), id(i), user(NULL)
00109 {
00110 }
00111
00112 GetAssocUser& S()
00113 {
00114 Send();
00115 return *this;
00116 }
00117 };
00118
00121 class GetAssocChan : public Request
00122 {
00123 public:
00126 unsigned long id;
00129 Channel* chan;
00130
00131 GetAssocChan(Module* s, Module* d, unsigned long i)
00132 : Request(s, d, SQLUTILGC), id(i), chan(NULL)
00133 {
00134 }
00135
00136 GetAssocChan& S()
00137 {
00138 Send();
00139 return *this;
00140 }
00141 };
00142
00143 #endif