Tangler Discussion Forums

stratosphere1698Phillip John

Male

All Forums

Recent Activity

  • API Help

    Hi API guys,  there doesn’t appear to be any doco on transferring files with the cpp API.
    Your API documentation on your website goes around and around pointing back to itself.

    I tried waiting for the oResponse object to complete but, this does not work or I am approaching it wrong… seems to get a 200 ok for every packet sent.

     

         long l;

         l = FileLen(argv[1]);

         cout << "Transfering " << l << " bytes...\r\n";

         pServer->PutFile(argv[1],argv[2], l ,oResponse2);

     
         // wait for operation to complete.

         do {

               Sleep(100);

               rc = oResponse.GetResultCode();

         } while(!((int)rc));

     

     

    I suspect the correct thing to do would be to implement this class, but I have no idea how to begin.

     

    class IProgressCallback

    {

    public:

         virtual ~IProgressCallback() { };

         virtual int UpdateProgress(long bytes) = 0;

    };

     

    Can you give me an example of the correct way to wait for a transfer event to complete?

     I also tried this:

     

    class CCallBack:public IProgressCallback {

    public:

         CCallBack() { BytesSending=0; Completed=0; }

     

         long BytesSending;

         int Completed;

     

         int UpdateProgress(long bytes) {

               cout << bytes << " ";

               if (BytesSending == bytes) {

                    Completed = 1;

               }

               return bytes;

         }

    };

     

                    And this to wait for completion

     

         long l;

         l = FileLen(argv[1]);

         oCallback.BytesSending = l;

     

         pServer->PutFile(argv[1],argv[2], l ,oResponse2, (IProgressCallback*)&oCallback);

         // wait for operation to complete.

         do {

               Sleep(100);

               cout << " Bytes :" << oCallback.BytesSending << " Completed: " << oCallback.Completed;

         } while(!oCallback.Completed);

     
     

                    But this doesn’t work, the UpdateProgress callback method is never called, any ideas?

    Posted 06 Sep 07 in Omnidrive Talk

  • Sample C++ API Code

    Would a command line Omnidrive shell be useful to anyone? Tongue out I made a very basic command line tool for uploading my backups, could easily be extended to be a full shell.

     

     

    Posted 05 Sep 07 in Omnidrive Talk

  • Assigning a Drive letter

    Is it possible to assign a drive letter to the omnidrive or access it from a DOS cmd prompt for batching backups etc?

    I know this was mentioned in the forum achives, has there been any release yet?

    Posted 03 Sep 07 in Omnidrive Talk

  • web.omnidrive.com doesn't answer?

    thought it was just me and my stupid technical questions! Surprised

    Posted 30 Aug 07 in Omnidrive Talk

  • Topics monitored?

    Does anyone monitor this forum?

    Posted 29 Aug 07 in Omnidrive Talk

  • REST Uploading a File 405 Error

    sorry about the bolding, no idea what happened there Embarassed

    Posted 29 Aug 07 in Omnidrive Talk

  • REST Authentication problems

    ohhh by the way, your c++ demo communicates with web.omnidrive.com and the wiki docs say to use api.omnidrive.com, will there be any future issue with this?

    Posted 28 Aug 07 in Omnidrive Talk

  • What's your M&M colour?

    Thanks for that info on the star bit, mate... Princess Di messages were driving me mad;)

    Posted 27 Aug 07 in General Conversation

  • Ten Year Anniversary OF Princess Diana's Death

    errrhmmm hey guys, just installed this Tangler thingy because I want tech info about some techo REST thing

    Quick question, How I do I turn off this general conversation thingy?  seems i have invoked the strange looks from the boss button.Surprised

    Posted 27 Aug 07 in General Conversation

User Statistics in Tangler

Total Messages: 19

Topics Created: 6