Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

Armin Morattab

@Armin Morattab
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How can fix linking errors?
    A Armin Morattab

    Hi guys I’ve written a program to detect SPAM in VoIP calls. There are two state machines which control the state of the operation. One for clients and one for server. Anyway, the class for the client is ClientStateMachine which is declared below: (The program have been written in Microsoft Visual Studio 2005 C++) #ifndef CLIENTSTATEMACHINE_H #define CLIENTSTATEMACHINE_H #include "clientmsg.h" #include "sndrcvsockc.h" #include "blacklist.h" #include "whitelist.h" using namespace SPIT; namespace SPIT { class ClientMsg; class ClientStateMachine { public: ClientStateMachine(char = 'S'); class AllState{ public: virtual void onAbsZero(ClientStateMachine &u); virtual void onInvite(ClientStateMachine &u); virtual void onInviteRcv(ClientStateMachine &u); virtual void onInviteWl(ClientStateMachine &u); virtual void onInviteBl(ClientStateMachine &u); virtual void onInviteWait(ClientStateMachine &u); virtual void onInviteCh(ClientStateMachine &u); virtual void onCh(ClientStateMachine &u); virtual void onOk(ClientStateMachine &u); virtual void onEnd(ClientStateMachine &u); virtual void onBye(ClientStateMachine &u); }; friend AllState; class AbsoluteZero : public AllState{ public: void onAbsZero(ClientStateMachine &u); }; friend AbsoluteZero; class Idle : public AllState{ public: void onInvite(ClientStateMachine &u); void onInviteRcv(ClientStateMachine &u); void onInviteWl(ClientStateMachine &u); void onInviteBl(ClientStateMachine &u); void onInviteCh(ClientStateMachine &u); }; friend Idle; class Waiting : public AllState{ public: void onInviteWait(ClientStateMachine &u); void onCh(ClientStateMachine &u); void onOk(ClientStateMachine &u); void onEnd(ClientStateMachine &u); }; friend Waiting; class Established : public AllState{ public: void onBye(ClientStateMachine &u); }; friend Established; private: static AbsoluteZero ABSOLUTE_ZERO_STATE; static Idle IDLE_STATE; static Waiting WAITING_STATE; static Established ESTABLISHED_STATE; void nextState( AllState &mState); AllState *mCurrentState; // common methods void getUserInformationAndSetBuffer(ClientStateMachine &u); void setNextStateAndMsg(ClientStateMachine &u); void setMsgHeaderAndBudy(ClientStateMachine &u); void socketInitialize(ClientStateMachine &u); void socketFinalize(ClientStateMachine &u); SndRcvC mCli

    C / C++ / MFC csharp c++ visual-studio sysadmin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups