Library and pointers, am I using them correctly?

I made a simple library to send pushmessages to my phone using the app from www.pushover.net.

Here is my code:

.ino:

#include "PushOver.h"

#include <Ethernet.h>
#include <SPI.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; 

// **** Pushover configuration ****
char PushURL[] = "api.pushover.net";
char PushToken[] = "My API token goes here";
char PushUser[] = "My user token goes here";

PushOver PushMe(PushURL, PushToken, PushUser);



void setup(){
	Serial.begin(115200);
	Ethernet.begin(mac);
	delay(1000);
}

void loop(){
	char Pushover[] = "Push mressage from arduino to phone"; 
    
	Serial.println(Pushover);
	
	PushMe.SendMessage(Pushover);

	while(1);
}

.h:

#ifndef PushOver_H
#define PushOver_H

#include "Arduino.h"

class PushOver{
	public:
		PushOver(char *PushURL, char *PushToken, char *PushUser);
		void SendMessage(char *PushMessage);
		
	private:
		char *_PushURL;
		char *_PushToken;
		char *_PushUser;
};

#endif

.cpp:

#define DEBUG

#include "PushOver.h"

#include <Ethernet.h>
#include <SPI.h>

EthernetClient PushClient;


PushOver::PushOver(char *PushURL, char *PushToken, char *PushUser){
	_PushURL = PushURL;
	_PushToken = PushToken;
	_PushUser = PushUser;
}

void PushOver::SendMessage(char *PushMessage){
	int Length = strlen(PushMessage) + 81;
	
#ifdef DEBUG
	Serial.println("Sending pushover message");
	Serial.println(_PushURL);
	Serial.println(_PushToken);
	Serial.println(_PushUser);
	Serial.println(PushMessage);
	Serial.println(Length);
#endif	

	if(PushClient.connect(_PushURL,80)){
		PushClient.println("POST /1/messages.json HTTP/1.1");
		PushClient.print("Host: ");
		PushClient.println(_PushURL);
		PushClient.println("Connection: close\r\nContent-Type: application/x-www-form-urlencoded");
		PushClient.print("Content-Length: ");
		PushClient.print(Length);
		PushClient.println("\r\n");;
		PushClient.print("token=");
		PushClient.print(_PushToken);
		PushClient.print("&user=");
		PushClient.print(_PushUser);
		PushClient.print("&message=");
		PushClient.print(PushMessage);

		while(PushClient.connected()){
			while(PushClient.available()){
			char InChar = PushClient.read();
#ifdef DEBUG			
			Serial.write(InChar);
#endif
			}
		}
	}
	PushClient.stop();
}

It does work, i'm not sure if i pass the information from the .ino to the .cpp in the correct way.

I can't figure out how to add data to the Pushover variable in the .ino.

I have a value stored in a long varaible and want to send the following message:

"Last update: "" minutes ago."

I can't figure out how to add data to the Pushover variable in the .ino.

Take a look at the sprintf() function

Thanks!

Does exactly what i want.

in main loop:

	long LastUpdate = 754;
	char Pushover[300] = ""; 

	sprintf(Pushover, "Last update: %ld minutes ago.", LastUpdate);
	
	Serial.println(Pushover);

	PushMe.SendMessage(Pushover);