Assistance in creating a Library

exactly... i want to be able to do the equivalent of this (maybe named differently, and this is just pseudocode) to turn the power on and go to channel 137. This would be used for all of my applications that need to control a Scientific Atlanta or Cisco set top box

#include IRControl.h

void loop()
{
RemotePress("Power");
RemotePress(1);
RemotePress(3);
RemotePress(7);
}

Right now if i put those commands in the void loop() of the code eample above it works perfectly.